@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.
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,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
- optColumn: {
87
- attrs: {},
88
- extend: {},
89
- optColumnList: [
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
- icon: {
113
- type: 'icon-Q-export',
114
- },
115
- type: 'export',
116
- },
117
- {
118
- label: '列自定义',
119
- icon: {
120
- type: 'icon-Q-setting',
121
- },
122
- type: 'setting',
123
- },
124
- {
125
- label: '帮助说明',
126
- icon: {
127
- type: 'icon-Q-help-text',
128
- },
129
- type: 'help-text',
130
- },
131
- {
132
- label: '附件说明',
133
- icon: {
134
- type: 'icon-Q-attachment-text',
135
- },
136
- type: 'attachment-text',
137
- },
138
- ],
139
- },
140
- queryConfig: {
141
- attrs: {},
142
- extend: {},
143
- form: [
144
- {
145
- type: 'input',
146
- label: '关键字',
147
- fieldName: 'keyWord',
148
- placeholder: '供应商名称/els账号/姓名/子账号',
149
- },
150
- ],
151
- formState: {},
152
- },
153
- pagerConfig: {},
154
- })
155
-
156
- //methods
157
-
158
- function handleFrozen({ row = {} as MapObjectNoneType }) {
159
- let id = row.id
160
- let status = row.status
161
- let subAccount = row.subAccount
162
-
163
- let messages = '冻结'
164
- if ('admin' == subAccount) {
165
- message.warning('管理员账号不允许此操作!')
166
- return
167
- }
168
- if ('1' == status) {
169
- status = '2'
170
- } else {
171
- status = '1'
172
- messages = '解冻'
173
- }
174
- Modal.confirm({
175
- title: '确认' + messages,
176
- content: '是否' + messages + '选中数据?',
177
- onOk: function () {
178
- qHttp
179
- .put({
180
- url: '/account/elsSubAccount/frozenBatch',
181
- data: { ids: id, status: status },
182
- })
183
- .then((res) => {
184
- if (res.success) {
185
- listLayoutRef.value.fetchListData()
186
- message.success(res.message)
187
- } else {
188
- message.warning(res.message)
189
- }
190
- })
191
- },
192
- })
193
- }
194
-
195
- function handleChangePassword({ row = {} as MapObjectNoneType }) {
196
- passwordModalForm.value = row
197
- nextTick(() => {
198
- passwordModalShow.value = true
199
- })
200
- }
201
-
202
- function passwordModalHandle(handleType: string) {
203
- if (handleType == 'confirm') {
204
- nextTick(() => {
205
- passwordRef.value.validate((res: MapObjectNoneType) => {
206
- if (!res) {
207
- if (passwordModalForm.value.confirmpassword != passwordModalForm.value.password) {
208
- message.warning('两次输入的密码不一致')
209
- return
210
- }
211
- qHttp
212
- .put({
213
- url: '/account/elsSubAccount/changPassword',
214
- data: {
215
- ...passwordModalForm.value,
216
- },
217
- })
218
- .then((res) => {
219
- if (res.success) {
220
- // this.$message.success(res.message)
221
- listLayoutRef.value.fetchListData()
222
- message.success('操作成功')
223
- } else {
224
- // this.$message.warning(res.message)
225
- message.warning('操作失败')
226
- }
227
- })
228
- .finally(() => {
229
- passwordModalShow.value = false
230
- })
231
- }
232
- })
233
- })
234
- }
235
- }
236
-
237
- // 获取配置项分类
238
- const getConfigurationItemClassificationList = (row: MapObjectNoneType) => {
239
- // qHttp.get(
240
- // { url: `account/role/queryAllByAccount/${userInfo}` }
241
- // ).then((res) => {
242
- // if (res && res.success) {
243
- // selectedrolesList.value = res.result
244
- // }
245
- // })
246
-
247
- return new Promise((resolve) => {
248
- qHttp
249
- .get({
250
- // url: `account/role/queryAllByAccount/${userInfo?.value?.userInfo?.elsAccount}`,
251
- url: `account/role/queryAllByAccount/${userInfo?.value?.userInfo?.elsAccount}`,
252
- })
253
- .then((res) => {
254
- selectedrolesList.value = res.result.map((item: MapObjectNoneType) => ({
255
- ...item,
256
- title: item.roleName,
257
- value: item.id,
258
- }))
259
- resolve(res)
260
- })
261
- })
262
- }
263
-
264
- async function addAccount() {
265
- let listArry = listLayoutRef.value.gridInstance.getCheckboxRecords() || []
266
-
267
- if (listArry.length > 1 || listArry.length == 0) {
268
- message.warning('请选中一条数据')
269
- return
270
- }
271
- itemInfoRow.value.elsAccount = listArry[0]?.elsAccount
272
-
273
- // itemInfoRow.value.selectedroles = itemInfoRow.value.selectedroles ? itemInfoRow.value.selectedroles : undefined
274
-
275
- getConfigurationItemClassificationList(listArry[0]).then(() => {
276
- nextTick(() => {
277
- showEditPage.value = true
278
- })
279
- })
280
- }
281
- function afterHandleSaveItemInfoSuccess() {
282
- console.log(111)
283
- }
284
-
285
- return {
286
- itemInfoRow,
287
- afterHandleSaveItemInfoSuccess,
288
- passwordRef,
289
- passwordModalFormRule,
290
- passwordModalForm,
291
- passwordModalHandle,
292
- listLayoutRef,
293
- showEditPage,
294
- apiUrls,
295
- pageData,
296
- passwordModalShow,
297
- selectedrolesList,
298
- }
299
- },
300
- })
301
- </script>
302
- <style scoped></style>
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>