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

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

parents 440e1f1f 1b066382
...@@ -85,9 +85,7 @@ export default { ...@@ -85,9 +85,7 @@ export default {
// const openNames = getSiderSubmenu(path, menuSider); // const openNames = getSiderSubmenu(path, menuSider);
// this.$store.commit("admin/menu/setOpenNames", openNames); // this.$store.commit("admin/menu/setOpenNames", openNames);
} else { }
this.$Message.error("加载产品树失败!");
}
}); });
}, },
toMenu(list) { toMenu(list) {
......
This diff is collapsed.
This diff is collapsed.
...@@ -297,11 +297,11 @@ export default { ...@@ -297,11 +297,11 @@ export default {
type: "date" type: "date"
}, },
{ {
key: "creatorUserId", key: "creator",
title: this.$t("creatorUserId"), title: this.$t("creatorUserId"),
align: "left", align: "left",
high: true, high: true,
type: "user" // type: "user"
}, },
{ {
key: "creationTime", key: "creationTime",
...@@ -310,22 +310,22 @@ export default { ...@@ -310,22 +310,22 @@ export default {
high: true, high: true,
width: 180 width: 180
}, },
{ // {
key: "lastModifierUserId", // key: "lastModifierUserId",
title: this.$t("lastModifierUserId"), // title: this.$t("lastModifierUserId"),
hide: true, // hide: true,
align: "left", // align: "left",
high: true, // high: true,
type: "user" // type: "user"
}, // },
{ // {
key: "lastModificationTime", // key: "lastModificationTime",
title: this.$t("lastModificationTime"), // title: this.$t("lastModificationTime"),
hide: true, // hide: true,
align: "center", // align: "center",
high: true, // high: true,
width: 180 // width: 180
}, // },
{ {
title: "操作", title: "操作",
key: "action", key: "action",
......
...@@ -366,10 +366,10 @@ export default { ...@@ -366,10 +366,10 @@ export default {
overflow: hidden; overflow: hidden;
border: #cacbd0 dashed 1px; border: #cacbd0 dashed 1px;
img { //img {
// width: 90px; // width: 90px;
// height: 90px; // height: 90px;
} //}
} }
.row { .row {
......
This diff is collapsed.
<template> <template>
<div class="Design"> <div class="Design">
<Timeline> <Timeline>
<TimelineItem v-for="(node,i) in nodes" :key="node.id"> <TimelineItem v-for="(node,i) in nodes" :key="node.id">
<Badge :count="i+1" type="primary" slot="dot"></Badge> <Badge :count="i+1" type="primary" slot="dot"></Badge>
<div class="node" @click="edit(node.id,i)"> <div class="node" @click="edit(node.id,i)">
<div class="title"> <div class="title">
<a> <a>
{{node.name}} {{node.name}}
&nbsp;( &nbsp;(
<state code="workflow.form.audit.type" :value="node.operation" />) <state code="workflow.form.audit.type" :value="node.operation" />)
<Icon type="md-build" /> <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> </a>
</div> </div>
<div v-if="node.userIds&&node.userIds.length>0"> <div v-if="node.userIds&&node.userIds.length>0">
审批人: 审批人:
<User v-for="(item,j) in node.userIds" :value="item" class="ml10" :key="j" /> <User v-for="(item,j) in node.userIds" :value="item" class="ml10" :key="j" />
</div> </div>
<div v-if="node.roleList&&node.roleList.length>0"> <div v-if="node.roleList&&node.roleList.length>0">
审批角色: 审批角色:
<span <span v-for="(role,k) in node.roleList" class="mr10">{{role.name}}({{role.userIdList.length}})</span>
v-for="(role,k) in node.roleList" </div>
class="mr10" </div>
>{{role.name}}({{role.userIdList.length}})</span> </TimelineItem>
</div>
</div>
</TimelineItem>
</Timeline> </Timeline>
<Modal v-model="editModal" title="编辑" footer-hide width="800"> <Modal v-model="editModal" title="编辑" footer-hide width="800">
<Edit :eid="curId" @on-close="cancel" @on-ok="addOk" /> <Edit :eid="curId" @on-close="cancel" @on-ok="addOk" />
</Modal> </Modal>
<Modal v-model="startModal" title="开始节点编辑" footer-hide width="800"> <Modal v-model="startModal" title="开始节点编辑" footer-hide width="800">
<StartEdit :eid="startId" @on-close="cancel" @on-ok="addOk" /> <StartEdit :eid="startId" @on-close="cancel" @on-ok="addOk" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from './api'
import Edit from './node' import Edit from './node'
import StartEdit from './node/start' import StartEdit from './node/start'
export default { export default {
name: 'Design', name: 'Design',
data() { data() {
return { return {
editModal: false, editModal: false,
entity: {}, entity: {},
nodes: [], nodes: [],
curId: 0, curId: 0,
startId: 0, startId: 0,
startModal: false startModal: false
} }
},
components: {
Edit,
StartEdit
},
props: {
eid: String
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
mounted(){
this.load(this.eid)
},
methods: {
load(v) {
alert(v)
Api.detail({ id: v }).then((r) => {
this.nodes = r.result.nodes
// this.$emit('on-load')
})
}, },
edit(id, i) { components: {
if (i== 0) { Edit,
this.startModal=true StartEdit
this.startId=id;
} else {
this.editModal = true
this.curId = id
}
}, },
handleClose() { props: {
this.$emit('on-close') eid: String
}, },
cancel() { async fetch({
this.editModal = false store,
this.startModal = false params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
}, },
addOk() { mounted() {
this.curId = 0 this.load(this.eid)
this.editModal = false
this.startId = 0
this.startModal = false
this.load(this.eid)
}, },
l(key) { methods: {
key = 'instance' + '.' + key load(v) {
return this.$t(key) //alert(v)
} Api.detail({
}, id: v
watch: { }).then((r) => {
eid(v) { this.nodes = r.result.nodes
if (v != 0) { // this.$emit('on-load')
this.load(v) })
} },
edit(id, i) {
if (i == 0) {
this.startModal = true
this.startId = id;
} else {
this.editModal = true
this.curId = id
}
},
handleClose() {
this.$emit('on-close')
},
cancel() {
this.editModal = false
this.startModal = false
},
addOk() {
this.curId = 0
this.editModal = false
this.startId = 0
this.startModal = false
this.load(this.eid)
},
l(key) {
key = 'instance' + '.' + key
return this.$t(key)
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v)
}
}
} }
}
} }
</script> </script>
<style lang="less"> <style lang="less">
.Design { .Design {
background: white; background: white;
padding: 20px 50px; padding: 20px 50px;
.node {
.title { .node {
font-size: 14px; .title {
font-weight: bold; font-size: 14px;
.auditedTime { font-weight: bold;
font-size: 12px;
color: #ddd; .auditedTime {
} font-size: 12px;
color: #ddd;
}
}
} }
}
} }
</style> </style>
\ No newline at end of file
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