@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,309 @@
1
+ <template>
2
+ <div class="permission-box">
3
+ <vxe-table
4
+ show-overflow
5
+ keep-source
6
+ ref="xTable"
7
+ height="auto"
8
+ :row-config="{ keyField: 'id' }"
9
+ :edit-config="{ trigger: 'click', mode: 'row', showStatus: true }"
10
+ :column-config="{ resizable: true }"
11
+ :data="permissionList"
12
+ :tree-config="{ transform: true, rowField: 'id', parentField: 'parentId' }"
13
+ :checkbox-config="{ labelField: 'name' }"
14
+ @checkbox-change="selectChangeEvent"
15
+ >
16
+ <vxe-column field="name" title="菜单名称" width="200" fixed="left" tree-node :edit-render="{}">
17
+ <template #edit="{ row }">
18
+ <vxe-input v-model="row.name" type="text"></vxe-input>
19
+ </template>
20
+ </vxe-column>
21
+ <vxe-column field="nameI18nKey" title="菜单名称国际化" width="180" :edit-render="{}">
22
+ <template #edit="{ row }">
23
+ <vxe-input v-model="row.nameI18nKey" type="text"></vxe-input>
24
+ </template>
25
+ </vxe-column>
26
+ <vxe-column field="icon" title="icon" width="80">
27
+ <template #default="{ row }">
28
+ <a-icon :class="`vxe-icon-${row.icon}`" />
29
+ </template>
30
+ </vxe-column>
31
+ <vxe-column field="menuType" title="菜单类型" width="100" :edit-render="{}">
32
+ <template #default="{ row }">
33
+ <span v-if="row.menuType === 0">一级菜单</span>
34
+ <span v-if="row.menuType === 1">子菜单</span>
35
+ <span v-if="row.menuType === 2">按钮/权限</span>
36
+ </template>
37
+ <template #edit="{ row }">
38
+ <vxe-select v-model="row.menuType" placeholder="请选择菜单类型">
39
+ <vxe-option v-for="menu in menuTypes" :key="menu.key" :value="menu.value" :label="menu.label"></vxe-option>
40
+ </vxe-select>
41
+ </template>
42
+ </vxe-column>
43
+ <vxe-column field="menuAttribute" title="菜单属性" width="100" :edit-render="{}">
44
+ <template #default="{ row }">
45
+ <span v-if="row.menuAttribute === '1'">采购</span>
46
+ <span v-if="row.menuAttribute === '2'">销售</span>
47
+ <span v-if="row.menuAttribute === '3'">公共</span>
48
+ <span v-if="row.menuAttribute === '4'">平台</span>
49
+ </template>
50
+ <template #edit="{ row }">
51
+ <vxe-select v-model="row.menuAttribute" placeholder="请选择菜单属性">
52
+ <vxe-option v-for="menuAttr in menuAttributeTypes" :key="menuAttr.key" :value="menuAttr.value" :label="menuAttr.label"></vxe-option>
53
+ </vxe-select>
54
+ </template>
55
+ </vxe-column>
56
+ <vxe-column field="component" title="路由视图" width="120" :edit-render="{}" :title-prefix="componentTypesTip">
57
+ <template #default="{ row }">
58
+ <span v-if="row.component === 'layouts/RouteView'">路由视图</span>
59
+ <span v-else-if="row.component === 'layouts/TabLayout'">Tab路由视图</span>
60
+ <span v-else-if="row.component === 'layouts/IframePageView'">Iframe路由视图</span>
61
+ <span v-else>自定义</span>
62
+ </template>
63
+ <template #edit="{ row }">
64
+ <vxe-select v-model="row.component" placeholder="请选择菜单类型">
65
+ <vxe-option v-for="com in componentTypes" :key="com.key" :value="com.value" :label="com.label"></vxe-option>
66
+ </vxe-select>
67
+ <!-- <vxe-input v-model="row.component" type="text"></vxe-input> -->
68
+ </template>
69
+ </vxe-column>
70
+ <vxe-column field="url" title="访问路径" width="180" :edit-render="{}" :title-prefix="{ content: '页面访问的真实路径' }">
71
+ <template #edit="{ row }">
72
+ <vxe-input v-model="row.url" type="text"></vxe-input>
73
+ </template>
74
+ </vxe-column>
75
+ <vxe-column field="perms" title="授权标识" width="250" :edit-render="{}">
76
+ <template #edit="{ row }">
77
+ <vxe-input v-model="row.perms" type="text"></vxe-input>
78
+ </template>
79
+ </vxe-column>
80
+ <!-- <vxe-column field="sortNo" title="排序"></vxe-column> -->
81
+ <vxe-column field="action" title="操作" width="380" fixed="right">
82
+ <template #default="{ row }">
83
+ <vxe-button v-if="row.menuType !== 2" type="text" status="primary" @click="insertRow(row, 'top')">顶部插入节点</vxe-button>
84
+ <vxe-button v-if="row.menuType !== 2" type="text" status="primary" @click="insertRow(row, 'bottom')">尾部插入节点</vxe-button>
85
+ <!-- <vxe-button v-if="row.menuType === 2" type="text" status="primary" @click="insertRow(row, 'current')">插入节点</vxe-button> -->
86
+ <!-- <vxe-button type="text" status="primary" @click="showDrawer('edit')">顶部插入节点</vxe-button>
87
+ <vxe-button type="text" status="primary" @click="showDrawer('new')">尾部插入节点</vxe-button> -->
88
+ <vxe-button type="text" status="danger" @click="removeRow(row)">删除</vxe-button>
89
+ <vxe-button type="text" status="success" v-if="(row.menuType === 0 && row.children && !row.children.length) || row.menuType === 1">说明</vxe-button>
90
+ </template>
91
+ </vxe-column>
92
+ </vxe-table>
93
+ <a-drawer :width="500" :title="drawerTitle" :placement="drawerPlacement" :visible="drawervisible" @close="closeDrawer">
94
+ <template #extra>
95
+ <a-button style="font-size: 12px; margin-right: 8px" size="small" @click="closeDrawer">取消</a-button>
96
+ <a-button style="font-size: 12px" type="primary" size="small" @click="closeDrawer">确定</a-button>
97
+ </template>
98
+ <permission-form></permission-form>
99
+ </a-drawer>
100
+ </div>
101
+ </template>
102
+ <script lang="ts">
103
+ import { defineComponent, reactive, ref, inject } from 'vue'
104
+ import { PermissionDataType } from './types'
105
+ import { VxeTableInstance, VxeTableEvents } from 'vxe-table'
106
+ // import type { DrawerProps } from 'ant-design-vue'
107
+ import { INJECT_HTTP, HttpClient } from '../../../../../src/lib/utils/global.types'
108
+ import PermissionForm from './form.vue'
109
+ export default defineComponent({
110
+ components: {
111
+ PermissionForm,
112
+ },
113
+ props: {
114
+ gridConfig: {
115
+ type: Object,
116
+ required: true,
117
+ },
118
+ },
119
+ setup(props) {
120
+ const tableOptions = ref(props.gridConfig)
121
+ // 菜单类型
122
+ const menuTypes = ref([
123
+ {
124
+ key: 0,
125
+ value: 0,
126
+ label: '一级菜单',
127
+ },
128
+ {
129
+ key: 1,
130
+ value: 1,
131
+ label: '子菜单',
132
+ },
133
+ {
134
+ key: 2,
135
+ value: 2,
136
+ label: '按钮/权限',
137
+ },
138
+ ])
139
+ // 路由组件类型
140
+ const componentTypes = ref([
141
+ {
142
+ key: 0,
143
+ value: 'qCustom',
144
+ label: '自定义',
145
+ },
146
+ {
147
+ key: 1,
148
+ value: 'layouts/RouteView',
149
+ label: '路由视图',
150
+ },
151
+ {
152
+ key: 2,
153
+ value: 'layouts/TabLayout',
154
+ label: 'Tab路由视图',
155
+ },
156
+ {
157
+ key: 3,
158
+ value: 'layouts/IframePageView',
159
+ label: 'Iframe路由视图',
160
+ },
161
+ {
162
+ key: 4,
163
+ value: 'listEmbedding',
164
+ label: '列表内嵌',
165
+ },
166
+ ])
167
+ const componentTypesTip = ref({
168
+ content: '自定义路由视图使用的是tab路由视图作为父级,并且要以访问路径要一致;列表内嵌属于列表明细页的路由,可任意定义,但是访问路径要比列表的深一级;其它路由视图是继承的关系',
169
+ })
170
+ // 菜单属性类型
171
+ const menuAttributeTypes = ref([
172
+ {
173
+ key: '1',
174
+ value: '1',
175
+ label: '采购',
176
+ },
177
+ {
178
+ key: '2',
179
+ value: '2',
180
+ label: '销售',
181
+ },
182
+ {
183
+ key: '3',
184
+ value: '3',
185
+ label: '公共',
186
+ },
187
+ {
188
+ key: '4',
189
+ value: '4',
190
+ label: '平台',
191
+ },
192
+ ])
193
+ const drawerTitle = ref('新建')
194
+ const drawerPlacement = ref<any['placement']>('right')
195
+ const drawervisible = ref<boolean>(false)
196
+ const showDrawer = (type: string) => {
197
+ drawerTitle.value = type === 'new' ? '新建' : '编辑'
198
+ drawervisible.value = true
199
+ }
200
+ const closeDrawer = () => {
201
+ drawervisible.value = false
202
+ }
203
+ const qHttp = inject(INJECT_HTTP) as HttpClient
204
+ const permissionList = ref<PermissionDataType[]>([])
205
+ const tilePermissionList = (result: PermissionDataType[]) => {
206
+ result.forEach((data) => {
207
+ let menu = Object.assign({}, data)
208
+ menu.children && delete menu.children
209
+ permissionList.value.push(menu)
210
+ if (data.children) {
211
+ tilePermissionList(data.children)
212
+ }
213
+ })
214
+ }
215
+ qHttp.registerModuleAction('PermissionModule/getPermissionList').then((res) => {
216
+ if (res && res.success) {
217
+ tilePermissionList(res.result)
218
+ console.log(permissionList.value)
219
+ }
220
+ })
221
+ const xTable = ref<VxeTableInstance>()
222
+ // const xToolbar = ref<VxeToolbarInstance>()
223
+ const demo2 = reactive({
224
+ tableData: [
225
+ { id: 10000, parentId: null, name: 'test abc1', type: 'mp3', size: 1024, date: '2020-08-01' },
226
+ { id: 10050, parentId: null, name: 'Test2', type: 'mp4', size: null, date: '2021-04-01' },
227
+ { id: 24300, parentId: 10050, name: 'Test3', type: 'avi', size: 1024, date: '2020-03-01' },
228
+ { id: 20045, parentId: 24300, name: 'test abc4', type: 'html', size: 600, date: '2021-04-01' },
229
+ { id: 10053, parentId: 24300, name: 'test abc96', type: 'avi', size: null, date: '2021-04-01' },
230
+ { id: 24330, parentId: 10053, name: 'test abc5', type: 'txt', size: 25, date: '2021-10-01' },
231
+ { id: 21011, parentId: 10053, name: 'Test6', type: 'pdf', size: 512, date: '2020-01-01' },
232
+ { id: 22200, parentId: 10053, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
233
+ { id: 23666, parentId: null, name: 'Test8', type: 'xlsx', size: 2048, date: '2020-11-01' },
234
+ { id: 23677, parentId: 23666, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
235
+ { id: 23671, parentId: 23677, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
236
+ { id: 23672, parentId: 23677, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
237
+ { id: 23688, parentId: 23666, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
238
+ { id: 23681, parentId: 23688, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
239
+ { id: 23682, parentId: 23688, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
240
+ { id: 24555, parentId: null, name: 'test abc9', type: 'avi', size: 224, date: '2020-10-01' },
241
+ { id: 24566, parentId: 24555, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
242
+ { id: 24577, parentId: 24555, name: 'Test7', type: 'js', size: 1024, date: '2021-06-01' },
243
+ ],
244
+ })
245
+
246
+ const selectChangeEvent: VxeTableEvents.CheckboxChange = ({ $table }) => {
247
+ const records = $table.getCheckboxRecords()
248
+ console.info(`勾选${records.length}个树形节点`, records)
249
+ }
250
+ // const http: qqtApi.Request = qqtApi.useHttp()
251
+ // http.registerModuleAction('PermissionModule/getPermissionList').then(() => {
252
+ // console.log(111)
253
+ // })
254
+ // 插入
255
+ const insertRow = async (currentRow: PermissionDataType, locat: string) => {
256
+ const $table = xTable.value
257
+ if ($table) {
258
+ const waitInsertData = {
259
+ id: Date.now(),
260
+ parentId: locat === 'current' ? currentRow.parentId : currentRow.id,
261
+ name: currentRow.name + '子菜单',
262
+ }
263
+ if (locat === 'current') {
264
+ const { row: newRow } = await $table.insertAt(waitInsertData, currentRow)
265
+ await $table.setEditRow(newRow)
266
+ } else if (locat === 'top') {
267
+ const { row: newRow } = await $table.insert(waitInsertData)
268
+ await $table.setTreeExpand(currentRow, true) // 将父节点展开
269
+ await $table.setEditRow(newRow)
270
+ } else if (locat === 'bottom') {
271
+ const { row: newRow } = await $table.insertAt(waitInsertData, -1)
272
+ await $table.setTreeExpand(currentRow, true) // 将父节点展开
273
+ await $table.setEditRow(newRow)
274
+ }
275
+ }
276
+ }
277
+ // 删除
278
+ const removeRow = async (currentRow: PermissionDataType) => {
279
+ if (xTable.value) {
280
+ const $table = xTable.value
281
+ await $table.remove(currentRow)
282
+ }
283
+ }
284
+ return {
285
+ tableOptions,
286
+ menuTypes,
287
+ componentTypes,
288
+ componentTypesTip,
289
+ menuAttributeTypes,
290
+ xTable,
291
+ insertRow,
292
+ removeRow,
293
+ drawerTitle,
294
+ drawerPlacement,
295
+ drawervisible,
296
+ showDrawer,
297
+ closeDrawer,
298
+ permissionList,
299
+ demo2,
300
+ selectChangeEvent,
301
+ }
302
+ },
303
+ })
304
+ </script>
305
+ <style scoped lang="scss">
306
+ .permission-box {
307
+ height: 100%;
308
+ }
309
+ </style>
@@ -0,0 +1,44 @@
1
+ export interface PermissionDataType {
2
+ id?: string
3
+ alwaysShow?: boolean
4
+ children?: PermissionDataType[] | null
5
+ companyMeunId?: string
6
+ component?: string
7
+ createBy?: string
8
+ createTime?: string
9
+ defaultMenu?: string
10
+ deleted?: string | number
11
+ description?: string
12
+ helpDocUrl?: string
13
+ hidden?: boolean
14
+ icon?: string
15
+ iconColor?: string
16
+ internalOrExternal?: boolean
17
+ isLeaf?: boolean
18
+ keepAlive?: boolean
19
+ key?: string
20
+ leaf?: boolean
21
+ menuAttribute?: number | string
22
+ menuType?: string | number
23
+ mobile?: boolean
24
+ name?: string
25
+ nameI18nKey?: string
26
+ parentId?: string
27
+ perms?: string
28
+ permsType?: string | number
29
+ purchasePermissionId?: string | number
30
+ redirect?: string
31
+ route?: boolean
32
+ sortNo?: string | number | null
33
+ status?: string | number
34
+ superQueryFlag?: boolean
35
+ title?: string
36
+ updateBy?: string
37
+ updateTime?: string
38
+ url?: string
39
+ }
40
+ export interface PermissionFormState {
41
+ username: string
42
+ nickname: string
43
+ checkNick: boolean
44
+ }
@@ -0,0 +1,6 @@
1
+ import QElsEmailSendLogList from './src/QElsEmailSendLogList.vue'
2
+ import qqtUtils from '@qqt-product/utils'
3
+
4
+ export default qqtUtils.withInstall(QElsEmailSendLogList)
5
+
6
+ export { QElsEmailSendLogList }
@@ -0,0 +1,166 @@
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
+ import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
13
+
14
+ //组件
15
+ import { Modal, message } from '@qqt-product/ui'
16
+ export default defineComponent({
17
+ name: 'QElsEmailSendLogList',
18
+ props: {
19
+ userInfo: {
20
+ type: Object,
21
+ defalut: () => {
22
+ return {}
23
+ },
24
+ },
25
+ },
26
+ setup() {
27
+ //data-hook
28
+ const { showEditPage, apiUrls, listLayoutRef } = useConfigData()
29
+ const qHttp = inject(INJECT_HTTP) as HttpClient
30
+ //data
31
+ const pageData = reactive({
32
+ statusConfig: {
33
+ show: false,
34
+ },
35
+ optColumn: {
36
+ attrs: {},
37
+ extend: {},
38
+ optColumnList: [
39
+ { type: 'retry', title: '重试', click: retry, disabled: retryShow },
40
+ {
41
+ type: 'delete',
42
+ title: '删除',
43
+ args: {
44
+ url: apiUrls.value.delete,
45
+ },
46
+ },
47
+ ],
48
+ },
49
+ buttonConfig: {
50
+ attrs: {},
51
+ extend: {},
52
+ buttons: [
53
+ // {
54
+ // label: '导入',
55
+ // args: {
56
+ // url: 'material/purchaseMaterialHead/importExcel',
57
+ // excelCode: 'purchaseMaterialExcel',
58
+ // handleBeforeImportExcel(data) {
59
+ // console.log('data :>> ', data)
60
+ // return Promise.resolve({
61
+ // flag: true,
62
+ // params: {},
63
+ // })
64
+ // },
65
+ // },
66
+ // icon: {
67
+ // type: 'icon-Q-import',
68
+ // },
69
+ // type: 'import',
70
+ // },
71
+ // {
72
+ // label: '导出',
73
+ // args: {
74
+ // url: 'price/purchaseInformationRecordsRequest/exportXls',
75
+ // },
76
+ // icon: {
77
+ // type: 'icon-Q-setting',
78
+ // },
79
+ // type: 'export',
80
+ // },
81
+ // {
82
+ // label: '帮助说明',
83
+ // icon: {
84
+ // type: 'icon-Q-help-text',
85
+ // },
86
+ // type: 'help-text',
87
+ // },
88
+ // {
89
+ // label: '附件说明',
90
+ // icon: {
91
+ // type: 'icon-Q-attachment-text',
92
+ // },
93
+ // type: 'attachment-text',
94
+ // },
95
+ // {
96
+ // label: '视频说明',
97
+ // icon: {
98
+ // type: 'icon-Q-video-text',
99
+ // },
100
+ // type: 'video-text',
101
+ // },
102
+ // { type: 'edit', title: this.$srmI18n(`${this.$getLangAccount()}#i18n_menu_sK_1233a8`, '重试'), clickFn: this.retry, allow: this.retryShow },
103
+ // { type: 'delete', title: this.$srmI18n(`${this.$getLangAccount()}#i18n_title_delete`, '删除'), clickFn: this.handleDeleteSingle },
104
+ ],
105
+ },
106
+ queryConfig: {
107
+ attrs: {},
108
+ extend: {},
109
+ form: [
110
+ {
111
+ type: 'input',
112
+ label: '邮件标题',
113
+ fieldName: 'subject',
114
+ placeholder: '请输入邮件标题',
115
+ },
116
+ {
117
+ type: 'input',
118
+ label: '邮件接收人',
119
+ fieldName: 'emailTo',
120
+ placeholder: '请输入邮件接收人',
121
+ },
122
+ ],
123
+ formState: {},
124
+ },
125
+ pagerConfig: {},
126
+ })
127
+
128
+ // const { userInfo } = toRefs(props)
129
+ // console.log('userInfos', userInfo)
130
+ //methods
131
+ function retryShow({ row = {} as MapObjectNoneType }) {
132
+ return row.sendStatus === '1'
133
+ }
134
+
135
+ function retry({ row = {} as MapObjectNoneType }) {
136
+ // let param = { id: row.id }
137
+
138
+ Modal.confirm({
139
+ title: '提示',
140
+ content: '是否重新发送邮件?',
141
+ onOk: function () {
142
+ listLayoutRef.value.loading = true
143
+ qHttp
144
+ .post({
145
+ url: apiUrls.value.retry + '/' + row.id,
146
+ })
147
+ .then((res) => {
148
+ if (res.success) {
149
+ listLayoutRef.value.fetchListData()
150
+ message.success(res.message)
151
+ } else {
152
+ message.warning(res.message)
153
+ }
154
+ })
155
+ .finally(() => {
156
+ listLayoutRef.value.loading = true
157
+ })
158
+ },
159
+ })
160
+ }
161
+
162
+ return { showEditPage, apiUrls, pageData, listLayoutRef }
163
+ },
164
+ })
165
+ </script>
166
+ <style scoped></style>
@@ -0,0 +1,19 @@
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: '/system/elsEmailSendLog/list',
10
+ columnsCode: 'elsEmailSendLog',
11
+ delete: '/system/elsEmailSendLog/delete',
12
+ retry: '/system/elsEmailSendLog/retry',
13
+ })
14
+ const uploadShow = shallowRef<boolean>(false)
15
+ const showEditPage = shallowRef<boolean>(false)
16
+ const currentEditRow = ref({})
17
+ const listLayoutRef = ref()
18
+ return { apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
19
+ }
@@ -0,0 +1,6 @@
1
+ import QElsMsgRecordList from './src/QElsMsgRecordList.vue'
2
+ import qqtUtils from '@qqt-product/utils'
3
+
4
+ export default qqtUtils.withInstall(QElsMsgRecordList)
5
+
6
+ export { QElsMsgRecordList }