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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.14.92",
3
+ "version": "1.14.93",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -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: 'WorkFlowDemo',
6
- components: { WorkflowDetail },
7
- mounted () {
8
- this.$refs.workFlow.init({
9
- workflowId: '58'
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
- * @param note 备注信息
16
- * @param form 表单信息
17
- * @param workflowId
18
- */
19
- success ({ note, form, workflowId }) {
20
- console.log('success', note, form, workflowId)
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
- * @param note 备注信息
25
- * @param form 表单信息
26
- * @param workflowId 工作流id
27
- * @param fromStepId 起ID
28
- * @param toStepId 往ID
29
- * @param successStepId 完成步骤id
30
- * @param successStep 完成步骤名称
31
- * @param fromStep 起步骤名称
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
+ &lt;!&ndash; 分配工单 &ndash;&gt;
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.name === '超级管理员') {
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
- const step = this.stepsForChild[this.currentStepId - 1]
268
- // 检查handler是否包含当前用户
269
- if (step && step.handler) {
270
- return step.handler.includes(this.currUser.name)
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 step.properties.chargePerson.personList.some(item => {
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
- // 检查parentname是否存在并包含指定部门
283
- return this.currUser.parentname && this.currUser.parentname.includes(item.name)
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
- if (key === stepDefine.model) {
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 (!stepHandler) {
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() + 1)
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
- // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
72
- // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
73
- // component: () => import('@vue2-client/pages/XPageViewExample/index.vue'),
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://aote-office.8866.org:31567'
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://aote-office.8866.org:31567'
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 铜川