Commit 76c4f5d7 by lyy

add

parent bc381f49
...@@ -24,15 +24,16 @@ ...@@ -24,15 +24,16 @@
<span class="red">*</span> <span class="red">*</span>
</p> </p>
<div class="row"> <div class="row">
<p <div
:key="index" :key="index"
class="options" class="options2"
v-for="(item, index) in productionLine" v-for="(item, index) in stationList"
@click="change(index)" @click="change(index)"
:class="{ active: a == index }" :class="{ active: a == index }"
> >
{{ item.title }} <p>{{ item.title }}</p>
</p> <p>{{ item.status == 1 ? "待上料" : "运行中" }}</p>
</div>
</div> </div>
</div> </div>
<div class="choose"> <div class="choose">
...@@ -46,11 +47,8 @@ ...@@ -46,11 +47,8 @@
<label style="font-size: 16px" <label style="font-size: 16px"
>上料信息:</label >上料信息:</label
> >
<Input <Input type="text" class="searchInput"
type="text" style="width: 300px"/>
class="searchInput"
style="width: 300px"
></Input>
</div> </div>
<div class="row"> <div class="row">
<p class="flex"> <p class="flex">
...@@ -277,20 +275,25 @@ export default { ...@@ -277,20 +275,25 @@ export default {
method: "get", method: "get",
}) })
.then((res) => { .then((res) => {
if (res.data.ret == 1) {
this.productionLine = res.data.data; this.productionLine = res.data.data;
// this.change(0); // this.change(0);
if (this.productionLine.length == 0) { if (this.productionLine.length == 0) {
this.$Message.error(this.$t(950057)); this.$Message.error(this.$t(950057));
} }
}
}); });
}, },
getStations(id) { getStations(id) {
let data = {
line: id,
type: 0,
};
this.request( this.request(
"/qms/RepairPostionSetting/GetSettingByChanel?Id=" + id, "/acc/AutomationOperate/GetloadStation",
"", data,
"get" "get"
).then((res) => { ).then((res) => {
// console.log(res.data.data);
if (res.data.ret == 1) { if (res.data.ret == 1) {
this.stationList = res.data.data; this.stationList = res.data.data;
} }
...@@ -374,6 +377,18 @@ export default { ...@@ -374,6 +377,18 @@ export default {
margin-right: 50px; margin-right: 50px;
cursor: pointer; cursor: pointer;
} }
.options2 {
font-size: 12px;
padding: 0 12px;
height: 50px;
line-height: 25px;
text-align: center;
border-radius: 5px;
background-color: #f2f2f2;
margin: 10px 0;
margin-right: 50px;
cursor: pointer;
}
.active { .active {
background-color: #2d8cf0; background-color: #2d8cf0;
color: #fff; color: #fff;
......
...@@ -4,15 +4,23 @@ ...@@ -4,15 +4,23 @@
<h2>基本信息</h2> <h2>基本信息</h2>
<div class="newSearchDiv"> <div class="newSearchDiv">
<div class="filter"> <div class="filter">
<label>{{ $t("1950574") }}</label> <label>{{ $t("1132") }}</label>
<Cascader trigger="click" class="searchSelect"></Cascader> <Cascader
trigger="click"
class="searchSelect"
:data="datalevel"
:value="leveldata"
></Cascader>
</div> </div>
<div class="searchBtn"> <div class="searchBtn">
<Button type="primary" class="twoWord" icon="ios-search">{{ <Button
$t("1001") type="primary"
}}</Button> class="twoWord"
<Button type="primary" class="twoWord" icon="ios-search" icon="ios-search"
@click="search()"
>{{ $t("1001") }}</Button
>
<Button type="primary" class="twoWord" icon="ios-search" @click="exportExcel()"
>导出</Button >导出</Button
> >
</div> </div>
...@@ -26,10 +34,11 @@ ...@@ -26,10 +34,11 @@
<p><span>4</span>不可用</p> <p><span>4</span>不可用</p>
</div> </div>
<div class="stateWrap"> <div class="stateWrap">
<div class="stateItem"> <template v-for="(item,index) in stateList">
<div class="stateItem" :key="index">
<p class="flex"> <p class="flex">
<span class="infoLabel">工位:</span> <span class="infoLabel">工位:</span>
<span class="info"></span> <span class="info">{{item}}</span>
</p> </p>
<p class="flex"> <p class="flex">
<span class="infoLabel">产品:</span> <span class="infoLabel">产品:</span>
...@@ -48,6 +57,7 @@ ...@@ -48,6 +57,7 @@
<span class="info"></span> <span class="info"></span>
</p> </p>
</div> </div>
</template>
</div> </div>
<Table <Table
class="tableClass" class="tableClass"
...@@ -55,12 +65,15 @@ ...@@ -55,12 +65,15 @@
:columns="columns1" :columns="columns1"
:max-height="200" :max-height="200"
></Table> ></Table>
<div v-show="show1">
<Table <Table
class="tableClass" class="tableClass"
:data="data2" :data="data2"
:columns="columns2" :columns="columns2"
:max-height="200" :max-height="200"
></Table> ></Table>
</div>
<div v-show="show2">
<Table <Table
class="tableClass" class="tableClass"
:data="data3" :data="data3"
...@@ -69,15 +82,19 @@ ...@@ -69,15 +82,19 @@
></Table> ></Table>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
import axios from "@/libs/api.request";
export default { export default {
data() { data() {
return { return {
productionLine: [], productionLine: [],
a: 0, leveldata: [], // 产线层级插件所需数据
modal: false, datalevel: [], // 产线层级选中数据
stateList:[0],
columns1: [ columns1: [
{ {
title: this.$t("1008"), title: this.$t("1008"),
...@@ -101,6 +118,19 @@ export default { ...@@ -101,6 +118,19 @@ export default {
{ {
title: "工装编号", title: "工装编号",
key: "install_sn", key: "install_sn",
render: (h, params) => {
return h(
"a",
{
on: {
click: () => {
this.show1 = true;
},
},
},
"look"
);
},
}, },
{ {
title: "产品编号", title: "产品编号",
...@@ -109,6 +139,19 @@ export default { ...@@ -109,6 +139,19 @@ export default {
{ {
title: "工件编号", title: "工件编号",
key: "storage_sn", key: "storage_sn",
render: (h, params) => {
return h(
"a",
{
on: {
click: () => {
this.show2 = true;
},
},
},
"look"
);
},
}, },
{ {
title: "状态", title: "状态",
...@@ -157,11 +200,43 @@ export default { ...@@ -157,11 +200,43 @@ export default {
key: "install_sn", key: "install_sn",
}, },
{ {
title: "最后更新时间", title: "子工装编号",
key: "install_sn",
},
{
title: "子工装名称",
key: "install_sn",
},
{
title: "子工装规格",
key: "install_sn",
},
{
title: "子工装编号",
key: "install_sn",
},
{
title: "状态",
key: "install_sn",
},
{
title: "备注",
key: "install_sn",
},
{
title: "附件",
key: "install_sn",
},
{
title: "维护人",
key: "install_sn",
},
{
title: "维护时间",
key: "workpiece_sn", key: "workpiece_sn",
}, },
], ],
data1: [], data2: [],
columns3: [ columns3: [
{ {
title: this.$t("1008"), title: this.$t("1008"),
...@@ -175,38 +250,94 @@ export default { ...@@ -175,38 +250,94 @@ export default {
width: 70, width: 70,
}, },
{ {
title: "产线层级", title: "产品编号",
key: "warehouse", key: "warehouse",
}, },
{ {
title: "设备", title: "产品名称",
key: "storage_sn", key: "storage_sn",
}, },
{ {
title: "工装编号", title: "产品编号",
key: "install_sn", key: "install_sn",
}, },
{ {
title: "产品编号", title: "工序顺序",
key: "workpiece_sn", key: "workpiece_sn",
}, },
{ {
title: "工件编号", title: "工序信息",
key: "storage_sn", key: "storage_sn",
}, },
{ {
title: "状态", title: "产线层级",
key: "install_sn", key: "install_sn",
}, },
{ {
title: "最后更新时间", title: "设备信息",
key: "workpiece_sn",
},
{
title: "工装信息",
key: "workpiece_sn",
},
{
title: "结果",
key: "workpiece_sn",
},
{
title: "维护人",
key: "workpiece_sn",
},
{
title: "维护时间",
key: "workpiece_sn", key: "workpiece_sn",
}, },
], ],
data1: [], data3: [],
show2: false,
show1: false,
}; };
}, },
created() {}, created() {
this.initlevel();
},
methods: {
search() {},
initlevel() {
// 初始化产线层级
this.axios
.request({
url: "config/ProjectLevelSection/GetSectionTree",
method: "get",
})
.then((res) => {
const arr = [];
if (res.data.data.length > 0) {
this.datalevel = res.data.data;
arr.push(res.data.data[0].value);
this.leveldata = arr;
}
});
},
exportExcel(){
let data = {};
this.axios
.request({
url: "",
data,
method: "",
})
.then((res) => {
if (res.data.ret === 1) {
window.location.href =
axios.publicPath + "" + res.data.data;
} else {
this.$Message.error(this.$t(res.data.msg));
}
});
}
},
}; };
</script> </script>
......
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,11 @@
</div> </div>
<div class="filter"> <div class="filter">
<label>任务编号:</label> <label>任务编号:</label>
<Input type="text" class="searchInput"></Input> <Input type="text" class="searchInput" />
</div> </div>
<div class="filter"> <div class="filter">
<label>工件编号:</label> <label>工件编号:</label>
<Input type="text" class="searchInput"></Input> <Input type="text" class="searchInput"/>
</div> </div>
<div class="filter"> <div class="filter">
<label>状态:</label> <label>状态:</label>
...@@ -138,6 +138,8 @@ ...@@ -138,6 +138,8 @@
</template> </template>
<script> <script>
import axios from "@/libs/api.request";
export default { export default {
data() { data() {
return { return {
...@@ -259,6 +261,23 @@ export default { ...@@ -259,6 +261,23 @@ export default {
} }
}); });
}, },
exportExcel(){
let data = {};
this.axios
.request({
url: "",
data,
method: "",
})
.then((res) => {
if (res.data.ret === 1) {
window.location.href =
axios.publicPath + "" + res.data.data;
} else {
this.$Message.error(this.$t(res.data.msg));
}
});
}
}, },
}; };
</script> </script>
......
...@@ -722,7 +722,6 @@ export default { ...@@ -722,7 +722,6 @@ export default {
alert(err.msg); alert(err.msg);
}); });
}, },
request(url, data, type) { request(url, data, type) {
if (type == "get") { if (type == "get") {
return this.axios return this.axios
......
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