vue2-client 1.15.28 → 1.15.30

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.15.28",
3
+ "version": "1.15.30",
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
@@ -68,6 +68,7 @@ export default {
68
68
  },
69
69
  mounted () {
70
70
  this.activeKey = this.defaultActiveKey
71
+ this.tabPaneChange('initTabLoading')
71
72
  },
72
73
  methods: {
73
74
  // 自定义函数中调用的方法 这个不能删
@@ -1,211 +1,47 @@
1
- <template>
2
- <a-card :bordered="false">
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
- <address-select ref="addressSelect" @setAddress="setForm"></address-select>
35
- <!-- 协议作废功能 -->
36
- <a-modal
37
- v-model="formState"
38
- :dialog-style="{ top: '5rem' }"
39
- :z-index="1001"
40
- title="作废"
41
- :destroyOnClose="true"
42
- width="55vw">
43
- <x-add-native-form
44
- ref="xCancelForm"
45
- @onSubmit="submit"
46
- />
47
- <template #footer>
48
- <a-button key="back" @click="formState = false">取消</a-button>
49
- <a-button key="submit" type="primary" :loading="submitLoading" @click="formSubmit">确认</a-button>
50
- </template>
51
- </a-modal>
52
- </a-card>
53
- </template>
54
-
55
1
  <script>
56
2
  import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
57
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
58
- import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
59
- import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
60
- import { mapState } from 'vuex'
61
- import AddressSelect from '@vue2-client/pages/addressSelect/index.vue'
62
3
 
63
4
  export default {
64
- name: 'Apply',
65
- components: {
66
- XFormTable,
67
- XAddNativeForm,
68
- WorkflowDetail,
69
- AddressSelect
70
- },
71
- provide () {
72
- return {
73
- generalFunction: {
74
- setCancel: this.setCancel,
75
- updateFormData: this.updateFormData,
76
- }
77
- }
78
- },
79
- data () {
80
- return {
81
- // 查询配置文件名
82
- queryParamsName: 'ApplyProcessCRUD',
83
- // 发起报建弹框控制
84
- applyAddFlag: false,
85
- formState: false,
86
- submitLoading: false,
87
- cancelRecord: {}
88
- }
89
- },
90
- computed: {
91
- ...mapState('account', { currUser: 'user' }),
5
+ name: 'WorkFlowDemo',
6
+ components: { WorkflowDetail },
7
+ mounted () {
8
+ this.$refs.workFlow.init({
9
+ workflowId: '376'
10
+ })
92
11
  },
93
12
  methods: {
94
- addApply () {
95
- console.log('打开了吗')
96
- this.applyAddFlag = true
97
- this.$nextTick(
98
- () => {
99
- getConfigByName('addApplyForm', 'af-apply', (res) => {
100
- this.$refs.xForm.init({
101
- businessType: '新增',
102
- title: '发起报建',
103
- ...res
104
- })
105
- })
106
- }
107
- )
108
- },
109
- applySubmit (formData) {
110
- runLogic('addApply', formData).then(
111
- res => {
112
- this.$message.success('发起报建成功')
113
- this.$refs.xFormTable.refreshTable(true)
114
- this.applyAddFlag = false
115
- }
116
- ).catch(() => {
117
- this.applyAddFlag = false
118
- })
119
- },
120
- success () {
121
- console.log('完工')
122
- },
123
- toDetail (record, id) {
124
- this.$refs.workFlow.init({
125
- workflowId: record.ab_f_workflow_id,
126
- })
127
- },
128
- handleFormItemEvent (func, data, value) {
129
- console.log('打印一下:', func, data, value)
130
- if (func === 'selectAddress') {
131
- this.$refs.addressSelect.setFormShow()
132
- }
133
- },
134
- setForm (record) {
135
- this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
136
- },
137
- nextClick ({ form, formStep, workflowId }) {
138
- console.log('success', form, formStep, workflowId)
139
- const data = {
140
- workflowId,
141
- form,
142
- formStep
143
- }
144
- runLogic('applySubmitAfter', data, 'af-apply').then(
145
- res => {
146
- if (res) {
147
- // this.$message.success('提交成功!')
148
- this.$refs.xFormTable.refreshTable(true)
149
- }
150
- }
151
- )
152
- },
153
- // 协议作废
154
- setCancel (record) {
155
- this.cancelRecord = record
156
- this.formState = true
157
- this.$nextTick(() => {
158
- getConfigByName('setCancelForm', 'af-apply', (config) => {
159
- if (this.$refs.xCancelForm) {
160
- this.$refs.xCancelForm.init({
161
- formItems: config.formJson,
162
- title: '补充协议作废',
163
- businessType: '修改',
164
- showSubmitBtn: false,
165
- ...config
166
- })
167
- if (this.$refs.xCancelForm) {
168
- console.log(record)
169
- // this.$refs.xCancelForm.setForm(recordData)
170
- }
171
- } else {
172
- console.error('xCancelForm组件未加载完成')
173
- // 延迟重试
174
- setTimeout(() => {
175
- this.setCancel(record)
176
- }, 100)
177
- }
178
- })
179
- })
180
- },
181
- async formSubmit () {
182
- this.submitLoading = true
183
- const formData = await this.$refs.xCancelForm.asyncSubmit()
184
- try {
185
- await this.submit(formData)
186
- } catch (error) {
187
- this.$message.error('表单验证失败,请检查填写内容')
188
- } finally {
189
- this.submitLoading = false
190
- }
191
- },
192
- async submit (formData) {
193
- const data = {
194
- ...formData,
195
- }
196
- console.log('==formData', data)
197
- await runLogic('暂时没有实现的logic', data, 'af-apply').then(() => {
198
- this.$message.success('操作成功')
199
- this.formState = false
200
- })
201
- },
202
- updateFormData (workflowId) {
203
- runLogic('queryAgreementAmount', { workflowId: workflowId }, 'af-apply').then((res) => {
204
- console.log('>>>> res==', res)
205
- this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm({ add_amount: 1200 })
206
- })
207
- console.log()
13
+ /**
14
+ * 流程详情页成功
15
+ * @param note 备注信息
16
+ * @param form 表单信息
17
+ * @param workflowId
18
+ */
19
+ success ({ note, form, workflowId }) {
20
+ console.log('success', note, form, workflowId)
21
+ },
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)
208
36
  }
209
37
  }
210
38
  }
211
39
  </script>
40
+
41
+ <template>
42
+ <WorkflowDetail ref="workFlow" @success="success" @nextClick="nextClick"></WorkflowDetail>
43
+ </template>
44
+
45
+ <style scoped lang="less">
46
+
47
+ </style>
@@ -1,132 +1,204 @@
1
1
  <template>
2
2
  <a-card :bordered="false">
3
- <a-tabs default-active-key="1">
4
- <!-- 业务审核 Tab -->
5
- <a-tab-pane key="1" tab="业务审核">
6
- <x-form-table
7
- title="业务审核"
8
- :queryParamsName="queryParamsName"
9
- :fixedAddForm="fixedAddForm"
10
- :fixedQueryForm="fixedQueryForm"
11
- @audit="audit"
12
- serviceName="af-revenue"
13
- ref="xFormTable">
14
- </x-form-table>
15
- <WorkflowDetail ref="workFlow" @success="confirmAudit" @nextClick="nextClick"></WorkflowDetail>
16
- </a-tab-pane>
17
-
18
- <!-- 我负责的 Tab -->
19
- <a-tab-pane key="2" tab="我参与的">
20
- <x-form-table
21
- title="我参与的业务"
22
- :queryParamsName="queryParamsName2"
23
- :fixedQueryForm="fixedQueryForm2"
24
- @check="check"
25
- serviceName="af-revenue"
26
- ref="xFormTable">
27
- </x-form-table>
28
- </a-tab-pane>
29
- </a-tabs>
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
+ <address-select ref="addressSelect" @setAddress="setForm"></address-select>
35
+ <!-- 协议作废功能 -->
36
+ <a-modal
37
+ v-model="formState"
38
+ :dialog-style="{ top: '5rem' }"
39
+ :z-index="1001"
40
+ title="作废"
41
+ :destroyOnClose="true"
42
+ width="55vw">
43
+ <x-add-native-form
44
+ ref="xCancelForm"
45
+ @onSubmit="submit"
46
+ />
47
+ <template #footer>
48
+ <a-button key="back" @click="formState = false">取消</a-button>
49
+ <a-button key="submit" type="primary" :loading="submitLoading" @click="formSubmit">确认</a-button>
50
+ </template>
51
+ </a-modal>
30
52
  </a-card>
31
53
  </template>
32
54
 
33
55
  <script>
34
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
35
56
  import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
57
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
36
58
  import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
37
- import XDescriptions from '@vue2-client/base-client/components/common/XDescriptions/XDescriptions.vue'
59
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
38
60
  import { mapState } from 'vuex'
39
- import { runLogic } from '@vue2-client/services/api/common'
61
+ import AddressSelect from '@vue2-client/pages/addressSelect/index.vue'
40
62
 
41
63
  export default {
42
- name: 'UnitManage',
64
+ name: 'Apply',
43
65
  components: {
44
- XFormTable, XDescriptions, XAddNativeForm, WorkflowDetail
66
+ XFormTable,
67
+ XAddNativeForm,
68
+ WorkflowDetail,
69
+ AddressSelect
45
70
  },
46
- data () {
71
+ provide () {
47
72
  return {
48
- // 查询配置名称
49
- queryParamsName: 'businessAuditCRUD',
50
- queryParamsName2: 'participatedCRUD',
51
- // 新增表单固定值
52
- fixedAddForm: {},
53
- fixedQueryForm: {},
54
- fixedQueryForm2: {},
55
- // 页面宽度
56
- screenWidth: document.documentElement.clientWidth,
57
- // 是否显示详情抽屉
58
- detailVisible: false
73
+ generalFunction: {
74
+ setCancel: this.setCancel,
75
+ }
59
76
  }
60
77
  },
61
- created () {
62
- },
63
- mounted () {
64
- this.fixedQueryForm = {
65
- ws_f_handler: this.currUser.name
66
- }
67
- this.fixedQueryForm2 = {
68
- a_f_handler: this.currUser.name
78
+ data () {
79
+ return {
80
+ // 查询配置文件名
81
+ queryParamsName: 'ApplyProcessCRUD',
82
+ // 发起报建弹框控制
83
+ applyAddFlag: false,
84
+ formState: false,
85
+ submitLoading: false,
86
+ cancelRecord: {}
69
87
  }
70
88
  },
89
+ computed: {
90
+ ...mapState('account', { currUser: 'user' }),
91
+ },
71
92
  methods: {
72
- nextClick ({ form, formStep, workflowId }) {
73
- console.log('success', form, formStep, workflowId)
74
- if (formStep === '管理员审核') {
75
- const data = {
76
- workflowId,
77
- form
93
+ addApply () {
94
+ console.log('打开了吗')
95
+ this.applyAddFlag = true
96
+ this.$nextTick(
97
+ () => {
98
+ getConfigByName('addApplyForm', 'af-apply', (res) => {
99
+ this.$refs.xForm.init({
100
+ businessType: '新增',
101
+ title: '发起报建',
102
+ ...res
103
+ })
104
+ })
78
105
  }
79
- runLogic('auditFinish', { data: data }, 'af-revenue').then(
80
- res => {
81
- if (res) {
82
- this.$message.success('审核完成!!!')
83
- this.formModalVisible = false
84
- this.$refs.xFormTable.refreshTable(true)
85
- }
86
- }
87
- )
106
+ )
107
+ },
108
+ applySubmit (formData) {
109
+ runLogic('addApply', formData).then(
110
+ res => {
111
+ this.$message.success('发起报建成功')
112
+ this.$refs.xFormTable.refreshTable(true)
113
+ this.applyAddFlag = false
114
+ }
115
+ ).catch(() => {
116
+ this.applyAddFlag = false
117
+ })
118
+ },
119
+ success () {
120
+ console.log('完工')
121
+ },
122
+ toDetail (record, id) {
123
+ this.$refs.workFlow.init({
124
+ workflowId: record.ab_f_workflow_id,
125
+ stepId: record.ws_f_step_id
126
+ })
127
+ },
128
+ handleFormItemEvent (func, data, value) {
129
+ console.log('打印一下:', func, data, value)
130
+ if (func === 'selectAddress') {
131
+ this.$refs.addressSelect.setFormShow()
88
132
  }
89
133
  },
90
- confirmAudit (param) {
91
- runLogic('auditFinish', { data: param }, 'af-revenue').then(
134
+ setForm (record) {
135
+ this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
136
+ },
137
+ nextClick ({ form, formStep, workflowId }) {
138
+ console.log('success', form, formStep, workflowId)
139
+ const data = {
140
+ workflowId,
141
+ form,
142
+ formStep
143
+ }
144
+ runLogic('applySubmitAfter', data, 'af-apply').then(
92
145
  res => {
93
146
  if (res) {
94
- this.$message.success('审核完成!!!')
95
- this.formModalVisible = false
147
+ // this.$message.success('提交成功!')
96
148
  this.$refs.xFormTable.refreshTable(true)
97
149
  }
98
150
  }
99
151
  )
100
152
  },
101
- audit (record, id, type) {
102
- console.log(record, id, type)
103
- console.log(this.$refs.workFlow)
104
- this.detailVisible = true
105
- this.$refs.workFlow.init({
106
- workflowId: record.w_id
153
+ // 协议作废
154
+ setCancel (record) {
155
+ this.cancelRecord = record
156
+ this.formState = true
157
+ this.$nextTick(() => {
158
+ getConfigByName('setCancelForm', 'af-apply', (config) => {
159
+ if (this.$refs.xCancelForm) {
160
+ this.$refs.xCancelForm.init({
161
+ formItems: config.formJson,
162
+ title: '补充协议作废',
163
+ businessType: '修改',
164
+ showSubmitBtn: false,
165
+ ...config
166
+ })
167
+ if (this.$refs.xCancelForm) {
168
+ console.log(record)
169
+ // this.$refs.xCancelForm.setForm(recordData)
170
+ }
171
+ } else {
172
+ console.error('xCancelForm组件未加载完成')
173
+ // 延迟重试
174
+ setTimeout(() => {
175
+ this.setCancel(record)
176
+ }, 100)
177
+ }
178
+ })
107
179
  })
108
180
  },
109
- check (record, id, type) {
110
- console.log(record, id, type)
111
- console.log(this.$refs.workFlow)
112
- this.detailVisible = true
113
- this.$refs.workFlow.init({
114
- workflowId: record.a_id
115
- })
181
+ async formSubmit () {
182
+ this.submitLoading = true
183
+ const formData = await this.$refs.xCancelForm.asyncSubmit()
184
+ try {
185
+ await this.submit(formData)
186
+ } catch (error) {
187
+ this.$message.error('表单验证失败,请检查填写内容')
188
+ } finally {
189
+ this.submitLoading = false
190
+ }
116
191
  },
117
- onClose () {
118
- this.detailVisible = false
192
+ async submit (formData) {
193
+ const data = {
194
+ ...formData,
195
+ }
196
+ console.log('==formData', data)
197
+ await runLogic('暂时没有实现的logic', data, 'af-apply').then(() => {
198
+ this.$message.success('操作成功')
199
+ this.formState = false
200
+ })
119
201
  }
120
- },
121
- computed: {
122
- ...mapState('account', { currUser: 'user' }),
123
- ...mapState('setting', { isMobile: 'isMobile' })
124
- },
202
+ }
125
203
  }
126
204
  </script>
127
-
128
- <style scoped lang="less">
129
- :deep(.ant-statistic-content-value) {
130
- color: @primary-color;
131
- }
132
- </style>
@@ -1,203 +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
- 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>
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>
@@ -1059,6 +1059,10 @@ export default {
1059
1059
  const stepDefine = this.targetStepDefine[i]
1060
1060
  const key = this.getRealKey(stepDefine.model, isKeyHandle)
1061
1061
  if (Object.prototype.hasOwnProperty.call(dataObj, key)) {
1062
+ // 历史表单内容根据流程中配置的表单项顺序进行渲染,需要兼容表单项展示函数
1063
+ if (stepDefine.showFormItemFunc && !(await this.showFormItemFunc(stepDefine.showFormItemFunc, dataObj))) {
1064
+ continue
1065
+ }
1062
1066
  let value = dataObj[key]
1063
1067
  // 字典值处理
1064
1068
  if (stepDefine.formType === 'select' && stepDefine.selectType === 'key') {
@@ -1361,6 +1365,26 @@ export default {
1361
1365
  this.$message.error('执行操作失败')
1362
1366
  }
1363
1367
  },
1368
+ // 表单项展示函数--用来渲染历史节点数据时和填写表单显示内容同步
1369
+ async showFormItemFunc (func, form) {
1370
+ try {
1371
+ if (func) {
1372
+ // 一般展示项函数中不应该存在setForm函数 先屏蔽this.setForm和this.attr的传递还有在this上下文指向不同可能存在异常 流程表单的展示项函数尽量功能单一。有异常默认进行展示(先兼容到这后续有问题进行调整)
1373
+ const obj = executeStrFunctionByContext(this, func, [form, null, null, util, '新增/修改'])
1374
+ // 判断是 bool 还是 obj 兼容
1375
+ if (typeof obj === 'boolean') {
1376
+ return obj
1377
+ } else if (obj && typeof obj === 'object') {
1378
+ // obj 是一个对象,并且不是数组
1379
+ return obj?.show
1380
+ }
1381
+ } else {
1382
+ return true
1383
+ }
1384
+ } catch (e) {
1385
+ return true
1386
+ }
1387
+ },
1364
1388
  // 检查按钮是否显示
1365
1389
  checkButtonVisible (button) {
1366
1390
  try {
@@ -50,9 +50,13 @@ routerResource.dynamicStatistics = () => import('@vue2-client/pages/DynamicStati
50
50
  // 数据检索(新)
51
51
  routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynamicStatistics')
52
52
  // 示例页面
53
- routerResource.businessAudit = {
54
- path: 'businessAudit',
53
+ routerResource.example = {
54
+ path: 'example',
55
55
  name: '示例主页面',
56
+ // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo2.vue'),
57
+ component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo3.vue'),
58
+ // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
59
+ // component: () => import('@vue2-client/pages/addressSelect/addressDemo.vue'),
56
60
  // component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
57
61
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
58
62
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
@@ -63,9 +67,10 @@ routerResource.businessAudit = {
63
67
  // component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
64
68
  // component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
65
69
  // component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue'),
66
- component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo2.vue'),
67
- // component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
68
- // component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonexampleDemo.vue'),
70
+ // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
71
+ // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
72
+ // component: () => import('@vue2-client/pages/XPageViewExample/index.vue'),
73
+ // component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),
69
74
  // component: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue'),
70
75
  // component: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
71
76
  // component: () => import('@vue2-client/base-client/components/common/XPrint/Demo.vue'),
@@ -94,7 +99,8 @@ const routerMap = {
94
99
  root: {
95
100
  path: '/',
96
101
  name: '首页',
97
- redirect: homePage,
102
+ // 只有在非微前端环境下才进行重定向,或者通过环境变量控制
103
+ redirect: window.__MICRO_APP_ENVIRONMENT__ ? undefined : homePage,
98
104
  component: process.env.VUE_APP_SINGLE_PAPER === 'TRUE' ? view.blank : view.tabs,
99
105
  },
100
106
  exp403: {
@@ -108,7 +114,7 @@ const routerMap = {
108
114
  name: 'exp404',
109
115
  path: '404',
110
116
  component: () =>
111
- import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo2')
117
+ import('@vue2-client/pages/exception/404')
112
118
  },
113
119
  exp500: {
114
120
  name: 'exp500',
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://218.93.226.210:31467'
14
+ const v3Server = 'http://aote-office.8866.org:31567'
15
15
  // const gateway = 'http://192.168.50.67:31467'
16
16
  // const testUpload = 'http://123.60.214.109:8406'
17
- const OSSServerDev = 'http://218.93.226.210:31467'
17
+ const OSSServerDev = 'http://192.168.50.67:30351'
18
18
  // const revenue = 'http://aote-office.8866.org:31567'
19
- const revenue = 'http://218.93.226.210:31467'
19
+ const revenue = 'http://aote-office.8866.org:31567'
20
20
  // const OSSServerProd = 'http://192.168.50.67:31351'
21
21
  // const testUploadLocal = 'http://127.0.0.1:9001'
22
22
  // v3 铜川
@@ -53,6 +53,7 @@ module.exports = {
53
53
  changeOrigin: true
54
54
  },
55
55
  '/api/af-apply': {
56
+ // pathRewrite: { '^/api/af-apply': '/' },
56
57
  target: revenue,
57
58
  changeOrigin: true
58
59
  },