@qqt-product/system 0.0.1

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 (198) hide show
  1. package/.eslintignore +4 -0
  2. package/.eslintrc.cjs +22 -0
  3. package/.prettierignore +4 -0
  4. package/.prettierrc.cjs +41 -0
  5. package/.vscode/extensions.json +3 -0
  6. package/README.md +16 -0
  7. package/dist/index.es.d.ts +1 -0
  8. package/dist/index.es.js +14234 -0
  9. package/dist/index.umd.js +311 -0
  10. package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +143 -0
  11. package/dist/lib/components/QAccountList/src/useConfigData.d.ts +37 -0
  12. package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +66 -0
  13. package/dist/lib/components/QBackgroundFileTaskList/src/useConfigData.d.ts +14 -0
  14. package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +80 -0
  15. package/dist/lib/components/QCompanyermissionList/src/types.d.ts +44 -0
  16. package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +68 -0
  17. package/dist/lib/components/QElsEmailSendLogList/src/useConfigData.d.ts +13 -0
  18. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +72 -0
  19. package/dist/lib/components/QElsMsgRecordList/src/useConfigData.d.ts +16 -0
  20. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +75 -0
  21. package/dist/lib/components/QI18nList/src/QI18nForm.vue.d.ts +47 -0
  22. package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +136 -0
  23. package/dist/lib/components/QI18nList/src/useConfigData.d.ts +31 -0
  24. package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +61 -0
  25. package/dist/lib/components/QImChatGroupList/src/useConfigData.d.ts +11 -0
  26. package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +60 -0
  27. package/dist/lib/components/QMqRecordList/src/useConfigData.d.ts +12 -0
  28. package/dist/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue.d.ts +49 -0
  29. package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +3 -0
  30. package/dist/lib/components/QPermissionDataList/src/form.vue.d.ts +50 -0
  31. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +86 -0
  32. package/dist/lib/components/QPurchaseNoticeList/src/useConfigData.d.ts +15 -0
  33. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +47 -0
  34. package/dist/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.d.ts +12 -0
  35. package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +129 -0
  36. package/dist/lib/components/QQuartzJobList/src/components/JCron.vue.d.ts +23 -0
  37. package/dist/lib/components/QQuartzJobList/src/components/JCronModal.vue.d.ts +100 -0
  38. package/dist/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue.d.ts +55 -0
  39. package/dist/lib/components/QQuartzJobList/src/useConfigData.d.ts +20 -0
  40. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +100 -0
  41. package/dist/lib/components/QRoleList/src/components/content-header/index.d.ts +23 -0
  42. package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +79 -0
  43. package/dist/lib/components/QRoleList/src/useConfigData.d.ts +30 -0
  44. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue.d.ts +55 -0
  45. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +104 -0
  46. package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +29 -0
  47. package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +49 -0
  48. package/dist/lib/components/QUsageList/src/useConfigData.d.ts +14 -0
  49. package/dist/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue.d.ts +31 -0
  50. package/dist/lib/components/QcustomConfigEdit/component/dataFormatComponent.d.ts +46 -0
  51. package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +41 -0
  52. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigRender.d.ts +12 -0
  53. package/dist/lib/components/QcustomConfigEdit/src/types.d.ts +61 -0
  54. package/dist/lib/components/QcustomConfigEdit/src/useConfigComputed.d.ts +7 -0
  55. package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +85 -0
  56. package/dist/lib/components/QcustomConfigEdit/src/useConfigMethods.d.ts +16 -0
  57. package/dist/lib/components/QcustomConfigEdit/src/useConstant.d.ts +18 -0
  58. package/dist/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue.d.ts +50 -0
  59. package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +112 -0
  60. package/dist/lib/components/QcustomConfigList/src/useConfigData.d.ts +17 -0
  61. package/dist/lib/components/QcustomConfigList/src/useMethods.d.ts +15 -0
  62. package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +66 -0
  63. package/dist/lib/components/QsysConfigList/src/useConfigData.d.ts +11 -0
  64. package/dist/lib/components/QsysConfigList/src/useMethods.d.ts +6 -0
  65. package/dist/lib/components/index.d.ts +39 -0
  66. package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +107 -0
  67. package/dist/lib/components/integratedReportList/src/index.vue.d.ts +70 -0
  68. package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +61 -0
  69. package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +46 -0
  70. package/dist/lib/components/loginLogList/src/index.vue.d.ts +45 -0
  71. package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +45 -0
  72. package/dist/lib/components/operateLogList/src/index.vue.d.ts +53 -0
  73. package/dist/lib/index.d.ts +6 -0
  74. package/dist/lib/utils/global.hook.d.ts +31 -0
  75. package/dist/lib/utils/global.types.d.ts +41 -0
  76. package/dist/lib/utils/regexp.d.ts +27 -0
  77. package/dist/style.css +1 -0
  78. package/dist/vite-env.d.ts +13 -0
  79. package/dist/vite.svg +1 -0
  80. package/index.html +13 -0
  81. package/package.json +65 -0
  82. package/public/vite.svg +1 -0
  83. package/src/App.vue +8 -0
  84. package/src/lib/components/QAccountList/index.ts +6 -0
  85. package/src/lib/components/QAccountList/src/QAccountDetail.vue +191 -0
  86. package/src/lib/components/QAccountList/src/QAccountEdit.vue +241 -0
  87. package/src/lib/components/QAccountList/src/QAccountList.vue +530 -0
  88. package/src/lib/components/QAccountList/src/useConfigData.ts +53 -0
  89. package/src/lib/components/QBackgroundFileTaskList/index.ts +6 -0
  90. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +137 -0
  91. package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +20 -0
  92. package/src/lib/components/QCompanyermissionList/src/editTree.vue +291 -0
  93. package/src/lib/components/QCompanyermissionList/src/form.vue +238 -0
  94. package/src/lib/components/QCompanyermissionList/src/index.vue +309 -0
  95. package/src/lib/components/QCompanyermissionList/src/types.ts +44 -0
  96. package/src/lib/components/QElsEmailSendLogList/index.ts +6 -0
  97. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +166 -0
  98. package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +19 -0
  99. package/src/lib/components/QElsMsgRecordList/index.ts +6 -0
  100. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +148 -0
  101. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +124 -0
  102. package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +22 -0
  103. package/src/lib/components/QElsTenantPortalNewsList/index.ts +6 -0
  104. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +139 -0
  105. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +196 -0
  106. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +122 -0
  107. package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +20 -0
  108. package/src/lib/components/QI18nList/index.ts +6 -0
  109. package/src/lib/components/QI18nList/src/QI18nForm.vue +141 -0
  110. package/src/lib/components/QI18nList/src/QI18nList.vue +361 -0
  111. package/src/lib/components/QI18nList/src/useConfigData.ts +37 -0
  112. package/src/lib/components/QImChatGroupList/index.ts +6 -0
  113. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +94 -0
  114. package/src/lib/components/QImChatGroupList/src/useConfigData.ts +17 -0
  115. package/src/lib/components/QMqRecordList/index.ts +6 -0
  116. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +105 -0
  117. package/src/lib/components/QMqRecordList/src/useConfigData.ts +18 -0
  118. package/src/lib/components/QPasswordSecurityPolicy/index.ts +6 -0
  119. package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +266 -0
  120. package/src/lib/components/QPermissionDataList/index.ts +6 -0
  121. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -0
  122. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +221 -0
  123. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +117 -0
  124. package/src/lib/components/QPermissionDataList/src/form.vue +109 -0
  125. package/src/lib/components/QPurchaseNoticeList/index.ts +6 -0
  126. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +147 -0
  127. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +244 -0
  128. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +163 -0
  129. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -0
  130. package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +6 -0
  131. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +85 -0
  132. package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +18 -0
  133. package/src/lib/components/QQuartzJobList/index.ts +6 -0
  134. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +263 -0
  135. package/src/lib/components/QQuartzJobList/src/components/JCron.vue +82 -0
  136. package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +985 -0
  137. package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +176 -0
  138. package/src/lib/components/QQuartzJobList/src/useConfigData.ts +26 -0
  139. package/src/lib/components/QRoleList/index.ts +6 -0
  140. package/src/lib/components/QRoleList/src/QRoleList.vue +288 -0
  141. package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +31 -0
  142. package/src/lib/components/QRoleList/src/components/content-header/index.tsx +42 -0
  143. package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +690 -0
  144. package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +97 -0
  145. package/src/lib/components/QRoleList/src/useConfigData.ts +33 -0
  146. package/src/lib/components/QSupplierAccountList/index.ts +6 -0
  147. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +187 -0
  148. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +302 -0
  149. package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +29 -0
  150. package/src/lib/components/QUsageList/index.ts +6 -0
  151. package/src/lib/components/QUsageList/src/QUsageList.vue +82 -0
  152. package/src/lib/components/QUsageList/src/useConfigData.ts +20 -0
  153. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -0
  154. package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +100 -0
  155. package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +100 -0
  156. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +71 -0
  157. package/src/lib/components/QcustomConfigEdit/index.ts +6 -0
  158. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +1807 -0
  159. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +242 -0
  160. package/src/lib/components/QcustomConfigEdit/src/types.ts +71 -0
  161. package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +75 -0
  162. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +123 -0
  163. package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +117 -0
  164. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +301 -0
  165. package/src/lib/components/QcustomConfigEdit/style/index.less +41 -0
  166. package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +135 -0
  167. package/src/lib/components/QcustomConfigList/index.ts +6 -0
  168. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +268 -0
  169. package/src/lib/components/QcustomConfigList/src/types.ts +1 -0
  170. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +23 -0
  171. package/src/lib/components/QcustomConfigList/src/useMethods.ts +36 -0
  172. package/src/lib/components/QcustomConfigList/style/index.less +3 -0
  173. package/src/lib/components/QsysConfigList/index.ts +6 -0
  174. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +125 -0
  175. package/src/lib/components/QsysConfigList/src/types.ts +1 -0
  176. package/src/lib/components/QsysConfigList/src/useConfigData.ts +17 -0
  177. package/src/lib/components/QsysConfigList/src/useMethods.ts +11 -0
  178. package/src/lib/components/QsysConfigList/style/index.less +3 -0
  179. package/src/lib/components/index.ts +78 -0
  180. package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +49 -0
  181. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +143 -0
  182. package/src/lib/components/integratedNodesList/src/index.vue +136 -0
  183. package/src/lib/components/integratedReportList/src/index.vue +86 -0
  184. package/src/lib/components/integratedReportSearchList/src/index.vue +66 -0
  185. package/src/lib/components/loginAbnormalLogList/src/index.vue +50 -0
  186. package/src/lib/components/loginLogList/src/index.vue +57 -0
  187. package/src/lib/components/loginSupplierLogList/src/index.vue +63 -0
  188. package/src/lib/components/operateLogList/src/index.vue +57 -0
  189. package/src/lib/index.ts +15 -0
  190. package/src/lib/utils/constant.ts +1 -0
  191. package/src/lib/utils/global.hook.ts +337 -0
  192. package/src/lib/utils/global.types.ts +49 -0
  193. package/src/lib/utils/regexp.ts +143 -0
  194. package/src/main.ts +11 -0
  195. package/src/vite-env.d.ts +13 -0
  196. package/tsconfig.json +24 -0
  197. package/tsconfig.node.json +9 -0
  198. package/vite.config.ts +61 -0
