vue2-client 1.14.92 → 1.14.93
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/package.json +1 -1
- package/src/base-client/components/common/AmapMarker/index.js +3 -3
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/pages/WorkflowDetail/WorkFlowDemo.vue +82 -36
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +60 -21
- package/src/pages/addressSelect/addressDemo.vue +24 -24
- package/src/router/async/router.map.js +3 -7
- package/vue.config.js +2 -2
package/package.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
import AmapPointRendering from './AmapPointRendering'
|
2
|
-
|
3
|
-
export default AmapPointRendering
|
1
|
+
import AmapPointRendering from './AmapPointRendering'
|
2
|
+
|
3
|
+
export default AmapPointRendering
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import XDetailsView from './XDetailsView'
|
2
|
-
|
3
|
-
export default XDetailsView
|
1
|
+
import XDetailsView from './XDetailsView'
|
2
|
+
|
3
|
+
export default XDetailsView
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import XFormGroupDetails from './XFormGroupDetails'
|
2
|
-
|
3
|
-
export default XFormGroupDetails
|
1
|
+
import XFormGroupDetails from './XFormGroupDetails'
|
2
|
+
|
3
|
+
export default XFormGroupDetails
|
@@ -1,47 +1,93 @@
|
|
1
|
+
<template>
|
2
|
+
<a-card :bordered="false">
|
3
|
+
<x-form-table
|
4
|
+
title="示例页面"
|
5
|
+
:queryParamsName="queryParamsName"
|
6
|
+
:fixed-query-form="{
|
7
|
+
users_f_handler_id: currUser.id,
|
8
|
+
}"
|
9
|
+
@action="toDetail">
|
10
|
+
<template slot="button">
|
11
|
+
<a-button @click="add">
|
12
|
+
<a-icon type="plus"/>
|
13
|
+
发起报建
|
14
|
+
</a-button>
|
15
|
+
</template>
|
16
|
+
</x-form-table>
|
17
|
+
<a-modal
|
18
|
+
v-model="applyAddFlag"
|
19
|
+
:footer="null"
|
20
|
+
:dialog-style="{ top: '5rem' }"
|
21
|
+
:z-index="1001"
|
22
|
+
title="发起报建"
|
23
|
+
:destroyOnClose="true">
|
24
|
+
<x-add-native-form ref="xForm" @onSubmit="applySubmit"/>
|
25
|
+
</a-modal>
|
26
|
+
<WorkflowDetail ref="workFlow" @success="success" @nextClick="nextClick"></WorkflowDetail>
|
27
|
+
</a-card>
|
28
|
+
</template>
|
29
|
+
|
1
30
|
<script>
|
2
31
|
import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
|
32
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
33
|
+
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
|
34
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
35
|
+
import { mapState } from 'vuex'
|
3
36
|
|
4
37
|
export default {
|
5
|
-
name: '
|
6
|
-
components: {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
38
|
+
name: 'Apply',
|
39
|
+
components: {
|
40
|
+
XFormTable,
|
41
|
+
XAddNativeForm,
|
42
|
+
WorkflowDetail
|
43
|
+
},
|
44
|
+
data () {
|
45
|
+
return {
|
46
|
+
// 查询配置文件名
|
47
|
+
queryParamsName: 'applyCRUD',
|
48
|
+
// 发起报建弹框控制
|
49
|
+
applyAddFlag: false
|
50
|
+
}
|
51
|
+
},
|
52
|
+
computed: {
|
53
|
+
...mapState('account', { currUser: 'user' }),
|
11
54
|
},
|
12
55
|
methods: {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
56
|
+
add () {
|
57
|
+
this.applyAddFlag = true
|
58
|
+
this.$nextTick(
|
59
|
+
() => {
|
60
|
+
getConfigByName('addApplyForm', 'af-apply', (res) => {
|
61
|
+
this.$refs.xForm.init({
|
62
|
+
businessType: '新增',
|
63
|
+
title: '发起报建',
|
64
|
+
...res
|
65
|
+
})
|
66
|
+
})
|
67
|
+
}
|
68
|
+
)
|
69
|
+
},
|
70
|
+
applySubmit (formData) {
|
71
|
+
runLogic('addApply', formData).then(
|
72
|
+
res => {
|
73
|
+
this.$message.success('发起报建成功')
|
74
|
+
this.applyAddFlag = false
|
75
|
+
}
|
76
|
+
).catch(() => {
|
77
|
+
this.applyAddFlag = false
|
78
|
+
})
|
21
79
|
},
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
* @param toStep 往步骤名称
|
33
|
-
*/
|
34
|
-
nextClick ({ note, form, workflowId, fromStepId, toStepId, fromStep, toStep, successStepId, successStep }) {
|
35
|
-
console.log('success', note, form, workflowId, fromStepId, toStepId, fromStep, toStep, successStepId, successStep)
|
80
|
+
success () {
|
81
|
+
console.log('完工')
|
82
|
+
},
|
83
|
+
nextClick(data) {
|
84
|
+
console.log('提交下一步', data)
|
85
|
+
},
|
86
|
+
toDetail (record, id) {
|
87
|
+
this.$refs.workFlow.init({
|
88
|
+
workflowId: record.twf_id
|
89
|
+
})
|
36
90
|
}
|
37
91
|
}
|
38
92
|
}
|
39
93
|
</script>
|
40
|
-
|
41
|
-
<template>
|
42
|
-
<WorkflowDetail ref="workFlow" @success="success" @nextClick="nextClick"></WorkflowDetail>
|
43
|
-
</template>
|
44
|
-
|
45
|
-
<style scoped lang="less">
|
46
|
-
|
47
|
-
</style>
|
@@ -209,10 +209,10 @@
|
|
209
209
|
</a-form-item>
|
210
210
|
</a-form>
|
211
211
|
</a-tab-pane>
|
212
|
-
<a-tab-pane v-if="canSubmit && !beforeStepActive && showPrevBtn && !workflowState" key="3" tab="工单拆分">
|
213
|
-
|
212
|
+
<!-- <a-tab-pane v-if="canSubmit && !beforeStepActive && showPrevBtn && !workflowState" key="3" tab="工单拆分">
|
213
|
+
<!– 分配工单 –>
|
214
214
|
<workflow-list-resolution :workflow-project-id="workflowId" :details="details"></workflow-list-resolution>
|
215
|
-
</a-tab-pane
|
215
|
+
</a-tab-pane>-->
|
216
216
|
</a-tabs>
|
217
217
|
</template>
|
218
218
|
</div>
|
@@ -257,33 +257,56 @@ export default {
|
|
257
257
|
...mapState('account', { currUser: 'user' }),
|
258
258
|
canSubmit () {
|
259
259
|
// 对于超级管理员直接认为可以提交
|
260
|
-
if (this.currUser.
|
260
|
+
if (this.currUser.ename === '1') {
|
261
261
|
return true
|
262
262
|
}
|
263
263
|
// currentStepId可能还没初始化,此处拿不到先返回false
|
264
264
|
if (!this.currentStepId) {
|
265
265
|
return false
|
266
266
|
}
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
// 检查角色和部门权限
|
273
|
-
if (step && step.properties && step.properties.chargePerson) {
|
274
|
-
if (step.properties.chargePerson.personList && step.properties.chargePerson.personList.length > 0) {
|
267
|
+
// 如果当前选中节点不是正在进行的节点,则判断viewers权限
|
268
|
+
if (this.activeStepId !== this.currentStepId) {
|
269
|
+
const activeStep = this.stepsForChild[this.activeStepId - 1]
|
270
|
+
const viewers = activeStep?.properties?.otherProperty?.viewers ?? []
|
271
|
+
if (viewers.length > 0) {
|
275
272
|
// 使用some方法判断当前人员是否满足任一条件
|
276
|
-
return
|
273
|
+
return viewers.some(item => {
|
277
274
|
if (item.type === 'role') {
|
278
275
|
// 检查rolestr是否存在并包含指定角色
|
279
|
-
return this.currUser.rolestr && this.currUser.rolestr.includes(item.name)
|
276
|
+
return this.currUser.rolestr && this.currUser.rolestr.split(',').includes(item.name)
|
280
277
|
}
|
281
278
|
if (item.type === 'department') {
|
282
|
-
// 检查
|
283
|
-
return this.currUser.
|
279
|
+
// 检查depname是否存在并包含指定部门
|
280
|
+
return this.currUser.depname && this.currUser.deps.includes(item.name)
|
284
281
|
}
|
285
282
|
return false
|
286
283
|
})
|
284
|
+
} else {
|
285
|
+
return true
|
286
|
+
}
|
287
|
+
} else {
|
288
|
+
const step = this.stepsForChild[this.currentStepId - 1]
|
289
|
+
// 检查角色和部门权限
|
290
|
+
if (step && step.properties && step.properties.chargePerson) {
|
291
|
+
if (step.properties.chargePerson.personList && step.properties.chargePerson.personList.length > 0) {
|
292
|
+
// 使用some方法判断当前人员是否满足任一条件
|
293
|
+
return step.properties.chargePerson.personList.some(item => {
|
294
|
+
if (item.type === 'role') {
|
295
|
+
// 检查rolestr是否存在并包含指定角色
|
296
|
+
return this.currUser.rolestr && this.currUser.rolestr.split(',').includes(item.name)
|
297
|
+
}
|
298
|
+
if (item.type === 'department') {
|
299
|
+
// 检查parentname是否存在并包含指定部门
|
300
|
+
return this.currUser.parentname && this.currUser.parentname.includes(item.name)
|
301
|
+
}
|
302
|
+
return false
|
303
|
+
})
|
304
|
+
}
|
305
|
+
}
|
306
|
+
|
307
|
+
// 检查handler是否包含当前用户
|
308
|
+
if (step && step.handler) {
|
309
|
+
return step.handler.includes(this.currUser.name)
|
287
310
|
}
|
288
311
|
}
|
289
312
|
return false
|
@@ -476,6 +499,8 @@ export default {
|
|
476
499
|
.then(res => {
|
477
500
|
res.state = this.stepsForChild[res.id - 1].name
|
478
501
|
this.currentStepId = res.id
|
502
|
+
// 获取到当前步骤后复制下一步时间
|
503
|
+
this.deadline = this.getDefaultDeadline(this.stepsForChild[this.currentStepId - 1].properties?.otherProperty?.nextNodeInterval)
|
479
504
|
this.currentStep = res
|
480
505
|
this.getDirection()
|
481
506
|
}, err => {
|
@@ -686,6 +711,7 @@ export default {
|
|
686
711
|
this.showForm = true
|
687
712
|
this.$nextTick(() => {
|
688
713
|
this.$refs.xAddForm && this.$refs.xAddForm.init({
|
714
|
+
...properties.form,
|
689
715
|
businessType: '修改',
|
690
716
|
formItems: this.stepDefine,
|
691
717
|
layout: properties.form.xAddFormLayout,
|
@@ -735,6 +761,15 @@ export default {
|
|
735
761
|
}
|
736
762
|
}
|
737
763
|
},
|
764
|
+
// 获取表单字段实际值
|
765
|
+
getRealKey (key, isHandleFormKey) {
|
766
|
+
if (key === 'selected_id') return key
|
767
|
+
if (isHandleFormKey) {
|
768
|
+
return key.substring(key.indexOf('_') + 1)
|
769
|
+
} else {
|
770
|
+
return key
|
771
|
+
}
|
772
|
+
},
|
738
773
|
// 加载完成
|
739
774
|
resolveStep () {
|
740
775
|
// 获取当前步骤的按钮组配置
|
@@ -750,6 +785,7 @@ export default {
|
|
750
785
|
async activeStep (stepId) {
|
751
786
|
// 开启加载
|
752
787
|
this.loadingHistory = true
|
788
|
+
this.activeStepId = stepId
|
753
789
|
// 获取激活节点的步骤名
|
754
790
|
this.activeStepName = this.getStepNameByStepId(stepId)
|
755
791
|
// 清空回显数据
|
@@ -764,10 +800,13 @@ export default {
|
|
764
800
|
formCompletedDataPreview = JSON.parse(JSON.stringify(this.formCompletedData))
|
765
801
|
// 使用字段定义中内容,将回显数据的列名,替换为定义的中文名
|
766
802
|
const formData = formCompletedDataPreview.data
|
803
|
+
const isKeyHandle = this.stepsDefine[stepId - 1]?.properties?.form?.isKeyHandle || false
|
767
804
|
for (const key in formData) {
|
768
805
|
for (let i = 0; i < this.targetStepDefine.length; i++) {
|
769
806
|
const stepDefine = this.targetStepDefine[i]
|
770
|
-
|
807
|
+
// 兼容下旧代码,这里是否处理key根据表单配置中的isKeyHandle来决定,也有另一种情况如果处理完的key在表单中已经重复会将未处理的key直接存进去(新增表单的逻辑)
|
808
|
+
// 所以两种都判断下命中任意一个都算
|
809
|
+
if (key === this.getRealKey(stepDefine.model, isKeyHandle) || key === stepDefine.model) {
|
771
810
|
if (!['FilesId', 'Images'].includes(key)) {
|
772
811
|
// 读取字典值
|
773
812
|
if (stepDefine.formType === 'select' && stepDefine.selectType === 'key') {
|
@@ -840,7 +879,7 @@ export default {
|
|
840
879
|
// return false
|
841
880
|
// }
|
842
881
|
const stepHandler = this.getStepHandler()
|
843
|
-
if (!
|
882
|
+
if (this.needSelectPerson && !this.checkedChargePerson) {
|
844
883
|
this.$message.error('请设置下一环节处理人')
|
845
884
|
return false
|
846
885
|
}
|
@@ -898,9 +937,9 @@ export default {
|
|
898
937
|
})
|
899
938
|
},
|
900
939
|
// 获取默认截止时间
|
901
|
-
getDefaultDeadline () {
|
940
|
+
getDefaultDeadline (day = 1) {
|
902
941
|
const date = new Date()
|
903
|
-
date.setDate(date.getDate() +
|
942
|
+
date.setDate(date.getDate() + day)
|
904
943
|
date.setHours(date.getHours() + 2)
|
905
944
|
return formatDate(date, 'yyyy-MM-dd hh:mm')
|
906
945
|
},
|
@@ -979,7 +1018,7 @@ export default {
|
|
979
1018
|
if (personItem.type === 'role') {
|
980
1019
|
// 根据角色获取人员
|
981
1020
|
filteredUsers = allUser.filter(user =>
|
982
|
-
user.rolestr && user.rolestr.includes(personItem.name)
|
1021
|
+
user.rolestr && user.rolestr.split(',').includes(personItem.name)
|
983
1022
|
).map(user => {
|
984
1023
|
return { label: user.label, value: user.value }
|
985
1024
|
})
|
@@ -1,24 +1,24 @@
|
|
1
|
-
<template>
|
2
|
-
<!-- 测试界面——测试地址选择新增组件-->
|
3
|
-
<div>
|
4
|
-
<a-button @click="open">打开选择地址弹窗</a-button>
|
5
|
-
<address-select :addressShow="showDialog"/>
|
6
|
-
</div>
|
7
|
-
</template>
|
8
|
-
|
9
|
-
<script>
|
10
|
-
import AddressSelect from '@/pages/addressSelect'
|
11
|
-
|
12
|
-
export default {
|
13
|
-
components: { AddressSelect },
|
14
|
-
data: () => ({
|
15
|
-
showDialog: false
|
16
|
-
}),
|
17
|
-
methods: {
|
18
|
-
open () {
|
19
|
-
console.log('打开选择地址弹窗')
|
20
|
-
this.showDialog = true
|
21
|
-
}
|
22
|
-
}
|
23
|
-
}
|
24
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<!-- 测试界面——测试地址选择新增组件-->
|
3
|
+
<div>
|
4
|
+
<a-button @click="open">打开选择地址弹窗</a-button>
|
5
|
+
<address-select :addressShow="showDialog"/>
|
6
|
+
</div>
|
7
|
+
</template>
|
8
|
+
|
9
|
+
<script>
|
10
|
+
import AddressSelect from '@/pages/addressSelect'
|
11
|
+
|
12
|
+
export default {
|
13
|
+
components: { AddressSelect },
|
14
|
+
data: () => ({
|
15
|
+
showDialog: false
|
16
|
+
}),
|
17
|
+
methods: {
|
18
|
+
open () {
|
19
|
+
console.log('打开选择地址弹窗')
|
20
|
+
this.showDialog = true
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
</script>
|
@@ -55,9 +55,6 @@ routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynami
|
|
55
55
|
routerResource.example = {
|
56
56
|
path: 'example',
|
57
57
|
name: '示例主页面',
|
58
|
-
component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo2.vue'),
|
59
|
-
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
60
|
-
// component: () => import('@vue2-client/pages/addressSelect/addressDemo.vue'),
|
61
58
|
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
62
59
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|
63
60
|
// component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
@@ -68,10 +65,9 @@ routerResource.example = {
|
|
68
65
|
// component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
|
69
66
|
// component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
|
70
67
|
// component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue'),
|
71
|
-
|
72
|
-
// component: () => import('@vue2-client/
|
73
|
-
// component: () => import('@vue2-client/
|
74
|
-
// component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),
|
68
|
+
component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
69
|
+
// component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
|
70
|
+
// component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonexampleDemo.vue'),
|
75
71
|
// component: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue'),
|
76
72
|
// component: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
|
77
73
|
// component: () => import('@vue2-client/base-client/components/common/XPrint/Demo.vue'),
|
package/vue.config.js
CHANGED
@@ -11,12 +11,12 @@ const productionGzipExtensions = ['js', 'css']
|
|
11
11
|
const isProd = process.env.NODE_ENV === 'production'
|
12
12
|
|
13
13
|
// v4 产品演示
|
14
|
-
const v3Server = 'http://
|
14
|
+
const v3Server = 'http://192.168.50.67:31567'
|
15
15
|
// const gateway = 'http://192.168.50.67:31467'
|
16
16
|
// const testUpload = 'http://123.60.214.109:8406'
|
17
17
|
const OSSServerDev = 'http://192.168.50.67:30351'
|
18
18
|
// const revenue = 'http://aote-office.8866.org:31567'
|
19
|
-
const revenue = 'http://
|
19
|
+
const revenue = 'http://192.168.50.67:31567'
|
20
20
|
// const OSSServerProd = 'http://192.168.50.67:31351'
|
21
21
|
// const testUploadLocal = 'http://127.0.0.1:9001'
|
22
22
|
// v3 铜川
|