@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,97 @@
1
+ .UserAuthorization {
2
+ position: relative;
3
+ .ant-checkbox-wrapper {
4
+ color: rgba(0, 0, 0, 0.65);
5
+ }
6
+ .title {
7
+ padding-left: 16px;
8
+ margin-bottom: 16px;
9
+ > strong {
10
+ font-size: 18px;
11
+ color: #4d72ff;
12
+ }
13
+ > span {
14
+ font-size: 12px;
15
+ color: #b9bcc1;
16
+ margin-left: 22px;
17
+ }
18
+ }
19
+ .container {
20
+ padding: 8px;
21
+ }
22
+ .pageBox {
23
+ background: #fff;
24
+ padding: 16px 16px 32px 16px;
25
+ min-height: calc(100vh - 158px);
26
+ }
27
+ .level {
28
+ &[class*='level_'] {
29
+ .triangle {
30
+ margin-right: 8px;
31
+ cursor: pointer;
32
+ }
33
+ .rotate90 {
34
+ .anticon {
35
+ transform: rotate(90deg);
36
+ transition: transform 0.3 ease-in-out;
37
+ }
38
+ }
39
+ }
40
+ &.level_1 {
41
+ display: flex;
42
+ align-items: center;
43
+ padding: 16px 20px;
44
+ &:hover {
45
+ background: rgba(254, 206, 0, 0.1);
46
+ }
47
+ .info {
48
+ display: flex;
49
+ flex-direction: column;
50
+ flex: 1;
51
+ strong {
52
+ font-size: 14px;
53
+ color: #454f59;
54
+ }
55
+ span.tip {
56
+ font-size: 12px;
57
+ color: rgba(69, 79, 89, 0.6);
58
+ margin-top: 8px;
59
+ }
60
+ }
61
+ & + .collapse.noneGrandchildren {
62
+ padding: 24px;
63
+ }
64
+ }
65
+ &.border {
66
+ border-bottom: 1px dashed #dadada;
67
+ }
68
+ &.level_2 {
69
+ display: flex;
70
+ &:not(:last-child) {
71
+ border-bottom: 1px dashed #dadada;
72
+ }
73
+ .info {
74
+ flex: 0 0 150px;
75
+ padding: 22px 0 22px 20px;
76
+ background-color: #f9f9f9;
77
+ }
78
+ .children {
79
+ flex: 1;
80
+ margin-left: 24px;
81
+ padding: 22px 20px 22px 0;
82
+ }
83
+ }
84
+ }
85
+ .level_3 {
86
+ & + .level_3 {
87
+ margin-top: 12px;
88
+ }
89
+ }
90
+ .checkboxGroup {
91
+ padding: 12px 0 12px 36px;
92
+ }
93
+ .collapse {
94
+ min-height: 70px;
95
+ border: 1px solid #dadcde;
96
+ }
97
+ }
@@ -0,0 +1,33 @@
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
+ list: '/account/role/list',
11
+ columnsCode: 'elsRole',
12
+ delete: '/account/role/delete',
13
+ copy: '/account/role/copy',
14
+ userRoleList: '/account/elsSubAccount/userRoleList',
15
+ })
16
+ const uploadShow = shallowRef<boolean>(false)
17
+ const showEditPage = shallowRef<boolean>(false)
18
+ const currentEditRow = ref({})
19
+ const listLayoutRef = ref()
20
+ const copyRoleShow = shallowRef<boolean>(false)
21
+ const copyRoleFrom = ref<MapObjectNoneType>({})
22
+ const itemRow = ref()
23
+
24
+ const userInformsFrom = ref<MapObjectNoneType>({})
25
+ const userInformsFromShow = shallowRef<boolean>(false)
26
+
27
+ const userInformsFromRules = ref({
28
+ roleName: [{ required: true, message: '请输入角色名称' }],
29
+ roleCode: [{ required: true, message: '请输入角色编码' }],
30
+ })
31
+
32
+ return { userInformsFromRules, userInformsFromShow, userInformsFrom, itemRow, copyRoleFrom, copyRoleShow, apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
33
+ }
@@ -0,0 +1,6 @@
1
+ import QSupplierAccountList from './src/QSupplierAccountList.vue'
2
+ import qqtUtils from '@qqt-product/utils'
3
+
4
+ export default qqtUtils.withInstall(QSupplierAccountList)
5
+
6
+ export { QSupplierAccountList }
@@ -0,0 +1,187 @@
1
+ <template>
2
+ <vxe-modal v-model="showModal" :width="800" :title="modalTitle" :hide="hideModal">
3
+ <template #default>
4
+ <vxe-form title-colon title-align="right" title-width="160" :data="itemInfo.formData" :rules="itemInfo.formRules" :loading="itemInfo.loading" @submit="submitEvent">
5
+ <vxe-form-item title="ELS账号" field="elsAccount" span="24">
6
+ <template #default="{ data }">
7
+ <vxe-input :disabled="true" v-model="data.elsAccount" type="text" placeholder="请输入ELS账号" clearable></vxe-input>
8
+ </template>
9
+ </vxe-form-item>
10
+
11
+ <vxe-form-item title="子账号" field="subAccount" span="24">
12
+ <template #default="{ data }">
13
+ <vxe-input v-model="data.subAccount" type="text" placeholder="请输入子账号" clearable></vxe-input>
14
+ </template>
15
+ </vxe-form-item>
16
+
17
+ <vxe-form-item title="姓名" field="realname" span="24">
18
+ <template #default="{ data }">
19
+ <vxe-input v-model="data.realname" type="text" placeholder="请输入姓名" clearable></vxe-input>
20
+ </template>
21
+ </vxe-form-item>
22
+
23
+ <vxe-form-item title="密码" field="password" span="24">
24
+ <template #default="{ data }">
25
+ <vxe-input v-model="data.password" type="text" placeholder="请输入密码" clearable></vxe-input>
26
+ </template>
27
+ </vxe-form-item>
28
+
29
+ <vxe-form-item title="角色" field="selectedroles" span="24">
30
+ <template #default="{ data }">
31
+ <a-select mode="multiple" v-model:value="data.selectedroles" placeholder="请选择角色" allowClear>
32
+ <a-select-option :value="item.value" v-for="(item, index) in selectedrolesList" :key="index">{{ item.title }}</a-select-option>
33
+ </a-select>
34
+ </template>
35
+ </vxe-form-item>
36
+
37
+ <vxe-form-item title="电子邮件" field="email" span="24">
38
+ <template #default="{ data }">
39
+ <vxe-input v-model="data.email" type="text" placeholder="请输入电子邮件" clearable></vxe-input>
40
+ </template>
41
+ </vxe-form-item>
42
+
43
+ <vxe-form-item title="手机号" field="phone" span="24">
44
+ <template #default="{ data }">
45
+ <vxe-input v-model="data.phone" type="text" placeholder="请输入手机号" clearable></vxe-input>
46
+ </template>
47
+ </vxe-form-item>
48
+
49
+ <vxe-form-item title="工号" field="workNo" span="24">
50
+ <template #default="{ data }">
51
+ <vxe-input v-model="data.workNo" type="text" placeholder="请输入工号" clearable></vxe-input>
52
+ </template>
53
+ </vxe-form-item>
54
+
55
+ <vxe-form-gather span="24">
56
+ <vxe-form-item title="账号过期时间" field="accountValidityDate" span="24">
57
+ <template #default="{ data }">
58
+ <a-date-picker picker="week" v-model:value="data.accountValidityDate" format="YYYY-MM-DD" />
59
+ </template>
60
+ </vxe-form-item>
61
+ </vxe-form-gather>
62
+ <vxe-form-item align="center" span="24">
63
+ <template #default>
64
+ <vxe-button content="取消" @click="hideModal"></vxe-button>
65
+ <vxe-button type="submit" status="primary" content="保存"></vxe-button>
66
+ </template>
67
+ </vxe-form-item>
68
+ </vxe-form>
69
+ </template>
70
+ </vxe-modal>
71
+ </template>
72
+ <script lang="ts">
73
+ import { defineComponent, reactive, ref, inject } from 'vue'
74
+ import { VXETable, VxeFormEvents, VxeFormPropTypes } from 'vxe-table'
75
+ import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
76
+ import { useCommonRegexp } from '../../../utils/global.hook'
77
+ export default defineComponent({
78
+ name: 'QSupplierAccountForm',
79
+ props: {
80
+ title: {
81
+ type: String,
82
+ default: '',
83
+ },
84
+ currentRow: {
85
+ type: Object,
86
+ },
87
+ selectedrolesList: {
88
+ type: Object,
89
+ },
90
+ itemTypeList: {
91
+ type: Object,
92
+ },
93
+ },
94
+ setup(props, { emit }) {
95
+ const qHttp = inject(INJECT_HTTP) as HttpClient
96
+ const REGEXP = useCommonRegexp()
97
+ const modalTitle = ref(props.title)
98
+ const showModal = ref(true)
99
+ const hideModal = () => {
100
+ emit('hide', false)
101
+ }
102
+ const itemInfo = reactive({
103
+ loading: false,
104
+ formData: {
105
+ elsAccount: '',
106
+ subAccount: '',
107
+ realname: '',
108
+ password: '',
109
+ selectedroles: undefined,
110
+ email: '',
111
+ phone: '',
112
+ workNo: '',
113
+ accountValidityDate: '',
114
+ },
115
+ formRules: {
116
+ subAccount: [{ required: true, message: '请输入子账号' }],
117
+ realname: [{ required: true, message: '请输入名字' }],
118
+ password: [{ required: true, message: '请输入密码' }],
119
+ selectedroles: [{ required: true, message: '请选择角色' }],
120
+ email: [
121
+ {
122
+ validator({ itemValue }) {
123
+ // 自定义校验
124
+ if (itemValue && !REGEXP.email.test(itemValue)) {
125
+ return new Error('邮箱格式不对')
126
+ }
127
+ },
128
+ },
129
+ ],
130
+ phone: [
131
+ {
132
+ validator({ itemValue }) {
133
+ // 自定义校验
134
+ if (itemValue && !REGEXP.mobile.test(itemValue)) {
135
+ return new Error('手机号码不对')
136
+ }
137
+ },
138
+ },
139
+ ],
140
+ // defaultValue: [{ required: true, message: '请输入默认值' }],
141
+ } as VxeFormPropTypes.Rules,
142
+ })
143
+ itemInfo.formData = Object.assign({}, itemInfo.formData, props.currentRow)
144
+ // 保存
145
+
146
+ const vertDate = (obj: string | number | Date) => {
147
+ //日期转yyyy-MM-dd
148
+ const date = new Date(obj)
149
+ const y = date.getFullYear()
150
+ const m = '0' + (date.getMonth() + 1)
151
+ const d = '0' + date.getDate()
152
+ return y + '-' + m.substring(m.length - 2, m.length) + '-' + d.substring(d.length - 2, d.length)
153
+ }
154
+ const save = async () => {
155
+ itemInfo.loading = true
156
+ let params: MapObjectNoneType = { ...itemInfo.formData }
157
+ params.accountValidityDate = params.accountValidityDate ? vertDate(params.accountValidityDate) : ''
158
+ params.selectedroles = params.selectedroles.join(',')
159
+ const res = await qHttp.post({ url: '/account/elsSubAccount/addOther', data: params })
160
+ if (res && res.success) {
161
+ VXETable.modal.message({ content: res.message, status: 'success' })
162
+ hideModal()
163
+ emit('afterHandleSaveSuccess')
164
+ } else {
165
+ VXETable.modal.message({ content: res.message, status: 'error' })
166
+ }
167
+ itemInfo.loading = false
168
+ }
169
+ const submitEvent: VxeFormEvents.Submit = () => {
170
+ save()
171
+ }
172
+ return {
173
+ modalTitle,
174
+ showModal,
175
+ hideModal,
176
+ itemInfo,
177
+ save,
178
+ submitEvent,
179
+ }
180
+ },
181
+ })
182
+ </script>
183
+ <style lang="scss" scoped>
184
+ :deep(.vxe-form--gather) {
185
+ padding: 20px 0px;
186
+ }
187
+ </style>
@@ -0,0 +1,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
+ 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>
@@ -0,0 +1,29 @@
1
+ import { shallowRef, ref } from 'vue'
2
+ // import type { MapObjectNoneType } from './types'
3
+ // import { VxeTableInstance } from 'vxe-table'
4
+ // import type {}
5
+ export function useConfigData() {
6
+ //响应
7
+
8
+ const apiUrls = shallowRef({
9
+ list: '/account/elsSubAccount/otherList',
10
+ columnsCode: 'ElsSubaccountInfoList',
11
+ exportXlsUrl: '/account/elsSubAccount/exportXlsOtherList',
12
+ })
13
+ const uploadShow = shallowRef<boolean>(false)
14
+ const showEditPage = shallowRef<boolean>(false)
15
+ const currentEditRow = ref({})
16
+ const listLayoutRef = ref()
17
+ const passwordModalShow = shallowRef<boolean>(false)
18
+ const passwordModalForm = ref()
19
+ const passwordModalFormRule = ref({
20
+ password: [{ required: true, message: '请输入登录密码' }],
21
+ confirmpassword: [{ required: true, message: '请输入确认密码' }],
22
+ })
23
+ const passwordRef = ref()
24
+ const itemInfoRow = ref({
25
+ elsAccount: '',
26
+ })
27
+ const selectedrolesList = ref()
28
+ return { selectedrolesList, itemInfoRow, passwordRef, passwordModalFormRule, passwordModalForm, passwordModalShow, apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
29
+ }
@@ -0,0 +1,6 @@
1
+ import QUsageList from './src/QUsageList.vue'
2
+ import qqtUtils from '@qqt-product/utils'
3
+
4
+ export default qqtUtils.withInstall(QUsageList)
5
+
6
+ export { QUsageList }