@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,94 +0,0 @@
1
- <template>
2
- <div style="height: 100%">
3
- <q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
4
- </div>
5
- </template>
6
-
7
- <script lang="ts">
8
- //JS
9
- import { defineComponent, reactive, toRefs } from 'vue'
10
- //hook
11
- import { useConfigData } from './useConfigData'
12
-
13
- export default defineComponent({
14
- name: 'QImChatGroupList',
15
- props: {
16
- userInfo: {
17
- type: Object,
18
- defalut: () => {
19
- return {}
20
- },
21
- },
22
- },
23
- setup(props) {
24
- //data
25
- const pageData = reactive({
26
- statusConfig: {
27
- show: false,
28
- },
29
- optColumn: {
30
- attrs: {},
31
- extend: {},
32
- optColumnList: [
33
- // { authorityCode: 'template#templateHead:edit', type: 'edit', title: '编辑', click: handleEdit, allow: allowEdit },
34
- // { authorityCode: 'template#templateHead:copyById', type: 'copyById', title: '复制', click: handleCusotmCopy },
35
- // { authorityCode: 'template#templateHead:cancel', type: 'cancel', title: '作废', click: handleCustomCancel, allow: allowCancel },
36
- {
37
- type: 'delete',
38
- title: '删除',
39
- authorityCode: 'i18n#I18n:delete',
40
- action: '/base/systemSet/delete',
41
- // allow: allowDelete,
42
- },
43
- ],
44
- },
45
- buttonConfig: {
46
- attrs: {},
47
- extend: {},
48
- buttons: [
49
- // {label: srmI18n(`${getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns}
50
- ],
51
- },
52
- queryConfig: {
53
- attrs: {},
54
- extend: {},
55
- form: [
56
- {
57
- type: 'input',
58
- label: '群组名称',
59
- fieldName: 'keyWord',
60
- placeholder: '请输入群组名称',
61
- },
62
- {
63
- type: 'select',
64
- label: 'IM群聊单据类型',
65
- fieldName: 'recordType',
66
- dictCode: 'ImRecordType',
67
- placeholder: '请选择单据类型',
68
- },
69
- ],
70
- formState: {
71
- keyWord: '',
72
- recordType: '',
73
- },
74
- },
75
- pagerConfig: {},
76
- })
77
- //data-hook
78
- const { showEditPage, apiUrls } = useConfigData()
79
- const { userInfo } = toRefs(props)
80
- console.log('userInfos', userInfo)
81
- //methods
82
- // function allowDelete() {
83
- // console.log('userInfo.value?.userInfo?.elsAccount', userInfo.value?.userInfo?.elsAccount)
84
- // if (userInfo.value?.userInfo?.elsAccount != '100000') {
85
- // return true
86
- // } else {
87
- // return false
88
- // }
89
- // }
90
- return { showEditPage, apiUrls, pageData }
91
- },
92
- })
93
- </script>
94
- <style scoped></style>
@@ -1,17 +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: 'im/message/group-page',
10
- columnsCode: 'imChatGroupList',
11
- })
12
- const uploadShow = shallowRef<boolean>(false)
13
- const showEditPage = shallowRef<boolean>(false)
14
- const currentEditRow = ref({})
15
- const listLayoutRef = ref()
16
- return { apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
17
- }
@@ -1,6 +0,0 @@
1
- import QMqRecordList from './src/QMqRecordList.vue'
2
- import qqtUtils from '@qqt-product/utils'
3
-
4
- export default qqtUtils.withInstall(QMqRecordList)
5
-
6
- export { QMqRecordList }
@@ -1,105 +0,0 @@
1
- <template>
2
- <div style="height: 100%">
3
- <q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
4
- </div>
5
- </template>
6
-
7
- <script lang="ts">
8
- //JS
9
- import { defineComponent, reactive, inject } from 'vue'
10
- //hook
11
- import { useConfigData } from './useConfigData'
12
- //ts
13
- import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
14
- import { message } from '@qqt-product/ui'
15
- export default defineComponent({
16
- name: 'QMqRecordList',
17
- props: {
18
- userInfo: {
19
- type: Object,
20
- defalut: () => {
21
- return {}
22
- },
23
- },
24
- },
25
- setup() {
26
- //data-hook
27
- const { showEditPage, apiUrls, listLayoutRef } = useConfigData()
28
- const qHttp = inject(INJECT_HTTP) as HttpClient
29
- // const { userInfo } = toRefs(props)
30
- //data
31
- const pageData = reactive({
32
- statusConfig: {
33
- show: false,
34
- },
35
- optColumn: {
36
- attrs: {},
37
- extend: {},
38
- optColumnList: [{ authorityCode: 'mq#mqRecord:retry', type: 'delete', title: '重试 ', click: retry, disabled: allowRetryOpt }],
39
- },
40
- buttonConfig: {
41
- attrs: {},
42
- extend: {},
43
- buttons: [
44
- // {label: this.$srmI18n(`${this.$getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns}
45
- ],
46
- },
47
- queryConfig: {
48
- attrs: {},
49
- extend: {},
50
- form: [
51
- {
52
- type: 'select',
53
- label: '消息分组',
54
- dictCode: 'mqGroup',
55
- fieldName: 'msgGroup',
56
- placeholder: '请选择消息分组',
57
- },
58
- {
59
- type: 'select',
60
- label: '消息状态',
61
- dictCode: 'mqStatus',
62
- fieldName: 'msgStatus',
63
- placeholder: '请选择消息状态',
64
- },
65
- ],
66
- formState: {},
67
- },
68
- pagerConfig: {},
69
- })
70
-
71
- //methods
72
- function allowRetryOpt({ row = {} as MapObjectNoneType }) {
73
- if (row.msgStatus !== '1') {
74
- return false
75
- } else {
76
- return true
77
- }
78
- }
79
-
80
- function retry({ row = {} as MapObjectNoneType }) {
81
- listLayoutRef.value.loading = true
82
- qHttp
83
- .post({
84
- url: apiUrls.value.retry,
85
- params: {
86
- ...row,
87
- },
88
- })
89
- .then((res) => {
90
- if (res.success) {
91
- listLayoutRef.value.fetchListData()
92
- message.success(res.message)
93
- } else {
94
- message.warning(res.message)
95
- }
96
- })
97
- .finally(() => {
98
- listLayoutRef.value.loading = true
99
- })
100
- }
101
- return { showEditPage, apiUrls, pageData, listLayoutRef }
102
- },
103
- })
104
- </script>
105
- <style scoped></style>
@@ -1,18 +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: '/base/mqRecord/list',
10
- retry: '/base/mqRecord/retry',
11
- columnsCode: 'mqRecord',
12
- })
13
- const uploadShow = shallowRef<boolean>(false)
14
- const showEditPage = shallowRef<boolean>(false)
15
- const currentEditRow = ref({})
16
- const listLayoutRef = ref()
17
- return { apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
18
- }
@@ -1,6 +0,0 @@
1
- import QPasswordSecurityPolicy from './src/QPasswordSecurityPolicy.vue'
2
- import qqtUtils from '@qqt-product/utils'
3
-
4
- export default qqtUtils.withInstall(QPasswordSecurityPolicy)
5
-
6
- export { QPasswordSecurityPolicy }
@@ -1,266 +0,0 @@
1
- <template>
2
- <div class="password-security-policy">
3
- <div class="password-security-policy-breadcrumb">
4
- <!-- <div>
5
- <breadcrumb></breadcrumb>
6
- </div> -->
7
- <div>
8
- <a-button type="primary" @click="onSubmit"> 提交 </a-button>
9
- <a-button @click="onReset"> 重置</a-button>
10
- </div>
11
- </div>
12
- <div class="password-security-policy-content">
13
- <div class="password-security-policy-form" :style="{ minHeight: `${height - 154}px` }">
14
- <div class="item" v-for="(item, index) in list" :key="index">
15
- <div class="desc">
16
- <div class="tit">{{ item.title }}</div>
17
- <div class="tip" v-html="item.tip"></div>
18
- </div>
19
- <div class="type">
20
- <template v-if="item.itemtype === 'checkbox'">
21
- <a-checkbox-group v-model:value="form[item.key]" :options="item.options" />
22
- </template>
23
- <template v-else-if="item.itemtype === 'switch'">
24
- <a-switch v-model:checked="form[item.key]" />
25
- </template>
26
- <template v-else-if="item.itemtype === 'inputNumber'">
27
- <div>
28
- {{ item.textStart || '' }}
29
- <span class="red">{{ form[item.key] }}</span>
30
- {{ item.textEnd || '' }}
31
- </div>
32
- <a-input-number size="small" :min="item.minValue" :max="item.maxValue" :precision="0" v-model:value="form[item.key]" />
33
- </template>
34
- </div>
35
- </div>
36
- </div>
37
- </div>
38
- </div>
39
- </template>
40
-
41
- <script lang="ts">
42
- //JS
43
- import { HttpClient, INJECT_HTTP, MapObjectNoneType } from '../../../utils/global.types'
44
- import { message } from '@qqt-product/ui'
45
- import { defineComponent, inject } from 'vue'
46
-
47
- export default defineComponent({
48
- name: 'QPasswordSecurityPolicy',
49
- data() {
50
- return {
51
- height: 0,
52
- form: {
53
- complexity: [],
54
- minLength: 0,
55
- modifyInterval: 0,
56
- errorLock: 0,
57
- errorLockTime: 0,
58
- forcePwdHis: 0,
59
- allowRepeatLogin: true,
60
- id: '',
61
- } as MapObjectNoneType,
62
- list: [
63
- {
64
- title: '密码复杂性',
65
- tip: '更改或创建密码时,会强制实施复杂性要求。',
66
- itemtype: 'checkbox',
67
- key: 'complexity',
68
- options: [
69
- {
70
- value: 'includeNum',
71
- label: '数字',
72
- },
73
- {
74
- value: 'includeLowerCase',
75
- label: '小写字母',
76
- },
77
- {
78
- value: 'includeUpperCase',
79
- label: '大写字母',
80
- },
81
- {
82
- value: 'includeSymbol',
83
- label: '特殊字符',
84
- },
85
- ],
86
- },
87
- {
88
- title: '密码长度最小值 (位)',
89
- tip: '设置账号密码最小字符数,单位为位。注: 个于1-14之间。',
90
- itemtype: 'inputNumber',
91
- key: 'minLength',
92
- minValue: 0,
93
- textStart: '长度必须大于',
94
- textEnd: '位',
95
- },
96
- {
97
- title: '密码使用期限 (天)',
98
- tip: '密码达到使用期限,强制修改密码,单位为天。',
99
- itemtype: 'inputNumber',
100
- key: 'modifyInterval',
101
- minValue: 0,
102
- textStart: '每',
103
- textEnd: '天修改一次密码',
104
- },
105
- {
106
- title: '强制密码历史',
107
- tip: ` 新密码与前几个历史密码关联唯一,单位为个<span style="color:red;">
108
- '注:个于0-24之间,0表示新密码可以和旧密码相同,24表示新密码不能与前24个历史密码相同。',
109
- </span>`,
110
- itemtype: 'inputNumber',
111
- key: 'forcePwdHis',
112
- minValue: 0,
113
- maxValue: 24,
114
- textStart: '新密码与前',
115
- textEnd: '个历史密码唯一',
116
- },
117
- {
118
- title: '账号锁定阈值',
119
- tip: `连续密码输入错误次数达到阀值,则账号被锁定。<span style="color:red;"> 注:0表示不限制。</span>`,
120
- itemtype: 'inputNumber',
121
- key: 'errorLock',
122
- minValue: 0,
123
- textStart: '连续输入密码错误',
124
- textEnd: '次锁定账号',
125
- },
126
- {
127
- title: '账号锁定持续时长 (分钟)',
128
- tip: `账号锁定持续时长,单位为分钟。<span style="color:red;"> 注:-1表示无限期锁定。</span>`,
129
- itemtype: 'inputNumber',
130
- key: 'errorLockTime',
131
- minValue: -1,
132
- textStart: '账号锁定',
133
- textEnd: '分钟后解锁',
134
- },
135
- ],
136
- allowRepeatLogin: '0',
137
- complexity: {
138
- includeNum: 0,
139
- includeLowerCase: 0,
140
- includeUpperCase: 0,
141
- includeSymbol: 0,
142
- } as MapObjectNoneType,
143
- }
144
- },
145
- setup() {
146
- const qHttp = inject(INJECT_HTTP) as HttpClient
147
- return {
148
- qHttp,
149
- }
150
- },
151
- // components: {
152
- // Breadcrumb,
153
- // },
154
- created() {
155
- this.height = document.documentElement.clientHeight
156
- this.init()
157
- },
158
- methods: {
159
- onReset() {
160
- message.success('已重置')
161
- this.init()
162
- },
163
- onSubmit() {
164
- console.log(this.form)
165
- let url = this.form.id ? '/account/elsPasswordSecurity/editElsPwSecurity' : '/account/elsPasswordSecurity/addElsPwSecurity'
166
- Object.keys(this.complexity).forEach((item) => {
167
- this.complexity[item] = 0
168
- if (this.form.complexity.includes(item)) {
169
- this.complexity[item] = 1
170
- }
171
- })
172
- this.allowRepeatLogin = this.form.allowRepeatLogin ? '1' : '0'
173
- let postData = Object.assign({}, this.form, { complexity: JSON.stringify(this.complexity), allowRepeatLogin: this.allowRepeatLogin })
174
- console.log('postData!', postData)
175
- this.qHttp.post({ url, data: postData }).then((res) => {
176
- if (res.success) {
177
- message.success('提交成功')
178
- this.init()
179
- } else {
180
- message.warning(res.message)
181
- }
182
- })
183
- },
184
- init() {
185
- let url = '/account/elsPasswordSecurity/getElsPasswordSecurity'
186
- this.qHttp.post({ url }).then((res) => {
187
- if (res.success) {
188
- let result = res.result || {}
189
- console.log('result', result)
190
- result.allowRepeatLogin = !!result.allowRepeatLogin
191
- result.complexity = JSON.parse(result.complexity)
192
- result.complexity = Object.keys(result.complexity).filter((item) => result.complexity[item] === 1)
193
- this.form = result
194
- console.log(this.form)
195
- }
196
- })
197
- },
198
- },
199
- })
200
- </script>
201
-
202
- <style lang="scss" scoped>
203
- $glay: rgba(69, 79, 89, 0.6);
204
-
205
- .password-security-policy {
206
- height: 100%;
207
- &-breadcrumb {
208
- height: 44px;
209
- display: flex;
210
- /* justify-content: space-between; */
211
- justify-content: flex-end;
212
- align-items: center;
213
- padding-left: 16px;
214
- padding-right: 25px;
215
- background: white;
216
- }
217
- &-content {
218
- padding: 8px;
219
- }
220
- &-form {
221
- background: white;
222
- padding: 0 16px;
223
- .item {
224
- display: flex;
225
- justify-content: space-between;
226
- align-items: center;
227
- padding: 0 18px;
228
- border-bottom: 1px dashed #dadada;
229
- .desc {
230
- padding: 16px 0;
231
- .tit {
232
- color: #454f59;
233
- font-weight: 500;
234
- font-size: 14px;
235
- line-height: 14px;
236
- }
237
- .tip {
238
- font-weight: 400;
239
- font-size: 12px;
240
- line-height: 12px;
241
- color: $glay;
242
- margin-top: 8px;
243
- }
244
- }
245
- .type {
246
- font-weight: 400;
247
- font-size: 12px;
248
- line-height: 12px;
249
- color: $glay;
250
- display: flex;
251
- align-items: center;
252
- }
253
- }
254
- }
255
- .red {
256
- color: red;
257
- }
258
- .ant-input-number {
259
- margin-left: 16px;
260
- width: 60px;
261
- }
262
- .ant-btn + .ant-btn {
263
- margin-left: 8px;
264
- }
265
- }
266
- </style>
@@ -1,6 +0,0 @@
1
- import QPermissionDataList from './src/QPermissionDataList.vue'
2
- import qqtUtils from '@qqt-product/utils'
3
-
4
- export default qqtUtils.withInstall(QPermissionDataList)
5
-
6
- export { QPermissionDataList }
@@ -1,3 +0,0 @@
1
- <template>
2
- <div>auth</div>
3
- </template>