vue2-client 1.20.22 → 1.20.23

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/.eslintrc.js CHANGED
@@ -69,12 +69,6 @@ module.exports = {
69
69
  env: {
70
70
  jest: true
71
71
  }
72
- },
73
- {
74
- files: ['src/base-client/components/common/XReportGrid/XReport.vue'],
75
- rules: {
76
- 'vue/no-reserved-keys': 'off'
77
- }
78
72
  }
79
73
  ]
80
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.20.22",
3
+ "version": "1.20.23",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -486,6 +486,8 @@ export default {
486
486
  }
487
487
  // 更新 allFormData
488
488
  this.$set(this.allFormData, groupName, formData)
489
+ // 抛出表单组数据
490
+ this.$emit('x-form-group-data-change', groupName, formData)
489
491
  // 触发其他表单的刷新
490
492
  this.$nextTick(() => {
491
493
  this.groups.forEach((item, index) => {
@@ -2,32 +2,51 @@
2
2
  <a-card :bordered="false">
3
3
  <x-form-table
4
4
  title="示例表单"
5
- :queryParamsName="queryParamsName"
5
+ queryParamsName="scanCodeAndNFCRUD"
6
6
  :fixedAddForm="fixedAddForm"
7
7
  :externalSelectedRowKeys="selectedKeys"
8
+ :defaultPageSize="100"
9
+ :pageSizeArray="['100','200']"
8
10
  @action="action"
9
11
  @selectRow="selectRow"
10
12
  @columnClick="columnClick"
11
13
  @ceshi="ceshi"
12
- @rowDblClick="rowDblClick"
13
- :defaultPageSize="5"
14
- serviceName="af-revenue"
14
+ @startService="startService"
15
+ serviceName="af-safecheck"
15
16
  ref="xFormTable"
16
17
  :reserveSpaceForButtons="true"
17
- @addFormSubmit="addFormSubmit"
18
- ></x-form-table>
18
+ >
19
+ </x-form-table>
20
+ <a-modal
21
+ v-model="formModalVisible"
22
+ title="工单回访"
23
+ :zIndex="1002"
24
+ width="50vw"
25
+ :destroy-on-close="true"
26
+ @cancel="formModalVisible = false"
27
+ @ok="ok"
28
+ >
29
+ <x-add-native-form
30
+ ref="xForm"
31
+ />
32
+ </a-modal>
33
+ <button @click="backDealData">提交</button>
19
34
  </a-card>
20
35
  </template>
21
36
 
22
37
  <script>
23
38
  import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
39
+ import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
24
40
  import { microDispatch } from '@vue2-client/utils/microAppUtils'
41
+ import {getConfigByNameAsync, runLogic} from '@vue2-client/services/api/common'
42
+
25
43
  export default {
26
44
  name: 'Demo',
27
45
  components: {
28
- XFormTable
46
+ XFormTable,
47
+ XAddNativeForm,
29
48
  },
30
- data() {
49
+ data () {
31
50
  return {
32
51
  // 查询配置文件名
33
52
  queryParamsName: 'ceshiCRUD',
@@ -43,26 +62,32 @@ export default {
43
62
  selectedKeys: [],
44
63
  selected: {
45
64
  keys: [],
46
- rows: []
47
- }
65
+ rows: [],
66
+ },
67
+ formModalVisible: false,
48
68
  }
49
69
  },
50
-
51
70
  methods: {
52
- handleCustomQuery() {
53
- this.$refs.xFormTable.queryTable({
54
- uf_f_alias: 'XianFeng',
55
- uf_f_card_id: '10500030'
71
+ backDealData () {
72
+ this.$refs.xFormTable.$refs.xForm.backDealData().then(data => {
73
+ console.log('backDealData', data)
74
+ console.log('selected', this.$refs.xFormTable.$refs.xForm?.form)
56
75
  })
57
76
  },
58
- rowDblClick(record) {
59
- console.log('rowDblClick', record)
60
- },
61
77
  // input框 行編輯參數傳遞
62
- ceshi(...args) {
78
+ ceshi (...args) {
63
79
  // attr, value, currentRecord, currentIndex, nextRecord, nextIndex
64
- const [attr, value, currentRecord, currentIndex, nextRecord, nextIndex] = args
65
- console.log('ceshi', attr, value, currentRecord, currentIndex, nextRecord, nextIndex)
80
+ const [attr, value, currentRecord, currentIndex, nextRecord, nextIndex] =
81
+ args
82
+ console.log(
83
+ 'ceshi',
84
+ attr,
85
+ value,
86
+ currentRecord,
87
+ currentIndex,
88
+ nextRecord,
89
+ nextIndex
90
+ )
66
91
  // 示例:当按下 Enter 键且有下一行时,跳转到下一行的同一列
67
92
  // 可以在这里执行业务逻辑(例如:保存数据)
68
93
  console.log('当前行:', currentIndex, '下一行:', nextIndex)
@@ -73,44 +98,61 @@ export default {
73
98
  // 跳转到下一行的同一列
74
99
  this.$refs.xFormTable.$refs.xTable.focusInput(nextIndex, attr.model)
75
100
  },
76
- test() {
101
+ test () {
77
102
  this.$refs.xFormTable.setTableData([])
78
103
  },
79
- defaultF() {
104
+ defaultF () {
80
105
  this.$refs.xFormTable.setTableSize('default')
81
106
  },
82
- middleF() {
107
+ middleF () {
83
108
  this.$refs.xFormTable.setTableSize('middle')
84
109
  },
85
- smallF() {
110
+ smallF () {
86
111
  this.$refs.xFormTable.setTableSize('small')
87
112
  },
88
- columnClick(key, value, record) {
113
+ columnClick (key, value, record) {
89
114
  microDispatch({
90
115
  type: 'v3route',
91
116
  path: '/bingliguanli/dianzibingliluru',
92
- props: { selected: arguments[0].his_f_admission_id }
117
+ props: { selected: arguments[0].his_f_admission_id },
93
118
  })
94
119
  },
95
- action(record, id, actionType) {
96
- this.detailVisible = true
97
- console.log('触发了详情操作', record, id, actionType)
120
+ startService (record, id, actionType) {
121
+ getConfigByNameAsync('测试Form', 'af-safecheck').then(config => {
122
+ this.formModalVisible = true
123
+ this.$nextTick(
124
+ () => {
125
+ this.formModalVisible = true
126
+ this.$refs.xForm.init({
127
+ formItems: config.formJson,
128
+ title: '工单回访',
129
+ businessType: '新增',
130
+ ...config,
131
+ modifyModelData: { data: { id: 1 } },
132
+ })
133
+ })
134
+ })
135
+ // this.detailVisible = true
136
+ // console.log('触发了详情操作', record, id, actionType)
137
+ },
138
+ async ok () {
139
+ const res = await this.$refs.xForm.asyncSubmit()
140
+ await runLogic('ceshwewei', res.realForm)
98
141
  },
99
- onClose() {
142
+ onClose () {
100
143
  this.detailVisible = false
101
144
  // 关闭详情之后重新查询表单
102
145
  this.$refs.xFormTable.refreshTable(true)
103
146
  },
104
- selectRow(selectedRowKeys, selectedRows) {
147
+ selectRow (selectedRowKeys, selectedRows) {
105
148
  this.selected = {
106
149
  keys: selectedRowKeys,
107
- rows: selectedRows
150
+ rows: selectedRows,
108
151
  }
152
+ console.log('selectedDemo', this.selected)
109
153
  },
110
- addFormSubmit(params, callback){
111
- callback()
112
- }
113
- }
154
+ },
155
+ computed: {},
114
156
  }
115
157
  </script>
116
158
 
@@ -75,8 +75,8 @@ export default {
75
75
  * 可选值:
76
76
  * - 'default': 返回原始 sections 数组
77
77
  * - 'xlist-default': 返回 XList 默认模式格式 [{ number, name }, ...]
78
- * - 'xlist-card': 返回 XList 卡片模式格式二维数组
79
- */
78
+ * - 'xlist-card': 返回 XList 卡片模式格式二维数组
79
+ */
80
80
  outputFormat: {
81
81
  type: String,
82
82
  default: 'default',
@@ -1,6 +1,6 @@
1
- import XMarkdownSectionExtractor from './XMarkdownSectionExtractor'
2
-
3
- export default XMarkdownSectionExtractor
4
-
5
- export * from './markdownSectionExtractor'
6
-
1
+ import XMarkdownSectionExtractor from './XMarkdownSectionExtractor'
2
+
3
+ export default XMarkdownSectionExtractor
4
+
5
+ export * from './markdownSectionExtractor'
6
+
@@ -0,0 +1,127 @@
1
+ <template>
2
+ <a-card :bordered="false">
3
+ <a-tabs default-active-key="1" @change="changeTab">
4
+ <a-tab-pane key="1" tab="待办">
5
+ <x-form-table
6
+ title="站点工单(待办)"
7
+ ref="xFormTable"
8
+ queryParamsName="teleProcessCRUD"
9
+ :fixed-query-form="{
10
+ wo_f_department_id: currUser.depids,
11
+ }"
12
+ serviceName="af-telephone"
13
+ @toDeal="toDetail"
14
+ @updateInfo="updateInfo"
15
+ @transfer="transfer"
16
+ @toFinish="toFinish"
17
+ >
18
+ </x-form-table>
19
+ </a-tab-pane>
20
+ <a-tab-pane key="2" tab="已办">
21
+ <x-form-table
22
+ title="站点工单(已办)"
23
+ ref="xFormTableDone"
24
+ queryParamsName="teleProcessDoneCRUD"
25
+ :fixed-query-form="{
26
+ wo_f_department_id: currUser.depids,
27
+ }"
28
+ serviceName="af-telephone"
29
+ @action="toView"
30
+ @reminder="toReminder"
31
+ >
32
+ </x-form-table>
33
+ </a-tab-pane>
34
+ </a-tabs>
35
+ <WorkflowDetail
36
+ ref="workFlow"
37
+ @preClick="preClick"
38
+ @success="success"
39
+ @nextClick="nextClick"
40
+ @x-form-item-emit-func="handleFormItemEvent"
41
+ >
42
+ </WorkflowDetail>
43
+ </a-card>
44
+ </template>
45
+
46
+ <script>
47
+ import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
48
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
49
+ import { mapState } from 'vuex'
50
+ import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
51
+
52
+ export default {
53
+ name: 'Telephone',
54
+ components: {
55
+ XFormTable,
56
+ WorkflowDetail,
57
+ XAddNativeForm
58
+ },
59
+ // 透传给子组件的方法(目前XFormTable接了)
60
+ provide () {
61
+ return {
62
+ generalFunction: {}
63
+ }
64
+ },
65
+ data () {
66
+ return {
67
+ // 当前工单id
68
+ currentWorkOrderId: '',
69
+ // 提交加载动画
70
+ confirmLoading: false,
71
+ chargeVisible: false,
72
+ // 环节人员信息
73
+ chargePerson: {},
74
+ chargePersonOptions: [],
75
+ transferData: {
76
+ optionsValue: '',
77
+ remark: ''
78
+ },
79
+ record: {},
80
+ define: {},
81
+ // 是否展示催单结案弹窗
82
+ showReminder: false,
83
+ // 弹窗类型 催单/ 结案
84
+ modelType: ''
85
+ }
86
+ },
87
+ computed: {
88
+ ...mapState('account', { currUser: 'user' }),
89
+ },
90
+ methods: {
91
+ changeTab (key) {
92
+ console.log('切换tab', key)
93
+ if (key === '1') {
94
+ this.$refs.xFormTable.refreshTable(true)
95
+ } else if (key === '2') {
96
+ this.$refs.xFormTableDone.refreshTable(true)
97
+ }
98
+ },
99
+ success () {
100
+ console.log('完工')
101
+ },
102
+ toDetail (record) {
103
+ // 修改第一步的工单
104
+ if (record.ws_f_step_id === 1 && record.w_f_state === 0) {
105
+ console.log('进入工单详情')
106
+ if (record.w_f_workflow_define_name === '报修单处理流程') {
107
+ this.$refs.dealOrUpdate.dealOrUpdate(record, '处理工单')
108
+ } else if (record.w_f_workflow_define_name === '投诉单处理流程') {
109
+ this.$refs.dealComplaint.dealComplaintOrder(record)
110
+ } else if (record.w_f_workflow_define_name === '咨询单处理流程') {
111
+ this.$refs.dealConsultation.dealConsultationOrder(record)
112
+ } else {
113
+ this.$message.warn('未知流程类型')
114
+ }
115
+ } else {
116
+ // 记录流程节点名称
117
+ this.currentWorkOrderId = record.wo_id
118
+ // 进入流程详情
119
+ this.$refs.workFlow.init({
120
+ workflowId: record.wo_f_workflow_id,
121
+ stepId: record.ws_f_step_id
122
+ })
123
+ }
124
+ },
125
+ }
126
+ }
127
+ </script>