Browse Source

feat:[模板管理][update]

luojie
luojie 4 weeks ago
parent
commit
4e8020dceb
3 changed files with 14 additions and 13 deletions
  1. +2
    -5
      src/components/Template/BaseInfoFormPackage.vue
  2. +8
    -8
      src/components/Template/CustomTable.vue
  3. +4
    -0
      src/views/business/comps/template/comps/yp/YP005.vue

+ 2
- 5
src/components/Template/BaseInfoFormPackage.vue View File

@ -453,11 +453,8 @@ export default {
if(sItem.hasOwnProperty("subDisabled")){ if(sItem.hasOwnProperty("subDisabled")){
o.disabled = sItem.subDisabled; o.disabled = sItem.subDisabled;
} }
return {
...sItem,
key: sItem.subKey,
fillType: sItem.subFillType || sItem.fillType
}
return o;
}, },
// //
getThirdButtonItem(sItem) { getThirdButtonItem(sItem) {

+ 8
- 8
src/components/Template/CustomTable.vue View File

@ -200,7 +200,7 @@
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.otherCode)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.otherCode)" />
</div> </div>
</div> </div>
<div class="m-l-5" :class="{ 'flex1': col.bodySubType !== 'button' }"
<div class="m-l-5 flex" :class="{ 'flex1': col.bodySubType !== 'button' }"
v-if="isShowBodySub(col, row)"> v-if="isShowBodySub(col, row)">
<template <template
v-if="col.bodySubType === 'inputNumber' || col.bodySubType === 'input' || col.bodySubType === 'select'"> v-if="col.bodySubType === 'inputNumber' || col.bodySubType === 'input' || col.bodySubType === 'select'">
@ -224,11 +224,6 @@
: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"
@ -240,6 +235,11 @@
@update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)" @update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" />
</div> </div>
<template v-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> </div>
</div> </div>
</div> </div>
@ -461,7 +461,7 @@ export default {
isValid = value && value.some(tag => tag.checked === true); isValid = value && value.some(tag => tag.checked === true);
} else if (this.templateFillType === "preFill") { } else if (this.templateFillType === "preFill") {
// preFilltagValue // preFilltagValue
isValid = value && value.every(tag => tag.tagValue && tag.tagValue.trim() !== '');
isValid = value && value.every(tag => tag.tagValue && (tag.tagValue+'').trim() !== '');
} }
this.onErrorUpdate(rowIndex, colIndex, col.prop, !isValid); this.onErrorUpdate(rowIndex, colIndex, col.prop, !isValid);
this.$emit("onCheckboxTagChange", rowIndex, col, value) this.$emit("onCheckboxTagChange", rowIndex, col, value)
@ -675,7 +675,7 @@ export default {
} }
} else if (this.templateFillType === "preFill") { } else if (this.templateFillType === "preFill") {
// preFilltagValue // preFilltagValue
const allTagValuesFilled = mainValue && mainValue.every(tag => tag.tagValue && tag.tagValue.trim() !== '');
const allTagValuesFilled = mainValue && mainValue.every(tag => tag.tagValue && (tag.tagValue+'').trim() !== '');
if (!allTagValuesFilled && !col.bodyDisabled) { if (!allTagValuesFilled && !col.bodyDisabled) {
const errorItem = { const errorItem = {
rowIndex, rowIndex,

+ 4
- 0
src/views/business/comps/template/comps/yp/YP005.vue View File

@ -172,6 +172,10 @@ export default {
bodySubButtonName:"template.yp.yp005.ks", bodySubButtonName:"template.yp.yp005.ks",
bodySubKey:"startBtn", bodySubKey:"startBtn",
showBodySub:this.fillType === "actFill", showBodySub:this.fillType === "actFill",
bodyThirdType:"button",
bodyThirdButtonName:"结束",
bodyThirdKey:"endBtn",
bodyThirdFillType:"actFill",
width: 280, width: 280,
bodyDisabled:true, bodyDisabled:true,
bodySubDisabled:false, bodySubDisabled:false,

Loading…
Cancel
Save