You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
252 lines
6.9 KiB
252 lines
6.9 KiB
<template>
|
|
<view class="container">
|
|
<uni-card :is-shadow="false">
|
|
<view class="">
|
|
<text class="uni-body">审批编号:{{receiveData.outid}}</text>
|
|
</view>
|
|
<view class="titlesize">
|
|
<text class="uni-body ">{{contdata.title}}</text>
|
|
</view>
|
|
</uni-card>
|
|
|
|
<uni-card :is-shadow="false" style="margin-bottom: 10px;">
|
|
|
|
|
|
<uni-row class="demo-uni-row" >
|
|
<uni-col :span="5">
|
|
<view class="demo-uni-col dark">考核纬度:</view>
|
|
</uni-col>
|
|
<uni-col :span="19">
|
|
<view class="demo-uni-col light">{{contdata.dimension}}</view>
|
|
</uni-col>
|
|
</uni-row>
|
|
|
|
<uni-row class="demo-uni-row" >
|
|
<uni-col :span="5">
|
|
<view class="demo-uni-col dark">考核指标:</view>
|
|
</uni-col>
|
|
<uni-col :span="19">
|
|
<view class="demo-uni-col light">{{contdata.target}}</view>
|
|
</uni-col>
|
|
</uni-row>
|
|
<uni-row class="demo-uni-row" >
|
|
<uni-col :span="5">
|
|
<view class="demo-uni-col dark">考核项目:</view>
|
|
</uni-col>
|
|
<uni-col :span="19">
|
|
<view class="demo-uni-col light">{{contdata.targetsun}}</view>
|
|
</uni-col>
|
|
</uni-row>
|
|
<uni-row class="demo-uni-row" >
|
|
<uni-col :span="5">
|
|
<view class="demo-uni-col dark">考核内容:</view>
|
|
</uni-col>
|
|
<uni-col :span="19">
|
|
<view class="demo-uni-col light">{{contdata.detailedtargent}}</view>
|
|
</uni-col>
|
|
</uni-row>
|
|
<uni-row class="demo-uni-row" >
|
|
<uni-col :span="5">
|
|
<view class="demo-uni-col dark">考核标准:</view>
|
|
</uni-col>
|
|
<uni-col :span="19">
|
|
<view class="demo-uni-col light">{{contdata.content}}</view>
|
|
</uni-col>
|
|
</uni-row>
|
|
<uni-row class="demo-uni-row" >
|
|
<uni-col :span="5">
|
|
<view class="demo-uni-col dark">{{contdata.lanmuname}}:</view>
|
|
</uni-col>
|
|
<uni-col :span="19">
|
|
<view class="demo-uni-col light">{{contdata.reasoninfo}}</view>
|
|
</uni-col>
|
|
</uni-row>
|
|
<uni-row class="demo-uni-row" >
|
|
<uni-col :span="5">
|
|
<view class="demo-uni-col dark">考核原因:</view>
|
|
</uni-col>
|
|
<uni-col :span="19">
|
|
<view class="demo-uni-col light">{{contdata.reason}}</view>
|
|
</uni-col>
|
|
</uni-row>
|
|
<uni-row class="demo-uni-row" v-if="contdata.enclosure" >
|
|
<uni-col :span="5">
|
|
<view class="demo-uni-col dark">附件:</view>
|
|
</uni-col>
|
|
<uni-col :span="19">
|
|
<uni-grid style="margin-top: 20rpx;" :column="3" :highlight="true" >
|
|
<uni-grid-item v-for="(encItem, encindex) in contdata.enclosure" :index="encindex" :key="encindex">
|
|
<view class="grid-item-box" v-if="encItem.type==1" style="background-color: #fff;">
|
|
<image :src="encItem.filepath" ></image>
|
|
</view>
|
|
<view class="grid-item-box" v-if="encItem.type==2" style="background-color: #fff;">
|
|
<uni-icons type="videocam" :size="30" color="#777" />
|
|
<text class="text">文本信息</text>
|
|
</view>
|
|
<view class="grid-item-box" v-if="encItem.type>2" style="background-color: #fff;">
|
|
<uni-icons type="wallet" :size="30" color="#777" />
|
|
<text class="text">文本信息</text>
|
|
</view>
|
|
</uni-grid-item>
|
|
</uni-grid>
|
|
</uni-col>
|
|
</uni-row>
|
|
|
|
|
|
|
|
</uni-card>
|
|
|
|
<uni-card :isShadow="false" >
|
|
<uni-steps :options="flowList" active-color="#007AFF" :active="active" direction="column" />
|
|
</uni-card>
|
|
<u-toast ref="uToast"></u-toast>
|
|
</view>
|
|
</template>
|
|
|
|
<script> //定量
|
|
export default {
|
|
data() {
|
|
return {
|
|
active:1,
|
|
headerVerify:{
|
|
userkey:"",
|
|
token:"",
|
|
userCont:""
|
|
},
|
|
receiveData:{
|
|
},
|
|
contdata:[],
|
|
flowList:[]
|
|
};
|
|
},
|
|
onLoad(option) {
|
|
console.log("option",option)
|
|
console.log("option",JSON.parse(option.data))
|
|
let _this = this
|
|
//判断Token是否有效
|
|
let systemCache = _this.$commonMethod.getSystemCacheDate('myCache')
|
|
if(!systemCache){
|
|
_this.$commonMethod.JumpUrl('/pages/login/login')
|
|
}else{
|
|
let currentTime = new Date().getTime() - systemCache.tokenTime
|
|
if (currentTime >= 10800000){
|
|
_this.$commonMethod.verifyPowerIsTrue('myCache')
|
|
}
|
|
}
|
|
_this.headerVerify.userkey = systemCache.userKey
|
|
_this.headerVerify.token = systemCache.token
|
|
_this.headerVerify.userCont = systemCache.userInfo
|
|
this.receiveData = JSON.parse(option.data)
|
|
},
|
|
onReady(){
|
|
this.getDataCont()
|
|
},
|
|
methods:{
|
|
//获取数据
|
|
getDataCont(){
|
|
let _this = this
|
|
let sunTargetDate = {
|
|
id:_this.receiveData.outid*1,
|
|
outid:_this.receiveData.outid.toString()
|
|
}
|
|
//获取审批列表
|
|
uni.request({
|
|
url:_this.$commonMethod.localhostUrl+'/api/eval/lookdutkscoreflow',
|
|
header: {
|
|
'Content-Type': 'application/json', //自定义请求头信息
|
|
// 'User-Agent':250,
|
|
'user-key': _this.headerVerify.userkey,
|
|
'user-token':_this.headerVerify.token
|
|
},
|
|
method:'POST',//请求方式,必须为大写
|
|
data:sunTargetDate,
|
|
success: (res) => {
|
|
console.log(res)
|
|
let callBackDate = res.data
|
|
if(callBackDate.code == 0){
|
|
console.log("列表值---------------->",callBackDate.data)
|
|
_this.contdata=callBackDate.data
|
|
|
|
|
|
_this.contdata.flowmapall.forEach(item=>{
|
|
let userList = new Array //节点审批人
|
|
console.log(item.userlist,"item.userlist")
|
|
if(item.userlist != null && item.userlist.length > 0){
|
|
item.userlist.forEach(usItem=>{
|
|
let usLog = new Array //节点审批人审批记录
|
|
if(usItem.log != null && usItem.log.length > 0){
|
|
usItem.log.forEach(logItem=>{
|
|
let logCont = {
|
|
state:logItem.state,
|
|
time:logItem.time,
|
|
enclosure:logItem.enclosure
|
|
}
|
|
usLog.push(logCont)
|
|
});
|
|
}
|
|
let userCont = { //节点审批人信息
|
|
id:usItem.id,
|
|
name:usItem.name,
|
|
icon:usItem.icon,
|
|
groupname:usItem.groupname,
|
|
departmentname:usItem.departmentname,
|
|
postname:usItem.postname,
|
|
workshopname:usItem.workshopname,
|
|
userlist:usLog
|
|
}
|
|
userList.push(userCont)
|
|
});
|
|
}
|
|
|
|
let flowCont = { //流程图
|
|
title: item.nodename,
|
|
desc: item.step,
|
|
state: item.state,
|
|
userlist:userList
|
|
}
|
|
_this.flowList.push(flowCont)
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
_this.$refs.uToast.show({
|
|
message: callBackDate.msg,
|
|
duration: 1000 * 2,
|
|
position:'bottom',
|
|
})
|
|
}
|
|
},
|
|
fail:function(e){
|
|
_this.$refs.uToast.show({
|
|
message: e,
|
|
duration: 1000 * 2,
|
|
position:'bottom',
|
|
})
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.titlesize{
|
|
font-size: 40rpx;
|
|
color: #000000;
|
|
margin-top: 20rpx;
|
|
}
|
|
.demo-uni-col{
|
|
padding-top: 20rpx;
|
|
|
|
}
|
|
.grid-item-box{
|
|
overflow: hidden;
|
|
image{
|
|
width: 94%;
|
|
height: 78px;
|
|
margin:2px 3%;
|
|
}
|
|
}
|
|
</style>
|
|
|