Commit e9eaefa9 authored by renjintao's avatar renjintao

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

parents 637f96b3 43a40006
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
@on-click="handleClickTab" @on-click="handleClickTab"
@on-tab-remove="handleClickClose" @on-tab-remove="handleClickClose"
> >
<TabPane key="welcome" label="首页" name="/" :closable="false" />
<TabPane key="/home" label="个人中心" name="/home" :closable="false" />
<TabPane <TabPane
v-for="page in opened" v-for="page in opened"
:key="page.fullPath" :key="page.fullPath"
...@@ -17,26 +19,30 @@ ...@@ -17,26 +19,30 @@
:closable="page.meta && page.meta.closable" :closable="page.meta && page.meta.closable"
/> />
</Tabs> </Tabs>
<Dropdown class="i-layout-tabs-close" @on-click="handleClose" placement="bottom-end"> <Dropdown
class="i-layout-tabs-close"
@on-click="handleClose"
placement="bottom-end"
>
<div class="i-layout-tabs-close-main"> <div class="i-layout-tabs-close-main">
<Icon type="ios-arrow-down" /> <Icon type="ios-arrow-down" />
</div> </div>
<DropdownMenu slot="list"> <DropdownMenu slot="list">
<DropdownItem name="left"> <DropdownItem name="left">
<Icon type="md-arrow-back" /> <Icon type="md-arrow-back" />
{{ $t('basicLayout.tabs.left') }} {{ $t("basicLayout.tabs.left") }}
</DropdownItem> </DropdownItem>
<DropdownItem name="right"> <DropdownItem name="right">
<Icon type="md-arrow-forward" /> <Icon type="md-arrow-forward" />
{{ $t('basicLayout.tabs.right') }} {{ $t("basicLayout.tabs.right") }}
</DropdownItem> </DropdownItem>
<DropdownItem name="other"> <DropdownItem name="other">
<Icon type="md-close" /> <Icon type="md-close" />
{{ $t('basicLayout.tabs.other') }} {{ $t("basicLayout.tabs.other") }}
</DropdownItem> </DropdownItem>
<DropdownItem name="all"> <DropdownItem name="all">
<Icon type="md-close-circle" /> <Icon type="md-close-circle" />
{{ $t('basicLayout.tabs.all') }} {{ $t("basicLayout.tabs.all") }}
</DropdownItem> </DropdownItem>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
...@@ -64,7 +70,7 @@ export default { ...@@ -64,7 +70,7 @@ export default {
"headerFix", "headerFix",
"headerStick", "headerStick",
"isMobile", "isMobile",
"menuCollapse" "menuCollapse",
]), ]),
...mapGetters("admin/menu", ["hideSider"]), ...mapGetters("admin/menu", ["hideSider"]),
classes() { classes() {
...@@ -92,13 +98,13 @@ export default { ...@@ -92,13 +98,13 @@ export default {
// } // }
return style; return style;
} },
}, },
data() { data() {
return { return {
// 得到所有侧边菜单,并转为平级,查询图标用 // 得到所有侧边菜单,并转为平级,查询图标用
allSiderMenu: getAllSiderMenu(menuSider), allSiderMenu: getAllSiderMenu(menuSider),
scrollTop: 0 scrollTop: 0,
}; };
}, },
methods: { methods: {
...@@ -107,7 +113,7 @@ export default { ...@@ -107,7 +113,7 @@ export default {
"closeLeft", "closeLeft",
"closeRight", "closeRight",
"closeOther", "closeOther",
"closeAll" "closeAll",
]), ]),
tabLabel(h, page) { tabLabel(h, page) {
const title = h("span", this.tTitle(page.meta.title) || "未命名"); const title = h("span", this.tTitle(page.meta.title) || "未命名");
...@@ -119,27 +125,28 @@ export default { ...@@ -119,27 +125,28 @@ export default {
? page.fullPath.split("?")[0] ? page.fullPath.split("?")[0]
: page.fullPath; : page.fullPath;
const currentMenu = const currentMenu =
this.allSiderMenu.find(menu => menu.path === fullPathWithoutQuery) || this.allSiderMenu.find(
{}; (menu) => menu.path === fullPathWithoutQuery
) || {};
let icon; let icon;
if (currentMenu.icon) { if (currentMenu.icon) {
icon = h("Icon", { icon = h("Icon", {
props: { props: {
type: currentMenu.icon type: currentMenu.icon,
} },
}); });
} else if (currentMenu.custom) { } else if (currentMenu.custom) {
icon = h("Icon", { icon = h("Icon", {
props: { props: {
custom: currentMenu.custom custom: currentMenu.custom,
} },
}); });
} else if (currentMenu.img) { } else if (currentMenu.img) {
icon = h("img", { icon = h("img", {
attrs: { attrs: {
src: currentMenu.img src: currentMenu.img,
} },
}); });
} }
...@@ -152,26 +159,30 @@ export default { ...@@ -152,26 +159,30 @@ export default {
return h( return h(
"div", "div",
{ {
class: "i-layout-tabs-title" class: "i-layout-tabs-title",
}, },
slot slot
); );
}, },
handleClickTab(tabName) { handleClickTab(tabName) {
if (tabName === this.current) { if (tabName === this.current) {
if (this.tabsReload) { if (this.tabsReload) {
this.$emit("on-reload"); this.$emit("on-reload");
} }
} else { } else {
const page = this.opened.find(page => page.fullPath === tabName); const page = this.opened.find((page) => page.fullPath === tabName);
if (page) {
const { name, params, query } = page; const { name, params, query } = page;
this.$router.push({ name, params, query }, () => {});
if (page) this.$router.push({ name, params, query }, () => {}); } else {
this.$router.push(tabName, () => {});
}
} }
}, },
handleClickClose(tagName) { handleClickClose(tagName) {
this.close({ this.close({
tagName tagName,
}); });
}, },
handleScroll() { handleScroll() {
...@@ -182,7 +193,7 @@ export default { ...@@ -182,7 +193,7 @@ export default {
}, },
handleClose(name) { handleClose(name) {
const params = { const params = {
pageSelect: this.current pageSelect: this.current,
}; };
switch (name) { switch (name) {
case "left": case "left":
...@@ -198,7 +209,7 @@ export default { ...@@ -198,7 +209,7 @@ export default {
this.closeAll(); this.closeAll();
break; break;
} }
} },
}, },
mounted() { mounted() {
document.addEventListener("scroll", this.handleScroll, { passive: true }); document.addEventListener("scroll", this.handleScroll, { passive: true });
...@@ -206,6 +217,6 @@ export default { ...@@ -206,6 +217,6 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
document.removeEventListener("scroll", this.handleScroll); document.removeEventListener("scroll", this.handleScroll);
} },
}; };
</script> </script>
<template> <template>
<div style="padding: 0;" class="excute"> <div style="padding: 0" class="excute">
<DataGrid style="margin-top:2px; margin-bottom: -5px;" :columns="columns" ref="grid" :easy="false" :high="false" :set="false" :border="false" :data="data1" :height="gridHeight" :page="false" :size="size"></DataGrid> <DataGrid
style="margin-top: 2px; margin-bottom: -5px"
:columns="columns"
ref="grid"
:easy="false"
:high="false"
:set="false"
:border="false"
:data="data1"
:height="gridHeight"
:page="false"
:size="size"
></DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide width="800"> <Modal v-model="editModal" title="编辑" footer-hide width="800">
<Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" /> <Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
...@@ -15,12 +27,12 @@ export default { ...@@ -15,12 +27,12 @@ export default {
name: "list", name: "list",
components: { components: {
Edit, Edit,
Add Add,
}, },
props: { props: {
rowId: { rowId: {
type: Number type: Number,
} },
}, },
data() { data() {
return { return {
...@@ -28,8 +40,8 @@ export default { ...@@ -28,8 +40,8 @@ export default {
easySearch: { easySearch: {
keys: { keys: {
op: "task_seq", op: "task_seq",
value: null value: null,
} },
}, },
setParsModal: false, setParsModal: false,
editModal: false, editModal: false,
...@@ -38,23 +50,24 @@ export default { ...@@ -38,23 +50,24 @@ export default {
curId: 0, curId: 0,
gridHeight: 150, gridHeight: 150,
size: "small", size: "small",
columns: [{ columns: [
{
title: " ", title: " ",
width: 130 width: 130,
}, },
{ {
key: "task_seq", key: "task_seq",
title: this.l("task_seq"), title: this.l("task_seq"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "op_task_pk", key: "op_task_pk",
title: this.l("op_task_pk"), title: this.l("op_task_pk"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "task_name", key: "task_name",
...@@ -62,28 +75,42 @@ export default { ...@@ -62,28 +75,42 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "taskseq_des", key: "taskseq_des",
title: this.l("task_name"), title: this.l("task_name"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
},
{
key: "routingHeaderCode",
title: this.l("routingHeaderCode"),
align: "left",
easy: true,
high: true,
},
{
key: "routingHeaderName",
title: this.l("routingHeaderName"),
align: "left",
easy: true,
high: true,
}, },
{ {
key: "part_task_pk", key: "part_task_pk",
title: this.l("part_task_pk"), title: this.l("part_task_pk"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "put_into_qty", key: "put_into_qty",
title: this.l("put_into_qty"), title: this.l("put_into_qty"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "plan_start", key: "plan_start",
...@@ -91,7 +118,7 @@ export default { ...@@ -91,7 +118,7 @@ export default {
align: "center", align: "center",
high: true, high: true,
width: 140, width: 140,
hide: true hide: true,
}, },
{ {
key: "plan_finish", key: "plan_finish",
...@@ -99,42 +126,42 @@ export default { ...@@ -99,42 +126,42 @@ export default {
align: "center", align: "center",
high: true, high: true,
width: 140, width: 140,
hide: true hide: true,
}, },
{ {
key: "equip_type", key: "equip_type",
title: this.l("equip_type"), title: this.l("equip_type"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "firsT_EQUIP_CODE", key: "firsT_EQUIP_CODE",
title: this.l("first_equip"), title: this.l("first_equip"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "setup_time", key: "setup_time",
title: this.l("setup_time"), title: this.l("setup_time"),
align: "right", align: "right",
high: true, high: true,
type: "outputTime" type: "outputTime",
}, },
{ {
key: "run_time", key: "run_time",
title: this.l("run_time"), title: this.l("run_time"),
align: "right", align: "right",
high: true, high: true,
type: "outputTime" type: "outputTime",
}, },
{ {
key: "outside_time", key: "outside_time",
title: this.l("outside_time"), title: this.l("outside_time"),
align: "right", align: "right",
high: true, high: true,
type: "outputTime" type: "outputTime",
}, },
{ {
key: "transport_time", key: "transport_time",
...@@ -142,7 +169,7 @@ export default { ...@@ -142,7 +169,7 @@ export default {
align: "right", align: "right",
high: true, high: true,
hide: true, hide: true,
type: "outputTime" type: "outputTime",
}, },
{ {
key: "check_time", key: "check_time",
...@@ -150,13 +177,13 @@ export default { ...@@ -150,13 +177,13 @@ export default {
align: "right", align: "right",
high: true, high: true,
hide: true, hide: true,
type: "outputTime" type: "outputTime",
}, },
{ {
key: "efficiency_value", key: "efficiency_value",
title: this.l("efficiency_value"), title: this.l("efficiency_value"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "machine_rule", key: "machine_rule",
...@@ -164,14 +191,14 @@ export default { ...@@ -164,14 +191,14 @@ export default {
align: "center", align: "center",
easy: true, easy: true,
high: true, high: true,
width: 140 width: 140,
}, },
{ {
key: "singleout", key: "singleout",
title: this.l("singleout"), title: this.l("singleout"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "equip_type", key: "equip_type",
...@@ -179,7 +206,7 @@ export default { ...@@ -179,7 +206,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "first_equip", key: "first_equip",
...@@ -187,48 +214,48 @@ export default { ...@@ -187,48 +214,48 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "cal_id", key: "cal_id",
title: this.l("cal_id"), title: this.l("cal_id"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "plan_method", key: "plan_method",
title: this.l("plan_method"), title: this.l("plan_method"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "over_time", key: "over_time",
title: this.l("over_time"), title: this.l("over_time"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "isdiscrete", key: "isdiscrete",
title: this.l("isdiscrete"), title: this.l("isdiscrete"),
align: "center", align: "center",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "discrete_value", key: "discrete_value",
title: this.l("discrete_value"), title: this.l("discrete_value"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "multi_machine", key: "multi_machine",
title: this.l("multi_machine"), title: this.l("multi_machine"),
align: "center", align: "center",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "notes", key: "notes",
...@@ -236,7 +263,7 @@ export default { ...@@ -236,7 +263,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
...@@ -245,21 +272,21 @@ export default { ...@@ -245,21 +272,21 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "routing_detail_id", key: "routing_detail_id",
title: this.l("routing_detail_id"), title: this.l("routing_detail_id"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "routing_header_id", key: "routing_header_id",
title: this.l("routing_header_id"), title: this.l("routing_header_id"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "comb_param", key: "comb_param",
...@@ -267,14 +294,14 @@ export default { ...@@ -267,14 +294,14 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "rule_qty", key: "rule_qty",
title: this.l("rule_qty"), title: this.l("rule_qty"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
title: "操作", title: "操作",
...@@ -282,19 +309,22 @@ export default { ...@@ -282,19 +309,22 @@ export default {
width: 140, width: 140,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { return h(
class: "action" "div",
}, [ {
class: "action",
},
[
h("op", { h("op", {
attrs: { attrs: {
icon: "md-create", icon: "md-create",
type: "icon", type: "icon",
title: "編輯工序", title: "編輯工序",
oprate: "edit" oprate: "edit",
}, },
on: { on: {
click: () => this.edit(params.row) click: () => this.edit(params.row),
} },
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -302,15 +332,16 @@ export default { ...@@ -302,15 +332,16 @@ export default {
type: "icon", type: "icon",
title: "删除工序", title: "删除工序",
oprate: "delete", oprate: "delete",
msg: "确认要刪除工序吗?" msg: "确认要刪除工序吗?",
}, },
on: { on: {
click: () => this.remove(params.row, params.index) click: () => this.remove(params.row, params.index),
} },
}) }),
]); ]
} );
} },
},
], ],
data1: [], data1: [],
insertTItle: "插单", insertTItle: "插单",
...@@ -320,28 +351,25 @@ export default { ...@@ -320,28 +351,25 @@ export default {
opTaskPk: 0, //工单ID opTaskPk: 0, //工单ID
partTaskPk: 0, //生产计划ID partTaskPk: 0, //生产计划ID
taskSeq: "", //工序编号 taskSeq: "", //工序编号
count: 0 //生产计划数量 count: 0, //生产计划数量
}, },
//设置参数结束 //设置参数结束
rowData: {} //编辑时传入行数据 rowData: {}, //编辑时传入行数据
}; };
}, },
mounted() { mounted() {
this.loadData(this.rowId); this.loadData(this.rowId);
}, },
async fetch({ async fetch({ store, params }) {
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
//根据点击副组件传过来id进行加载数据 //根据点击副组件传过来id进行加载数据
loadData(expendId) { loadData(expendId) {
let params = { let params = {
id: expendId id: expendId,
}; };
Api.getbyorderid(params).then(res => { Api.getbyorderid(params).then((res) => {
if (res.success) { if (res.success) {
this.gridHeight = 50; this.gridHeight = 50;
this.gridHeight = (res.result.length + 1) * 47; this.gridHeight = (res.result.length + 1) * 47;
...@@ -364,9 +392,9 @@ export default { ...@@ -364,9 +392,9 @@ export default {
this.selectRoutingDetail = row; this.selectRoutingDetail = row;
let params = { let params = {
partPk: this.selectRoutingDetail.part_task_pk, partPk: this.selectRoutingDetail.part_task_pk,
detailIdstr: this.selectRoutingDetail.routing_detail_id detailIdstr: this.selectRoutingDetail.routing_detail_id,
}; };
Api.removeoptasksimluate(params).then(r => { Api.removeoptasksimluate(params).then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("删除成功"); this.$Message.success("删除成功");
this.data1.splice(this.rowIndex, 1); this.data1.splice(this.rowIndex, 1);
...@@ -390,8 +418,8 @@ export default { ...@@ -390,8 +418,8 @@ export default {
l(key) { l(key) {
let vkey = "mes_op_task_plan_simulate" + "." + key; let vkey = "mes_op_task_plan_simulate" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
} },
} },
}; };
</script> </script>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</template> </template>
<script> <script>
import iview from "./home/index.vue"; import iview from "./welcome/index.vue";
export default { export default {
components: { components: {
iview iview
......
...@@ -28,183 +28,10 @@ ...@@ -28,183 +28,10 @@
<script> <script>
import { isInteger } from "lodash"; import { isInteger } from "lodash";
export default { export default {
layout: "empty",
data() { data() {
return { return {
list: [], list: [],
arrList: [], arrList: [],
// arrList: [
// {
// name: "设计区",
// style: {
// top: "247px",
// left: "280px",
// height: "40px",
// width: "80px",
// // border: " 1px solid red",
// transform: " rotate(-13deg) skew(-74deg, 42deg)",
// },
// list: [
// { name: "物料编码" },
// { name: "物料分类" },
// { name: "物料管理" },
// ],
// },
// {
// name: "工艺区",
// style: {
// top: "319px",
// left: "405px",
// height: "40px",
// width: "80px",
// // border: " 1px solid red",
// transform: " rotate(-13deg) skew(-74deg, 42deg)",
// },
// list: [
// { name: "产品管理" },
// { name: "工艺规程" },
// { name: "工艺设置" },
// ],
// },
// {
// name: "市场处",
// style: {
// top: "570px",
// left: "293px",
// height: "40px",
// width: "80px",
// // border: " 1px solid red",
// transform: " rotate(-13deg) skew(-74deg, 42deg)",
// },
// list: [
// { name: "客户管理" },
// { name: "项目管理" },
// { name: "销售管理" },
// { name: "合同管理" },
// ],
// },
// // {
// // name: "管理区",
// // style: {
// // top: "677px",
// // left: "102px",
// // height: "40px",
// // width: "80px",
// // // border: " 1px solid red",
// // transform: " rotate(-13deg) skew(-74deg, 42deg)",
// // },
// // list: [
// // { name: "设备类型" },
// // { name: "设备管理" },
// // { name: "排产资源" },
// // ],
// // },
// {
// name: "综合生产处",
// style: {
// top: "467px",
// left: "440px",
// height: "33px",
// width: "75px",
// // border: " 1px solid red",
// transform: " rotate(197deg) skew(77deg,134deg)",
// },
// list: [
// { name: "订单管理" },
// { name: "订单监控" },
// { name: "订单报价" },
// ],
// },
// {
// name: "生产班组派工",
// style: {
// top: "513px",
// left: "757px",
// height: "33px",
// width: "75px",
// // border: " 1px solid red",
// transform: " rotate(197deg) skew(77deg,134deg)",
// },
// list: [{ name: "班组派工" }],
// },
// {
// name: "设备管理",
// style: {
// top: "638px",
// left: "947px",
// height: "33px",
// width: "75px",
// // border: " 1px solid red",
// transform: " rotate(197deg) skew(77deg,134deg)",
// },
// list: [
// { name: "设备类型" },
// { name: "设备管理" },
// { name: "排产资源" },
// ],
// },
// {
// name: "质检",
// style: {
// top: "186px",
// left: "1304px",
// height: "33px",
// width: "75px",
// // border: " 1px solid red",
// transform: " rotate(197deg) skew(77deg,134deg)",
// },
// list: [
// { name: "原材料复检" },
// { name: "质量检验" },
// { name: "数据包追溯" },
// { name: "产品合格证" },
// ],
// },
// {
// name: "原料仓库",
// style: {
// top: "216px",
// left: "646px",
// height: "79px",
// width: "175px",
// // border: " 1px solid red",
// transform: " rotate(-11deg) skew(-72deg, 41deg)",
// },
// list: [
// { name: "库房位置" },
// { name: "物料管理" },
// { name: "料单配套" },
// { name: "制造资源" },
// ],
// },
// {
// name: "车间计调",
// style: {
// top: "380px",
// left: "553px",
// height: "33px",
// width: "81px",
// // border: " 1px solid red",
// transform: " rotate(-12deg) skew(-72deg, 41deg)",
// },
// list: [
// { name: "计划管理" },
// { name: "排产结果" },
// ],
// },
// {
// name: "组件区",
// style: {
// top: "293px",
// left: "949px",
// height: "144px",
// width: "232px",
// // border: " 1px solid red",
// transform: " rotate(-11deg) skew(-71deg, 40deg)",
// },
// list: [{ name: "工单执行" }, { name: "转序交接" }],
// },
// ],
isIndex: -1, isIndex: -1,
oneShow: false, oneShow: false,
menu: false, menu: false,
......
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