@qqt-product/system 0.0.16 → 0.0.18
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 +9601 -9171
- package/dist/index.umd.js +34 -35
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +16 -12
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +14 -10
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +17 -12
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +13 -9
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +13 -9
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +16 -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 +16 -12
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +13 -9
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +18 -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 +21 -1
- 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 +13 -9
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +16 -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,139 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="detail-page">
|
|
3
|
-
<q-detail-page-layout ref="layoutRef" v-bind="options"> </q-detail-page-layout>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script setup lang="ts">
|
|
8
|
-
import { ref, reactive, inject } from 'vue'
|
|
9
|
-
import type { ComponentPublicInstance } from 'vue'
|
|
10
|
-
import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
|
|
11
|
-
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
12
|
-
if (i18nKey) {
|
|
13
|
-
if (account) {
|
|
14
|
-
return account + defaultValue
|
|
15
|
-
}
|
|
16
|
-
return defaultValue
|
|
17
|
-
}
|
|
18
|
-
return defaultValue
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
// 传参 props
|
|
22
|
-
const props = defineProps<{
|
|
23
|
-
currentRow: GlobalPageLayoutTypes.CurrentRow | null
|
|
24
|
-
userInfo: GlobalPageLayoutTypes.UserInfo
|
|
25
|
-
}>()
|
|
26
|
-
|
|
27
|
-
const currentRow = props.currentRow
|
|
28
|
-
? props.currentRow
|
|
29
|
-
: ref({
|
|
30
|
-
templateNumber: '',
|
|
31
|
-
templateVersion: 0,
|
|
32
|
-
templateAccount: '',
|
|
33
|
-
busAccount: '',
|
|
34
|
-
elsAccount: '',
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
// 编辑组件 ref
|
|
38
|
-
const layoutRef = ref<ComponentPublicInstance | null>(null)
|
|
39
|
-
|
|
40
|
-
// 配置
|
|
41
|
-
const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
42
|
-
/**
|
|
43
|
-
* 模块业务类型 string
|
|
44
|
-
* 取值根据各模块配置
|
|
45
|
-
* 当定义为"custom"时,使用本地配置
|
|
46
|
-
*/
|
|
47
|
-
businessType: 'custom',
|
|
48
|
-
// 布局模式
|
|
49
|
-
pattern: 'vertical',
|
|
50
|
-
// 当前已选行数据a
|
|
51
|
-
currentRow: currentRow as GlobalPageLayoutTypes.CurrentRow,
|
|
52
|
-
// 当前登录租户信息
|
|
53
|
-
userInfo: props.userInfo,
|
|
54
|
-
// 明细接口 -- 接口字符串
|
|
55
|
-
detailApi: '/news/elsTenantPortalNews/queryById',
|
|
56
|
-
// 本地页面数据配置
|
|
57
|
-
localConfig: {
|
|
58
|
-
groups: [
|
|
59
|
-
{
|
|
60
|
-
groupName: '基本信息',
|
|
61
|
-
groupCode: 'baseForm',
|
|
62
|
-
groupType: 'head',
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
formFields: [
|
|
66
|
-
{
|
|
67
|
-
groupCode: 'baseForm',
|
|
68
|
-
fieldType: 'input',
|
|
69
|
-
fieldLabel: srmI18n('i18n_field_subject', '标题'),
|
|
70
|
-
fieldName: 'portalNewsTitle',
|
|
71
|
-
placeholder: srmI18n('i18n_title_pleaseEnterTitle', '请输入标题'),
|
|
72
|
-
required: '1',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
groupCode: 'baseForm',
|
|
76
|
-
fieldType: 'select',
|
|
77
|
-
fieldLabel: srmI18n('i18n_field_VQAc_307be9fb', '新闻类型'),
|
|
78
|
-
fieldName: 'portalNewsType',
|
|
79
|
-
placeholder: srmI18n('i18n_title_selectType', '请选择类型'),
|
|
80
|
-
dictCode: 'portalNewsType',
|
|
81
|
-
required: '1',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
groupCode: 'baseForm',
|
|
85
|
-
fieldType: 'input',
|
|
86
|
-
fieldLabel: srmI18n('i18n_field_IBQIAc_db486758', '目标文件类型'),
|
|
87
|
-
fieldName: 'newsRedirectType',
|
|
88
|
-
placeholder: srmI18n('i18n_field_ViFIBQIAc_a9f7e04f', '请选择目标文件类型'),
|
|
89
|
-
dictCode: 'newsRedirectType',
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
groupCode: 'baseForm',
|
|
93
|
-
fieldType: 'input',
|
|
94
|
-
fieldLabel: srmI18n('i18n_field_IBnR_37a162a9', '目标地址'),
|
|
95
|
-
fieldName: 'linkUrl',
|
|
96
|
-
placeholder: srmI18n('i18n_title_enterAddress', '请输入地址'),
|
|
97
|
-
required: '1',
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
groupCode: 'baseForm',
|
|
101
|
-
fieldType: 'date',
|
|
102
|
-
fieldLabel: srmI18n('i18n_field_effectiveTime', '生效时间'),
|
|
103
|
-
fieldName: 'effectiveTime',
|
|
104
|
-
dataFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
105
|
-
required: '1',
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
groupCode: 'baseForm',
|
|
109
|
-
fieldType: 'date',
|
|
110
|
-
fieldLabel: srmI18n('i18n_field_expiryTime', '失效时间'),
|
|
111
|
-
fieldName: 'expiryTime',
|
|
112
|
-
dataFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
113
|
-
required: '1',
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
groupCode: 'baseForm',
|
|
117
|
-
fieldType: 'input',
|
|
118
|
-
fieldLabel: srmI18n('i18n_field_VQIy_307bc2d6', '新闻简介'),
|
|
119
|
-
fieldName: 'portalNewsIntro',
|
|
120
|
-
placeholder: srmI18n('i18n_title_enterDescribe', '请输入简介内容'),
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
groupCode: 'baseForm',
|
|
124
|
-
fieldType: 'image',
|
|
125
|
-
fieldLabel: srmI18n('i18n_title_thumbnail', '缩略图'),
|
|
126
|
-
fieldLabelI18nKey: 'i18n_field_AEWWWW_1d586064',
|
|
127
|
-
fieldName: 'portalNewsThumbnail',
|
|
128
|
-
dictCode: '',
|
|
129
|
-
defaultValue: '',
|
|
130
|
-
dataFormat: '',
|
|
131
|
-
alertMsg: '',
|
|
132
|
-
required: '0',
|
|
133
|
-
mobile: 1,
|
|
134
|
-
placeholder: '',
|
|
135
|
-
},
|
|
136
|
-
],
|
|
137
|
-
},
|
|
138
|
-
})
|
|
139
|
-
</script>
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="edit-page">
|
|
3
|
-
<a-spin :spinning="customLoading">
|
|
4
|
-
<q-edit-page-layout ref="layoutRef" v-bind="options" @customSave="handleCustomSave" @validate-success="handleValidateSuccess"> </q-edit-page-layout>
|
|
5
|
-
</a-spin>
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script setup lang="ts">
|
|
10
|
-
import { ref, reactive, inject } from 'vue'
|
|
11
|
-
import type { ComponentPublicInstance } from 'vue'
|
|
12
|
-
import { BUTTON_SAVE, BUTTON_PUBLISH } from '@qqt-product/ui'
|
|
13
|
-
import qqtUtils from '@qqt-product/utils'
|
|
14
|
-
// ui组件库 types
|
|
15
|
-
import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
|
|
16
|
-
import { usePromiseStepHook, useRefInstanceHook } from '@qqt-product/ui'
|
|
17
|
-
import type { CreatePromise } from '@qqt-product/utils'
|
|
18
|
-
|
|
19
|
-
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
20
|
-
if (i18nKey) {
|
|
21
|
-
if (account) {
|
|
22
|
-
return account + defaultValue
|
|
23
|
-
}
|
|
24
|
-
return defaultValue
|
|
25
|
-
}
|
|
26
|
-
return defaultValue
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
// 传参 props
|
|
30
|
-
const props = defineProps<{
|
|
31
|
-
currentRow: GlobalPageLayoutTypes.CurrentRow | null
|
|
32
|
-
userInfo: GlobalPageLayoutTypes.UserInfo
|
|
33
|
-
}>()
|
|
34
|
-
|
|
35
|
-
const currentRow = props.currentRow
|
|
36
|
-
? props.currentRow
|
|
37
|
-
: ref({
|
|
38
|
-
templateNumber: '',
|
|
39
|
-
templateVersion: 0,
|
|
40
|
-
templateAccount: '',
|
|
41
|
-
busAccount: '',
|
|
42
|
-
elsAccount: '',
|
|
43
|
-
newsRedirectType: '2', // 使用类型,1-文本,2-超链接
|
|
44
|
-
portalNewsType: 'companyNews',
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
// 编辑组件 ref
|
|
48
|
-
const layoutRef = ref<ComponentPublicInstance | null>(null)
|
|
49
|
-
const { pageData, layoutConfig, defaultValues } = useRefInstanceHook(layoutRef)
|
|
50
|
-
|
|
51
|
-
const { createPromise } = qqtUtils
|
|
52
|
-
// 配置
|
|
53
|
-
const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
54
|
-
/**
|
|
55
|
-
* 模块业务类型 string
|
|
56
|
-
* 取值根据各模块配置
|
|
57
|
-
* 当定义为"custom"时,使用本地配置
|
|
58
|
-
*/
|
|
59
|
-
businessType: 'custom',
|
|
60
|
-
// 布局模式
|
|
61
|
-
pattern: 'vertical',
|
|
62
|
-
// 当前已选行数据a
|
|
63
|
-
currentRow: currentRow as GlobalPageLayoutTypes.CurrentRow,
|
|
64
|
-
refreshMethods(row?: GlobalPageLayoutTypes.CurrentRow) {
|
|
65
|
-
if (options.currentRow) {
|
|
66
|
-
options.currentRow =
|
|
67
|
-
row ||
|
|
68
|
-
Object.assign({}, options.currentRow, {
|
|
69
|
-
_t: +new Date(),
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
// 当前登录租户信息
|
|
74
|
-
userInfo: props.userInfo,
|
|
75
|
-
// 明细接口 -- 接口字符串
|
|
76
|
-
detailApi: '/news/elsTenantPortalNews/queryById',
|
|
77
|
-
// 本地页面数据配置
|
|
78
|
-
localConfig: {
|
|
79
|
-
groups: [
|
|
80
|
-
{
|
|
81
|
-
groupName: '基本信息',
|
|
82
|
-
groupCode: 'baseForm',
|
|
83
|
-
groupType: 'head',
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
formFields: [
|
|
87
|
-
{
|
|
88
|
-
groupCode: 'baseForm',
|
|
89
|
-
fieldType: 'input',
|
|
90
|
-
fieldLabel: srmI18n('i18n_field_subject', '标题'),
|
|
91
|
-
fieldName: 'portalNewsTitle',
|
|
92
|
-
placeholder: srmI18n('i18n_title_pleaseEnterTitle', '请输入标题'),
|
|
93
|
-
required: '1',
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
groupCode: 'baseForm',
|
|
97
|
-
fieldType: 'select',
|
|
98
|
-
fieldLabel: srmI18n('i18n_field_VQAc_307be9fb', '新闻类型'),
|
|
99
|
-
fieldName: 'portalNewsType',
|
|
100
|
-
placeholder: srmI18n('i18n_title_selectType', '请选择类型'),
|
|
101
|
-
dictCode: 'portalNewsType',
|
|
102
|
-
required: '1',
|
|
103
|
-
defaultValue: 'companyNews',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
groupCode: 'baseForm',
|
|
107
|
-
fieldType: 'select',
|
|
108
|
-
fieldLabel: srmI18n('i18n_field_IBQIAc_db486758', '目标文件类型'),
|
|
109
|
-
fieldName: 'newsRedirectType',
|
|
110
|
-
placeholder: srmI18n('i18n_field_ViFIBQIAc_a9f7e04f', '请选择目标文件类型'),
|
|
111
|
-
dictCode: 'newsRedirectType',
|
|
112
|
-
required: '1',
|
|
113
|
-
defaultValue: '2',
|
|
114
|
-
callback(cxt, { layoutConfig, value }) {
|
|
115
|
-
console.log('callbackcallback', value, layoutConfig)
|
|
116
|
-
for (let group of layoutConfig.groups) {
|
|
117
|
-
if (group.groupCode == 'baseForm') {
|
|
118
|
-
for (let formFields of group.formFields!) {
|
|
119
|
-
if (formFields.fieldName == 'portalNewsDetail' && value == 1) {
|
|
120
|
-
formFields.fieldType = 'editor'
|
|
121
|
-
} else if (formFields.fieldName == 'portalNewsDetail' && value != 1) {
|
|
122
|
-
formFields.fieldType = ''
|
|
123
|
-
}
|
|
124
|
-
if (formFields.fieldName == 'linkUrl' && value == 1) {
|
|
125
|
-
formFields.required = '0'
|
|
126
|
-
} else if (formFields.fieldName == 'linkUrl' && value != 1) {
|
|
127
|
-
formFields.required = '1'
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
groupCode: 'baseForm',
|
|
136
|
-
fieldType: 'input',
|
|
137
|
-
fieldLabel: srmI18n('i18n_field_IBnR_37a162a9', '目标地址'),
|
|
138
|
-
fieldName: 'linkUrl',
|
|
139
|
-
placeholder: srmI18n('i18n_title_enterAddress', '请输入地址'),
|
|
140
|
-
required: '1',
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
groupCode: 'baseForm',
|
|
144
|
-
fieldType: 'date',
|
|
145
|
-
fieldLabel: srmI18n('i18n_field_effectiveTime', '生效时间'),
|
|
146
|
-
fieldName: 'effectiveTime',
|
|
147
|
-
dataFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
148
|
-
required: '1',
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
groupCode: 'baseForm',
|
|
152
|
-
fieldType: 'date',
|
|
153
|
-
fieldLabel: srmI18n('i18n_field_expiryTime', '失效时间'),
|
|
154
|
-
fieldName: 'expiryTime',
|
|
155
|
-
dataFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
156
|
-
required: '1',
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
groupCode: 'baseForm',
|
|
160
|
-
fieldType: 'input',
|
|
161
|
-
fieldLabel: srmI18n('i18n_field_VQIy_307bc2d6', '新闻简介'),
|
|
162
|
-
fieldName: 'portalNewsIntro',
|
|
163
|
-
placeholder: srmI18n('i18n_title_enterDescribe', '请输入简介内容'),
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
groupCode: 'baseForm',
|
|
167
|
-
fieldType: 'image',
|
|
168
|
-
fieldLabel: srmI18n('i18n_title_thumbnail', '缩略图'),
|
|
169
|
-
fieldLabelI18nKey: 'i18n_field_AEWWWW_1d586064',
|
|
170
|
-
fieldName: 'portalNewsThumbnail',
|
|
171
|
-
dictCode: '',
|
|
172
|
-
defaultValue: '',
|
|
173
|
-
dataFormat: '',
|
|
174
|
-
alertMsg: '',
|
|
175
|
-
required: '0',
|
|
176
|
-
mobile: 1,
|
|
177
|
-
placeholder: '',
|
|
178
|
-
extend: { multiple: false, limit: 1 },
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
groupCode: 'baseForm',
|
|
182
|
-
fieldType: '',
|
|
183
|
-
fieldLabel: srmI18n('i18n_field_QvWN_2fbbd977', '文本输入'),
|
|
184
|
-
fieldName: 'portalNewsDetail',
|
|
185
|
-
placeholder: srmI18n('i18n_title_inputContent', '请输入内容'),
|
|
186
|
-
},
|
|
187
|
-
],
|
|
188
|
-
},
|
|
189
|
-
// 页面按钮
|
|
190
|
-
pageButtons: [
|
|
191
|
-
{
|
|
192
|
-
...BUTTON_SAVE,
|
|
193
|
-
title: srmI18n('i18n_title_save', '保存'),
|
|
194
|
-
emit: true,
|
|
195
|
-
emitKey: 'customSave',
|
|
196
|
-
args: {
|
|
197
|
-
url: '/news/elsTenantPortalNews/edit',
|
|
198
|
-
},
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
...BUTTON_PUBLISH,
|
|
202
|
-
disabled: pulishDiabled,
|
|
203
|
-
handleBefore: publishHandleBefore,
|
|
204
|
-
|
|
205
|
-
args: {
|
|
206
|
-
url: '/news/elsTenantPortalNews/publish/',
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
],
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
const { stepTriggerValidate, composeSave, customLoading } = usePromiseStepHook({ pageData, layoutConfig, defaultValues, options })
|
|
213
|
-
|
|
214
|
-
// 自定义保存
|
|
215
|
-
const handleCustomSave = () => {
|
|
216
|
-
stepTriggerValidate()
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// 页面校验成功后执行下一步回调步骤
|
|
220
|
-
const handleValidateSuccess = (button: GlobalPageLayoutTypes.PageButton) => {
|
|
221
|
-
if (button.key === BUTTON_SAVE.key) {
|
|
222
|
-
composeSave()
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function pulishDiabled() {
|
|
227
|
-
return !pageData.value.id
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
function publishHandleBefore(args) {
|
|
231
|
-
const fn: CreatePromise<GlobalPageLayoutTypes.ExposeWithPageButtons> = (resolve) => {
|
|
232
|
-
console.log(args)
|
|
233
|
-
for (let i of args.pageButtons.value) {
|
|
234
|
-
if (i.key.toString() == 'Symbol(PUBLISH)') {
|
|
235
|
-
i.args.url = i.args.url + pageData.value.id
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
resolve(args)
|
|
239
|
-
}
|
|
240
|
-
return createPromise(fn) as Promise<GlobalPageLayoutTypes.ExposeWithPageButtons>
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// 页面刷新
|
|
244
|
-
</script>
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-list-layout ref="listLayoutRef" :pageData="pageData" :apiUrls="apiUrls" />
|
|
3
|
-
</template>
|
|
4
|
-
<script setup lang="ts">
|
|
5
|
-
import { reactive, ref, inject } from 'vue'
|
|
6
|
-
import qqtApi from '@qqt-product/api'
|
|
7
|
-
import { message, Modal } from '@qqt-product/ui'
|
|
8
|
-
import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
|
|
9
|
-
const qHttp: qqtApi.Request = qqtApi.useHttp()
|
|
10
|
-
const listLayoutRef = ref()
|
|
11
|
-
const emit = defineEmits(['create', 'detail', 'edit'])
|
|
12
|
-
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
13
|
-
if (i18nKey) {
|
|
14
|
-
if (account) {
|
|
15
|
-
return account + defaultValue
|
|
16
|
-
}
|
|
17
|
-
return defaultValue
|
|
18
|
-
}
|
|
19
|
-
return defaultValue
|
|
20
|
-
})
|
|
21
|
-
const apiUrls = {
|
|
22
|
-
list: '/news/elsTenantPortalNews/list',
|
|
23
|
-
columnsCode: 'elsTenantPortalNewsList',
|
|
24
|
-
}
|
|
25
|
-
const handleDelete = async (row: GlobalPageLayoutTypes.CurrentRow) => {
|
|
26
|
-
Modal.confirm({
|
|
27
|
-
title: srmI18n(`i18n_title_tip`, '提示'),
|
|
28
|
-
content: srmI18n('i18n_title_deleteChosedData', '是否删除选中数据?'),
|
|
29
|
-
onOk() {
|
|
30
|
-
let data = [row.id]
|
|
31
|
-
qHttp.post({ url: '/news/elsTenantPortalNews/delete', data: data }).then((res) => {
|
|
32
|
-
if (res && res.success) {
|
|
33
|
-
message.success(res.message)
|
|
34
|
-
listLayoutRef.value.fetchListData()
|
|
35
|
-
} else {
|
|
36
|
-
message.error(res.message)
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
},
|
|
40
|
-
okText: srmI18n('i18n_title_confirm', '确定'),
|
|
41
|
-
cancelText: srmI18n('i18n_title_cancle', '取消'),
|
|
42
|
-
})
|
|
43
|
-
}
|
|
44
|
-
const handlePublish = async (row: GlobalPageLayoutTypes.CurrentRow) => {
|
|
45
|
-
Modal.confirm({
|
|
46
|
-
title: srmI18n(`i18n_title_tip`, '提示'),
|
|
47
|
-
content: srmI18n('i18n_title_isConfirmPublishing', '是否确认发布?'),
|
|
48
|
-
onOk() {
|
|
49
|
-
qHttp.post({ url: `/news/elsTenantPortalNews/publish/${row.id}` }).then((res) => {
|
|
50
|
-
if (res && res.success) {
|
|
51
|
-
message.success(res.message)
|
|
52
|
-
listLayoutRef.value.fetchListData()
|
|
53
|
-
} else {
|
|
54
|
-
message.error(res.message)
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
},
|
|
58
|
-
okText: srmI18n('i18n_title_confirm', '确定'),
|
|
59
|
-
cancelText: srmI18n('i18n_title_cancle', '取消'),
|
|
60
|
-
})
|
|
61
|
-
}
|
|
62
|
-
const pageData = reactive({
|
|
63
|
-
statusConfig: {
|
|
64
|
-
show: false,
|
|
65
|
-
},
|
|
66
|
-
optionConfig: {
|
|
67
|
-
options: [
|
|
68
|
-
{
|
|
69
|
-
type: 'view',
|
|
70
|
-
title: srmI18n('i18n_title_view', '查看'),
|
|
71
|
-
click: ({ row }) => {
|
|
72
|
-
emit('detail', row)
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
type: 'edit',
|
|
77
|
-
title: srmI18n('i18n_title_edit', '编辑'),
|
|
78
|
-
click: ({ row }) => {
|
|
79
|
-
emit('edit', row)
|
|
80
|
-
},
|
|
81
|
-
disabled: ({ row }) => row.status == '1',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
type: 'delete',
|
|
85
|
-
title: srmI18n('i18n_title_delete', '删除'),
|
|
86
|
-
click: ({ row = {} as GlobalPageLayoutTypes.CurrentRow }) => {
|
|
87
|
-
handleDelete(row)
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
type: 'publish',
|
|
92
|
-
title: srmI18n('i18n_title_publish', '发布'),
|
|
93
|
-
disabled: ({ row }) => row.status == '1',
|
|
94
|
-
click: ({ row = {} as GlobalPageLayoutTypes.CurrentRow }) => {
|
|
95
|
-
handlePublish(row)
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
buttonConfig: {
|
|
101
|
-
buttons: [
|
|
102
|
-
{
|
|
103
|
-
label: srmI18n('i18n_title_add', '新增'),
|
|
104
|
-
icon: {
|
|
105
|
-
type: 'icon-Q-add',
|
|
106
|
-
},
|
|
107
|
-
attrs: {
|
|
108
|
-
type: 'primary',
|
|
109
|
-
},
|
|
110
|
-
type: 'add',
|
|
111
|
-
click: () => {
|
|
112
|
-
emit('create')
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
label: srmI18n('i18n_title_listCustom', '列自定义'),
|
|
117
|
-
icon: {
|
|
118
|
-
type: 'icon-Q-setting',
|
|
119
|
-
},
|
|
120
|
-
type: 'setting',
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
label: srmI18n('i18n_title_helpText', '帮助说明'),
|
|
124
|
-
icon: {
|
|
125
|
-
type: 'icon-Q-help-text',
|
|
126
|
-
},
|
|
127
|
-
type: 'help-text',
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
label: srmI18n('i18n_title_attachment', '说明附件'),
|
|
131
|
-
icon: {
|
|
132
|
-
type: 'icon-Q-attachment-text',
|
|
133
|
-
},
|
|
134
|
-
type: 'attachment-text',
|
|
135
|
-
},
|
|
136
|
-
],
|
|
137
|
-
},
|
|
138
|
-
queryConfig: {
|
|
139
|
-
form: [
|
|
140
|
-
{
|
|
141
|
-
type: 'input',
|
|
142
|
-
label: srmI18n('i18n_title_keyword', '关键字'),
|
|
143
|
-
fieldName: 'keyWord',
|
|
144
|
-
placeholder: srmI18n('i18n_field_VWNVQBDVQIy_c92d9e92', '请输入新闻标题、新闻简介'),
|
|
145
|
-
},
|
|
146
|
-
],
|
|
147
|
-
},
|
|
148
|
-
pagerConfig: {},
|
|
149
|
-
})
|
|
150
|
-
</script>
|
|
151
|
-
<style scoped></style>
|
|
@@ -1,20 +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: '/news/elsTenantPortalNews/list',
|
|
10
|
-
columnsCode: 'elsTenantPortalNewsList',
|
|
11
|
-
add: '/news/elsTenantPortalNews/add',
|
|
12
|
-
delete: '/news/elsTenantPortalNews/delete',
|
|
13
|
-
publish: '/news/elsTenantPortalNews/publish',
|
|
14
|
-
})
|
|
15
|
-
const uploadShow = shallowRef<boolean>(false)
|
|
16
|
-
const showEditPage = shallowRef<boolean>(false)
|
|
17
|
-
const currentEditRow = ref({})
|
|
18
|
-
const listLayoutRef = ref()
|
|
19
|
-
return { apiUrls, showEditPage, currentEditRow, listLayoutRef, uploadShow }
|
|
20
|
-
}
|