Browse Source

fix:[模板管理]优化

luojie
ZHANGTENG\张腾 3 weeks ago
parent
commit
57108ec780
6 changed files with 71 additions and 23 deletions
  1. +7
    -4
      src/components/Template/CustomTable.vue
  2. +18
    -6
      src/views/business/comps/template/comps/bl/BL001.vue
  3. +19
    -6
      src/views/business/comps/template/comps/dj/DJ002.vue
  4. +19
    -7
      src/views/business/comps/template/comps/dj/DJ003.vue
  5. +4
    -0
      src/views/business/comps/template/comps/dl/DL003.vue
  6. +4
    -0
      src/views/business/comps/template/comps/dl/DL004.vue

+ 7
- 4
src/components/Template/CustomTable.vue View File

@ -507,7 +507,7 @@ export default {
getOperationColumns() {
return { columnsData: this.columns, headerSelectFields: this.headerSelectFields,fieldItemLabel: this.fieldItemLabel }
},
//
//
getOtherItem(sItem) {
return {
label: sItem.otherLabel ? this.$t(sItem.otherLabel) : this.$t("template.common.other"),
@ -869,6 +869,9 @@ export default {
if (type === "select") {
this.$emit('bodySelectChange', { rowIndex, item: row, colIndex, value, key: col.prop, dataSource: this.localDataSource, headerSelectFields: this.headerSelectFields });
}
if (type === "checkboxTree") {
this.$emit('bodyTreeChange', { rowIndex, colIndex, value, row, type });
}
},
//
onBodySubValueChange(rowIndex, colIndex, value, row, type) {
@ -936,7 +939,7 @@ export default {
// labeljzbh1Label
item.checkboxLabel = currentItem[dynamicLabelKey];
} else if (col.checkboxLabel !== undefined && col.checkboxLabel !== '') {
// 使checkboxLabel
// 使checkboxLabel
item.checkboxLabel = this.$t(col.checkboxLabel);
}
if (col.bodyType === "operableInput" ) {
@ -1151,7 +1154,7 @@ export default {
onBlur(rowIndex, colKey) {
const value = this.localDataSource[rowIndex][colKey];
//
//
const col = this.columns.find(c => c.prop === colKey);
if (col && col.bodyFillType === "actFill" && col.compareTo) {
const compareToValue = this.localDataSource[rowIndex][col.compareTo];
@ -1168,7 +1171,7 @@ export default {
this.$emit("blur", { rowIndex, colKey, value, dataSource: this.localDataSource, headerSelectFields: this.headerSelectFields, item: this.localDataSource[rowIndex] });
},
onSubBlur(rowIndex, colKey, value) {
//
//
const col = this.columns.find(c => c.bodySubKey === colKey);
if (col && col.bodySubFillType === "actFill" && col.bodySubCompareTo) {
const compareToValue = this.localDataSource[rowIndex][col.bodySubCompareTo];

+ 18
- 6
src/views/business/comps/template/comps/bl/BL001.vue View File

@ -40,6 +40,7 @@
</CustomTable>
<CustomTable
@bodyTreeChange="changeTree"
fieldItemLabel="template.dj.dj003.ypyjxx"
:columns="ypyjColumns"
:ref="'ypyjTableRef'"
@ -121,7 +122,7 @@ export default {
}
},
computed: {
//
//
remarkConig() {
return [
{
@ -140,7 +141,7 @@ export default {
}
]
},
//
//
baseInfoFormConfig() {
return [
{
@ -295,6 +296,8 @@ export default {
maxlength: 200,
subType: 'button',
subKey: 'yjsjButton',
disabled:true,
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dj.dj003.hqsj',
},
dsfs: {
@ -316,7 +319,6 @@ export default {
}
},
mounted() {
console.log(this.getFilledFormData(),111)
this.getTabletoCheck()
},
methods: {
@ -361,7 +363,15 @@ export default {
},
//
getTabletoCheck() {
let { stepTableFormData_1 = [] } = this.getFilledFormData()
let { stepTableFormData_1 = [] , stepTableFormData = [] } = this.getFilledFormData()
// stepTableFormData?.map((item,index)=>{
// if(!item?.ypmcTa){
// this.$refs.ypyjTableRef.updateDataSourceByRowIndex(index, {yps:0})
// }else{
// let checkTree = item?.ypmcTa?.checkedValues?.filter(i=>i.checked)
// this.$refs.ypyjTableRef.updateDataSourceByRowIndex(index, {yps:checkTree.length})
// }
// })
const firstList = stepTableFormData_1
.filter(item => item && item.ypmc && item.ypmc.trim()) //
.map(item => ({
@ -378,8 +388,10 @@ export default {
})
},
//
changeTree(rowIndex, colIndex, value, row, type){
console.log(rowIndex, colIndex, value, row, type,9999)
changeTree(data){
let { rowIndex , value , row } = data
let checkTree = value?.checkedValues?.filter(i=>i.checked)
this.$refs.ypyjTableRef.updateDataSourceByRowIndex(rowIndex, {yps:checkTree?.length})
},
}
}

+ 19
- 6
src/views/business/comps/template/comps/dj/DJ002.vue View File

@ -43,6 +43,7 @@
fieldItemLabel="template.dj.dj003.ypyjxx"
:columns="ypyjColumns"
:ref="'ypyjTableRef'"
@clickButton="handleClickButton"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
@ -242,7 +243,13 @@ export default {
{
label: 'template.dj.dj003.cysj',
prop: "cysj",
bodyType: 'dateTime',
bodyType: 'input',
bodySubType: 'button',
bodySubButtonName: 'template.dl.dl018.ksButton',
bodySubKey: 'cysjButton',
bodySubyDisabled: this.fillType !== 'actFill',
bodyDisabled: true,
bodySubFillType: 'actFill',
bodyFillType: 'actFill'
},
{
@ -277,6 +284,8 @@ export default {
maxlength: 200,
subType: 'button',
subKey: 'yjsjButton',
disabled:true,
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dj.dj003.hqsj',
},
dsfs: {
@ -333,11 +342,15 @@ export default {
},
//
handleClickButton(_item, signData) {
this.$refs.yjczxxRef.updateFormData(
_item?.subKey?.replace("Button", ""),
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
if(_item === 'cysjButton'){
this.$refs.ypyjTableRef.updateDataSourceByRowIndex(signData, {cysj:moment().format('YYYY/MM/DD HH:mm')})
}else{
this.$refs.yjczxxRef.updateFormData(
_item?.subKey?.replace("Button", ""),
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
}
},
//
getTabletoCheck() {

+ 19
- 7
src/views/business/comps/template/comps/dj/DJ003.vue View File

@ -21,6 +21,7 @@
fieldItemLabel="template.dj.dj003.ypyjxx"
:columns="ypyjColumns"
:ref="'ypyjTableRef'"
@clickButton="handleClickButton"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
@ -198,7 +199,13 @@ export default {
{
label: 'template.dj.dj003.cysj',
prop: "cysj",
bodyType: 'dateTime',
bodyType: 'input',
bodySubType: 'button',
bodySubButtonName: 'template.dl.dl018.ksButton',
bodySubKey: 'cysjButton',
bodySubyDisabled: this.fillType !== 'actFill',
bodyDisabled: true,
bodySubFillType: 'actFill',
bodyFillType: 'actFill'
},
{
@ -233,6 +240,8 @@ export default {
maxlength: 200,
subType: 'button',
subKey: 'yjsjButton',
disabled:true,
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dj.dj003.hqsj',
},
dsfs: {
@ -285,12 +294,15 @@ export default {
},
//
handleClickButton(_item, signData) {
this.$refs.yjczxxRef.updateFormData(
_item?.subKey?.replace("Button", ""),
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
if(_item === 'cysjButton'){
this.$refs.ypyjTableRef.updateDataSourceByRowIndex(signData, {cysj:moment().format('YYYY/MM/DD HH:mm')})
}else{
this.$refs.yjczxxRef.updateFormData(
_item?.subKey?.replace("Button", ""),
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
}
},
}
}

+ 4
- 0
src/views/business/comps/template/comps/dl/DL003.vue View File

@ -225,6 +225,7 @@ export default {
maxlength: 200,
subType: 'button',
subKey: 'jzkssjButton',
disabled: true,
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dl.dl003.ksButton',
},
@ -234,7 +235,9 @@ export default {
fillType: 'actFill',
maxlength: 200,
subType: 'button',
disabled: true,
subKey: 'jzjssjButton',
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dl.dl003.jsButton',
},
fssygbh: {
@ -273,6 +276,7 @@ export default {
type: 'input',
subType: 'button',
subKey: 'pykssjButton',
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dl.dl003.ksButton',
},

+ 4
- 0
src/views/business/comps/template/comps/dl/DL004.vue View File

@ -196,6 +196,8 @@ export default {
fillType: 'actFill',
maxlength: 200,
subType: 'button',
disabled: true,
subDisabled: this.fillType !== 'actFill',
subKey: 'pykssjButton',
buttonName: 'template.dl.dl003.ksButton',
},
@ -205,6 +207,8 @@ export default {
fillType: 'actFill',
maxlength: 200,
subType: 'button',
disabled: true,
subDisabled: this.fillType !== 'actFill',
subKey: 'pyjssjButton',
buttonName: 'template.dl.dl003.jsButton',
},

Loading…
Cancel
Save