Commit 862306c7 authored by 仇晓婷's avatar 仇晓婷

产品和工单默认图片

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