@qqt-product/system 0.0.1 → 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.
- package/dist/index.es.js +53240 -10634
- package/dist/index.umd.js +94 -21
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2871 -0
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
- package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
- package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2876 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +29 -14
- package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
- package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
- package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2872 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2887 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
- package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +221 -28
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
- package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +23 -7
- package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +7 -3
- package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
- package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
- package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
- package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1209 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
- package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
- package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2863 -0
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2872 -0
- package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
- package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
- package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
- package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
- package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
- package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
- package/dist/style.css +1 -1
- package/dist/vite-env.d.ts +13 -13
- package/package.json +13 -11
- package/src/lib/components/QAccountList/src/QAccountCreate.vue +272 -0
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +82 -14
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +65 -33
- package/src/lib/components/QAccountList/src/QAccountList.vue +532 -530
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +143 -137
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +172 -166
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +123 -124
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +66 -18
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +151 -122
- package/src/lib/components/QI18nList/src/QI18nList.vue +365 -361
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +103 -94
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +109 -105
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -3
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +218 -221
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +110 -117
- package/src/lib/components/QPermissionDataList/src/form.vue +109 -109
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +1 -1
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +120 -32
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +189 -163
- package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +84 -0
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -22
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +134 -85
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +91 -0
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +276 -263
- package/src/lib/components/QRoleList/src/QRoleList.vue +332 -288
- package/src/lib/components/QRoleList/src/useConfigData.ts +1 -6
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +304 -302
- package/src/lib/components/QUsageList/src/QUsageList.vue +287 -82
- package/src/lib/components/QUsageList/src/useConfigData.ts +147 -13
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -140
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +28 -28
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +130 -42
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +12 -12
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +276 -268
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +1 -1
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +124 -125
- package/src/lib/components/index.ts +78 -78
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +2 -10
- package/src/lib/components/integratedNodesList/src/index.vue +130 -136
- package/src/lib/components/integratedReportList/src/index.vue +55 -30
- package/src/lib/components/integratedReportSearchList/src/index.vue +106 -66
- package/src/lib/components/loginAbnormalLogList/src/index.vue +43 -50
- package/src/lib/components/loginLogList/src/index.vue +51 -57
- package/src/lib/components/loginSupplierLogList/src/index.vue +53 -63
- package/src/lib/components/operateLogList/src/index.vue +46 -57
- package/src/vite-env.d.ts +13 -13
- package/tsconfig.json +24 -24
- package/vite.config.ts +1 -1
- package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
- package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
- package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
- package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
- package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
- package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
- 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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{ authorityCode: 'template#templateHead:
|
|
62
|
-
{ authorityCode: 'template#templateHead:
|
|
63
|
-
{ authorityCode: 'template#templateHead:
|
|
64
|
-
{ authorityCode: 'template#templateHead:
|
|
65
|
-
{ authorityCode: 'template#templateHead:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
{ authorityCode: 'template#templateHead:
|
|
87
|
-
|
|
88
|
-
// { label: '
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
//
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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>
|