luojie 1 month ago
parent
commit
b9e24ae460
9 changed files with 101 additions and 70 deletions
  1. +1
    -1
      src/components/Template/CustomTable.vue
  2. +24
    -26
      src/views/business/comps/template/comps/bl/BL001.vue
  3. +21
    -14
      src/views/business/comps/template/comps/bl/BL002.vue
  4. +3
    -3
      src/views/business/comps/template/comps/dj/DJ001.vue
  5. +27
    -9
      src/views/business/comps/template/comps/dj/DJ002.vue
  6. +3
    -3
      src/views/business/comps/template/comps/dj/DJ003.vue
  7. +3
    -3
      src/views/business/comps/template/comps/dl/DL004.vue
  8. +12
    -5
      src/views/business/comps/template/comps/dl/DL005.vue
  9. +7
    -6
      src/views/business/comps/template/comps/dl/DL006.vue

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

@ -686,7 +686,7 @@ export default {
} else if (col.bodyType === "checkbox") { } else if (col.bodyType === "checkbox") {
// checkbox // checkbox
// checkboxactFill // checkboxactFill
if (!col.bodyDisabled && this.templateFillType === 'actFill') {
if (!col.bodyDisabled && this.templateFillType === 'actFill' && !col.isNeedCheck) {
// checkboxtrue // checkboxtrue
// checkbox // checkbox
const hasChecked = Array.isArray(mainValue) ? mainValue.length > 0 : mainValue === true; const hasChecked = Array.isArray(mainValue) ? mainValue.length > 0 : mainValue === true;

+ 24
- 26
src/views/business/comps/template/comps/bl/BL001.vue View File

@ -251,9 +251,6 @@ export default {
bodyType: 'checkboxTree', bodyType: 'checkboxTree',
bodyFillType: 'actFill', bodyFillType: 'actFill',
width: 280, width: 280,
bodyLayout: 'horizontal',//
optionCode:"ypmcTaOptions",
noBorder: true,
bodyOptions: this.ypmcTaOptions, bodyOptions: this.ypmcTaOptions,
}, },
{ {
@ -318,10 +315,7 @@ export default {
} }
}, },
mounted() { mounted() {
if(this.fillType === "actFill"){
console.log(this.formData, "this.formData")
this.ypmcTaOptions = this.formData.ypmcTaOptions || []
}
this.getTabletoCheck()
}, },
methods: { methods: {
// //
@ -331,25 +325,11 @@ export default {
// //
getFilledFormData() { getFilledFormData() {
const filledData = this.getFilledFormDataByRefs(refNames);
if(this.formData.ypmcTaOptions){
filledData.ypmcTaOptions = this.formData.ypmcTaOptions
}
return filledData
return this.getFilledFormDataByRefs(refNames)
}, },
// //
async getFormData() { async getFormData() {
const formData = await this.validFields();
if(this.fillType === "preFill" && !!formData){
const filledData = this.getFilledFormData();
const {stepTableFormData_1 = []} = filledData;
const options = stepTableFormData_1.map(item => ({
value: item.ypmc,
label: item.ypmc,
}))
formData.ypmcTaOptions = options
}
return formData
return await this.validFormFields(refNames)
}, },
// //
async validFields() { async validFields() {
@ -358,9 +338,9 @@ export default {
getResource() { getResource() {
// const stepResource = this.$refs.yqsyTableRef.getStepResource() // const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使 // 使
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp
this.resourceTmp = []
this.yqResourceTmp = []
return this.resourceTmp
}, },
// //
@ -377,6 +357,24 @@ export default {
) )
}, },
//
getTabletoCheck() {
let { stepTableFormData_1 = [] } = this.getFilledFormData()
const firstList = stepTableFormData_1
.filter(item => item && item.ypmc && item.ypmc.trim()) //
.map(item => ({
label: item.ypmc,
value: item.ypmc,
}))
//
.filter((item, index, arr) => {
return arr.findIndex(i => i.value === item.value) === index;
});
//
this.$nextTick(()=>{
this.ypmcTaOptions = firstList;
})
},
} }
} }
</script> </script>

