vue2-client 1.15.33 → 1.15.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +90 -0
- package/package.json +1 -1
- package/src/base-client/components/common/XFormTable/XFormTable.vue +1 -0
- package/src/base-client/components/common/XFormTable/demo.vue +1 -0
- package/src/base-client/components/common/XTable/XTable.vue +5 -1
- package/src/base-client/components/common/XTable/XTableWrapper.vue +2 -0
- package/src/base-client/components/his/XShiftSchedule/dome.vue +2 -2
- package/src/components/FileImageItem/FileItemGroup.vue +2 -2
- package/src/components/STable/index.js +74 -2
- package/src/pages/WorkflowDetail/WorkFlowDemo3.vue +203 -204
- package/src/pages/WorkflowDetail/WorkflowDetail.vue +2 -22
- package/src/theme/global.less +112 -0
package/CLAUDE.md
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
# CLAUDE.md
|
2
|
+
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
4
|
+
|
5
|
+
## 常用开发命令
|
6
|
+
|
7
|
+
### 开发服务器
|
8
|
+
- `npm run serve` - 在端口8020启动开发服务器(Windows需要SET命令设置NODE_OPTIONS)
|
9
|
+
- `npm run mac-serve` - 在macOS/Linux启动开发服务器
|
10
|
+
- 支持多环境启动命令:gaslink、revenue、liuli、scada、iot、his、runtime、message、apply
|
11
|
+
|
12
|
+
### 构建命令
|
13
|
+
- `npm run build` - 生产环境构建
|
14
|
+
- `npm run build:preview` - 预览环境构建
|
15
|
+
|
16
|
+
### 测试
|
17
|
+
- `npm test` - 运行Jest测试
|
18
|
+
- `npm run test:unit` - 运行Vue CLI单元测试
|
19
|
+
|
20
|
+
### 代码质量
|
21
|
+
- `npm run lint` - 运行ESLint并自动修复问题
|
22
|
+
- `npm run lint:nofix` - 运行ESLint但不自动修复
|
23
|
+
|
24
|
+
## 项目架构
|
25
|
+
|
26
|
+
### Vue 2.7 + Ant Design Vue应用
|
27
|
+
这是一个使用Vue 2.7和Ant Design Vue 1.7.8作为UI框架的项目。项目采用模块化组件架构,包含自定义的base-client基础组件库。
|
28
|
+
|
29
|
+
### 核心架构组件
|
30
|
+
|
31
|
+
#### 基础客户端系统 (`src/base-client/`)
|
32
|
+
- **Components**: 可复用的UI组件,使用X前缀命名(XForm、XTable、XCard等)
|
33
|
+
- **Plugins**: 全局Vue插件,包括认证、i18n扩展和页面管理
|
34
|
+
- **全局注册**: base-client中的组件会全局注册,整个应用可用
|
35
|
+
|
36
|
+
#### 组件库结构
|
37
|
+
- **X组件**: 核心表单和表格组件(XForm、XTable、XFormTable),通过JSON配置动态生成UI
|
38
|
+
- **布局组件**: XPageView用于复杂页面布局,支持基于行的渲染
|
39
|
+
- **业务组件**: 针对工单、系统管理、HIS(医院信息系统)等特定领域的组件
|
40
|
+
|
41
|
+
#### 配置驱动开发
|
42
|
+
- 组件使用JSON配置动态生成表单、表格和布局
|
43
|
+
- `src/config/`中的配置文件定义组件行为和系统设置
|
44
|
+
- 支持多环境配置的特定部署模式
|
45
|
+
|
46
|
+
#### 模块系统
|
47
|
+
- **Pages**: 按功能组织的应用页面
|
48
|
+
- **Services**: API层,包含数据模型和服务抽象
|
49
|
+
- **Utils**: 共享工具,包括加密、格式化和低代码辅助工具
|
50
|
+
- **Store**: Vuex状态管理,包含账户、设置和低代码模块
|
51
|
+
|
52
|
+
#### 低代码平台集成
|
53
|
+
- 内置低代码编辑器和渲染器组件
|
54
|
+
- 低代码环境的自定义组件注册系统
|
55
|
+
- 表达式求值的逻辑运行器系统
|
56
|
+
|
57
|
+
### 开发模式
|
58
|
+
|
59
|
+
#### 组件开发
|
60
|
+
- 遵循现有X组件模式保持一致性
|
61
|
+
- 使用mixins共享表单验证逻辑
|
62
|
+
- 使用XFormCol栅格系统实现响应式设计
|
63
|
+
|
64
|
+
#### API集成
|
65
|
+
- 使用`src/services/apiService.js`进行API调用
|
66
|
+
- 遵循DataModel模式进行数据转换
|
67
|
+
- 使用axios拦截器实现正确的错误处理
|
68
|
+
|
69
|
+
#### 样式开发
|
70
|
+
- 使用Less预处理器,主题变量在`src/theme/`中
|
71
|
+
- Ant Design Vue主题系统,支持动态颜色替换
|
72
|
+
- 组件特定样式与组件共同放置
|
73
|
+
|
74
|
+
#### 测试策略
|
75
|
+
- Jest进行单元测试
|
76
|
+
- Vue Test Utils进行组件测试
|
77
|
+
- 测试文件位于`test/`和`tests/unit/`
|
78
|
+
|
79
|
+
### 环境配置
|
80
|
+
项目通过Vue CLI模式支持多个部署环境:
|
81
|
+
- gaslink、revenue、liuli、scada、iot、his、runtime、message、apply
|
82
|
+
- 每个模式在vue.config.js中有特定的代理配置
|
83
|
+
- 环境变量控制API端点和功能标志
|
84
|
+
|
85
|
+
### 代码风格指南(来自.cursorrules)
|
86
|
+
- 尽可能使用Vue 2.7组合API和setup语法糖
|
87
|
+
- 组件名使用PascalCase
|
88
|
+
- 可组合函数和工具使用camelCase
|
89
|
+
- 方法和计算属性使用箭头函数
|
90
|
+
- 模块化和迭代式代码,避免重复
|
package/package.json
CHANGED
@@ -416,6 +416,8 @@ export default {
|
|
416
416
|
editButtonStateData: [],
|
417
417
|
// 按钮权限
|
418
418
|
buttonPermissions: [],
|
419
|
+
// 行样式函数,用于控制每行的样式类型
|
420
|
+
rowStyleFunction: null,
|
419
421
|
// 是否展示汇总
|
420
422
|
showSummary: false,
|
421
423
|
// 自定义汇总
|
@@ -752,7 +754,8 @@ export default {
|
|
752
754
|
clearSelectRowAfterQuery = false,
|
753
755
|
disableAction = false,
|
754
756
|
extraData,
|
755
|
-
chineseQueryColumnArray = []
|
757
|
+
chineseQueryColumnArray = [],
|
758
|
+
rowStyleFunction = null
|
756
759
|
} = params
|
757
760
|
this.showSummary = Object.keys(tableSummaryMap).length > 0
|
758
761
|
if (this.showSummary) {
|
@@ -811,6 +814,7 @@ export default {
|
|
811
814
|
this.clearSelectRowAfterQuery = clearSelectRowAfterQuery
|
812
815
|
this.disableAction = disableAction
|
813
816
|
this.extraData = extraData
|
817
|
+
this.rowStyleFunction = rowStyleFunction
|
814
818
|
if (this.chartsConfigArray.length > 0) {
|
815
819
|
// 循环chartsConfigArray,将每个配置的数据请求参数赋值给requestParameters
|
816
820
|
this.chartsConfigArray.forEach(item => {
|
@@ -20,6 +20,7 @@
|
|
20
20
|
:selectRowMode="tableContext.selectRowMode"
|
21
21
|
:size="tableContext.tableSize"
|
22
22
|
:components="components"
|
23
|
+
:rowStyleFunction="tableContext.rowStyleFunction"
|
23
24
|
@beforeDataChange="beforeDataChange"
|
24
25
|
@expand="onExpand"
|
25
26
|
@rowClick="handleRowClick"
|
@@ -156,6 +157,7 @@
|
|
156
157
|
:selectRowMode="tableContext.selectRowMode"
|
157
158
|
:size="tableContext.tableSize"
|
158
159
|
:components="components"
|
160
|
+
:rowStyleFunction="tableContext.rowStyleFunction"
|
159
161
|
@rowClick="handleRowClick"
|
160
162
|
@beforeDataChange="beforeDataChange"
|
161
163
|
>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import T from 'ant-design-vue/es/table/Table'
|
2
2
|
import get from 'lodash.get'
|
3
3
|
import { mapState } from 'vuex'
|
4
|
+
import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
|
4
5
|
|
5
6
|
export default {
|
6
7
|
data () {
|
@@ -100,6 +101,11 @@ export default {
|
|
100
101
|
pageMaxSize: {
|
101
102
|
type: Number,
|
102
103
|
default: null
|
104
|
+
},
|
105
|
+
// 行样式函数,用于控制每行的样式类型
|
106
|
+
rowStyleFunction: {
|
107
|
+
type: Function,
|
108
|
+
default: null
|
103
109
|
}
|
104
110
|
}),
|
105
111
|
computed: {
|
@@ -378,6 +384,44 @@ export default {
|
|
378
384
|
return '#e6f7ff'
|
379
385
|
}
|
380
386
|
},
|
387
|
+
// 获取行样式类型
|
388
|
+
getRowStyleType (record, index) {
|
389
|
+
if (this.rowStyleFunction) {
|
390
|
+
try {
|
391
|
+
// 如果是函数对象,直接执行
|
392
|
+
if (typeof this.rowStyleFunction === 'function') {
|
393
|
+
return this.rowStyleFunction(record, index)
|
394
|
+
}
|
395
|
+
// 如果是字符串函数,使用executeStrFunctionByContext执行
|
396
|
+
if (typeof this.rowStyleFunction === 'string') {
|
397
|
+
return executeStrFunctionByContext(this, this.rowStyleFunction, [record, index])
|
398
|
+
}
|
399
|
+
} catch (e) {
|
400
|
+
console.warn('Row style function error:', e)
|
401
|
+
return 'info'
|
402
|
+
}
|
403
|
+
}
|
404
|
+
return 'info'
|
405
|
+
},
|
406
|
+
// 获取行样式类名
|
407
|
+
getRowStyleClass (record, index) {
|
408
|
+
const styleType = this.getRowStyleType(record, index)
|
409
|
+
switch (styleType) {
|
410
|
+
case 'success':
|
411
|
+
return 'ant-table-row-success'
|
412
|
+
case 'warn':
|
413
|
+
case 'warning':
|
414
|
+
return 'ant-table-row-warning'
|
415
|
+
case 'error':
|
416
|
+
case 'danger':
|
417
|
+
return 'ant-table-row-error'
|
418
|
+
case 'magic':
|
419
|
+
return 'ant-table-row-magic'
|
420
|
+
case 'info':
|
421
|
+
default:
|
422
|
+
return ''
|
423
|
+
}
|
424
|
+
},
|
381
425
|
},
|
382
426
|
|
383
427
|
render () {
|
@@ -421,13 +465,41 @@ export default {
|
|
421
465
|
const isCurrentRow = isRowKeySequence
|
422
466
|
? this.clickedRowKey === index
|
423
467
|
: this.clickedRowKey === record[this.rowKey]
|
468
|
+
const rowStyleClass = this.getRowStyleClass(record, index)
|
469
|
+
|
470
|
+
// 根据行样式类型确定选中时的背景色
|
471
|
+
let selectedBgColor = ''
|
472
|
+
if (isCurrentRow && rowStyleClass) {
|
473
|
+
// 如果有行样式类,使用对应的深色
|
474
|
+
switch (rowStyleClass) {
|
475
|
+
case 'ant-table-row-success':
|
476
|
+
selectedBgColor = '#b8e6a0'
|
477
|
+
break
|
478
|
+
case 'ant-table-row-warning':
|
479
|
+
selectedBgColor = '#ffe066'
|
480
|
+
break
|
481
|
+
case 'ant-table-row-error':
|
482
|
+
selectedBgColor = '#ffb3b3'
|
483
|
+
break
|
484
|
+
case 'ant-table-row-magic':
|
485
|
+
selectedBgColor = '#d9b3ff'
|
486
|
+
break
|
487
|
+
default:
|
488
|
+
selectedBgColor = this.clickedRowColor
|
489
|
+
}
|
490
|
+
} else if (isCurrentRow) {
|
491
|
+
// 没有行样式类时使用默认选中颜色
|
492
|
+
selectedBgColor = this.clickedRowColor
|
493
|
+
}
|
494
|
+
|
424
495
|
return {
|
425
496
|
on: {
|
426
497
|
click: () => this.handleRowClick(record, index)
|
427
498
|
},
|
428
499
|
style: {
|
429
|
-
'background-color':
|
430
|
-
}
|
500
|
+
'background-color': selectedBgColor
|
501
|
+
},
|
502
|
+
class: rowStyleClass
|
431
503
|
}
|
432
504
|
}
|
433
505
|
// 自定义底部汇总插槽组件
|
@@ -1,204 +1,203 @@
|
|
1
|
-
<template>
|
2
|
-
<div id="beingProcessed">
|
3
|
-
<x-form-table
|
4
|
-
title="我的工单"
|
5
|
-
ref="xFormTable"
|
6
|
-
:queryParamsName="queryParamsName"
|
7
|
-
:fixed-query-form="{
|
8
|
-
users_f_handler_id: currUser.id,
|
9
|
-
}"
|
10
|
-
@action="toDetail">
|
11
|
-
<template slot="button">
|
12
|
-
<a-button @click="addApply">
|
13
|
-
<a-icon type="plus"/>
|
14
|
-
发起报建
|
15
|
-
</a-button>
|
16
|
-
</template>
|
17
|
-
</x-form-table>
|
18
|
-
<a-modal
|
19
|
-
v-model="applyAddFlag"
|
20
|
-
:footer="null"
|
21
|
-
:dialog-style="{ top: '5rem' }"
|
22
|
-
:z-index="1001"
|
23
|
-
title="发起报建"
|
24
|
-
:destroyOnClose="true">
|
25
|
-
<x-add-native-form ref="xForm" @onSubmit="applySubmit"/>
|
26
|
-
</a-modal>
|
27
|
-
<WorkflowDetail
|
28
|
-
ref="workFlow"
|
29
|
-
@success="success"
|
30
|
-
@nextClick="nextClick"
|
31
|
-
@x-form-item-emit-func="handleFormItemEvent"
|
32
|
-
>
|
33
|
-
</WorkflowDetail>
|
34
|
-
<!-- 地址选择器 -->
|
35
|
-
<address-select ref="addressSelect" @setAddress="setForm"></address-select>
|
36
|
-
</div>
|
37
|
-
</template>
|
38
|
-
|
39
|
-
<script>
|
40
|
-
import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
|
41
|
-
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
42
|
-
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
|
43
|
-
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
44
|
-
import { mapState } from 'vuex'
|
45
|
-
import AddressSelect from '@vue2-client/pages/addressSelect/index.vue'
|
46
|
-
import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup'
|
47
|
-
|
48
|
-
export default {
|
49
|
-
name: 'Apply',
|
50
|
-
components: {
|
51
|
-
XFormTable,
|
52
|
-
XAddNativeForm,
|
53
|
-
WorkflowDetail,
|
54
|
-
AddressSelect,
|
55
|
-
XFormGroup,
|
56
|
-
},
|
57
|
-
// 透传给子组件的方法(目前XFormTable接了)
|
58
|
-
provide () {
|
59
|
-
return {
|
60
|
-
generalFunction: {
|
61
|
-
setCancel: this.setCancel,
|
62
|
-
chargeAdd: this.chargeAdd,
|
63
|
-
addUser: this.addUser,
|
64
|
-
editUser: this.editUser,
|
65
|
-
addContract: this.addContract,
|
66
|
-
addcharge: this.addcharge,
|
67
|
-
updateFormData: this.updateFormData,
|
68
|
-
chargeCancel: this.chargeCancel,
|
69
|
-
chargeBatchRefund: this.chargeBatchRefund,
|
70
|
-
}
|
71
|
-
}
|
72
|
-
},
|
73
|
-
data () {
|
74
|
-
return {
|
75
|
-
// 查询配置文件名
|
76
|
-
queryParamsName: 'ApplyProcessCRUD',
|
77
|
-
// 发起报建弹框控制
|
78
|
-
applyAddFlag: false,
|
79
|
-
// 提交加载动画
|
80
|
-
confirmLoading: false,
|
81
|
-
refreshFn: null,
|
82
|
-
chargeVisible: false
|
83
|
-
}
|
84
|
-
},
|
85
|
-
computed: {
|
86
|
-
...mapState('account', { currUser: 'user' }),
|
87
|
-
},
|
88
|
-
methods: {
|
89
|
-
addApply () {
|
90
|
-
console.log('打开了吗')
|
91
|
-
this.applyAddFlag = true
|
92
|
-
this.$nextTick(
|
93
|
-
() => {
|
94
|
-
getConfigByName('addApplyForm', 'af-apply', (res) => {
|
95
|
-
this.$refs.xForm.init({
|
96
|
-
businessType: '新增',
|
97
|
-
title: '发起报建',
|
98
|
-
...res
|
99
|
-
})
|
100
|
-
})
|
101
|
-
}
|
102
|
-
)
|
103
|
-
},
|
104
|
-
applySubmit (formData) {
|
105
|
-
runLogic('addApply', formData).then(
|
106
|
-
res => {
|
107
|
-
this.$message.success('发起报建成功')
|
108
|
-
this.$refs.xFormTable.refreshTable(true)
|
109
|
-
this.applyAddFlag = false
|
110
|
-
}
|
111
|
-
).catch(() => {
|
112
|
-
this.applyAddFlag = false
|
113
|
-
})
|
114
|
-
},
|
115
|
-
success () {
|
116
|
-
console.log('完工')
|
117
|
-
},
|
118
|
-
toDetail (record, id) {
|
119
|
-
this.$refs.workFlow.init({
|
120
|
-
workflowId: record.ab_f_workflow_id
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
}
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div id="beingProcessed">
|
3
|
+
<x-form-table
|
4
|
+
title="我的工单"
|
5
|
+
ref="xFormTable"
|
6
|
+
:queryParamsName="queryParamsName"
|
7
|
+
:fixed-query-form="{
|
8
|
+
users_f_handler_id: currUser.id,
|
9
|
+
}"
|
10
|
+
@action="toDetail">
|
11
|
+
<template slot="button">
|
12
|
+
<a-button @click="addApply">
|
13
|
+
<a-icon type="plus"/>
|
14
|
+
发起报建
|
15
|
+
</a-button>
|
16
|
+
</template>
|
17
|
+
</x-form-table>
|
18
|
+
<a-modal
|
19
|
+
v-model="applyAddFlag"
|
20
|
+
:footer="null"
|
21
|
+
:dialog-style="{ top: '5rem' }"
|
22
|
+
:z-index="1001"
|
23
|
+
title="发起报建"
|
24
|
+
:destroyOnClose="true">
|
25
|
+
<x-add-native-form ref="xForm" @onSubmit="applySubmit"/>
|
26
|
+
</a-modal>
|
27
|
+
<WorkflowDetail
|
28
|
+
ref="workFlow"
|
29
|
+
@success="success"
|
30
|
+
@nextClick="nextClick"
|
31
|
+
@x-form-item-emit-func="handleFormItemEvent"
|
32
|
+
>
|
33
|
+
</WorkflowDetail>
|
34
|
+
<!-- 地址选择器 -->
|
35
|
+
<address-select ref="addressSelect" @setAddress="setForm"></address-select>
|
36
|
+
</div>
|
37
|
+
</template>
|
38
|
+
|
39
|
+
<script>
|
40
|
+
import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
|
41
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
42
|
+
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
|
43
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
44
|
+
import { mapState } from 'vuex'
|
45
|
+
import AddressSelect from '@vue2-client/pages/addressSelect/index.vue'
|
46
|
+
import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup'
|
47
|
+
|
48
|
+
export default {
|
49
|
+
name: 'Apply',
|
50
|
+
components: {
|
51
|
+
XFormTable,
|
52
|
+
XAddNativeForm,
|
53
|
+
WorkflowDetail,
|
54
|
+
AddressSelect,
|
55
|
+
XFormGroup,
|
56
|
+
},
|
57
|
+
// 透传给子组件的方法(目前XFormTable接了)
|
58
|
+
provide () {
|
59
|
+
return {
|
60
|
+
generalFunction: {
|
61
|
+
setCancel: this.setCancel,
|
62
|
+
chargeAdd: this.chargeAdd,
|
63
|
+
addUser: this.addUser,
|
64
|
+
editUser: this.editUser,
|
65
|
+
addContract: this.addContract,
|
66
|
+
addcharge: this.addcharge,
|
67
|
+
updateFormData: this.updateFormData,
|
68
|
+
chargeCancel: this.chargeCancel,
|
69
|
+
chargeBatchRefund: this.chargeBatchRefund,
|
70
|
+
}
|
71
|
+
}
|
72
|
+
},
|
73
|
+
data () {
|
74
|
+
return {
|
75
|
+
// 查询配置文件名
|
76
|
+
queryParamsName: 'ApplyProcessCRUD',
|
77
|
+
// 发起报建弹框控制
|
78
|
+
applyAddFlag: false,
|
79
|
+
// 提交加载动画
|
80
|
+
confirmLoading: false,
|
81
|
+
refreshFn: null,
|
82
|
+
chargeVisible: false
|
83
|
+
}
|
84
|
+
},
|
85
|
+
computed: {
|
86
|
+
...mapState('account', { currUser: 'user' }),
|
87
|
+
},
|
88
|
+
methods: {
|
89
|
+
addApply () {
|
90
|
+
console.log('打开了吗')
|
91
|
+
this.applyAddFlag = true
|
92
|
+
this.$nextTick(
|
93
|
+
() => {
|
94
|
+
getConfigByName('addApplyForm', 'af-apply', (res) => {
|
95
|
+
this.$refs.xForm.init({
|
96
|
+
businessType: '新增',
|
97
|
+
title: '发起报建',
|
98
|
+
...res
|
99
|
+
})
|
100
|
+
})
|
101
|
+
}
|
102
|
+
)
|
103
|
+
},
|
104
|
+
applySubmit (formData) {
|
105
|
+
runLogic('addApply', formData).then(
|
106
|
+
res => {
|
107
|
+
this.$message.success('发起报建成功')
|
108
|
+
this.$refs.xFormTable.refreshTable(true)
|
109
|
+
this.applyAddFlag = false
|
110
|
+
}
|
111
|
+
).catch(() => {
|
112
|
+
this.applyAddFlag = false
|
113
|
+
})
|
114
|
+
},
|
115
|
+
success () {
|
116
|
+
console.log('完工')
|
117
|
+
},
|
118
|
+
toDetail (record, id) {
|
119
|
+
this.$refs.workFlow.init({
|
120
|
+
workflowId: record.ab_f_workflow_id
|
121
|
+
})
|
122
|
+
},
|
123
|
+
handleFormItemEvent (func, data, value) {
|
124
|
+
console.log('打印一下:', func, data, value)
|
125
|
+
if (func === 'selectAddress') {
|
126
|
+
this.$refs.addressSelect.setFormShow()
|
127
|
+
}
|
128
|
+
},
|
129
|
+
setForm (record) {
|
130
|
+
this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
|
131
|
+
},
|
132
|
+
nextClick ({ form, formStep, workflowId }) {
|
133
|
+
console.log('success', form, formStep, workflowId)
|
134
|
+
const data = {
|
135
|
+
workflowId,
|
136
|
+
form,
|
137
|
+
formStep
|
138
|
+
}
|
139
|
+
runLogic('applySubmitAfter', data, 'af-apply').then(
|
140
|
+
res => {
|
141
|
+
if (res) {
|
142
|
+
// this.$message.success('提交成功!')
|
143
|
+
this.$refs.xFormTable.refreshTable(true)
|
144
|
+
}
|
145
|
+
}
|
146
|
+
)
|
147
|
+
},
|
148
|
+
// 协议作废
|
149
|
+
setCancel (record, refreshFn) {
|
150
|
+
this.$refs.cancelContract.setCancel(record, refreshFn)
|
151
|
+
},
|
152
|
+
// 增值收费新增
|
153
|
+
chargeAdd (refreshFn) {
|
154
|
+
this.$refs.addCharge.chargeAdd(this.$refs.workFlow.workflowId, refreshFn)
|
155
|
+
},
|
156
|
+
// 协议新增
|
157
|
+
addContract (refreshFn) {
|
158
|
+
this.$refs.addContract.addContract(this.$refs.workFlow.workflowId, refreshFn)
|
159
|
+
},
|
160
|
+
// 新增用户
|
161
|
+
addUser (refreshFn) {
|
162
|
+
if (this.$refs.workFlow.$refs.baseInformation.details.f_workflow_define_name != '团购报建流程') {
|
163
|
+
this.$message.success('只有团购报建流程才可以新增用户信息!')
|
164
|
+
return
|
165
|
+
}
|
166
|
+
this.$refs.addUser.addUser(this.$refs.workFlow.workflowId, refreshFn)
|
167
|
+
},
|
168
|
+
// 编辑用户
|
169
|
+
editUser (record, refreshFn) {
|
170
|
+
this.$refs.addUser.editUser(record, refreshFn)
|
171
|
+
},
|
172
|
+
// 新增收费
|
173
|
+
addcharge (refreshFn) {
|
174
|
+
this.$refs.addApplyCharge.addcharge(this.$refs.workFlow.workflowId, refreshFn)
|
175
|
+
},
|
176
|
+
// 报装缴费页面初始化
|
177
|
+
updateFormData (workflowId) {
|
178
|
+
if (this.$refs.workFlow.$refs.baseInformation.details.f_sub_state == '报装缴费') {
|
179
|
+
runLogic('getApplyBusinessrecode', { f_workflow_id: workflowId }, 'af-apply').then((res) => {
|
180
|
+
this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm(res)
|
181
|
+
})
|
182
|
+
} else if (this.$refs.workFlow.$refs.baseInformation.details.f_sub_state == '合同签订') {
|
183
|
+
runLogic('queryAgreementAmount', { workflowId: workflowId }, 'af-apply').then((res) => {
|
184
|
+
this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm({ add_amount: res[0].f_contract_money })
|
185
|
+
})
|
186
|
+
}
|
187
|
+
},
|
188
|
+
// 增值收费单个数据的撤销功能
|
189
|
+
chargeCancel (record, refreshFn) {
|
190
|
+
this.$refs.cancel.chargeCancel(record, refreshFn)
|
191
|
+
},
|
192
|
+
// 批量撤销(退费)
|
193
|
+
chargeBatchRefund (selectedRowKeys, selectedRows, refreshFn) {
|
194
|
+
if (selectedRowKeys.length === 0 || selectedRows.length === 0) {
|
195
|
+
this.$message.warn('请选择要退费的记录', 5)
|
196
|
+
return
|
197
|
+
}
|
198
|
+
const workflowId = this.$refs.workFlow.workflowId
|
199
|
+
this.$refs.batchRefund.selectRow(selectedRowKeys, selectedRows, refreshFn, workflowId)
|
200
|
+
}
|
201
|
+
}
|
202
|
+
}
|
203
|
+
</script>
|
@@ -95,19 +95,6 @@
|
|
95
95
|
<file-item-group @search="getWorkFlowFiles"/>
|
96
96
|
</template>
|
97
97
|
</a-tab-pane>
|
98
|
-
|
99
|
-
<!--子流程tab-->
|
100
|
-
<a-tab-pane key="6" tab="子流程">
|
101
|
-
<a-card :bordered="false">
|
102
|
-
<x-form-table
|
103
|
-
title="子流程"
|
104
|
-
ref="xFormTable"
|
105
|
-
:queryParamsName="queryParamsNameTab"
|
106
|
-
:fixed-query-form="fixedQueryFormTab"
|
107
|
-
>
|
108
|
-
</x-form-table>
|
109
|
-
</a-card>
|
110
|
-
</a-tab-pane>
|
111
98
|
</a-tabs>
|
112
99
|
</a-card>
|
113
100
|
</div>
|
@@ -161,10 +148,7 @@ export default {
|
|
161
148
|
initStepId: null,
|
162
149
|
visible: false,
|
163
150
|
// 控制流程是否可操作
|
164
|
-
renderCurrentNode: true
|
165
|
-
// 子流程
|
166
|
-
queryParamsNameTab: '',
|
167
|
-
fixedQueryFormTab: {},
|
151
|
+
renderCurrentNode: true
|
168
152
|
}
|
169
153
|
},
|
170
154
|
expose: ['setFormValue'],
|
@@ -246,14 +230,10 @@ export default {
|
|
246
230
|
await this.getBaseInfo()
|
247
231
|
this.fixedQueryForm.a_f_workflow_id = this.workflowId
|
248
232
|
this.fixedAddForm.a_f_workflow_id = this.workflowId
|
249
|
-
this.fixedQueryFormTab.w_f_workflow_parentid = this.workflowId
|
250
233
|
},
|
251
234
|
// 初始化两张固定表
|
252
|
-
async init ({ workflowId,
|
235
|
+
async init ({ workflowId, stepId, renderCurrentNode = true, visible = true }) {
|
253
236
|
this.workflowId = workflowId
|
254
|
-
if (queryParamsNameTab) {
|
255
|
-
this.queryParamsNameTab = queryParamsNameTab
|
256
|
-
}
|
257
237
|
if (stepId) {
|
258
238
|
this.initStepId = stepId
|
259
239
|
}
|
package/src/theme/global.less
CHANGED
@@ -43,6 +43,118 @@ ol {
|
|
43
43
|
margin-bottom: 16px;
|
44
44
|
}
|
45
45
|
|
46
|
+
// 表格行样式类型
|
47
|
+
.ant-table-tbody {
|
48
|
+
// 成功样式 - 绿色 (#52c41a)
|
49
|
+
.ant-table-row-success {
|
50
|
+
background-color: rgba(82, 196, 26, 0.2);
|
51
|
+
|
52
|
+
&:hover {
|
53
|
+
background-color: rgba(82, 196, 26, 0.3);
|
54
|
+
|
55
|
+
td {
|
56
|
+
background-color: transparent;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
// 选中状态
|
61
|
+
&.ant-table-row-selected {
|
62
|
+
background-color: rgba(82, 196, 26, 0.4);
|
63
|
+
|
64
|
+
td {
|
65
|
+
background-color: transparent;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
td {
|
70
|
+
background-color: transparent;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
// 警告样式 - 黄色 (#faad14)
|
75
|
+
.ant-table-row-warning {
|
76
|
+
background-color: rgba(250, 173, 20, 0.1) ;
|
77
|
+
|
78
|
+
&:hover {
|
79
|
+
background-color: rgba(250, 173, 20, 0.15) ;
|
80
|
+
|
81
|
+
td {
|
82
|
+
background-color: transparent ;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
// 选中状态
|
87
|
+
&.ant-table-row-selected {
|
88
|
+
background-color: rgba(250, 173, 20, 0.2);
|
89
|
+
|
90
|
+
td {
|
91
|
+
background-color: transparent;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
td {
|
96
|
+
background-color: transparent ;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
// 错误样式 - 红色 (#f5222f)
|
101
|
+
.ant-table-row-error {
|
102
|
+
background-color: rgba(245, 34, 47, 0.1) ;
|
103
|
+
|
104
|
+
&:hover {
|
105
|
+
background-color: rgba(245, 34, 47, 0.15) ;
|
106
|
+
|
107
|
+
td {
|
108
|
+
background-color: transparent ;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
// 选中状态
|
113
|
+
&.ant-table-row-selected {
|
114
|
+
background-color: rgba(245, 34, 47, 0.2) ;
|
115
|
+
|
116
|
+
td {
|
117
|
+
background-color: transparent ;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
td {
|
122
|
+
background-color: transparent ;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
// 魔法样式 - 紫色
|
127
|
+
.ant-table-row-magic {
|
128
|
+
background-color: rgba(114, 46, 209, 0.1) ;
|
129
|
+
|
130
|
+
&:hover {
|
131
|
+
background-color: rgba(114, 46, 209, 0.15) ;
|
132
|
+
|
133
|
+
td {
|
134
|
+
background-color: transparent ;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
// 选中状态
|
139
|
+
&.ant-table-row-selected {
|
140
|
+
background-color: rgba(114, 46, 209, 0.2) ;
|
141
|
+
|
142
|
+
td {
|
143
|
+
background-color: transparent ;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
|
147
|
+
td {
|
148
|
+
background-color: transparent ;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
// 默认选中状态(没有特殊行样式时)
|
153
|
+
.ant-table-row-selected:not(.ant-table-row-success):not(.ant-table-row-warning):not(.ant-table-row-error):not(.ant-table-row-magic) {
|
154
|
+
background-color: rgba(24, 144, 255, 0.1) ;
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
46
158
|
// 数据列表 操作
|
47
159
|
.table-operator {
|
48
160
|
margin-bottom: 18px;
|