7 Commits

Author SHA1 Message Date
  ZHANGTENG\张腾 67d79800a2 Merge branch 'master' of http://182.151.8.209:9010/eln_TD/eln_web 1 week ago
  ZHANGTENG\张腾 4792552529 feat:[模板管理]dj001 1 week ago
  ZHANGTENG\张腾 1100fdf307 feat:[模板管理] DJ001 1 week ago
  ZHANGTENG\张腾 1c24ad7773 Merge branch 'master' into zhangteng 3 weeks ago
  ZHANGTENG\张腾 57108ec780 fix:[模板管理]优化 3 weeks ago
  ZHANGTENG\张腾 4c76eef3d0 Merge branch 'master' into zhangteng 3 weeks ago
  ZHANGTENG\张腾 c9c7e42176 fix:[模板管理]BL001、DJ002、DJ003优化 3 weeks ago
7 changed files with 87 additions and 29 deletions
Unified View
  1. +8
    -5
      src/components/Template/CustomTable.vue
  2. +21
    -3
      src/views/business/comps/template/comps/bl/BL001.vue
  3. +12
    -6
      src/views/business/comps/template/comps/dj/DJ001.vue
  4. +19
    -7
      src/views/business/comps/template/comps/dj/DJ002.vue
  5. +19
    -8
      src/views/business/comps/template/comps/dj/DJ003.vue
  6. +4
    -0
      src/views/business/comps/template/comps/dl/DL003.vue
  7. +4
    -0
      src/views/business/comps/template/comps/dl/DL004.vue

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

