Commit 54336918 authored by kangzhenfei's avatar kangzhenfei

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

parents 8d0f20dc 9fef6107
<template>
<div>
<viewer :options="options" :images="images" @inited="inited" class="viewer" ref="viewer">
<template slot-scope="scope">
<figure class="images">
<div class="image-wrapper" v-for="{source, thumbnail} in scope.images" :key="source">
<img
class="image"
:src="thumbnail"
:data-source="source"
:alt="source.split('?image=').pop()"
/>
</div>
</figure>
</template>
</viewer>
</div>
</template>
<script>
export default {
name:'viewerImg',
props: {
images: {
type: Array,
default: []
}
},
data() {
return {
options: {
inline: true,
button: true,
navbar: true,
title: false,
toolbar: true,
tooltip: true,
movable: true,
zoomable: true,
rotatable: true,
scalable: true,
transition: true,
fullscreen: true,
keyboard: true,
url: "data-source"
}
// images: [...sourceImages].splice(0, 5)
};
},
computed: {},
methods: {
inited(viewer) {
this.$viewer = viewer;
}
},
watch: {
images(v) {
if (v && v.length > 0) {
this.images = v;
}
}
}
};
</script>
<style lang="less" scoped>
.viewer {
height: 100%;
.images {
height: 100%;
display: flex;
justify-content: center;
align-content: center;
align-items: center;
flex-wrap: wrap;
padding: 5px;
.image-wrapper {
display: inline-block;
width: calc(10% - 20px);
margin: 5px 5px 0 5px;
.image {
width: 100%;
cursor: pointer;
display: inline-block;
}
}
}
}
</style>
\ No newline at end of file
...@@ -9,4 +9,8 @@ export default { ...@@ -9,4 +9,8 @@ export default {
submitData(params) { submitData(params) {
return Api.post(`${PlanUrl}/orderexecutequalityrecord/checkdispatchproduct`, params); return Api.post(`${PlanUrl}/orderexecutequalityrecord/checkdispatchproduct`, params);
}, },
//工单联合信息
orderanddispatchinfos(params) {
return Api.get(`${PlanUrl}/orderexecutenew/orderanddispatchinfos`, params);
},
} }
\ No newline at end of file
...@@ -48,33 +48,26 @@ ...@@ -48,33 +48,26 @@
<div class="footer_box"> <div class="footer_box">
<div class="ul_box fl"> <div class="ul_box fl">
<ul> <ul>
<li>名称:名称1</li> <li>产品名称:{{entity.productName}}</li>
<li>图号:UIGT-763245</li> <li>图号:{{entity.drawnNumber}}</li>
<li>状态:未开工</li> <li>状态:{{entity.status}}</li>
<li>订单编号:097543346</li> <li>订单编号:{{entity.mesCode}}</li>
<li>订单属性1:</li> <li>批次号:{{entity.batchNumber}}</li>
<li>订单属性2:</li> <li>计划数量:{{entity.quantity}}</li>
<li>订单属性3:</li> <li>节点日期:{{entity.demandFinishDate}}</li>
<li>计划数量:10</li>
<li>节点日期:2020-02-25</li>
</ul> </ul>
</div> </div>
<div class="ul_box fl"> <div class="ul_box fl">
<ul> <ul>
<li>工序名称:名称1</li> <li>工序名称:{{entity.seqName}}</li>
<li>工序序号:UIGT-763245</li> <li>工序序号:{{entity.seqNo}}</li>
<li>派工数量:66</li> <li>派工数量:{{entity.dispatchQuantity}}</li>
<li>资源名称:23366</li> <li>人员信息:{{entity.userNames}}</li>
<li>资源编号:986732038</li> <li>准备工时:{{entity.setupTime}}</li>
<li>人员信息:</li>
<li>开始时间:</li>
<li>结束时间:</li>
<li>单件工时:10</li>
<li>准备工时:2020-02-25</li>
</ul> </ul>
</div> </div>
<div class="img_box fl" style="background:#DDD" > <div class="img_box fl" style="background:#DDD">
<vie /> <ViewerImg :images="images" />
</div> </div>
</div> </div>
<Modal v-model="ransferModal" :title="transferTitle" width="800" > <Modal v-model="ransferModal" :title="transferTitle" width="800" >
...@@ -84,19 +77,22 @@ ...@@ -84,19 +77,22 @@
</div> </div>
</template> </template>
<script> <script>
import Vie from '../../../test/viewer' import Api from "../api";
import ApiTech from "../../../technology/productMix/product/api";
export default { export default {
name: "starOrder", name: "starOrder",
components: {
Vie
},
data() { data() {
return { return {
starmodal: true, starmodal: true,
downUrl: fileUrlDown,
contentMsge: contentMsge:
"<ul><li>暂停 2020-02-06 15:35</li><li>继续 2020-02-06 15:35</li></ul>", "<ul><li>暂停 2020-02-06 15:35</li><li>继续 2020-02-06 15:35</li></ul>",
ransferModal: false, ransferModal: false,
transferTitle: "确认转序", transferTitle: "确认转序",
images: [],
entity: {},
id: Number(this.$route.query.id),
eid: ""
}; };
}, },
created() { created() {
...@@ -106,6 +102,7 @@ export default { ...@@ -106,6 +102,7 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() { mounted() {
this.load(this.id)
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
...@@ -120,12 +117,55 @@ export default { ...@@ -120,12 +117,55 @@ export default {
transferFn(){ transferFn(){
this.ransferModal = true this.ransferModal = true
}, },
load(v) {
let params = {
id: v
};
Api.orderanddispatchinfos(params)
.then(r => {
if (r.success && r.result) {
this.entity = r.result;
if (r.result.productId && r.result.productId > 0) {
ApiTech.get({ id: r.result.productId }).then(res => {
if (res.success && res.result) {
this.eid = res.result.productUrlList;
//查询上传到文件服务器上的文件
let parms = {
app: "technology",
eid: this.eid,
name: "",
field: ""
};
this.$http.sysUser.getFile(parms).then(res1 => {
if (res1.data != [] && res1.data.length > 0) {
this.images = [];
res1.data.forEach(datas => {
this.images.push(this.downUrl+datas.downloadPath)
});
alert(JSON.stringify(this.images))
}
});
}
});
}
}
})
.catch(e => {
this.$Message.error("连接错误");
});
},
inited(viewer) { inited(viewer) {
this.$viewer = viewer; this.$viewer = viewer;
}, },
show() { show() {
this.$viewer.show(); this.$viewer.show();
} }
},
watch:{
images(v){
this.images=v
}
} }
}; };
</script> </script>
...@@ -279,7 +279,7 @@ export default { ...@@ -279,7 +279,7 @@ export default {
//返回img需要显示的src值 //返回img需要显示的src值
let tempUrl = ""; let tempUrl = "";
if (url && url.length > 0) { if (url && url.length > 0) {
tempUrl = url; tempUrl = this.downUrl +url;
} else { } else {
tempUrl = iconImg + "noPic_product.png"; tempUrl = iconImg + "noPic_product.png";
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<Layout> <Layout>
<Sider width="300"> <Sider width="300">
<div class="add-list"> <div class="add-list">
<img :src="img" /> <img :src="downUrl+img" />
</div> </div>
</Sider> </Sider>
<Content> <Content>
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
levelTitle: "" levelTitle: ""
}, },
downUrl: fileUrlDown,
componaylist: [], componaylist: [],
componaylist: [], componaylist: [],
data2: [], data2: [],
...@@ -133,7 +134,7 @@ export default { ...@@ -133,7 +134,7 @@ export default {
}, },
methods: { methods: {
clickData(data, liUrl) { clickData(data, liUrl) {
this.img = data; this.img = liUrl;
this.entity.productUrl = liUrl; this.entity.productUrl = liUrl;
}, },
handleSelect1(data) { handleSelect1(data) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<Layout> <Layout>
<Sider width="300"> <Sider width="300">
<div class="add-list"> <div class="add-list">
<img :src="img" /> <img :src="downUrl+img" />
</div> </div>
</Sider> </Sider>
<Content> <Content>
...@@ -69,6 +69,7 @@ export default { ...@@ -69,6 +69,7 @@ export default {
entity: { entity: {
levelTitle: "" levelTitle: ""
}, },
downUrl: fileUrlDown,
componayId: null, componayId: null,
componaylist: [], componaylist: [],
label: "", label: "",
...@@ -116,7 +117,7 @@ export default { ...@@ -116,7 +117,7 @@ export default {
methods: { methods: {
clickData(data, liUrl) { clickData(data, liUrl) {
this.img = data; this.img = liUrl;
this.entity.productUrl = liUrl; this.entity.productUrl = liUrl;
}, },
handleSelect1(data) { handleSelect1(data) {
...@@ -149,6 +150,7 @@ export default { ...@@ -149,6 +150,7 @@ export default {
} }
this.entity = r.result; this.entity = r.result;
this.img = this.entity.productUrl; this.img = this.entity.productUrl;
this.entity.productUrlList=this.parms.eid;
this.componayId = r.result.madeCompany; this.componayId = r.result.madeCompany;
this.$refs.edit.dep = r.result.levelId; this.$refs.edit.dep = r.result.levelId;
this.$refs.edit.label = r.result.levelTitle; this.$refs.edit.label = r.result.levelTitle;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<Row class="row-down"> <Row class="row-down">
<Col span="7"> <Col span="7">
<div class="img-i"> <div class="img-i">
<img :src="row.productUrl" /> <img :src="downUrl +row.productUrl" />
</div> </div>
</Col> </Col>
<Col span="17" class="c"> <Col span="17" class="c">
...@@ -91,6 +91,7 @@ export default { ...@@ -91,6 +91,7 @@ export default {
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
downUrl: fileUrlDown,
curId: 0, curId: 0,
columns: [ columns: [
{ {
......
...@@ -54,6 +54,7 @@ import DTSpan from '@/components/page/dtSpan.vue' ...@@ -54,6 +54,7 @@ import DTSpan from '@/components/page/dtSpan.vue'
import DTSearch from '@/components/page/dtSearch.vue' import DTSearch from '@/components/page/dtSearch.vue'
import InputTime from '@/components/page/inputTime.vue' import InputTime from '@/components/page/inputTime.vue'
import OutputTime from '@/components/page/outputTime.vue' import OutputTime from '@/components/page/outputTime.vue'
import ViewerImg from '@/components/page/viewer.vue'
// import FormMaking from 'form-making' // import FormMaking from 'form-making'
// import 'form-making/dist/FormMaking.css' // import 'form-making/dist/FormMaking.css'
...@@ -113,6 +114,8 @@ Vue.component("DTSpan", DTSpan) ...@@ -113,6 +114,8 @@ Vue.component("DTSpan", DTSpan)
Vue.component("DTSearch", DTSearch) Vue.component("DTSearch", DTSearch)
Vue.component("InputTime", InputTime) Vue.component("InputTime", InputTime)
Vue.component("OutputTime", OutputTime) Vue.component("OutputTime", OutputTime)
Vue.component("ViewerImg", ViewerImg)
//注入mock //注入mock
// require("../mock") // require("../mock")
......
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