Commit 5c5b29fc by yiyu.li

add

parent 7da0dd05
......@@ -455,7 +455,7 @@ export default {
return false;
}
let data = {
section: 13,
section: this.sectionid,
};
this.request(
"/acc/AutomationOperate/CompalateAssemble",
......
......@@ -106,8 +106,7 @@
class="tableClass"
:columns="columns1"
:data="data1"
highlight-row
@on-current-change="handleRowChange"
@on-row-click="onExpand"
></Table>
<div class="pageDiv">
......@@ -276,7 +275,10 @@ export default {
highlightRow: true,
},
on: {
onCurrentChange: () => {},
'on-current-change': (currentRow,oldCurrentRow) => {
this.childObj = currentRow;
console.log(currentRow);
},
},
});
},
......@@ -429,6 +431,8 @@ export default {
},
created() {
this.columns1 = this.$time.initTableTitle(this.columns1);
this.columns2 = this.$time.initTableTitle(this.columns2);
this.initFrockType();
this.search(1, 10);
},
......@@ -473,6 +477,7 @@ export default {
this.type = 1;
},
addPost() {
let url = '';
let data = {
parentid: this.toolingId1, //父级工装ID
fixturetoolid: this.toolingId2, //工装ID
......@@ -480,6 +485,12 @@ export default {
filename: this.filename, //附件名称
status: 1,
};
if (this.type == 1) {
url = '/acc/FixtureToolsAssembly/Add'
}
if (this.type == 2) {
data.id = this.childObj.id;
}
this.request("/acc/FixtureToolsAssembly/Add", data, "post").then(
(res) => {
if (res.data.ret == 1) {
......@@ -489,7 +500,25 @@ export default {
}
);
},
edit() {},
edit() {
if(!this.childObj.id){
this.$Message.error('请先选择子工装信息');
return false;
}
this.parentType = this.childObj.parentcategoryids;
this.sonType = this.childObj.categoryids;
this.parentId = this.childObj.parentcategoryid;
this.getToolingList(1);
this.sonId = this.childObj.categoryid;
this.getToolingList(2);
this.$nextTick(()=>{
this.toolingId1 = this.childObj.parentid;
this.toolingId2 = this.childObj.fixturetoolid;
})
this.modal = true;
},
dele() {},
loadExcel() {},
exportEecel() {},
......@@ -581,7 +610,7 @@ export default {
},
onExpand(row, index) {
this.detailobj = row;
console.log(this.detailobj);
this.data1.forEach((item, i) => {
//这个循环是为了每次只能展开一个,其他自动收起,不需要可以去掉
i !== index ? (this.data1[i]._expanded = false) : "";
......
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