@qqt-product/system 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +9595 -9168
- package/dist/index.umd.js +34 -35
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +15 -12
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +13 -10
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +16 -12
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +12 -9
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +12 -9
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +15 -12
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +9 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +387 -3
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +15 -12
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +12 -9
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +17 -14
- package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +1 -1
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +2 -1
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +9 -0
- package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +4 -4
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +19 -2
- package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +9 -0
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +0 -1
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +12 -9
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +15 -12
- package/dist/style.css +1 -1
- package/package.json +20 -9
- package/.eslintignore +0 -4
- package/.eslintrc.cjs +0 -22
- package/.prettierignore +0 -4
- package/.prettierrc.cjs +0 -41
- package/.vscode/extensions.json +0 -3
- package/dist/vite.svg +0 -1
- package/index.html +0 -13
- package/public/vite.svg +0 -1
- package/src/App.vue +0 -8
- package/src/lib/components/QAccountList/index.ts +0 -6
- package/src/lib/components/QAccountList/src/QAccountCreate.vue +0 -272
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +0 -259
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +0 -273
- package/src/lib/components/QAccountList/src/QAccountList.vue +0 -532
- package/src/lib/components/QAccountList/src/useConfigData.ts +0 -53
- package/src/lib/components/QBackgroundFileTaskList/index.ts +0 -6
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +0 -143
- package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +0 -20
- package/src/lib/components/QElsEmailSendLogList/index.ts +0 -6
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +0 -172
- package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +0 -19
- package/src/lib/components/QElsMsgRecordList/index.ts +0 -6
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +0 -148
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +0 -123
- package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +0 -22
- package/src/lib/components/QElsTenantPortalNewsList/index.ts +0 -6
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +0 -139
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +0 -244
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +0 -151
- package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +0 -20
- package/src/lib/components/QI18nList/index.ts +0 -6
- package/src/lib/components/QI18nList/src/QI18nForm.vue +0 -141
- package/src/lib/components/QI18nList/src/QI18nList.vue +0 -365
- package/src/lib/components/QI18nList/src/useConfigData.ts +0 -37
- package/src/lib/components/QImChatGroupList/index.ts +0 -6
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +0 -103
- package/src/lib/components/QImChatGroupList/src/useConfigData.ts +0 -17
- package/src/lib/components/QMqRecordList/index.ts +0 -6
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +0 -109
- package/src/lib/components/QMqRecordList/src/useConfigData.ts +0 -18
- package/src/lib/components/QPasswordSecurityPolicy/index.ts +0 -6
- package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +0 -266
- package/src/lib/components/QPermissionDataList/index.ts +0 -6
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +0 -3
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +0 -218
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +0 -110
- package/src/lib/components/QPermissionDataList/src/form.vue +0 -109
- package/src/lib/components/QPurchaseNoticeList/index.ts +0 -6
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +0 -147
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +0 -332
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +0 -189
- package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +0 -84
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +0 -22
- package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +0 -6
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +0 -134
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +0 -91
- package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +0 -18
- package/src/lib/components/QQuartzJobList/index.ts +0 -6
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +0 -276
- package/src/lib/components/QQuartzJobList/src/components/JCron.vue +0 -82
- package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +0 -985
- package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +0 -176
- package/src/lib/components/QQuartzJobList/src/useConfigData.ts +0 -26
- package/src/lib/components/QRoleList/index.ts +0 -6
- package/src/lib/components/QRoleList/src/QRoleList.vue +0 -332
- package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +0 -31
- package/src/lib/components/QRoleList/src/components/content-header/index.tsx +0 -42
- package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +0 -690
- package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +0 -97
- package/src/lib/components/QRoleList/src/useConfigData.ts +0 -28
- package/src/lib/components/QSupplierAccountList/index.ts +0 -6
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +0 -187
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +0 -304
- package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +0 -29
- package/src/lib/components/QUsageList/index.ts +0 -6
- package/src/lib/components/QUsageList/src/QUsageList.vue +0 -287
- package/src/lib/components/QUsageList/src/useConfigData.ts +0 -154
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +0 -140
- package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +0 -100
- package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +0 -100
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +0 -71
- package/src/lib/components/QcustomConfigEdit/index.ts +0 -6
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +0 -1895
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +0 -242
- package/src/lib/components/QcustomConfigEdit/src/types.ts +0 -71
- package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +0 -75
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +0 -123
- package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +0 -117
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +0 -301
- package/src/lib/components/QcustomConfigEdit/style/index.less +0 -41
- package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +0 -135
- package/src/lib/components/QcustomConfigList/index.ts +0 -6
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +0 -276
- package/src/lib/components/QcustomConfigList/src/types.ts +0 -1
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +0 -23
- package/src/lib/components/QcustomConfigList/src/useMethods.ts +0 -36
- package/src/lib/components/QcustomConfigList/style/index.less +0 -3
- package/src/lib/components/QsysConfigList/index.ts +0 -6
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +0 -124
- package/src/lib/components/QsysConfigList/src/types.ts +0 -1
- package/src/lib/components/QsysConfigList/src/useConfigData.ts +0 -17
- package/src/lib/components/QsysConfigList/src/useMethods.ts +0 -11
- package/src/lib/components/QsysConfigList/style/index.less +0 -3
- package/src/lib/components/index.ts +0 -78
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +0 -49
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +0 -135
- package/src/lib/components/integratedNodesList/src/index.vue +0 -130
- package/src/lib/components/integratedReportList/src/index.vue +0 -111
- package/src/lib/components/integratedReportSearchList/src/index.vue +0 -106
- package/src/lib/components/loginAbnormalLogList/src/index.vue +0 -43
- package/src/lib/components/loginLogList/src/index.vue +0 -51
- package/src/lib/components/loginSupplierLogList/src/index.vue +0 -53
- package/src/lib/components/operateLogList/src/index.vue +0 -46
- package/src/lib/index.ts +0 -15
- package/src/lib/utils/constant.ts +0 -1
- package/src/lib/utils/global.hook.ts +0 -337
- package/src/lib/utils/global.types.ts +0 -49
- package/src/lib/utils/regexp.ts +0 -143
- package/src/main.ts +0 -11
- package/src/vite-env.d.ts +0 -13
- package/tsconfig.json +0 -24
- package/tsconfig.node.json +0 -9
- package/vite.config.ts +0 -61
- /package/dist/{index.es.d.ts → index.d.ts} +0 -0
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="height: 100%">
|
|
3
|
-
<q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
|
|
4
|
-
<q-purchase-notice-template-modal v-if="visible" v-model="visible" @fetch-list-data="fetchListData" :currentRow="noticeTemplateRow"></q-purchase-notice-template-modal>
|
|
5
|
-
<a-modal :width="900" v-model:visible="viewTemplateVisible" :title="viewTemplateModalTitle" @cancel="handleViewCancel" @ok="handleViewCancel">
|
|
6
|
-
<a-form>
|
|
7
|
-
<a-form-item :label="srmI18n('i18n_title_templateName', '模板名称')">
|
|
8
|
-
<a-input :placeholder="srmI18n('i18n_title_enterATemplateName', '请输入模板名称')" v-model:value="viewTemplateRow.templateName" style="width: 400px" />
|
|
9
|
-
</a-form-item>
|
|
10
|
-
<a-form-item :label="srmI18n('i18n_title_templateContent', '模板内容')">
|
|
11
|
-
<span v-html="viewTemplateRow.templateContent"></span>
|
|
12
|
-
</a-form-item>
|
|
13
|
-
</a-form>
|
|
14
|
-
</a-modal>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script lang="ts" setup>
|
|
19
|
-
//JS
|
|
20
|
-
import type { GlobalListPageLayoutTypes } from '@qqt-product/ui'
|
|
21
|
-
import { reactive, toRefs, inject, ref } from 'vue'
|
|
22
|
-
//hook
|
|
23
|
-
import QPurchaseNoticeTemplateModal from './QPurchaseNoticeTemplateModal.vue'
|
|
24
|
-
import { useConfigData } from './useConfigData'
|
|
25
|
-
|
|
26
|
-
const props = defineProps<{
|
|
27
|
-
userInfo: GlobalListPageLayoutTypes.UserInfo
|
|
28
|
-
}>()
|
|
29
|
-
|
|
30
|
-
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
31
|
-
if (i18nKey) {
|
|
32
|
-
if (account) {
|
|
33
|
-
return account + defaultValue
|
|
34
|
-
}
|
|
35
|
-
return defaultValue
|
|
36
|
-
}
|
|
37
|
-
return defaultValue
|
|
38
|
-
})
|
|
39
|
-
const listLayoutRef = ref()
|
|
40
|
-
const fetchListData = () => {
|
|
41
|
-
listLayoutRef.value.fetchListData()
|
|
42
|
-
visible.value = false
|
|
43
|
-
}
|
|
44
|
-
//data
|
|
45
|
-
const visible = ref<boolean>(false)
|
|
46
|
-
const viewTemplateVisible = ref(false)
|
|
47
|
-
const viewTemplateModalTitle = ref(srmI18n('i18n_title_see', '查看'))
|
|
48
|
-
const handleViewCancel = () => {
|
|
49
|
-
viewTemplateVisible.value = false
|
|
50
|
-
}
|
|
51
|
-
const viewTemplateRow = ref<GlobalListPageLayoutTypes.CurrentRow | { templateName: string; templateContent: string }>({
|
|
52
|
-
templateName: '',
|
|
53
|
-
templateContent: '',
|
|
54
|
-
id: '',
|
|
55
|
-
})
|
|
56
|
-
const noticeTemplateRow = ref({})
|
|
57
|
-
// 编辑
|
|
58
|
-
const handleEdit = (payload: GlobalListPageLayoutTypes.ListOptionsEventParams) => {
|
|
59
|
-
noticeTemplateRow.value = Object.assign({}, payload.row)
|
|
60
|
-
visible.value = true
|
|
61
|
-
}
|
|
62
|
-
// 查看
|
|
63
|
-
const handleView = (payload: GlobalListPageLayoutTypes.ListOptionsEventParams) => {
|
|
64
|
-
viewTemplateRow.value = Object.assign({}, payload.row)
|
|
65
|
-
viewTemplateVisible.value = true
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const pageData = reactive<GlobalListPageLayoutTypes.PageData>({
|
|
69
|
-
statusConfig: {
|
|
70
|
-
show: false,
|
|
71
|
-
},
|
|
72
|
-
optionConfig: {
|
|
73
|
-
attrs: {},
|
|
74
|
-
extend: {},
|
|
75
|
-
options: [
|
|
76
|
-
{ authorityCode: 'purchaseNoticeTemplate#PurchaseNoticeTemplate:edit', type: 'edit', title: srmI18n('i18n_title_edit', '编辑'), click: handleEdit },
|
|
77
|
-
{ authorityCode: 'purchaseNoticeTemplate#PurchaseNoticeTemplate:view', type: 'view', title: srmI18n('i18n_title_see', '查看'), click: handleView },
|
|
78
|
-
{
|
|
79
|
-
authorityCode: 'purchaseNoticeTemplate#PurchaseNoticeTemplate:delete',
|
|
80
|
-
type: 'delete',
|
|
81
|
-
title: srmI18n('i18n_title_delete', '删除'),
|
|
82
|
-
args: {
|
|
83
|
-
url: '/notice/purchaseNoticeTemplate/delete',
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
},
|
|
88
|
-
buttonConfig: {
|
|
89
|
-
attrs: {},
|
|
90
|
-
extend: {},
|
|
91
|
-
buttons: [
|
|
92
|
-
{
|
|
93
|
-
authorityCode: 'purchaseNoticeTemplate#PurchaseNoticeTemplate:add',
|
|
94
|
-
label: srmI18n('i18n_title_add', '新增'),
|
|
95
|
-
icon: {
|
|
96
|
-
type: 'icon-Q-add',
|
|
97
|
-
},
|
|
98
|
-
attrs: {
|
|
99
|
-
type: 'primary',
|
|
100
|
-
},
|
|
101
|
-
click: () => {
|
|
102
|
-
noticeTemplateRow.value = Object.assign({}, {})
|
|
103
|
-
visible.value = true
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
label: srmI18n('i18n_title_listCustom', '列自定义'),
|
|
108
|
-
icon: {
|
|
109
|
-
type: 'icon-Q-setting',
|
|
110
|
-
},
|
|
111
|
-
type: 'setting',
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
},
|
|
115
|
-
queryConfig: {
|
|
116
|
-
attrs: {},
|
|
117
|
-
extend: {},
|
|
118
|
-
form: [
|
|
119
|
-
{
|
|
120
|
-
type: 'input',
|
|
121
|
-
label: srmI18n('i18n_title_templateName', '模板名称'),
|
|
122
|
-
fieldName: 'templateName',
|
|
123
|
-
placeholder: srmI18n('i18n_title_enterATemplateName', '请输入模板名称'),
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
},
|
|
127
|
-
pagerConfig: {},
|
|
128
|
-
})
|
|
129
|
-
//data-hook
|
|
130
|
-
const { showEditPage, apiUrls } = useConfigData()
|
|
131
|
-
const { userInfo } = toRefs(props)
|
|
132
|
-
console.log('userInfos', userInfo)
|
|
133
|
-
</script>
|
|
134
|
-
<style scoped></style>
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-modal :visible="modelValue" :title="modalTitle" :width="900" @cancel="handleCancel" @ok="handleOk">
|
|
3
|
-
<a-form :model="form">
|
|
4
|
-
<a-form-item :label="srmI18n('i18n_title_templateName', '模板名称')">
|
|
5
|
-
<a-input :placeholder="srmI18n('i18n_title_enterATemplateName', '请输入模板名称')" v-model:value="form.templateName" style="width: 400px" />
|
|
6
|
-
</a-form-item>
|
|
7
|
-
</a-form>
|
|
8
|
-
<a-form :model="form">
|
|
9
|
-
<a-form-item>
|
|
10
|
-
<QEditor v-if="modelValue" v-model:content="form.templateContent"></QEditor>
|
|
11
|
-
</a-form-item>
|
|
12
|
-
</a-form>
|
|
13
|
-
</a-modal>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts" setup>
|
|
17
|
-
import { ref, reactive, toRefs, inject } from 'vue'
|
|
18
|
-
import { Modal } from 'ant-design-vue'
|
|
19
|
-
import { message } from '@qqt-product/ui'
|
|
20
|
-
import qqtApi from '@qqt-product/api'
|
|
21
|
-
export interface Values {
|
|
22
|
-
templateName: string
|
|
23
|
-
id: string
|
|
24
|
-
templateContent: string
|
|
25
|
-
}
|
|
26
|
-
const qHttp: qqtApi.Request = qqtApi.useHttp()
|
|
27
|
-
|
|
28
|
-
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
29
|
-
if (i18nKey) {
|
|
30
|
-
if (account) {
|
|
31
|
-
return account + defaultValue
|
|
32
|
-
}
|
|
33
|
-
return defaultValue
|
|
34
|
-
}
|
|
35
|
-
return defaultValue
|
|
36
|
-
})
|
|
37
|
-
const modalTitle = ref(srmI18n('i18n_title_editTemplate', '编辑模板'))
|
|
38
|
-
const props = defineProps<{
|
|
39
|
-
modelValue: boolean
|
|
40
|
-
currentRow: object
|
|
41
|
-
}>()
|
|
42
|
-
const { modelValue } = toRefs(props)
|
|
43
|
-
const emit = defineEmits<{
|
|
44
|
-
(e: 'update:modelValue', modalVisible: boolean): void
|
|
45
|
-
(e: 'fetch-list-data')
|
|
46
|
-
}>()
|
|
47
|
-
|
|
48
|
-
const form = reactive<Values>(
|
|
49
|
-
Object.assign(
|
|
50
|
-
{},
|
|
51
|
-
{
|
|
52
|
-
templateContent: '',
|
|
53
|
-
id: '',
|
|
54
|
-
templateName: '',
|
|
55
|
-
},
|
|
56
|
-
props.currentRow,
|
|
57
|
-
),
|
|
58
|
-
)
|
|
59
|
-
const handleCancel = () => {
|
|
60
|
-
emit('update:modelValue', false)
|
|
61
|
-
}
|
|
62
|
-
const handleOk = (e: MouseEvent) => {
|
|
63
|
-
console.log(e)
|
|
64
|
-
Modal.confirm({
|
|
65
|
-
title: srmI18n('i18n_title_confirmtoSave', '确认保存'),
|
|
66
|
-
content: srmI18n('i18n_title_isConfirmtoSave', '是否确认保存?'),
|
|
67
|
-
onOk() {
|
|
68
|
-
postData()
|
|
69
|
-
},
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
const postData = () => {
|
|
73
|
-
let url = '/notice/purchaseNoticeTemplate/add'
|
|
74
|
-
if (form.id && form.id != '') {
|
|
75
|
-
url = '/notice/purchaseNoticeTemplate/edit'
|
|
76
|
-
}
|
|
77
|
-
qHttp
|
|
78
|
-
.post({
|
|
79
|
-
url,
|
|
80
|
-
data: form,
|
|
81
|
-
})
|
|
82
|
-
.then((res) => {
|
|
83
|
-
if (res && res.success) {
|
|
84
|
-
message.success(res.message)
|
|
85
|
-
emit('fetch-list-data')
|
|
86
|
-
} else {
|
|
87
|
-
message.error(res.message)
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
</script>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { shallowRef, ref } from 'vue'
|
|
2
|
-
// import type { MapObjectNoneType } from './types'
|
|
3
|
-
// import { VxeTableInstance } from 'vxe-table'
|
|
4
|
-
// import type {}
|
|
5
|
-
export function useConfigData() {
|
|
6
|
-
//响应
|
|
7
|
-
|
|
8
|
-
const apiUrls = shallowRef({
|
|
9
|
-
list: '/notice/purchaseNoticeTemplate/list',
|
|
10
|
-
columnsCode: 'PurchaseNoticeTemplate',
|
|
11
|
-
delete: '/notice/purchaseNoticeTemplate/delete',
|
|
12
|
-
})
|
|
13
|
-
const uploadShow = shallowRef<boolean>(false)
|
|
14
|
-
const showEditPage = shallowRef<boolean>(false)
|
|
15
|
-
const currentEditRow = ref({})
|
|
16
|
-
const listLayoutRef = ref()
|
|
17
|
-
return { apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
|
|
18
|
-
}
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="height: 100%">
|
|
3
|
-
<q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
|
|
4
|
-
|
|
5
|
-
<!--新增/编辑-->
|
|
6
|
-
<QuartzJobModal v-if="showEditPage" :current-edit-row="currentEditRow" ref="editPage" @close="hideEditPage" />
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script lang="ts">
|
|
11
|
-
//组件
|
|
12
|
-
import { Modal, message } from '@qqt-product/ui'
|
|
13
|
-
import QuartzJobModal from '../src/components/QuartzJobModal.vue'
|
|
14
|
-
//JS
|
|
15
|
-
import { defineComponent, reactive, inject, nextTick } from 'vue'
|
|
16
|
-
//hook
|
|
17
|
-
import { useConfigData } from './useConfigData'
|
|
18
|
-
import { useConigApiMethods } from '../../../utils/global.hook'
|
|
19
|
-
|
|
20
|
-
//ts
|
|
21
|
-
import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
|
|
22
|
-
|
|
23
|
-
export default defineComponent({
|
|
24
|
-
name: 'QQuartzJobList',
|
|
25
|
-
components: {
|
|
26
|
-
QuartzJobModal,
|
|
27
|
-
},
|
|
28
|
-
props: {
|
|
29
|
-
userInfo: {
|
|
30
|
-
type: Object,
|
|
31
|
-
defalut: () => {
|
|
32
|
-
return {}
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
setup() {
|
|
37
|
-
//data-hook
|
|
38
|
-
const { showEditPage, apiUrls, listLayoutRef, currentEditRow, editPage } = useConfigData()
|
|
39
|
-
const qHttp = inject(INJECT_HTTP) as HttpClient
|
|
40
|
-
// const { userInfo } = toRefs(props)
|
|
41
|
-
// console.log('userInfos', userInfo)
|
|
42
|
-
//data
|
|
43
|
-
const { handleExport } = useConigApiMethods(qHttp)
|
|
44
|
-
const pageData = reactive({
|
|
45
|
-
statusConfig: {
|
|
46
|
-
show: false,
|
|
47
|
-
},
|
|
48
|
-
optionConfig: {
|
|
49
|
-
attrs: {},
|
|
50
|
-
extend: {},
|
|
51
|
-
options: [
|
|
52
|
-
{ authorityCode: 'quartzJob#QuartzJob:pause', type: 'pause', title: '停止', click: pauseJob, disabled: showStopCondition },
|
|
53
|
-
{ authorityCode: 'quartzJob#QuartzJob:resume', type: 'start', title: '启动', click: resumeJob, disabled: showStartCondition },
|
|
54
|
-
{ authorityCode: 'quartzJob#QuartzJob:manualExecute', start2: '', title: '手动执行', click: manualExecute },
|
|
55
|
-
// {authorityCode: 'quartzJob#QuartzJob:log', type: 'log', title: srmI18n(`${getLangAccount()}#i18n_btn_BR_cb692`, '日志'), clickFn: this.queryLog},
|
|
56
|
-
{ authorityCode: 'quartzJob#QuartzJob:edit', type: 'edit', title: '编辑', click: edit },
|
|
57
|
-
{
|
|
58
|
-
authorityCode: 'quartzJob#QuartzJob:delete',
|
|
59
|
-
args: {
|
|
60
|
-
url: apiUrls.value.delete,
|
|
61
|
-
},
|
|
62
|
-
type: 'delete',
|
|
63
|
-
title: '删除',
|
|
64
|
-
disabled: showDelCondition,
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
buttonConfig: {
|
|
69
|
-
attrs: {},
|
|
70
|
-
extend: {},
|
|
71
|
-
buttons: [
|
|
72
|
-
{
|
|
73
|
-
authorityCode: 'quartzJob#QuartzJob:add',
|
|
74
|
-
label: '新增',
|
|
75
|
-
icon: {
|
|
76
|
-
type: 'icon-Q-add',
|
|
77
|
-
},
|
|
78
|
-
attrs: {
|
|
79
|
-
type: 'primary',
|
|
80
|
-
},
|
|
81
|
-
click: add,
|
|
82
|
-
args: {
|
|
83
|
-
type: 'primary',
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
authorityCode: 'quartzJob#QuartzJob:export',
|
|
88
|
-
label: '导出',
|
|
89
|
-
args: {
|
|
90
|
-
fileName: '定时任务',
|
|
91
|
-
url: '/job/quartzJob/exportXls', // 原来的 exportXlsUrl
|
|
92
|
-
},
|
|
93
|
-
icon: {
|
|
94
|
-
type: 'icon-Q-export',
|
|
95
|
-
},
|
|
96
|
-
type: 'export',
|
|
97
|
-
// click: handleCustomExportXls,
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
label: '列自定义',
|
|
101
|
-
icon: {
|
|
102
|
-
type: 'icon-Q-setting',
|
|
103
|
-
},
|
|
104
|
-
type: 'setting',
|
|
105
|
-
},
|
|
106
|
-
// {label: srmI18n(`${getLangAccount()}#i18n_title_listCustom`, '列自定义'), icon: 'setting', clickFn: this.settingColumns},
|
|
107
|
-
// {label: srmI18n(`${getLangAccount()}#i18n_title_helpText`, '帮助说明'), icon: 'file-text', folded: true, isDocument: true, clickFn: this.showHelpText},
|
|
108
|
-
// {label: srmI18n(`${getLangAccount()}#i18n_title_attachment`, '说明附件'), icon: 'file-pdf', folded: true, isDocument: true, clickFn: this.showHelpPDF}
|
|
109
|
-
],
|
|
110
|
-
},
|
|
111
|
-
queryConfig: {
|
|
112
|
-
attrs: {},
|
|
113
|
-
extend: {},
|
|
114
|
-
form: [
|
|
115
|
-
{
|
|
116
|
-
type: 'input',
|
|
117
|
-
label: '任务编码',
|
|
118
|
-
fieldName: 'keyWord',
|
|
119
|
-
placeholder: '请输入任务编码',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
type: 'select',
|
|
123
|
-
label: '任务状态',
|
|
124
|
-
fieldName: 'status',
|
|
125
|
-
dictCode: 'quartz_job_status',
|
|
126
|
-
placeholder: '请选择状态',
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
},
|
|
130
|
-
pagerConfig: {},
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
//methods
|
|
134
|
-
|
|
135
|
-
function handleCustomExportXls() {
|
|
136
|
-
handleExport({
|
|
137
|
-
actionType: 'post',
|
|
138
|
-
type: 'xls',
|
|
139
|
-
exportXlsUrl: '/job/quartzJob/exportXls',
|
|
140
|
-
fileName: '定时任务',
|
|
141
|
-
setPostParms() {
|
|
142
|
-
return {
|
|
143
|
-
jobClassName: '',
|
|
144
|
-
status: '',
|
|
145
|
-
pageSize: 20,
|
|
146
|
-
pageNo: 1,
|
|
147
|
-
filter: {},
|
|
148
|
-
column: 'id',
|
|
149
|
-
order: 'desc',
|
|
150
|
-
defineColumnCode: 'ElsQuartzJob',
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
berforCallback() {
|
|
154
|
-
listLayoutRef.value.loading = true
|
|
155
|
-
},
|
|
156
|
-
afterCallback() {
|
|
157
|
-
listLayoutRef.value.loading = false
|
|
158
|
-
},
|
|
159
|
-
})
|
|
160
|
-
}
|
|
161
|
-
function showStopCondition({ row = {} as MapObjectNoneType }) {
|
|
162
|
-
return row.status === -1
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function pauseJob({ row = {} as MapObjectNoneType }) {
|
|
166
|
-
Modal.confirm({
|
|
167
|
-
title: '确认暂停',
|
|
168
|
-
content: '是否暂停选中任务?',
|
|
169
|
-
onOk() {
|
|
170
|
-
listLayoutRef.value.loading = true
|
|
171
|
-
qHttp
|
|
172
|
-
.get({
|
|
173
|
-
url: apiUrls.value.pause,
|
|
174
|
-
params: { jobNameKey: row.jobNameKey },
|
|
175
|
-
})
|
|
176
|
-
.then((res) => {
|
|
177
|
-
if (res.success) {
|
|
178
|
-
message.success(res.message)
|
|
179
|
-
listLayoutRef.value.fetchListData()
|
|
180
|
-
} else {
|
|
181
|
-
message.warning(res.message)
|
|
182
|
-
}
|
|
183
|
-
})
|
|
184
|
-
.finally(() => {
|
|
185
|
-
listLayoutRef.value.loading = false
|
|
186
|
-
})
|
|
187
|
-
},
|
|
188
|
-
})
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function showStartCondition({ row = {} as MapObjectNoneType }) {
|
|
192
|
-
return row.status === 0
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function resumeJob({ row = {} as MapObjectNoneType }) {
|
|
196
|
-
Modal.confirm({
|
|
197
|
-
title: '确认启动',
|
|
198
|
-
content: '是否启动选中任务?',
|
|
199
|
-
onOk() {
|
|
200
|
-
listLayoutRef.value.loading = true
|
|
201
|
-
qHttp
|
|
202
|
-
.get({
|
|
203
|
-
url: apiUrls.value.resume,
|
|
204
|
-
params: { jobNameKey: row.jobNameKey },
|
|
205
|
-
})
|
|
206
|
-
.then((res) => {
|
|
207
|
-
if (res.success) {
|
|
208
|
-
message.success(res.message)
|
|
209
|
-
listLayoutRef.value.fetchListData()
|
|
210
|
-
} else {
|
|
211
|
-
message.warning(res.message)
|
|
212
|
-
}
|
|
213
|
-
})
|
|
214
|
-
.finally(() => {
|
|
215
|
-
listLayoutRef.value.loading = false
|
|
216
|
-
})
|
|
217
|
-
},
|
|
218
|
-
})
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function manualExecute({ row = {} as MapObjectNoneType }) {
|
|
222
|
-
Modal.confirm({
|
|
223
|
-
title: '确认执行',
|
|
224
|
-
content: '是否手动执行选中任务?',
|
|
225
|
-
onOk() {
|
|
226
|
-
listLayoutRef.value.loading = true
|
|
227
|
-
qHttp
|
|
228
|
-
.get({
|
|
229
|
-
url: apiUrls.value.manualExecute,
|
|
230
|
-
params: { id: row.id },
|
|
231
|
-
})
|
|
232
|
-
.then((res) => {
|
|
233
|
-
if (res.success) {
|
|
234
|
-
message.success(res.message)
|
|
235
|
-
listLayoutRef.value.fetchListData()
|
|
236
|
-
} else {
|
|
237
|
-
message.warning(res.message)
|
|
238
|
-
}
|
|
239
|
-
})
|
|
240
|
-
.finally(() => {
|
|
241
|
-
listLayoutRef.value.loading = false
|
|
242
|
-
})
|
|
243
|
-
},
|
|
244
|
-
})
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
function showDelCondition({ row = {} as MapObjectNoneType }) {
|
|
248
|
-
return row.status === 0
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
function add() {
|
|
252
|
-
currentEditRow.value = {}
|
|
253
|
-
showEditPage.value = true
|
|
254
|
-
nextTick(() => {
|
|
255
|
-
editPage.value.add()
|
|
256
|
-
})
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
function edit({ row = {} as MapObjectNoneType }) {
|
|
260
|
-
currentEditRow.value = { ...row }
|
|
261
|
-
showEditPage.value = true
|
|
262
|
-
nextTick(() => {
|
|
263
|
-
editPage.value.edit(row)
|
|
264
|
-
})
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
function hideEditPage() {
|
|
268
|
-
showEditPage.value = false
|
|
269
|
-
currentEditRow.value = {}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
return { editPage, hideEditPage, currentEditRow, listLayoutRef, showEditPage, apiUrls, pageData }
|
|
273
|
-
},
|
|
274
|
-
})
|
|
275
|
-
</script>
|
|
276
|
-
<style scoped></style>
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="components-input-demo-presuffix">
|
|
3
|
-
<a-input @click="openModal" placeholder="corn表达式" v-model:value="cron" @change="handleOK">
|
|
4
|
-
<template #prefix> <schedule-outlined title="corn控件" /> </template>
|
|
5
|
-
|
|
6
|
-
<template #suffix>
|
|
7
|
-
<close-circle-outlined @click="handleEmpty" title="清空" />
|
|
8
|
-
</template>
|
|
9
|
-
</a-input>
|
|
10
|
-
<JCronModal ref="innerVueCron" :data="cron" @ok="handleOK" />
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
<script lang="ts">
|
|
14
|
-
//vue
|
|
15
|
-
import { defineComponent, ref } from 'vue'
|
|
16
|
-
//组件
|
|
17
|
-
import { CloseCircleOutlined, ScheduleOutlined } from '@ant-design/icons-vue'
|
|
18
|
-
import JCronModal from '../components/JCronModal.vue'
|
|
19
|
-
export default defineComponent({
|
|
20
|
-
name: 'JCron',
|
|
21
|
-
emits: ['change'],
|
|
22
|
-
components: {
|
|
23
|
-
JCronModal,
|
|
24
|
-
CloseCircleOutlined,
|
|
25
|
-
ScheduleOutlined,
|
|
26
|
-
},
|
|
27
|
-
setup() {
|
|
28
|
-
const innerVueCron = ref()
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
innerVueCron,
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
props: {
|
|
35
|
-
value: {
|
|
36
|
-
required: false,
|
|
37
|
-
type: String,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
cron: this.value,
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
watch: {
|
|
46
|
-
value(val) {
|
|
47
|
-
this.cron = val
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
methods: {
|
|
51
|
-
openModal() {
|
|
52
|
-
this.innerVueCron.show()
|
|
53
|
-
},
|
|
54
|
-
handleOK(val) {
|
|
55
|
-
this.cron = val
|
|
56
|
-
this.$emit('change', this.cron)
|
|
57
|
-
//this.$emit("change", Object.assign({}, this.cron));
|
|
58
|
-
},
|
|
59
|
-
handleEmpty() {
|
|
60
|
-
this.handleOK('')
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
model: {
|
|
64
|
-
prop: 'value',
|
|
65
|
-
event: 'change',
|
|
66
|
-
},
|
|
67
|
-
})
|
|
68
|
-
</script>
|
|
69
|
-
<style scoped>
|
|
70
|
-
.components-input-demo-presuffix .anticon-close-circle {
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
color: #ccc;
|
|
73
|
-
transition: color 0.3s;
|
|
74
|
-
font-size: 12px;
|
|
75
|
-
}
|
|
76
|
-
.components-input-demo-presuffix .anticon-close-circle:hover {
|
|
77
|
-
color: #f5222d;
|
|
78
|
-
}
|
|
79
|
-
.components-input-demo-presuffix .anticon-close-circle:active {
|
|
80
|
-
color: #666;
|
|
81
|
-
}
|
|
82
|
-
</style>
|