Commit 07734a85 authored by kangzhenfei's avatar kangzhenfei

Merge branch 'product-kk' into product

parents 35b94b6f f4784133
...@@ -1237,12 +1237,12 @@ html [type=button] { ...@@ -1237,12 +1237,12 @@ html [type=button] {
left: 0; left: 0;
text-align: center; text-align: center;
padding: 20px 0; padding: 20px 0;
background: #d0d2d9; background: #08080894;
div { div {
height: 25px; height: 25px;
font-size: 14px; font-size: 14px;
color: #333; color: #ffffff;
line-height: 28px; line-height: 28px;
} }
......
...@@ -165,6 +165,11 @@ ...@@ -165,6 +165,11 @@
padding: 10px 12px 10px 0; padding: 10px 12px 10px 0;
box-sizing: border-box; box-sizing: border-box;
} }
.footers{
.ivu-form .ivu-form-item-label{
color: white;
}
}
.ivu-input { .ivu-input {
font-size: 14px; font-size: 14px;
......
...@@ -603,9 +603,9 @@ export default { ...@@ -603,9 +603,9 @@ export default {
currentNodeName: '当前环节', currentNodeName: '当前环节',
nextNodeId: '下一环节Id', nextNodeId: '下一环节Id',
nextNodeName: '下一环节', nextNodeName: '下一环节',
creatorUserId: '创建用户Id', creatorUserId: '发起用户Id',
creator: '创建人', creator: '发起人',
creationTime: '创建时间', creationTime: '发起时间',
}, },
processList: { //工艺规程列表 processList: { //工艺规程列表
id: 'id', id: 'id',
......
<style lang="less" scope>
@import "../shen.less";
</style>
<template> <template>
<div class="new-detail" style="width:90%;margin:0 auto"> <div class="new-detail">
<Row> <Row>
<Filed :span="8" name="编码:">{{!entity.code?'未分配':entity.code}}</Filed> <Filed :span="8" name="编码:">{{!entity.code?'未分配':entity.code}}</Filed>
<Filed :span="8" name="名称:">{{entity.name}}</Filed> <Filed :span="8" name="名称:">{{entity.name}}</Filed>
...@@ -11,7 +14,7 @@ ...@@ -11,7 +14,7 @@
</Filed> </Filed>
<Filed :span="8" name="描述:">{{entity.description}}</Filed> <Filed :span="8" name="描述:">{{entity.description}}</Filed>
</Row> </Row>
<Divider orientation="left">扩展属性</Divider> <Divider orientation="center"><h3>扩展属性</h3></Divider>
<Row> <Row>
<Filed v-for="li in fileds" :key="li.field" :span="li.span" :name="li.title+':'"> <Filed v-for="li in fileds" :key="li.field" :span="li.span" :name="li.title+':'">
<State v-if="li.dataType==3" :code="li.note" :value="entity[li.field]" /> <State v-if="li.dataType==3" :code="li.note" :value="entity[li.field]" />
......
...@@ -288,3 +288,11 @@ export default { ...@@ -288,3 +288,11 @@ export default {
watch: {} watch: {}
} }
</script> </script>
<style lang="less">
// .footers{
// .ivu-form .ivu-form-item-label{
// color: white!important;
// }
// }
</style>
\ No newline at end of file
<template> <template>
<div class="myBug"> <div class="myBug">
<Tabs :animated="false" @on-click="tab" value="3"> <Tabs :animated="false" @on-click="tab" value="3">
...@@ -103,6 +104,29 @@ export default { ...@@ -103,6 +104,29 @@ export default {
key: "schemaId", key: "schemaId",
hide: true hide: true
}, },
{
title: this.l("status"),
key: "status",
align: "center",
width: 120,
high: true,
code: "Handle.todoList.status"
},
{
title: this.l("creatorUserId"),
key: "creatorUserId",
hide: true
},
{
title: this.l("creator"),
key: "creator",
align: "center"
},
{
title: this.l("creationTime"),
key: "creationTime",
align: "center"
},
{ {
title: this.l("schemaName"), title: this.l("schemaName"),
key: "schemaName" key: "schemaName"
...@@ -135,27 +159,6 @@ export default { ...@@ -135,27 +159,6 @@ export default {
title: this.l("nextNodeName"), title: this.l("nextNodeName"),
key: "nextNodeName" key: "nextNodeName"
}, },
{
title: this.l("status"),
key: "status",
high: true,
code: "Handle.todoList.status"
},
{
title: this.l("creatorUserId"),
key: "creatorUserId",
hide: true
},
{
title: this.l("creator"),
key: "creator",
align: "center"
},
{
title: this.l("creationTime"),
key: "creationTime",
align: "center"
},
{ {
title: "操作", title: "操作",
......
<style lang="less" scope>
@import "./shen.less";
</style>
<template> <template>
<div class="Design"> <div class="Design">
<h3>{{ processTitle }}</h3> <h3>{{ processTitle }}</h3>
...@@ -10,7 +13,6 @@ ...@@ -10,7 +13,6 @@
{{ item.name }} &nbsp;( {{ item.name }} &nbsp;(
<state code="workflow.form.audit.type" :value="item.operation" />) <state code="workflow.form.audit.type" :value="item.operation" />)
<Icon v-if="item.isFixed" title="固定" type="ios-lock" /> <Icon v-if="item.isFixed" title="固定" type="ios-lock" />
<span class="auditedTime">{{item.auditedTime}}</span>
</p> </p>
<div class="content"> <div class="content">
<div class="records" v-if="index==cur"> <div class="records" v-if="index==cur">
...@@ -22,30 +24,16 @@ ...@@ -22,30 +24,16 @@
class="mr5" class="mr5"
/> />
</div> </div>
<div v-else-if="index>cur">
<CheckboxGroup v-model="immutData">
<span>审批人:</span>
<Checkbox
v-for="(item1, index1) in item.defaultUsers.immutable"
:key="index1"
:label="item1"
:disabled="item.isFixed"
>
<User :value="item1" style="margin-right:5px;" />
</Checkbox>
</CheckboxGroup>
</div>
<div class="wait" v-else>
<span>审批人:</span>
<User
v-for="(item2, index2) in item.defaultUsers.immutable"
:key="index2"
:value="item2"
class="mr5"
/>
</div>
<div style="width:98%" v-if="com(item.records).length>0"> <div style="width:98%" v-if="com(item.records).length>0">
<Table :columns="columns" border size="small" width="90%" :data="com(item.records)"></Table> <!-- <Table :columns="columns" border size="small" width="90%" :data="com(item.records)"></Table> -->
<p class="shen_row" v-for="(item3, index3) in item.records" :key="index3" :value="item3">
<User class="user_span" :value="item3.operatorId"/>
<span class="plr row_time">{{item3.operationTime}}</span>
<state code="workflow.record.status" :value="item3.status" type="text"></state>
<span class="plr remark" v-if="item3.remark">{{item3.remark}}</span>
<a class="plr row_ditill" v-if="item3.contextData" @click="edit(item3)">详情</a>
<!-- <span>{{item3.contextData}}</span> -->
</p>
</div> </div>
</div> </div>
</TimelineItem> </TimelineItem>
...@@ -57,12 +45,16 @@ import Api from './api' ...@@ -57,12 +45,16 @@ import Api from './api'
export default { export default {
name: 'process', name: 'process',
components: {}, components: {},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
data() { data() {
return { return {
currentUserId: 0, currentUserId: 0,
processTitle: '审批流程', processTitle: '审批流程',
currentNodeId: null, currentNodeId: null,
dataImmut: [], dataImmut: [],
creatRows: [],
cur: 0, cur: 0,
columns: [ columns: [
{ {
...@@ -136,8 +128,8 @@ export default { ...@@ -136,8 +128,8 @@ export default {
Api.getdetail({ Id: this.idVal }).then((r) => { Api.getdetail({ Id: this.idVal }).then((r) => {
if (r.success) { if (r.success) {
this.dataImmut = r.result.nodes this.dataImmut = r.result.nodes
this.processTitle = r.result.schemaName
this.currentNodeId = r.result.currentNodeId this.currentNodeId = r.result.currentNodeId
let idUser = []
r.result.nodes.map((u, i) => { r.result.nodes.map((u, i) => {
//查找当前节点索引 //查找当前节点索引
if (u.id == this.currentNodeId) { if (u.id == this.currentNodeId) {
...@@ -152,6 +144,7 @@ export default { ...@@ -152,6 +144,7 @@ export default {
// console.log("this.dataImmut[this.cur + 1]:",this.dataImmut[this.cur + 1],this.cur,this.dataImmut.length ) // console.log("this.dataImmut[this.cur + 1]:",this.dataImmut[this.cur + 1],this.cur,this.dataImmut.length )
this.immutData = this.dataImmut[this.cur + 1].defaultUsers.immutable||(this.dataImmut[this.cur + 1].defaultUsers.mutable)//审核人员bug this.immutData = this.dataImmut[this.cur + 1].defaultUsers.immutable||(this.dataImmut[this.cur + 1].defaultUsers.mutable)//审核人员bug
} }
} else { } else {
this.$Message.error('加载失败') this.$Message.error('加载失败')
} }
...@@ -178,8 +171,8 @@ export default { ...@@ -178,8 +171,8 @@ export default {
com(items) { com(items) {
if(items) if(items)
return items.filter((u) => { return items.filter((u) => {
return [2, 3, 5,6].indexOf(u.status) > -1 return [2, 3, 5, 6].indexOf(u.status) > -1
}) })
else else
return []; return [];
}, },
...@@ -191,12 +184,4 @@ export default { ...@@ -191,12 +184,4 @@ export default {
computed: {}, computed: {},
watch: {} watch: {}
} }
</script> </script>
<style lang="less"> \ No newline at end of file
.Design{
margin:20px auto; width:90%;
.ivu-timeline-item-head{
background-color: transparent;
}
}
</style>
\ No newline at end of file
<style lang="less" scope>
@import "./shen.less";
</style>
<template>
<div class="Design">
<h3>{{ processTitle }}</h3>
<Divider />
<Timeline>
<TimelineItem v-for="(item, index) in dataImmut" :key="index">
<Badge :count="index + 1" slot="dot" :type="type(index)"></Badge>
<p class="title">
<state code="workflow.record.status" :value="item.status" type="tag" />
{{ item.name }} &nbsp;(
<state code="workflow.form.audit.type" :value="item.operation" />)
<Icon v-if="item.isFixed" title="固定" type="ios-lock" />
<!-- <span class="auditedTime">{{item.auditedTime}}</span> -->
</p>
<div class="content">
<div class="records" v-if="index==cur">
<span>审批人:</span>
<User
v-for="(item3, index3) in item.records"
:key="index3"
:value="item3.operatorId"
class="mr5"
/>
</div>
<div v-else-if="index>cur">
<CheckboxGroup v-model="immutData">
<span>审批人:</span>
<Checkbox
v-for="(item1, index1) in item.defaultUsers.immutable"
:key="index1"
:label="item1"
:disabled="item.isFixed"
>
<User :value="item1" style="margin-right:5px;" />
</Checkbox>
</CheckboxGroup>
</div>
<div class="wait" v-else>
<span>审批人:</span>
<User
v-for="(item2, index2) in item.defaultUsers.immutable"
:key="index2"
:value="item2"
class="mr5"
/>
</div>
<div style="width:98%" v-if="com(item.records).length>0">
<Table :columns="columns" border size="small" width="90%" :data="com(item.records)"></Table>
<p>
<state code="workflow.record.status" :value="item.status" type="text"></state>
<!-- <User :value="item.operatorId" class="mr5"/> -->
<span>{{item.auditedTime}}</span>
<!-- <span>{{item}}</span> -->
</p>
</div>
</div>
</TimelineItem>
</Timeline>
</div>
</template>
<script>
import Api from './api'
export default {
name: 'process',
components: {},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
data() {
return {
currentUserId: 0,
processTitle: '审批流程',
currentNodeId: null,
dataImmut: [],
cur: 0,
columns: [
{
key: 'status',
title: '结果',
align: 'left',
width: 100,
render: (h, params) => {
return h('state', {
attrs: {
value: params.row.status,
code: 'workflow.record.status'
}
})
}
},
{
key: 'operatorId',
title: '操作人',
align: 'left',
width: 100,
easy: true,
high: true,
render: (h, params) => {
return h('User', { attrs: { value: params.row.operatorId } })
}
},
{
title: '时间',
key: 'operationTime',
width: 200,
align: 'center'
},
{
title: '备注',
key: 'remark',
align: 'center'
},
{
key: 'contextData',
title: '详细',
width: 100,
align: 'left',
render: (h, params) => {
if (params.row.contextData.length > 2)
return h(
'a',
{ on: { click: () => this.edit(params.row) } },
'详情'
)
return h('span', '')
}
}
],
dataMut: [],
immutData: [],
schemaId: ''
}
},
props: {
idVal: {
type: String,
default: ''
}
},
created() {
this.currentUserId=this.$store.state.userInfo.userId
this.dataImmut = []
this.dataMut = []
Api.getdetail({ Id: this.idVal }).then((r) => {
if (r.success) {
this.dataImmut = r.result.nodes
this.processTitle = r.result.schemaName
this.currentNodeId = r.result.currentNodeId
r.result.nodes.map((u, i) => {
//查找当前节点索引
if (u.id == this.currentNodeId) {
this.cur = i
};
// if(u.defaultUsers.mutable&&u.defaultUsers.mutable.length>0){
// u.defaultUsers.immutable=u.defaultUsers.immutable.concat(u.defaultUsers.mutable)
u.defaultUsers.immutable=u.defaultUsers.immutable||(u.defaultUsers.mutable)//审核人员bug
// }
})
if (this.dataImmut.length > this.cur + 1) {
// console.log("this.dataImmut[this.cur + 1]:",this.dataImmut[this.cur + 1],this.cur,this.dataImmut.length )
this.immutData = this.dataImmut[this.cur + 1].defaultUsers.immutable||(this.dataImmut[this.cur + 1].defaultUsers.mutable)//审核人员bug
}
} else {
this.$Message.error('加载失败')
}
})
},
methods: {
load(v) {},
type(i) {
if (i < this.cur) {
return 'primary'
} else if (i == this.cur) {
return 'info'
} else if (i == this.cur + 1) {
return 'warning'
} else {
return 'normal'
}
},
edit(record) {
// alert(record.id)
this.$emit('node-click', record)
console.log(record)
},
com(items) {
if(items)
return items.filter((u) => {
return [2, 3, 5, 6].indexOf(u.status) > -1
})
else
return [];
},
l(key) {
key = 'orderInfo' + '.' + key
return this.$t(key)
}
},
computed: {},
watch: {}
}
</script>
\ No newline at end of file
.new-detail{
margin: 0 auto;
width: 98%;
background: #fff;
box-shadow: 0px 2px 6px rgba(0,0,0,0.16);
}
.Design{
margin:20px auto;
width: 98%;
padding: 20px;
background: #fff;
box-shadow: 0px 2px 6px rgba(0,0,0,0.16);
.ivu-timeline-item-head{
background-color: transparent;
}
.shen_row{
border-bottom: 1px solid #ccc;
line-height: 30px;
padding: 0 0 0 5px;
.user_span{
max-width: 150px;
width: 120px;
}
.row_time{
width: 180px;
}
.row_ditill{
width: 150px;
}
.plr{
display: inline-block;
padding: 0 20px;
}
.remark{
max-width: 1260px;
min-width: 100px;
}
}
}
\ 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