qiankanghui 1 hour ago
parent
commit
fe0509dff3
  1. 11
      src/views/modules/srmPart/com_part_SpecParams.vue

11
src/views/modules/srmPart/com_part_SpecParams.vue

@ -2,6 +2,7 @@
<div>
<div style="margin-top: 5px">
<el-button type="primary" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button>
<el-button type="primary" @click="clickCancel" v-if="!attributeDialog">取消</el-button>
<el-button type="primary" @click="refreshPropertiesModal" :disabled="disabled" v-if="attributeDialog">刷新属性模板</el-button>
</div>
<div class="rq " v-if="attributeDialog">
@ -239,6 +240,9 @@ export default {
//初始化组件的参数
init(inData) {
//切换产品时退出编辑态并丢弃未保存数据,避免停留在旧编辑数据上
this.attributeDialog = true;
this.copyAttributeList = [];
//初始化参数
this.searchData = JSON.parse(JSON.stringify(inData));
this.setTableHeight(this.searchData.height)
@ -246,6 +250,13 @@ export default {
this.getProperties();
},
//取消编辑:丢弃未保存的修改,回到查看态
clickCancel(){
this.attributeDialog = true;
this.copyAttributeList = [];
this.getProperties();
},
refreshPropertiesModal(){
this.$confirm(`是否刷新至最新模板界面,已填数据会更新到新模板中,若旧属性在新模板中被删除,该条数据会消失。`, '提示', {

Loading…
Cancel
Save