<template>
|
<zt-table-wraper ref="tableObj" query-url="/task/taskCenter/pageDone" :paging="false" :lazy="true" v-slot="{ table }"
|
paging-layout="total, prev, pager, next">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
|
<el-input type="text" v-model="dataForm.djxlSystem" v-if="false" />
|
</el-form>
|
<el-table ref="table"
|
:height="getTransformHeight(transformHeight)"
|
v-loading="table.dataLoading"
|
:data="table.dataList"
|
style='margin-top:10px;transition: .5s;'
|
@selection-change="table.selectionChangeHandle"
|
border highlight-current-row>
|
<el-table-column align="center" prop="index" width="60" label="序号">
|
<template slot-scope="scope">
|
<span v-html="indexFormat(scope.$index)"></span>
|
</template>
|
</el-table-column>
|
|
<el-table-column align="left" prop="topic" label="工程" width="150"/>
|
<!-- <el-table-column align="left" prop="title" label="流程名称" width="200"/>-->
|
<el-table-column align="left" prop="remark" label="摘要" />
|
<el-table-column align="center" prop="finishStepName" label="完成节点" width="240px"/>
|
<el-table-column align="center" v-if ='$store.state.user.isAdmin' prop="finishUserName" label="完成人员" width="120px"/>
|
<el-table-column align="center" prop="finishTime" label="完成时间" width="160px"/>
|
<el-table-column align="center" prop="stepName" label="当前状态" width="240px"/>
|
<el-table-column align="center" prop="receiveName" label="办理人" width="120px"/>
|
<!-- <el-table-column align="center" prop="statusName" label="我的意见" />-->
|
<zt-table-column-handle fixed="right" :table="table" :has-edit="false" :has-delete="false" :has-view="false" width="220px">
|
<template v-slot="{ row }">
|
<zt-table-button v-show="row.canRecall == 1 && !$store.state.user.isAdmin" @click="reCall(row)">撤回</zt-table-button>
|
<zt-table-button @click="check(row,'')" v-if="row.flowCode !== 'yearPlanFlow'">查看</zt-table-button>
|
<zt-table-button @click="check(row,'')" v-if="row.flowCode === 'yearPlanFlow'">修改</zt-table-button>
|
<zt-table-button @click="flowChart(row)">流程图</zt-table-button>
|
<zt-table-button v-if="row.flowCode != 'yearPlan2'" @click="getFlowTrack(row)">办理轨迹</zt-table-button>
|
</template>
|
</zt-table-column-handle>
|
</el-table>
|
<!-- 弹窗, 新增 / 修改 -->
|
<!-- <el-dialog title="项目进度图" top="10vh" width='85%' :visible.sync="dialogVisible">-->
|
<!-- <processTimeline ref="processTimeline"></processTimeline>-->
|
<!-- </el-dialog>-->
|
</zt-table-wraper>
|
</template>
|
|
<script>
|
// import processTimeline from '../../../../map/processTimeline'
|
import Cookies from "js-cookie";
|
export default {
|
data() {
|
return {
|
dataForm: {
|
djxlSystem:''
|
},
|
dialogVisible: false,
|
}
|
},
|
props:{
|
system:String,
|
transformHeight:{
|
type:Boolean,
|
default:false
|
}
|
},
|
components: {
|
},
|
watch:{
|
},
|
created() {
|
if (this.$route.path.indexOf('taskCenter')>0 || this.system=='smj'){
|
this.transformHeight = true
|
}else{
|
this.transformHeight = false
|
}
|
},
|
mounted() {
|
console.log(this.system)
|
this.dataForm.djxlSystem = Cookies.get('djxlSystem')
|
this.getQuery()
|
this.$EventBus.$on('newProject',()=>{
|
this.$refs.tableObj.query()
|
})
|
},
|
methods: {
|
getTransformHeight(transformHeight){
|
let Height=document.documentElement.clientHeight
|
if(transformHeight){
|
return Height-(650-403)
|
}else{
|
return Height-650
|
}
|
},
|
getQuery(){
|
this.$refs.tableObj.query()
|
this.$emit('getQuery')
|
},
|
async reCall(row) {
|
if (await this.$tip.confirm('确定要进行撤回吗?')) {
|
this.$http.get(`/wf/reCallFlow`, {params: row}).then(res => {
|
if (res.data == 'OK') {
|
this.$refs.tableObj.query();
|
}
|
else {
|
this.$tip.alert(res.data)
|
}
|
})
|
}
|
},
|
check(row) {
|
// if(row.stepMarker === 'jsfa_sc' || row.stepMarker === 'jsfa_sp'){
|
// this.$refs.repairSkillScheme.$refs.dialog.init(row)
|
// }
|
// else
|
if (row.title === '年度修理计划') {
|
this.$refs.annualRepairPlanAdd.$refs.dialog2.init(row,'readOnly')
|
} else if (row.flowCode === 'NewProjectFlow') {
|
let id = row.bizId
|
this.$refs.projectUpdate.$refs.dialog.init(id, 'view')
|
}
|
else if (row.flowCode==='monthPlanFlow'){
|
this.$refs.monthlyPlan.$refs.dialog.init('yb', row)
|
}
|
else if (row.flowCode==='weekPlanFlow'){
|
this.$refs.weeklyPlan.$refs.dialog.init('yb', row)
|
}
|
else if (row.flowCode==='rjhFlow') {
|
this.$refs.dailyPlan.$refs.dialog.init('yb', row)
|
}
|
else if (row.flowCode==='wlt3Flow'){
|
this.$refs.networkdiagram3.$refs.dialog.init('yb', row)
|
}
|
else if (row.flowCode==='cjjdrwFlow'){
|
this.$refs.partsInspectionHandle.$refs.dialog.init(row,'yb')
|
}
|
else if (row.flowCode==='zjbyFlow' || row.flowCode==='jjbyFlow'){
|
this.$refs.inspectionCheckHandle.$refs.dialog.init(row,'yb')
|
}
|
else if (row.flowCode==='jzjysFlow'){
|
this.$refs.inspectionCheckZcHandle.$refs.dialog.init(row,'yb')
|
}
|
else if (row.flowCode==='jjysFlow'){
|
this.$refs.inspectionCheckDbsHandle.$refs.dialog.init(row,'yb')
|
}
|
else if (row.flowCode==='cjjdFlow'){
|
this.$refs.partsInspectionJdHandle.$refs.dialog.init(row,'yb')
|
}
|
else {
|
if (row.stepReadRouterId === null){
|
this.$tip.alert("没有配置菜单id")
|
return;
|
}
|
let route = window.SITE_CONFIG['dynamicMenuRoutes'].filter(item => item.meta.menuId === row.stepReadRouterId)[0]
|
if (route === undefined){
|
this.$tip.alert("没有配置菜单权限")
|
return;
|
}
|
let params = {
|
id: row.bizId,
|
projectId: row.bizGroupId,
|
pageCode: row.stepMarker,
|
pageRead: 'yes',
|
productId: row.productId,
|
approveType: ''
|
}
|
if (Object.keys(params).length>0){
|
params = Object.assign(params, route.meta.params);
|
}
|
this.$router.push({
|
name: row.stepReadRouterId,
|
params: params
|
})
|
}
|
},
|
flowChart(row) {
|
// console.log(row, 'flowChart row')
|
// this.dialogVisible = true
|
// this.$nextTick(()=>{
|
// this.$refs.processTimeline.init(row)
|
// })
|
this.$emit('alreadyTask',row)
|
},
|
getFlowTrack(row){
|
console.log(row,'getFlowTrack row')
|
if(row){
|
let params={
|
flowCode:row.flowCode,
|
bizId:row.bizId
|
}
|
console.log(params,'getFlowTrack params')
|
this.$refs.processTrajectory.$refs.dialog.init(params)
|
}
|
},
|
indexFormat(index) {
|
let page = this.$refs.tableObj.page
|
let limit = this.$refs.tableObj.limit
|
let indexs = limit * (page - 1) + index + 1
|
return '<span>' + indexs + '</span>'
|
},
|
},
|
}
|
</script>
|
|
<style scoped>
|
|
</style>
|