@qqt-product/system 0.0.2 → 0.0.17

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 (179) hide show
  1. package/dist/index.es.js +53481 -10448
  2. package/dist/index.umd.js +94 -22
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2881 -0
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2874 -0
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2882 -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 +2867 -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 +2867 -0
  12. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2879 -0
  13. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +38 -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/QPermissionDataAuth.vue.d.ts +387 -3
  18. package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2875 -0
  19. package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
  20. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2867 -0
  21. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2890 -0
  22. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
  23. package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
  24. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +222 -28
  25. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
  26. package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
  27. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +32 -7
  28. package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +4 -4
  29. package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
  30. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +25 -4
  31. package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +9 -0
  32. package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
  33. package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
  34. package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
  35. package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
  36. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1208 -0
  37. package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
  38. package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
  39. package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
  40. package/dist/lib/components/index.d.ts +2 -2
  41. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2866 -0
  42. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2875 -0
  43. package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
  44. package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
  45. package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
  46. package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
  47. package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
  48. package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
  49. package/dist/style.css +1 -1
  50. package/dist/vite-env.d.ts +13 -13
  51. package/package.json +24 -11
  52. package/.eslintignore +0 -4
  53. package/.eslintrc.cjs +0 -22
  54. package/.prettierignore +0 -4
  55. package/.prettierrc.cjs +0 -41
  56. package/.vscode/extensions.json +0 -3
  57. package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
  58. package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
  59. package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
  60. package/dist/vite.svg +0 -1
  61. package/index.html +0 -13
  62. package/public/vite.svg +0 -1
  63. package/src/App.vue +0 -8
  64. package/src/lib/components/QAccountList/index.ts +0 -6
  65. package/src/lib/components/QAccountList/src/QAccountDetail.vue +0 -191
  66. package/src/lib/components/QAccountList/src/QAccountEdit.vue +0 -241
  67. package/src/lib/components/QAccountList/src/QAccountList.vue +0 -530
  68. package/src/lib/components/QAccountList/src/useConfigData.ts +0 -53
  69. package/src/lib/components/QBackgroundFileTaskList/index.ts +0 -6
  70. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +0 -137
  71. package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +0 -20
  72. package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
  73. package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
  74. package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
  75. package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
  76. package/src/lib/components/QElsEmailSendLogList/index.ts +0 -6
  77. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +0 -166
  78. package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +0 -19
  79. package/src/lib/components/QElsMsgRecordList/index.ts +0 -6
  80. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +0 -148
  81. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +0 -124
  82. package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +0 -22
  83. package/src/lib/components/QElsTenantPortalNewsList/index.ts +0 -6
  84. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +0 -139
  85. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +0 -196
  86. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +0 -122
  87. package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +0 -20
  88. package/src/lib/components/QI18nList/index.ts +0 -6
  89. package/src/lib/components/QI18nList/src/QI18nForm.vue +0 -141
  90. package/src/lib/components/QI18nList/src/QI18nList.vue +0 -361
  91. package/src/lib/components/QI18nList/src/useConfigData.ts +0 -37
  92. package/src/lib/components/QImChatGroupList/index.ts +0 -6
  93. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +0 -94
  94. package/src/lib/components/QImChatGroupList/src/useConfigData.ts +0 -17
  95. package/src/lib/components/QMqRecordList/index.ts +0 -6
  96. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +0 -105
  97. package/src/lib/components/QMqRecordList/src/useConfigData.ts +0 -18
  98. package/src/lib/components/QPasswordSecurityPolicy/index.ts +0 -6
  99. package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +0 -266
  100. package/src/lib/components/QPermissionDataList/index.ts +0 -6
  101. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +0 -3
  102. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +0 -221
  103. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +0 -117
  104. package/src/lib/components/QPermissionDataList/src/form.vue +0 -109
  105. package/src/lib/components/QPurchaseNoticeList/index.ts +0 -6
  106. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +0 -147
  107. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +0 -244
  108. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +0 -163
  109. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +0 -22
  110. package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +0 -6
  111. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +0 -85
  112. package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +0 -18
  113. package/src/lib/components/QQuartzJobList/index.ts +0 -6
  114. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +0 -263
  115. package/src/lib/components/QQuartzJobList/src/components/JCron.vue +0 -82
  116. package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +0 -985
  117. package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +0 -176
  118. package/src/lib/components/QQuartzJobList/src/useConfigData.ts +0 -26
  119. package/src/lib/components/QRoleList/index.ts +0 -6
  120. package/src/lib/components/QRoleList/src/QRoleList.vue +0 -288
  121. package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +0 -31
  122. package/src/lib/components/QRoleList/src/components/content-header/index.tsx +0 -42
  123. package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +0 -690
  124. package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +0 -97
  125. package/src/lib/components/QRoleList/src/useConfigData.ts +0 -33
  126. package/src/lib/components/QSupplierAccountList/index.ts +0 -6
  127. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +0 -187
  128. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +0 -302
  129. package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +0 -29
  130. package/src/lib/components/QUsageList/index.ts +0 -6
  131. package/src/lib/components/QUsageList/src/QUsageList.vue +0 -82
  132. package/src/lib/components/QUsageList/src/useConfigData.ts +0 -20
  133. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +0 -140
  134. package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +0 -100
  135. package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +0 -100
  136. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +0 -71
  137. package/src/lib/components/QcustomConfigEdit/index.ts +0 -6
  138. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +0 -1807
  139. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +0 -242
  140. package/src/lib/components/QcustomConfigEdit/src/types.ts +0 -71
  141. package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +0 -75
  142. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +0 -123
  143. package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +0 -117
  144. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +0 -301
  145. package/src/lib/components/QcustomConfigEdit/style/index.less +0 -41
  146. package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +0 -135
  147. package/src/lib/components/QcustomConfigList/index.ts +0 -6
  148. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +0 -268
  149. package/src/lib/components/QcustomConfigList/src/types.ts +0 -1
  150. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +0 -23
  151. package/src/lib/components/QcustomConfigList/src/useMethods.ts +0 -36
  152. package/src/lib/components/QcustomConfigList/style/index.less +0 -3
  153. package/src/lib/components/QsysConfigList/index.ts +0 -6
  154. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +0 -125
  155. package/src/lib/components/QsysConfigList/src/types.ts +0 -1
  156. package/src/lib/components/QsysConfigList/src/useConfigData.ts +0 -17
  157. package/src/lib/components/QsysConfigList/src/useMethods.ts +0 -11
  158. package/src/lib/components/QsysConfigList/style/index.less +0 -3
  159. package/src/lib/components/index.ts +0 -78
  160. package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +0 -49
  161. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +0 -143
  162. package/src/lib/components/integratedNodesList/src/index.vue +0 -136
  163. package/src/lib/components/integratedReportList/src/index.vue +0 -86
  164. package/src/lib/components/integratedReportSearchList/src/index.vue +0 -66
  165. package/src/lib/components/loginAbnormalLogList/src/index.vue +0 -50
  166. package/src/lib/components/loginLogList/src/index.vue +0 -57
  167. package/src/lib/components/loginSupplierLogList/src/index.vue +0 -63
  168. package/src/lib/components/operateLogList/src/index.vue +0 -57
  169. package/src/lib/index.ts +0 -15
  170. package/src/lib/utils/constant.ts +0 -1
  171. package/src/lib/utils/global.hook.ts +0 -337
  172. package/src/lib/utils/global.types.ts +0 -49
  173. package/src/lib/utils/regexp.ts +0 -143
  174. package/src/main.ts +0 -11
  175. package/src/vite-env.d.ts +0 -13
  176. package/tsconfig.json +0 -24
  177. package/tsconfig.node.json +0 -9
  178. package/vite.config.ts +0 -61
  179. /package/dist/{index.es.d.ts → index.d.ts} +0 -0
@@ -1,97 +0,0 @@
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
- }
@@ -1,33 +0,0 @@
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
- }
@@ -1,6 +0,0 @@
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 }
@@ -1,187 +0,0 @@
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>
@@ -1,302 +0,0 @@
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,29 +0,0 @@
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
- }
@@ -1,6 +0,0 @@
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 }