Commit 36f44db5 by lixiaomin

修改机型弹框bug

parent efa01e1a
...@@ -56,8 +56,7 @@ ...@@ -56,8 +56,7 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer" > <div slot="footer" class="dialog-footer" >
<el-button type="primary" @click="comDiaLogCancel" >确定</el-button> <el-button type="primary" @click="comDiaLogCancel">退出</el-button>
<el-button @click="comDiaLogCancel">退出</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="编辑组件属性" :visible.sync="editDiaLog" width="900px" append-to-body> <el-dialog title="编辑组件属性" :visible.sync="editDiaLog" width="900px" append-to-body>
...@@ -141,7 +140,7 @@ export default { ...@@ -141,7 +140,7 @@ export default {
componentList:[], componentList:[],
componentName:'', componentName:'',
com_ros_code:'', com_ros_code:'',
comShow:true comShow:true,
}; };
}, },
created() { created() {
...@@ -183,8 +182,18 @@ export default { ...@@ -183,8 +182,18 @@ export default {
this.editDiaLog=true; this.editDiaLog=true;
this.getComponentPropertyList(row.model_id,row.ros_code); this.getComponentPropertyList(row.model_id,row.ros_code);
}, },
//关闭机型设置
comDiaLogCancel(){ comDiaLogCancel(){
this.comDiaLog=false let hang=0;
for(let i=0;i<this.modelComponentList.length;i++){
if(this.modelComponentList[i].isShow){
hang=i+1;
this.$message.error('第'+hang+'行,数据未点击确定!');
return;
}
}
this.comDiaLog=false;
}, },
//关闭组件属性 //关闭组件属性
editDiaLogCancel(){ editDiaLogCancel(){
...@@ -269,7 +278,7 @@ export default { ...@@ -269,7 +278,7 @@ export default {
return; return;
} }
} }
row.isShow = false;
let obj={ let obj={
"model_id":this.modelId, "model_id":this.modelId,
"component_name":row.component_name, "component_name":row.component_name,
...@@ -281,9 +290,10 @@ export default { ...@@ -281,9 +290,10 @@ export default {
addComponent([obj]).then((response) => { addComponent([obj]).then((response) => {
if(response.code==0){ if(response.code==0){
this.$modal.msgSuccess("添加组件成功!"); this.$modal.msgSuccess("添加组件成功!");
this.getModelComponentList(); row.isShow = false;
}else if(response.code==21001){ }else if(response.code==21001){
this.$message.error('该机型已有机器绑定,请重新填写!'); this.$message.error('该机型已有机器绑定,请重新填写!');
row.isShow = true;
} }
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment