clay : 关于我的基本完成 #21
|
|
@ -11,8 +11,8 @@ Vue.prototype.$axios = axios;
|
|||
// 字体图标
|
||||
|
||||
export function getBaseUrl(){
|
||||
return "http://gateway.mytwins.top"
|
||||
// return "http://localhost:8000"
|
||||
// return "http://gateway.mytwins.top"
|
||||
return "http://localhost:8000"
|
||||
}
|
||||
|
||||
const service = axios.create({
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@
|
|||
<div v-loading="loading">
|
||||
<div class="top">
|
||||
<div class="top_left">
|
||||
<el-avatar size="large" :src="avatar"></el-avatar>
|
||||
<span style="text-align: center;color: #19191a;font-size: 14px;">{{ selectTask.initiatorName }}</span>
|
||||
<el-avatar size="large" :src="taskData.userInfo.avatar"></el-avatar>
|
||||
<span style="text-align: center;color: #19191a;font-size: 14px;">{{ taskData.userInfo.name }}</span>
|
||||
</div>
|
||||
<div class="top_right">
|
||||
<div style="margin-bottom: 12px">
|
||||
|
|
@ -58,8 +58,41 @@
|
|||
</div>
|
||||
</div>
|
||||
<div style="height: 15px;background:#f5f5f5;"></div>
|
||||
<div>
|
||||
<form-render v-if="!loading" ref="taskViewForm" :form-items="taskData.formItems"
|
||||
v-model="taskData.formData"/>
|
||||
</div>
|
||||
<div style="margin: 10px">
|
||||
<el-timeline>
|
||||
<el-timeline-item v-for="(operation,index) in taskData.operationList"
|
||||
:key="index" :timestamp="operation.startTime"
|
||||
:icon="operation.icon"
|
||||
:color="operation.color"
|
||||
size="large"
|
||||
placement="top">
|
||||
<el-card>
|
||||
<el-avatar size="large" :src="operation.userInfo.avatar"></el-avatar>
|
||||
<p>{{operation.userInfo.name}}</p>
|
||||
<template v-if="operation.operation == 'opinion'">
|
||||
<h4>{{operation.operationName}}</h4>
|
||||
<p>王小虎 提交于 2018/4/12 20:46</p>
|
||||
</template>
|
||||
<template v-if="operation.operation == 'comment'">
|
||||
{{operation.comment}}
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item icon="el-icon-more">
|
||||
<h2>审批进行中</h2>
|
||||
</el-timeline-item>
|
||||
|
||||
|
||||
</el-timeline>
|
||||
</div>
|
||||
<div style="height: 15px;background:#f5f5f5;"></div>
|
||||
<el-footer class="footer">
|
||||
<div class="footer_comment" @click="showCommentBox">
|
||||
|
|
@ -115,9 +148,11 @@ export default {
|
|||
},
|
||||
loading: false,
|
||||
taskData: {
|
||||
userInfo: {},
|
||||
formData: {},
|
||||
formItems: [],
|
||||
processList: []
|
||||
processList: [],
|
||||
operationList: []
|
||||
},
|
||||
avatar: require("@/assets/image/avatar.png")
|
||||
};
|
||||
|
|
@ -140,9 +175,11 @@ export default {
|
|||
},
|
||||
init() {
|
||||
this.taskData = {
|
||||
userInfo: {},
|
||||
formData: {},
|
||||
formItems: [],
|
||||
processList: []
|
||||
processList: [],
|
||||
operationList: []
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.state.design = this.taskData;
|
||||
|
|
@ -161,11 +198,34 @@ export default {
|
|||
return item
|
||||
})
|
||||
that.taskData = res.data;
|
||||
for (let operation of that.taskData.operationList) {
|
||||
switch (operation.state) {
|
||||
case 'agree' :
|
||||
this.$set(operation,"icon","el-icon-check")
|
||||
this.$set(operation,"color","#0bbd87")
|
||||
break;
|
||||
case 'process' :
|
||||
this.$set(operation,"icon","el-icon-loading")
|
||||
this.$set(operation,"color","#f78f5f")
|
||||
break;
|
||||
case 'comment' :
|
||||
this.$set(operation,"icon","el-icon-chat-dot-round")
|
||||
this.$set(operation,"color","#0bbd87")
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
that.$store.state.design = that.taskData;
|
||||
that.$store.state.userTaskOption = that.taskData.userTaskOption;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getTimeLineIcon(operation){
|
||||
switch (operation.state) {
|
||||
case 'agree' : return 'el-icon-check'
|
||||
}
|
||||
},
|
||||
submitTask() {
|
||||
let params = {
|
||||
taskId: this.selectTask.taskId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue