修改按钮 隐藏控制

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

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

Loading…
Cancel
Save