@qqt-product/system 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/.eslintignore +4 -0
  2. package/.eslintrc.cjs +22 -0
  3. package/.prettierignore +4 -0
  4. package/.prettierrc.cjs +41 -0
  5. package/.vscode/extensions.json +3 -0
  6. package/README.md +16 -0
  7. package/dist/index.es.d.ts +1 -0
  8. package/dist/index.es.js +14234 -0
  9. package/dist/index.umd.js +311 -0
  10. package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +143 -0
  11. package/dist/lib/components/QAccountList/src/useConfigData.d.ts +37 -0
  12. package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +66 -0
  13. package/dist/lib/components/QBackgroundFileTaskList/src/useConfigData.d.ts +14 -0
  14. package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +80 -0
  15. package/dist/lib/components/QCompanyermissionList/src/types.d.ts +44 -0
  16. package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +68 -0
  17. package/dist/lib/components/QElsEmailSendLogList/src/useConfigData.d.ts +13 -0
  18. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +72 -0
  19. package/dist/lib/components/QElsMsgRecordList/src/useConfigData.d.ts +16 -0
  20. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +75 -0
  21. package/dist/lib/components/QI18nList/src/QI18nForm.vue.d.ts +47 -0
  22. package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +136 -0
  23. package/dist/lib/components/QI18nList/src/useConfigData.d.ts +31 -0
  24. package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +61 -0
  25. package/dist/lib/components/QImChatGroupList/src/useConfigData.d.ts +11 -0
  26. package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +60 -0
  27. package/dist/lib/components/QMqRecordList/src/useConfigData.d.ts +12 -0
  28. package/dist/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue.d.ts +49 -0
  29. package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +3 -0
  30. package/dist/lib/components/QPermissionDataList/src/form.vue.d.ts +50 -0
  31. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +86 -0
  32. package/dist/lib/components/QPurchaseNoticeList/src/useConfigData.d.ts +15 -0
  33. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +47 -0
  34. package/dist/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.d.ts +12 -0
  35. package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +129 -0
  36. package/dist/lib/components/QQuartzJobList/src/components/JCron.vue.d.ts +23 -0
  37. package/dist/lib/components/QQuartzJobList/src/components/JCronModal.vue.d.ts +100 -0
  38. package/dist/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue.d.ts +55 -0
  39. package/dist/lib/components/QQuartzJobList/src/useConfigData.d.ts +20 -0
  40. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +100 -0
  41. package/dist/lib/components/QRoleList/src/components/content-header/index.d.ts +23 -0
  42. package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +79 -0
  43. package/dist/lib/components/QRoleList/src/useConfigData.d.ts +30 -0
  44. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue.d.ts +55 -0
  45. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +104 -0
  46. package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +29 -0
  47. package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +49 -0
  48. package/dist/lib/components/QUsageList/src/useConfigData.d.ts +14 -0
  49. package/dist/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue.d.ts +31 -0
  50. package/dist/lib/components/QcustomConfigEdit/component/dataFormatComponent.d.ts +46 -0
  51. package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +41 -0
  52. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigRender.d.ts +12 -0
  53. package/dist/lib/components/QcustomConfigEdit/src/types.d.ts +61 -0
  54. package/dist/lib/components/QcustomConfigEdit/src/useConfigComputed.d.ts +7 -0
  55. package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +85 -0
  56. package/dist/lib/components/QcustomConfigEdit/src/useConfigMethods.d.ts +16 -0
  57. package/dist/lib/components/QcustomConfigEdit/src/useConstant.d.ts +18 -0
  58. package/dist/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue.d.ts +50 -0
  59. package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +112 -0
  60. package/dist/lib/components/QcustomConfigList/src/useConfigData.d.ts +17 -0
  61. package/dist/lib/components/QcustomConfigList/src/useMethods.d.ts +15 -0
  62. package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +66 -0
  63. package/dist/lib/components/QsysConfigList/src/useConfigData.d.ts +11 -0
  64. package/dist/lib/components/QsysConfigList/src/useMethods.d.ts +6 -0
  65. package/dist/lib/components/index.d.ts +39 -0
  66. package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +107 -0
  67. package/dist/lib/components/integratedReportList/src/index.vue.d.ts +70 -0
  68. package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +61 -0
  69. package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +46 -0
  70. package/dist/lib/components/loginLogList/src/index.vue.d.ts +45 -0
  71. package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +45 -0
  72. package/dist/lib/components/operateLogList/src/index.vue.d.ts +53 -0
  73. package/dist/lib/index.d.ts +6 -0
  74. package/dist/lib/utils/global.hook.d.ts +31 -0
  75. package/dist/lib/utils/global.types.d.ts +41 -0
  76. package/dist/lib/utils/regexp.d.ts +27 -0
  77. package/dist/style.css +1 -0
  78. package/dist/vite-env.d.ts +13 -0
  79. package/dist/vite.svg +1 -0
  80. package/index.html +13 -0
  81. package/package.json +65 -0
  82. package/public/vite.svg +1 -0
  83. package/src/App.vue +8 -0
  84. package/src/lib/components/QAccountList/index.ts +6 -0
  85. package/src/lib/components/QAccountList/src/QAccountDetail.vue +191 -0
  86. package/src/lib/components/QAccountList/src/QAccountEdit.vue +241 -0
  87. package/src/lib/components/QAccountList/src/QAccountList.vue +530 -0
  88. package/src/lib/components/QAccountList/src/useConfigData.ts +53 -0
  89. package/src/lib/components/QBackgroundFileTaskList/index.ts +6 -0
  90. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +137 -0
  91. package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +20 -0
  92. package/src/lib/components/QCompanyermissionList/src/editTree.vue +291 -0
  93. package/src/lib/components/QCompanyermissionList/src/form.vue +238 -0
  94. package/src/lib/components/QCompanyermissionList/src/index.vue +309 -0
  95. package/src/lib/components/QCompanyermissionList/src/types.ts +44 -0
  96. package/src/lib/components/QElsEmailSendLogList/index.ts +6 -0
  97. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +166 -0
  98. package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +19 -0
  99. package/src/lib/components/QElsMsgRecordList/index.ts +6 -0
  100. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +148 -0
  101. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +124 -0
  102. package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +22 -0
  103. package/src/lib/components/QElsTenantPortalNewsList/index.ts +6 -0
  104. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +139 -0
  105. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +196 -0
  106. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +122 -0
  107. package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +20 -0
  108. package/src/lib/components/QI18nList/index.ts +6 -0
  109. package/src/lib/components/QI18nList/src/QI18nForm.vue +141 -0
  110. package/src/lib/components/QI18nList/src/QI18nList.vue +361 -0
  111. package/src/lib/components/QI18nList/src/useConfigData.ts +37 -0
  112. package/src/lib/components/QImChatGroupList/index.ts +6 -0
  113. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +94 -0
  114. package/src/lib/components/QImChatGroupList/src/useConfigData.ts +17 -0
  115. package/src/lib/components/QMqRecordList/index.ts +6 -0
  116. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +105 -0
  117. package/src/lib/components/QMqRecordList/src/useConfigData.ts +18 -0
  118. package/src/lib/components/QPasswordSecurityPolicy/index.ts +6 -0
  119. package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +266 -0
  120. package/src/lib/components/QPermissionDataList/index.ts +6 -0
  121. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -0
  122. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +221 -0
  123. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +117 -0
  124. package/src/lib/components/QPermissionDataList/src/form.vue +109 -0
  125. package/src/lib/components/QPurchaseNoticeList/index.ts +6 -0
  126. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +147 -0
  127. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +244 -0
  128. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +163 -0
  129. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -0
  130. package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +6 -0
  131. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +85 -0
  132. package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +18 -0
  133. package/src/lib/components/QQuartzJobList/index.ts +6 -0
  134. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +263 -0
  135. package/src/lib/components/QQuartzJobList/src/components/JCron.vue +82 -0
  136. package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +985 -0
  137. package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +176 -0
  138. package/src/lib/components/QQuartzJobList/src/useConfigData.ts +26 -0
  139. package/src/lib/components/QRoleList/index.ts +6 -0
  140. package/src/lib/components/QRoleList/src/QRoleList.vue +288 -0
  141. package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +31 -0
  142. package/src/lib/components/QRoleList/src/components/content-header/index.tsx +42 -0
  143. package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +690 -0
  144. package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +97 -0
  145. package/src/lib/components/QRoleList/src/useConfigData.ts +33 -0
  146. package/src/lib/components/QSupplierAccountList/index.ts +6 -0
  147. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +187 -0
  148. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +302 -0
  149. package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +29 -0
  150. package/src/lib/components/QUsageList/index.ts +6 -0
  151. package/src/lib/components/QUsageList/src/QUsageList.vue +82 -0
  152. package/src/lib/components/QUsageList/src/useConfigData.ts +20 -0
  153. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -0
  154. package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +100 -0
  155. package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +100 -0
  156. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +71 -0
  157. package/src/lib/components/QcustomConfigEdit/index.ts +6 -0
  158. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +1807 -0
  159. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +242 -0
  160. package/src/lib/components/QcustomConfigEdit/src/types.ts +71 -0
  161. package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +75 -0
  162. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +123 -0
  163. package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +117 -0
  164. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +301 -0
  165. package/src/lib/components/QcustomConfigEdit/style/index.less +41 -0
  166. package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +135 -0
  167. package/src/lib/components/QcustomConfigList/index.ts +6 -0
  168. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +268 -0
  169. package/src/lib/components/QcustomConfigList/src/types.ts +1 -0
  170. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +23 -0
  171. package/src/lib/components/QcustomConfigList/src/useMethods.ts +36 -0
  172. package/src/lib/components/QcustomConfigList/style/index.less +3 -0
  173. package/src/lib/components/QsysConfigList/index.ts +6 -0
  174. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +125 -0
  175. package/src/lib/components/QsysConfigList/src/types.ts +1 -0
  176. package/src/lib/components/QsysConfigList/src/useConfigData.ts +17 -0
  177. package/src/lib/components/QsysConfigList/src/useMethods.ts +11 -0
  178. package/src/lib/components/QsysConfigList/style/index.less +3 -0
  179. package/src/lib/components/index.ts +78 -0
  180. package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +49 -0
  181. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +143 -0
  182. package/src/lib/components/integratedNodesList/src/index.vue +136 -0
  183. package/src/lib/components/integratedReportList/src/index.vue +86 -0
  184. package/src/lib/components/integratedReportSearchList/src/index.vue +66 -0
  185. package/src/lib/components/loginAbnormalLogList/src/index.vue +50 -0
  186. package/src/lib/components/loginLogList/src/index.vue +57 -0
  187. package/src/lib/components/loginSupplierLogList/src/index.vue +63 -0
  188. package/src/lib/components/operateLogList/src/index.vue +57 -0
  189. package/src/lib/index.ts +15 -0
  190. package/src/lib/utils/constant.ts +1 -0
  191. package/src/lib/utils/global.hook.ts +337 -0
  192. package/src/lib/utils/global.types.ts +49 -0
  193. package/src/lib/utils/regexp.ts +143 -0
  194. package/src/main.ts +11 -0
  195. package/src/vite-env.d.ts +13 -0
  196. package/tsconfig.json +24 -0
  197. package/tsconfig.node.json +9 -0
  198. package/vite.config.ts +61 -0
