Commit 4cac4f17 authored by renjintao's avatar renjintao

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt

parents c6e8e85a 87cb5021
......@@ -58,20 +58,20 @@ export default {
levelId: 0,
levelTitle: "",
bomId: 0,
version: ""
version: "",
},
parms: {
app: "technology",
eid: "",
name: "",
field: ""
field: "",
},
treeData: [],
columns: [
{
key: "name",
align: "left",
high: true
high: true,
},
{
key: "type",
......@@ -84,13 +84,13 @@ export default {
return h("op", {
props: {
icon: params.row.type == 1 ? "md-git-merge" : "",
type: "icon"
type: "icon",
},
on: {
click: () => this.bom(params.row)
}
click: () => this.bom(params.row),
},
});
}
},
},
{
key: "mmcode",
......@@ -102,34 +102,34 @@ export default {
{
props: {},
on: {
click: () => this.details(params.row)
}
click: () => this.details(params.row),
},
},
params.row.mmcode
);
}
},
},
{
key: "drawingNo",
title: this.l("drawingNo"),
high: true
high: true,
},
{
key: "count",
title: this.l("count"),
high: true
high: true,
},
{
key: "postion",
title: this.l("postion"),
high: true
high: true,
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
easy: true,
high: true
high: true,
},
{
......@@ -143,7 +143,7 @@ export default {
"op",
{
attrs: { oprate: "add" },
on: { click: () => this.add(params.row) }
on: { click: () => this.add(params.row) },
},
params.row.type == 1 ? "" : "新增"
),
......@@ -151,7 +151,7 @@ export default {
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row) }
on: { click: () => this.edit(params.row) },
},
"编辑"
),
......@@ -159,15 +159,15 @@ export default {
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row) }
on: { click: () => this.remove(params.row) },
},
"删除"
)
),
];
return h("div", { class: "action" }, actions);
}
}
]
},
},
],
};
},
async fetch({ store, params }) {
......@@ -179,8 +179,8 @@ export default {
id: Number,
parentName: String,
ids: String,
bomId: Number
}
bomId: Number,
},
},
mounted() {
if (this.eid > 0) {
......@@ -198,7 +198,7 @@ export default {
this.modal = true;
},
init() {
Api.alltree({ id: this.bomId, levelId: this.parents.id }).then(r => {
Api.alltree({ id: this.bomId, levelId: this.parents.id }).then((r) => {
this.treeData = r.result;
});
},
......@@ -210,6 +210,7 @@ export default {
this.parents.rootProductId = row.rootProductId;
this.title = "新增";
this.detail = () => import("./bomAdd");
this.fullscreen = false;
this.modal = true;
},
addBom() {
......@@ -221,6 +222,7 @@ export default {
this.parents.rootProductId = this.entity.rootProductId;
this.title = "新增";
this.detail = () => import("./bomAdd");
this.fullscreen = false;
this.modal = true;
},
edit(row) {
......@@ -230,6 +232,7 @@ export default {
this.parents.rootProductId = row.rootProductId;
this.title = "编辑";
this.detail = () => import("./bomEdit");
this.fullscreen = false;
this.modal = true;
},
bom(row) {
......@@ -238,10 +241,11 @@ export default {
this.parents.bomId = row.bomId;
this.title = "bom";
this.detail = () => import("./bomDetail");
this.fullscreen = false;
this.modal = true;
},
remove(row) {
Api.deleteBom(row.bomId, row.levelId, row.rootProductId).then(r => {
Api.deleteBom(row.bomId, row.levelId, row.rootProductId).then((r) => {
if (r.success) {
this.init();
this.$Message.success("删除成功");
......@@ -249,7 +253,7 @@ export default {
});
},
load(v) {
Api.get({ id: v, levelId: this.parents.id }).then(r => {
Api.get({ id: v, levelId: this.parents.id }).then((r) => {
this.entity = r.result;
this.entity.version = parseInt(r.result.version);
this.parms.eid = r.result.productUrlList;
......@@ -282,15 +286,15 @@ export default {
l(key) {
key = "product_info" + "." + key;
return this.$t(key);
}
},
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
}
}
},
},
};
</script>
<style lang="less">
......
......@@ -87,8 +87,8 @@ service.defaults.headers.put['Content-Type'] = 'application/json';
service.interceptors.request.use(
config => {
// 在请求发送之前做一些处理
// const token = util.cookies.get('token');
const token = sessionStorage.getItem('token');
const token = util.cookies.get('token');
// const token = sessionStorage.getItem('token');
if (token) {
// 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
config.headers['Authorization'] = 'Bearer ' + token;
......
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