vue2-client 1.15.12 → 1.15.14

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.
@@ -1,96 +1,96 @@
1
- <template>
2
- <a-card :bordered="false" :body-style="bodyStyle">
3
- <a-tabs
4
- :tabBarGutter="tabBarGutter"
5
- :activeKey="activeKey"
6
- @change="tabPaneChange"
7
- :hideAdd="true"
8
- :tabBarStyle="{ display: showTabBar ? 'block' : 'none' }"
9
- >
10
- <slot name="extraBeforeTabs"></slot>
11
- <a-tab-pane
12
- :forceRender="true"
13
- v-for="(tab, index) in data"
14
- :key="index"
15
- :tab="tab.title"
16
- >
17
- <component
18
- :is="resolveComponentType(tab.type)"
19
- :key="`xTabPaneComp${index}`"
20
- :ref="`tab_comp_${index}`"
21
- v-bind="tab.props || {}"
22
- />
23
- </a-tab-pane>
24
- </a-tabs>
25
- </a-card>
26
- </template>
27
-
28
- <script setup>
29
- import { ref, onMounted } from 'vue'
30
- import { resolveComponentType } from '../componentTypes'
31
-
32
- const props = defineProps({
33
- // 标签页数据
34
- data: {
35
- type: Array,
36
- required: true
37
- },
38
- // 是否显示标签栏
39
- showTabBar: {
40
- type: Boolean,
41
- default: true
42
- },
43
- // 标签页切换时的回调函数
44
- onChange: {
45
- type: [String, Function],
46
- default: null
47
- },
48
- // Tab间距
49
- tabBarGutter: {
50
- type: Number,
51
- default: 10
52
- },
53
- // 卡片样式
54
- bodyStyle: {
55
- type: Object,
56
- default: () => ({})
57
- },
58
- // 默认激活的标签页
59
- defaultActiveKey: {
60
- type: [String, Number],
61
- default: 0
62
- }
63
- })
64
-
65
- // 激活的标签页
66
- const activeKey = ref(0)
67
-
68
- // 切换标签页
69
- const tabPaneChange = (newKey) => {
70
- if (activeKey.value === newKey) return
71
-
72
- const oldKey = activeKey.value
73
- activeKey.value = newKey
74
-
75
- // 触发标签页切换事件
76
- if (props.onChange) {
77
- try {
78
- if (props.onChange instanceof Function) {
79
- props.onChange(oldKey, newKey, props.data[oldKey], props.data[newKey])
80
- } else {
81
- // 创建一个安全的函数执行环境
82
- // eslint-disable-next-line no-new-func
83
- const onChange = new Function('oldKey', 'newKey', 'oldTab', 'newTab', `return (${props.onChange})(oldKey, newKey, oldTab, newTab)`)
84
- onChange(oldKey, newKey, props.data[oldKey], props.data[newKey])
85
- }
86
- } catch (error) {
87
- console.error('执行标签页切换回调错误:', error)
88
- }
89
- }
90
- }
91
-
92
- // 生命周期
93
- onMounted(() => {
94
- activeKey.value = props.defaultActiveKey
95
- })
96
- </script>
1
+ <template>
2
+ <a-card :bordered="false" :body-style="bodyStyle">
3
+ <a-tabs
4
+ :tabBarGutter="tabBarGutter"
5
+ :activeKey="activeKey"
6
+ @change="tabPaneChange"
7
+ :hideAdd="true"
8
+ :tabBarStyle="{ display: showTabBar ? 'block' : 'none' }"
9
+ >
10
+ <slot name="extraBeforeTabs"></slot>
11
+ <a-tab-pane
12
+ :forceRender="true"
13
+ v-for="(tab, index) in data"
14
+ :key="index"
15
+ :tab="tab.title"
16
+ >
17
+ <component
18
+ :is="resolveComponentType(tab.type)"
19
+ :key="`xTabPaneComp${index}`"
20
+ :ref="`tab_comp_${index}`"
21
+ v-bind="tab.props || {}"
22
+ />
23
+ </a-tab-pane>
24
+ </a-tabs>
25
+ </a-card>
26
+ </template>
27
+
28
+ <script setup>
29
+ import { ref, onMounted } from 'vue'
30
+ import { resolveComponentType } from '../componentTypes'
31
+
32
+ const props = defineProps({
33
+ // 标签页数据
34
+ data: {
35
+ type: Array,
36
+ required: true
37
+ },
38
+ // 是否显示标签栏
39
+ showTabBar: {
40
+ type: Boolean,
41
+ default: true
42
+ },
43
+ // 标签页切换时的回调函数
44
+ onChange: {
45
+ type: [String, Function],
46
+ default: null
47
+ },
48
+ // Tab间距
49
+ tabBarGutter: {
50
+ type: Number,
51
+ default: 10
52
+ },
53
+ // 卡片样式
54
+ bodyStyle: {
55
+ type: Object,
56
+ default: () => ({})
57
+ },
58
+ // 默认激活的标签页
59
+ defaultActiveKey: {
60
+ type: [String, Number],
61
+ default: 0
62
+ }
63
+ })
64
+
65
+ // 激活的标签页
66
+ const activeKey = ref(0)
67
+
68
+ // 切换标签页
69
+ const tabPaneChange = (newKey) => {
70
+ if (activeKey.value === newKey) return
71
+
72
+ const oldKey = activeKey.value
73
+ activeKey.value = newKey
74
+
75
+ // 触发标签页切换事件
76
+ if (props.onChange) {
77
+ try {
78
+ if (props.onChange instanceof Function) {
79
+ props.onChange(oldKey, newKey, props.data[oldKey], props.data[newKey])
80
+ } else {
81
+ // 创建一个安全的函数执行环境
82
+ // eslint-disable-next-line no-new-func
83
+ const onChange = new Function('oldKey', 'newKey', 'oldTab', 'newTab', `return (${props.onChange})(oldKey, newKey, oldTab, newTab)`)
84
+ onChange(oldKey, newKey, props.data[oldKey], props.data[newKey])
85
+ }
86
+ } catch (error) {
87
+ console.error('执行标签页切换回调错误:', error)
88
+ }
89
+ }
90
+ }
91
+
92
+ // 生命周期
93
+ onMounted(() => {
94
+ activeKey.value = props.defaultActiveKey
95
+ })
96
+ </script>
@@ -1,22 +1,22 @@
1
- // 支持的组件类型映射
2
- export const components = {
3
- XTab: () => import('@vue2-client/base-client/components/layout/XPageView/XTab'),
4
- XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable'),
5
- XAddNativeForm: () => import('@vue2-client/base-client/components/common/XAddNativeForm'),
6
- XReportGrid: () => import('@vue2-client/base-client/components/common/XReportGrid/XReport.vue'),
7
- XErrorView: () => import('@vue2-client/base-client/components/layout/XPageView/XErrorView'),
8
- // 全局组件不需要导入,直接返回null,让Vue使用全局注册的组件
9
- }
10
-
11
- // 组件类型解析函数
12
- export const resolveComponentType = (type) => {
13
- if (!type) return components.XErrorView
14
-
15
- // 如果是Ant Design Vue组件(以'a-'开头),直接返回原名称
16
- if (type.startsWith('a-')) {
17
- return type
18
- }
19
-
20
- // 否则从已注册的组件集合中查找
21
- return components[type] || components.XErrorView
22
- }
1
+ // 支持的组件类型映射
2
+ export const components = {
3
+ XTab: () => import('@vue2-client/base-client/components/layout/XPageView/XTab'),
4
+ XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable'),
5
+ XAddNativeForm: () => import('@vue2-client/base-client/components/common/XAddNativeForm'),
6
+ XReportGrid: () => import('@vue2-client/base-client/components/common/XReportGrid/XReport.vue'),
7
+ XErrorView: () => import('@vue2-client/base-client/components/layout/XPageView/XErrorView'),
8
+ // 全局组件不需要导入,直接返回null,让Vue使用全局注册的组件
9
+ }
10
+
11
+ // 组件类型解析函数
12
+ export const resolveComponentType = (type) => {
13
+ if (!type) return components.XErrorView
14
+
15
+ // 如果是Ant Design Vue组件(以'a-'开头),直接返回原名称
16
+ if (type.startsWith('a-')) {
17
+ return type
18
+ }
19
+
20
+ // 否则从已注册的组件集合中查找
21
+ return components[type] || components.XErrorView
22
+ }
package/src/main.js CHANGED
@@ -7,6 +7,8 @@ import { routerOptions, modules, i18n, message, bootstrap } from '../index'
7
7
  import findParentData from '@/plugins/FindParentsData'