+ 21
- 14
src/views/business/comps/template/comps/bl/BL002.vue View File

@ -210,24 +210,18 @@ export default {
{ {
label: 'template.bl.bl002.smryqrxx', label: 'template.bl.bl002.smryqrxx',
prop: "smryqrxx", prop: "smryqrxx",
bodyType: "radio",
isNeedCheck: true,
bodyType: "checkbox",
bodyFillType: "actFill", bodyFillType: "actFill",
bodyOptions: [
{value:'图像命名准确',label:'图像命名准确'},
{value:'图像命名不准确',label:'图像命名不准确'},
],
checkboxLabel: 'template.bl.bl002.txmmzq' checkboxLabel: 'template.bl.bl002.txmmzq'
}, },
{ {
label: 'template.bl.bl002.ztblxjqrxx', label: 'template.bl.bl002.ztblxjqrxx',
prop: "ztblxjqrxx", prop: "ztblxjqrxx",
bodyType: 'radio',
isNeedCheck: true,
bodyType: 'checkbox',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyOptions: [
{value:'图像完整清晰',label:'图像完整清晰'},
{value:'图像不完整清晰',label:'图像不完整清晰'},
],
// checkboxLabel: 'template.bl.bl002.txwzqx'
checkboxLabel: 'template.bl.bl002.txwzqx'
}, },
] ]
}, },
@ -238,6 +232,19 @@ export default {
refConf refConf
} }
}, },
mounted() {
let { stepTableFormData = [] } = this.getFilledFormData()
if( stepTableFormData && stepTableFormData.length >0 ){
stepTableFormData.map((item,index)=>{
if(!item.smryqrxx && item.smryqrxx !== false){
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(index, {...item,smryqrxx:false})
}
if(!item.ztblxjqrxx && item.ztblxjqrxx !== false){
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(index, {...item,ztblxjqrxx:false})
}
})
}
},
methods: { methods: {
// //
async deleteTableRow(rowIndex, refName) { async deleteTableRow(rowIndex, refName) {
@ -258,9 +265,9 @@ export default {
getResource() { getResource() {
// const stepResource = this.$refs.yqsyTableRef.getStepResource() // const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使 // 使
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp
this.resourceTmp = []
this.yqResourceTmp = []
return this.resourceTmp
}, },
// //
async onSave() { async onSave() {

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

@ -231,9 +231,9 @@ export default {
getResource() { getResource() {
//使 //使
// const stepResource = this.$refs.stepRef.getStepResource() // const stepResource = this.$refs.stepRef.getStepResource()
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp;
this.resourceTmp = []
this.yqResourceTmp = []
return this.resourceTmp;
}, },
// //
async onSave() { async onSave() {

+ 27
- 9
src/views/business/comps/template/comps/dj/DJ002.vue View File

@ -237,10 +237,7 @@ export default {
prop: "ypmcTa", prop: "ypmcTa",
bodyType: 'checkboxTree', bodyType: 'checkboxTree',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyOptions: [
{value:1,label:'正常'},
{value:0,label:'偏离'},
],
bodyOptions: this.ypmcCheckOptions
}, },
{ {
label: 'template.dj.dj003.cysj', label: 'template.dj.dj003.cysj',
@ -297,9 +294,13 @@ export default {
data() { data() {
return { return {
formData: {}, formData: {},
refConf
refConf,
ypmcCheckOptions:[]
} }
}, },
mounted() {
this.getTabletoCheck()
},
methods: { methods: {
// //
async deleteTableRow(rowIndex, refName) { async deleteTableRow(rowIndex, refName) {
@ -321,9 +322,9 @@ export default {
getResource() { getResource() {
// const stepResource = this.$refs.yqsyTableRef.getStepResource() // const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使 // 使
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp
this.resourceTmp = []
this.yqResourceTmp = []
return this.resourceTmp
}, },
// //
@ -338,7 +339,24 @@ export default {
moment().format('YYYY/MM/DD HH:mm'), moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData } { isUpdateRecord: true, signData }
) )
},
//
getTabletoCheck() {
let { stepTableFormData_1 = [] } = this.getFilledFormData()
const firstList = stepTableFormData_1
.filter(item => item && item.ypmc && item.ypmc.trim()) //
.map(item => ({
label: item.ypmc,
value: item.ypmc,
}))
//
.filter((item, index, arr) => {
return arr.findIndex(i => i.value === item.value) === index;
});
//
this.$nextTick(()=>{
this.ypmcCheckOptions = firstList;
})
}, },
} }
} }

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

@ -274,9 +274,9 @@ export default {
getResource() { getResource() {
// const stepResource = this.$refs.yqsyTableRef.getStepResource() // const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使 // 使
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp
this.resourceTmp = []
this.yqResourceTmp = []
return this.resourceTmp
}, },
// //

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

@ -280,9 +280,9 @@ export default {
getResource() { getResource() {
// const stepResource = this.$refs.yqsyTableRef.getStepResource() // const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使 // 使
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp
this.resourceTmp = []
this.yqResourceTmp = []
return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e const { selectInfo, key, rowIndex } = e

+ 12
- 5
src/views/business/comps/template/comps/dl/DL005.vue View File

@ -25,7 +25,7 @@
:formConfig="czInfoFormConfig" :formConfig="czInfoFormConfig"
:formData="formData" :formData="formData"
/> />
<StepFormPackage class="mt20" ref="stepFormPackageRef" prefixKey="dl_step1" :form-config="stepConfig" :formData = "formData" />
<StepFormPackage @onRegentSubmit="onRegentSubmit" class="mt20" ref="stepFormPackageRef" prefixKey="dl_step1" :form-config="stepConfig" :formData = "formData" />
</div> </div>
<BaseInfoFormPackage <BaseInfoFormPackage
@ -235,11 +235,11 @@ export default {
return await this.validFormFields(refNames) return await this.validFormFields(refNames)
}, },
getResource() { getResource() {
// const stepResource = this.$refs.yqsyTableRef.getStepResource()
const stepResource = this.$refs.stepFormPackageRef.getSjResource()
// 使 // 使
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp
this.resourceTmp = []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp
}, },
// //
@ -247,6 +247,13 @@ export default {
const formData = this.getStepResource() const formData = this.getStepResource()
console.log(formData, 'formData') console.log(formData, 'formData')
}, },
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log(key,111)
},
} }
} }
</script> </script>

+ 7
- 6
src/views/business/comps/template/comps/dl/DL006.vue View File

@ -472,11 +472,11 @@ export default {
return await this.validFormFields(refNames) return await this.validFormFields(refNames)
}, },
getResource() { getResource() {
// const stepResource = this.$refs.yqsyTableRef.getStepResource()
const stepResource = this.$refs.stepRef.getStepResource()
// 使 // 使
// this.resourceTmp = stepResource.sjResource || []
// this.yqResourceTmp = stepResource.yqResource || []
// return this.resourceTmp
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {
console.log(e,909090) console.log(e,909090)
@ -502,7 +502,7 @@ export default {
1: { 1: {
s9hhybh: { s9hhybh: {
label: 'template.dl.dl006.s9hhybh', label: 'template.dl.dl006.s9hhybh',
type: 'input',
type: 'sj',
fillType: 'actFill', fillType: 'actFill',
maxlength: 4, maxlength: 4,
}, },
@ -519,7 +519,7 @@ export default {
other: { other: {
pbsbh: { pbsbh: {
label: 'template.dl.dl006.pbsbh', label: 'template.dl.dl006.pbsbh',
type: 'input',
type: 'sj',
fillType: 'actFill', fillType: 'actFill',
maxlength: 4, maxlength: 4,
}, },
@ -595,6 +595,7 @@ export default {
prop: `czrxm_${i}`, prop: `czrxm_${i}`,
label: 'template.dl.dl006.jzbh', label: 'template.dl.dl006.jzbh',
bodyType: 'checkbox', bodyType: 'checkbox',
isNeedCheck: true,
bodyFillType: 'actFill', // actFillpreFill bodyFillType: 'actFill', // actFillpreFill
width: 300, width: 300,
checkboxLabel:'', checkboxLabel:'',

Loading…
Cancel
Save