@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,302 +1,304 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="height: 100%">
|
|
3
|
-
<q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
|
|
4
|
-
<!--更改密码-->
|
|
5
|
-
<vxe-modal v-model="passwordModalShow" title="重新设定密码">
|
|
6
|
-
<template #default>
|
|
7
|
-
<vxe-form ref="passwordRef" title-colon title-align="right" title-width="160" :data="passwordModalForm" :rules="passwordModalFormRule">
|
|
8
|
-
<vxe-form-gather span="24">
|
|
9
|
-
<vxe-form-item title="ELS账号" field="elsAccount" span="24">
|
|
10
|
-
<template #default="{ data }">
|
|
11
|
-
<vxe-input :disabled="true" v-model="data.elsAccount" type="text" placeholder="请输入ELS账号" clearable></vxe-input>
|
|
12
|
-
</template>
|
|
13
|
-
</vxe-form-item>
|
|
14
|
-
<vxe-form-item title="子账号" field="subAccount" span="24">
|
|
15
|
-
<template #default="{ data }">
|
|
16
|
-
<vxe-input :disabled="true" v-model="data.subAccount" type="text" placeholder="请输入子账号" clearable></vxe-input>
|
|
17
|
-
</template>
|
|
18
|
-
</vxe-form-item>
|
|
19
|
-
<vxe-form-item title="登录密码" field="password" span="24">
|
|
20
|
-
<template #default="{ data }">
|
|
21
|
-
<vxe-input v-model="data.password" type="text" placeholder="请输入登录密码" clearable></vxe-input>
|
|
22
|
-
</template>
|
|
23
|
-
</vxe-form-item>
|
|
24
|
-
<vxe-form-item title="确认密码" field="confirmpassword" span="24">
|
|
25
|
-
<template #default="{ data }">
|
|
26
|
-
<vxe-input v-model="data.confirmpassword" type="text" placeholder="请输入确认密码" clearable></vxe-input>
|
|
27
|
-
</template>
|
|
28
|
-
</vxe-form-item>
|
|
29
|
-
<vxe-form-item align="center" span="24">
|
|
30
|
-
<template #default>
|
|
31
|
-
<vxe-button content="取消" @click="passwordModalShow = false"></vxe-button>
|
|
32
|
-
<vxe-button @click="passwordModalHandle('confirm')" content="保存"></vxe-button>
|
|
33
|
-
</template>
|
|
34
|
-
</vxe-form-item>
|
|
35
|
-
</vxe-form-gather>
|
|
36
|
-
</vxe-form>
|
|
37
|
-
</template>
|
|
38
|
-
</vxe-modal>
|
|
39
|
-
<!--新增-->
|
|
40
|
-
|
|
41
|
-
<QSupplierAccountForm
|
|
42
|
-
v-if="showEditPage"
|
|
43
|
-
title="新增"
|
|
44
|
-
:currentRow="itemInfoRow"
|
|
45
|
-
@hide="showEditPage = false"
|
|
46
|
-
@afterHandleSaveSuccess="afterHandleSaveItemInfoSuccess"
|
|
47
|
-
:selectedrolesList="selectedrolesList"
|
|
48
|
-
></QSupplierAccountForm>
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
|
51
|
-
|
|
52
|
-
<script lang="ts">
|
|
53
|
-
//JS
|
|
54
|
-
import { defineComponent, reactive, inject, nextTick, toRefs } from 'vue'
|
|
55
|
-
import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
|
|
56
|
-
//hook
|
|
57
|
-
import { useConfigData } from './useConfigData'
|
|
58
|
-
//组件
|
|
59
|
-
import { message, Modal } from '@qqt-product/ui'
|
|
60
|
-
import QSupplierAccountForm from './QSupplierAccountForm.vue'
|
|
61
|
-
export default defineComponent({
|
|
62
|
-
name: 'QSupplierAccountList',
|
|
63
|
-
components: {
|
|
64
|
-
QSupplierAccountForm,
|
|
65
|
-
},
|
|
66
|
-
props: {
|
|
67
|
-
userInfo: {
|
|
68
|
-
type: Object,
|
|
69
|
-
defalut: () => {
|
|
70
|
-
return {}
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
setup(props) {
|
|
75
|
-
const { userInfo } = toRefs(props)
|
|
76
|
-
//data-hook
|
|
77
|
-
const { selectedrolesList, itemInfoRow, passwordRef, showEditPage, apiUrls, listLayoutRef, passwordModalShow, passwordModalForm, passwordModalFormRule } = useConfigData()
|
|
78
|
-
|
|
79
|
-
//data
|
|
80
|
-
const qHttp = inject(INJECT_HTTP) as HttpClient
|
|
81
|
-
|
|
82
|
-
const pageData = reactive({
|
|
83
|
-
statusConfig: {
|
|
84
|
-
show: false,
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
attrs: {},
|
|
88
|
-
extend: {},
|
|
89
|
-
|
|
90
|
-
{ authorityCode: 'supplierAccount#ElsSubAccount:changPassword', type: 'change', title: '更改密码', click: handleChangePassword },
|
|
91
|
-
{ authorityCode: 'supplierAccount#ElsSubAccount:frozenBatch', type: 'frozen', title: '冻结/解冻', click: handleFrozen },
|
|
92
|
-
],
|
|
93
|
-
},
|
|
94
|
-
buttonConfig: {
|
|
95
|
-
attrs: {},
|
|
96
|
-
extend: {},
|
|
97
|
-
buttons: [
|
|
98
|
-
{
|
|
99
|
-
label: '新增',
|
|
100
|
-
icon: {
|
|
101
|
-
type: 'icon-Q-add',
|
|
102
|
-
},
|
|
103
|
-
attrs: {
|
|
104
|
-
type: 'primary',
|
|
105
|
-
},
|
|
106
|
-
authorityCode: 'supplierAccount#ElsSubAccount:add',
|
|
107
|
-
click: addAccount,
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
authorityCode: 'elsSubAccount#ElsSubAccount:exportOtherList',
|
|
111
|
-
label: '导出',
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
let
|
|
162
|
-
|
|
163
|
-
let
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
status = '
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
message.
|
|
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
|
-
message.success(
|
|
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
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
|
|
4
|
+
<!--更改密码-->
|
|
5
|
+
<vxe-modal v-model="passwordModalShow" title="重新设定密码">
|
|
6
|
+
<template #default>
|
|
7
|
+
<vxe-form ref="passwordRef" title-colon title-align="right" title-width="160" :data="passwordModalForm" :rules="passwordModalFormRule">
|
|
8
|
+
<vxe-form-gather span="24">
|
|
9
|
+
<vxe-form-item title="ELS账号" field="elsAccount" span="24">
|
|
10
|
+
<template #default="{ data }">
|
|
11
|
+
<vxe-input :disabled="true" v-model="data.elsAccount" type="text" placeholder="请输入ELS账号" clearable></vxe-input>
|
|
12
|
+
</template>
|
|
13
|
+
</vxe-form-item>
|
|
14
|
+
<vxe-form-item title="子账号" field="subAccount" span="24">
|
|
15
|
+
<template #default="{ data }">
|
|
16
|
+
<vxe-input :disabled="true" v-model="data.subAccount" type="text" placeholder="请输入子账号" clearable></vxe-input>
|
|
17
|
+
</template>
|
|
18
|
+
</vxe-form-item>
|
|
19
|
+
<vxe-form-item title="登录密码" field="password" span="24">
|
|
20
|
+
<template #default="{ data }">
|
|
21
|
+
<vxe-input v-model="data.password" type="text" placeholder="请输入登录密码" clearable></vxe-input>
|
|
22
|
+
</template>
|
|
23
|
+
</vxe-form-item>
|
|
24
|
+
<vxe-form-item title="确认密码" field="confirmpassword" span="24">
|
|
25
|
+
<template #default="{ data }">
|
|
26
|
+
<vxe-input v-model="data.confirmpassword" type="text" placeholder="请输入确认密码" clearable></vxe-input>
|
|
27
|
+
</template>
|
|
28
|
+
</vxe-form-item>
|
|
29
|
+
<vxe-form-item align="center" span="24">
|
|
30
|
+
<template #default>
|
|
31
|
+
<vxe-button content="取消" @click="passwordModalShow = false"></vxe-button>
|
|
32
|
+
<vxe-button @click="passwordModalHandle('confirm')" content="保存"></vxe-button>
|
|
33
|
+
</template>
|
|
34
|
+
</vxe-form-item>
|
|
35
|
+
</vxe-form-gather>
|
|
36
|
+
</vxe-form>
|
|
37
|
+
</template>
|
|
38
|
+
</vxe-modal>
|
|
39
|
+
<!--新增-->
|
|
40
|
+
|
|
41
|
+
<QSupplierAccountForm
|
|
42
|
+
v-if="showEditPage"
|
|
43
|
+
title="新增"
|
|
44
|
+
:currentRow="itemInfoRow"
|
|
45
|
+
@hide="showEditPage = false"
|
|
46
|
+
@afterHandleSaveSuccess="afterHandleSaveItemInfoSuccess"
|
|
47
|
+
:selectedrolesList="selectedrolesList"
|
|
48
|
+
></QSupplierAccountForm>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script lang="ts">
|
|
53
|
+
//JS
|
|
54
|
+
import { defineComponent, reactive, inject, nextTick, toRefs } from 'vue'
|
|
55
|
+
import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
|
|
56
|
+
//hook
|
|
57
|
+
import { useConfigData } from './useConfigData'
|
|
58
|
+
//组件
|
|
59
|
+
import { message, Modal } from '@qqt-product/ui'
|
|
60
|
+
import QSupplierAccountForm from './QSupplierAccountForm.vue'
|
|
61
|
+
export default defineComponent({
|
|
62
|
+
name: 'QSupplierAccountList',
|
|
63
|
+
components: {
|
|
64
|
+
QSupplierAccountForm,
|
|
65
|
+
},
|
|
66
|
+
props: {
|
|
67
|
+
userInfo: {
|
|
68
|
+
type: Object,
|
|
69
|
+
defalut: () => {
|
|
70
|
+
return {}
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
setup(props) {
|
|
75
|
+
const { userInfo } = toRefs(props)
|
|
76
|
+
//data-hook
|
|
77
|
+
const { selectedrolesList, itemInfoRow, passwordRef, showEditPage, apiUrls, listLayoutRef, passwordModalShow, passwordModalForm, passwordModalFormRule } = useConfigData()
|
|
78
|
+
|
|
79
|
+
//data
|
|
80
|
+
const qHttp = inject(INJECT_HTTP) as HttpClient
|
|
81
|
+
|
|
82
|
+
const pageData = reactive({
|
|
83
|
+
statusConfig: {
|
|
84
|
+
show: false,
|
|
85
|
+
},
|
|
86
|
+
optionConfig: {
|
|
87
|
+
attrs: {},
|
|
88
|
+
extend: {},
|
|
89
|
+
options: [
|
|
90
|
+
{ authorityCode: 'supplierAccount#ElsSubAccount:changPassword', type: 'change', title: '更改密码', click: handleChangePassword },
|
|
91
|
+
{ authorityCode: 'supplierAccount#ElsSubAccount:frozenBatch', type: 'frozen', title: '冻结/解冻', click: handleFrozen },
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
buttonConfig: {
|
|
95
|
+
attrs: {},
|
|
96
|
+
extend: {},
|
|
97
|
+
buttons: [
|
|
98
|
+
{
|
|
99
|
+
label: '新增',
|
|
100
|
+
icon: {
|
|
101
|
+
type: 'icon-Q-add',
|
|
102
|
+
},
|
|
103
|
+
attrs: {
|
|
104
|
+
type: 'primary',
|
|
105
|
+
},
|
|
106
|
+
authorityCode: 'supplierAccount#ElsSubAccount:add',
|
|
107
|
+
click: addAccount,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
authorityCode: 'elsSubAccount#ElsSubAccount:exportOtherList',
|
|
111
|
+
label: '导出',
|
|
112
|
+
args: {
|
|
113
|
+
url: '/account/elsSubAccount/exportXlsOtherList', // 原来的 exportXlsUrl
|
|
114
|
+
},
|
|
115
|
+
icon: {
|
|
116
|
+
type: 'icon-Q-export',
|
|
117
|
+
},
|
|
118
|
+
type: 'export',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: '列自定义',
|
|
122
|
+
icon: {
|
|
123
|
+
type: 'icon-Q-setting',
|
|
124
|
+
},
|
|
125
|
+
type: 'setting',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
label: '帮助说明',
|
|
129
|
+
icon: {
|
|
130
|
+
type: 'icon-Q-help-text',
|
|
131
|
+
},
|
|
132
|
+
type: 'help-text',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
label: '附件说明',
|
|
136
|
+
icon: {
|
|
137
|
+
type: 'icon-Q-attachment-text',
|
|
138
|
+
},
|
|
139
|
+
type: 'attachment-text',
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
queryConfig: {
|
|
144
|
+
attrs: {},
|
|
145
|
+
extend: {},
|
|
146
|
+
form: [
|
|
147
|
+
{
|
|
148
|
+
type: 'input',
|
|
149
|
+
label: '关键字',
|
|
150
|
+
fieldName: 'keyWord',
|
|
151
|
+
placeholder: '供应商名称/els账号/姓名/子账号',
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
pagerConfig: {},
|
|
156
|
+
})
|
|
157
|
+
|
|
158
|
+
//methods
|
|
159
|
+
|
|
160
|
+
function handleFrozen({ row = {} as MapObjectNoneType }) {
|
|
161
|
+
let id = row.id
|
|
162
|
+
let status = row.status
|
|
163
|
+
let subAccount = row.subAccount
|
|
164
|
+
|
|
165
|
+
let messages = '冻结'
|
|
166
|
+
if ('admin' == subAccount) {
|
|
167
|
+
message.warning('管理员账号不允许此操作!')
|
|
168
|
+
return
|
|
169
|
+
}
|
|
170
|
+
if ('1' == status) {
|
|
171
|
+
status = '2'
|
|
172
|
+
} else {
|
|
173
|
+
status = '1'
|
|
174
|
+
messages = '解冻'
|
|
175
|
+
}
|
|
176
|
+
Modal.confirm({
|
|
177
|
+
title: '确认' + messages,
|
|
178
|
+
content: '是否' + messages + '选中数据?',
|
|
179
|
+
onOk: function () {
|
|
180
|
+
qHttp
|
|
181
|
+
.put({
|
|
182
|
+
url: '/account/elsSubAccount/frozenBatch',
|
|
183
|
+
data: { ids: id, status: status },
|
|
184
|
+
})
|
|
185
|
+
.then((res) => {
|
|
186
|
+
if (res.success) {
|
|
187
|
+
listLayoutRef.value.fetchListData()
|
|
188
|
+
message.success(res.message)
|
|
189
|
+
} else {
|
|
190
|
+
message.warning(res.message)
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
},
|
|
194
|
+
})
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function handleChangePassword({ row = {} as MapObjectNoneType }) {
|
|
198
|
+
passwordModalForm.value = row
|
|
199
|
+
nextTick(() => {
|
|
200
|
+
passwordModalShow.value = true
|
|
201
|
+
})
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function passwordModalHandle(handleType: string) {
|
|
205
|
+
if (handleType == 'confirm') {
|
|
206
|
+
nextTick(() => {
|
|
207
|
+
passwordRef.value.validate((res: MapObjectNoneType) => {
|
|
208
|
+
if (!res) {
|
|
209
|
+
if (passwordModalForm.value.confirmpassword != passwordModalForm.value.password) {
|
|
210
|
+
message.warning('两次输入的密码不一致')
|
|
211
|
+
return
|
|
212
|
+
}
|
|
213
|
+
qHttp
|
|
214
|
+
.put({
|
|
215
|
+
url: '/account/elsSubAccount/changPassword',
|
|
216
|
+
data: {
|
|
217
|
+
...passwordModalForm.value,
|
|
218
|
+
},
|
|
219
|
+
})
|
|
220
|
+
.then((res) => {
|
|
221
|
+
if (res.success) {
|
|
222
|
+
// this.$message.success(res.message)
|
|
223
|
+
listLayoutRef.value.fetchListData()
|
|
224
|
+
message.success('操作成功')
|
|
225
|
+
} else {
|
|
226
|
+
// this.$message.warning(res.message)
|
|
227
|
+
message.warning('操作失败')
|
|
228
|
+
}
|
|
229
|
+
})
|
|
230
|
+
.finally(() => {
|
|
231
|
+
passwordModalShow.value = false
|
|
232
|
+
})
|
|
233
|
+
}
|
|
234
|
+
})
|
|
235
|
+
})
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// 获取配置项分类
|
|
240
|
+
const getConfigurationItemClassificationList = (row: MapObjectNoneType) => {
|
|
241
|
+
// qHttp.get(
|
|
242
|
+
// { url: `account/role/queryAllByAccount/${userInfo}` }
|
|
243
|
+
// ).then((res) => {
|
|
244
|
+
// if (res && res.success) {
|
|
245
|
+
// selectedrolesList.value = res.result
|
|
246
|
+
// }
|
|
247
|
+
// })
|
|
248
|
+
|
|
249
|
+
return new Promise((resolve) => {
|
|
250
|
+
qHttp
|
|
251
|
+
.get({
|
|
252
|
+
// url: `account/role/queryAllByAccount/${userInfo?.value?.userInfo?.elsAccount}`,
|
|
253
|
+
url: `account/role/queryAllByAccount/${userInfo?.value?.userInfo?.elsAccount}`,
|
|
254
|
+
})
|
|
255
|
+
.then((res) => {
|
|
256
|
+
selectedrolesList.value = res.result.map((item: MapObjectNoneType) => ({
|
|
257
|
+
...item,
|
|
258
|
+
title: item.roleName,
|
|
259
|
+
value: item.id,
|
|
260
|
+
}))
|
|
261
|
+
resolve(res)
|
|
262
|
+
})
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
async function addAccount() {
|
|
267
|
+
let listArry = listLayoutRef.value.gridInstance.getCheckboxRecords() || []
|
|
268
|
+
|
|
269
|
+
if (listArry.length > 1 || listArry.length == 0) {
|
|
270
|
+
message.warning('请选中一条数据')
|
|
271
|
+
return
|
|
272
|
+
}
|
|
273
|
+
itemInfoRow.value.elsAccount = listArry[0]?.elsAccount
|
|
274
|
+
|
|
275
|
+
// itemInfoRow.value.selectedroles = itemInfoRow.value.selectedroles ? itemInfoRow.value.selectedroles : undefined
|
|
276
|
+
|
|
277
|
+
getConfigurationItemClassificationList(listArry[0]).then(() => {
|
|
278
|
+
nextTick(() => {
|
|
279
|
+
showEditPage.value = true
|
|
280
|
+
})
|
|
281
|
+
})
|
|
282
|
+
}
|
|
283
|
+
function afterHandleSaveItemInfoSuccess() {
|
|
284
|
+
console.log(111)
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return {
|
|
288
|
+
itemInfoRow,
|
|
289
|
+
afterHandleSaveItemInfoSuccess,
|
|
290
|
+
passwordRef,
|
|
291
|
+
passwordModalFormRule,
|
|
292
|
+
passwordModalForm,
|
|
293
|
+
passwordModalHandle,
|
|
294
|
+
listLayoutRef,
|
|
295
|
+
showEditPage,
|
|
296
|
+
apiUrls,
|
|
297
|
+
pageData,
|
|
298
|
+
passwordModalShow,
|
|
299
|
+
selectedrolesList,
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
})
|
|
303
|
+
</script>
|
|
304
|
+
<style scoped></style>
|