8
8
  import { Modal } from 'ant-design-vue'
9
9
 
10
+ import VueDraggableResizable from 'vue-draggable-resizable'
11
+
10
12
  Vue.use(Router)
11
13
  Vue.use(Vuex)
12
14
  // Vue.use(eventLogPlugin)
@@ -16,13 +18,10 @@ Vue.use(findParentData)
16
18
  const store = new Vuex.Store({ modules })
17
19
  const router = new Router(routerOptions)
18
20
 
19
- // 绑定原型,用于amis
20
- Vue.$store = store
21
- Vue.$router = router
22
- Vue.$i18n = i18n
23
21
  Vue.config.devtools = true
24
22
  // 绑定原型
25
23
  Vue.Modal = Modal
24
+ Vue.component('VueDraggableResizable', VueDraggableResizable)
26
25
 
27
26
  bootstrap({ router, store, i18n, message }).then(() => {
28
27
  new Vue({
@@ -6,7 +6,7 @@ export default {
6
6
  components: { WorkflowDetail },
7
7
  mounted () {
8
8
  this.$refs.workFlow.init({
9
- workflowId: '58'
9
+ workflowId: '376'
10
10
  })
11
11
  },
12
12
  methods: {
@@ -32,9 +32,26 @@
32
32
  >
33
33
  </WorkflowDetail>
34
34
  <address-select ref="addressSelect" @setAddress="setForm"></address-select>
35
+ <!-- 协议新增功能 -->
36
+ <a-modal
37
+ v-model="formAddContractState"
38
+ :dialog-style="{ top: '5rem' }"
39
+ :z-index="1001"
40
+ title="新增"
41
+ :destroyOnClose="true"
42
+ width="55vw">
43
+ <x-add-native-form
44
+ ref="xContractForm"
45
+ @onSubmit="submitContract"
46
+ />
47
+ <template #footer>
48
+ <a-button key="back" @click="formAddContractState = false">取消</a-button>
49
+ <a-button key="submit" type="primary" :loading="submitContractLoading" @click="formContractSubmit">确认</a-button>
50
+ </template>
51
+ </a-modal>
35
52
  <!-- 协议作废功能 -->
36
53
  <a-modal
37
- v-model="formState"
54
+ v-model="formCancelState"
38
55
  :dialog-style="{ top: '5rem' }"
39
56
  :z-index="1001"
40
57
  title="作废"
@@ -45,10 +62,55 @@
45
62
  @onSubmit="submit"
46
63
  />
47
64
  <template #footer>
48
- <a-button key="back" @click="formState = false">取消</a-button>
65
+ <a-button key="back" @click="formCancelState = false">取消</a-button>
49
66
  <a-button key="submit" type="primary" :loading="submitLoading" @click="formSubmit">确认</a-button>
50
67
  </template>
51
68
  </a-modal>
69
+ <a-modal
70
+ v-model="formChargeVisible"
71
+ :footer="null"
72
+ :dialog-style="{ top: '5rem' }"
73
+ :bodyStyle="{height:'70vh'}"
74
+ :z-index="1001"
75
+ title="新增"
76
+ width="70%"
77
+ :destroyOnClose="true">
78
+ <other-charge
79
+ :data="chargeData"
80
+ @cancel="cancel"
81
+ >
82
+ </other-charge>
83
+ </a-modal>
84
+ <!-- 新增/编辑 用户信息 -->
85
+ <a-modal
86
+ :z-index="1001"
87
+ :confirm-loading="confirmLoading"
88
+ v-model="formModalVisible"
89
+ :dialog-style="{ top: '30px' }"
90
+ :bodyStyle="{height:'70vh'}"
91
+ :destroy-on-close="true"
92
+ :title="formTitle"
93
+ @ok="submitAddForm"
94
+ width="85vw">
95
+ <x-form-group
96
+ ref="xFormGroupDemo"
97
+ @x-form-item-emit-func="groupFromItemEmitFunc"
98
+ >
99
+ <template #devices="{data, index}">
100
+ <user-devices
101
+ @setRef="setRef(`nativeForm-${index}`)"
102
+ :ref="`nativeForm-${index}`"
103
+ :data="data"></user-devices>
104
+ </template>
105
+ <template #security="{data, index}">
106
+ <user-security
107
+ @setRef="setRef1(`nativeForm-${index}`)"
108
+ :ref="`nativeForm-${index}`"
109
+ :data="data"></user-security>
110
+ </template>
111
+ </x-form-group>
112
+ </a-modal>
113
+ <rent-phone @submit="rentPhoneSubmit" ref="rentPhone"></rent-phone>
52
114
  </a-card>
53
115
  </template>
54
116
 
@@ -56,22 +118,38 @@
56
118
  import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
57
119
  import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
58
120
  import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
59
- import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
121
+ import { getConfigByName, getConfigByNameAsync, runLogic } from 'vue2-client/src/services/api/common'
60
122
  import { mapState } from 'vuex'
61
123
  import AddressSelect from '@vue2-client/pages/addressSelect/index.vue'
124
+ import otherCharge from '@/pages/apply/installFunction/otherCharge/index.vue'
62
125
 
126
+ import userDevices from '@/pages/apply/userFilesManage/userDevices.vue'
127
+ import userSecurity from '@/pages/apply/userFilesManage/userSecurity.vue'
128
+ import rentPhone from '@/pages/apply/userFilesManage/rentPhone.vue'
129
+ import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup'
130
+ import { getRealKeyData } from '@vue2-client/utils/formatter'
63
131
  export default {
64
132
  name: 'Apply',
65
133
  components: {
66
134
  XFormTable,
67
135
  XAddNativeForm,
68
136
  WorkflowDetail,
69
- AddressSelect
137
+ AddressSelect,
138
+ otherCharge,
139
+ userDevices,
140
+ userSecurity,
141
+ rentPhone,
142
+ XFormGroup
70
143
  },
144
+ // 透传给子组件的方法(目前XFormTable接了)
71
145
  provide () {
72
146
  return {
73
147
  generalFunction: {
74
148
  setCancel: this.setCancel,
149
+ chargeAdd: this.chargeAdd,
150
+ addUser: this.addUser,
151
+ editUser: this.editUser,
152
+ addContract: this.addContract,
75
153
  }
76
154
  }
77
155
  },
@@ -81,9 +159,32 @@ export default {
81
159
  queryParamsName: 'ApplyProcessCRUD',
82
160
  // 发起报建弹框控制
83
161
  applyAddFlag: false,
84
- formState: false,
162
+ // 协议作废
163
+ formCancelState: false,
85
164
  submitLoading: false,
86
- cancelRecord: {}
165
+ cancelRecord: {},
166
+ // 协议新增
167
+ formAddContractState: false,
168
+ submitContractLoading: false,
169
+ // 增值收费新增
170
+ formChargeVisible: false,
171
+ chargeData: {
172
+ f_workflow_id: null,
173
+ },
174
+ // 提交加载动画
175
+ confirmLoading: false,
176
+ // 是否显示详情抽屉
177
+ formModalVisible: false,
178
+ // 表单组title
179
+ formTitle: '新建档案',
180
+ // 修改备用电话列表
181
+ rentPhone: [],
182
+ // 是否修改过备用电话标识
183
+ isEditRentPhone: false,
184
+ // 修改设备列表
185
+ editDevices: [],
186
+ securityDevices: [],
187
+ addressdetail: '',
87
188
  }
88
189
  },
89
190
  computed: {
@@ -131,7 +232,15 @@ export default {
131
232
  }
132
233
  },
133
234
  setForm (record) {
134
- this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
235
+ if (this.addressdetail == '新增用户') {
236
+ const form = {
237
+ f_address: record.f_address,
238
+ f_address_id: record.f_address_id
239
+ }
240
+ this.$refs.xFormGroupDemo.getNativeFormRef('t_userinfo')[0].setForm(form)
241
+ } else {
242
+ this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
243
+ }
135
244
  },
136
245
  nextClick ({ form, formStep, workflowId }) {
137
246
  console.log('success', form, formStep, workflowId)
@@ -152,7 +261,7 @@ export default {
152
261
  // 协议作废
153
262
  setCancel (record) {
154
263
  this.cancelRecord = record
155
- this.formState = true
264
+ this.formCancelState = true
156
265
  this.$nextTick(() => {
157
266
  getConfigByName('setCancelForm', 'af-apply', (config) => {
158
267
  if (this.$refs.xCancelForm) {
@@ -177,8 +286,8 @@ export default {
177
286
  })
178
287
  })
179
288
  },
289
+ // 协议作废提交
180
290
  async formSubmit () {
181
- this.submitLoading = true
182
291
  const formData = await this.$refs.xCancelForm.asyncSubmit()
183
292
  try {
184
293
  await this.submit(formData)
@@ -186,18 +295,205 @@ export default {
186
295
  this.$message.error('表单验证失败,请检查填写内容')
187
296
  } finally {
188
297
  this.submitLoading = false
298
+ // 提交成功后刷新表格
189
299
  }
190
300
  },
191
301
  async submit (formData) {
302
+ this.submitLoading = true
192
303
  const data = {
193
- ...formData,
304
+ realForm: formData.realForm,
305
+ cancelRecord: this.cancelRecord,
306
+ user: this.currUser.operaInfo,
194
307
  }
195
- console.log('==formData', data)
196
- await runLogic('暂时没有实现的logic', data, 'af-apply').then(() => {
308
+ console.log('协议作废参数', data)
309
+ await runLogic('setCancelLogic', data, 'af-apply').then(() => {
197
310
  this.$message.success('操作成功')
198
- this.formState = false
311
+ this.formCancelState = false
199
312
  })
200
- }
313
+ },
314
+ // 增值收费新增
315
+ chargeAdd () {
316
+ this.chargeData.f_workflow_id = this.$refs.workFlow.workflowId
317
+ this.formChargeVisible = true
318
+ },
319
+ cancel () {
320
+ this.formChargeVisible = false
321
+ // 需要调用子孙组件的刷新方法
322
+ // this.$refs.xFormTable.refreshTable(true)
323
+ },
324
+ // 新增用户
325
+ addUser () {
326
+ this.formTitle = '新建档案'
327
+ getConfigByNameAsync('addapplyuserinfoFormGroup', 'af-apply').then(res => {
328
+ this.formModalVisible = true
329
+ this.$nextTick(
330
+ () => {
331
+ this.$refs.xFormGroupDemo.init({
332
+ ...res,
333
+ serviceName: 'af-apply',
334
+ showLeftTab: true,
335
+ businessType: '新增'
336
+ })
337
+ }
338
+ )
339
+ })
340
+ },
341
+ groupFromItemEmitFunc (func, data) {
342
+ console.log('func', func, data)
343
+ if (func === 'addRentPhone') {
344
+ this.$refs.rentPhone.init({
345
+ localVisible: true,
346
+ form: {
347
+ rentPhone: this.rentPhone.map(item => {
348
+ if (item.f_type === null) {
349
+ item.f_type = undefined
350
+ }
351
+ return item
352
+ })
353
+ }
354
+ })
355
+ } else if (func === 'selectAddress') {
356
+ this.addressdetail = '新增用户'
357
+ // 选择地址事件
358
+ this.$refs.addressSelect.setFormShow()
359
+ }
360
+ },
361
+ submitAddForm () {
362
+ this.confirmLoading = true
363
+ this.$refs.xFormGroupDemo.onSubmit().then(res => {
364
+ if (this.formTitle === '新建档案') {
365
+ res.t_userinfo.f_workflow_id = this.$refs.workFlow.workflowId
366
+ res.t_userfiles.f_workflow_id = this.$refs.workFlow.workflowId
367
+ res.t_userinfo.f_user_state = '预备'
368
+ res.t_userfiles.f_table_state = '待开通'
369
+ }
370
+ if (res.devices.length > 0) {
371
+ res.devices.forEach(row => {
372
+ row.f_workflow_id = this.$refs.workFlow.workflowId
373
+ })
374
+ }
375
+ let saveData = Object.assign(res, { divisions: this.divisions })
376
+ if (this.formTitle === '编辑档案') {
377
+ saveData = Object.assign(saveData, {
378
+ f_operator_record: this.currUser.name,
379
+ f_operatorid_record: this.currUser.id,
380
+ f_orgid_record: this.currUser.orgid,
381
+ f_orgname_record: this.currUser.orgs,
382
+ f_depid_record: this.currUser.depids,
383
+ f_depname_record: this.currUser.dops
384
+ })
385
+ }
386
+ // 备用电话赋值
387
+ if (this.isEditRentPhone) {
388
+ saveData = Object.assign(saveData, {
389
+ rentPhone: this.rentPhone
390
+ })
391
+ }
392
+ runLogic('userFIleSaveLogic', saveData, 'af-revenue').then(() => {
393
+ this.confirmLoading = false
394
+ this.formModalVisible = false
395
+ this.$message.success('操作成功')
396
+ }).catch(() => {
397
+ this.confirmLoading = false
398
+ })
399
+ }).catch(() => {
400
+ this.confirmLoading = false
401
+ })
402
+ },
403
+ rentPhoneSubmit (phones) {
404
+ // 提交过备用电话 视为修改过
405
+ this.isEditRentPhone = true
406
+ this.rentPhone = phones
407
+ this.$refs.rentPhone.init({
408
+ localVisible: false
409
+ })
410
+ },
411
+ setRef (refName) {
412
+ // 给表单组赋值ref
413
+ // 因为提交的时候 表单组需要循环便利 ref 的 提交事件
414
+ this.$refs.xFormGroupDemo.setRef(refName, [this.$refs[refName]])
415
+ this.$refs[refName].init(this.editDevices)
416
+ },
417
+ setRef1 (refName) {
418
+ // 给表单组赋值ref
419
+ // 因为提交的时候 表单组需要循环便利 ref 的 提交事件
420
+ this.$refs.xFormGroupDemo.setRef(refName, [this.$refs[refName]])
421
+ this.$refs[refName].init(this.securityDevices)
422
+ },
423
+ // 编辑档案
424
+ editUser (record) {
425
+ this.formTitle = '编辑档案'
426
+ const _record = getRealKeyData(record)
427
+ getConfigByNameAsync('addapplyuserinfoFormGroup', 'af-apply').then(configRes => {
428
+ runLogic('getFileDetailForEdit', {
429
+ f_userinfo_id: _record.f_userinfo_id
430
+ }, 'af-revenue').then((res) => {
431
+ this.formModalVisible = true
432
+ // 组织修改表单
433
+ this.$nextTick(
434
+ () => {
435
+ this.$refs.xFormGroupDemo.init({
436
+ ...configRes,
437
+ serviceName: 'af-revenue',
438
+ showLeftTab: true,
439
+ businessType: '编辑',
440
+ modifyModelData: res
441
+ })
442
+ this.editDevices = res.devices
443
+ this.securityDevices = res.security
444
+ this.rentPhone = res.phones
445
+ }
446
+ )
447
+ })
448
+ })
449
+ },
450
+ // 协议新增
451
+ addContract () {
452
+ this.formAddContractState = true
453
+ this.$nextTick(() => {
454
+ getConfigByName('ApplyAddContractForm', 'af-apply', (config) => {
455
+ if (this.$refs.xContractForm) {
456
+ this.$refs.xContractForm.init({
457
+ formItems: config.formJson,
458
+ title: '新增补充协议',
459
+ businessType: '新增',
460
+ showSubmitBtn: false,
461
+ ...config
462
+ })
463
+ } else {
464
+ console.error('xCancelForm组件未加载完成')
465
+ // 延迟重试
466
+ setTimeout(() => {
467
+ this.addContract()
468
+ }, 100)
469
+ }
470
+ })
471
+ })
472
+ },
473
+ async formContractSubmit () {
474
+ const formData = await this.$refs.xContractForm.asyncSubmit()
475
+ try {
476
+ await this.submitContract(formData)
477
+ } catch (error) {
478
+ this.$message.error('表单验证失败,请检查填写内容')
479
+ } finally {
480
+ this.submitContractLoading = false
481
+ // 提交成功后刷新表格
482
+ }
483
+ },
484
+ async submitContract (formData) {
485
+ this.submitContractLoading = true
486
+ const data = {
487
+ realForm: formData.realForm,
488
+ workflowId: this.$refs.workFlow.workflowId,
489
+ user: this.currUser.operaInfo,
490
+ }
491
+ console.log('新增协议参数', data)
492
+ await runLogic('AddContractLogic', data, 'af-apply').then(() => {
493
+ this.$message.success('操作成功')
494
+ this.formAddContractState = false
495
+ })
496
+ },
201
497
  }
202
498
  }
203
499
  </script>