@qqt-product/system 0.0.2 → 0.0.16

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.
Files changed (105) hide show
  1. package/dist/index.es.js +53240 -10634
  2. package/dist/index.umd.js +94 -21
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2878 -0
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2871 -0
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2878 -0
  6. package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
  7. package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
  8. package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
  9. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2864 -0
  10. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
  11. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2864 -0
  12. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2876 -0
  13. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +29 -14
  14. package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
  15. package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
  16. package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
  17. package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2872 -0
  18. package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
  19. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2864 -0
  20. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2887 -0
  21. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
  22. package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
  23. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +221 -28
  24. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
  25. package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
  26. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +23 -7
  27. package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
  28. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +7 -3
  29. package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
  30. package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
  31. package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
  32. package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
  33. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1209 -0
  34. package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
  35. package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
  36. package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
  37. package/dist/lib/components/index.d.ts +2 -2
  38. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2863 -0
  39. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2872 -0
  40. package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
  41. package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
  42. package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
  43. package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
  44. package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
  45. package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
  46. package/dist/style.css +1 -1
  47. package/dist/vite-env.d.ts +13 -13
  48. package/package.json +13 -11
  49. package/src/lib/components/QAccountList/src/QAccountCreate.vue +272 -0
  50. package/src/lib/components/QAccountList/src/QAccountDetail.vue +82 -14
  51. package/src/lib/components/QAccountList/src/QAccountEdit.vue +65 -33
  52. package/src/lib/components/QAccountList/src/QAccountList.vue +532 -530
  53. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +143 -137
  54. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +172 -166
  55. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +123 -124
  56. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +66 -18
  57. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +151 -122
  58. package/src/lib/components/QI18nList/src/QI18nList.vue +365 -361
  59. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +103 -94
  60. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +109 -105
  61. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -3
  62. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +218 -221
  63. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +110 -117
  64. package/src/lib/components/QPermissionDataList/src/form.vue +109 -109
  65. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +1 -1
  66. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +120 -32
  67. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +189 -163
  68. package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +84 -0
  69. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -22
  70. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +134 -85
  71. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +91 -0
  72. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +276 -263
  73. package/src/lib/components/QRoleList/src/QRoleList.vue +332 -288
  74. package/src/lib/components/QRoleList/src/useConfigData.ts +1 -6
  75. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +304 -302
  76. package/src/lib/components/QUsageList/src/QUsageList.vue +287 -82
  77. package/src/lib/components/QUsageList/src/useConfigData.ts +147 -13
  78. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -140
  79. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +28 -28
  80. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +130 -42
  81. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +2 -2
  82. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +2 -2
  83. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +12 -12
  84. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +276 -268
  85. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +1 -1
  86. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +124 -125
  87. package/src/lib/components/index.ts +78 -78
  88. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +2 -10
  89. package/src/lib/components/integratedNodesList/src/index.vue +130 -136
  90. package/src/lib/components/integratedReportList/src/index.vue +55 -30
  91. package/src/lib/components/integratedReportSearchList/src/index.vue +106 -66
  92. package/src/lib/components/loginAbnormalLogList/src/index.vue +43 -50
  93. package/src/lib/components/loginLogList/src/index.vue +51 -57
  94. package/src/lib/components/loginSupplierLogList/src/index.vue +53 -63
  95. package/src/lib/components/operateLogList/src/index.vue +46 -57
  96. package/src/vite-env.d.ts +13 -13
  97. package/tsconfig.json +24 -24
  98. package/vite.config.ts +1 -1
  99. package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
  100. package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
  101. package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
  102. package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
  103. package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
  104. package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
  105. package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
