Browse Source

feat:[模板管理][update]

luojie
luojie 4 weeks ago
parent
commit
0006f739b4
4 changed files with 27 additions and 9 deletions
  1. +1
    -1
      src/components/Template/BaseInfoFormPackage.vue
  2. +12
    -0
      src/components/Template/CustomTable.vue
  3. +13
    -4
      src/components/Template/HandleFormItem.vue
  4. +1
    -4
      src/views/business/comps/template/TemplateTable.vue

+ 1
- 1
src/components/Template/BaseInfoFormPackage.vue View File

@ -451,7 +451,7 @@ export default {
fillType: sItem.subFillType || sItem.fillType fillType: sItem.subFillType || sItem.fillType
}; };
if(sItem.hasOwnProperty("subDisabled")){ if(sItem.hasOwnProperty("subDisabled")){
o.disabled = sItem.disabled;
o.disabled = sItem.subDisabled;
} }
return { return {
...sItem, ...sItem,

+ 12
- 0
src/components/Template/CustomTable.vue View File

@ -224,6 +224,11 @@
:value="row[col.bodySubKey]" :value="row[col.bodySubKey]"
@clickButton="(e, data) => handleClickButton(e, data, col.bodySubKey, rowIndex, colIndex)" /> @clickButton="(e, data) => handleClickButton(e, data, col.bodySubKey, rowIndex, colIndex)" />
</template> </template>
<template v-else-if="col.bodyThirdType === 'button'">
<HandleFormItem class="ml-10" type="button" :item="getBodyThirdButtonItem(col, rowIndex)"
:value="row[col.bodyThirdKey]"
@clickButton="(e, data) => handleClickButton(e, data, col.bodyThirdKey, rowIndex, colIndex)" />
</template>
<div class="flex flex1" v-else-if="isRegent(col, 'bodySubType')"> <div class="flex flex1" v-else-if="isRegent(col, 'bodySubType')">
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + row.id" <HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + row.id"
:fieldItemLabel="fieldItemLabel" :type="col.bodySubType" class="body-clickable" :fieldItemLabel="fieldItemLabel" :type="col.bodySubType" class="body-clickable"
@ -955,6 +960,13 @@ export default {
type: "button", type: "button",
} }
}, },
getBodyThirdButtonItem(col, rowIndex) {
return {
buttonName: col.bodyThirdButtonName,
fillType: col.bodyThirdFillType,
type: "button",
}
},
getBodySubItem(col) { getBodySubItem(col) {
const item = { const item = {
fillType: col.bodySubFillType, fillType: col.bodySubFillType,

+ 13
- 4
src/components/Template/HandleFormItem.vue View File

@ -193,8 +193,14 @@
<span>{{ modificationRecords.length - 1 == index ? "提交" : "修改" }}</span> <span>{{ modificationRecords.length - 1 == index ? "提交" : "修改" }}</span>
</div> </div>
<div v-if="modificationRecords.length - 1 !== index"> <div v-if="modificationRecords.length - 1 !== index">
<div>原值{{ record.oldValue }}</div>
<div>修改值{{ record.value }}</div>
<div class="flex">
<span>原值</span>
<div v-html = "record.oldValue"></div>
</div>
<div class="flex">
<span>修改值</span>
<div v-html = "record.value"></div>
</div>
<div v-if="record.reason">备注{{ record.reason }}</div> <div v-if="record.reason">备注{{ record.reason }}</div>
</div> </div>
</div> </div>
@ -1287,8 +1293,11 @@ export default {
}else if(this.type === "attachment"){ }else if(this.type === "attachment"){
const attList = JSON.parse(recordValue); const attList = JSON.parse(recordValue);
const oldAttList = JSON.parse(recordOldVlaue || "[]"); const oldAttList = JSON.parse(recordOldVlaue || "[]");
recordValue = attList.map(item => item.name).join(";");
recordOldVlaue = oldAttList.map(item => item.name).join(";");
const urlList = attList.map(item => {
return `<a href="${process.env.VUE_APP_FILE_DOMAIN+item.url}" target="_blank">${item.name}</a>`
});
recordValue = urlList.join("、");
recordOldVlaue = oldAttList.map(item => `<a href="${process.env.VUE_APP_FILE_DOMAIN+item.url}" target="_blank">${item.name}</a>`).join("、");
} }
const record = { const record = {
...baseInfo, ...baseInfo,

+ 1
- 4
src/views/business/comps/template/TemplateTable.vue View File

@ -52,9 +52,6 @@ import DMYPPZJLB from "./comps/gsp/DMYPPZJLB.vue";
// PCR // PCR
//PCR001-使SP001 //PCR001-使SP001
import PCR002 from "./comps/pcr/PCR002.vue";
import PCR003 from "./comps/pcr/PCR003.vue";
import PCR004 from "./comps/pcr/PCR004.vue";
import PCR005 from "./comps/pcr/PCR005.vue"; import PCR005 from "./comps/pcr/PCR005.vue";
import PCR007 from "./comps/pcr/PCR007.vue"; import PCR007 from "./comps/pcr/PCR007.vue";
import PCR008 from "./comps/pcr/PCR008.vue"; import PCR008 from "./comps/pcr/PCR008.vue";
@ -140,7 +137,7 @@ export default {
// //
SP001, SP003, SP00456,SP007, SP008, SP009,SP0019,SP0020,SP0021, SP001, SP003, SP00456,SP007, SP008, SP009,SP0019,SP0020,SP0021,
// PCR // PCR
PCR002, PCR003, PCR004, PCR005,PCR007, PCR008, PCR009,PCR010, PCR011, PCR012,
PCR005,PCR007, PCR008, PCR009,PCR010, PCR011, PCR012,
//LBA //LBA
LBA002, LBA002,
LBA003, LBA003,

Loading…
Cancel
Save