@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.
- package/.eslintignore +4 -0
- package/.eslintrc.cjs +22 -0
- package/.prettierignore +4 -0
- package/.prettierrc.cjs +41 -0
- package/.vscode/extensions.json +3 -0
- package/README.md +16 -0
- package/dist/index.es.d.ts +1 -0
- package/dist/index.es.js +14234 -0
- package/dist/index.umd.js +311 -0
- package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +143 -0
- package/dist/lib/components/QAccountList/src/useConfigData.d.ts +37 -0
- package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +66 -0
- package/dist/lib/components/QBackgroundFileTaskList/src/useConfigData.d.ts +14 -0
- package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +80 -0
- package/dist/lib/components/QCompanyermissionList/src/types.d.ts +44 -0
- package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +68 -0
- package/dist/lib/components/QElsEmailSendLogList/src/useConfigData.d.ts +13 -0
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +72 -0
- package/dist/lib/components/QElsMsgRecordList/src/useConfigData.d.ts +16 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +75 -0
- package/dist/lib/components/QI18nList/src/QI18nForm.vue.d.ts +47 -0
- package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +136 -0
- package/dist/lib/components/QI18nList/src/useConfigData.d.ts +31 -0
- package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +61 -0
- package/dist/lib/components/QImChatGroupList/src/useConfigData.d.ts +11 -0
- package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +60 -0
- package/dist/lib/components/QMqRecordList/src/useConfigData.d.ts +12 -0
- package/dist/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue.d.ts +49 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +3 -0
- package/dist/lib/components/QPermissionDataList/src/form.vue.d.ts +50 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +86 -0
- package/dist/lib/components/QPurchaseNoticeList/src/useConfigData.d.ts +15 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +47 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.d.ts +12 -0
- package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +129 -0
- package/dist/lib/components/QQuartzJobList/src/components/JCron.vue.d.ts +23 -0
- package/dist/lib/components/QQuartzJobList/src/components/JCronModal.vue.d.ts +100 -0
- package/dist/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue.d.ts +55 -0
- package/dist/lib/components/QQuartzJobList/src/useConfigData.d.ts +20 -0
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +100 -0
- package/dist/lib/components/QRoleList/src/components/content-header/index.d.ts +23 -0
- package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +79 -0
- package/dist/lib/components/QRoleList/src/useConfigData.d.ts +30 -0
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue.d.ts +55 -0
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +104 -0
- package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +29 -0
- package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +49 -0
- package/dist/lib/components/QUsageList/src/useConfigData.d.ts +14 -0
- package/dist/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue.d.ts +31 -0
- package/dist/lib/components/QcustomConfigEdit/component/dataFormatComponent.d.ts +46 -0
- package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +41 -0
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigRender.d.ts +12 -0
- package/dist/lib/components/QcustomConfigEdit/src/types.d.ts +61 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigComputed.d.ts +7 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +85 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigMethods.d.ts +16 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConstant.d.ts +18 -0
- package/dist/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue.d.ts +50 -0
- package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +112 -0
- package/dist/lib/components/QcustomConfigList/src/useConfigData.d.ts +17 -0
- package/dist/lib/components/QcustomConfigList/src/useMethods.d.ts +15 -0
- package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +66 -0
- package/dist/lib/components/QsysConfigList/src/useConfigData.d.ts +11 -0
- package/dist/lib/components/QsysConfigList/src/useMethods.d.ts +6 -0
- package/dist/lib/components/index.d.ts +39 -0
- package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +107 -0
- package/dist/lib/components/integratedReportList/src/index.vue.d.ts +70 -0
- package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +61 -0
- package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +46 -0
- package/dist/lib/components/loginLogList/src/index.vue.d.ts +45 -0
- package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +45 -0
- package/dist/lib/components/operateLogList/src/index.vue.d.ts +53 -0
- package/dist/lib/index.d.ts +6 -0
- package/dist/lib/utils/global.hook.d.ts +31 -0
- package/dist/lib/utils/global.types.d.ts +41 -0
- package/dist/lib/utils/regexp.d.ts +27 -0
- package/dist/style.css +1 -0
- package/dist/vite-env.d.ts +13 -0
- package/dist/vite.svg +1 -0
- package/index.html +13 -0
- package/package.json +65 -0
- package/public/vite.svg +1 -0
- package/src/App.vue +8 -0
- package/src/lib/components/QAccountList/index.ts +6 -0
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +191 -0
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +241 -0
- package/src/lib/components/QAccountList/src/QAccountList.vue +530 -0
- package/src/lib/components/QAccountList/src/useConfigData.ts +53 -0
- package/src/lib/components/QBackgroundFileTaskList/index.ts +6 -0
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +137 -0
- package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +20 -0
- package/src/lib/components/QCompanyermissionList/src/editTree.vue +291 -0
- package/src/lib/components/QCompanyermissionList/src/form.vue +238 -0
- package/src/lib/components/QCompanyermissionList/src/index.vue +309 -0
- package/src/lib/components/QCompanyermissionList/src/types.ts +44 -0
- package/src/lib/components/QElsEmailSendLogList/index.ts +6 -0
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +166 -0
- package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +19 -0
- package/src/lib/components/QElsMsgRecordList/index.ts +6 -0
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +148 -0
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +124 -0
- package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +22 -0
- package/src/lib/components/QElsTenantPortalNewsList/index.ts +6 -0
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +139 -0
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +196 -0
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +122 -0
- package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +20 -0
- package/src/lib/components/QI18nList/index.ts +6 -0
- package/src/lib/components/QI18nList/src/QI18nForm.vue +141 -0
- package/src/lib/components/QI18nList/src/QI18nList.vue +361 -0
- package/src/lib/components/QI18nList/src/useConfigData.ts +37 -0
- package/src/lib/components/QImChatGroupList/index.ts +6 -0
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +94 -0
- package/src/lib/components/QImChatGroupList/src/useConfigData.ts +17 -0
- package/src/lib/components/QMqRecordList/index.ts +6 -0
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +105 -0
- package/src/lib/components/QMqRecordList/src/useConfigData.ts +18 -0
- package/src/lib/components/QPasswordSecurityPolicy/index.ts +6 -0
- package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +266 -0
- package/src/lib/components/QPermissionDataList/index.ts +6 -0
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -0
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +221 -0
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +117 -0
- package/src/lib/components/QPermissionDataList/src/form.vue +109 -0
- package/src/lib/components/QPurchaseNoticeList/index.ts +6 -0
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +147 -0
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +244 -0
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +163 -0
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -0
- package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +6 -0
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +85 -0
- package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +18 -0
- package/src/lib/components/QQuartzJobList/index.ts +6 -0
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +263 -0
- package/src/lib/components/QQuartzJobList/src/components/JCron.vue +82 -0
- package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +985 -0
- package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +176 -0
- package/src/lib/components/QQuartzJobList/src/useConfigData.ts +26 -0
- package/src/lib/components/QRoleList/index.ts +6 -0
- package/src/lib/components/QRoleList/src/QRoleList.vue +288 -0
- package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +31 -0
- package/src/lib/components/QRoleList/src/components/content-header/index.tsx +42 -0
- package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +690 -0
- package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +97 -0
- package/src/lib/components/QRoleList/src/useConfigData.ts +33 -0
- package/src/lib/components/QSupplierAccountList/index.ts +6 -0
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +187 -0
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +302 -0
- package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +29 -0
- package/src/lib/components/QUsageList/index.ts +6 -0
- package/src/lib/components/QUsageList/src/QUsageList.vue +82 -0
- package/src/lib/components/QUsageList/src/useConfigData.ts +20 -0
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -0
- package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +100 -0
- package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +100 -0
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +71 -0
- package/src/lib/components/QcustomConfigEdit/index.ts +6 -0
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +1807 -0
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +242 -0
- package/src/lib/components/QcustomConfigEdit/src/types.ts +71 -0
- package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +75 -0
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +123 -0
- package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +117 -0
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +301 -0
- package/src/lib/components/QcustomConfigEdit/style/index.less +41 -0
- package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +135 -0
- package/src/lib/components/QcustomConfigList/index.ts +6 -0
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +268 -0
- package/src/lib/components/QcustomConfigList/src/types.ts +1 -0
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +23 -0
- package/src/lib/components/QcustomConfigList/src/useMethods.ts +36 -0
- package/src/lib/components/QcustomConfigList/style/index.less +3 -0
- package/src/lib/components/QsysConfigList/index.ts +6 -0
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +125 -0
- package/src/lib/components/QsysConfigList/src/types.ts +1 -0
- package/src/lib/components/QsysConfigList/src/useConfigData.ts +17 -0
- package/src/lib/components/QsysConfigList/src/useMethods.ts +11 -0
- package/src/lib/components/QsysConfigList/style/index.less +3 -0
- package/src/lib/components/index.ts +78 -0
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +49 -0
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +143 -0
- package/src/lib/components/integratedNodesList/src/index.vue +136 -0
- package/src/lib/components/integratedReportList/src/index.vue +86 -0
- package/src/lib/components/integratedReportSearchList/src/index.vue +66 -0
- package/src/lib/components/loginAbnormalLogList/src/index.vue +50 -0
- package/src/lib/components/loginLogList/src/index.vue +57 -0
- package/src/lib/components/loginSupplierLogList/src/index.vue +63 -0
- package/src/lib/components/operateLogList/src/index.vue +57 -0
- package/src/lib/index.ts +15 -0
- package/src/lib/utils/constant.ts +1 -0
- package/src/lib/utils/global.hook.ts +337 -0
- package/src/lib/utils/global.types.ts +49 -0
- package/src/lib/utils/regexp.ts +143 -0
- package/src/main.ts +11 -0
- package/src/vite-env.d.ts +13 -0
- package/tsconfig.json +24 -0
- package/tsconfig.node.json +9 -0
- package/vite.config.ts +61 -0
|
@@ -0,0 +1,176 @@
|
|
|
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>
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,288 @@
|
|
|
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>
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
})
|