@@ -1,268 +1,276 @@
1
- <template>
2
- <div class="page-list">
3
- <q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
4
- <QcustomConfigEdit :busAccount="userInfo?.userInfo?.elsAccount" :currentEditRow="currentEditRow" @handleReturn="handleReturn" v-else />
5
- <ImportJsonCustomConfig :isShow="uploadShow" :userToken="userInfo?.token" @close="uploadClose" />
6
- </div>
7
- </template>
8
-
9
- <script lang="ts">
10
- //JS引入
11
- import { defineComponent, reactive, inject, nextTick } from 'vue'
12
-
13
- //hook
14
- import { useConfigData } from './useConfigData'
15
- import { useConigApiMethods } from '../../../utils/global.hook'
16
- import { useMethods } from './useMethods'
17
- //组件
18
- import QcustomConfigEdit from '../../QcustomConfigEdit/src/QcustomConfigEdit.vue'
19
- import { message } from '@qqt-product/ui'
20
- import ImportJsonCustomConfig from '../../QcustomConfigList/component/ImportJsonCustomConfig.vue'
21
- //ts
22
- import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
23
-
24
- export default defineComponent({
25
- name: 'QcustomConfigList',
26
- components: {
27
- QcustomConfigEdit,
28
- ImportJsonCustomConfig,
29
- },
30
- props: {
31
- userInfo: {
32
- type: Object,
33
- defalut: () => {
34
- return {}
35
- },
36
- },
37
- },
38
-
39
- setup() {
40
- //inject
41
-
42
- //常量
43
-
44
- /*
45
- data
46
- */
47
-
48
- const { apiUrls, currentEditRow, showEditPage, listLayoutRef, uploadShow } = useConfigData()
49
- const qHttp = inject(INJECT_HTTP) as HttpClient
50
- const { handleExport, handleCopy, handleCancel, handleDelete, handleUpgrade } = useConigApiMethods(qHttp)
51
- const { allowCancel, allowDelete, allowEdit, allowUpgrade } = useMethods()
52
- const pageData = reactive({
53
- statusConfig: {
54
- show: false,
55
- },
56
- optColumn: {
57
- attrs: {},
58
- extend: {},
59
- optColumnList: [
60
- { authorityCode: 'template#templateHead:edit', type: 'edit', title: '编辑', click: handleEdit, allow: allowEdit },
61
- { authorityCode: 'template#templateHead:copyById', type: 'copyById', title: '复制', click: handleCusotmCopy },
62
- { authorityCode: 'template#templateHead:cancel', type: 'cancel', title: '作废', click: handleCustomCancel, allow: allowCancel },
63
- { authorityCode: 'template#templateHead:delete', type: 'delete', title: `删除`, click: handleCustomDetel, allow: allowDelete },
64
- { authorityCode: 'template#templateHead:upload', type: 'upload', title: '文件上传', click: uploadFile, allow: allowUpgrade },
65
- { authorityCode: 'template#templateHead:upgradeVersion', type: 'upgradeVersion', title: '版本升级', click: handleCustomUpgrade, allow: allowUpgrade },
66
- ],
67
- },
68
- buttonConfig: {
69
- attrs: {},
70
- extend: {},
71
- buttons: [
72
- {
73
- authorityCode: 'template#templateHead:add',
74
- label: '新增',
75
- icon: {
76
- type: 'icon-Q-add',
77
- },
78
- click: handleAdd,
79
- attrs: {
80
- type: 'primary',
81
- },
82
- },
83
- { authorityCode: 'template#templateHead:batchGenerateConfig', label: '批量生成配置', icon: 'download', click: batchGeneratorConfig },
84
- // { label: '列自定义', icon: 'setting', clickFn: this.settingColumns },
85
- { authorityCode: 'template#templateHead:exportJson', label: '导出', icon: 'download', folded: true, click: handleExportJson },
86
- { authorityCode: 'template#templateHead:importJson', label: '导入', icon: 'import', folded: true, click: handleImportJson },
87
- // { label: '帮助说明', icon: 'file-text', folded: true, isDocument: true, clickFn: this.showHelpText },
88
- // { label: '说明附件', icon: 'file-pdf', folded: true, isDocument: true, clickFn: this.showHelpPDF },
89
- ],
90
- },
91
- queryConfig: {
92
- attrs: {},
93
- extend: {},
94
- form: [
95
- {
96
- type: 'select',
97
- label: '模板名称',
98
- dictCode: 'srmBusinessType',
99
- fieldName: 'businessType',
100
- placeholder: '请选择业务类型',
101
- },
102
- {
103
- type: 'input',
104
- label: '模板名称',
105
- fieldName: 'templateName',
106
- },
107
- ],
108
- formState: {},
109
- },
110
- pagerConfig: {},
111
- })
112
- //computed
113
-
114
- /*
115
- method
116
- */
117
- function handleAdd() {
118
- currentEditRow.value = {}
119
- showEditPage.value = true
120
- }
121
- function handleReturn() {
122
- showEditPage.value = false
123
- }
124
- function batchGeneratorConfig() {
125
- listLayoutRef.value.loading = true
126
- let records = listLayoutRef.value.gridInstance.getCheckboxRecords() || []
127
- let temIds = records.map((n: MapObjectNoneType) => {
128
- return n.id
129
- })
130
- if (temIds.length == 0) {
131
- message.warning('请至少选择一个模版进行配置生成!')
132
- return false
133
- }
134
- qHttp
135
- .post({
136
- url: apiUrls.value.batchGeneratorConfig,
137
- data: temIds,
138
- })
139
- .then((res: MapObjectNoneType) => {
140
- if (res.success) {
141
- message.success(res.message)
142
- // this.$emit('ok')
143
- } else {
144
- message.warning(res.message)
145
- }
146
- })
147
- .finally(() => {
148
- listLayoutRef.value.loading = false
149
- listLayoutRef.value.gridInstance.clearCheckboxRow()
150
- listLayoutRef.value.fetchListData()
151
- })
152
-
153
- // console.log('records', listLayoutRef.value.loa)
154
- // listLayoutRef.value.loading.value = true
155
- }
156
-
157
- function handleExportJson() {
158
- handleExport({
159
- actionType: 'get',
160
- fileName: '业务模板配置',
161
- type: 'json',
162
- exportXlsUrl: apiUrls.value.exportJson,
163
- setPostParms: () => {
164
- const records = listLayoutRef.value.gridInstance.getCheckboxRecords() || []
165
- // 构造查询参数
166
- let params = !records.length ? Object.assign({}, listLayoutRef.value.pageData.form) : { selections: records.map((n: MapObjectNoneType) => n.id).join(',') }
167
- // let isOrder = listLayoutRef.value.pageData.isOrder || listLayoutRef.value.pageData.isOrder
168
- // this.$set(params, 'column', isOrder.column)
169
- // this.$set(params, 'order', isOrder.order)
170
- // params.column = isOrder.column
171
- // params.order = isOrder.order
172
- return params
173
- },
174
- berforCallback() {
175
- listLayoutRef.value.loading = true
176
- },
177
- afterCallback() {
178
- listLayoutRef.value.loading = false
179
- },
180
- })
181
- }
182
- function handleImportJson() {
183
- uploadShow.value = true
184
- }
185
- function uploadClose() {
186
- uploadShow.value = false
187
- listLayoutRef.value.fetchListData()
188
- }
189
-
190
- function handleEdit({ row }: MapObjectNoneType) {
191
- currentEditRow.value = row
192
- nextTick(() => {
193
- showEditPage.value = true
194
- })
195
- }
196
-
197
- function handleCusotmCopy({ row }: MapObjectNoneType) {
198
- handleCopy({
199
- url: apiUrls.value.copyData,
200
- row,
201
- type: 'get',
202
- tip: '确认复制模板',
203
- afterCallback() {
204
- listLayoutRef.value.fetchListData()
205
- },
206
- })
207
- }
208
-
209
- function handleCustomCancel({ row = {} as MapObjectNoneType }) {
210
- handleCancel({
211
- url: apiUrls.value.cancel,
212
- row,
213
- type: 'get',
214
- tip: '确认作废模板',
215
- afterCallback() {
216
- listLayoutRef.value.fetchListData()
217
- },
218
- })
219
- }
220
-
221
- function handleCustomDetel({ row = {} as MapObjectNoneType }) {
222
- handleDelete({
223
- url: apiUrls.value.delete,
224
- row,
225
- type: 'get',
226
- tip: '是否删除选中数据',
227
- afterCallback() {
228
- listLayoutRef.value.fetchListData()
229
- },
230
- })
231
- }
232
- function handleCustomUpgrade({ row = {} as MapObjectNoneType }) {
233
- handleUpgrade({
234
- url: apiUrls.value.upgrade,
235
- row,
236
- type: 'get',
237
- tip: '是否需要版本升级',
238
- afterCallback() {
239
- listLayoutRef.value.fetchListData()
240
- },
241
- })
242
- }
243
-
244
- function uploadFile({ row = {} as MapObjectNoneType }) {
245
- currentEditRow.value = row
246
- }
247
-
248
- return {
249
- pageData,
250
- apiUrls,
251
- showEditPage,
252
- currentEditRow,
253
- handleReturn,
254
- batchGeneratorConfig,
255
- listLayoutRef,
256
- handleExportJson,
257
- uploadShow,
258
- handleImportJson,
259
- uploadClose,
260
- handleCustomCancel,
261
- }
262
- },
263
- })
264
- </script>
265
-
266
- <style lang="less" scoped>
267
- @import url(../style/index.less);
268
- </style>
1
+ <template>
2
+ <div class="page-list">
3
+ <q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
4
+ <QcustomConfigEdit :busAccount="userInfo?.userInfo?.elsAccount" :currentEditRow="currentEditRow" @handleReturn="handleReturn" v-else />
5
+ <ImportJsonCustomConfig :isShow="uploadShow" :userToken="userInfo?.token" @close="uploadClose" />
6
+ </div>
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ //JS引入
11
+ import { defineComponent, reactive, inject, nextTick } from 'vue'
12
+
13
+ //hook
14
+ import { useConfigData } from './useConfigData'
15
+ import { useConigApiMethods } from '../../../utils/global.hook'
16
+ import { useMethods } from './useMethods'
17
+ //组件
18
+ import QcustomConfigEdit from '../../QcustomConfigEdit/src/QcustomConfigEdit.vue'
19
+ import { message } from '@qqt-product/ui'
20
+ import ImportJsonCustomConfig from '../../QcustomConfigList/component/ImportJsonCustomConfig.vue'
21
+ //ts
22
+ import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
23
+
24
+ export default defineComponent({
25
+ name: 'QcustomConfigList',
26
+ components: {
27
+ QcustomConfigEdit,
28
+ ImportJsonCustomConfig,
29
+ },
30
+ emits: ['uploadFile'],
31
+ props: {
32
+ userInfo: {
33
+ type: Object,
34
+ defalut: () => {
35
+ return {}
36
+ },
37
+ },
38
+ },
39
+
40
+ setup(props, { emit }) {
41
+ //inject
42
+
43
+ //常量
44
+
45
+ /*
46
+ data
47
+ */
48
+
49
+ const { apiUrls, currentEditRow, showEditPage, listLayoutRef, uploadShow } = useConfigData()
50
+ const qHttp = inject(INJECT_HTTP) as HttpClient
51
+ const { handleExport, handleCopy, handleCancel, handleDelete, handleUpgrade } = useConigApiMethods(qHttp)
52
+ const { allowCancel, allowDelete, allowEdit, allowUpgrade } = useMethods()
53
+ const pageData = reactive({
54
+ statusConfig: {
55
+ show: false,
56
+ },
57
+ optionConfig: {
58
+ attrs: {},
59
+ extend: {},
60
+ options: [
61
+ { authorityCode: 'template#templateHead:edit', type: 'edit', title: '编辑', click: handleEdit, disabled: allowEdit },
62
+ { authorityCode: 'template#templateHead:copyById', type: 'copyById', title: '复制', click: handleCusotmCopy },
63
+ { authorityCode: 'template#templateHead:cancel', type: 'cancel', title: '作废', click: handleCustomCancel, disabled: allowCancel },
64
+ { authorityCode: 'template#templateHead:delete', type: 'delete', title: `删除`, click: handleCustomDetel, disabled: allowDelete },
65
+ { authorityCode: 'template#templateHead:upload', type: 'upload', title: '文件上传', click: uploadFile, disabled: allowUpgrade },
66
+ { authorityCode: 'template#templateHead:upgradeVersion', type: 'upgradeVersion', title: '版本升级', click: handleCustomUpgrade, disabled: allowUpgrade },
67
+ ],
68
+ },
69
+ buttonConfig: {
70
+ attrs: {},
71
+ extend: {},
72
+ buttons: [
73
+ {
74
+ authorityCode: 'template#templateHead:add',
75
+ label: '新增',
76
+ icon: {
77
+ type: 'icon-Q-add',
78
+ },
79
+ click: handleAdd,
80
+ attrs: {
81
+ type: 'primary',
82
+ },
83
+ },
84
+ { authorityCode: 'template#templateHead:batchGenerateConfig', label: '批量生成配置', icon: 'download', click: batchGeneratorConfig },
85
+ // { label: '列自定义', icon: 'setting', clickFn: this.settingColumns },
86
+ { authorityCode: 'template#templateHead:exportJson', label: '导出', icon: 'download', folded: true, click: handleExportJson },
87
+ { authorityCode: 'template#templateHead:importJson', label: '导入', icon: 'import', folded: true, click: handleImportJson },
88
+ // { label: '帮助说明', icon: 'file-text', folded: true, isDocument: true, clickFn: this.showHelpText },
89
+ // { label: '说明附件', icon: 'file-pdf', folded: true, isDocument: true, clickFn: this.showHelpPDF },
90
+ ],
91
+ },
92
+ queryConfig: {
93
+ attrs: {},
94
+ extend: {},
95
+ form: [
96
+ {
97
+ type: 'select',
98
+ label: '模板名称',
99
+ dictCode: 'srmBusinessType',
100
+ fieldName: 'businessType',
101
+ placeholder: '请选择业务类型',
102
+ },
103
+ {
104
+ type: 'input',
105
+ label: '模板名称',
106
+ fieldName: 'templateName',
107
+ },
108
+ ],
109
+ },
110
+ pagerConfig: {},
111
+ })
112
+ //computed
113
+
114
+ /*
115
+ method
116
+ */
117
+ function handleAdd() {
118
+ currentEditRow.value = {}
119
+ showEditPage.value = true
120
+ }
121
+ function handleReturn() {
122
+ showEditPage.value = false
123
+ }
124
+ function batchGeneratorConfig() {
125
+ listLayoutRef.value.loading = true
126
+ let records = listLayoutRef.value.gridInstance.getCheckboxRecords() || []
127
+ let temIds = records.map((n: MapObjectNoneType) => {
128
+ return n.id
129
+ })
130
+ if (temIds.length == 0) {
131
+ message.warning('请至少选择一个模版进行配置生成!')
132
+ return false
133
+ }
134
+ qHttp
135
+ .post({
136
+ url: apiUrls.value.batchGeneratorConfig,
137
+ data: temIds,
138
+ })
139
+ .then((res: MapObjectNoneType) => {
140
+ if (res.success) {
141
+ message.success(res.message)
142
+ // this.$emit('ok')
143
+ } else {
144
+ message.warning(res.message)
145
+ }
146
+ })
147
+ .finally(() => {
148
+ listLayoutRef.value.loading = false
149
+ listLayoutRef.value.gridInstance.clearCheckboxRow()
150
+ listLayoutRef.value.fetchListData()
151
+ })
152
+
153
+ // console.log('records', listLayoutRef.value.loa)
154
+ // listLayoutRef.value.loading.value = true
155
+ }
156
+
157
+ function handleExportJson() {
158
+ const records = listLayoutRef.value.gridInstance.getCheckboxRecords() || []
159
+ if (records.length > 1 || records.length === 0) {
160
+ message.warning('请选中一条数据导出')
161
+ return
162
+ }
163
+
164
+ handleExport({
165
+ actionType: 'get',
166
+ fileName: '业务模板配置',
167
+ type: 'json',
168
+ exportXlsUrl: apiUrls.value.exportJson,
169
+ setPostParms: () => {
170
+ // const records = listLayoutRef.value.gridInstance.getCheckboxRecords() || []
171
+ // 构造查询参数
172
+ let params = !records.length ? Object.assign({}, listLayoutRef.value.pageData.form) : { selections: records.map((n: MapObjectNoneType) => n.id).join(',') }
173
+ // let isOrder = listLayoutRef.value.pageData.isOrder || listLayoutRef.value.pageData.isOrder
174
+ // this.$set(params, 'column', isOrder.column)
175
+ // this.$set(params, 'order', isOrder.order)
176
+ // params.column = isOrder.column
177
+ // params.order = isOrder.order
178
+ return params
179
+ },
180
+ berforCallback() {
181
+ listLayoutRef.value.loading = true
182
+ },
183
+ afterCallback() {
184
+ listLayoutRef.value.loading = false
185
+ },
186
+ })
187
+ }
188
+ function handleImportJson() {
189
+ uploadShow.value = true
190
+ }
191
+ function uploadClose() {
192
+ uploadShow.value = false
193
+ listLayoutRef.value.fetchListData()
194
+ }
195
+
196
+ function handleEdit({ row }: MapObjectNoneType) {
197
+ currentEditRow.value = row
198
+ nextTick(() => {
199
+ showEditPage.value = true
200
+ })
201
+ }
202
+
203
+ function handleCusotmCopy({ row }: MapObjectNoneType) {
204
+ handleCopy({
205
+ url: apiUrls.value.copyData,
206
+ row,
207
+ type: 'get',
208
+ tip: '确认复制模板',
209
+ afterCallback() {
210
+ listLayoutRef.value.fetchListData()
211
+ },
212
+ })
213
+ }
214
+
215
+ function handleCustomCancel({ row = {} as MapObjectNoneType }) {
216
+ handleCancel({
217
+ url: apiUrls.value.cancel,
218
+ row,
219
+ type: 'get',
220
+ tip: '确认作废模板',
221
+ afterCallback() {
222
+ listLayoutRef.value.fetchListData()
223
+ },
224
+ })
225
+ }
226
+
227
+ function handleCustomDetel({ row = {} as MapObjectNoneType }) {
228
+ handleDelete({
229
+ url: apiUrls.value.delete,
230
+ row,
231
+ type: 'get',
232
+ tip: '是否删除选中数据',
233
+ afterCallback() {
234
+ listLayoutRef.value.fetchListData()
235
+ },
236
+ })
237
+ }
238
+ function handleCustomUpgrade({ row = {} as MapObjectNoneType }) {
239
+ handleUpgrade({
240
+ url: apiUrls.value.upgrade,
241
+ row,
242
+ type: 'get',
243
+ tip: '是否需要版本升级',
244
+ afterCallback() {
245
+ listLayoutRef.value.fetchListData()
246
+ },
247
+ })
248
+ }
249
+
250
+ function uploadFile({ row = {} as MapObjectNoneType }) {
251
+ currentEditRow.value = row
252
+ console.log('uploadFile', uploadFile)
253
+ emit('uploadFile', row)
254
+ }
255
+
256
+ return {
257
+ pageData,
258
+ apiUrls,
259
+ showEditPage,
260
+ currentEditRow,
261
+ handleReturn,
262
+ batchGeneratorConfig,
263
+ listLayoutRef,
264
+ handleExportJson,
265
+ uploadShow,
266
+ handleImportJson,
267
+ uploadClose,
268
+ handleCustomCancel,
269
+ }
270
+ },
271
+ })
272
+ </script>
273
+
274
+ <style lang="less" scoped>
275
+ @import url(../style/index.less);
276
+ </style>
@@ -1,4 +1,4 @@
1
- import { shallowRef, reactive, ref } from 'vue'
1
+ import { shallowRef, ref } from 'vue'
2
2
  // import type { MapObjectNoneType } from './types'
3
3
  // import { VxeTableInstance } from 'vxe-table'
4
4
  // import type {}