@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,1895 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="page-container">
|
|
3
|
-
<div class="edit-page">
|
|
4
|
-
<a-spin size="large" :spinning="confirmLoading">
|
|
5
|
-
<div class="page-header">
|
|
6
|
-
<a-steps :current="currentStep" size="small">
|
|
7
|
-
<a-step title="基本信息" />
|
|
8
|
-
<a-step title="分组配置" />
|
|
9
|
-
<a-step title="表头配置" />
|
|
10
|
-
<a-step title="表行配置" />
|
|
11
|
-
</a-steps>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="page-content">
|
|
14
|
-
<!--step 1 -->
|
|
15
|
-
<div class="content-step-one" v-show="currentStep === 0">
|
|
16
|
-
<!--弱提示-->
|
|
17
|
-
<a-row :getterr="12" class="p-t-10-px">
|
|
18
|
-
<a-alert
|
|
19
|
-
v-if="showBusinessTips == '1'"
|
|
20
|
-
class="business-tips"
|
|
21
|
-
message="提示"
|
|
22
|
-
description="业务模板的版本升级不对历史单据产生影响,如需修改历史单据配置,请直接编辑原模板。"
|
|
23
|
-
style="margin-bottom: 10px"
|
|
24
|
-
type="info"
|
|
25
|
-
@close="alertClose"
|
|
26
|
-
closable
|
|
27
|
-
show-icon
|
|
28
|
-
/>
|
|
29
|
-
</a-row>
|
|
30
|
-
<!--表格-->
|
|
31
|
-
<a-form ref="formRef" :label-col="{ span: 7 }" :wrapper-col="{ span: 16 }" :model="form">
|
|
32
|
-
<a-row :getterr="15">
|
|
33
|
-
<a-col :span="20">
|
|
34
|
-
<a-form-item name="templateNumber" label="模板编号">
|
|
35
|
-
<a-input disabled v-model:value="form.templateNumber" placeholder="请输入模板编号" />
|
|
36
|
-
</a-form-item>
|
|
37
|
-
</a-col>
|
|
38
|
-
<a-col :span="20">
|
|
39
|
-
<a-form-item name="templateName" label="模板名称" :rules="[{ required: true, message: '请输入模板名称!' }]">
|
|
40
|
-
<a-input v-model:value="form.templateName" placeholder="请输入模板名称" />
|
|
41
|
-
</a-form-item>
|
|
42
|
-
</a-col>
|
|
43
|
-
<a-col :span="20">
|
|
44
|
-
<a-form-item name="businessType" label="业务类型" :rules="[{ required: true, message: '请选择业务类型!' }]">
|
|
45
|
-
<q-select
|
|
46
|
-
v-model:value="form.businessType"
|
|
47
|
-
:busAccount="busAccount"
|
|
48
|
-
:disabled="currentEditRow.id ? true : false"
|
|
49
|
-
dict-code="srmBusinessType"
|
|
50
|
-
placeholder="请选择业务类型"
|
|
51
|
-
show-search
|
|
52
|
-
:filter-option="filterOption"
|
|
53
|
-
@change="changeBusinessTypeEvent"
|
|
54
|
-
/>
|
|
55
|
-
<!-- <a-select v-model:value="form.businessType"></a-select> -->
|
|
56
|
-
</a-form-item>
|
|
57
|
-
</a-col>
|
|
58
|
-
<a-col :span="20">
|
|
59
|
-
<a-form-item label="模板排序">
|
|
60
|
-
<a-input-number style="width: 100%" v-model:value="form.sortOrder" :min="1" placeholder="按模板排序正序和创建时间倒序进行排序" />
|
|
61
|
-
</a-form-item>
|
|
62
|
-
</a-col>
|
|
63
|
-
<a-col :span="20">
|
|
64
|
-
<a-form-item name=" company" label="公司代码">
|
|
65
|
-
<q-select show-search :filter-option="filterOption" :busAccount="busAccount" v-model:value="form.company" :dict-code="companyCode" placeholder="请选择公司代码" />
|
|
66
|
-
</a-form-item>
|
|
67
|
-
</a-col>
|
|
68
|
-
<a-col :span="20">
|
|
69
|
-
<a-form-item name="purchaseOrg" label="采购组织">
|
|
70
|
-
<q-select show-search :filter-option="filterOption" :busAccount="busAccount" v-model:value="form.purchaseOrg" :dict-code="purchaseOrganization" placeholder="请选择采购组织" />
|
|
71
|
-
</a-form-item>
|
|
72
|
-
</a-col>
|
|
73
|
-
<a-col :span="20">
|
|
74
|
-
<a-form-item name=" purchaseGroup" label="采购组">
|
|
75
|
-
<q-select show-search :filter-option="filterOption" v-model:value="form.purchaseGroup" :dict-code="purchaseGroup" placeholder="请选择采购组" />
|
|
76
|
-
</a-form-item>
|
|
77
|
-
</a-col>
|
|
78
|
-
<a-col :span="20">
|
|
79
|
-
<a-form-item name="editLayout">
|
|
80
|
-
<template v-slot:label>
|
|
81
|
-
编辑布局
|
|
82
|
-
<a-tooltip title="暂business模板支持"> <exclamation-circle-outlined /> </a-tooltip>
|
|
83
|
-
</template>
|
|
84
|
-
<q-select show-search :filter-option="filterOption" v-model:value="form.editLayout" dict-code="srmLayout" placeholder="请选择布局样式" />
|
|
85
|
-
</a-form-item>
|
|
86
|
-
</a-col>
|
|
87
|
-
<a-col :span="20">
|
|
88
|
-
<a-form-item name="examineLayout">
|
|
89
|
-
<template v-slot:label>
|
|
90
|
-
查看/审批布局
|
|
91
|
-
<a-tooltip title="暂business模板支持">
|
|
92
|
-
<exclamation-circle-outlined />
|
|
93
|
-
</a-tooltip>
|
|
94
|
-
</template>
|
|
95
|
-
<q-select show-search :filter-option="filterOption" v-model:value="form.examineLayout" dict-code="srmLayout" placeholder="请选择布局样式" />
|
|
96
|
-
</a-form-item>
|
|
97
|
-
</a-col>
|
|
98
|
-
<a-col :span="20">
|
|
99
|
-
<a-form-item name="templateVersion" label="版本号">
|
|
100
|
-
<a-input disabled v-model:value="form.templateVersion" />
|
|
101
|
-
</a-form-item>
|
|
102
|
-
</a-col>
|
|
103
|
-
<a-col :span="20">
|
|
104
|
-
<a-form-item name="defaultType" label="是否默认">
|
|
105
|
-
<a-switch v-model:checked="form.defaultTypeFlag" @change="changeDefaultType" />
|
|
106
|
-
</a-form-item>
|
|
107
|
-
</a-col>
|
|
108
|
-
<a-col :span="20">
|
|
109
|
-
<a-form-item name="extend" label="扩展">
|
|
110
|
-
<q-code-editor-model v-if="currentStep === 0" :value="form.extend ? form.extend : ''" @handleSureClick="codeEditorSureClick"></q-code-editor-model>
|
|
111
|
-
</a-form-item>
|
|
112
|
-
</a-col>
|
|
113
|
-
</a-row>
|
|
114
|
-
</a-form>
|
|
115
|
-
<!-- <a-spin class="skeleton-wrap" name="skeleton"> 正在从缓存拉取数据</a-spin> -->
|
|
116
|
-
</div>
|
|
117
|
-
<!--step 2-->
|
|
118
|
-
<div v-show="currentStep === 1" class="content-step-trow">
|
|
119
|
-
<div id="groupGrid">
|
|
120
|
-
<vxe-grid
|
|
121
|
-
border
|
|
122
|
-
:row-config="{ useKey: true }"
|
|
123
|
-
auto-resize
|
|
124
|
-
resizable
|
|
125
|
-
row-key
|
|
126
|
-
column-key
|
|
127
|
-
highlight-hover-row
|
|
128
|
-
show-overflow
|
|
129
|
-
ref="groupGrid"
|
|
130
|
-
:height="gridHeight"
|
|
131
|
-
size="mini"
|
|
132
|
-
:checkbox-config="{ highlight: true, trigger: 'row' }"
|
|
133
|
-
:columns="groupColumns"
|
|
134
|
-
:data="groupData"
|
|
135
|
-
:scrollY="{ enabled: false }"
|
|
136
|
-
:edit-config="{ trigger: 'click', mode: 'row' }"
|
|
137
|
-
:edit-rules="groupRules"
|
|
138
|
-
:toolbar-config="{ slots: { buttons: 'toolbar_buttons' }, perfect: true }"
|
|
139
|
-
header-align="center"
|
|
140
|
-
align="center"
|
|
141
|
-
>
|
|
142
|
-
<template #drag_btn_default>
|
|
143
|
-
<span class="drag-btn" style="cursor: move">
|
|
144
|
-
<i class="vxe-icon--menu"></i>
|
|
145
|
-
</span>
|
|
146
|
-
</template>
|
|
147
|
-
<template #drag_btn_header>
|
|
148
|
-
<vxe-tooltip content="按住后可以上下拖动排序" enterable>
|
|
149
|
-
<i class="vxe-icon--question"></i>
|
|
150
|
-
</vxe-tooltip>
|
|
151
|
-
</template>
|
|
152
|
-
<template #group_filter="{ column, $panel }">
|
|
153
|
-
<div>
|
|
154
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
155
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
</template>
|
|
159
|
-
<template #extend_col_render="{ row, column }">
|
|
160
|
-
<q-code-editor-model
|
|
161
|
-
v-if="currentStep === 1"
|
|
162
|
-
:value="row[column.property] ? row[column.property] : ''"
|
|
163
|
-
@handleSureClick="
|
|
164
|
-
(content:customConfigEdits.MapObjectNoneType) => {
|
|
165
|
-
{
|
|
166
|
-
row[column.property] = content
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
"
|
|
170
|
-
></q-code-editor-model>
|
|
171
|
-
</template>
|
|
172
|
-
<template #toolbar_buttons>
|
|
173
|
-
<a-button type="primary" @click="() => groupGridAddEvent()"> 添加 </a-button>
|
|
174
|
-
<a-button @click="() => gridDeleteEvent('groupGridRef')"> 删除</a-button>
|
|
175
|
-
</template>
|
|
176
|
-
</vxe-grid>
|
|
177
|
-
</div>
|
|
178
|
-
<!-- <a-spin class="skeleton-wrap" slot="skeleton">{{ $srmI18n(`${$getLangAccount()}#i18n_alert_iKNSMnMWF_76e1a399`, '正在从缓存拉取数据') }}</a-spin> -->
|
|
179
|
-
</div>
|
|
180
|
-
<!--step 3-->
|
|
181
|
-
<div v-show="currentStep === 2" class="content-step-three">
|
|
182
|
-
<div id="headGrid" @after-enter="headRowDrop">
|
|
183
|
-
<vxe-grid
|
|
184
|
-
border
|
|
185
|
-
auto-resize
|
|
186
|
-
resizable
|
|
187
|
-
column-key
|
|
188
|
-
row-key
|
|
189
|
-
show-header-overflow
|
|
190
|
-
highlight-hover-row
|
|
191
|
-
show-overflow
|
|
192
|
-
ref="headGrid"
|
|
193
|
-
:height="gridHeight"
|
|
194
|
-
size="mini"
|
|
195
|
-
:checkbox-config="{ highlight: true, trigger: 'row' }"
|
|
196
|
-
:columns="headColumns"
|
|
197
|
-
:data="headData"
|
|
198
|
-
:scrollY="{ enabled: false }"
|
|
199
|
-
:edit-config="{ trigger: 'click', mode: 'cell', activeMethod: activeCellMethod }"
|
|
200
|
-
:edit-rules="headRules"
|
|
201
|
-
:sort-config="{ trigger: 'cell', remote: false }"
|
|
202
|
-
@edit-actived="editActivedEvent"
|
|
203
|
-
:toolbar-config="{ slots: { buttons: 'toolbar_buttons' }, perfect: true }"
|
|
204
|
-
align="center"
|
|
205
|
-
header-align="center"
|
|
206
|
-
>
|
|
207
|
-
<template #drag_btn_default>
|
|
208
|
-
<span class="drag-btn" style="cursor: move">
|
|
209
|
-
<i class="vxe-icon--menu"></i>
|
|
210
|
-
</span>
|
|
211
|
-
</template>
|
|
212
|
-
<template #drag_btn_header>
|
|
213
|
-
<vxe-tooltip content="按住后可以上下拖动排序" enterable>
|
|
214
|
-
<i class="vxe-icon--question"></i>
|
|
215
|
-
</vxe-tooltip>
|
|
216
|
-
</template>
|
|
217
|
-
|
|
218
|
-
<template #default_span="{ row, column }">
|
|
219
|
-
<span>{{ row[column.property] }}</span>
|
|
220
|
-
</template>
|
|
221
|
-
|
|
222
|
-
<template #fieldName_edit="{ row, column }">
|
|
223
|
-
<vxe-input v-if="busAccount == '100000'" v-model:value="row[column.property]" />
|
|
224
|
-
<span v-else>{{ row[column.property] }}</span>
|
|
225
|
-
</template>
|
|
226
|
-
|
|
227
|
-
<template #toolbar_buttons>
|
|
228
|
-
<a-button type="primary" @click="() => headGridAddEvent()"> 新增 </a-button>
|
|
229
|
-
<a-button @click="() => gridDeleteEvent('headGridRef')"> 删除</a-button>
|
|
230
|
-
<a-button @click="() => exportHeadEvent()"> 导出</a-button>
|
|
231
|
-
</template>
|
|
232
|
-
<template #custom_render="{ row }">
|
|
233
|
-
<a @click="() => showDictModal(row)">{{ row.dictCode || '请选择' }}</a>
|
|
234
|
-
<close-circle-outlined v-show="row.dictCode" style="margin-left: 6px" @click="() => removeDictCode(row)" />
|
|
235
|
-
</template>
|
|
236
|
-
|
|
237
|
-
<template #switch_render="{ row, column }">
|
|
238
|
-
<vxe-switch :disabled="column.property === 'sys' && busAccount !== '100000'" close-value="0" open-value="1" v-model="row[column.property]"></vxe-switch>
|
|
239
|
-
</template>
|
|
240
|
-
|
|
241
|
-
<template #groupCode_filter="{ column, $panel }">
|
|
242
|
-
<div>
|
|
243
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
244
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
245
|
-
</div>
|
|
246
|
-
</div>
|
|
247
|
-
</template>
|
|
248
|
-
|
|
249
|
-
<template #group_filter="{ column, $panel }">
|
|
250
|
-
<div>
|
|
251
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
252
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
253
|
-
</div>
|
|
254
|
-
</div>
|
|
255
|
-
</template>
|
|
256
|
-
|
|
257
|
-
<template #fieldName_filter="{ column, $panel }">
|
|
258
|
-
<div>
|
|
259
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
260
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
261
|
-
</div>
|
|
262
|
-
</div>
|
|
263
|
-
</template>
|
|
264
|
-
|
|
265
|
-
<template #fieldLabel_filter="{ column, $panel }">
|
|
266
|
-
<div>
|
|
267
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
268
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
269
|
-
</div>
|
|
270
|
-
</div>
|
|
271
|
-
</template>
|
|
272
|
-
|
|
273
|
-
<template #extend_col_render="{ row, column }">
|
|
274
|
-
<q-code-editor-model
|
|
275
|
-
v-if="currentStep === 2"
|
|
276
|
-
:value="row[column.property] ? row[column.property] : ''"
|
|
277
|
-
@handleSureClick="
|
|
278
|
-
(content:customConfigEdits.MapObjectNoneType) => {
|
|
279
|
-
{
|
|
280
|
-
row[column.property] = content
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
"
|
|
284
|
-
></q-code-editor-model>
|
|
285
|
-
</template>
|
|
286
|
-
|
|
287
|
-
<!-- <template #calculate_col_render="{ row, column }">
|
|
288
|
-
<q-code-editor-model
|
|
289
|
-
:value="row[column.property] ? row[column.property] : ''"
|
|
290
|
-
@handleSureClick="
|
|
291
|
-
(content:customConfigEdits.MapObjectNoneType) => {
|
|
292
|
-
{
|
|
293
|
-
row[column.property] = content
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
"
|
|
297
|
-
></q-code-editor-model>
|
|
298
|
-
</template> -->
|
|
299
|
-
|
|
300
|
-
<template #summary_render="params">
|
|
301
|
-
<vxe-switch close-value="0" open-value="1" @change="rowChangeSummary(params)" v-model="params.row[params.column.property]"></vxe-switch>
|
|
302
|
-
</template>
|
|
303
|
-
<template #custom_more_property_render="params">
|
|
304
|
-
<a-button @click="showDrawer(params)" type="primary" size="small"> 更多配置</a-button>
|
|
305
|
-
</template>
|
|
306
|
-
</vxe-grid>
|
|
307
|
-
</div>
|
|
308
|
-
<!-- <a-spin class="skeleton-wrap" slot="skeleton">{{ $srmI18n(`${$getLangAccount()}#i18n_alert_iKNSMnMWF_76e1a399`, '正在从缓存拉取数据') }}</a-spin> -->
|
|
309
|
-
<!-- </vue-lazy-component> -->
|
|
310
|
-
</div>
|
|
311
|
-
<!--step 4-->
|
|
312
|
-
<div v-show="currentStep === 3" class="content-step-four">
|
|
313
|
-
<div id="itemGrid" @after-enter="itemRowDrop">
|
|
314
|
-
<vxe-grid
|
|
315
|
-
border
|
|
316
|
-
auto-resize
|
|
317
|
-
resizable
|
|
318
|
-
column-key
|
|
319
|
-
row-key
|
|
320
|
-
show-header-overflow
|
|
321
|
-
highlight-hover-row
|
|
322
|
-
show-overflow
|
|
323
|
-
ref="itemGrid"
|
|
324
|
-
:height="gridHeight"
|
|
325
|
-
size="mini"
|
|
326
|
-
:checkbox-config="{ highlight: true, trigger: 'row' }"
|
|
327
|
-
:columns="itemColumns"
|
|
328
|
-
:data="itemData"
|
|
329
|
-
:scrollY="{ enabled: false }"
|
|
330
|
-
:edit-config="{ trigger: 'click', mode: 'cell', activeMethod: activeCellMethod }"
|
|
331
|
-
:edit-rules="itemRules"
|
|
332
|
-
:sort-config="{ trigger: 'cell', remote: false }"
|
|
333
|
-
@edit-actived="editActivedEvent"
|
|
334
|
-
:toolbar-config="{ slots: { buttons: 'toolbar_buttons' }, perfect: true }"
|
|
335
|
-
align="center"
|
|
336
|
-
header-align="center"
|
|
337
|
-
>
|
|
338
|
-
<template #drag_btn_default>
|
|
339
|
-
<span class="drag-btn" style="cursor: move">
|
|
340
|
-
<i class="vxe-icon--menu"></i>
|
|
341
|
-
</span>
|
|
342
|
-
</template>
|
|
343
|
-
<template #drag_btn_header>
|
|
344
|
-
<vxe-tooltip content="按住后可以上下拖动排序" enterable>
|
|
345
|
-
<i class="vxe-icon--question"></i>
|
|
346
|
-
</vxe-tooltip>
|
|
347
|
-
</template>
|
|
348
|
-
|
|
349
|
-
<template #default_span="{ row, column }">
|
|
350
|
-
<span>{{ row[column.property] }}</span>
|
|
351
|
-
</template>
|
|
352
|
-
|
|
353
|
-
<template #fieldName_edit="{ row, column }">
|
|
354
|
-
<vxe-input v-if="busAccount == '100000'" v-model:value="row[column.property]" />
|
|
355
|
-
<span v-else>{{ row[column.property] }}</span>
|
|
356
|
-
</template>
|
|
357
|
-
|
|
358
|
-
<template #toolbar_buttons>
|
|
359
|
-
<a-button type="primary" @click="() => headItemAddEvent()"> 新增 </a-button>
|
|
360
|
-
<a-button @click="() => gridDeleteEvent('itemGrid')"> 删除</a-button>
|
|
361
|
-
<a-button @click="() => exportItemEvent()"> 导出</a-button>
|
|
362
|
-
</template>
|
|
363
|
-
<template #custom_render="{ row }">
|
|
364
|
-
<a @click="() => showDictModal(row)">{{ row.dictCode || '请选择' }}</a>
|
|
365
|
-
<close-circle-outlined v-show="row.dictCode" style="margin-left: 6px" @click="() => removeDictCode(row)" />
|
|
366
|
-
</template>
|
|
367
|
-
|
|
368
|
-
<template #switch_render="{ row, column }">
|
|
369
|
-
<vxe-switch :disabled="column.property === 'sys' && busAccount !== '100000'" close-value="0" open-value="1" v-model="row[column.property]"></vxe-switch>
|
|
370
|
-
</template>
|
|
371
|
-
|
|
372
|
-
<template #groupCode_filter="{ column, $panel }">
|
|
373
|
-
<div>
|
|
374
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
375
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
376
|
-
</div>
|
|
377
|
-
</div>
|
|
378
|
-
</template>
|
|
379
|
-
|
|
380
|
-
<template #group_filter="{ column, $panel }">
|
|
381
|
-
<div>
|
|
382
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
383
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
384
|
-
</div>
|
|
385
|
-
</div>
|
|
386
|
-
</template>
|
|
387
|
-
|
|
388
|
-
<template #fieldName_filter="{ column, $panel }">
|
|
389
|
-
<div>
|
|
390
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
391
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
392
|
-
</div>
|
|
393
|
-
</div>
|
|
394
|
-
</template>
|
|
395
|
-
|
|
396
|
-
<template #fieldLabel_filter="{ column, $panel }">
|
|
397
|
-
<div>
|
|
398
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
399
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
400
|
-
</div>
|
|
401
|
-
</div>
|
|
402
|
-
</template>
|
|
403
|
-
|
|
404
|
-
<template #extend_col_render="{ row, column }">
|
|
405
|
-
<q-code-editor-model
|
|
406
|
-
v-if="currentStep === 3"
|
|
407
|
-
:value="row[column.property] ? row[column.property] : ''"
|
|
408
|
-
@handleSureClick="
|
|
409
|
-
(content:customConfigEdits.MapObjectNoneType) => {
|
|
410
|
-
{
|
|
411
|
-
row[column.property] = content
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
"
|
|
415
|
-
></q-code-editor-model>
|
|
416
|
-
</template>
|
|
417
|
-
|
|
418
|
-
<!-- <template #calculate_col_render="{ row, column }">
|
|
419
|
-
<q-code-editor-model
|
|
420
|
-
:value="row[column.property] ? row[column.property] : ''"
|
|
421
|
-
@handleSureClick="
|
|
422
|
-
(content:customConfigEdits.MapObjectNoneType) => {
|
|
423
|
-
{
|
|
424
|
-
row[column.property] = content
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
"
|
|
428
|
-
></q-code-editor-model>
|
|
429
|
-
</template> -->
|
|
430
|
-
|
|
431
|
-
<template #summary_render="params">
|
|
432
|
-
<vxe-switch close-value="0" open-value="1" @change="rowChangeSummary(params)" v-model="params.row[params.column.property]"></vxe-switch>
|
|
433
|
-
</template>
|
|
434
|
-
<template #custom_more_property_render="params">
|
|
435
|
-
<a-button @click="showDrawer(params)" type="primary" size="small"> 更多配置</a-button>
|
|
436
|
-
</template>
|
|
437
|
-
</vxe-grid>
|
|
438
|
-
</div>
|
|
439
|
-
<!-- <a-spin class="skeleton-wrap" slot="skeleton">{{ $srmI18n(`${$getLangAccount()}#i18n_alert_iKNSMnMWF_76e1a399`, '正在从缓存拉取数据') }}</a-spin> -->
|
|
440
|
-
<!-- </vue-lazy-component> -->
|
|
441
|
-
</div>
|
|
442
|
-
</div>
|
|
443
|
-
|
|
444
|
-
<div class="page-footer">
|
|
445
|
-
<a-button v-show="currentStep > 0" @click="preSetup"> 上一步</a-button>
|
|
446
|
-
<a-button v-show="currentStep < 3" type="primary" style="margin-left: 6px" @click="currentStepEmit"> 下一步 </a-button>
|
|
447
|
-
<a-button v-show="currentStep == 3" style="margin-left: 6px" type="primary" @click="saveEvent('')">保存</a-button>
|
|
448
|
-
<a-button v-show="currentStep == 3" style="margin-left: 6px" type="primary" @click="saveEvent('publish')"> 生成配置 </a-button>
|
|
449
|
-
<!-- <a-button v-show="currentStep == 3" style="margin-left: 6px" type="primary" @click="tempaltePreview"> 预览</a-button> -->
|
|
450
|
-
<a-button type="default" style="margin-left: 6px" @click="handleReturn"> 返回</a-button>
|
|
451
|
-
</div>
|
|
452
|
-
</a-spin>
|
|
453
|
-
</div>
|
|
454
|
-
<!--新增-->
|
|
455
|
-
<vxe-modal v-model="visible" width="960" title="字段选择" type="confirm" show-footer @confirm="selectedHeadOk">
|
|
456
|
-
<vxe-grid border resizable height="350" row-id="id" size="mini" ref="selectGrid" :data="fieldData" :checkbox-config="{ highlight: true, reserve: true, trigger: 'row' }" :columns="fieldColumns">
|
|
457
|
-
<template #groupCode_filter="{ column, $panel }">
|
|
458
|
-
<div>
|
|
459
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
460
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
461
|
-
</div>
|
|
462
|
-
</div>
|
|
463
|
-
</template>
|
|
464
|
-
<template #fieldName_filter="{ column, $panel }">
|
|
465
|
-
<div>
|
|
466
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
467
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
468
|
-
</div>
|
|
469
|
-
</div>
|
|
470
|
-
</template>
|
|
471
|
-
<template #fieldLabel_filter="{ column, $panel }">
|
|
472
|
-
<div>
|
|
473
|
-
<div v-for="(option, index) in column.filters" :key="index">
|
|
474
|
-
<input type="type" v-model="option.data" @input="(evnt) => changeFilterEvent(evnt, option, $panel)" />
|
|
475
|
-
</div>
|
|
476
|
-
</div>
|
|
477
|
-
</template>
|
|
478
|
-
</vxe-grid>
|
|
479
|
-
</vxe-modal>
|
|
480
|
-
<!--数据字典弹窗-->
|
|
481
|
-
<AddDictCodeModal ref="dictCodeModal" @ok="fieldSelectOk" />
|
|
482
|
-
<!--更多配置-->
|
|
483
|
-
<a-drawer title="扩展属性" placement="right" :destroyOnClose="true" width="640" :visible="drawerVisible" @close="drawerVisible = false">
|
|
484
|
-
<a-tabs type="card">
|
|
485
|
-
<a-tab-pane class="tab-pane-business-inner" v-for="tab of commonDevelopTabs" :key="tab.field" :tab="tab.title">
|
|
486
|
-
<!-- 开发增强 -->
|
|
487
|
-
<template v-if="tab.field === 'developPlus' && tab.children.length">
|
|
488
|
-
<!-- 代码编辑器类型 -->
|
|
489
|
-
<template v-for="(tabItem, verifyIdx) of tab.children">
|
|
490
|
-
<a-row class="code-editror-flex-row" v-if="codeEditorFields.includes(tabItem.field)" :key="verifyIdx">
|
|
491
|
-
<a-row class="code-editror-flex-row" style="margin-bottom: 8px; margin-top: 8px">
|
|
492
|
-
<span>{{ tabItem.title }}</span
|
|
493
|
-
>:<a-button style="margin-left: 4px" size="small" @click="showSample(tabItem.field)">示例</a-button>
|
|
494
|
-
</a-row>
|
|
495
|
-
<a-row class="code-editror-flex-row">
|
|
496
|
-
<q-code-editor-model
|
|
497
|
-
showLabel="textarea"
|
|
498
|
-
:value="currentDrawer[tabItem.field] ? currentDrawer[tabItem.field] : ''"
|
|
499
|
-
@handleSureClick="
|
|
500
|
-
(content:customConfigEdits.MapObjectNoneType) => {
|
|
501
|
-
{
|
|
502
|
-
currentDrawer[tabItem.field] = content
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
"
|
|
506
|
-
></q-code-editor-model>
|
|
507
|
-
</a-row>
|
|
508
|
-
</a-row>
|
|
509
|
-
<!-- 计算公式 -->
|
|
510
|
-
<a-row class="code-editror-flex-row" v-if="tabItem.field === 'formula'" :key="verifyIdx">
|
|
511
|
-
<a-row class="verify-config code-editror-flex-ro" style="margin-bottom: 8px; margin-top: 8px">
|
|
512
|
-
<span>{{ tabItem.title }}</span
|
|
513
|
-
>:
|
|
514
|
-
<a-button :disabled="currentDrawer.fieldType !== 'computed'" style="margin-left: 4px" size="small" @click="showSample('formula')">示例</a-button>
|
|
515
|
-
</a-row>
|
|
516
|
-
<a-row class="verify-config code-editror-flex-row">
|
|
517
|
-
<q-code-editor-model
|
|
518
|
-
showLabel="textarea"
|
|
519
|
-
:disabled="currentDrawer.fieldType !== 'computed'"
|
|
520
|
-
:value="currentDrawer[tabItem.field] ? currentDrawer[tabItem.field] : ''"
|
|
521
|
-
@handleSureClick="
|
|
522
|
-
(content:customConfigEdits.MapObjectNoneType) => {
|
|
523
|
-
{
|
|
524
|
-
currentDrawer[tabItem.field] = content
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
"
|
|
528
|
-
></q-code-editor-model>
|
|
529
|
-
</a-row>
|
|
530
|
-
</a-row>
|
|
531
|
-
</template>
|
|
532
|
-
</template>
|
|
533
|
-
<!-- 开关类型 -->
|
|
534
|
-
<template v-if="tab.field === 'switchConfig' && tab.children.length">
|
|
535
|
-
<div class="switch-config" v-if="tab.children.length >= 2 && currentStep == 3">
|
|
536
|
-
<template v-for="(tabItem, index) of tab.children">
|
|
537
|
-
<div v-if="switchFields.includes(tabItem.field)" class="switch-config-item" :key="index">
|
|
538
|
-
<div>
|
|
539
|
-
{{ tabItem.title }}
|
|
540
|
-
<a-tooltip v-if="tabItem.helpText" :title="tabItem.helpText">
|
|
541
|
-
<question-circle-outlined />
|
|
542
|
-
</a-tooltip>
|
|
543
|
-
</div>
|
|
544
|
-
<q-switch :disabled="tabItem.disabled || (tabItem.field === 'sys' && busAccount !== '100000')" :configData="currentDrawer" v-model="currentDrawer[tabItem.field]" />
|
|
545
|
-
</div>
|
|
546
|
-
<div v-if="tabItem.field === 'fold' && currentStep == 3" class="switch-config-item" :key="index">
|
|
547
|
-
<div>
|
|
548
|
-
{{ tabItem.title }}
|
|
549
|
-
<a-tooltip v-if="tabItem.helpText" :title="tabItem.helpText">
|
|
550
|
-
<question-circle-outlined />
|
|
551
|
-
</a-tooltip>
|
|
552
|
-
</div>
|
|
553
|
-
<q-switch :disabled="tabItem.disabled" :configData="currentDrawer" v-model="currentDrawer[tabItem.field]" />
|
|
554
|
-
</div>
|
|
555
|
-
<div v-if="tabItem.field === 'sum'" class="switch-config-item" :key="index">
|
|
556
|
-
<div>{{ tabItem.title }}</div>
|
|
557
|
-
<q-switch @change="changeSummary(currentDrawer)" :configData="currentDrawer" v-model="currentDrawer[tabItem.field]" />
|
|
558
|
-
</div>
|
|
559
|
-
<div v-if="tabItem.field === 'fixType' && currentStep == 3" class="switch-config-item" :key="index">
|
|
560
|
-
<div>{{ tabItem.title }}</div>
|
|
561
|
-
<q-radio @change="changeFixSummary(currentDrawer)" :configData="currentDrawer" v-model="currentDrawer[tabItem.field]" dictCode="fixType" />
|
|
562
|
-
</div>
|
|
563
|
-
</template>
|
|
564
|
-
</div>
|
|
565
|
-
<div class="switch-config" v-else>
|
|
566
|
-
<template>
|
|
567
|
-
<div>暂无配置</div>
|
|
568
|
-
</template>
|
|
569
|
-
</div>
|
|
570
|
-
</template>
|
|
571
|
-
<template v-if="tab.field === 'verifyConfig' && tab.children.length">
|
|
572
|
-
<a-row v-for="(tabItem, verifyIdx) of tab.children" class="verify-config" :key="verifyIdx">
|
|
573
|
-
<template v-if="tabItem.field === 'dataFormat'">
|
|
574
|
-
<a-col :span="6" class="tab-clo-left"> {{ tabItem.title }}: </a-col>
|
|
575
|
-
<a-col :span="18">
|
|
576
|
-
<dataFormatComponent :configData="currentDrawer" :tabInfo="tabItem" @change="(newValue) => (currentDrawer[tabItem.field] = newValue)" :value="currentDrawer[tabItem.field]" />
|
|
577
|
-
</a-col>
|
|
578
|
-
</template>
|
|
579
|
-
<template v-if="tabItem.field === 'regex'">
|
|
580
|
-
<a-col :span="6" class="tab-clo-left"> {{ tabItem.title }}: </a-col>
|
|
581
|
-
<a-col :span="18">
|
|
582
|
-
<regexComponent
|
|
583
|
-
:configData="currentDrawer"
|
|
584
|
-
:tabInfo="tabItem"
|
|
585
|
-
@updateInfo="
|
|
586
|
-
({ msg }) => {
|
|
587
|
-
currentDrawer.alertMsg = msg
|
|
588
|
-
}
|
|
589
|
-
"
|
|
590
|
-
v-model="currentDrawer[tabItem.field]"
|
|
591
|
-
/>
|
|
592
|
-
</a-col>
|
|
593
|
-
</template>
|
|
594
|
-
<template v-if="tabItem.field === 'alertMsg'">
|
|
595
|
-
<a-col :span="6" class="tab-clo-left"> {{ tabItem.title }}: </a-col>
|
|
596
|
-
<a-col :span="18">
|
|
597
|
-
<a-input
|
|
598
|
-
v-model:value="currentDrawer[tabItem.field]"
|
|
599
|
-
@change="
|
|
600
|
-
() => {
|
|
601
|
-
currentDrawer.alertMsgI18nKey = ''
|
|
602
|
-
}
|
|
603
|
-
"
|
|
604
|
-
/>
|
|
605
|
-
</a-col>
|
|
606
|
-
</template>
|
|
607
|
-
<template v-if="tabItem.field === 'alertMsgI18nKey'">
|
|
608
|
-
<a-col :span="6" class="tab-clo-left"> {{ tabItem.title }}: </a-col>
|
|
609
|
-
<a-col :span="18">
|
|
610
|
-
<a-input v-model:value="currentDrawer[tabItem.field]" />
|
|
611
|
-
</a-col>
|
|
612
|
-
</template> </a-row
|
|
613
|
-
></template>
|
|
614
|
-
</a-tab-pane>
|
|
615
|
-
</a-tabs>
|
|
616
|
-
</a-drawer>
|
|
617
|
-
<!--更多配置实例-->
|
|
618
|
-
|
|
619
|
-
<!-- <codemirror v-if="editorModalFlag" v-model="sampleCode" :options="editorOption"> </codemirror> -->
|
|
620
|
-
<q-code-editor-model
|
|
621
|
-
:zIndex="1001"
|
|
622
|
-
:isAllowToOpenMode="true"
|
|
623
|
-
:editorModalFlag="editorModalFlag"
|
|
624
|
-
:value="sampleCode ? sampleCode : ''"
|
|
625
|
-
@handleSureClose="sampleSureClose"
|
|
626
|
-
@handleSureClick="sampleSureClick"
|
|
627
|
-
></q-code-editor-model>
|
|
628
|
-
<!-- {{ currentRow }} -->
|
|
629
|
-
<!--预览功能-->
|
|
630
|
-
<TempalePreviewModal :currentEditRow="currentRow" v-model:openTure="perviewOpen" />
|
|
631
|
-
</div>
|
|
632
|
-
</template>
|
|
633
|
-
|
|
634
|
-
<script lang="ts">
|
|
635
|
-
//JS引入
|
|
636
|
-
import { defineComponent, reactive, inject, onMounted, toRefs, nextTick, shallowReactive, ref } from 'vue'
|
|
637
|
-
import Sortable from 'sortablejs'
|
|
638
|
-
//组件
|
|
639
|
-
import { message } from '@qqt-product/ui'
|
|
640
|
-
import AddDictCodeModal from '../component/AddDictCodeModal.vue'
|
|
641
|
-
import dataFormatComponent from '../component/dataFormatComponent'
|
|
642
|
-
import regexComponent from '../component/regexComponent'
|
|
643
|
-
import TempalePreviewModal from '../component/TempalePreviewModal.vue'
|
|
644
|
-
//ts
|
|
645
|
-
import * as customConfigEdits from './types'
|
|
646
|
-
import type { VxeTableDefines, VxeGridDefines } from 'vxe-table'
|
|
647
|
-
import { useConfigData } from './useConfigData'
|
|
648
|
-
import { useConfigComputed } from './useConfigComputed'
|
|
649
|
-
import { useConfigMethods, useConfigElsAccountMethods, useConigApiMethods } from './useConfigMethods'
|
|
650
|
-
import { useColumnSlots } from './QcustomConfigRender'
|
|
651
|
-
import { EditSample, url } from './useConstant'
|
|
652
|
-
import qqtUtils from '@qqt-product/utils'
|
|
653
|
-
import { CloseCircleOutlined, QuestionCircleOutlined, ExclamationCircleOutlined } from '@ant-design/icons-vue'
|
|
654
|
-
export default defineComponent({
|
|
655
|
-
name: 'QcustomConfigEdit',
|
|
656
|
-
emits: ['handleReturn'],
|
|
657
|
-
components: {
|
|
658
|
-
AddDictCodeModal,
|
|
659
|
-
dataFormatComponent,
|
|
660
|
-
regexComponent,
|
|
661
|
-
TempalePreviewModal,
|
|
662
|
-
CloseCircleOutlined,
|
|
663
|
-
QuestionCircleOutlined,
|
|
664
|
-
ExclamationCircleOutlined,
|
|
665
|
-
},
|
|
666
|
-
props: {
|
|
667
|
-
busAccount: {
|
|
668
|
-
type: String,
|
|
669
|
-
default: '100000',
|
|
670
|
-
},
|
|
671
|
-
currentEditRow: {
|
|
672
|
-
type: Object,
|
|
673
|
-
default() {
|
|
674
|
-
return {
|
|
675
|
-
id: '',
|
|
676
|
-
}
|
|
677
|
-
},
|
|
678
|
-
},
|
|
679
|
-
},
|
|
680
|
-
|
|
681
|
-
setup(props, { emit }) {
|
|
682
|
-
//inject
|
|
683
|
-
const qHttp = inject(customConfigEdits.INJECT_HTTP) as customConfigEdits.HttpClient
|
|
684
|
-
const { currentEditRow, busAccount } = toRefs(props)
|
|
685
|
-
//常量
|
|
686
|
-
/*
|
|
687
|
-
data
|
|
688
|
-
*/
|
|
689
|
-
const {
|
|
690
|
-
switchFields,
|
|
691
|
-
nowFieldType,
|
|
692
|
-
editorModalFlag,
|
|
693
|
-
codeEditorFields,
|
|
694
|
-
drawerVisible,
|
|
695
|
-
currentDictRow,
|
|
696
|
-
dictCodeModal,
|
|
697
|
-
currentDrawer,
|
|
698
|
-
selectGrid,
|
|
699
|
-
formRef,
|
|
700
|
-
groupGrid,
|
|
701
|
-
form,
|
|
702
|
-
confirmLoading,
|
|
703
|
-
currentStep,
|
|
704
|
-
companyCode,
|
|
705
|
-
purchaseOrganization,
|
|
706
|
-
purchaseGroup,
|
|
707
|
-
groupData,
|
|
708
|
-
headGrid,
|
|
709
|
-
fieldTypeOptain,
|
|
710
|
-
fieldData,
|
|
711
|
-
visible,
|
|
712
|
-
currentItemGrid,
|
|
713
|
-
sampleCode,
|
|
714
|
-
itemGrid,
|
|
715
|
-
remoteJsFilePath,
|
|
716
|
-
perviewOpen,
|
|
717
|
-
currentRow,
|
|
718
|
-
} = useConfigData()
|
|
719
|
-
|
|
720
|
-
let { headData, itemData, headRules, itemRules } = useConfigData()
|
|
721
|
-
const { right_header, defaultValue_edit, defaultValue_header, purchaseOperation_defult, purchaseOperation_edit, saleOperation_default, saleOperation_edit, defaultValue_default } =
|
|
722
|
-
useColumnSlots(busAccount)
|
|
723
|
-
const { filterFieldNameMethod, removeDictCode, filterGroupCodeMethod, filterFieldLabelMethod, setGridValeByField, changeFilterEvent } = useConfigMethods()
|
|
724
|
-
const { activeCellMethod } = useConfigElsAccountMethods(busAccount)
|
|
725
|
-
const { handleExportXls } = useConigApiMethods(qHttp)
|
|
726
|
-
const groupColumns = reactive<VxeTableDefines.ColumnOptions[]>([
|
|
727
|
-
{
|
|
728
|
-
width: 60,
|
|
729
|
-
fixed: 'left',
|
|
730
|
-
slots: {
|
|
731
|
-
// 使用插槽模板渲染
|
|
732
|
-
default: 'drag_btn_default',
|
|
733
|
-
header: 'drag_btn_header',
|
|
734
|
-
},
|
|
735
|
-
},
|
|
736
|
-
{ type: 'checkbox', width: 40 },
|
|
737
|
-
{ field: 'sortOrder', title: '排序', align: 'center', width: 60 },
|
|
738
|
-
{
|
|
739
|
-
field: 'groupName',
|
|
740
|
-
title: '分组名',
|
|
741
|
-
editRender: {
|
|
742
|
-
events: {
|
|
743
|
-
change: (currentRow: object) => {
|
|
744
|
-
setGridValeByField(currentRow, 'groupNameI18nKey', '')
|
|
745
|
-
},
|
|
746
|
-
},
|
|
747
|
-
name: '$input',
|
|
748
|
-
props: { clearable: true },
|
|
749
|
-
},
|
|
750
|
-
},
|
|
751
|
-
{ field: 'groupCode', title: '分组编码', editRender: { name: '$input', props: { clearable: true } } },
|
|
752
|
-
{
|
|
753
|
-
field: 'groupType',
|
|
754
|
-
title: '分组类型',
|
|
755
|
-
editRender: {
|
|
756
|
-
name: '$select',
|
|
757
|
-
props: { clearable: true },
|
|
758
|
-
options: [
|
|
759
|
-
{ value: 'head', label: '头分组' },
|
|
760
|
-
{ value: 'item', label: '行分组' },
|
|
761
|
-
// 主要作用于表行编辑规则,分组编码 gridEditConfig,分组名表行编辑规则
|
|
762
|
-
{ value: 'gridEditConfig', label: '表行编辑规则' },
|
|
763
|
-
],
|
|
764
|
-
},
|
|
765
|
-
},
|
|
766
|
-
{ field: 'groupNameI18nKey', title: 'I18nKey' },
|
|
767
|
-
{ field: 'extend', title: '扩展', slots: { default: 'extend_col_render' } },
|
|
768
|
-
])
|
|
769
|
-
|
|
770
|
-
const filterGroupMethod = ({ option, row }: customConfigEdits.GridQConfigUnkownObj) => {
|
|
771
|
-
const groupRowData = groupData.value?.filter((item) => item.groupName.indexOf(option.data) > -1) as customConfigEdits.MapObjectNoneType[]
|
|
772
|
-
return row.groupCode.indexOf(groupRowData[0].groupCode) !== -1
|
|
773
|
-
}
|
|
774
|
-
const headColumns = reactive<VxeTableDefines.ColumnOptions[]>([
|
|
775
|
-
{
|
|
776
|
-
width: 60,
|
|
777
|
-
fixed: 'left',
|
|
778
|
-
slots: {
|
|
779
|
-
default: 'drag_btn_default',
|
|
780
|
-
header: 'drag_btn_header',
|
|
781
|
-
},
|
|
782
|
-
},
|
|
783
|
-
{ type: 'checkbox', width: 40, fixed: 'left' },
|
|
784
|
-
{ field: 'sortOrder', title: '排序', width: 80, fixed: 'left', editRender: { name: 'input' } },
|
|
785
|
-
{
|
|
786
|
-
field: 'groupCode',
|
|
787
|
-
title: '分组',
|
|
788
|
-
sortable: true,
|
|
789
|
-
width: 120,
|
|
790
|
-
fixed: 'left',
|
|
791
|
-
editRender: { name: '$select', props: { clearable: true }, options: [] },
|
|
792
|
-
filters: [{ data: '' }],
|
|
793
|
-
slots: {
|
|
794
|
-
filter: 'group_filter',
|
|
795
|
-
},
|
|
796
|
-
filterMethod: filterGroupMethod,
|
|
797
|
-
},
|
|
798
|
-
{
|
|
799
|
-
field: 'fieldName',
|
|
800
|
-
title: '字段编码',
|
|
801
|
-
width: 120,
|
|
802
|
-
fixed: 'left',
|
|
803
|
-
editRender: { name: '$input', props: { clearable: true } },
|
|
804
|
-
filters: [{ data: '' }],
|
|
805
|
-
slots: {
|
|
806
|
-
filter: 'fieldName_filter',
|
|
807
|
-
default: 'default_span',
|
|
808
|
-
edit: 'fieldName_edit',
|
|
809
|
-
},
|
|
810
|
-
filterMethod: filterFieldNameMethod,
|
|
811
|
-
},
|
|
812
|
-
{
|
|
813
|
-
field: 'fieldType',
|
|
814
|
-
title: '字段类型',
|
|
815
|
-
fixed: 'left',
|
|
816
|
-
width: 120,
|
|
817
|
-
editRender: {
|
|
818
|
-
name: '$select',
|
|
819
|
-
props: { clearable: true },
|
|
820
|
-
options: [...fieldTypeOptain],
|
|
821
|
-
},
|
|
822
|
-
},
|
|
823
|
-
{
|
|
824
|
-
field: 'fieldLabel',
|
|
825
|
-
title: '字段默认名称',
|
|
826
|
-
width: 120,
|
|
827
|
-
fixed: 'left',
|
|
828
|
-
editRender: {
|
|
829
|
-
events: {
|
|
830
|
-
change: (currentRow) => {
|
|
831
|
-
setGridValeByField(currentRow, 'fieldLabelI18nKey', '')
|
|
832
|
-
},
|
|
833
|
-
},
|
|
834
|
-
name: '$input',
|
|
835
|
-
props: { clearable: true },
|
|
836
|
-
},
|
|
837
|
-
filters: [{ data: '' }],
|
|
838
|
-
slots: {
|
|
839
|
-
filter: 'fieldLabel_filter',
|
|
840
|
-
},
|
|
841
|
-
filterMethod: filterFieldLabelMethod,
|
|
842
|
-
},
|
|
843
|
-
{
|
|
844
|
-
field: 'purchaseOperation',
|
|
845
|
-
title: '采购可操作',
|
|
846
|
-
width: 200,
|
|
847
|
-
editRender: {
|
|
848
|
-
enabled: true,
|
|
849
|
-
},
|
|
850
|
-
slots: {
|
|
851
|
-
default: purchaseOperation_defult,
|
|
852
|
-
edit: purchaseOperation_edit,
|
|
853
|
-
},
|
|
854
|
-
},
|
|
855
|
-
{
|
|
856
|
-
field: 'saleOperation',
|
|
857
|
-
title: '供应商可操作',
|
|
858
|
-
width: 200,
|
|
859
|
-
editRender: {
|
|
860
|
-
enabled: true,
|
|
861
|
-
},
|
|
862
|
-
slots: {
|
|
863
|
-
default: saleOperation_default,
|
|
864
|
-
edit: saleOperation_edit,
|
|
865
|
-
},
|
|
866
|
-
},
|
|
867
|
-
{
|
|
868
|
-
field: 'defaultValue',
|
|
869
|
-
width: 150,
|
|
870
|
-
editRender: {
|
|
871
|
-
enabled: true,
|
|
872
|
-
},
|
|
873
|
-
slots: {
|
|
874
|
-
default: defaultValue_default,
|
|
875
|
-
edit: defaultValue_edit,
|
|
876
|
-
header: defaultValue_header,
|
|
877
|
-
},
|
|
878
|
-
},
|
|
879
|
-
{ field: 'dictCode', title: '数据字典编码', width: 180, slots: { default: 'custom_render' } },
|
|
880
|
-
{ field: 'required', title: '是否必填', width: 120, slots: { default: 'switch_render' } },
|
|
881
|
-
{ field: 'sys', title: '是否系统配置', width: 120, slots: { default: 'switch_render' } },
|
|
882
|
-
{
|
|
883
|
-
field: 'audit',
|
|
884
|
-
title: '是否审批页显示',
|
|
885
|
-
width: 120,
|
|
886
|
-
slots: { default: 'switch_render' },
|
|
887
|
-
},
|
|
888
|
-
{
|
|
889
|
-
field: 'mobile',
|
|
890
|
-
title: '移动端显示',
|
|
891
|
-
width: 120,
|
|
892
|
-
slots: { default: 'switch_render' },
|
|
893
|
-
},
|
|
894
|
-
{
|
|
895
|
-
field: 'sum',
|
|
896
|
-
title: '是否汇总',
|
|
897
|
-
width: 120,
|
|
898
|
-
slots: { default: 'summary_render' },
|
|
899
|
-
},
|
|
900
|
-
{ field: 'helpText', title: '帮助说明', width: 120, editRender: { name: '$input', props: { clearable: true } } },
|
|
901
|
-
{ field: 'fieldLabelI18nKey', title: '字段名称I18nKey', width: 200 },
|
|
902
|
-
|
|
903
|
-
{
|
|
904
|
-
width: 100,
|
|
905
|
-
fixed: 'right',
|
|
906
|
-
slots: {
|
|
907
|
-
default: 'custom_more_property_render',
|
|
908
|
-
header: right_header,
|
|
909
|
-
},
|
|
910
|
-
},
|
|
911
|
-
])
|
|
912
|
-
|
|
913
|
-
const fieldColumns = reactive<VxeTableDefines.ColumnOptions[]>([
|
|
914
|
-
{ type: 'checkbox', width: 40 },
|
|
915
|
-
{ type: 'seq', width: 60 },
|
|
916
|
-
{
|
|
917
|
-
field: 'groupCode',
|
|
918
|
-
title: '分组编码',
|
|
919
|
-
filters: [{ data: '' }],
|
|
920
|
-
slots: {
|
|
921
|
-
filter: 'groupCode_filter',
|
|
922
|
-
},
|
|
923
|
-
filterMethod: filterGroupCodeMethod,
|
|
924
|
-
},
|
|
925
|
-
{
|
|
926
|
-
field: 'fieldName',
|
|
927
|
-
title: '字段名称',
|
|
928
|
-
filters: [{ data: '' }],
|
|
929
|
-
slots: {
|
|
930
|
-
filter: 'fieldName_filter',
|
|
931
|
-
},
|
|
932
|
-
filterMethod: filterFieldNameMethod,
|
|
933
|
-
},
|
|
934
|
-
{
|
|
935
|
-
field: 'fieldLabel',
|
|
936
|
-
title: '字段描述',
|
|
937
|
-
filters: [{ data: '' }],
|
|
938
|
-
slots: {
|
|
939
|
-
filter: 'fieldLabel_filter',
|
|
940
|
-
},
|
|
941
|
-
filterMethod: filterFieldLabelMethod,
|
|
942
|
-
},
|
|
943
|
-
])
|
|
944
|
-
const itemColumns = reactive<VxeTableDefines.ColumnOptions[]>([
|
|
945
|
-
{
|
|
946
|
-
width: 60,
|
|
947
|
-
fixed: 'left',
|
|
948
|
-
slots: {
|
|
949
|
-
default: 'drag_btn_default',
|
|
950
|
-
header: 'drag_btn_header',
|
|
951
|
-
},
|
|
952
|
-
},
|
|
953
|
-
{ type: 'checkbox', width: 40, fixed: 'left' },
|
|
954
|
-
{ field: 'sortOrder', title: '排序', width: 80, fixed: 'left', editRender: { name: 'input' } },
|
|
955
|
-
{
|
|
956
|
-
field: 'groupCode',
|
|
957
|
-
title: '分组',
|
|
958
|
-
sortable: true,
|
|
959
|
-
width: 120,
|
|
960
|
-
fixed: 'left',
|
|
961
|
-
editRender: { name: '$select', props: { clearable: true }, options: [] },
|
|
962
|
-
filters: [{ data: '' }],
|
|
963
|
-
slots: {
|
|
964
|
-
filter: 'group_filter',
|
|
965
|
-
},
|
|
966
|
-
filterMethod: filterGroupMethod,
|
|
967
|
-
},
|
|
968
|
-
{
|
|
969
|
-
field: 'fieldName',
|
|
970
|
-
title: '字段名',
|
|
971
|
-
width: 120,
|
|
972
|
-
fixed: 'left',
|
|
973
|
-
editRender: { enabled: true },
|
|
974
|
-
slots: {
|
|
975
|
-
default: 'default_span',
|
|
976
|
-
edit: 'fieldName_edit',
|
|
977
|
-
},
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
field: 'fieldLabel',
|
|
981
|
-
title: '字段描述',
|
|
982
|
-
width: 120,
|
|
983
|
-
fixed: 'left',
|
|
984
|
-
editRender: {
|
|
985
|
-
events: {
|
|
986
|
-
change: (currentRow) => {
|
|
987
|
-
setGridValeByField(currentRow, 'fieldLabelI18nKey', '')
|
|
988
|
-
},
|
|
989
|
-
},
|
|
990
|
-
name: '$input',
|
|
991
|
-
props: { clearable: true },
|
|
992
|
-
},
|
|
993
|
-
},
|
|
994
|
-
{
|
|
995
|
-
field: 'fieldType',
|
|
996
|
-
title: '字段类型',
|
|
997
|
-
fixed: 'left',
|
|
998
|
-
width: 120,
|
|
999
|
-
editRender: {
|
|
1000
|
-
name: '$select',
|
|
1001
|
-
props: { clearable: true },
|
|
1002
|
-
options: [...fieldTypeOptain],
|
|
1003
|
-
},
|
|
1004
|
-
},
|
|
1005
|
-
// {
|
|
1006
|
-
// field: 'fieldLabel',
|
|
1007
|
-
// title: '字段默认名称',
|
|
1008
|
-
// width: 120,
|
|
1009
|
-
// fixed: 'left',
|
|
1010
|
-
// editRender: {
|
|
1011
|
-
// events: {
|
|
1012
|
-
// change: (currentRow) => {
|
|
1013
|
-
// setGridValeByField(currentRow, 'fieldLabelI18nKey', '')
|
|
1014
|
-
// },
|
|
1015
|
-
// },
|
|
1016
|
-
// name: '$input',
|
|
1017
|
-
// props: { clearable: true },
|
|
1018
|
-
// },
|
|
1019
|
-
// filters: [{ data: '' }],
|
|
1020
|
-
// slots: {
|
|
1021
|
-
// filter: 'fieldLabel_filter',
|
|
1022
|
-
// },
|
|
1023
|
-
// filterMethod: filterFieldLabelMethod,
|
|
1024
|
-
// },
|
|
1025
|
-
{
|
|
1026
|
-
field: 'purchaseOperation',
|
|
1027
|
-
title: '采购可操作',
|
|
1028
|
-
width: 200,
|
|
1029
|
-
editRender: {
|
|
1030
|
-
enabled: true,
|
|
1031
|
-
},
|
|
1032
|
-
slots: {
|
|
1033
|
-
default: purchaseOperation_defult,
|
|
1034
|
-
edit: purchaseOperation_edit,
|
|
1035
|
-
},
|
|
1036
|
-
},
|
|
1037
|
-
{
|
|
1038
|
-
field: 'saleOperation',
|
|
1039
|
-
title: '供应商可操作',
|
|
1040
|
-
width: 200,
|
|
1041
|
-
editRender: {
|
|
1042
|
-
enabled: true,
|
|
1043
|
-
},
|
|
1044
|
-
slots: {
|
|
1045
|
-
default: saleOperation_default,
|
|
1046
|
-
edit: saleOperation_edit,
|
|
1047
|
-
},
|
|
1048
|
-
},
|
|
1049
|
-
{
|
|
1050
|
-
field: 'defaultValue',
|
|
1051
|
-
width: 150,
|
|
1052
|
-
editRender: {
|
|
1053
|
-
enabled: true,
|
|
1054
|
-
},
|
|
1055
|
-
slots: {
|
|
1056
|
-
default: defaultValue_default,
|
|
1057
|
-
edit: defaultValue_edit,
|
|
1058
|
-
header: defaultValue_header,
|
|
1059
|
-
},
|
|
1060
|
-
},
|
|
1061
|
-
{ field: 'dictCode', title: '数据字典编码', width: 180, slots: { default: 'custom_render' } },
|
|
1062
|
-
{ field: 'columnWidth', title: '宽度', width: 120, editRender: { name: '$input', props: { clearable: true } } },
|
|
1063
|
-
{
|
|
1064
|
-
field: 'columnAlign',
|
|
1065
|
-
title: '对齐方式',
|
|
1066
|
-
width: 120,
|
|
1067
|
-
editRender: {
|
|
1068
|
-
name: '$select',
|
|
1069
|
-
props: { clearable: true },
|
|
1070
|
-
options: [
|
|
1071
|
-
{ value: 'center', label: '居中对齐' },
|
|
1072
|
-
{ value: 'left', label: '左对齐' },
|
|
1073
|
-
{ value: 'right', label: '右对齐' },
|
|
1074
|
-
],
|
|
1075
|
-
},
|
|
1076
|
-
},
|
|
1077
|
-
{ field: 'required', title: '是否必填', width: 120, slots: { default: 'switch_render' } },
|
|
1078
|
-
{ field: 'sys', title: '是否系统配置', width: 120, slots: { default: 'switch_render' } },
|
|
1079
|
-
{
|
|
1080
|
-
field: 'audit',
|
|
1081
|
-
title: '是否审批页显示',
|
|
1082
|
-
width: 120,
|
|
1083
|
-
slots: { default: 'switch_render' },
|
|
1084
|
-
},
|
|
1085
|
-
{
|
|
1086
|
-
field: 'mobile',
|
|
1087
|
-
title: '移动端显示',
|
|
1088
|
-
width: 120,
|
|
1089
|
-
slots: { default: 'switch_render' },
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
field: 'sum',
|
|
1093
|
-
title: '是否汇总',
|
|
1094
|
-
width: 120,
|
|
1095
|
-
slots: { default: 'summary_render' },
|
|
1096
|
-
},
|
|
1097
|
-
{ field: 'helpText', title: '帮助说明', width: 120, editRender: { name: '$input', props: { clearable: true } } },
|
|
1098
|
-
{ field: 'fieldLabelI18nKey', title: '字段名称I18nKey', width: 200 },
|
|
1099
|
-
|
|
1100
|
-
{
|
|
1101
|
-
width: 100,
|
|
1102
|
-
fixed: 'right',
|
|
1103
|
-
slots: {
|
|
1104
|
-
default: 'custom_more_property_render',
|
|
1105
|
-
header: right_header,
|
|
1106
|
-
},
|
|
1107
|
-
},
|
|
1108
|
-
])
|
|
1109
|
-
const allType = ref('')
|
|
1110
|
-
//computed
|
|
1111
|
-
const { showBusinessTips, gridHeight, commonDevelopTabs } = useConfigComputed()
|
|
1112
|
-
/*
|
|
1113
|
-
method
|
|
1114
|
-
*/
|
|
1115
|
-
|
|
1116
|
-
const currentStepFrist = () => {
|
|
1117
|
-
formRef.value.validate().then(() => {
|
|
1118
|
-
currentStep.value++
|
|
1119
|
-
nextTick(() => {
|
|
1120
|
-
rowDrop(groupData)
|
|
1121
|
-
})
|
|
1122
|
-
})
|
|
1123
|
-
}
|
|
1124
|
-
const currentStepSecond = () => {
|
|
1125
|
-
let { fullData } = groupGrid.value.getTableData()
|
|
1126
|
-
if (!fullData.length) {
|
|
1127
|
-
message.warning('请添加分组!')
|
|
1128
|
-
return
|
|
1129
|
-
}
|
|
1130
|
-
groupGrid.value.validate(fullData, (valid: customConfigEdits.MapObjectNoneType) => {
|
|
1131
|
-
if (!valid) {
|
|
1132
|
-
let headGroupList = fullData.filter((item: customConfigEdits.MapObjectNoneType) => {
|
|
1133
|
-
return item.groupType == 'head'
|
|
1134
|
-
})
|
|
1135
|
-
let itemGroupList = fullData.filter((item: customConfigEdits.MapObjectNoneType) => {
|
|
1136
|
-
return item.groupType == 'item'
|
|
1137
|
-
})
|
|
1138
|
-
let headGroupOpts = headGroupList.map((item: customConfigEdits.MapObjectNoneType) => {
|
|
1139
|
-
return {
|
|
1140
|
-
value: item.groupCode,
|
|
1141
|
-
label: item.groupName,
|
|
1142
|
-
}
|
|
1143
|
-
})
|
|
1144
|
-
let itemGroupOpts = itemGroupList.map((item: customConfigEdits.MapObjectNoneType) => {
|
|
1145
|
-
return {
|
|
1146
|
-
value: item.groupCode,
|
|
1147
|
-
label: item.groupName,
|
|
1148
|
-
}
|
|
1149
|
-
})
|
|
1150
|
-
if (headColumns[3].editRender) headColumns[3].editRender.options = headGroupOpts
|
|
1151
|
-
if (itemColumns[3].editRender) itemColumns[3].editRender.options = itemGroupOpts
|
|
1152
|
-
currentStep.value++
|
|
1153
|
-
}
|
|
1154
|
-
})
|
|
1155
|
-
}
|
|
1156
|
-
const currentStepThird = () => {
|
|
1157
|
-
// console.log(1)
|
|
1158
|
-
|
|
1159
|
-
let { fullData } = headGrid.value.getTableData()
|
|
1160
|
-
// if (!fullData.length) {
|
|
1161
|
-
// this.$message.warning(this.$srmI18n(`${this.$getLangAccount()}#i18n_title_pleaseAddHeaderConfiguration`, '请添加表头配置!'))
|
|
1162
|
-
// return
|
|
1163
|
-
// }
|
|
1164
|
-
headGrid.value.validate(fullData, (valid: customConfigEdits.MapObjectNoneType) => {
|
|
1165
|
-
if (!valid) {
|
|
1166
|
-
currentStep.value++
|
|
1167
|
-
}
|
|
1168
|
-
})
|
|
1169
|
-
}
|
|
1170
|
-
const currentMethodArry = [currentStepFrist, currentStepSecond, currentStepThird]
|
|
1171
|
-
|
|
1172
|
-
const validateCode = (rule: customConfigEdits.MapObjectNoneType) => {
|
|
1173
|
-
const xGrid = groupGrid
|
|
1174
|
-
let { fullData } = xGrid.value.getTableData()
|
|
1175
|
-
let { cellValue, row } = rule
|
|
1176
|
-
let rowIndex = row.sortOrder - 1
|
|
1177
|
-
let res: Error | null = null
|
|
1178
|
-
if (fullData.length > 0) {
|
|
1179
|
-
let fullNew = fullData.map((rs: customConfigEdits.MapObjectNoneType) => rs.groupCode)
|
|
1180
|
-
fullNew.splice(rowIndex, 1)
|
|
1181
|
-
let rep = fullNew.find((t: customConfigEdits.MapObjectNoneType) => t == cellValue)
|
|
1182
|
-
if (rep) {
|
|
1183
|
-
res = new Error('分组编码不能填写相同的值!')
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
return res
|
|
1187
|
-
}
|
|
1188
|
-
const groupRules = shallowReactive<customConfigEdits.MapObjectNoneType>({
|
|
1189
|
-
sortOrder: [{ required: true, message: '请输入排序' }],
|
|
1190
|
-
groupName: [{ required: true, message: '请输入分组名称' }],
|
|
1191
|
-
groupCode: [{ required: true, message: '请输入分组编码' }, { validator: validateCode }],
|
|
1192
|
-
groupType: [{ required: true, message: '请选择分组类型' }],
|
|
1193
|
-
})
|
|
1194
|
-
const alertClose = () => {
|
|
1195
|
-
sessionStorage.setItem('businessTipsShow', '0')
|
|
1196
|
-
}
|
|
1197
|
-
const codeEditorSureClick = (contents: string) => {
|
|
1198
|
-
form.extend = contents
|
|
1199
|
-
}
|
|
1200
|
-
const changeBusinessTypeEvent = ({ value }: { value: string }) => {
|
|
1201
|
-
qHttp
|
|
1202
|
-
.get({
|
|
1203
|
-
url: '/template/templateHead/querySysByBusinessType',
|
|
1204
|
-
params: {
|
|
1205
|
-
businessType: value,
|
|
1206
|
-
},
|
|
1207
|
-
})
|
|
1208
|
-
.then((res) => {
|
|
1209
|
-
// console.log(1)
|
|
1210
|
-
if (res.success) {
|
|
1211
|
-
let { templateGroupList, templateConfigHeadList, templateConfigItemList } = res.result
|
|
1212
|
-
groupData.value = templateGroupList
|
|
1213
|
-
headData.value = templateConfigHeadList
|
|
1214
|
-
itemData.value = templateConfigItemList
|
|
1215
|
-
}
|
|
1216
|
-
})
|
|
1217
|
-
}
|
|
1218
|
-
const changeDefaultType = (flag: boolean) => {
|
|
1219
|
-
form.defaultTypeFlag = flag
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
const ajaxFindDictItems = (postData: object) => {
|
|
1223
|
-
return new Promise((resolve, reject) => {
|
|
1224
|
-
qHttp
|
|
1225
|
-
.post({
|
|
1226
|
-
url: '/base/dict/findDictItems',
|
|
1227
|
-
// params: {},
|
|
1228
|
-
data: postData,
|
|
1229
|
-
})
|
|
1230
|
-
.then((res) => {
|
|
1231
|
-
if (res.success) {
|
|
1232
|
-
resolve(res.result)
|
|
1233
|
-
} else {
|
|
1234
|
-
reject(res)
|
|
1235
|
-
}
|
|
1236
|
-
})
|
|
1237
|
-
.catch((err) => {
|
|
1238
|
-
reject(err)
|
|
1239
|
-
})
|
|
1240
|
-
})
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
const editActivedEvent = ({ row, column }: VxeGridDefines.EditActivedEventParams) => {
|
|
1244
|
-
if (column.property == 'defaultValue') {
|
|
1245
|
-
if ((row.fieldType == 'select' || row.fieldType == 'multiple') && row.dictCode) {
|
|
1246
|
-
let postData = {
|
|
1247
|
-
busAccount: busAccount,
|
|
1248
|
-
dictCode: row.dictCode,
|
|
1249
|
-
}
|
|
1250
|
-
ajaxFindDictItems(postData).then((res: any) => {
|
|
1251
|
-
if (res.success) {
|
|
1252
|
-
let options = res.result.map((item: customConfigEdits.MapObjectNoneType) => {
|
|
1253
|
-
return {
|
|
1254
|
-
value: item.value,
|
|
1255
|
-
label: item.title,
|
|
1256
|
-
}
|
|
1257
|
-
})
|
|
1258
|
-
// that.defaultValueOpts = options
|
|
1259
|
-
row.defaultValueOpts = options
|
|
1260
|
-
}
|
|
1261
|
-
})
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
const getDefaultOptions = (row: customConfigEdits.MapObjectNoneType) => {
|
|
1267
|
-
return new Promise<customConfigEdits.MapObjectNoneType>((resolve) => {
|
|
1268
|
-
let postData = {
|
|
1269
|
-
busAccount: busAccount.value,
|
|
1270
|
-
dictCode: row.dictCode,
|
|
1271
|
-
}
|
|
1272
|
-
ajaxFindDictItems(postData).then((res: any) => {
|
|
1273
|
-
if (res.success) {
|
|
1274
|
-
resolve(res.result)
|
|
1275
|
-
}
|
|
1276
|
-
})
|
|
1277
|
-
})
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
const defaultAddOpts = async (arr: customConfigEdits.MapObjectNoneType[]) => {
|
|
1281
|
-
for (const row of arr) {
|
|
1282
|
-
if ((row.fieldType == 'select' || row.fieldType == 'multiple') && row.dictCode) {
|
|
1283
|
-
let options = await getDefaultOptions(row)
|
|
1284
|
-
options = options.map((item: customConfigEdits.MapObjectNoneType) => {
|
|
1285
|
-
return {
|
|
1286
|
-
value: item.value,
|
|
1287
|
-
label: item.title,
|
|
1288
|
-
}
|
|
1289
|
-
})
|
|
1290
|
-
row.defaultValueOpts = options
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
const queryDetail = () => {
|
|
1296
|
-
qHttp
|
|
1297
|
-
.get({
|
|
1298
|
-
url: url.detail,
|
|
1299
|
-
params: {
|
|
1300
|
-
id: currentEditRow.value.id,
|
|
1301
|
-
},
|
|
1302
|
-
})
|
|
1303
|
-
.then((res: customConfigEdits.MapObjectNoneType) => {
|
|
1304
|
-
if (res.success) {
|
|
1305
|
-
currentRow.value = res.result
|
|
1306
|
-
let { templateGroupList, templateConfigHeadList, templateConfigItemList } = res.result
|
|
1307
|
-
Object.assign(form, res.result)
|
|
1308
|
-
groupData.value = templateGroupList
|
|
1309
|
-
let headDataTemp = templateConfigHeadList.map((item: customConfigEdits.MapObjectNoneType) => {
|
|
1310
|
-
if (item.mobile) {
|
|
1311
|
-
item.mobile += ''
|
|
1312
|
-
} else {
|
|
1313
|
-
item.mobile = '1'
|
|
1314
|
-
}
|
|
1315
|
-
return item
|
|
1316
|
-
})
|
|
1317
|
-
headData.value = headDataTemp
|
|
1318
|
-
|
|
1319
|
-
let itemDataTemp = templateConfigItemList.map((item: customConfigEdits.MapObjectNoneType) => {
|
|
1320
|
-
if (item.mobile) {
|
|
1321
|
-
item.mobile += ''
|
|
1322
|
-
} else {
|
|
1323
|
-
item.mobile = '1'
|
|
1324
|
-
}
|
|
1325
|
-
return item
|
|
1326
|
-
})
|
|
1327
|
-
itemData.value = itemDataTemp
|
|
1328
|
-
nextTick(() => {
|
|
1329
|
-
defaultAddOpts(headData.value as customConfigEdits.MapObjectNoneType[])
|
|
1330
|
-
defaultAddOpts(itemData.value as customConfigEdits.MapObjectNoneType[])
|
|
1331
|
-
})
|
|
1332
|
-
}
|
|
1333
|
-
})
|
|
1334
|
-
.finally(() => {
|
|
1335
|
-
confirmLoading.value = false
|
|
1336
|
-
})
|
|
1337
|
-
}
|
|
1338
|
-
const preSetup = () => {
|
|
1339
|
-
currentStep.value--
|
|
1340
|
-
}
|
|
1341
|
-
const currentStepEmit = () => {
|
|
1342
|
-
currentMethodArry[currentStep.value]()
|
|
1343
|
-
}
|
|
1344
|
-
const rowDrop = (currentData: customConfigEdits.MapObjectNoneType) => {
|
|
1345
|
-
const $table = groupGrid.value
|
|
1346
|
-
Sortable.create($table.$el.querySelector('.body--wrapper>.vxe-table--body tbody'), {
|
|
1347
|
-
handle: '.drag-btn',
|
|
1348
|
-
onEnd: (sortableEvent: customConfigEdits.MapObjectNoneType) => {
|
|
1349
|
-
const newIndex = sortableEvent.newIndex as number
|
|
1350
|
-
const oldIndex = sortableEvent.oldIndex as number
|
|
1351
|
-
const currRow = currentData.value.splice(oldIndex, 1)[0]
|
|
1352
|
-
currentData.value.splice(newIndex, 0, currRow)
|
|
1353
|
-
},
|
|
1354
|
-
})
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
const groupGridAddEvent = () => {
|
|
1358
|
-
let { fullData } = groupGrid.value.getTableData()
|
|
1359
|
-
let length = fullData.length
|
|
1360
|
-
groupGrid.value.insertAt({ sortOrder: length + 1, groupType: 'head' }, -1)
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
const getAllHeadDataPromiss = () => {
|
|
1364
|
-
if (form.businessType === 'costForm') {
|
|
1365
|
-
let url = '/cost/costField/queryAll'
|
|
1366
|
-
return qHttp.get({
|
|
1367
|
-
url,
|
|
1368
|
-
})
|
|
1369
|
-
} else {
|
|
1370
|
-
let url = '/template/templateHead/queryHeadFieldsByBusinessType'
|
|
1371
|
-
return qHttp.get({
|
|
1372
|
-
url,
|
|
1373
|
-
params: {
|
|
1374
|
-
businessType: form.businessType,
|
|
1375
|
-
},
|
|
1376
|
-
})
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
const getAllItemsDataPromiss = () => {
|
|
1381
|
-
if (form.businessType === 'costForm') {
|
|
1382
|
-
let url = '/cost/costField/queryAll'
|
|
1383
|
-
return qHttp.get({
|
|
1384
|
-
url,
|
|
1385
|
-
})
|
|
1386
|
-
} else {
|
|
1387
|
-
let url = '/template/templateHead/queryItemFieldsByBusinessType'
|
|
1388
|
-
return qHttp.get({
|
|
1389
|
-
url,
|
|
1390
|
-
params: {
|
|
1391
|
-
businessType: form.businessType,
|
|
1392
|
-
},
|
|
1393
|
-
})
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
const headGridAddEvent = () => {
|
|
1398
|
-
allType.value = 'headGrid'
|
|
1399
|
-
let { fullData } = headGrid.value.getTableData()
|
|
1400
|
-
if (busAccount.value == '100000') {
|
|
1401
|
-
let length = fullData.length
|
|
1402
|
-
headGrid.value.insertAt({ sortOrder: length + 1, groupType: 'head' }, -1)
|
|
1403
|
-
return
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
let fieldNameList = fullData.map((item: customConfigEdits.MapObjectNoneType) => {
|
|
1407
|
-
return item.fieldName + '_' + item.groupCode
|
|
1408
|
-
})
|
|
1409
|
-
getAllHeadDataPromiss().then((res) => {
|
|
1410
|
-
if (res.success) {
|
|
1411
|
-
if (form.businessType === 'costForm') {
|
|
1412
|
-
fieldData.value = res.result
|
|
1413
|
-
visible.value = true
|
|
1414
|
-
} else {
|
|
1415
|
-
let fieldDatas = res.result.templateConfigHeadList.filter((item: customConfigEdits.MapObjectNoneType) => {
|
|
1416
|
-
return !fieldNameList.includes(item.fieldName + '_' + item.groupCode)
|
|
1417
|
-
})
|
|
1418
|
-
fieldData.value = fieldDatas
|
|
1419
|
-
visible.value = true
|
|
1420
|
-
}
|
|
1421
|
-
} else {
|
|
1422
|
-
message.warning(res.message)
|
|
1423
|
-
}
|
|
1424
|
-
})
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
const headItemAddEvent = () => {
|
|
1428
|
-
allType.value = 'itemGrid'
|
|
1429
|
-
let { fullData } = itemGrid.value.getTableData()
|
|
1430
|
-
if (busAccount.value == '100000') {
|
|
1431
|
-
let length = fullData.length
|
|
1432
|
-
itemGrid.value.insertAt({ sortOrder: length + 1, groupType: 'head' }, -1)
|
|
1433
|
-
return
|
|
1434
|
-
}
|
|
1435
|
-
let fieldNameList = fullData.map((item: customConfigEdits.MapObjectNoneType) => {
|
|
1436
|
-
return item.fieldName + '_' + item.groupCode
|
|
1437
|
-
})
|
|
1438
|
-
|
|
1439
|
-
getAllItemsDataPromiss().then((res) => {
|
|
1440
|
-
if (res.success) {
|
|
1441
|
-
if (form.businessType === 'costForm') {
|
|
1442
|
-
fieldData.value = res.result
|
|
1443
|
-
visible.value = true
|
|
1444
|
-
} else {
|
|
1445
|
-
if (res.result.templateConfigItemList && res.result.templateConfigItemList.length) {
|
|
1446
|
-
if (res.result.businessType === 'supplierMasterData') {
|
|
1447
|
-
fieldData.value = res.result.templateConfigItemList
|
|
1448
|
-
visible.value = true
|
|
1449
|
-
} else {
|
|
1450
|
-
let fieldDatas = res.result.templateConfigItemList.filter((item: customConfigEdits.MapObjectNoneType) => {
|
|
1451
|
-
return !fieldNameList.includes(item.fieldName + '_' + item.groupCode)
|
|
1452
|
-
})
|
|
1453
|
-
fieldData.value = fieldDatas
|
|
1454
|
-
visible.value = true
|
|
1455
|
-
}
|
|
1456
|
-
} else {
|
|
1457
|
-
const t = '没有配置表行数据'
|
|
1458
|
-
message.warning(t)
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
} else {
|
|
1462
|
-
message.warning(res.message)
|
|
1463
|
-
}
|
|
1464
|
-
})
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
const gridDeleteEvent = (type: string) => {
|
|
1468
|
-
const CurentGridRef = getCurentGridRef(type)
|
|
1469
|
-
let checkboxRecords = CurentGridRef.value.getCheckboxRecords()
|
|
1470
|
-
if (type === 'headGridRef' || type === 'itemGridRef') {
|
|
1471
|
-
let flag = checkboxRecords.some((n: customConfigEdits.GridQConfigUnkownObj) => n.sys === '1')
|
|
1472
|
-
if (flag) {
|
|
1473
|
-
message.error('系统配置字段不允许删除')
|
|
1474
|
-
return
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
if (!checkboxRecords.length) {
|
|
1478
|
-
message.error('请选择数据!')
|
|
1479
|
-
return
|
|
1480
|
-
}
|
|
1481
|
-
CurentGridRef.value.removeCheckboxRow(checkboxRecords)
|
|
1482
|
-
resetSortOrder(type)
|
|
1483
|
-
// this.$refs[grid].removeCheckboxRow(checkboxRecords)
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
const handleEpritXisCallBack = () => {
|
|
1487
|
-
confirmLoading.value = !confirmLoading.value
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
const exportHeadEvent = () => {
|
|
1491
|
-
if (!currentEditRow.value.id) {
|
|
1492
|
-
message.warning('请先保存模板配置')
|
|
1493
|
-
return
|
|
1494
|
-
}
|
|
1495
|
-
const sets = 'head'
|
|
1496
|
-
const type = 'TemplateConfigHeadList'
|
|
1497
|
-
handleExportXls('表头配置', currentEditRow.value.id, sets, type, '/template/templateHead/exportTemplateColumnConfig', handleEpritXisCallBack)
|
|
1498
|
-
}
|
|
1499
|
-
const exportItemEvent = () => {
|
|
1500
|
-
if (!currentEditRow.value.id) {
|
|
1501
|
-
message.warning('请先保存模板配置')
|
|
1502
|
-
return
|
|
1503
|
-
}
|
|
1504
|
-
const sets = 'item'
|
|
1505
|
-
const type = 'TemplateConfigItemList'
|
|
1506
|
-
handleExportXls('表行配置', currentEditRow.value.id, sets, type, '/template/templateHead/exportTemplateColumnConfig', handleEpritXisCallBack)
|
|
1507
|
-
}
|
|
1508
|
-
let getCurentGridRef = (type: string) => {
|
|
1509
|
-
const curGridRefObj: customConfigEdits.GridQConfigEditRef = { groupGridRef: groupGrid, headGridRef: headGrid, itemGrid: itemGrid }
|
|
1510
|
-
return curGridRefObj[type]
|
|
1511
|
-
}
|
|
1512
|
-
const resetSortOrder = (type: string) => {
|
|
1513
|
-
const CurentGridRef = getCurentGridRef(type)
|
|
1514
|
-
let { fullData } = CurentGridRef.value.getTableData()
|
|
1515
|
-
fullData.forEach((item: customConfigEdits.GridQConfigUnkownObj, index: number) => {
|
|
1516
|
-
item.sortOrder = index + 1
|
|
1517
|
-
})
|
|
1518
|
-
}
|
|
1519
|
-
const selectedHeadOk = () => {
|
|
1520
|
-
let checkboxRecords = selectGrid.value.getCheckboxRecords()
|
|
1521
|
-
if (!checkboxRecords.length) {
|
|
1522
|
-
message.warning('请选择数据!')
|
|
1523
|
-
return
|
|
1524
|
-
}
|
|
1525
|
-
let fullData = []
|
|
1526
|
-
if (allType.value == 'headGrid') {
|
|
1527
|
-
fullData = headGrid.value.getTableData().fullData
|
|
1528
|
-
} else {
|
|
1529
|
-
fullData = itemGrid.value.getTableData().fullData
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
let length = fullData.length
|
|
1533
|
-
checkboxRecords.forEach((item: customConfigEdits.MapObjectNoneType, index: number) => {
|
|
1534
|
-
item.sortOrder = length + index + 1
|
|
1535
|
-
})
|
|
1536
|
-
if (allType.value == 'headGrid') {
|
|
1537
|
-
headGrid.value?.insertAt(checkboxRecords, -1)
|
|
1538
|
-
} else {
|
|
1539
|
-
itemGrid.value?.insertAt(checkboxRecords, -1)
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
visible.value = false
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
const setDisabledByData = (field: string, value: boolean) => {
|
|
1546
|
-
commonDevelopTabs.value.forEach((rs) => {
|
|
1547
|
-
let d = rs.children.find((it: customConfigEdits.MapObjectNoneType) => it.field == field)
|
|
1548
|
-
if (d) {
|
|
1549
|
-
d.disabled = value
|
|
1550
|
-
}
|
|
1551
|
-
})
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
const handleBefore = (row: customConfigEdits.MapObjectNoneType) => {
|
|
1555
|
-
// 字段类型为文本,文本域,数字,小数,日期,且为不必填时,支持折叠
|
|
1556
|
-
let limitField = ['input', 'number', 'float', 'date', 'textArea']
|
|
1557
|
-
if (limitField.includes(row.fieldType) && row.required == '0') {
|
|
1558
|
-
setDisabledByData('fold', false)
|
|
1559
|
-
} else {
|
|
1560
|
-
// 重置
|
|
1561
|
-
setDisabledByData('fold', true)
|
|
1562
|
-
if (currentDrawer.value.fold) {
|
|
1563
|
-
currentDrawer.value.fold = '0'
|
|
1564
|
-
}
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
const rowChangeSummary = (currentDrawer: customConfigEdits.MapObjectNoneType) => {
|
|
1569
|
-
// 同一个分组只能有一个汇总字段
|
|
1570
|
-
handleBefore(currentDrawer.row)
|
|
1571
|
-
// debugger
|
|
1572
|
-
// this.currentItemGrid = currentDrawer // 当前所有列
|
|
1573
|
-
let itemGridData = currentDrawer.data
|
|
1574
|
-
let rowIndex = currentDrawer.$rowIndex
|
|
1575
|
-
nextTick(() => {
|
|
1576
|
-
itemGridData.forEach((item: customConfigEdits.MapObjectNoneType, index: number) => {
|
|
1577
|
-
if (item.groupCode === currentDrawer.row.groupCode && rowIndex !== index) {
|
|
1578
|
-
item.sum = 0
|
|
1579
|
-
// this.$forceUpdate()
|
|
1580
|
-
}
|
|
1581
|
-
})
|
|
1582
|
-
})
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
const changeSummary = (currentDrawer: customConfigEdits.MapObjectNoneType) => {
|
|
1586
|
-
// 同一个分组只能有一个汇总字段
|
|
1587
|
-
|
|
1588
|
-
let itemGridData = currentItemGrid.value.data
|
|
1589
|
-
let rowIndex = currentItemGrid.value.$rowIndex
|
|
1590
|
-
nextTick(() => {
|
|
1591
|
-
itemGridData.forEach((item: customConfigEdits.MapObjectNoneType, index: customConfigEdits.MapObjectNoneType) => {
|
|
1592
|
-
if (item.groupCode === currentDrawer.groupCode && rowIndex !== index) {
|
|
1593
|
-
item.sum = 0
|
|
1594
|
-
// this.$forceUpdate()
|
|
1595
|
-
// getCurrentInstance()?.$forceUpdate()
|
|
1596
|
-
}
|
|
1597
|
-
})
|
|
1598
|
-
})
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
const showDictModal = (row: customConfigEdits.MapObjectNoneType) => {
|
|
1602
|
-
currentDictRow.value = row
|
|
1603
|
-
// alert(1)
|
|
1604
|
-
console.log(dictCodeModal)
|
|
1605
|
-
dictCodeModal.value.open()
|
|
1606
|
-
}
|
|
1607
|
-
const headRowDrop = () => {
|
|
1608
|
-
console.log(1)
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
const itemRowDrop = () => {
|
|
1612
|
-
console.log(1)
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1616
|
-
const showDrawer = (param: any) => {
|
|
1617
|
-
handleBefore(param.row)
|
|
1618
|
-
currentDrawer.value = param.row
|
|
1619
|
-
currentItemGrid.value = param // 当前所有列
|
|
1620
|
-
drawerVisible.value = true
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
const fieldSelectOk = (data: customConfigEdits.MapObjectNoneType) => (currentDictRow.value.dictCode = data.dictCode)
|
|
1624
|
-
|
|
1625
|
-
const showSample = (field: string) => {
|
|
1626
|
-
nowFieldType.value = field
|
|
1627
|
-
if (field === 'callback') {
|
|
1628
|
-
sampleCode.value = currentStep.value === 2 ? EditSample.bindFunctionHead : EditSample.bindFunctionRow
|
|
1629
|
-
} else if (field === 'initFunction') {
|
|
1630
|
-
sampleCode.value = currentStep.value === 2 ? EditSample.initFunctionHead : EditSample.initFunctionRow
|
|
1631
|
-
} else if (field === 'extend') {
|
|
1632
|
-
sampleCode.value = currentStep.value === 2 ? EditSample.extendHead : EditSample.extendRow
|
|
1633
|
-
} else if (field === 'fieldValidator') {
|
|
1634
|
-
sampleCode.value = currentStep.value === 2 ? EditSample.fieldValidatorHead : EditSample.fieldValidatorRow
|
|
1635
|
-
} else if (field === 'formula') {
|
|
1636
|
-
sampleCode.value = currentStep.value === 2 ? EditSample.formulaHead : EditSample.formulaRow
|
|
1637
|
-
}
|
|
1638
|
-
editorModalFlag.value = true
|
|
1639
|
-
}
|
|
1640
|
-
const sampleSureClose = () => {
|
|
1641
|
-
editorModalFlag.value = false
|
|
1642
|
-
}
|
|
1643
|
-
const sampleSureClick = (coValue: string) => {
|
|
1644
|
-
let warnTips = false
|
|
1645
|
-
sampleCode.value = coValue
|
|
1646
|
-
if (nowFieldType.value === 'callback' && !currentDrawer.value.callback) {
|
|
1647
|
-
currentDrawer.value.callback = coValue
|
|
1648
|
-
warnTips = true
|
|
1649
|
-
} else if (nowFieldType.value === 'initFunction' && !currentDrawer.value.initFunction) {
|
|
1650
|
-
currentDrawer.value.initFunction = coValue
|
|
1651
|
-
warnTips = true
|
|
1652
|
-
} else if (nowFieldType.value === 'extend' && !currentDrawer.value.extend) {
|
|
1653
|
-
currentDrawer.value.extend = coValue
|
|
1654
|
-
warnTips = true
|
|
1655
|
-
} else if (nowFieldType.value === 'fieldValidator' && !currentDrawer.value.fieldValidator) {
|
|
1656
|
-
currentDrawer.value.fieldValidator = coValue
|
|
1657
|
-
warnTips = true
|
|
1658
|
-
} else if (nowFieldType.value === 'formula' && !currentDrawer.value.formula) {
|
|
1659
|
-
currentDrawer.value.formula = coValue
|
|
1660
|
-
warnTips = true
|
|
1661
|
-
}
|
|
1662
|
-
if (!warnTips) {
|
|
1663
|
-
message.warning('函数已存在,不可导入示例')
|
|
1664
|
-
return
|
|
1665
|
-
}
|
|
1666
|
-
editorModalFlag.value = false
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
const changeFixSummary = (currentDrawer: customConfigEdits.MapObjectNoneType) => {
|
|
1670
|
-
// 同一个分组只能有一个汇总字段
|
|
1671
|
-
let itemGridData = currentItemGrid.value.data
|
|
1672
|
-
let rowIndex = currentItemGrid.value.$rowIndex //当前修改的索引
|
|
1673
|
-
let temArryItemGridData = [...itemGridData]
|
|
1674
|
-
temArryItemGridData.reverse()
|
|
1675
|
-
let resetIndex = temArryItemGridData.findIndex((val) => val.fixType)
|
|
1676
|
-
let lastFrozenIndex = resetIndex > -1 ? itemGridData.length - resetIndex - 1 : resetIndex //最好一个设置了fixtype的索引
|
|
1677
|
-
// this.curLastFrozenIndex = lastFrozenIndex //打开时的最后一个设置fixtype的
|
|
1678
|
-
if (lastFrozenIndex > -1) {
|
|
1679
|
-
if (lastFrozenIndex <= rowIndex) {
|
|
1680
|
-
for (let [idx, v] of itemGridData.entries()) {
|
|
1681
|
-
if (idx <= rowIndex) {
|
|
1682
|
-
v.fixType = itemGridData[rowIndex].fixType
|
|
1683
|
-
} else {
|
|
1684
|
-
break
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
nextTick(() => {
|
|
1690
|
-
itemGridData.forEach((item: customConfigEdits.MapObjectNoneType, index: customConfigEdits.MapObjectNoneType) => {
|
|
1691
|
-
if (item.groupCode === currentDrawer.groupCode && rowIndex !== index) {
|
|
1692
|
-
item.sum = 0
|
|
1693
|
-
// this.$forceUpdate()
|
|
1694
|
-
}
|
|
1695
|
-
})
|
|
1696
|
-
})
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
const reorderData = (gird: customConfigEdits.MapObjectNoneType) => {
|
|
1700
|
-
let tableData = gird.getTableData().fullData
|
|
1701
|
-
tableData = qqtUtils
|
|
1702
|
-
.sortBy(tableData, function (item: customConfigEdits.MapObjectNoneType) {
|
|
1703
|
-
return parseInt(item.sortOrder)
|
|
1704
|
-
})
|
|
1705
|
-
.map((item: customConfigEdits.MapObjectNoneType, index: number) => {
|
|
1706
|
-
item.sortOrder = index + 1
|
|
1707
|
-
return item
|
|
1708
|
-
})
|
|
1709
|
-
gird.loadData(tableData)
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
const reorder = () => {
|
|
1713
|
-
let headGridRef = headGrid.value
|
|
1714
|
-
let itemGridRef = itemGrid.value
|
|
1715
|
-
reorderData(headGridRef)
|
|
1716
|
-
reorderData(itemGridRef)
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
const formatByType = (data: customConfigEdits.MapObjectNoneType, type: string) => {
|
|
1720
|
-
data.forEach((rs: customConfigEdits.MapObjectNoneType) => {
|
|
1721
|
-
if (rs.fieldType === type && rs.defaultValue instanceof Array) {
|
|
1722
|
-
rs.defaultValue = rs.defaultValue.join(',')
|
|
1723
|
-
}
|
|
1724
|
-
})
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
const postData = (type?: string) => {
|
|
1728
|
-
let curl = url.add
|
|
1729
|
-
if (currentEditRow.value && currentEditRow.value.id) {
|
|
1730
|
-
curl = url.edit
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
if (type == 'publish') {
|
|
1734
|
-
curl = url.publish
|
|
1735
|
-
}
|
|
1736
|
-
// console.log('headGrid', headGrid)
|
|
1737
|
-
// 根据序号重新排序
|
|
1738
|
-
reorder()
|
|
1739
|
-
let params = Object.assign({ templateGroupList: [], templateConfigHeadList: [], templateConfigItemList: [] }, form)
|
|
1740
|
-
|
|
1741
|
-
// 处理多选数据格式
|
|
1742
|
-
let templateConfigHeadList = headGrid.value.getTableData().fullData
|
|
1743
|
-
|
|
1744
|
-
let templateConfigItemList = itemGrid.value.getTableData().fullData
|
|
1745
|
-
|
|
1746
|
-
formatByType(templateConfigItemList, 'multiple')
|
|
1747
|
-
formatByType(templateConfigHeadList, 'multiple')
|
|
1748
|
-
|
|
1749
|
-
params.templateGroupList = groupGrid.value.getTableData().fullData
|
|
1750
|
-
params.templateConfigHeadList = templateConfigHeadList
|
|
1751
|
-
params.templateConfigItemList = templateConfigItemList
|
|
1752
|
-
|
|
1753
|
-
confirmLoading.value = true
|
|
1754
|
-
qHttp.post({ url: curl, data: params }).then((res) => {
|
|
1755
|
-
if (res.success) {
|
|
1756
|
-
form.id = res.result ? res.result.id : ''
|
|
1757
|
-
form.elsAccount = res.result ? res.result.elsAccount : ''
|
|
1758
|
-
currentEditRow.value.id = form.id
|
|
1759
|
-
currentRow.value = res.result
|
|
1760
|
-
form.templateVersion = res.result ? res.result.templateVersion : ''
|
|
1761
|
-
if (url.add == curl || type == 'publish') {
|
|
1762
|
-
const resultData = res.result
|
|
1763
|
-
form.templateNumber = resultData ? resultData.templateNumber : ''
|
|
1764
|
-
currentEditRow.value.templateStatus = resultData ? resultData.templateStatus : ''
|
|
1765
|
-
remoteJsFilePath.value = `${resultData.elsAccount}/purchase_${resultData.businessType}_${resultData.templateNumber}_${resultData.templateVersion}`
|
|
1766
|
-
}
|
|
1767
|
-
message.success('操作成功!')
|
|
1768
|
-
} else {
|
|
1769
|
-
message.warning(res.message)
|
|
1770
|
-
}
|
|
1771
|
-
confirmLoading.value = false
|
|
1772
|
-
})
|
|
1773
|
-
}
|
|
1774
|
-
const saveEvent = (type = '') => {
|
|
1775
|
-
let { fullData } = itemGrid.value.getTableData()
|
|
1776
|
-
// if (!fullData.length) {
|
|
1777
|
-
// message.warning('请添加表行信息!')
|
|
1778
|
-
// return
|
|
1779
|
-
// }
|
|
1780
|
-
console.log('save', 1)
|
|
1781
|
-
itemGrid.value.validate(fullData, (valid: customConfigEdits.MapObjectNoneType) => {
|
|
1782
|
-
if (!valid) {
|
|
1783
|
-
postData(type)
|
|
1784
|
-
}
|
|
1785
|
-
})
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
const tempaltePreview = () => {
|
|
1789
|
-
perviewOpen.value = true
|
|
1790
|
-
}
|
|
1791
|
-
const handleReturn = () => {
|
|
1792
|
-
emit('handleReturn')
|
|
1793
|
-
}
|
|
1794
|
-
|
|
1795
|
-
const filterOption = (input: string, option: any) => {
|
|
1796
|
-
return option.title.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
//生命周期
|
|
1800
|
-
|
|
1801
|
-
onMounted(() => {
|
|
1802
|
-
if (currentEditRow.value && currentEditRow.value.id) {
|
|
1803
|
-
queryDetail()
|
|
1804
|
-
} else {
|
|
1805
|
-
nextTick(() => {
|
|
1806
|
-
confirmLoading.value = false
|
|
1807
|
-
})
|
|
1808
|
-
}
|
|
1809
|
-
})
|
|
1810
|
-
|
|
1811
|
-
return {
|
|
1812
|
-
confirmLoading,
|
|
1813
|
-
currentStep,
|
|
1814
|
-
alertClose,
|
|
1815
|
-
showBusinessTips,
|
|
1816
|
-
form,
|
|
1817
|
-
codeEditorSureClick,
|
|
1818
|
-
changeBusinessTypeEvent,
|
|
1819
|
-
changeDefaultType,
|
|
1820
|
-
currentStepEmit,
|
|
1821
|
-
companyCode,
|
|
1822
|
-
purchaseOrganization,
|
|
1823
|
-
purchaseGroup,
|
|
1824
|
-
formRef,
|
|
1825
|
-
preSetup,
|
|
1826
|
-
gridHeight,
|
|
1827
|
-
groupColumns,
|
|
1828
|
-
groupData,
|
|
1829
|
-
groupRules,
|
|
1830
|
-
changeFilterEvent,
|
|
1831
|
-
groupGrid,
|
|
1832
|
-
groupGridAddEvent,
|
|
1833
|
-
gridDeleteEvent,
|
|
1834
|
-
headRowDrop,
|
|
1835
|
-
headGrid,
|
|
1836
|
-
headData,
|
|
1837
|
-
headColumns,
|
|
1838
|
-
activeCellMethod,
|
|
1839
|
-
headRules,
|
|
1840
|
-
editActivedEvent,
|
|
1841
|
-
headGridAddEvent,
|
|
1842
|
-
visible,
|
|
1843
|
-
fieldData,
|
|
1844
|
-
fieldColumns,
|
|
1845
|
-
selectGrid,
|
|
1846
|
-
selectedHeadOk,
|
|
1847
|
-
exportHeadEvent,
|
|
1848
|
-
exportItemEvent,
|
|
1849
|
-
rowChangeSummary,
|
|
1850
|
-
removeDictCode,
|
|
1851
|
-
showDictModal,
|
|
1852
|
-
dictCodeModal,
|
|
1853
|
-
fieldSelectOk,
|
|
1854
|
-
showDrawer,
|
|
1855
|
-
drawerVisible,
|
|
1856
|
-
commonDevelopTabs,
|
|
1857
|
-
codeEditorFields,
|
|
1858
|
-
editorModalFlag,
|
|
1859
|
-
sampleCode,
|
|
1860
|
-
nowFieldType,
|
|
1861
|
-
showSample,
|
|
1862
|
-
currentDrawer,
|
|
1863
|
-
switchFields,
|
|
1864
|
-
changeSummary,
|
|
1865
|
-
changeFixSummary,
|
|
1866
|
-
sampleSureClick,
|
|
1867
|
-
sampleSureClose,
|
|
1868
|
-
itemColumns,
|
|
1869
|
-
itemRowDrop,
|
|
1870
|
-
itemData,
|
|
1871
|
-
itemRules,
|
|
1872
|
-
itemGrid,
|
|
1873
|
-
saveEvent,
|
|
1874
|
-
perviewOpen,
|
|
1875
|
-
tempaltePreview,
|
|
1876
|
-
// currentEditRow,
|
|
1877
|
-
currentRow,
|
|
1878
|
-
handleReturn,
|
|
1879
|
-
headItemAddEvent,
|
|
1880
|
-
filterOption,
|
|
1881
|
-
}
|
|
1882
|
-
},
|
|
1883
|
-
})
|
|
1884
|
-
</script>
|
|
1885
|
-
|
|
1886
|
-
<style lang="less" scoped>
|
|
1887
|
-
@import url(../style/index.less);
|
|
1888
|
-
|
|
1889
|
-
.content-step-one {
|
|
1890
|
-
justify-content: center;
|
|
1891
|
-
}
|
|
1892
|
-
.code-editror-flex-row {
|
|
1893
|
-
display: block;
|
|
1894
|
-
}
|
|
1895
|
-
</style>
|