提交 6538bd96 authored 作者: kxjia's avatar kxjia

修改TB3

上级 9ea05c50
...@@ -89,6 +89,9 @@ importers: ...@@ -89,6 +89,9 @@ importers:
dayjs: dayjs:
specifier: ^1.11.18 specifier: ^1.11.18
version: 1.11.19 version: 1.11.19
docx-preview:
specifier: ^0.3.7
version: 0.3.7
dom-align: dom-align:
specifier: ^1.12.4 specifier: ^1.12.4
version: 1.12.4 version: 1.12.4
...@@ -3661,6 +3664,9 @@ packages: ...@@ -3661,6 +3664,9 @@ packages:
resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
engines: {node: '>=6.0.0'} engines: {node: '>=6.0.0'}
docx-preview@0.3.7:
resolution: {integrity: sha512-Lav69CTA/IYZPJTsKH7oYeoZjyg96N0wEJMNslGJnZJ+dMUZK85Lt5ASC79yUlD48ecWjuv+rkcmFt6EVPV0Xg==}
dom-align@1.12.4: dom-align@1.12.4:
resolution: {integrity: sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==} resolution: {integrity: sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==}
...@@ -11584,6 +11590,10 @@ snapshots: ...@@ -11584,6 +11590,10 @@ snapshots:
dependencies: dependencies:
esutils: 2.0.3 esutils: 2.0.3
docx-preview@0.3.7:
dependencies:
jszip: 3.10.1
dom-align@1.12.4: {} dom-align@1.12.4: {}
dom-scroll-into-view@2.0.1: {} dom-scroll-into-view@2.0.1: {}
......
...@@ -33,7 +33,7 @@ export const tableFormData = [ ...@@ -33,7 +33,7 @@ export const tableFormData = [
{ type: 'text', value: '(1)重要信息系统总数(不含基础设施类):' }, { type: 'text', value: '(1)重要信息系统总数(不含基础设施类):' },
{ type: 'input', value: '', unit: '个', field: 'COL0' }, { type: 'input', value: '', unit: '个', field: 'COL0' },
{ type: 'brspace' }, { type: 'brspace' },
{ type: 'text', value: '其中:(银行业)' }, { type: 'text', value: '其中:(银行业)' },
{ type: 'brspace' }, { type: 'brspace' },
{ type: 'text', value: '综合业务类:' }, { type: 'text', value: '综合业务类:' },
{ type: 'number', value: '', unit: '个', field: 'COL1' }, { type: 'number', value: '', unit: '个', field: 'COL1' },
...@@ -41,42 +41,47 @@ export const tableFormData = [ ...@@ -41,42 +41,47 @@ export const tableFormData = [
{ type: 'number', value: '', unit: '个', field: 'COL2' }, { type: 'number', value: '', unit: '个', field: 'COL2' },
{ type: 'text', value: ',客户管理类:' }, { type: 'text', value: ',客户管理类:' },
{ type: 'number', value: '', unit: '个', field: 'COL3' }, { type: 'number', value: '', unit: '个', field: 'COL3' },
{ type: 'text', value: ',产品管理类:' }, { type: 'brspace' },
{ type: 'text', value: '产品管理类:' },
{ type: 'number', value: '', unit: '个', field: 'COL4' }, { type: 'number', value: '', unit: '个', field: 'COL4' },
{ type: 'text', value: '财务管理类:' }, { type: 'text', value: '财务管理类:' },
{ type: 'number', value: '', unit: '个', field: 'COL5' }, { type: 'number', value: '', unit: '个', field: 'COL5' },
{ type: 'text', value: ',决策支持类:' }, { type: 'text', value: ',决策支持类:' },
{ type: 'number', value: '', unit: '个', field: 'COL6' }, { type: 'number', value: '', unit: '个', field: 'COL6' },
{ type: 'text', value: ',共享支持类:' }, { type: 'brspace' },
{ type: 'text', value: '共享支持类:' },
{ type: 'number', value: '', unit: '个', field: 'COL7' }, { type: 'number', value: '', unit: '个', field: 'COL7' },
{ type: 'text', value: ',其他:' }, { type: 'text', value: ',其他:' },
{ type: 'number', value: '', unit: '个', field: 'COL8' }, { type: 'number', value: '', unit: '个', field: 'COL8' },
{ type: 'brspace' }, { type: 'brspace' },
{ type: 'text', value: ',(保险业)' }, // { type: 'text', value: '其中(保险业)' },
{ type: 'brspace' }, // { type: 'brspace' },
{ type: 'text', value: '核心业务处理类:' }, // { type: 'text', value: '核心业务处理类:' },
{ type: 'number', value: '', unit: '个', field: 'C20B001' }, // { type: 'number', value: '', unit: '个', field: 'C20B001' },
{ type: 'text', value: ',销售及服务类:' }, // { type: 'text', value: ',销售及服务类:' },
{ type: 'number', value: '', unit: '个', field: 'C20B002' }, // { type: 'number', value: '', unit: '个', field: 'C20B002' },
{ type: 'text', value: ',客户管理类:' }, // { type: 'text', value: ',客户管理类:' },
{ type: 'number', value: '', unit: '个', field: 'COL3' }, // { type: 'number', value: '', unit: '个', field: 'COL3' },
{ type: 'text', value: ',综合管理类:' }, // { type: 'text', value: ',综合管理类:' },
{ type: 'number', value: '', unit: '个', field: 'C20B003' }, // { type: 'number', value: '', unit: '个', field: 'C20B003' },
{ type: 'text', value: ',财务管理类:' }, // { type: 'brspace' },
{ type: 'number', value: '', unit: '个', field: 'COL5' }, // { type: 'text', value: ',财务管理类:' },
{ type: 'text', value: ',内控合规类:' }, // { type: 'number', value: '', unit: '个', field: 'COL5' },
{ type: 'number', value: '', unit: '个', field: 'C20B004' }, // { type: 'text', value: ',内控合规类:' },
{ type: 'text', value: ',其他:' }, // { type: 'number', value: '', unit: '个', field: 'C20B004' },
{ type: 'number', value: '', unit: '个', field: 'COL8' }, // { type: 'text', value: ',其他:' },
// { type: 'number', value: '', unit: '个', field: 'COL8' },
{ type: 'br' }, { type: 'br' },
{ type: 'text', value: '(2)安全保护等级:' }, { type: 'text', value: '(2)安全保护等级:' },
{ type: 'brspace' },
{ type: 'text', value: '1级:' }, { type: 'text', value: '1级:' },
{ type: 'number', value: '', unit: '个', field: 'COL9' }, { type: 'number', value: '', unit: '个', field: 'COL9' },
{ type: 'text', value: ',2级:' }, { type: 'text', value: ',2级:' },
{ type: 'number', value: '', unit: '个', field: 'COL10' }, { type: 'number', value: '', unit: '个', field: 'COL10' },
{ type: 'text', value: ',3级:' }, { type: 'text', value: ',3级:' },
{ type: 'number', value: '', unit: '个', field: 'COL11' }, { type: 'number', value: '', unit: '个', field: 'COL11' },
{ type: 'brspace' },
{ type: 'text', value: '4级:' }, { type: 'text', value: '4级:' },
{ type: 'number', value: '', unit: '个', field: 'COL12' }, { type: 'number', value: '', unit: '个', field: 'COL12' },
{ type: 'text', value: ',5级:' }, { type: 'text', value: ',5级:' },
...@@ -113,14 +118,16 @@ export const tableFormData = [ ...@@ -113,14 +118,16 @@ export const tableFormData = [
{ type: 'text', value: ',纳入同城又纳入异地灾备:' }, { type: 'text', value: ',纳入同城又纳入异地灾备:' },
{ type: 'number', value: '', unit: '个', field: 'COL22' }, { type: 'number', value: '', unit: '个', field: 'COL22' },
{ type: 'brspace' }, { type: 'brspace' },
{ type: 'text', value: '灾难恢复能力等级:' }, { type: 'text', value: '<strong>灾难恢复能力等级:</strong>:' },
{ type: 'brspace' },
{ type: 'text', value: '1级:' }, { type: 'text', value: '1级:' },
{ type: 'number', value: '', unit: '个', field: 'COL23' }, { type: 'number', value: '', unit: '个', field: 'COL23' },
{ type: 'text', value: ',2级:' }, { type: 'text', value: ',2级:' },
{ type: 'number', value: '', unit: '个', field: 'COL24' }, { type: 'number', value: '', unit: '个', field: 'COL24' },
{ type: 'text', value: ',3级:' }, { type: 'text', value: ',3级:' },
{ type: 'number', value: '', unit: '个', field: 'COL25' }, { type: 'number', value: '', unit: '个', field: 'COL25' },
{ type: 'text', value: ',4级:' }, { type: 'brspace' },
{ type: 'text', value: '4级:' },
{ type: 'number', value: '', unit: '个', field: 'COL26' }, { type: 'number', value: '', unit: '个', field: 'COL26' },
{ type: 'text', value: ',5级:' }, { type: 'text', value: ',5级:' },
{ type: 'number', value: '', unit: '个', field: 'COL27' }, { type: 'number', value: '', unit: '个', field: 'COL27' },
...@@ -368,38 +375,41 @@ export const tableFormData = [ ...@@ -368,38 +375,41 @@ export const tableFormData = [
}, },
{ {
name: '灾备情况-区域', name: '灾备情况-区域',
formType: 'checkbox-group', formType: 'combinaform',
field: 'COL80', childs: [
options: ['同城灾备', '异地灾备'], {
extraFields: { label: '备份地域',
同城灾备: [ formType: 'checkbox',
{ field: 'COL80',
label: '同城灾备级别', options: [
field: 'COL81', { label: '同城灾备', value: '同城灾备' },
formType: 'radio', { label: '异地灾备', value: '异地灾备' },
options: [ ]
{ label: '数据级', value: '数据级' }, },
{ label: '系统级', value: '系统级' },
{ label: '应用级', value: '应用级' }, {
], label: '同城灾备级别',
width: '500px', formType: 'radio',
}, field: 'COL81',
], options: [
异地灾备: [ { label: '数据级', value: '数据级' },
{ { label: '系统级', value: '系统级' },
label: '异地灾备级别', { label: '应用级', value: '应用级' },
field: 'COL82', ]
formType: 'radio', },
options: [ {
{ label: '数据级', value: '数据级' }, label: '异地灾备级别',
{ label: '系统级', value: '系统级' }, formType: 'radio',
{ label: '应用级', value: '应用级' }, field: 'COL82',
], options: [
width: '500px', { label: '数据级', value: '数据级' },
}, { label: '系统级', value: '系统级' },
], { label: '应用级', value: '应用级' },
}, ]
},
],
}, },
{ {
name: '建立应急预案', name: '建立应急预案',
formType: 'radio-group', formType: 'radio-group',
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</vxe-radio-group> </vxe-radio-group>
<template v-if="field.otherOption&&row[field.field]=='是'"> <template v-if="field.otherOption&&row[field.field]=='是'">
<span>{{field.otherLabel}}</span> <span>{{field.otherLabel}}</span>
<vxe-input v-model="row[field.otherField]" style="width: 200px;"> <vxe-input v-model="row[field.otherField]" style="width: 400px;">
</vxe-input> </vxe-input>
</template> </template>
</template> </template>
...@@ -79,7 +79,8 @@ ...@@ -79,7 +79,8 @@
></vxe-radio> ></vxe-radio>
</vxe-radio-group> </vxe-radio-group>
<template v-if="field.otherOption&&row[field.field]=='其他'"> <template v-if="field.otherOption&&row[field.field]=='其他'">
<vxe-input v-model="row[field.otherField]" placeholder="请输入其他"> <span>其他: </span>
<vxe-input v-model="row[field.otherField]" placeholder="请输入其他" style="width: 200px;">
</vxe-input> </vxe-input>
</template> </template>
</template> </template>
...@@ -108,7 +109,8 @@ ...@@ -108,7 +109,8 @@
></vxe-radio> ></vxe-radio>
</vxe-radio-group> </vxe-radio-group>
<template v-if="field.otherOption&&row[field.field]=='其他'"> <template v-if="field.otherOption&&row[field.field]=='其他'">
<vxe-input v-model="row[field.otherField]" placeholder="请输入其他" style="width: 100px;"> <span>其他: </span>
<vxe-input v-model="row[field.otherField]" placeholder="请输入其他" style="width: 200px;">
</vxe-input> </vxe-input>
</template> </template>
...@@ -133,7 +135,8 @@ ...@@ -133,7 +135,8 @@
) )
" "
> >
<vxe-input v-model="row[ccopt.otherField]" placeholder="请输入其他" style="width: 100px;"> <span>其他: </span>
<vxe-input v-model="row[ccopt.otherField]" placeholder="请输入其他" style="width: 200px;">
</vxe-input> </vxe-input>
</template> </template>
<span class="unit"> {{ ccopt.unit }}</span> <span class="unit"> {{ ccopt.unit }}</span>
...@@ -149,9 +152,14 @@ ...@@ -149,9 +152,14 @@
:value="opt" :value="opt"
:content="opt" :content="opt"
></vxe-checkbox> ></vxe-checkbox>
<template v-if="field.otherField">
<vxe-checkbox label="其他" value="其他">
其他:
</vxe-checkbox>
</template>
</vxe-checkbox-group> </vxe-checkbox-group>
<template v-if="field.otherField&&row[field.field]?.includes('其他')"> <template v-if="field.otherField&&row[field.field]?.includes('其他')">
<vxe-input v-model="row[field.otherField]" placeholder="请输入其他" style="width: 100px;"> <vxe-input v-model="row[field.otherField]" placeholder="请输入其他" style="width: 200px; margin-left: 4px;">
</vxe-input> </vxe-input>
</template> </template>
...@@ -196,8 +204,8 @@ ...@@ -196,8 +204,8 @@
) )
" "
> >
<span class="extra-label">{{ item.otherLabel}}</span> <span class="extra-label">{{ item.otherLabel}} </span>
<vxe-input v-model="row[item.otherField]" placeholder="请输入" style="width: 150px;"> <vxe-input v-model="row[item.otherField]" placeholder="请输入" style="width: 300px;">
</vxe-input> </vxe-input>
</template> </template>
</template> </template>
...@@ -247,10 +255,11 @@ ...@@ -247,10 +255,11 @@
) )
" "
> >
<span>其他: </span>
<vxe-input <vxe-input
v-model="row[extraObject.otherField]" v-model="row[extraObject.otherField]"
placeholder="请输入其他" placeholder="请输入其他"
style="width: 150px; margin-left: 8px;" style="width: 300px; margin-left: 4px;"
/> />
</template> </template>
<span v-if="extraObject.extraUnit" class="unit">{{ extraObject.unit }}</span> <span v-if="extraObject.extraUnit" class="unit">{{ extraObject.unit }}</span>
...@@ -532,6 +541,15 @@ const setFormData = (dataVale) => { ...@@ -532,6 +541,15 @@ const setFormData = (dataVale) => {
tableData.value = dataVale.map((row, rowIndex) => { tableData.value = dataVale.map((row, rowIndex) => {
const newRow = { ...row } const newRow = { ...row }
props.fields.forEach(field => {
if ((field.formType === 'checkbox' || field.formType === 'checkbox-group') && newRow[field.field]) {
if (!Array.isArray(newRow[field.field])) {
newRow[field.field] = newRow[field.field].split(',').filter(Boolean)
}
}
})
return newRow return newRow
}) })
...@@ -571,7 +589,11 @@ const setFormData = (dataVale) => { ...@@ -571,7 +589,11 @@ const setFormData = (dataVale) => {
if (fieldWithChilds.childs && Array.isArray(fieldWithChilds.childs)) { if (fieldWithChilds.childs && Array.isArray(fieldWithChilds.childs)) {
fieldWithChilds.childs.forEach((child: any) => { fieldWithChilds.childs.forEach((child: any) => {
if (child.formType === 'checkbox' && !Array.isArray(row[child.field])) { if (child.formType === 'checkbox' && !Array.isArray(row[child.field])) {
row[child.field] = [] if (row[child.field]) {
row[child.field] = row[child.field].split(',').filter(Boolean)
} else {
row[child.field] = []
}
} }
}) })
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论