Commit 77b1cf7c authored by 仇晓婷's avatar 仇晓婷

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

parents 440e1f1f 1b066382
......@@ -85,8 +85,6 @@ export default {
// const openNames = getSiderSubmenu(path, menuSider);
// this.$store.commit("admin/menu/setOpenNames", openNames);
} else {
this.$Message.error("加载产品树失败!");
}
});
},
......
<template>
<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>
<Modal v-model="editModal" title="编辑" footer-hide width="800">
<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>
<Modal v-model="editModal" title="编辑" footer-hide width="1000">
<Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" />
</Modal>
<Modal v-model="insertlModal" :title="insertTItle" @on-ok="insertOk" @on-cancel="cancel">
<p>确定进行 {{ insertTItle }} 操作?</p>
</Modal>
<Modal v-model="setParsModal" title="工序参数设置" footer-hide width="1000">
<Add
@on-parameter-ok="addOk"
@on-close="cancel"
:opTaskPk="setParams.opTaskPk"
:partTaskPk="setParams.partTaskPk"
:taskSeq="setParams.taskSeq"
:count="setParams.count"
:row="rowData"
/>
<Add @on-parameter-ok="addOk" @on-close="cancel" :opTaskPk="setParams.opTaskPk" :partTaskPk="setParams.partTaskPk" :taskSeq="setParams.taskSeq" :count="setParams.count" :row="rowData" />
</Modal>
</div>
</div>
</template>
<script>
import Api from "../api";
import Edit from "./edit";
......@@ -43,7 +24,9 @@ export default {
Add
},
props: {
rowId: { type: Number }
rowId: {
type: Number
}
},
data() {
return {
......@@ -62,8 +45,10 @@ export default {
curId: 0,
gridHeight: 150,
size: "small",
columns: [
{ title: " ", width: 130 },
columns: [{
title: " ",
width: 130
},
{
key: "insert_flag",
title: this.l("insert_flag"),
......@@ -72,11 +57,9 @@ export default {
width: 60,
render: (h, params) => {
return h(
"Tooltip",
{
"Tooltip", {
props: {
content:
params.row.insert_flag == 1 ? "取消插单" : "进行插单",
content: params.row.insert_flag == 1 ? "取消插单" : "进行插单",
placement: "top"
},
class: "ico"
......@@ -84,10 +67,8 @@ export default {
[
h("Icon", {
attrs: {
type:
params.row.insert_flag == 1
? "ios-flag"
: "ios-flag-outline",
type: params.row.insert_flag == 1 ?
"ios-flag" : "ios-flag-outline",
size: 20,
color: params.row.insert_flag == 1 ? "#2680EB" : "#aaa"
},
......@@ -333,7 +314,9 @@ export default {
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h("op", {
attrs: {
icon: "md-options",
......@@ -341,7 +324,9 @@ export default {
oprate: "detail",
title: "工序参数设置"
},
on: { click: () => this.openParms(params.row) }
on: {
click: () => this.openParms(params.row)
}
}),
h("op", {
attrs: {
......@@ -350,7 +335,9 @@ export default {
title: "編輯工序",
oprate: "edit"
},
on: { click: () => this.edit(params.row) }
on: {
click: () => this.edit(params.row)
}
}),
h("op", {
attrs: {
......@@ -360,7 +347,9 @@ export default {
oprate: "delete",
msg: "确认要刪除工序吗?"
},
on: { click: () => this.remove(params.row, params.index) }
on: {
click: () => this.remove(params.row, params.index)
}
})
]);
}
......@@ -383,7 +372,10 @@ export default {
mounted() {
this.loadData(this.rowId);
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -514,6 +506,7 @@ export default {
}
};
</script>
<style lang="less">
.excute table tr th span,
.excute table tr td {
......
<template>
<div class="h100">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
@on-selection-change="selectInfo"
:batch="false"
>
<div class="h100">
<DataGrid :columns="columns" ref="grid" :action="action" @on-selection-change="selectInfo" :batch="false">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
search
enter-button
placeholder="请输入关键字订单编号/项目名称"
v-model="easySearch.keys.value"
v-width="300"
@on-search="search"
/>
<Input search enter-button placeholder="请输入关键字订单编号/项目名称" v-model="easySearch.keys.value" v-width="300" @on-search="search" />
</FormItem>
</Form>
</template>
<template slot="searchBack">
<Badge
:count="this.$store.state.countAps"
overflow-count="99"
style="margin-right:15px;"
type="info"
v-if="showAps"
>
<Badge :count="this.$store.state.countAps" overflow-count="99" style="margin-right:15px;" type="info" v-if="showAps">
<a href="javascript:;" @click="goAps">APS排产&nbsp;&nbsp;&nbsp;</a>
</Badge>
<Badge
:count="this.$store.state.countAi"
overflow-count="99"
style="margin-right:15px;"
type="info"
v-if="showAi"
>
<Badge :count="this.$store.state.countAi" overflow-count="99" style="margin-right:15px;" type="info" v-if="showAi">
<a href="javascript:;" @click="goAi">智能排产&nbsp;&nbsp;&nbsp;</a>
</Badge>
<Badge
:count="this.$store.state.countAll"
overflow-count="99"
style="margin-right:15px;"
type="info"
v-if="showAll"
>
<Badge :count="this.$store.state.countAll" overflow-count="99" style="margin-right:15px;" type="info" v-if="showAll">
<a @click="goCemplate">整机排产&nbsp;&nbsp;&nbsp;</a>
</Badge>
<Badge :count="this.$store.state.countRun" overflow-count="99" type="info" v-if="showRun">
......@@ -126,19 +95,11 @@
<orderSupport ref="orderSupport"></orderSupport>
</Modal>
<Modal v-model="modalAccessory" :title="title" fullscreen footer-hide>
<component
:is="details"
:eid="orderId"
:mesCode="mesCode"
:productName="productName"
:drawnNumber="drawnNumber"
:count="count"
@on-close="cancel"
@on-ok="addOk"
/>
<component :is="details" :eid="orderId" :mesCode="mesCode" :productName="productName" :drawnNumber="drawnNumber" :count="count" @on-close="cancel" @on-ok="addOk" />
</Modal>
</div>
</div>
</template>
<script>
import Api from "./api";
import Add from "./add";
......@@ -174,8 +135,7 @@ export default {
scheduleModal: false,
orderSupportModal: false,
curId: 0,
statuList:
this.$store.getters.dictionaryByKey("aps.plan.supportingStatus") || [],
statuList: this.$store.getters.dictionaryByKey("aps.plan.supportingStatus") || [],
name: "",
items: null,
title: "",
......@@ -188,8 +148,7 @@ export default {
drawnNumber: "",
count: 0,
modalAccessory: false,
columns: [
{
columns: [{
key: "selection",
title: "#",
type: "selection",
......@@ -231,8 +190,7 @@ export default {
align: "center",
render: (h, params) => {
return h(
"op",
{
"op", {
attrs: {
oprate: "detail",
},
......@@ -376,16 +334,15 @@ export default {
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h(
"op",
{
"op", {
attrs: {
oprate: "detail",
title:
params.row.mainRoutingSetStatus == 0
? "工艺派发"
: "移入排产",
title: params.row.mainRoutingSetStatus == 0 ?
"工艺派发" : "移入排产",
},
style: {
color: params.row.mainRoutingSetStatus == 0 ? "red" : "",
......@@ -393,27 +350,23 @@ export default {
on: {
click: () =>
params.row.mainRoutingSetStatus == 0 ||
params.row.mainRoutingSetStatus == 1
? this.goMethod(params.row)
: null,
params.row.mainRoutingSetStatus == 1 ?
this.goMethod(params.row) : null,
},
},
params.row.mainRoutingSetStatus == 0
? "工艺派发"
: params.row.mainRoutingSetStatus == 1
? "移入排产"
: ""
params.row.mainRoutingSetStatus == 0 ?
"工艺派发" :
params.row.mainRoutingSetStatus == 1 ?
"移入排产" :
""
),
h(
"op",
{
"op", {
attrs: {
oprate: "detail",
title:
params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3
? "配套派发"
: "",
title: params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3 ?
"配套派发" : "",
},
style: {
color: params.row.mainRoutingSetStatus == 0 ? "red" : "",
......@@ -421,15 +374,14 @@ export default {
on: {
click: () =>
params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3
? this.supportDis(params.row)
: null,
params.row.isSupportingFinish == 3 ?
this.supportDis(params.row) : null,
},
},
params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3
? "配套派发"
: ""
params.row.isSupportingFinish == 3 ?
"配套派发" :
""
),
]);
},
......@@ -458,7 +410,10 @@ export default {
mounted() {
this.loadInitCount();
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -670,7 +625,9 @@ export default {
this.curId = id;
},
removeOk() {
Api.delete({ id: this.curId }).then((r) => {
Api.delete({
id: this.curId
}).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.deletelModal = false;
......@@ -747,7 +704,9 @@ export default {
//进入页面加载排产count-----
loadInitCount() {
let currentUserId = this.$store.state.userInfo.userId;
let para = { id: currentUserId };
let para = {
id: currentUserId
};
Api.listbyuser(para).then((datas) => {
if (datas.success && datas.result && datas.result.length > 0) {
datas.result.forEach((dateScheduleId) => {
......@@ -774,14 +733,14 @@ export default {
this.$store.commit("setCountRun", 0);
Api.getpoolordercount()
.then((res) => {
if (res.success && res.result.length > 1) {
if (res.success && res.result && res.result.length > 0) {
res.result.forEach((data) => {
this.changeCountOut(data.poolType, data.count);
});
}
})
.catch((err) => {
this.$Message.error("获取排产模型数量失败");
this.$Message.error("获取排产池排产数量失败");
});
},
//配套申请
......@@ -835,16 +794,20 @@ export default {
},
};
</script>
<style lang="less">
.footerSpan {
width: 120px;
}
.demo-badge-alone {
background: #5cb85c !important;
}
.radioList {
margin: 10px 30px;
}
.radioList label {
margin-top: 5px;
}
......
......@@ -297,11 +297,11 @@ export default {
type: "date"
},
{
key: "creatorUserId",
key: "creator",
title: this.$t("creatorUserId"),
align: "left",
high: true,
type: "user"
// type: "user"
},
{
key: "creationTime",
......@@ -310,22 +310,22 @@ export default {
high: true,
width: 180
},
{
key: "lastModifierUserId",
title: this.$t("lastModifierUserId"),
hide: true,
align: "left",
high: true,
type: "user"
},
{
key: "lastModificationTime",
title: this.$t("lastModificationTime"),
hide: true,
align: "center",
high: true,
width: 180
},
// {
// key: "lastModifierUserId",
// title: this.$t("lastModifierUserId"),
// hide: true,
// align: "left",
// high: true,
// type: "user"
// },
// {
// key: "lastModificationTime",
// title: this.$t("lastModificationTime"),
// hide: true,
// align: "center",
// high: true,
// width: 180
// },
{
title: "操作",
key: "action",
......
......@@ -366,10 +366,10 @@ export default {
overflow: hidden;
border: #cacbd0 dashed 1px;
img {
//img {
// width: 90px;
// height: 90px;
}
//}
}
.row {
......
<template>
<div id="flow">
<div id="flow">
<div id="myDiagramDiv" class="flex fd">
<div v-height="100" class="flex">
<div id="palette" class="fg"></div>
......@@ -10,9 +10,9 @@
<div id="draw" class="fg"></div>
</div>
<Modal v-model="detailModal" title="节点属性设置" :width="800" footer-hide>
<component :is="detail" :eid="curId" :data="node" @on-ok="ok" />
<component :is="detail" :eid="curId" :data="node" @on-ok="ok" @on-close="close" />
</Modal>
</div>
</div>
</template>
<script>
......@@ -107,20 +107,19 @@ export default {
width: horizontal ? NaN : 8, // if not stretching horizontally, just 8 wide
height: !horizontal ? NaN : 8, // if not stretching vertically, just 8 tall
alignment: align, // align the port on the main Shape
stretch: horizontal
? go.GraphObject.Horizontal
: go.GraphObject.Vertical,
stretch: horizontal ?
go.GraphObject.Horizontal : go.GraphObject.Vertical,
portId: name, // declare this object to be a "port"
fromSpot: spot, // declare where links may connect at this port
fromLinkable: output, // declare whether the user may draw links from here
toSpot: spot, // declare where links may connect at this port
toLinkable: input, // declare whether the user may draw links to here
cursor: "pointer", // show a different cursor to indicate potential link point
mouseEnter: function(e, port) {
mouseEnter: function (e, port) {
// the PORT argument will be this Shape
if (!e.diagram.isReadOnly) port.fill = "rgba(15,0,25,0.5)";
},
mouseLeave: function(e, port) {
mouseLeave: function (e, port) {
port.fill = "transparent";
// port.fill = "white";
}
......@@ -145,8 +144,7 @@ export default {
// the main object is a Panel that surrounds a TextBlock with a rectangular Shape
$(
go.Panel,
"Auto",
{
"Auto", {
// resizable: true,
doubleClick: (e, obj) => {
this.show(obj.part.data);
......@@ -154,8 +152,7 @@ export default {
},
$(
go.Shape,
"Rectangle",
{
"Rectangle", {
fill: "white",
stroke: theme,
strokeWidth: 2,
......@@ -166,8 +163,7 @@ export default {
),
$(
go.TextBlock,
textStyle(theme),
{
textStyle(theme), {
margin: 8,
maxSize: new go.Size(300, NaN),
wrap: go.TextBlock.WrapFit,
......@@ -196,14 +192,16 @@ export default {
"Auto",
$(
go.Shape,
"Diamond",
{ fill: "#fff", stroke: theme, strokeWidth: 2 },
"Diamond", {
fill: "#fff",
stroke: theme,
strokeWidth: 2
},
new go.Binding("figure", "figure")
),
$(
go.TextBlock,
textStyle(theme),
{
textStyle(theme), {
margin: 8,
maxSize: new go.Size(60, NaN),
wrap: go.TextBlock.WrapFit,
......@@ -267,7 +265,7 @@ export default {
makePort("R", go.Spot.Right, go.Spot.Right, false, true)
)
);
go.Shape.defineFigureGenerator("File", function(shape, w, h) {
go.Shape.defineFigureGenerator("File", function (shape, w, h) {
var geo = new go.Geometry();
var fig = new go.PathFigure(0, 0, true); // starting point
geo.add(fig);
......@@ -297,8 +295,7 @@ export default {
}),
$(
go.TextBlock,
textStyle(theme),
{
textStyle(theme), {
margin: 8,
maxSize: new go.Size(200, NaN),
wrap: go.TextBlock.WrapFit,
......@@ -325,10 +322,10 @@ export default {
resegmentable: true,
// mouse-overs subtly highlight links:
mouseEnter: function(e, link) {
mouseEnter: function (e, link) {
link.findObject("HIGHLIGHT").stroke = "rgba(30,144,255,0.2)";
},
mouseLeave: function(e, link) {
mouseLeave: function (e, link) {
link.findObject("HIGHLIGHT").stroke = "transparent";
},
selectionAdorned: false
......@@ -346,18 +343,32 @@ export default {
),
$(
go.Shape, // the link path shape
{ isPanelMain: true, stroke: theme, strokeWidth: 2 },
new go.Binding("stroke", "isSelected", function(sel) {
{
isPanelMain: true,
stroke: theme,
strokeWidth: 2
},
new go.Binding("stroke", "isSelected", function (sel) {
return sel ? "dodgerblue" : theme;
}).ofObject()
),
$(
go.Shape, // the "from" end arrowhead
{ fromArrow: "Circle", fill: "#fff", strokeWidth: 2, stroke: theme }
{
fromArrow: "Circle",
fill: "#fff",
strokeWidth: 2,
stroke: theme
}
),
$(
go.Shape, // the arrowhead
{ toArrow: "standard", strokeWidth: 2, fill: theme, stroke: theme }
{
toArrow: "standard",
strokeWidth: 2,
fill: theme,
stroke: theme
}
),
$(
go.Panel,
......@@ -372,7 +383,10 @@ export default {
$(
go.Shape,
"RoundedRectangle", // the label shape
{ fill: "#F8F8F8", strokeWidth: 0 }
{
fill: "#F8F8F8",
strokeWidth: 0
}
),
$(
go.TextBlock,
......@@ -387,6 +401,7 @@ export default {
)
)
);
function showLinkLabel(e) {
var label = e.subject.findObject("LABEL");
if (label !== null)
......@@ -408,11 +423,25 @@ export default {
nodeSelectionAdornmentTemplate: select,
model: new go.GraphLinksModel([
// specify the contents of the Palette
{ category: "Start", text: "开始" },
{ text: "节点" },
{ category: "Conditional", text: "条件" },
{ category: "End", text: "结束" },
{ category: "Comment", text: "备注" }
{
category: "Start",
text: "开始"
},
{
text: "节点"
},
{
category: "Conditional",
text: "条件"
},
{
category: "End",
text: "结束"
},
{
category: "Comment",
text: "备注"
}
])
}
);
......@@ -422,7 +451,7 @@ export default {
var txn = evt.object; // a Transaction
if (txn === null) return;
// iterate over all of the actual ChangedEvents of the Transaction
txn.changes.each(function(e) {
txn.changes.each(function (e) {
// ignore any kind of change other than adding/removing a node
if (e.modelChange !== "nodeDataArray") return;
// record node insertions and removals
......@@ -437,6 +466,7 @@ export default {
}
});
});
function animateFadeDown(e) {
var diagram = e.diagram;
var animation = new go.Animation();
......@@ -456,7 +486,9 @@ export default {
// this.load();
},
load() {
Api.get(`${workflowUrl}/schema/get`, { id: this.eid }).then(r => {
Api.get(`${workflowUrl}/schema/get`, {
id: this.eid
}).then(r => {
console.warn(r);
// this.myDiagram.model=go.Model.fromJson(r.content);
var data = r.result.content || `{}`;
......@@ -498,6 +530,11 @@ export default {
this.detailModal = false;
this.detail = null;
this.curId = -1;
},
close() {
this.detailModal = false;
this.detail = null;
this.curId = -1;
}
}
};
......@@ -508,9 +545,11 @@ export default {
// background:#a7a7a7;
margin: -16px;
padding: 0 10px;
canvas:focus {
outline: 0;
}
#myDiagramDiv {
height: calc(100vh - 51px);
display: flex;
......
<template>
<div class="Design">
<div class="Design">
<Timeline>
<TimelineItem v-for="(node,i) in nodes" :key="node.id">
<Badge :count="i+1" type="primary" slot="dot"></Badge>
......@@ -10,7 +10,7 @@
&nbsp;(
<state code="workflow.form.audit.type" :value="node.operation" />)
<Icon type="md-build" />
<Icon v-if="node.isFixed" type="ios-lock" color="orange" title="人员固定"/>
<Icon v-if="node.isFixed" type="ios-lock" color="orange" title="人员固定" />
</a>
</div>
<div v-if="node.userIds&&node.userIds.length>0">
......@@ -19,10 +19,7 @@
</div>
<div v-if="node.roleList&&node.roleList.length>0">
审批角色:
<span
v-for="(role,k) in node.roleList"
class="mr10"
>{{role.name}}({{role.userIdList.length}})</span>
<span v-for="(role,k) in node.roleList" class="mr10">{{role.name}}({{role.userIdList.length}})</span>
</div>
</div>
</TimelineItem>
......@@ -33,8 +30,9 @@
<Modal v-model="startModal" title="开始节点编辑" footer-hide width="800">
<StartEdit :eid="startId" @on-close="cancel" @on-ok="addOk" />
</Modal>
</div>
</div>
</template>
<script>
import Api from './api'
import Edit from './node'
......@@ -58,24 +56,29 @@ export default {
props: {
eid: String
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
mounted(){
mounted() {
this.load(this.eid)
},
methods: {
load(v) {
alert(v)
Api.detail({ id: v }).then((r) => {
//alert(v)
Api.detail({
id: v
}).then((r) => {
this.nodes = r.result.nodes
// this.$emit('on-load')
})
},
edit(id, i) {
if (i== 0) {
this.startModal=true
this.startId=id;
if (i == 0) {
this.startModal = true
this.startId = id;
} else {
this.editModal = true
this.curId = id
......@@ -109,14 +112,17 @@ export default {
}
}
</script>
<style lang="less">
.Design {
background: white;
padding: 20px 50px;
.node {
.title {
font-size: 14px;
font-weight: bold;
.auditedTime {
font-size: 12px;
color: #ddd;
......
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