修改按钮 隐藏控制

main
weitingdong 12 months ago
parent 55da446de2
commit 6ad4506685
  1. 21
      src/views/leger/equipmentledgerDetail.vue
  2. 34
      src/views/leger/toolinventoryrecordDetail.vue

@ -92,7 +92,7 @@
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="seachToUpdate" @click="seachToUpdate"
v-if="shouldShowButton"> v-if="UpdateShowButton">
修改</el-button> 修改</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@ -136,11 +136,15 @@
}, { }, {
value: 3, value: 3,
label: '未通过' label: '未通过'
}, {
value: 4,
label: ' '
}], }],
frame_class: '', frame_class: '',
type: {}, type: {},
shouldShowButton:{}, shouldShowButton:{},
addUpdateShowButton:{}, addUpdateShowButton:{},
UpdateShowButton:{},
readonlyForm:{}, readonlyForm:{},
document_form:{}, document_form:{},
option: { option: {
@ -655,15 +659,18 @@
this.readonlyForm=true; this.readonlyForm=true;
this.shouldShowButton=true; this.shouldShowButton=true;
this.addUpdateShowButton=false; this.addUpdateShowButton=false;
this.UpdateShowButton=true;
this.frame_class = 'frame_class1'; this.frame_class = 'frame_class1';
this.checkStatusValue = this.$route.query.checkstatus; this.checkStatusValue = this.$route.query.checkstatus;
this.SearchDetail();
}else{ }else{
this.readonlyForm=false; this.readonlyForm=false;
this.shouldShowButton=false; this.shouldShowButton=false;
this.UpdateShowButton=false;
this.addUpdateShowButton=true; this.addUpdateShowButton=true;
this.frame_class = null; this.frame_class = null;
this.checkStatusValue = 4;
} }
this.SearchDetail();
}, },
methods: { methods: {
handleFormSubmit() { handleFormSubmit() {
@ -740,6 +747,7 @@
seachToUpdate () { seachToUpdate () {
this.shouldShowButton=false; this.shouldShowButton=false;
this.addUpdateShowButton=true; this.addUpdateShowButton=true;
this.UpdateShowButton=false;
this.readonlyForm=false; this.readonlyForm=false;
this.frame_class = null; this.frame_class = null;
}, },
@ -747,13 +755,16 @@
this.readonlyForm=true; this.readonlyForm=true;
this.shouldShowButton=true; this.shouldShowButton=true;
this.addUpdateShowButton=false; this.addUpdateShowButton=false;
this.UpdateShowButton=false;
this.frame_class = 'frame_class1'; this.frame_class = 'frame_class1';
}, },
handleChange (column) { handleChange (column) {
this.type = column this.type = column
if (column.prop == 'parameters') { if (column.prop == 'parameters') {
this.UpdateShowButton=false;
this.parameters_onLoad(); this.parameters_onLoad();
}if (column.prop == 'document') { }if (column.prop == 'document') {
this.UpdateShowButton=false;
this.document_onLoad(); this.document_onLoad();
} }
@ -975,6 +986,12 @@
.frame_class1 .el-input--prefix .el-input__inner { .frame_class1 .el-input--prefix .el-input__inner {
padding-left: 15px; padding-left: 15px;
} }
.frame_class1 input::placeholder {
color: transparent;
display: none; /* 默认隐藏 */
}
.container { .container {
display: flex; display: flex;
justify-content: flex-end; /* 将子元素推到容器的末端 */ justify-content: flex-end; /* 将子元素推到容器的末端 */

@ -25,7 +25,8 @@
<avue-form :option="tab1_option" <avue-form :option="tab1_option"
v-model="tab1_form" v-model="tab1_form"
ref="tab1_form" ref="tab1_form"
:class="frame_class"> :class="frame_class"
>
</avue-form> </avue-form>
</span> </span>
<span v-else-if="type.prop==='inspection'"> <span v-else-if="type.prop==='inspection'">
@ -107,7 +108,7 @@
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="seachToUpdate" @click="seachToUpdate"
v-if="shouldShowButton"> v-if="UpdateShowButton">
修改</el-button> 修改</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@ -148,7 +149,7 @@ export default {
name: "equipmentledgerDetail", name: "equipmentledgerDetail",
data () { data () {
return { return {
checkStatusValue: this.$route.query.checkstatus, checkStatusValue:{},
optionCheckStatus: [{ optionCheckStatus: [{
value: 1, value: 1,
label: '审核中' label: '审核中'
@ -158,11 +159,16 @@ export default {
}, { }, {
value: 3, value: 3,
label: '未通过' label: '未通过'
}], }, {
value: 4,
label: ' '
}
],
frame_class: '', frame_class: '',
type: {}, type: {},
shouldShowButton:{}, shouldShowButton:{},
addUpdateShowButton:{}, addUpdateShowButton:{},
UpdateShowButton:{},
readonlyForm:{}, readonlyForm:{},
document_form:{}, document_form:{},
option: { option: {
@ -489,17 +495,25 @@ export default {
this.readonlyForm=true; this.readonlyForm=true;
this.shouldShowButton=true; this.shouldShowButton=true;
this.addUpdateShowButton=false; this.addUpdateShowButton=false;
this.UpdateShowButton=true;
this.frame_class = 'frame_class1'; this.frame_class = 'frame_class1';
this.checkStatusValue = this.$route.query.checkstatus; this.checkStatusValue = this.$route.query.checkstatus;
this.SearchDetail();
}else{ }else{
this.readonlyForm=false; this.readonlyForm=false;
this.shouldShowButton=false; this.shouldShowButton=false;
this.UpdateShowButton=false;
this.addUpdateShowButton=true; this.addUpdateShowButton=true;
this.frame_class = null; this.frame_class = null;
this.checkStatusValue = 4;
} }
this.SearchDetail();
}, },
methods: { methods: {
handleTabChange(column) {
// activeTab Tab
alert('当前激活的 Tab:', column.prop);
//
},
handleFormSubmit() { handleFormSubmit() {
const form = this.$refs.tab1_form; const form = this.$refs.tab1_form;
form.validate((valid) => { form.validate((valid) => {
@ -574,6 +588,7 @@ export default {
seachToUpdate () { seachToUpdate () {
this.shouldShowButton=false; this.shouldShowButton=false;
this.addUpdateShowButton=true; this.addUpdateShowButton=true;
this.UpdateShowButton=false;
this.readonlyForm=false; this.readonlyForm=false;
this.frame_class = null; this.frame_class = null;
}, },
@ -581,15 +596,19 @@ export default {
this.readonlyForm=true; this.readonlyForm=true;
this.shouldShowButton=true; this.shouldShowButton=true;
this.addUpdateShowButton=false; this.addUpdateShowButton=false;
this.UpdateShowButton=false;
this.frame_class = 'frame_class1'; this.frame_class = 'frame_class1';
}, },
handleChange (column) { handleChange (column) {
this.type = column this.type = column
if (column.prop == 'parameters') { if (column.prop == 'parameters') {
this.UpdateShowButton=false;
this.parameters_onLoad(); this.parameters_onLoad();
}if (column.prop == 'document') { }if (column.prop == 'document') {
this.UpdateShowButton=false;
this.document_onLoad(); this.document_onLoad();
}if (column.prop == 'inspection') { }if (column.prop == 'inspection') {
this.UpdateShowButton=false;
this.inspection_onLoad(); this.inspection_onLoad();
} }
}, },
@ -863,6 +882,11 @@ export default {
pointer-events: none; pointer-events: none;
} }
.frame_class1 input::placeholder {
color: transparent;
display: none; /* 默认隐藏 */
}
.frame_class1 .el-input__icon { .frame_class1 .el-input__icon {
display: none; display: none;
} }

Loading…
Cancel
Save