@@ -0,0 +1,82 @@
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: 'QUsageList',
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: 'role#Role:edit', type: 'edit', title: srmI18n(`${getLangAccount()}#i18n_title_edit`, '编辑'), clickFn: this.edit },
34
+ // { authorityCode: 'role#Role:copy', type: 'copy', title: srmI18n(`${getLangAccount()}#i18n_title_copy`, '复制'), clickFn: this.handleCopy },
35
+ // { authorityCode: 'role#Permissio:saveRolePermission', type: 'view', title: srmI18n(`${getLangAccount()}#i18n_title_impower`, '授权'), clickFn: this.handlePerssion, allow: this.allowDelete },
36
+ // { authorityCode: 'role#Role:delete', type: 'delete', title: srmI18n(`${getLangAccount()}#i18n_title_delete`, '删除'), clickFn: this.handleDelete, allow: this.allowDelete },
37
+ // { authorityCode: 'role#Role:userSet', type: 'usersList', title: srmI18n(`${getLangAccount()}#i18n_btn_jDER_36c46210`, '用户配置'), clickFn: this.handleUsersList },
38
+ ],
39
+ },
40
+ buttonConfig: {
41
+ attrs: {},
42
+ extend: {},
43
+ buttons: [
44
+ // {authorityCode: 'role#Role:add', label: srmI18n(`${getLangAccount()}#i18n_title_add`, '新增'), clickFn: this.add, type: 'primary'},
45
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns},
46
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_helpText`, '帮助说明'), icon: 'file-text', folded: true, isDocument: true, clickFn: this.showHelpText},
47
+ // {label: srmI18n(`${getLangAccount()}#i18n_title_attachment`, '说明附件'), icon: 'file-pdf', folded: true, isDocument: true, clickFn: this.showHelpPDF}
48
+ ],
49
+ },
50
+ queryConfig: {
51
+ attrs: {},
52
+ extend: {},
53
+ form: [
54
+ {
55
+ type: 'input',
56
+ label: '角色名称',
57
+ fieldName: 'roleName',
58
+ placeholder: '请输入角色名称',
59
+ },
60
+ ],
61
+ formState: {},
62
+ },
63
+ pagerConfig: {},
64
+ })
65
+ //data-hook
66
+ const { showEditPage, apiUrls } = useConfigData()
67
+ const { userInfo } = toRefs(props)
68
+ console.log('userInfos', userInfo)
69
+ //methods
70
+ // function allowDelete() {
71
+ // console.log('userInfo.value?.userInfo?.elsAccount', userInfo.value?.userInfo?.elsAccount)
72
+ // if (userInfo.value?.userInfo?.elsAccount != '100000') {
73
+ // return true
74
+ // } else {
75
+ // return false
76
+ // }
77
+ // }
78
+ return { showEditPage, apiUrls, pageData }
79
+ },
80
+ })
81
+ </script>
82
+ <style scoped></style>
@@ -0,0 +1,20 @@
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/role/list',
10
+ columnsCode: 'elsRole',
11
+ delete: '/account/role/delete',
12
+ copy: '/account/role/copy',
13
+ userRoleList: '/account/elsSubAccount/userRoleList',
14
+ })
15
+ const uploadShow = shallowRef<boolean>(false)
16
+ const showEditPage = shallowRef<boolean>(false)
17
+ const currentEditRow = ref({})
18
+ const listLayoutRef = ref()
19
+ return { apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
20
+ }
@@ -0,0 +1,140 @@
1
+ <template>
2
+ <div>
3
+ <vxe-modal title="数据字典" width="760" v-model="visible" :confirmLoading="confirmLoading" type="confirm" show-footer @confirm="selectedOk" @cancel="close">
4
+ <a-radio-group v-model="inputType" button-style="solid" style="margin-bottom: 12px" @change="hanldeRadioChange">
5
+ <a-radio-button value="sysDictCode"> 系统字典 </a-radio-button>
6
+ <a-radio-button value="dictCode"> 企业字典 </a-radio-button>
7
+ <a-radio-button value="manual"> 手动输入 </a-radio-button>
8
+ </a-radio-group>
9
+ <div v-if="inputType === 'manual'">
10
+ <a-input v-model="dataSource" placeholder="请输入数据源地址或字典编码" />
11
+ </div>
12
+ <div v-else>
13
+ <a-spin :spinning="loading">
14
+ <a-input-search placeholder="请输入关键字" style="margin-bottom: 8px" v-model="keyWord" @search="onSearch" enterButton />
15
+ <vxe-grid
16
+ border
17
+ resizable
18
+ show-overflow
19
+ highlight-hover-row
20
+ max-height="320"
21
+ row-id="id"
22
+ size="mini"
23
+ :loading="loading"
24
+ ref="selectGrid"
25
+ :seq-config="{ startIndex: ((tablePage.currentPage as number) - 1) * (tablePage.pageSize as number) }"
26
+ :data="tableData"
27
+ :pager-config="tablePage"
28
+ :radio-config="{ highlight: true, reserve: true, trigger: 'row' }"
29
+ :columns="columns"
30
+ @page-change="handlePageChange"
31
+ >
32
+ </vxe-grid>
33
+ </a-spin>
34
+ </div>
35
+ </vxe-modal>
36
+ </div>
37
+ </template>
38
+ <script lang="ts">
39
+ import { defineComponent } from 'vue'
40
+ import { HttpClient, INJECT_HTTP, MapObjectNoneType } from '../../../utils/global.types'
41
+ import { message } from '@qqt-product/ui'
42
+ import type { VxeGridPropTypes, VxeTableDefines } from 'vxe-table'
43
+ export default defineComponent({
44
+ name: 'AddDictCodeModal',
45
+ inject: [INJECT_HTTP],
46
+ data() {
47
+ return {
48
+ visible: false,
49
+ loading: false,
50
+ confirmLoading: false,
51
+ inputType: 'sysDictCode',
52
+ dataSource: '',
53
+ keyWord: '',
54
+ columns: [
55
+ { type: 'radio', width: 40 },
56
+ { type: 'seq', title: '序号', width: 60 },
57
+ { field: 'dictCode', title: '字典编码' },
58
+ { field: 'dictName', title: '字典名称' },
59
+ { field: 'description', title: '字典描述' },
60
+ ] as VxeTableDefines.ColumnOptions[],
61
+ url: '',
62
+ queryParams: {},
63
+ tableData: [],
64
+ tablePage: {
65
+ total: 0,
66
+ currentPage: 1,
67
+ pageSize: 20,
68
+ align: 'left',
69
+ pageSizes: [20, 50, 100, 200, 500],
70
+ layouts: ['PrevJump', 'PrevPage', 'JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'PageCount', 'Total'],
71
+ perfect: true,
72
+ } as VxeGridPropTypes.PagerConfig,
73
+ }
74
+ },
75
+ methods: {
76
+ hanldeRadioChange(e: MapObjectNoneType) {
77
+ let value = e.target.value || ''
78
+ let arr = ['dictCode', 'sysDictCode']
79
+ if (arr.includes(value)) {
80
+ this.loadData()
81
+ }
82
+ },
83
+ loadData() {
84
+ this.loading = true
85
+ let params = { pageSize: this.tablePage.pageSize, pageNo: this.tablePage.currentPage, keyWord: this.keyWord }
86
+ const url = this.inputType === 'sysDictCode' ? '/base/dict/listSys' : '/base/dict/list'
87
+ let http = this.http as HttpClient
88
+ http
89
+ .get({ url, params })
90
+ .then((res) => {
91
+ if (res.success) {
92
+ let list = res.result.records || []
93
+ this.tableData = list
94
+ this.tablePage.total = res.result.total
95
+ let selectGrid = this.$refs.selectGrid as MapObjectNoneType
96
+ if (this.$refs.selectGrid && selectGrid.clearRadioReserve) {
97
+ selectGrid.clearRadioReserve()
98
+ }
99
+ }
100
+ })
101
+ .finally(() => {
102
+ this.loading = false
103
+ })
104
+ },
105
+ open() {
106
+ // 清空默认值
107
+ this.dataSource = ''
108
+ this.keyWord = ''
109
+ this.loadData()
110
+ this.visible = true
111
+ },
112
+ close() {
113
+ this.visible = false
114
+ },
115
+ selectedOk() {
116
+ let selectedData = {}
117
+ if (this.inputType == 'manual' && this.dataSource) {
118
+ selectedData = { dictCode: this.dataSource }
119
+ } else {
120
+ if (this.$refs.selectGrid) selectedData = (this.$refs.selectGrid as MapObjectNoneType).getRadioRecord()
121
+ }
122
+ if (selectedData) {
123
+ this.visible = false
124
+ this.$emit('ok', selectedData)
125
+ } else {
126
+ message.warning('请选择数据')
127
+ }
128
+ },
129
+ handlePageChange({ currentPage, pageSize }: MapObjectNoneType) {
130
+ this.tablePage.currentPage = currentPage
131
+ this.tablePage.pageSize = pageSize
132
+ this.loadData()
133
+ },
134
+ onSearch(keyWord: string) {
135
+ this.keyWord = keyWord
136
+ this.loadData()
137
+ },
138
+ },
139
+ })
140
+ </script>
@@ -0,0 +1,100 @@
1
+ <template>
2
+ <div>
3
+ <vxe-modal centered title="预览" :width="1000" v-model="visible" class="tempale-preview-modal" show-footer>
4
+ <div>
5
+ <!-- {{ currentEditRow }} -->
6
+ <!-- <a-form layout="inline"> -->
7
+ <!-- <a-form-item>
8
+ <span slot="label">
9
+ {{ $srmI18n(`${$getLangAccount()}#i18n_field_xFCK_2c23c46b`, '布局模式') }}
10
+ <a-tooltip title="暂business模板支持">
11
+ <a-icon type="exclamation-circle" />
12
+ </a-tooltip>
13
+ </span>
14
+ <m-select v-model="modelLayout" dict-code="srmLayout" :placeholder="$srmI18n(`${$getLangAccount()}#i18n_alert_ViFxFVK_737ad3cc`, '请选择布局样式')" />
15
+ </a-form-item> -->
16
+ <!-- </a-form> -->
17
+ <q-edit-page-layout isUseLocalData="true" :localData="currentEditRow" :currentRow="currentEditRow" :businessType="currentEditRow.businessType"> </q-edit-page-layout>
18
+ </div>
19
+ </vxe-modal>
20
+ </div>
21
+ </template>
22
+
23
+ <script lang="ts">
24
+ import { defineComponent } from 'vue'
25
+ // import BusinessLayout from '@comp/template/business/BusinessLayout'
26
+ // import { businessUtilMixin } from '@comp/template/business/businessUtilMixin.js'
27
+ // import fieldSelectModal from '@comp/template/fieldSelectModal'
28
+ export default defineComponent({
29
+ name: 'TempalePreviewModal',
30
+ emits: ['update:openTure'],
31
+ props: {
32
+ currentEditRow: {
33
+ type: Object,
34
+ default() {
35
+ return {}
36
+ },
37
+ },
38
+ openTure: {
39
+ type: Boolean,
40
+ default: false,
41
+ },
42
+ },
43
+ data() {
44
+ return {
45
+ visible: false,
46
+ loading: false,
47
+ remoteJsFilePath: '',
48
+ modelLayout: 'tab',
49
+ // modelLayoutArr: [
50
+ // {
51
+ // key: 'tab',
52
+ // value: this.$srmI18n(`${this.$getLangAccount()}#i18n_dict_WWWxF_69becf2`, 'tab布局'),
53
+ // },
54
+ // {
55
+ // key: 'collapse',
56
+ // value: this.$srmI18n(`${this.$getLangAccount()}#i18n_dict_qNs_1475877`, '可折叠'),
57
+ // },
58
+ // {
59
+ // key: 'unCollapse',
60
+ // value: this.$srmI18n(`${this.$getLangAccount()}#i18n_dict_xqNs_24c2334a`, '不可折叠'),
61
+ // },
62
+ // {
63
+ // key: 'masterSlave',
64
+ // value: this.$srmI18n(`${this.$getLangAccount()}#i18n_menu_dNmK_24c49586`, '主从格式'),
65
+ // },
66
+ // ],
67
+ }
68
+ },
69
+ mixins: [],
70
+ components: {
71
+ // BusinessLayout,
72
+ // fieldSelectModal,
73
+ },
74
+ methods: {
75
+ // close() {
76
+ // this.visible = false
77
+ // },
78
+ // open(data) {
79
+ // this.remoteJsFilePath = data.url
80
+ // this.visible = true
81
+ // },
82
+ },
83
+ watch: {
84
+ openTure(nw) {
85
+ this.visible = nw
86
+ },
87
+ },
88
+ })
89
+ </script>
90
+
91
+ <style lang="less" scoped>
92
+ .tempale-preview-modal {
93
+ :deep(.page-container .edit-page .ant-spin-nested-loading) {
94
+ height: 600px;
95
+ }
96
+ :deep(.ant-form-item-control-wrapper) {
97
+ width: 150px;
98
+ }
99
+ }
100
+ </style>
@@ -0,0 +1,100 @@
1
+ import { defineComponent } from 'vue'
2
+ export default defineComponent({
3
+ name: 'DataFormatComponent',
4
+ emits: ['change'],
5
+ model: {
6
+ prop: 'value',
7
+ event: 'change',
8
+ },
9
+ props: {
10
+ value: {
11
+ type: String || Number,
12
+ default: '',
13
+ },
14
+ configData: {
15
+ type: Object,
16
+ default: () => {
17
+ return {}
18
+ },
19
+ },
20
+ dictCode: {
21
+ type: String,
22
+ default: '',
23
+ },
24
+ },
25
+ data() {
26
+ return {
27
+ dataFormatOptions: ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm', 'YYYY-MM-DD HH:mm:ss'],
28
+ dataFloatOptions: [
29
+ { key: 1, value: '#.0' },
30
+ { key: 2, value: '#.00' },
31
+ { key: 3, value: '#.000' },
32
+ { key: 4, value: '#.0000' },
33
+ { key: 5, value: '#.00000' },
34
+ { key: 6, value: '#.000000' },
35
+ ],
36
+ realVue: '',
37
+ }
38
+ },
39
+ watch: {
40
+ value: {
41
+ immediate: true,
42
+ handler(val) {
43
+ this.realVue = val
44
+ },
45
+ },
46
+ },
47
+ methods: {
48
+ inputChange(e: Event) {
49
+ const val = (e.target as HTMLInputElement).value
50
+ console.log('1231232', val)
51
+ // this.$emit('input', val)
52
+ this.$emit('change', val)
53
+ // this.$emit('update:value', val)
54
+ },
55
+ selectChange(val: string | number) {
56
+ // this.$emit('input', val)
57
+ // this.$emit('change', val)
58
+ this.$emit('change', val)
59
+ },
60
+ floatChange(val: string | number) {
61
+ // this.$emit('input', val)
62
+ // this.$emit('change', val)
63
+ this.$emit('change', val)
64
+ },
65
+ },
66
+ render() {
67
+ const opts = this.dataFormatOptions.map((n) => <a-select-option value={n}>{n}</a-select-option>)
68
+ const floatOpts = this.dataFloatOptions.map((n) => (
69
+ <a-select-option key={n.key} value={n.value}>
70
+ {n.value}
71
+ </a-select-option>
72
+ ))
73
+ const props = {
74
+ allowClear: true,
75
+ }
76
+ let $EL: any
77
+ switch (this.configData.fieldType) {
78
+ case 'date':
79
+ $EL = (
80
+ <a-select style={{ width: '100%' }} vModel={this.realVue} onChange={this.selectChange} {...{ props }}>
81
+ {opts}
82
+ </a-select>
83
+ )
84
+ break
85
+
86
+ case 'float':
87
+ $EL = (
88
+ <a-select style={{ width: '100%' }} vModel={this.realVue} onChange={this.floatChange} {...{ props }}>
89
+ {floatOpts}
90
+ </a-select>
91
+ )
92
+ break
93
+
94
+ default:
95
+ $EL = <a-input vModel={this.realVue} onChange={this.inputChange} />
96
+ break
97
+ }
98
+ return [<div class="data-form-comp">{$EL}</div>]
99
+ },
100
+ })
@@ -0,0 +1,71 @@
1
+ import { defineComponent } from 'vue'
2
+ import { regExpOptions } from '../../../../lib/utils/regexp'
3
+
4
+ interface rexgArryTs {
5
+ label?: string
6
+ value?: string
7
+ msg?: string
8
+ }
9
+
10
+ export default defineComponent({
11
+ name: 'regexComponent',
12
+ emits: ['updateInfo', 'change'],
13
+ model: {
14
+ prop: 'value',
15
+ event: 'change',
16
+ },
17
+ props: {
18
+ value: {
19
+ type: String || Number,
20
+ default: '',
21
+ },
22
+ configData: {
23
+ type: Object,
24
+ default: () => {
25
+ return {}
26
+ },
27
+ },
28
+ dictCode: {
29
+ type: String,
30
+ default: '',
31
+ },
32
+ },
33
+ data() {
34
+ return {
35
+ dataFormatOptions: ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'],
36
+ realVue: '',
37
+ }
38
+ },
39
+ watch: {
40
+ value: {
41
+ immediate: true,
42
+ handler(val) {
43
+ this.realVue = val
44
+ },
45
+ },
46
+ },
47
+ methods: {
48
+ selectChange(val: string | number) {
49
+ if (val) {
50
+ const { msg = '' } = regExpOptions.find((n) => n.value === val) as rexgArryTs
51
+ this.$emit('updateInfo', { msg }) // 正则验证提示语
52
+ this.$emit('change', val)
53
+ } else {
54
+ this.$emit('updateInfo', { msg: '' }) // 正则验证提示语
55
+ this.$emit('change', '')
56
+ }
57
+ },
58
+ },
59
+ render() {
60
+ const opts = regExpOptions.map((n) => <a-select-option value={n.value}>{n.label}</a-select-option>)
61
+ const props = {
62
+ allowClear: true,
63
+ }
64
+ const $EL = (
65
+ <a-select style={{ width: '100%' }} vModel={this.realVue} onChange={this.selectChange} {...{ props }}>
66
+ {opts}
67
+ </a-select>
68
+ )
69
+ return <div class="data-form-comp">{$EL}</div>
70
+ },
71
+ })
@@ -0,0 +1,6 @@
1
+ import QcustomConfigEdit from './src/QcustomConfigEdit.vue'
2
+ import qqtUtils from '@qqt-product/utils'
3
+
4
+ export default qqtUtils.withInstall(QcustomConfigEdit)
5
+
6
+ export { QcustomConfigEdit }