@ -92,7 +92,7 @@
{{ $t(col.label) }} {{ $t(col.label) }}
</div> </div>
<template <template
v-if="col.bodyType === 'input' || col.bodyType === 'inputNumber' || col.bodyType === 'select' || col.bodyType === 'dateTimeRange' || col.bodyType === 'radio'">
v-if="col.bodyType === 'input' || col.bodyType === 'inputNumber' || col.bodyType === 'select' || col.bodyType === 'dateTimeRange' || col.bodyType === 'dateTime' || col.bodyType === 'radio'">
<div class="flex flex1"> <div class="flex flex1">
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id" <HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id"
:fieldItemLabel="fieldItemLabel" :type="col.bodyType" :fieldItemLabel="fieldItemLabel" :type="col.bodyType"
@ -510,7 +510,7 @@ export default {
getOperationColumns() { getOperationColumns() {
return { columnsData: this.columns, headerSelectFields: this.headerSelectFields, fieldItemLabel: this.fieldItemLabel } return { columnsData: this.columns, headerSelectFields: this.headerSelectFields, fieldItemLabel: this.fieldItemLabel }
}, },
//
//
getOtherItem(sItem) { getOtherItem(sItem) {
return { return {
label: sItem.otherLabel ? this.$t(sItem.otherLabel) : this.$t("template.common.other"), label: sItem.otherLabel ? this.$t(sItem.otherLabel) : this.$t("template.common.other"),
@ -892,6 +892,9 @@ export default {
if (type === "select") { if (type === "select") {
this.$emit('bodySelectChange', { rowIndex, item: row, colIndex, value, key: col.prop, dataSource: this.localDataSource, headerSelectFields: this.headerSelectFields }); 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) { onBodySubValueChange(rowIndex, colIndex, value, row, type) {
@ -959,7 +962,7 @@ export default {
// labeljzbh1Label // labeljzbh1Label
item.checkboxLabel = currentItem[dynamicLabelKey]; item.checkboxLabel = currentItem[dynamicLabelKey];
} else if (col.checkboxLabel !== undefined && col.checkboxLabel !== '') { } else if (col.checkboxLabel !== undefined && col.checkboxLabel !== '') {
// 使checkboxLabel
// 使checkboxLabel
item.checkboxLabel = this.$t(col.checkboxLabel); item.checkboxLabel = this.$t(col.checkboxLabel);
} }
if (col.bodyType === "operableInput") { if (col.bodyType === "operableInput") {
@ -1174,7 +1177,7 @@ export default {
onBlur(rowIndex, colKey) { onBlur(rowIndex, colKey) {
const value = this.localDataSource[rowIndex][colKey]; const value = this.localDataSource[rowIndex][colKey];
//
//
const col = this.columns.find(c => c.prop === colKey); const col = this.columns.find(c => c.prop === colKey);
if (col && col.bodyFillType === "actFill" && col.compareTo) { if (col && col.bodyFillType === "actFill" && col.compareTo) {
const compareToValue = this.localDataSource[rowIndex][col.compareTo]; const compareToValue = this.localDataSource[rowIndex][col.compareTo];
@ -1191,7 +1194,7 @@ export default {
this.$emit("blur", { rowIndex, colKey, value, dataSource: this.localDataSource, headerSelectFields: this.headerSelectFields, item: this.localDataSource[rowIndex] }); this.$emit("blur", { rowIndex, colKey, value, dataSource: this.localDataSource, headerSelectFields: this.headerSelectFields, item: this.localDataSource[rowIndex] });
}, },
onSubBlur(rowIndex, colKey, value) { onSubBlur(rowIndex, colKey, value) {
//
//
const col = this.columns.find(c => c.bodySubKey === colKey); const col = this.columns.find(c => c.bodySubKey === colKey);
if (col && col.bodySubFillType === "actFill" && col.bodySubCompareTo) { if (col && col.bodySubFillType === "actFill" && col.bodySubCompareTo) {
const compareToValue = this.localDataSource[rowIndex][col.bodySubCompareTo]; const compareToValue = this.localDataSource[rowIndex][col.bodySubCompareTo];

+ 21
- 3
src/views/business/comps/template/comps/bl/BL001.vue View File

@ -40,6 +40,7 @@
</CustomTable> </CustomTable>
<CustomTable <CustomTable
@bodyTreeChange="changeTree"
fieldItemLabel="template.dj.dj003.ypyjxx" fieldItemLabel="template.dj.dj003.ypyjxx"
:columns="ypyjColumns" :columns="ypyjColumns"
:ref="'ypyjTableRef'" :ref="'ypyjTableRef'"
@ -121,7 +122,7 @@ export default {
} }
}, },
computed: { computed: {
//
//
remarkConig() { remarkConig() {
return [ return [
{ {
@ -140,7 +141,7 @@ export default {
} }
] ]
}, },
//
//
baseInfoFormConfig() { baseInfoFormConfig() {
return [ return [
{ {
@ -276,6 +277,7 @@ export default {
prop: "yps", prop: "yps",
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyDisabled: true,
width: 180, width: 180,
}, },
] ]
@ -294,6 +296,8 @@ export default {
maxlength: 200, maxlength: 200,
subType: 'button', subType: 'button',
subKey: 'yjsjButton', subKey: 'yjsjButton',
disabled:true,
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dj.dj003.hqsj', buttonName: 'template.dj.dj003.hqsj',
}, },
dsfs: { dsfs: {
@ -359,7 +363,15 @@ export default {
}, },
// //
getTabletoCheck() { 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 const firstList = stepTableFormData_1
.filter(item => item && item.ypmc && item.ypmc.trim()) // .filter(item => item && item.ypmc && item.ypmc.trim()) //
.map(item => ({ .map(item => ({
@ -375,6 +387,12 @@ export default {
this.ypmcTaOptions = firstList; this.ypmcTaOptions = firstList;
}) })
}, },
//
changeTree(data){
let { rowIndex , value , row } = data
let checkTree = value?.checkedValues?.filter(i=>i.checked)
this.$refs.ypyjTableRef.updateDataSourceByRowIndex(rowIndex, {yps:checkTree?.length})
},
} }
} }
</script> </script>

+ 12
- 6
src/views/business/comps/template/comps/dj/DJ001.vue View File

@ -15,11 +15,17 @@
:formConfig="operateConfig" :formData="formData" /> :formConfig="operateConfig" :formData="formData" />
<BaseInfoFormPackage v-if="fillType !== 'preFill'" fieldItemLabel="template.dj.dj001.fhfw" <BaseInfoFormPackage v-if="fillType !== 'preFill'" fieldItemLabel="template.dj.dj001.fhfw"
ref="fhfwCheckBoxRef" :formConfig="fhfwCheckBoxConfig" :formData="formData" /> ref="fhfwCheckBoxRef" :formConfig="fhfwCheckBoxConfig" :formData="formData" />
<div class="template-form-item">
<span>{{ $t('template.dj.dj001.fhfw') }}</span>
<CustomTable :columns="operateColumns" ref="operateTableRef"
:showOperation="fillType === 'preFill'" :showAddRow="fillType === 'preFill'"
:formData="formData" :isBorder="false" :prefixKey="`operateTable`">
<div class="template-form-item" v-if="fillType === 'preFill'">
<span>{{ $t('template.dj.dj001.fhfw') }}</span>
<CustomTable
:columns="operateColumns"
ref="operateTableRef"
:showOperation="fillType === 'preFill'"
:showAddRow="fillType === 'preFill'"
:formData="formData"
:isBorder="false"
:prefixKey="`operateTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" <TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'operateTableRef')"> @deleteRow="() => deleteTableRow(rowIndex, 'operateTableRef')">
@ -27,7 +33,7 @@
</template> </template>
</CustomTable> </CustomTable>
</div> </div>
<div class="template-form-item">
<div class="template-form-item" v-ifan class="s">="fillType === 'preFill'">
<span>{{ $t('template.dj.dj001.fhlr') }}</span> <span>{{ $t('template.dj.dj001.fhlr') }}</span>
<CustomTable :columns="fhlrColumns" ref="fhlrTableRef" <CustomTable :columns="fhlrColumns" ref="fhlrTableRef"
:showOperation="fillType === 'preFill'" :showAddRow="fillType === 'preFill'" :showOperation="fillType === 'preFill'" :showAddRow="fillType === 'preFill'"

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

@ -43,6 +43,7 @@
fieldItemLabel="template.dj.dj003.ypyjxx" fieldItemLabel="template.dj.dj003.ypyjxx"
:columns="ypyjColumns" :columns="ypyjColumns"
:ref="'ypyjTableRef'" :ref="'ypyjTableRef'"
@clickButton="handleClickButton"
:showOperation="fillType === 'actFill'" :showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'" :showAddRow="fillType === 'actFill'"
:formData="formData" :formData="formData"
@ -242,8 +243,13 @@ export default {
{ {
label: 'template.dj.dj003.cysj', label: 'template.dj.dj003.cysj',
prop: "cysj", prop: "cysj",
bodyType: 'dateTimeRange',
width: 450,
bodyType: 'input',
bodySubType: 'button',
bodySubButtonName: 'template.dl.dl018.ksButton',
bodySubKey: 'cysjButton',
bodySubyDisabled: this.fillType !== 'actFill',
bodyDisabled: true,
bodySubFillType: 'actFill',
bodyFillType: 'actFill' bodyFillType: 'actFill'
}, },
{ {
@ -278,6 +284,8 @@ export default {
maxlength: 200, maxlength: 200,
subType: 'button', subType: 'button',
subKey: 'yjsjButton', subKey: 'yjsjButton',
disabled:true,
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dj.dj003.hqsj', buttonName: 'template.dj.dj003.hqsj',
}, },
dsfs: { dsfs: {
@ -334,11 +342,15 @@ export default {
}, },
// //
handleClickButton(_item, signData) { 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() { getTabletoCheck() {

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

@ -21,6 +21,7 @@
fieldItemLabel="template.dj.dj003.ypyjxx" fieldItemLabel="template.dj.dj003.ypyjxx"
:columns="ypyjColumns" :columns="ypyjColumns"
:ref="'ypyjTableRef'" :ref="'ypyjTableRef'"
@clickButton="handleClickButton"
:showOperation="fillType === 'actFill'" :showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'" :showAddRow="fillType === 'actFill'"
:formData="formData" :formData="formData"
@ -198,8 +199,13 @@ export default {
{ {
label: 'template.dj.dj003.cysj', label: 'template.dj.dj003.cysj',
prop: "cysj", prop: "cysj",
bodyType: 'dateTimeRange',
width: 450,
bodyType: 'input',
bodySubType: 'button',
bodySubButtonName: 'template.dl.dl018.ksButton',
bodySubKey: 'cysjButton',
bodySubyDisabled: this.fillType !== 'actFill',
bodyDisabled: true,
bodySubFillType: 'actFill',
bodyFillType: 'actFill' bodyFillType: 'actFill'
}, },
{ {
@ -234,6 +240,8 @@ export default {
maxlength: 200, maxlength: 200,
subType: 'button', subType: 'button',
subKey: 'yjsjButton', subKey: 'yjsjButton',
disabled:true,
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dj.dj003.hqsj', buttonName: 'template.dj.dj003.hqsj',
}, },
dsfs: { dsfs: {
@ -286,12 +294,15 @@ export default {
}, },
// //
handleClickButton(_item, signData) { 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, maxlength: 200,
subType: 'button', subType: 'button',
subKey: 'jzkssjButton', subKey: 'jzkssjButton',
disabled: true,
subDisabled: this.fillType !== 'actFill', subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dl.dl003.ksButton', buttonName: 'template.dl.dl003.ksButton',
}, },
@ -234,7 +235,9 @@ export default {
fillType: 'actFill', fillType: 'actFill',
maxlength: 200, maxlength: 200,
subType: 'button', subType: 'button',
disabled: true,
subKey: 'jzjssjButton', subKey: 'jzjssjButton',
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dl.dl003.jsButton', buttonName: 'template.dl.dl003.jsButton',
}, },
fssygbh: { fssygbh: {
@ -273,6 +276,7 @@ export default {
type: 'input', type: 'input',
subType: 'button', subType: 'button',
subKey: 'pykssjButton', subKey: 'pykssjButton',
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dl.dl003.ksButton', 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', fillType: 'actFill',
maxlength: 200, maxlength: 200,
subType: 'button', subType: 'button',
disabled: true,
subDisabled: this.fillType !== 'actFill',
subKey: 'pykssjButton', subKey: 'pykssjButton',
buttonName: 'template.dl.dl003.ksButton', buttonName: 'template.dl.dl003.ksButton',
}, },
@ -205,6 +207,8 @@ export default {
fillType: 'actFill', fillType: 'actFill',
maxlength: 200, maxlength: 200,
subType: 'button', subType: 'button',
disabled: true,
subDisabled: this.fillType !== 'actFill',
subKey: 'pyjssjButton', subKey: 'pyjssjButton',
buttonName: 'template.dl.dl003.jsButton', buttonName: 'template.dl.dl003.jsButton',
}, },

Loading…
Cancel
Save