@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,176 +0,0 @@
1
- <template>
2
- <a-modal :title="title" :width="800" :visible="visible" :confirm-loading="confirmLoading" @ok="handleOk" @cancel="handleCancel" ok-text="保存并安排任务" cancel-text="关闭">
3
- <a-spin :spinning="confirmLoading">
4
- <a-form ref="Aform" :model="form">
5
- <a-form-item name="jobNameKey" :rules="[{ required: true, message: '请输入任务编码!' }]" :label-col="labelCol" :wrapper-col="wrapperCol" label="任务编码">
6
- <a-input placeholder="请输入任务编码" :disabled="isJobNameKey" v-model:value="form.jobNameKey" />
7
- </a-form-item>
8
- <a-form-item name="jobClassName" :rules="[{ required: true, message: '请输入任务类名!' }]" :label-col="labelCol" :wrapper-col="wrapperCol" label="任务类名" has-feedback>
9
- <a-input placeholder="请输入任务类名" v-model:value="form.jobClassName" />
10
- </a-form-item>
11
- <a-form-item
12
- name="cronExpression"
13
- :rules="[
14
- {
15
- required: true,
16
- message: '请输入cron表达式!',
17
- },
18
- ]"
19
- :label-col="labelCol"
20
- :wrapper-col="wrapperCol"
21
- label="cron表达式"
22
- >
23
- <!-- <a-input placeholder="请输入cron表达式" v-decorator="['cronExpression', {'initialValue':'0/1 * * * * ?',rules: [{ required: true, message: '请输入任务类名!' }]}]" />-->
24
- <!-- <a target="_blank" href="http://cron.qqe2.com/">-->
25
- <!-- <a-icon type="share-alt" />-->
26
- <!-- 在线cron表达式生成-->
27
- <!-- </a>-->
28
- <!-- <j-cron ref="innerVueCron" v-decorator="['cronExpression', {'initialValue':'0/1 * * * * ?',rules: [{ required: true, message: '请输入cron表达式!' }]}]" @change="setCorn"></j-cron>-->
29
- <j-cron ref="innerVueCron" v-model:value="form.cronExpression" @change="setCorn" />
30
- </a-form-item>
31
- <a-form-item name="parameter" :label-col="labelCol" :wrapper-col="wrapperCol" label="参数">
32
- <a-input placeholder="请输入参数" v-model:value="form.parameter" />
33
- </a-form-item>
34
- <a-form-item name="description" :label-col="labelCol" :wrapper-col="wrapperCol" label="描述">
35
- <a-input placeholder="请输入描述" v-model:value="form.description" />
36
- </a-form-item>
37
- <a-form-item :rules="[{ required: true, message: '请选择状态!' }]" name="status" :label-col="labelCol" :wrapper-col="wrapperCol" label="状态">
38
- <a-radio-group button-style="solid" v-model:value="form.status">
39
- <a-radio-button :value="0"> 正常 </a-radio-button>
40
- <a-radio-button :value="-1"> 停止 </a-radio-button>
41
- </a-radio-group>
42
- </a-form-item>
43
- </a-form>
44
- </a-spin>
45
- </a-modal>
46
- </template>
47
-
48
- <script lang="ts">
49
- import { defineComponent, ref, inject, nextTick } from 'vue'
50
- // import { postAction } from '@/api/manage'
51
- import JCron from '../components/JCron.vue'
52
-
53
- import { HttpClient, INJECT_HTTP, MapObjectNoneType } from '../../../../utils/global.types'
54
- import { message } from '@qqt-product/ui'
55
- // import moment from "moment"
56
-
57
- export default defineComponent({
58
- name: 'QuartzJobModal',
59
- emits: ['close', 'ok'],
60
- components: {
61
- JCron,
62
- },
63
- setup() {
64
- const Aform = ref()
65
- const qHttp = inject(INJECT_HTTP) as HttpClient
66
- return { Aform, qHttp }
67
- },
68
- data() {
69
- return {
70
- title: '操作',
71
- visible: false,
72
- isJobNameKey: false,
73
- model: {} as MapObjectNoneType,
74
- labelCol: {
75
- xs: { span: 24 },
76
- sm: { span: 5 },
77
- },
78
- wrapperCol: {
79
- xs: { span: 24 },
80
- sm: { span: 16 },
81
- },
82
- cron: {
83
- label: '',
84
- value: '',
85
- },
86
- confirmLoading: false,
87
- form: {
88
- jobNameKey: '',
89
- jobClassName: '',
90
- cronExpression: '* * * * * ? *',
91
- parameter: undefined,
92
- description: '',
93
- status: undefined,
94
- },
95
-
96
- url: {
97
- add: '/job/quartzJob/add',
98
- edit: '/job/quartzJob/edit',
99
- },
100
- }
101
- },
102
- methods: {
103
- add() {
104
- this.edit({})
105
- },
106
- edit(record: MapObjectNoneType) {
107
- this.visible = true
108
- // let _that = this
109
- nextTick(() => {
110
- this.Aform.resetFields()
111
- this.model = Object.assign({}, record)
112
- if (this.model.id) {
113
- this.isJobNameKey = true
114
- }
115
- nextTick(() => {
116
- console.log('this.Aform', this.Aform)
117
- this.form = { ...this.form, ...this.model }
118
- })
119
- })
120
- },
121
- close() {
122
- this.$emit('close')
123
- this.visible = false
124
- },
125
- handleOk() {
126
- // const that = this
127
- // 触发表单验证
128
- console.log('this.Aform', this.Aform)
129
- this.Aform.validate().then(() => {
130
- this.confirmLoading = true
131
- let httpurl = ''
132
- if (!this.model.id) {
133
- httpurl += this.url.add
134
- } else {
135
- httpurl += this.url.edit
136
- }
137
- let formData: MapObjectNoneType = this.form
138
- //时间格式化
139
- this.qHttp
140
- .post({
141
- url: httpurl,
142
- data: formData,
143
- })
144
- .then((res: MapObjectNoneType) => {
145
- if (res.success) {
146
- message.success(res.message)
147
- this.$emit('ok')
148
- } else {
149
- message.warning(res.message)
150
- }
151
- })
152
- .finally(() => {
153
- this.confirmLoading = false
154
- this.close()
155
- })
156
- })
157
- },
158
- handleCancel() {
159
- this.close()
160
- },
161
- setCorn(data: string) {
162
- console.log('data)', data)
163
- this.$nextTick(() => {
164
- this.form.cronExpression = data
165
- })
166
-
167
- // console.log(Object.keys(data).length==0);
168
- if (Object.keys(data).length == 0) {
169
- message.warning('请输入cron表达式!')
170
- }
171
- },
172
- },
173
- })
174
- </script>
175
-
176
- <style scoped></style>
@@ -1,26 +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: '/job/quartzJob/list',
11
- delete: '/job/quartzJob/delete',
12
- deleteBatch: '/job/quartzJob/deleteBatch',
13
- pause: '/job/quartzJob/pause',
14
- manualExecute: '/job/quartzJob/manualExecute',
15
- resume: '/job/quartzJob/resume',
16
- exportXlsUrl: 'job/quartzJob/exportXls',
17
- importExcelUrl: 'job/quartzJob/importExcel',
18
- columnsCode: 'ElsQuartzJob',
19
- })
20
- const uploadShow = shallowRef<boolean>(false)
21
- const showEditPage = shallowRef<boolean>(false)
22
- const currentEditRow = ref<MapObjectNoneType>({})
23
- const listLayoutRef = ref()
24
- const editPage = ref()
25
- return { editPage, apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
26
- }
@@ -1,6 +0,0 @@
1
- import QRoleList from './src/QRoleList.vue'
2
- import qqtUtils from '@qqt-product/utils'
3
-
4
- export default qqtUtils.withInstall(QRoleList)
5
-
6
- export { QRoleList }
@@ -1,288 +0,0 @@
1
- <template>
2
- <div style="height: 100%">
3
- <q-list-layout ref="listLayoutRef" v-if="!showAuth && !showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
4
-
5
- <!--复制功能-->
6
- <vxe-modal v-model="copyRoleShow" title="复制角色" type="confirm" :showFooter="false">
7
- <vxe-form title-colon title-align="right" title-width="160" :data="copyRoleFrom" :rules="userInformsFromRules" @submit="copyRolesubmitEvent">
8
- <vxe-form-gather span="24">
9
- <vxe-form-item title="角色名称" field="roleName" span="24">
10
- <template #default="{ data }">
11
- <vxe-input v-model="data.roleName" type="text" placeholder="请输入角色名称"></vxe-input>
12
- </template>
13
- </vxe-form-item>
14
- <vxe-form-item title="角色编码" field="roleCode" span="24">
15
- <template #default="{ data }">
16
- <vxe-input v-model="data.roleCode" type="text" placeholder="请输入角色编码"></vxe-input>
17
- </template>
18
- </vxe-form-item>
19
-
20
- <vxe-form-item align="center" span="24">
21
- <template #default>
22
- <vxe-button content="取消" @click="copyRoleShow = false"></vxe-button>
23
- <vxe-button type="submit" status="primary" content="保存"></vxe-button>
24
- </template>
25
- </vxe-form-item>
26
- </vxe-form-gather>
27
- </vxe-form>
28
- </vxe-modal>
29
-
30
- <!--新增-->
31
-
32
- <vxe-modal v-model="userInformsFromShow" title="基本信息" type="confirm" :showFooter="false">
33
- <vxe-form title-colon title-align="right" title-width="160" :rules="userInformsFromRules" :data="userInformsFrom" @submit="userInformFormEvent">
34
- <vxe-form-gather span="24">
35
- <vxe-form-item title="角色名称" field="roleName" span="24">
36
- <template #default="{ data }">
37
- <vxe-input v-model="data.roleName" type="text" placeholder="请输入角色名称"></vxe-input>
38
- </template>
39
- </vxe-form-item>
40
- <vxe-form-item title="角色编码" field="roleCode" span="24">
41
- <template #default="{ data }">
42
- <vxe-input :disabled="!!userInformsFrom.id" v-model="data.roleCode" type="text" placeholder="请输入角色编码"></vxe-input>
43
- </template>
44
- </vxe-form-item>
45
-
46
- <vxe-form-item title="描述" field="description" span="24">
47
- <template #default="{ data }">
48
- <vxe-textarea :autosize="{ minRows: 6, maxRows: 10 }" v-model="data.description" type="text" placeholder="请输入描述"></vxe-textarea>
49
- </template>
50
- </vxe-form-item>
51
-
52
- <vxe-form-item span="24">
53
- <template #default>
54
- <vxe-button
55
- content="取消"
56
- @click="
57
- () => {
58
- userInformsFromShow = false
59
- userInformsFrom = {}
60
- }
61
- "
62
- ></vxe-button>
63
- <vxe-button type="submit" status="primary" content="保存"></vxe-button>
64
- </template>
65
- </vxe-form-item>
66
- </vxe-form-gather>
67
- </vxe-form>
68
- </vxe-modal>
69
-
70
- <!-- 租户授权 -->
71
- <user-authorization v-if="showAuth" parentPath="RoleList" :rows="currentRows" @authCancel="handleAuthCancel"></user-authorization>
72
- </div>
73
- </template>
74
-
75
- <script lang="ts">
76
- //JS
77
- import { ref, defineComponent, reactive, nextTick, inject } from 'vue'
78
- //hook
79
- import { useConfigData } from './useConfigData'
80
- import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
81
- import { message } from '@qqt-product/ui'
82
-
83
- import UserAuthorization from './components/userAuthorization'
84
-
85
- export default defineComponent({
86
- name: 'QRoleList',
87
- props: {
88
- userInfo: {
89
- type: Object,
90
- defalut: () => {
91
- return {}
92
- },
93
- },
94
- },
95
- components: {
96
- UserAuthorization,
97
- },
98
- setup() {
99
- //data-hook
100
- const { userInformsFromRules, userInformsFromShow, userInformsFrom, showEditPage, apiUrls, copyRoleShow, copyRoleFrom, itemRow, listLayoutRef } = useConfigData()
101
- // const { userInfo } = toRefs(props)
102
- const qHttp = inject(INJECT_HTTP) as HttpClient
103
-
104
- const showAuth = ref(false)
105
- const currentRows = ref([])
106
-
107
- const handleAuth = ({ row }: { row: never }) => {
108
- showAuth.value = true
109
- if (Array.isArray(row)) {
110
- currentRows.value = [...row] as never
111
- } else {
112
- currentRows.value.push(row as never)
113
- }
114
- }
115
-
116
- const handleAuthCancel = () => {
117
- showAuth.value = false
118
- currentRows.value = []
119
- }
120
-
121
- //data
122
- const pageData = reactive({
123
- statusConfig: {
124
- show: false,
125
- },
126
- optColumn: {
127
- attrs: {},
128
- extend: {},
129
- optColumnList: [
130
- { authorityCode: 'role#Role:edit', type: 'edit', title: '编辑', click: handleEdit },
131
- { authorityCode: 'role#Role:copy', type: 'copy', title: '复制', click: handleCopy },
132
- {
133
- type: 'authorization',
134
- title: '授权',
135
- click: handleAuth,
136
- authorityCode: 'role#Permissio:saveRolePermission',
137
- },
138
- {
139
- authorityCode: 'role#Role:delete',
140
- type: 'delete',
141
- title: '删除',
142
- args: {
143
- url: apiUrls.value.delete,
144
- },
145
- disabled: allowDelete,
146
- },
147
- // { authorityCode: 'role#Role:userSet', type: 'usersList', title: srmI18n(`${getLangAccount()}#i18n_btn_jDER_36c46210`, '用户配置'), clickFn: this.handleUsersList },
148
- ],
149
- },
150
- buttonConfig: {
151
- attrs: {},
152
- extend: {},
153
- buttons: [
154
- {
155
- authorityCode: 'role#Role:add',
156
- label: '新增',
157
- icon: {
158
- type: 'icon-Q-add',
159
- },
160
- attrs: {
161
- type: 'primary',
162
- },
163
- click: handleAdd,
164
- },
165
- // {label: srmI18n(`${getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns},
166
- // {label: srmI18n(`${getLangAccount()}#i18n_title_helpText`, '帮助说明'), icon: 'file-text', folded: true, isDocument: true, clickFn: this.showHelpText},
167
- // {label: srmI18n(`${getLangAccount()}#i18n_title_attachment`, '说明附件'), icon: 'file-pdf', folded: true, isDocument: true, clickFn: this.showHelpPDF}
168
- ],
169
- },
170
- queryConfig: {
171
- attrs: {},
172
- extend: {},
173
- form: [
174
- {
175
- type: 'input',
176
- label: '角色名称',
177
- fieldName: 'roleName',
178
- placeholder: '请输入角色名称',
179
- },
180
- ],
181
- formState: {},
182
- },
183
- pagerConfig: {},
184
- })
185
-
186
- //method
187
- function handleCopy({ row = {} as MapObjectNoneType }) {
188
- itemRow.value = row
189
- nextTick(() => {
190
- copyRoleShow.value = true
191
- })
192
- }
193
-
194
- function allowDelete({ row = {} as MapObjectNoneType }) {
195
- if (row.roleCode == 'companyAdmin' || row.roleCode == 'admin') {
196
- return true
197
- } else {
198
- return false
199
- }
200
- }
201
-
202
- function copyRolesubmitEvent() {
203
- if (copyRoleFrom.value.roleName == '') {
204
- message.warning('请输入角色名称')
205
- return
206
- }
207
- if (copyRoleFrom.value.roleCode == '') {
208
- message.warning('请输入角色编码')
209
- return
210
- }
211
-
212
- let data = { id: itemRow.value.id, roleName: copyRoleFrom.value.roleName, roleCode: copyRoleFrom.value.roleCode }
213
- listLayoutRef.value.loading = true
214
- qHttp
215
- .post({
216
- url: apiUrls.value.copy,
217
- data,
218
- })
219
- .then((res) => {
220
- listLayoutRef.value.loading = false
221
- if (res.success) {
222
- listLayoutRef.value.fetchListData()
223
- message.success(res.message)
224
- } else {
225
- message.warning(res.message)
226
- }
227
- })
228
- .finally(() => {
229
- itemRow.value = {}
230
- copyRoleFrom.value = {}
231
- copyRoleShow.value = false
232
- })
233
- }
234
-
235
- function handleAdd() {
236
- nextTick(() => {
237
- userInformsFromShow.value = true
238
- })
239
- }
240
- function handleEdit({ row = {} as MapObjectNoneType }) {
241
- userInformsFrom.value = { ...row }
242
- nextTick(() => {
243
- userInformsFromShow.value = true
244
- })
245
- }
246
- function userInformFormEvent() {
247
- let url = userInformsFrom.value.id ? '/account/role/edit' : '/account/role/add'
248
- qHttp
249
- .post({
250
- url,
251
- data: {
252
- ...userInformsFrom.value,
253
- },
254
- })
255
- .then((res) => {
256
- listLayoutRef.value.loading = false
257
- if (res.success) {
258
- listLayoutRef.value.fetchListData()
259
- message.success(res.message)
260
- } else {
261
- message.warning(res.message)
262
- }
263
- })
264
- .finally(() => {
265
- userInformsFrom.value = {}
266
- userInformsFromShow.value = false
267
- })
268
- }
269
-
270
- return {
271
- userInformsFromRules,
272
- userInformFormEvent,
273
- userInformsFromShow,
274
- userInformsFrom,
275
- listLayoutRef,
276
- copyRolesubmitEvent,
277
- copyRoleFrom,
278
- showEditPage,
279
- apiUrls,
280
- pageData,
281
- copyRoleShow,
282
- showAuth,
283
- currentRows,
284
- handleAuthCancel,
285
- }
286
- },
287
- })
288
- </script>
@@ -1,31 +0,0 @@
1
- .content-Header {
2
- width: 100%;
3
- position: sticky;
4
- top: 0;
5
- z-index: 99;
6
- box-shadow: 0 3px 12px rgba(98, 107, 181, .25);
7
- &.posA {
8
- position: absolute;
9
- left: 0;
10
- top: 0;
11
- }
12
- .topWrap {
13
- display: flex;
14
- justify-content: space-between;
15
- align-items: center;
16
- background: #fff;
17
- padding: 10px 24px 10px 10px;
18
- .box {
19
- display: flex;
20
- align-items: center;
21
- }
22
- .extra {
23
- & +.menu {
24
- margin-left: 24px;
25
- }
26
- }
27
- .menu {
28
- text-align: right;
29
- }
30
- }
31
- }
@@ -1,42 +0,0 @@
1
- import { defineComponent, PropType, ExtractPropTypes } from 'vue'
2
- import './contentHeader.less'
3
-
4
- import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
5
-
6
- const headerProps = {
7
- buttons: {
8
- type: Array as PropType<GlobalPageLayoutTypes.PageButton[]>,
9
- default() {
10
- return []
11
- },
12
- },
13
- }
14
-
15
- export type HeaderProps = ExtractPropTypes<typeof headerProps>
16
-
17
- export default defineComponent({
18
- name: 'QContentHeader',
19
- props: headerProps,
20
- setup(prop: HeaderProps, ctx) {
21
- const btnProps = {
22
- buttons: prop.buttons,
23
- ...ctx.attrs,
24
- }
25
- return () => {
26
- return (
27
- <div class="content-Header">
28
- <div class="topWrap">
29
- <div class="breadcrumb">
30
- <q-breadcrumb></q-breadcrumb>
31
- </div>
32
- <div class="box">
33
- <div class="menu">
34
- <q-layout-buttons {...btnProps}></q-layout-buttons>
35
- </div>
36
- </div>
37
- </div>
38
- </div>
39
- )
40
- }
41
- },
42
- })