Commit 98daad6c authored by renjintao's avatar renjintao

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

parents 0a7df8a0 862306c7
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
mounted() { mounted() {
// this.getInfo(); // this.getInfo();
this.load(); this.load();
setInterval(this.load, 90 * 1000); setInterval(this.load, 60 * 1000);
}, },
computed: { computed: {
...mapState({ messages: "messages" }), ...mapState({ messages: "messages" }),
......
This diff is collapsed.
...@@ -32,15 +32,17 @@ ...@@ -32,15 +32,17 @@
<template slot="card" slot-scope="{row}"> <template slot="card" slot-scope="{row}">
<div class="body-card"> <div class="body-card">
<Row class="title-i"> <Row class="title-i">
<Col :span="16"> <Col :span="16">
<Ellipsis :text="row.name" :length="12" tooltip /> <Ellipsis :text="row.name" :length="12" tooltip />
</Col> </Col>
<Col :span="8" class="btn-click">{{row.mmcode}}</Col> <Col :span="8" class="btn-click">{{row.mmcode}}</Col>
</Row> </Row>
<Row class="row-down" :gutter="10"> <Row class="row-down" :gutter="10">
<Col span="7"> <Col span="7">
<div class="img-i"> <div class="img-i">
<img :src="downUrl +row.productUrl" onerror="this.src='/imgicon/noPic_product.png';"/> <img :src="downUrl +row.productUrl" v-if="row.productUrl" />
<!-- onerror="this.src='/imgicon/chan_Pin.png'" -->
<img src="@/assets/imgicon/chan_Pin.png" v-else width="100%" height="100%" />
</div> </div>
</Col> </Col>
<Col span="17" class="c"> <Col span="17" class="c">
...@@ -84,20 +86,20 @@ import Search from "./search"; ...@@ -84,20 +86,20 @@ import Search from "./search";
export default { export default {
name: "list", name: "list",
components: { components: {
Search Search,
}, },
head: { head: {
title: "", title: "",
author: "henq", author: "henq",
description: "product_info 5/20/2020 3:13:51 PM" description: "product_info 5/20/2020 3:13:51 PM",
}, },
props: { props: {
parent: { parent: {
id: Number, id: Number,
parentName: String, parentName: String,
ids: String, ids: String,
bomId: Number bomId: Number,
} },
}, },
data() { data() {
return { return {
...@@ -106,7 +108,7 @@ export default { ...@@ -106,7 +108,7 @@ export default {
easySearch: { easySearch: {
keys: { op: "mmcode,name", value: null }, keys: { op: "mmcode,name", value: null },
levelId: { op: "In", value: this.id }, levelId: { op: "In", value: this.id },
upId: { op: "In", value: 0 } upId: { op: "In", value: 0 },
}, },
modal: false, modal: false,
title: "新增", title: "新增",
...@@ -119,19 +121,19 @@ export default { ...@@ -119,19 +121,19 @@ export default {
title: this.$t("id"), title: this.$t("id"),
hide: true, hide: true,
align: "left", align: "left",
high: true high: true,
}, },
{ {
title: this.l("name"), title: this.l("name"),
key: "name", key: "name",
align: "left" align: "left",
}, },
{ {
key: "mmcode", key: "mmcode",
title: this.l("mmcode"), title: this.l("mmcode"),
align: "center", align: "center",
high: true high: true,
}, },
{ {
key: "productUrl", key: "productUrl",
...@@ -144,39 +146,39 @@ export default { ...@@ -144,39 +146,39 @@ export default {
"a", "a",
{ {
attrs: { attrs: {
oprate: "detail" oprate: "detail",
// href: this.fileUrlPath, // href: this.fileUrlPath,
// target: "_blank" // target: "_blank"
}, },
on: { on: {
click: () => { click: () => {
this.downFile(params.row.productUrl); this.downFile(params.row.productUrl);
} },
} },
}, },
"查看图片" "查看图片"
) ),
]); ]);
} },
}, },
{ {
key: "levelTitle", key: "levelTitle",
title: this.l("levelTitle"), title: this.l("levelTitle"),
align: "left", align: "left",
high: true high: true,
}, },
{ {
key: "drawingNo", key: "drawingNo",
title: this.l("drawingNo"), title: this.l("drawingNo"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "madeCompanyTitle", key: "madeCompanyTitle",
title: this.l("madeCompanyTitle"), title: this.l("madeCompanyTitle"),
align: "center", align: "center",
width: 260, width: 260,
high: true high: true,
}, },
{ {
title: "操作", title: "操作",
...@@ -190,8 +192,8 @@ export default { ...@@ -190,8 +192,8 @@ export default {
{ {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { on: {
click: () => this.bom(params.row) click: () => this.bom(params.row),
} },
}, },
"BOM" "BOM"
), ),
...@@ -200,8 +202,8 @@ export default { ...@@ -200,8 +202,8 @@ export default {
{ {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { on: {
click: () => this.edit(params.row) click: () => this.edit(params.row),
} },
}, },
"编辑" "编辑"
), ),
...@@ -209,7 +211,7 @@ export default { ...@@ -209,7 +211,7 @@ export default {
"op", "op",
{ {
attrs: { oprate: "delete" }, attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row) } on: { click: () => this.remove(params.row) },
}, },
"删除" "删除"
), ),
...@@ -218,18 +220,18 @@ export default { ...@@ -218,18 +220,18 @@ export default {
{ {
attrs: { oprate: "view" }, attrs: { oprate: "view" },
on: { on: {
click: () => this.view(params.row) click: () => this.view(params.row),
} },
}, },
"详情" "详情"
) ),
]); ]);
} },
} },
], ],
typeInfo: "card", typeInfo: "card",
iconInfo: "md-apps", iconInfo: "md-apps",
titleInfo: "卡片模式" titleInfo: "卡片模式",
}; };
}, },
mounted() { mounted() {
...@@ -314,8 +316,7 @@ export default { ...@@ -314,8 +316,7 @@ export default {
this.fullscreen = true; this.fullscreen = true;
}, },
remove(row) { remove(row) {
Api.delete(row.bomId).then((r) => {
Api.delete(row.bomId).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load(); this.$refs.grid.load();
this.$Message.success("删除成功"); this.$Message.success("删除成功");
...@@ -329,19 +330,19 @@ export default { ...@@ -329,19 +330,19 @@ export default {
l(key) { l(key) {
let vkey = "product_info" + "." + key; let vkey = "product_info" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
} },
}, },
watch: { watch: {
"parent.id"(v) { "parent.id"(v) {
if (v) { if (v) {
let data = { let data = {
levelId: { op: "In", value: this.parent.ids }, levelId: { op: "In", value: this.parent.ids },
upId: { op: "In", value: 0 } upId: { op: "In", value: 0 },
}; };
this.$refs.grid.reload(data); this.$refs.grid.reload(data);
} }
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less">
...@@ -369,7 +370,7 @@ export default { ...@@ -369,7 +370,7 @@ export default {
height: 90px; height: 90px;
margin-right: 15px; margin-right: 15px;
// overflow: hidden; // overflow: hidden;
img{ img {
width: 90px; width: 90px;
height: 90px; height: 90px;
} }
......
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