@@ -0,0 +1,530 @@
1
+ <template>
2
+ <div style="height: 100%">
3
+ <q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
4
+
5
+ <!--工作交接-->
6
+ <vxe-modal v-model="deliverToShow" title="工作转交" type="confirm" :showFooter="false">
7
+ <vxe-form title-colon title-align="right" title-width="160" :data="deliverToFrom" :rules="deliverToFromRule" @submit="deliverTosubmitEvent">
8
+ <vxe-form-gather span="24">
9
+ <vxe-form-item title="转交人" field="realname" span="24">
10
+ <template #default="{ data }">
11
+ <vxe-input :disabled="true" v-model="data.realname" type="text" placeholder="请输入转交人"></vxe-input>
12
+ </template>
13
+ </vxe-form-item>
14
+
15
+ <vxe-form-item title="接收人" field="receiveId" span="24">
16
+ <template #default="{ data }">
17
+ <a-select :filter-option="filterOption" placeholder="请选择接收人" v-model:value="data.receiveId" :options="subAccountList"></a-select>
18
+ </template>
19
+ </vxe-form-item>
20
+ <vxe-form-item title="转交内容" field="businessDeliverToType" span="24">
21
+ <template #default="{ data }">
22
+ <q-select mode="multiple" style="width: 200px" v-model:value="data.businessDeliverToType" dict-code="businessDeliverToType" placeholder="请输入转交内容"></q-select>
23
+ </template>
24
+ </vxe-form-item>
25
+
26
+ <vxe-form-item align="center" span="24">
27
+ <template #default>
28
+ <vxe-button content="取消" @click="deliverToShow = false"></vxe-button>
29
+ <vxe-button type="submit" status="primary" content="保存"></vxe-button>
30
+ </template>
31
+ </vxe-form-item>
32
+ </vxe-form-gather>
33
+ </vxe-form>
34
+ </vxe-modal>
35
+ <!--更改密码-->
36
+ <vxe-modal v-model="passwordModalShow" title="重新设定密码">
37
+ <template #default>
38
+ <vxe-form ref="passwordRef" title-colon title-align="right" title-width="160" :data="passwordModalForm" :rules="passwordModalFormRule">
39
+ <vxe-form-gather span="24">
40
+ <vxe-form-item title="ELS账号" field="elsAccount" span="24">
41
+ <template #default="{ data }">
42
+ <vxe-input :disabled="true" v-model="data.elsAccount" type="text" placeholder="请输入ELS账号" clearable></vxe-input>
43
+ </template>
44
+ </vxe-form-item>
45
+ <vxe-form-item title="子账号" field="subAccount" span="24">
46
+ <template #default="{ data }">
47
+ <vxe-input :disabled="true" v-model="data.subAccount" type="text" placeholder="请输入子账号" clearable></vxe-input>
48
+ </template>
49
+ </vxe-form-item>
50
+ <vxe-form-item title="登录密码" field="password" span="24">
51
+ <template #default="{ data }">
52
+ <vxe-input v-model="data.password" type="text" placeholder="请输入登录密码" clearable></vxe-input>
53
+ </template>
54
+ </vxe-form-item>
55
+ <vxe-form-item title="确认密码" field="confirmpassword" span="24">
56
+ <template #default="{ data }">
57
+ <vxe-input v-model="data.confirmpassword" type="text" placeholder="请输入确认密码" clearable></vxe-input>
58
+ </template>
59
+ </vxe-form-item>
60
+ <vxe-form-item align="center" span="24">
61
+ <template #default>
62
+ <vxe-button content="取消" @click="passwordModalShow = false"></vxe-button>
63
+ <vxe-button @click="passwordModalHandle('confirm')" content="保存"></vxe-button>
64
+ </template>
65
+ </vxe-form-item>
66
+ </vxe-form-gather>
67
+ </vxe-form>
68
+ </template>
69
+ </vxe-modal>
70
+ </div>
71
+ </template>
72
+
73
+ <script lang="ts">
74
+ //JS
75
+ import { defineComponent, reactive, toRefs, inject, ref, nextTick } from 'vue'
76
+ //hook
77
+ import { useConfigData } from './useConfigData'
78
+
79
+ //ts
80
+ import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
81
+ import { Modal, message } from '@qqt-product/ui'
82
+ import { GlobalListPageLayoutTypes } from '@qqt-product/ui'
83
+
84
+ export default defineComponent({
85
+ name: 'QAccountList',
86
+ props: {
87
+ userInfo: {
88
+ type: Object,
89
+ defalut: () => {
90
+ return {}
91
+ },
92
+ },
93
+ },
94
+ emits: ['create', 'edit', 'detail'],
95
+ setup(props, { emit }) {
96
+ //data
97
+ const qHttp = inject(INJECT_HTTP) as HttpClient
98
+ const listLayoutRef = ref()
99
+ const pageData = reactive({
100
+ statusConfig: {
101
+ show: false,
102
+ },
103
+ optColumn: {
104
+ attrs: {},
105
+ extend: {},
106
+ optColumnList: [
107
+ {
108
+ type: 'edit',
109
+ title: '编辑',
110
+ authorityCode: 'elsSubAccount#ElsSubAccount:edit',
111
+ click({ row, $rowIndex, column, $columnIndex }: GlobalListPageLayoutTypes.ListOptionsEventParams) {
112
+ const payload = {
113
+ row,
114
+ $rowIndex,
115
+ column,
116
+ $columnIndex,
117
+ }
118
+ emit('edit', payload)
119
+ },
120
+ },
121
+ {
122
+ authorityCode: 'elsSubAccount#ElsSubAccount:view',
123
+ type: 'view',
124
+ title: '查看',
125
+ click({ row, $rowIndex, column, $columnIndex }: GlobalListPageLayoutTypes.ListOptionsEventParams) {
126
+ const payload = {
127
+ row,
128
+ $rowIndex,
129
+ column,
130
+ $columnIndex,
131
+ }
132
+ emit('detail', payload)
133
+ },
134
+ },
135
+ { authorityCode: 'elsSubAccount#ElsSubAccount:deliverTo', type: 'stop', title: '工作转交', click: deliverTo },
136
+ { authorityCode: 'elsSubAccount#ElsSubAccount:changPassword', type: 'change', title: '更改密码', click: handleChangePassword },
137
+ { authorityCode: 'elsSubAccount#ElsSubAccount:frozenBatch', type: 'frozen', title: '冻结/解冻', click: handleFrozen },
138
+ ],
139
+ },
140
+ buttonConfig: {
141
+ attrs: {},
142
+ extend: {},
143
+ buttons: [
144
+ {
145
+ authorityCode: 'elsSubAccount#ElsSubAccount:add',
146
+ label: '新增',
147
+ icon: {
148
+ type: 'icon-Q-add',
149
+ },
150
+ attrs: {
151
+ type: 'primary',
152
+ },
153
+ click({ row, $rowIndex, column, $columnIndex }: GlobalListPageLayoutTypes.ListOptionsEventParams) {
154
+ const payload = {
155
+ row,
156
+ $rowIndex,
157
+ column,
158
+ $columnIndex,
159
+ }
160
+ emit('create', payload)
161
+ },
162
+ },
163
+ { authorityCode: 'elsSubAccount#ElsSubAccount:getDataByErp', label: '获取ERP数据', click: getDataByErp },
164
+ { authorityCode: 'elsSubAccount#ElsSubAccount:pushDataToErp', label: '推送到ERP', click: pushDataToERP },
165
+ { authorityCode: 'elsSubAccount#ElsSubAccount:pushDataToMall', label: '推送到商城', click: pushDataToMall },
166
+ {
167
+ label: '列自定义',
168
+ icon: {
169
+ type: 'icon-Q-setting',
170
+ },
171
+ type: 'setting',
172
+ },
173
+ {
174
+ authorityCode: 'elsSubAccount#ElsSubAccount:import',
175
+ label: '导入',
176
+ icon: {
177
+ type: 'icon-Q-import',
178
+ },
179
+ type: 'import',
180
+ },
181
+ {
182
+ authorityCode: 'elsSubAccount#ElsSubAccount:export',
183
+ label: '导出',
184
+ icon: {
185
+ type: 'icon-Q-export',
186
+ },
187
+ type: 'export',
188
+ },
189
+ {
190
+ label: '帮助说明',
191
+ icon: {
192
+ type: 'icon-Q-help-text',
193
+ },
194
+ type: 'help-text',
195
+ },
196
+ {
197
+ label: '附件说明',
198
+ icon: {
199
+ type: 'icon-Q-attachment-text',
200
+ },
201
+ type: 'attachment-text',
202
+ },
203
+ ],
204
+ },
205
+ queryConfig: {
206
+ attrs: {},
207
+ extend: {},
208
+ form: [
209
+ {
210
+ type: 'input',
211
+ label: '姓名',
212
+ fieldName: 'i18nKey',
213
+ placeholder: '请输入姓名',
214
+ },
215
+ {
216
+ type: 'input',
217
+ label: '子账号',
218
+ fieldName: 'chinese',
219
+ placeholder: '请输入子账号',
220
+ },
221
+ ],
222
+ formState: {},
223
+ },
224
+ pagerConfig: {},
225
+ })
226
+ const passwordModalFormRule = ref({
227
+ password: [
228
+ { required: true, message: '请输入登录密码' },
229
+ {
230
+ validator: validateToNextPassword,
231
+ },
232
+ ],
233
+ confirmpassword: [
234
+ { required: true, message: '请输入确认密码' },
235
+ {
236
+ validator: compareToFirstPassword,
237
+ },
238
+ ],
239
+ })
240
+ //data-hook
241
+ const { passwordRef, passwordModalForm, passwordModalShow, showEditPage, apiUrls, deliverToShow, deliverToFrom, subAccountList, deliverToFromRule } = useConfigData()
242
+ const { userInfo } = toRefs(props)
243
+
244
+ //methods
245
+
246
+ function getDataByErp() {
247
+ listLayoutRef.value.loading = true
248
+ qHttp
249
+ .get({
250
+ url: apiUrls.value.getDataByErpUrl,
251
+ })
252
+ .then((res) => {
253
+ listLayoutRef.value.loading = false
254
+ if (res.success) {
255
+ // this.$message.success(res.message)
256
+ message.success('操作成功')
257
+ } else {
258
+ // this.$message.warning(res.message)
259
+ message.warning('操作失败')
260
+ }
261
+ })
262
+ .catch(() => {
263
+ listLayoutRef.value.loading = false
264
+ })
265
+ }
266
+
267
+ function pushDataToERP() {
268
+ let checkRow = listLayoutRef.value.gridInstance.getCheckboxRecords() || []
269
+ if (!checkRow.length) {
270
+ message.warning('请至少选择一行')
271
+ return
272
+ }
273
+ let ids = checkRow.map((row: MapObjectNoneType) => row.id).join(',')
274
+ listLayoutRef.value.loading = true
275
+ qHttp
276
+ .get({
277
+ url: apiUrls.value.pushDataToERPUrl,
278
+ params: {
279
+ ids,
280
+ },
281
+ })
282
+ .then((res) => {
283
+ listLayoutRef.value.loading = false
284
+ if (res.success) {
285
+ // this.$message.success(res.message)
286
+ message.success('操作成功')
287
+ } else {
288
+ // this.$message.warning(res.message)
289
+ message.warning('操作失败')
290
+ }
291
+ })
292
+ .catch(() => {
293
+ listLayoutRef.value.loading = false
294
+ })
295
+ }
296
+
297
+ function pushDataToMall() {
298
+ let checkRow = listLayoutRef.value.gridInstance.getCheckboxRecords() || []
299
+ if (!checkRow.length) {
300
+ message.warning('请至少选择一行')
301
+ return
302
+ }
303
+ let ids = checkRow.map((row: MapObjectNoneType) => row.id).join(',')
304
+ listLayoutRef.value.loading = true
305
+ qHttp
306
+ .get({
307
+ url: apiUrls.value.pushDataToMallUrl,
308
+ params: {
309
+ ids,
310
+ },
311
+ })
312
+ .then((res) => {
313
+ listLayoutRef.value.loading = false
314
+ if (res.success) {
315
+ // this.$message.success(res.message)
316
+ message.success(res.message)
317
+ } else {
318
+ // this.$message.warning(res.message)
319
+ message.warning(res.message)
320
+ }
321
+ })
322
+ .catch(() => {
323
+ listLayoutRef.value.loading = false
324
+ })
325
+ }
326
+
327
+ function handleFrozen({ row = {} as MapObjectNoneType }) {
328
+ let id = row.id
329
+ let status = row.status
330
+ let subAccount = row.subAccount
331
+
332
+ let messages = '冻结'
333
+ if ('admin' == subAccount) {
334
+ const t = '管理员账号不允许此操作!'
335
+ message.warning(t)
336
+ return
337
+ }
338
+ if ('1' == status) {
339
+ status = '2'
340
+ } else {
341
+ status = '1'
342
+ messages = '解冻'
343
+ }
344
+ const c = '确认'
345
+ const t = '是否'
346
+ const d = '选中数据?'
347
+ Modal.confirm({
348
+ title: c + messages,
349
+ content: t + messages + d + '?',
350
+ onOk: function () {
351
+ qHttp
352
+ .put({
353
+ url: '/account/elsSubAccount/frozenBatch',
354
+ data: { ids: id, status: status },
355
+ })
356
+ .then((res) => {
357
+ if (res.success) {
358
+ message.success(res.message)
359
+ listLayoutRef.value.fetchListData()
360
+ } else {
361
+ message.warning(res.message)
362
+ }
363
+ })
364
+ },
365
+ })
366
+ }
367
+
368
+ // 获取配置项分类
369
+ const getConfigurationItemClassificationList = () => {
370
+ let postData = {
371
+ pageSize: '100000',
372
+ }
373
+ qHttp.get({ url: '/account/elsSubAccount/list', params: postData }).then((res) => {
374
+ if (res && res.success) {
375
+ subAccountList.value = res.result.records.map((val: MapObjectNoneType) => {
376
+ return { value: val.id, label: val.realname }
377
+ })
378
+ }
379
+ })
380
+ }
381
+ getConfigurationItemClassificationList()
382
+
383
+ function deliverTo({ row = {} as MapObjectNoneType }) {
384
+ deliverToFrom.value = {
385
+ ...row,
386
+ }
387
+ nextTick(() => {
388
+ deliverToShow.value = true
389
+ })
390
+ }
391
+
392
+ function deliverToHandle() {
393
+ console.log(123)
394
+ }
395
+ function filterOption(input: MapObjectNoneType, option: MapObjectNoneType) {
396
+ return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
397
+ }
398
+
399
+ function deliverTosubmitEvent() {
400
+ let params = { sourceAccountId: deliverToFrom.value.id, targetAccountId: deliverToFrom.value.receiveId, businessDeliverToType: deliverToFrom.value.businessDeliverToType }
401
+
402
+ const t = '工作转交确认'
403
+ const c = '确认是否进行工作转交?'
404
+ Modal.confirm({
405
+ title: t,
406
+ content: c,
407
+ onOk: function () {
408
+ listLayoutRef.value.loading = true
409
+ qHttp
410
+ .get({
411
+ url: '/account/elsSubAccount/deliverTo',
412
+ params,
413
+ })
414
+ .then((res) => {
415
+ listLayoutRef.value.loading = true
416
+ if (res.success) {
417
+ message.success(res.message)
418
+ deliverToFrom.value = {}
419
+ listLayoutRef.value.fetchListData()
420
+ } else {
421
+ message.warning(res.message)
422
+ }
423
+ })
424
+ .finally(() => {
425
+ deliverToShow.value = false
426
+ })
427
+ },
428
+ })
429
+ }
430
+
431
+ function handleChangePassword({ row = {} as MapObjectNoneType }) {
432
+ passwordModalForm.value = row
433
+ nextTick(() => {
434
+ passwordModalShow.value = true
435
+ })
436
+ }
437
+
438
+ function passwordModalHandle(handleType: string) {
439
+ if (handleType == 'confirm') {
440
+ nextTick(() => {
441
+ passwordRef.value.validate((res: MapObjectNoneType) => {
442
+ if (!res) {
443
+ if (passwordModalForm.value.confirmpassword != passwordModalForm.value.password) {
444
+ message.warning('两次输入的密码不一致')
445
+ return
446
+ }
447
+ qHttp
448
+ .put({
449
+ url: '/account/elsSubAccount/changPassword',
450
+ data: {
451
+ ...passwordModalForm.value,
452
+ },
453
+ })
454
+ .then((res) => {
455
+ if (res.success) {
456
+ // this.$message.success(res.message)
457
+ listLayoutRef.value.fetchListData()
458
+ message.success('操作成功')
459
+ } else {
460
+ // this.$message.warning(res.message)
461
+ message.warning('操作失败')
462
+ }
463
+ })
464
+ .finally(() => {
465
+ passwordModalShow.value = false
466
+ })
467
+ }
468
+ })
469
+ })
470
+ }
471
+ }
472
+
473
+ async function validateToNextPassword(ErrMap: MapObjectNoneType) {
474
+ // const form = passwordModalForm.value
475
+ let EmessTxt = ''
476
+ if (ErrMap.itemValue) {
477
+ let params = {
478
+ elsAccount: userInfo.value?.userInfo?.elsAccount,
479
+ password: ErrMap.itemValue,
480
+ }
481
+ let curMess = await qHttp
482
+ .get({
483
+ url: '/account/noToken/pwdRuleCheck',
484
+ params,
485
+ })
486
+ .then((res) => {
487
+ if (res.success) {
488
+ if (res.message) {
489
+ EmessTxt = res.message ? res.message : ''
490
+ return EmessTxt
491
+ }
492
+ }
493
+ })
494
+ if (curMess) {
495
+ message.error(curMess)
496
+
497
+ return Promise.reject(curMess)
498
+ }
499
+ }
500
+ }
501
+
502
+ function compareToFirstPassword(ErrMap: MapObjectNoneType) {
503
+ const form = passwordModalForm.value
504
+ if (ErrMap.itemValue && ErrMap.itemValue !== form.password) {
505
+ return new Error(' 登录密码与确认密码不一致')
506
+ }
507
+ }
508
+
509
+ return {
510
+ passwordModalFormRule,
511
+ passwordModalForm,
512
+ passwordModalShow,
513
+ deliverTosubmitEvent,
514
+ deliverToFromRule,
515
+ filterOption,
516
+ subAccountList,
517
+ deliverToFrom,
518
+ deliverToHandle,
519
+ deliverToShow,
520
+ listLayoutRef,
521
+ showEditPage,
522
+ apiUrls,
523
+ pageData,
524
+ passwordModalHandle,
525
+ passwordRef,
526
+ }
527
+ },
528
+ })
529
+ </script>
530
+ <style scoped></style>
@@ -0,0 +1,53 @@
1
+ import { MapObjectNoneType } from '../../../utils/global.types'
2
+ import { shallowRef, ref } from 'vue'
3
+ // import type { MapObjectNoneType } from './types'
4
+ // import { VxeTableInstance } from 'vxe-table'
5
+ // import type {}
6
+ export function useConfigData() {
7
+ //响应
8
+
9
+ const apiUrls = shallowRef({
10
+ add: '/account/elsSubAccount/add',
11
+ list: '/account/elsSubAccount/list',
12
+ delete: '/account/elsSubAccount/delete',
13
+ copy: '/account/permissionData/copy',
14
+ columnsCode: 'ElsSubaccountInfoList',
15
+ exportXlsUrl: '/account/elsSubAccount/exportXls',
16
+ excelCode: 'elsSubAccountExcel',
17
+ handlerName: 'accountExportServiceImpl',
18
+ getDataByErpUrl: '/account/elsSubAccount/getDataByErp',
19
+ pushDataToERPUrl: '/account/elsSubAccount/pushDataToErp',
20
+ pushDataToMallUrl: '/mall/pushUserDataToMall',
21
+ })
22
+ const uploadShow = shallowRef<boolean>(false)
23
+ const showEditPage = shallowRef<boolean>(false)
24
+ const currentEditRow = ref({})
25
+ const listLayoutRef = ref()
26
+ const deliverToShow = shallowRef<boolean>(false)
27
+
28
+ const deliverToFrom = ref<MapObjectNoneType>({})
29
+ const deliverToFromRule = {
30
+ receiveId: [{ required: true, message: '当前内容为必填项' }],
31
+ businessDeliverToType: [{ required: true, message: '当前内容为必填项' }],
32
+ }
33
+
34
+ const passwordModalShow = shallowRef<boolean>(false)
35
+ const passwordModalForm = ref()
36
+
37
+ const subAccountList = ref([])
38
+ const passwordRef = ref()
39
+ return {
40
+ passwordModalForm,
41
+ passwordModalShow,
42
+ deliverToFromRule,
43
+ subAccountList,
44
+ deliverToFrom,
45
+ deliverToShow,
46
+ apiUrls,
47
+ showEditPage,
48
+ currentEditRow,
49
+ listLayoutRef,
50
+ uploadShow,
51
+ passwordRef,
52
+ }
53
+ }
@@ -0,0 +1,6 @@
1
+ import QBackgroundFileTaskList from './src/QBackgroundFileTaskList.vue'
2
+ import qqtUtils from '@qqt-product/utils'
3
+
4
+ export default qqtUtils.withInstall(QBackgroundFileTaskList)
5
+
6
+ export { QBackgroundFileTaskList }