@qqt-product/system 0.0.16 → 0.0.18

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 (148) hide show
  1. package/dist/index.es.js +9601 -9171
  2. package/dist/index.umd.js +34 -35
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +16 -12
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +14 -10
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +17 -12
  6. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +13 -9
  7. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +13 -9
  8. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +16 -12
  9. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +9 -0
  10. package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +387 -3
  11. package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +16 -12
  12. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +13 -9
  13. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +18 -14
  14. package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +1 -1
  15. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +2 -1
  16. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +21 -1
  17. package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +4 -4
  18. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +19 -2
  19. package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +9 -0
  20. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +0 -1
  21. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +13 -9
  22. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +16 -12
  23. package/dist/style.css +1 -1
  24. package/package.json +20 -9
  25. package/.eslintignore +0 -4
  26. package/.eslintrc.cjs +0 -22
  27. package/.prettierignore +0 -4
  28. package/.prettierrc.cjs +0 -41
  29. package/.vscode/extensions.json +0 -3
  30. package/dist/vite.svg +0 -1
  31. package/index.html +0 -13
  32. package/public/vite.svg +0 -1
  33. package/src/App.vue +0 -8
  34. package/src/lib/components/QAccountList/index.ts +0 -6
  35. package/src/lib/components/QAccountList/src/QAccountCreate.vue +0 -272
  36. package/src/lib/components/QAccountList/src/QAccountDetail.vue +0 -259
  37. package/src/lib/components/QAccountList/src/QAccountEdit.vue +0 -273
  38. package/src/lib/components/QAccountList/src/QAccountList.vue +0 -532
  39. package/src/lib/components/QAccountList/src/useConfigData.ts +0 -53
  40. package/src/lib/components/QBackgroundFileTaskList/index.ts +0 -6
  41. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +0 -143
  42. package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +0 -20
  43. package/src/lib/components/QElsEmailSendLogList/index.ts +0 -6
  44. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +0 -172
  45. package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +0 -19
  46. package/src/lib/components/QElsMsgRecordList/index.ts +0 -6
  47. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +0 -148
  48. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +0 -123
  49. package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +0 -22
  50. package/src/lib/components/QElsTenantPortalNewsList/index.ts +0 -6
  51. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +0 -139
  52. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +0 -244
  53. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +0 -151
  54. package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +0 -20
  55. package/src/lib/components/QI18nList/index.ts +0 -6
  56. package/src/lib/components/QI18nList/src/QI18nForm.vue +0 -141
  57. package/src/lib/components/QI18nList/src/QI18nList.vue +0 -365
  58. package/src/lib/components/QI18nList/src/useConfigData.ts +0 -37
  59. package/src/lib/components/QImChatGroupList/index.ts +0 -6
  60. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +0 -103
  61. package/src/lib/components/QImChatGroupList/src/useConfigData.ts +0 -17
  62. package/src/lib/components/QMqRecordList/index.ts +0 -6
  63. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +0 -109
  64. package/src/lib/components/QMqRecordList/src/useConfigData.ts +0 -18
  65. package/src/lib/components/QPasswordSecurityPolicy/index.ts +0 -6
  66. package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +0 -266
  67. package/src/lib/components/QPermissionDataList/index.ts +0 -6
  68. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +0 -3
  69. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +0 -218
  70. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +0 -110
  71. package/src/lib/components/QPermissionDataList/src/form.vue +0 -109
  72. package/src/lib/components/QPurchaseNoticeList/index.ts +0 -6
  73. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +0 -147
  74. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +0 -332
  75. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +0 -189
  76. package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +0 -84
  77. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +0 -22
  78. package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +0 -6
  79. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +0 -134
  80. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +0 -91
  81. package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +0 -18
  82. package/src/lib/components/QQuartzJobList/index.ts +0 -6
  83. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +0 -276
  84. package/src/lib/components/QQuartzJobList/src/components/JCron.vue +0 -82
  85. package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +0 -985
  86. package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +0 -176
  87. package/src/lib/components/QQuartzJobList/src/useConfigData.ts +0 -26
  88. package/src/lib/components/QRoleList/index.ts +0 -6
  89. package/src/lib/components/QRoleList/src/QRoleList.vue +0 -332
  90. package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +0 -31
  91. package/src/lib/components/QRoleList/src/components/content-header/index.tsx +0 -42
  92. package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +0 -690
  93. package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +0 -97
  94. package/src/lib/components/QRoleList/src/useConfigData.ts +0 -28
  95. package/src/lib/components/QSupplierAccountList/index.ts +0 -6
  96. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +0 -187
  97. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +0 -304
  98. package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +0 -29
  99. package/src/lib/components/QUsageList/index.ts +0 -6
  100. package/src/lib/components/QUsageList/src/QUsageList.vue +0 -287
  101. package/src/lib/components/QUsageList/src/useConfigData.ts +0 -154
  102. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +0 -140
  103. package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +0 -100
  104. package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +0 -100
  105. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +0 -71
  106. package/src/lib/components/QcustomConfigEdit/index.ts +0 -6
  107. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +0 -1895
  108. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +0 -242
  109. package/src/lib/components/QcustomConfigEdit/src/types.ts +0 -71
  110. package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +0 -75
  111. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +0 -123
  112. package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +0 -117
  113. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +0 -301
  114. package/src/lib/components/QcustomConfigEdit/style/index.less +0 -41
  115. package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +0 -135
  116. package/src/lib/components/QcustomConfigList/index.ts +0 -6
  117. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +0 -276
  118. package/src/lib/components/QcustomConfigList/src/types.ts +0 -1
  119. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +0 -23
  120. package/src/lib/components/QcustomConfigList/src/useMethods.ts +0 -36
  121. package/src/lib/components/QcustomConfigList/style/index.less +0 -3
  122. package/src/lib/components/QsysConfigList/index.ts +0 -6
  123. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +0 -124
  124. package/src/lib/components/QsysConfigList/src/types.ts +0 -1
  125. package/src/lib/components/QsysConfigList/src/useConfigData.ts +0 -17
  126. package/src/lib/components/QsysConfigList/src/useMethods.ts +0 -11
  127. package/src/lib/components/QsysConfigList/style/index.less +0 -3
  128. package/src/lib/components/index.ts +0 -78
  129. package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +0 -49
  130. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +0 -135
  131. package/src/lib/components/integratedNodesList/src/index.vue +0 -130
  132. package/src/lib/components/integratedReportList/src/index.vue +0 -111
  133. package/src/lib/components/integratedReportSearchList/src/index.vue +0 -106
  134. package/src/lib/components/loginAbnormalLogList/src/index.vue +0 -43
  135. package/src/lib/components/loginLogList/src/index.vue +0 -51
  136. package/src/lib/components/loginSupplierLogList/src/index.vue +0 -53
  137. package/src/lib/components/operateLogList/src/index.vue +0 -46
  138. package/src/lib/index.ts +0 -15
  139. package/src/lib/utils/constant.ts +0 -1
  140. package/src/lib/utils/global.hook.ts +0 -337
  141. package/src/lib/utils/global.types.ts +0 -49
  142. package/src/lib/utils/regexp.ts +0 -143
  143. package/src/main.ts +0 -11
  144. package/src/vite-env.d.ts +0 -13
  145. package/tsconfig.json +0 -24
  146. package/tsconfig.node.json +0 -9
  147. package/vite.config.ts +0 -61
  148. /package/dist/{index.es.d.ts → index.d.ts} +0 -0
