@qqt-product/system 0.0.2 → 0.0.16
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 +53240 -10634
- package/dist/index.umd.js +94 -21
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2871 -0
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
- package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
- package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2876 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +29 -14
- package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
- package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
- package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2872 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2887 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
- package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +221 -28
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
- package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +23 -7
- package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +7 -3
- package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
- package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
- package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
- package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1209 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
- package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
- package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2863 -0
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2872 -0
- package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
- package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
- package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
- package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
- package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
- package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
- package/dist/style.css +1 -1
- package/dist/vite-env.d.ts +13 -13
- package/package.json +13 -11
- package/src/lib/components/QAccountList/src/QAccountCreate.vue +272 -0
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +82 -14
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +65 -33
- package/src/lib/components/QAccountList/src/QAccountList.vue +532 -530
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +143 -137
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +172 -166
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +123 -124
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +66 -18
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +151 -122
- package/src/lib/components/QI18nList/src/QI18nList.vue +365 -361
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +103 -94
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +109 -105
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -3
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +218 -221
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +110 -117
- package/src/lib/components/QPermissionDataList/src/form.vue +109 -109
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +1 -1
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +120 -32
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +189 -163
- package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +84 -0
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -22
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +134 -85
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +91 -0
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +276 -263
- package/src/lib/components/QRoleList/src/QRoleList.vue +332 -288
- package/src/lib/components/QRoleList/src/useConfigData.ts +1 -6
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +304 -302
- package/src/lib/components/QUsageList/src/QUsageList.vue +287 -82
- package/src/lib/components/QUsageList/src/useConfigData.ts +147 -13
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -140
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +28 -28
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +130 -42
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +12 -12
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +276 -268
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +1 -1
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +124 -125
- package/src/lib/components/index.ts +78 -78
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +2 -10
- package/src/lib/components/integratedNodesList/src/index.vue +130 -136
- package/src/lib/components/integratedReportList/src/index.vue +55 -30
- package/src/lib/components/integratedReportSearchList/src/index.vue +106 -66
- package/src/lib/components/loginAbnormalLogList/src/index.vue +43 -50
- package/src/lib/components/loginLogList/src/index.vue +51 -57
- package/src/lib/components/loginSupplierLogList/src/index.vue +53 -63
- package/src/lib/components/operateLogList/src/index.vue +46 -57
- package/src/vite-env.d.ts +13 -13
- package/tsconfig.json +24 -24
- package/vite.config.ts +1 -1
- package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
- package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
- package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
- package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
- package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
- package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
- package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
|
@@ -1,124 +1,123 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script lang="ts">
|
|
6
|
-
//JS
|
|
7
|
-
import { defineComponent, reactive, inject } from 'vue'
|
|
8
|
-
//hook
|
|
9
|
-
import { useConfigData } from './useConfigData'
|
|
10
|
-
import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
|
|
11
|
-
import { message } from '@qqt-product/ui'
|
|
12
|
-
export default defineComponent({
|
|
13
|
-
name: 'QElsMsgRecordList',
|
|
14
|
-
props: {
|
|
15
|
-
userInfo: {
|
|
16
|
-
type: Object,
|
|
17
|
-
defalut: () => {
|
|
18
|
-
return {}
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
setup(props, { emit }) {
|
|
23
|
-
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
24
|
-
if (i18nKey) {
|
|
25
|
-
if (account) {
|
|
26
|
-
return account + defaultValue
|
|
27
|
-
}
|
|
28
|
-
return defaultValue
|
|
29
|
-
}
|
|
30
|
-
return defaultValue
|
|
31
|
-
})
|
|
32
|
-
const { showEditPage, apiUrls, listLayoutRef } = useConfigData()
|
|
33
|
-
// const { userInfo } = toRefs(props)
|
|
34
|
-
// console.log('userInfos', userInfo)
|
|
35
|
-
//data
|
|
36
|
-
const pageData = reactive({
|
|
37
|
-
statusConfig: {
|
|
38
|
-
show: false,
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
attrs: {},
|
|
42
|
-
extend: {},
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
type: 'view',
|
|
46
|
-
title: srmI18n('i18n_title_see', '查看'),
|
|
47
|
-
click: ({ row }) => {
|
|
48
|
-
emit('detail', row)
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
buttonConfig: {
|
|
54
|
-
attrs: {},
|
|
55
|
-
extend: {},
|
|
56
|
-
buttons: [
|
|
57
|
-
{ authorityCode: 'elsMsgRecord#ElsMsgRecord:readBatch', label: srmI18n('i18n_btn_IIZz_25b7aa44', '一键阅读'), icon: 'check', click: readBatch },
|
|
58
|
-
{
|
|
59
|
-
label: srmI18n('i18n_title_listCustom', '列自定义'),
|
|
60
|
-
icon: {
|
|
61
|
-
type: 'icon-Q-setting',
|
|
62
|
-
},
|
|
63
|
-
type: 'setting',
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
queryConfig: {
|
|
68
|
-
attrs: {},
|
|
69
|
-
extend: {},
|
|
70
|
-
form: [
|
|
71
|
-
{
|
|
72
|
-
type: 'select',
|
|
73
|
-
label: srmI18n('i18n_field_businessType', '业务类型'),
|
|
74
|
-
dictCode: 'srmBusinessType',
|
|
75
|
-
fieldName: 'businessType',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
type: 'select',
|
|
79
|
-
label: srmI18n('i18n_field_handleFlag', '阅读状态'),
|
|
80
|
-
fieldName: 'handleFlag',
|
|
81
|
-
dictCode: 'srmHandleFlag',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
type: 'select',
|
|
85
|
-
label: srmI18n('i18n_title_operateType', '操作类型'),
|
|
86
|
-
fieldName: 'operateType',
|
|
87
|
-
dictCode: 'srmOperateType',
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-list-layout ref="listLayoutRef" v-if="!showEditPage" :pageData="pageData" :apiUrls="apiUrls" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
//JS
|
|
7
|
+
import { defineComponent, reactive, inject } from 'vue'
|
|
8
|
+
//hook
|
|
9
|
+
import { useConfigData } from './useConfigData'
|
|
10
|
+
import { INJECT_HTTP, HttpClient, MapObjectNoneType } from '../../../utils/global.types'
|
|
11
|
+
import { message } from '@qqt-product/ui'
|
|
12
|
+
export default defineComponent({
|
|
13
|
+
name: 'QElsMsgRecordList',
|
|
14
|
+
props: {
|
|
15
|
+
userInfo: {
|
|
16
|
+
type: Object,
|
|
17
|
+
defalut: () => {
|
|
18
|
+
return {}
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
setup(props, { emit }) {
|
|
23
|
+
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
24
|
+
if (i18nKey) {
|
|
25
|
+
if (account) {
|
|
26
|
+
return account + defaultValue
|
|
27
|
+
}
|
|
28
|
+
return defaultValue
|
|
29
|
+
}
|
|
30
|
+
return defaultValue
|
|
31
|
+
})
|
|
32
|
+
const { showEditPage, apiUrls, listLayoutRef } = useConfigData()
|
|
33
|
+
// const { userInfo } = toRefs(props)
|
|
34
|
+
// console.log('userInfos', userInfo)
|
|
35
|
+
//data
|
|
36
|
+
const pageData = reactive({
|
|
37
|
+
statusConfig: {
|
|
38
|
+
show: false,
|
|
39
|
+
},
|
|
40
|
+
optionConfig: {
|
|
41
|
+
attrs: {},
|
|
42
|
+
extend: {},
|
|
43
|
+
options: [
|
|
44
|
+
{
|
|
45
|
+
type: 'view',
|
|
46
|
+
title: srmI18n('i18n_title_see', '查看'),
|
|
47
|
+
click: ({ row }) => {
|
|
48
|
+
emit('detail', row)
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
buttonConfig: {
|
|
54
|
+
attrs: {},
|
|
55
|
+
extend: {},
|
|
56
|
+
buttons: [
|
|
57
|
+
{ authorityCode: 'elsMsgRecord#ElsMsgRecord:readBatch', label: srmI18n('i18n_btn_IIZz_25b7aa44', '一键阅读'), icon: 'check', click: readBatch },
|
|
58
|
+
{
|
|
59
|
+
label: srmI18n('i18n_title_listCustom', '列自定义'),
|
|
60
|
+
icon: {
|
|
61
|
+
type: 'icon-Q-setting',
|
|
62
|
+
},
|
|
63
|
+
type: 'setting',
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
queryConfig: {
|
|
68
|
+
attrs: {},
|
|
69
|
+
extend: {},
|
|
70
|
+
form: [
|
|
71
|
+
{
|
|
72
|
+
type: 'select',
|
|
73
|
+
label: srmI18n('i18n_field_businessType', '业务类型'),
|
|
74
|
+
dictCode: 'srmBusinessType',
|
|
75
|
+
fieldName: 'businessType',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: 'select',
|
|
79
|
+
label: srmI18n('i18n_field_handleFlag', '阅读状态'),
|
|
80
|
+
fieldName: 'handleFlag',
|
|
81
|
+
dictCode: 'srmHandleFlag',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'select',
|
|
85
|
+
label: srmI18n('i18n_title_operateType', '操作类型'),
|
|
86
|
+
fieldName: 'operateType',
|
|
87
|
+
dictCode: 'srmOperateType',
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
pagerConfig: {},
|
|
92
|
+
})
|
|
93
|
+
const qHttp = inject(INJECT_HTTP) as HttpClient
|
|
94
|
+
//methods
|
|
95
|
+
|
|
96
|
+
function readBatch() {
|
|
97
|
+
let selectedRows = listLayoutRef.value.gridInstance.getCheckboxRecords()
|
|
98
|
+
if (selectedRows.length <= 0) {
|
|
99
|
+
message.warning(srmI18n('请勾选需一键阅读的消息行!', '请勾选需一键阅读的消息行!'))
|
|
100
|
+
return
|
|
101
|
+
}
|
|
102
|
+
let params = selectedRows.map((item: MapObjectNoneType) => item.id)
|
|
103
|
+
qHttp
|
|
104
|
+
.post({
|
|
105
|
+
url: apiUrls.value.readBatch,
|
|
106
|
+
data: params,
|
|
107
|
+
})
|
|
108
|
+
.then((res) => {
|
|
109
|
+
if (res.success) {
|
|
110
|
+
message.success(res.message)
|
|
111
|
+
listLayoutRef.value.fetchListData()
|
|
112
|
+
// this.$store.dispatch('updateMatTotal')
|
|
113
|
+
} else {
|
|
114
|
+
message.warning(res.message)
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return { showEditPage, apiUrls, pageData, listLayoutRef }
|
|
120
|
+
},
|
|
121
|
+
})
|
|
122
|
+
</script>
|
|
123
|
+
<style scoped></style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="edit-page">
|
|
3
3
|
<a-spin :spinning="customLoading">
|
|
4
|
-
<q-edit-page-layout ref="layoutRef" v-bind="options" @customSave="handleCustomSave" @validate-success="handleValidateSuccess"
|
|
4
|
+
<q-edit-page-layout ref="layoutRef" v-bind="options" @customSave="handleCustomSave" @validate-success="handleValidateSuccess"> </q-edit-page-layout>
|
|
5
5
|
</a-spin>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
10
|
import { ref, reactive, inject } from 'vue'
|
|
11
11
|
import type { ComponentPublicInstance } from 'vue'
|
|
12
|
-
import { BUTTON_SAVE } from '@qqt-product/ui'
|
|
13
|
-
|
|
12
|
+
import { BUTTON_SAVE, BUTTON_PUBLISH } from '@qqt-product/ui'
|
|
13
|
+
import qqtUtils from '@qqt-product/utils'
|
|
14
14
|
// ui组件库 types
|
|
15
15
|
import type { GlobalPageLayoutTypes } from '@qqt-product/ui'
|
|
16
16
|
import { usePromiseStepHook, useRefInstanceHook } from '@qqt-product/ui'
|
|
17
|
+
import type { CreatePromise } from '@qqt-product/utils'
|
|
17
18
|
|
|
18
19
|
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
19
20
|
if (i18nKey) {
|
|
@@ -39,11 +40,15 @@ const currentRow = props.currentRow
|
|
|
39
40
|
templateAccount: '',
|
|
40
41
|
busAccount: '',
|
|
41
42
|
elsAccount: '',
|
|
43
|
+
newsRedirectType: '2', // 使用类型,1-文本,2-超链接
|
|
44
|
+
portalNewsType: 'companyNews',
|
|
42
45
|
})
|
|
43
46
|
|
|
44
47
|
// 编辑组件 ref
|
|
45
48
|
const layoutRef = ref<ComponentPublicInstance | null>(null)
|
|
49
|
+
const { pageData, layoutConfig, defaultValues } = useRefInstanceHook(layoutRef)
|
|
46
50
|
|
|
51
|
+
const { createPromise } = qqtUtils
|
|
47
52
|
// 配置
|
|
48
53
|
const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
49
54
|
/**
|
|
@@ -95,14 +100,36 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
95
100
|
placeholder: srmI18n('i18n_title_selectType', '请选择类型'),
|
|
96
101
|
dictCode: 'portalNewsType',
|
|
97
102
|
required: '1',
|
|
103
|
+
defaultValue: 'companyNews',
|
|
98
104
|
},
|
|
99
105
|
{
|
|
100
106
|
groupCode: 'baseForm',
|
|
101
|
-
fieldType: '
|
|
107
|
+
fieldType: 'select',
|
|
102
108
|
fieldLabel: srmI18n('i18n_field_IBQIAc_db486758', '目标文件类型'),
|
|
103
109
|
fieldName: 'newsRedirectType',
|
|
104
110
|
placeholder: srmI18n('i18n_field_ViFIBQIAc_a9f7e04f', '请选择目标文件类型'),
|
|
105
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
|
+
},
|
|
106
133
|
},
|
|
107
134
|
{
|
|
108
135
|
groupCode: 'baseForm',
|
|
@@ -148,6 +175,14 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
148
175
|
required: '0',
|
|
149
176
|
mobile: 1,
|
|
150
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', '请输入内容'),
|
|
151
186
|
},
|
|
152
187
|
],
|
|
153
188
|
},
|
|
@@ -159,19 +194,22 @@ const options = reactive<Partial<GlobalPageLayoutTypes.EditPageLayoutProps>>({
|
|
|
159
194
|
emit: true,
|
|
160
195
|
emitKey: 'customSave',
|
|
161
196
|
args: {
|
|
162
|
-
url: '/news/elsTenantPortalNews/
|
|
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/',
|
|
163
207
|
},
|
|
164
208
|
},
|
|
165
209
|
],
|
|
166
210
|
})
|
|
167
211
|
|
|
168
|
-
|
|
169
|
-
// 所以, undefined 不能赋值为 PageButton[], 故此外需要 ts 断言
|
|
170
|
-
const pageButtons = options.pageButtons as GlobalPageLayoutTypes.PageButton[]
|
|
171
|
-
const refreshMethods = options.refreshMethods
|
|
172
|
-
|
|
173
|
-
const { pageData, layoutConfig, defaultValues } = useRefInstanceHook(layoutRef)
|
|
174
|
-
const { stepTriggerValidate, composeSave, customLoading } = usePromiseStepHook({ pageData, layoutConfig, defaultValues, pageButtons: ref(pageButtons), refreshMethods })
|
|
212
|
+
const { stepTriggerValidate, composeSave, customLoading } = usePromiseStepHook({ pageData, layoutConfig, defaultValues, options })
|
|
175
213
|
|
|
176
214
|
// 自定义保存
|
|
177
215
|
const handleCustomSave = () => {
|
|
@@ -180,17 +218,27 @@ const handleCustomSave = () => {
|
|
|
180
218
|
|
|
181
219
|
// 页面校验成功后执行下一步回调步骤
|
|
182
220
|
const handleValidateSuccess = (button: GlobalPageLayoutTypes.PageButton) => {
|
|
183
|
-
console.log('button :>> ', button)
|
|
184
221
|
if (button.key === BUTTON_SAVE.key) {
|
|
185
222
|
composeSave()
|
|
186
223
|
}
|
|
187
224
|
}
|
|
188
225
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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)
|
|
194
239
|
}
|
|
240
|
+
return createPromise(fn) as Promise<GlobalPageLayoutTypes.ExposeWithPageButtons>
|
|
195
241
|
}
|
|
242
|
+
|
|
243
|
+
// 页面刷新
|
|
196
244
|
</script>
|