@@ -1,109 +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
- optionConfig: {
36
- attrs: {},
37
- extend: {},
38
- options: [{ authorityCode: 'mq#mqRecord:retry', type: 'delete', title: '重试 ', click: retry, disabled: allowRetryOpt }],
39
- },
40
- buttonConfig: {
41
- attrs: {},
42
- extend: {},
43
- buttons: [
44
- {
45
- label: '列自定义',
46
- icon: {
47
- type: 'icon-Q-setting',
48
- },
49
- type: 'setting',
50
- },
51
- // {label: this.$srmI18n(`${this.$getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns}
52
- ],
53
- },
54
- queryConfig: {
55
- attrs: {},
56
- extend: {},
57
- form: [
58
- {
59
- type: 'select',
60
- label: '消息分组',
61
- dictCode: 'mqGroup',
62
- fieldName: 'msgGroup',
63
- placeholder: '请选择消息分组',
64
- },
65
- {
66
- type: 'select',
67
- label: '消息状态',
68
- dictCode: 'mqStatus',
69
- fieldName: 'msgStatus',
70
- placeholder: '请选择消息状态',
71
- },
72
- ],
73
- },
74
- pagerConfig: {},
75
- })
76
-
77
- //methods
78
- function allowRetryOpt({ row = {} as MapObjectNoneType }) {
79
- if (row.msgStatus !== '1' && row.msgStatus !== '0') {
80
- return false
81
- } else {
82
- return true
83
- }
84
- }
85
-
86
- function retry({ row = {} as MapObjectNoneType }) {
87
- listLayoutRef.value.loading = true
88
- qHttp
89
- .post({
90
- url: apiUrls.value.retry,
91
- data: row,
92
- })
93
- .then((res) => {
94
- if (res.success) {
95
- listLayoutRef.value.fetchListData()
96
- message.success(res.message)
97
- } else {
98
- message.warning(res.message)
99
- }
100
- })
101
- .finally(() => {
102
- listLayoutRef.value.loading = false
103
- })
104
- }
105
- return { showEditPage, apiUrls, pageData, listLayoutRef }
106
- },
107
- })
108
- </script>
109
- <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>
@@ -1,218 +0,0 @@
1
- <template>
2
- <div class="edit-page">
3
- <a-spin :spinning="customLoading">
4
- <q-edit-page-layout ref="layoutRef" v-bind="options" @customSave="handleCustomSave" @validate-success="handleValidateSuccess"></q-edit-page-layout>
5
- </a-spin>
6
- </div>
7
- </template>
8
-
9
- <script setup lang="ts">
10
- import { ref, reactive, inject } from 'vue'
11
- import type { ComponentPublicInstance } from 'vue'
12
- import { BUTTON_ADD_ONE_ROW, BUTTON_DELETE_ROW, BUTTON_SAVE } from '@qqt-product/ui'
13
-
14
- // ui组件库 types
15
- import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
16
- import { usePromiseStepHook, useRefInstanceHook } from '@qqt-product/ui'
17
-
18
- import { VXETable } from 'vxe-table'
19
- const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
20
- if (i18nKey) {
21
- if (account) {
22
- return account + defaultValue
23
- }
24
- return defaultValue
25
- }
26
- return defaultValue
27
- })
28
- // 传参 props
29
- const props = defineProps<{
30
- currentRow: GlobalPageLayoutTypes.CurrentRow | null
31
- userInfo: GlobalPageLayoutTypes.UserInfo
32
- }>()
33
- const currentRow = props.currentRow
34
- ? props.currentRow
35
- : ref({
36
- id: '',
37
- templateNumber: '',
38
- templateVersion: 0,
39
- templateAccount: '',
40
- busAccount: '',
41
- elsAccount: '',
42
- })
43
- // 编辑组件 ref
44
- const layoutRef = ref<ComponentPublicInstance | null>(null)
45
-
46
- // 配置
47
- const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
48
- /**
49
- * 模块业务类型 string
50
- * 取值根据各模块配置
51
- * 当定义为"custom"时,使用本地配置
52
- */
53
- businessType: 'custom',
54
- // 布局模式
55
- pattern: 'vertical',
56
- // 当前已选行数据a
57
- currentRow: currentRow as GlobalPageLayoutTypes.CurrentRow,
58
- refreshMethods(row?: GlobalPageLayoutTypes.CurrentRow) {
59
- if (options.currentRow) {
60
- options.currentRow =
61
- row ||
62
- Object.assign({}, options.currentRow, {
63
- _t: +new Date(),
64
- })
65
- }
66
- },
67
- // 当前登录租户信息
68
- userInfo: props.userInfo,
69
- // 明细接口 -- 接口字符串
70
- detailApi: '/account/permissionGroup/queryById',
71
- // 本地页面数据配置
72
- localConfig: {
73
- groups: [
74
- {
75
- groupName: '基本信息',
76
- groupCode: 'baseForm',
77
- groupType: 'head',
78
- },
79
- {
80
- groupName: srmI18n('i18n_title_permissionConfigLine', '权限配置行'),
81
- groupCode: 'permissionDataList',
82
- groupType: 'item',
83
- buttons: [BUTTON_ADD_ONE_ROW, BUTTON_DELETE_ROW],
84
- },
85
- ],
86
- formFields: [
87
- {
88
- groupCode: 'baseForm',
89
- fieldType: 'input',
90
- fieldLabel: '权限组编码',
91
- fieldLabelI18nKey: 'i18n_field_bWVAo_f564cee2',
92
- fieldName: 'groupCode',
93
- },
94
- {
95
- groupCode: 'baseForm',
96
- fieldType: 'input',
97
- fieldLabel: '权限组名称',
98
- fieldLabelI18nKey: 'i18n_field_bWVRL_f55f9aba',
99
- fieldName: 'groupName',
100
- },
101
- {
102
- groupCode: 'baseForm',
103
- fieldType: 'remoteSelect',
104
- fieldLabel: '敏感字段组',
105
- fieldLabelI18nKey: 'i18n_field_KwJOV_c129a796',
106
- fieldName: 'sensitiveFieldGroups',
107
- extend: {
108
- modalColumns: [{ field: 'fieldGroup_dictText', title: '敏感字段组', with: 150 }],
109
- modalUrl: '/base/sensitiveField/findAllGroup',
110
- selectModel: 'multiple',
111
- },
112
- },
113
- {
114
- groupCode: 'baseForm',
115
- fieldType: 'input',
116
- fieldLabel: '描述',
117
- fieldLabelI18nKey: 'i18n_title_describe',
118
- fieldName: 'description',
119
- },
120
- ],
121
- itemColumns: [
122
- {
123
- groupCode: 'permissionDataList',
124
- title: '业务类型',
125
- fieldLabelI18nKey: 'i18n_field_businessType',
126
- field: 'businessType_dictText',
127
- width: '220',
128
- required: '1',
129
- fieldType: 'remoteSelect',
130
- extend: {
131
- // fieldNames: { label: 'itemText', value: 'itemValue' },
132
- valueKey: 'itemValue',
133
- modalColumns: [{ field: 'itemText', title: '业务类型', with: 150 }],
134
- modalUrl: 'base/companySet/findOpenbusinessType',
135
- selectModel: 'single',
136
- },
137
- callback: (ctx, { value, data, row, pageData, layoutConfig, customFormatItem, setItemRequired, setItemDisabled, setItemRequiredOrDisabled }) => {
138
- if (data && data.length) {
139
- row.businessType = data[0].itemValue
140
- row.businessType_dictText = data[0].itemText
141
- }
142
- },
143
- },
144
- {
145
- groupCode: 'permissionDataList',
146
- title: '权限字段',
147
- fieldLabelI18nKey: 'i18n_field_permissionField',
148
- field: 'permissionField',
149
- width: '220',
150
- required: '1',
151
- fieldType: 'select',
152
- dictCode: 'srmPermissionField',
153
- },
154
- {
155
- groupCode: 'permissionDataList',
156
- title: '字段值',
157
- fieldLabelI18nKey: 'i18n_title_fieldValue',
158
- helpText: "多值精确匹配用英文逗号隔开,示例:1001,1002,1003\n多值模糊匹配用'|'隔开,示例:1001|1002|1003\n单值模糊匹配值后面加'|',示例:1001|\n如果需要匹配所有值则使用关键字 all",
159
- field: 'permissionValue',
160
- width: '150',
161
- //required: '1',
162
- fieldType: 'input',
163
- slots: {},
164
- },
165
- {
166
- groupCode: 'permissionDataList',
167
- title: '操作权限',
168
- fieldLabelI18nKey: 'i18n_field_operation',
169
- field: 'operation',
170
- width: '150',
171
- fieldType: 'switch',
172
- },
173
- {
174
- groupCode: 'permissionDataList',
175
- title: '关联用户组织',
176
- fieldLabelI18nKey: 'i18n_field_RKjDVR_43e9f793',
177
- helpText: srmI18n('i18n_alert_JOMjDRvILjDRKjVRkLbWJOR_2b5db91f', '自动取用户管理下面用户关联的组织作为权限字段值'),
178
- field: 'autoRelation',
179
- width: '150',
180
- fieldType: 'switch',
181
- slots: {},
182
- },
183
- ],
184
- },
185
- // 页面按钮
186
- pageButtons: [
187
- {
188
- ...BUTTON_SAVE,
189
- title: '保存',
190
- emit: true,
191
- emitKey: 'customSave',
192
- args: {
193
- url: '/account/permissionGroup/edit',
194
- },
195
- },
196
- ],
197
- })
198
-
199
- const { pageData, layoutConfig, defaultValues } = useRefInstanceHook(layoutRef)
200
- const { stepTriggerValidate, composeSave, customLoading } = usePromiseStepHook({ pageData, layoutConfig, defaultValues, options })
201
- // 自定义保存
202
- const handleCustomSave = () => {
203
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
204
- const permissionDataList = pageData.value.permissionDataList as any[]
205
- if (permissionDataList.length > 0) {
206
- stepTriggerValidate()
207
- } else {
208
- VXETable.modal.message({ content: srmI18n('i18n_title_permissionConfigLine', '权限配置行'), status: 'error' })
209
- return false
210
- }
211
- }
212
- //
213
- const handleValidateSuccess = (button: GlobalPageLayoutTypes.PageButton) => {
214
- if (button.key === BUTTON_SAVE.key) {
215
- composeSave()
216
- }
217
- }
218
- </script>