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.

560 lines
19 KiB

6 months ago
<template>
<div class="L-task-info">
5 months ago
<div class="info-left" id="L-size-main">
<div class="content-info" id="L-header">
<div class="info-title">任务详情</div>
5 months ago
<div class="teshu-top-info">
<div class="top-info">
<el-row class="top-row">
5 months ago
<!-- <el-col :span="8">
5 months ago
任务编号<span>{{ titleInfoObj.id }}</span>
5 months ago
</el-col> -->
5 months ago
<el-col :span="8">
任务名称<span>{{ titleInfoObj.taskName }}</span>
</el-col>
<el-col :span="8">
任务状态<span>{{ taskstatus(titleInfoObj.taskStatus) }}</span>
</el-col>
<el-col :span="8">
任务期限<span>{{ titleInfoObj.taskDeadline }}</span>
</el-col>
</el-row>
<el-row>
5 months ago
<el-col :span="8">
任务下发时间<span>{{ titleInfoObj.taskTime }}</span>
</el-col>
<el-col :span="16">
5 months ago
核查资产类型<span>{{ listTow.join(",") }}</span>
</el-col>
5 months ago
</el-row>
</div>
5 months ago
</div>
</div>
<div class="info-cut-off-rule" id="L-tab">
<div class="left-tab" :class="index == 1 ? 'active-tab' : ''" @click="activeTab(1)"></div>
<div :class="index == 2 ? 'active-tab' : ''" @click="activeTab(2)"></div>
</div>
<div class="info-bottom-box">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline" v-if="index == 1">
<el-row>
<el-col :span="8">
<el-form-item label="核查单位:">
<el-input v-model="formInline.dwmc" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="9">
5 months ago
<el-form-item label="系统类型:">
<el-select v-model="formInline.xtlx" placeholder="请选择">
<el-option v-for="dict in dict.type.zc_xtlx" :key="dict.label" :label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col> -->
5 months ago
<el-col :span="9">
<el-form-item label="审核状态:">
<el-select v-model="formInline.status" placeholder="请选择">
<el-option label="待核查" value="0">
</el-option>
5 months ago
<el-option label="待审核" value="1">
5 months ago
</el-option>
<el-option label="审核通过" value="3">
</el-option>
<el-option label="审核不通过" value="4">
</el-option>
5 months ago
<!-- <el-option label="已关停" value="5">
5 months ago
</el-option> -->
5 months ago
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-button size="mini" type="primary" @click="handleQuery()"></el-button>
<el-button size="mini" @click="resetQuery()"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-form :inline="true" :model="formInlineTwo" size="small" class="demo-form-inline" v-if="index == 2">
<el-row>
<el-col :span="7">
<el-form-item label="单位名称:">
5 months ago
<el-input v-model="formInlineTwo.dwmc" placeholder="请输入"></el-input>
5 months ago
<!-- <el-select v-model="formInline.unit" placeholder="请选择"> -->
<!-- <el-option
6 months ago
v-for="dict in dict.type.bms_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option> -->
5 months ago
<!-- </el-select> -->
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-button size="mini" type="primary" @click="handleQuery()"></el-button>
<el-button size="mini" @click="resetQuery()"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<section v-if="index == 1">
5 months ago
<el-tabs v-model="activeName" @tab-click="handleClick">
5 months ago
<el-tab-pane :label="item.conent" :name="item.lable" :xtmcName="item.xtmcName"
v-for="item in chanckListTow">
</el-tab-pane>
5 months ago
</el-tabs>
5 months ago
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :row-class-name="tableRowClassName">
5 months ago
<el-table-column type="index" width="50" label="序号" align="center" />
5 months ago
<!-- <el-table-column label="资产编号" key="id" width="200px" prop="id" align="center" /> -->
<el-table-column :label="xtmcName" key="xtmc" prop="xtmc" align="center" />
<!-- <el-table-column label="系统类型" key="xtlx" prop="xtlx" align="center">
5 months ago
<template slot-scope="scope" >
<div v-if='scope.row.xtlx'>
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx" />
</div>
5 months ago
</template>
5 months ago
</el-table-column> -->
5 months ago
<el-table-column label="核查单位" key="zcdwmc" prop="zcdwmc" align="center" />
<el-table-column label="审核状态" key="status" width="200px" prop="status" class-name="table-status"
align="center">
<template slot-scope="scope">
5 months ago
<span v-if="scope.row.status == 0" style="color: #303133;">
5 months ago
待核查
</span>
5 months ago
<span v-if="scope.row.status == 1" style="color: #E6A23C;">
5 months ago
待审核
</span>
5 months ago
<span v-if="scope.row.status == 3" style="color: #67C23A;">
5 months ago
审核通过
</span>
5 months ago
<span v-if="scope.row.status == 4" style="color: #F56C6C;">
5 months ago
审核不通过
</span>
5 months ago
<span v-if="scope.row.status == 5" style="color: #F56C6C;">
已关停
5 months ago
</span>
</template>
</el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="scope">
5 months ago
<div style="display: flex;align-items: center;justify-content: center;">
5 months ago
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(1, scope.row)"
v-if="scope.row.status != 1 || ($route.query.pageType == 'look' || $route.meta.pageType == 'look')">
5 months ago
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;">
5 months ago
<span class="look-info" style="color: #1485EF;">查看</span>
5 months ago
</div>
5 months ago
<div style="display: flex;align-items: center;cursor: pointer;margin-left: 5px;"
@click="goInfo(2, scope.row)"
v-if="$route.query.pageType == 'info' || $route.meta.pageType == 'info'"
v-show='scope.row.status == 1'>
5 months ago
<img src="@/assets/images/icon-shenhe@2x.png" alt="" style="width: 15px;margin-right: 5px;">
5 months ago
<span class="look-info" style="color: #1485EF;">审核</span>
5 months ago
</div>
5 months ago
<div style="display: flex;align-items: center;cursor: pointer;margin-left: 5px;"
@click="goInfo(3, scope.row)" v-show='scope.row.status == 4'>
5 months ago
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;">
5 months ago
<span class="look-info" style="color: #1485EF;">查看原因</span>
5 months ago
</div>
5 months ago
</div>
5 months ago
</template>
</el-table-column>
</el-table>
</section>
<section v-if="index == 2">
<el-table v-loading="loading" :data="tableDataTwo" :height="tabHeader" :max-height="tabHeader"
:row-class-name="tableRowClassName">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="单位名称" key="dwmc" width="200px" prop="dwmc" align="center" />
<el-table-column label="核查资产数量" key="total" prop="total" align="center" />
<el-table-column label="完成数量" key="checked" prop="checked" align="center">
5 months ago
<!-- <template slot-scope="scope">
6 months ago
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
</template> -->
5 months ago
</el-table-column>
<el-table-column label="未完成数量" key="wwcsl" prop="notChecked" align="center" />
<el-table-column label="未完成比例" key="checkedRatio" width="200px" prop="checkedRatio" align="center">
5 months ago
<template slot-scope="scope">
<span style="color: #192A92;">{{ scope.row.checkedRatio }}%</span>
5 months ago
</template>
</el-table-column>
</el-table>
</section>
<my-pagination id="L-pagination" :total="total" :page="pagination.current" :limit="pagination.size"
@pagination="getPagination" :current-page.sync="pagination.current"></my-pagination>
</div>
</div>
5 months ago
<div class="info-right" v-if="$route.query.pageType == 'look' || $route.meta.pageType == 'look'">
5 months ago
<div class="info-title">任务流程节点</div>
<div class="timeline">
5 months ago
<div class="timeline-items" v-for="(item, index) in timeLineData">
<div class="left-box">
5 months ago
<img class="main-img" :src="returnidimg(item.assetName)" alt="">
<!-- <img class="main-img" v-if="item.status == 2" src="" alt="">
<img class="main-img" v-if="item.status == 3" src="" alt="">
<img class="main-img" v-if="item.status == 4" src="" alt=""> -->
<img class="icon-jt" v-if="(index + 1) != timeLineData.length" src="@/assets/images/icon-jt@2x.png" alt="">
</div>
<div class="right-box">
5 months ago
<span class="span-title">{{ item.assetName }}:</span>
<span class="span-time">{{ item.xfTime }}</span>
</div>
</div>
5 months ago
</div>
5 months ago
5 months ago
</div>
5 months ago
<my-dialog title="查看原因" ref="liebiaoDialog" @close="importClose" class="taskDialogBox" width="40%">
<el-descriptions>
<el-descriptions-item label="不通过原因">
{{ chakanyuanyin }}
</el-descriptions-item>
</el-descriptions>
</my-dialog>
6 months ago
</div>
</template>
<script>
import myPagination from "@/views/components/Pagination/index.vue"
5 months ago
import { getassetTaskid, geassetTaskcHc, assetTaskdwHc, assetLcpage, assetLcpageList } from "@/api/renwuApi/index.js"
5 months ago
import myDialog from "@/views/components/myDialog/index.vue"
5 months ago
6 months ago
export default {
5 months ago
dicts: ['zc_xtlx'],
5 months ago
components: { myPagination, myDialog },
6 months ago
data() {
return {
5 months ago
index: 1,
formInline: {
5 months ago
xtlx: "",
6 months ago
},
5 months ago
formInlineTwo: {
5 months ago
dwmc: "",
6 months ago
},
5 months ago
total: 0,
pagination: {
current: 1,
size: 10,
6 months ago
},
5 months ago
tableData: [
5 months ago
6 months ago
],
5 months ago
tableDataTwo: [
5 months ago
6 months ago
],
5 months ago
loading: false,
6 months ago
tabHeader: undefined,
timeLineData: [],
5 months ago
titleInfoObj: {},
5 months ago
chakanyuanyin: "",
activeName: "0",
xtmcName: "系统名称",
chanckList: [
5 months ago
{
5 months ago
lable: "0",
conent: "web资产",
xtmcName: "系统名称",
5 months ago
},
{
5 months ago
lable: "1",
conent: "小程序资产",
xtmcName: "小程序名称",
5 months ago
},
{
5 months ago
lable: "2",
conent: "公众号资产",
xtmcName: "公众号名称",
5 months ago
},
{
5 months ago
lable: "3",
conent: "电子邮件资产",
xtmcName: "电子邮箱后缀",
5 months ago
},
{
5 months ago
lable: "4",
conent: "移动应用程序资产",
xtmcName: "移动应用程序名称",
5 months ago
},
],
5 months ago
chanckListTow: [],
listTow: [],
6 months ago
}
},
5 months ago
mounted() {
6 months ago
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
5 months ago
this.titleInfo()
this.assetLcpageList()
6 months ago
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
5 months ago
5 months ago
methods: {
5 months ago
handleClick(tab, event) {
5 months ago
this.formInline = {
xtlx: "",
}
console.log(tab);
this.activeName = tab.name
this.xtmcName = tab.$attrs.xtmcName,
localStorage.setItem("activeName",this.activeName)
this.handleQuery()
5 months ago
},
//返回图片
5 months ago
returnidimg(iswenzi) {
// let obj = {
// '下发':require('@/assets/images/rwxf.png'),
// "提交":require('@/assets/images/wctj.png'),
// "驳回,不通过":require('@/assets/images/shbh.png'),
// "审核通过":require('@/assets/images/shtg.png'),
// }
let listsna = [
{
5 months ago
name: "下发",
imgdata: require('@/assets/images/rwxf.png'),
}, {
name: "提交",
imgdata: require('@/assets/images/wctj.png'),
}, {
name: "不通过",
imgdata: require('@/assets/images/shbh.png'),
}, {
name: "审核通过",
imgdata: require('@/assets/images/shtg.png'),
}, {
name: "驳回",
imgdata: require('@/assets/images/shbh.png'),
}
]
5 months ago
let item = listsna.find(item => iswenzi.includes(item.name))
if (item) {
return item.imgdata
} else {
return require('@/assets/images/wctj.png')
}
},
//获取流程
5 months ago
assetLcpageList() {
5 months ago
let obj = {
5 months ago
taskId: this.$route.query.id || this.$route.meta.id
5 months ago
}
5 months ago
assetLcpage(obj).then(res => {
this.timeLineData = res.data
})
},
5 months ago
importClose() { },
5 months ago
5 months ago
goInfo(type, row) {
// 查看
if (type == 1) {
this.$router.push({
5 months ago
name: 'taskAuditInfo', query: {
5 months ago
pageType: "look",
5 months ago
taskId: row.taskId,
5 months ago
assetId: row.id,
type: this.activeName,
5 months ago
5 months ago
}
})
}
//审核
if (type == 2) {
5 months ago
this.$router.push({
name: 'taskAuditInfo', query: {
pageType: "change",
taskId: row.taskId,
5 months ago
assetId: row.id,
type: this.activeName,
5 months ago
5 months ago
}
})
5 months ago
}
5 months ago
//查看不通过原因
if (type == 3) {
this.chakanyuanyin = row.btgyy
this.$refs.liebiaoDialog.open()
5 months ago
5 months ago
}
5 months ago
// getassetTaskid(row.id)
},
5 months ago
taskstatus(id) {
if (id) {
let obj = {
1: "进行中",
2: "正常完成", 3: "超期完成", 4: "正常完成", 5: "审核驳回"
}
return obj[id]
} else {
return "-"
}
},
5 months ago
titleInfoObjtype(type = "0,1") {
console.log(type);
5 months ago
let list = type.split(",")
this.listTow = []
this.chanckListTow = []
this.chanckList.forEach(res => {
list.forEach(element => {
if (element == res.lable) {
this.listTow.push(res.conent)
this.chanckListTow.push(res)
}
5 months ago
});
})
this.activeName = this.chanckListTow[0].lable
if(localStorage.getItem("activeName")){
this.activeName = localStorage.getItem("activeName")
localStorage.setItem("activeName",this.activeName)
}
5 months ago
this.handleQuery();
},
5 months ago
titleInfo() {
5 months ago
// console.log(this.$route.query);
getassetTaskid(this.$route.query.id || this.$route.meta.id).then(res => {
5 months ago
if (res.code == 200) {
this.titleInfoObj = res.data
this.titleInfoObjtype(this.titleInfoObj.type)
5 months ago
}
})
},
6 months ago
// 重置
5 months ago
resetQuery() {
5 months ago
this.activeName = this.chanckListTow[0].lable
5 months ago
this.xtmcName = "系统名称",
5 months ago
this.pagination = {
current: 1,
size: 10,
type: this.activeName,
}
5 months ago
if (this.index == 1) {
6 months ago
this.formInline = {
5 months ago
xtlx: "",
type: this.activeName,
6 months ago
}
this.getList();
5 months ago
} else if (this.index == 2) {
6 months ago
this.formInlineTwo = {
5 months ago
dwmc: "",
6 months ago
}
this.getListTwo();
}
},
// 查询
5 months ago
handleQuery() {
6 months ago
this.pagination = {
current: 1,
size: 10,
5 months ago
type: this.activeName,
6 months ago
}
5 months ago
if (this.index == 1) {
this.pagination = { ...this.pagination, ...this.formInline };
6 months ago
this.getList();
5 months ago
} else if (this.index == 2) {
5 months ago
this.pagination = { ...this.pagination, ...this.formInlineTwo };
6 months ago
this.getListTwo();
}
},
// 获取页码
5 months ago
getPagination(pages) {
6 months ago
this.pagination.current = pages.page;
this.pagination.size = pages.limit;
5 months ago
if (this.index == 1) {
6 months ago
this.getList();
5 months ago
} else if (this.index == 2) {
6 months ago
this.getListTwo();
}
},
// 切换tab
5 months ago
activeTab(id) {
this.pagination.current = 1;
5 months ago
this.pagination.size = 10;
this.total = 0
6 months ago
this.index = id
5 months ago
console.log(id);
5 months ago
this.resetQuery()
5 months ago
6 months ago
},
5 months ago
getList() {
5 months ago
this.loading = true
this.pagination.taskId = this.$route.query.id || this.$route.meta.id
5 months ago
geassetTaskcHc(this.pagination).then(res => {
this.tableData = res.data.records
5 months ago
this.total = res.data.total
this.loading = false
})
},
5 months ago
getListTwo() {
5 months ago
this.loading = true
this.pagination.taskId = this.$route.query.id || this.$route.meta.id
5 months ago
assetTaskdwHc(this.pagination).then(res => {
5 months ago
this.tableDataTwo = res.data.records
this.total = res.data.total
this.loading = false
5 months ago
})
},
5 months ago
// 修改table背景色
5 months ago
tableRowClassName({ row, rowIndex }) {
5 months ago
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
}
return '';
},
6 months ago
// 屏幕尺寸变化
5 months ago
cancalDebounce() {
6 months ago
const element = document.getElementById('L-size-main'); // 通过元素的 ID 获取元素
const header = document.getElementById('L-header'); // 通过元素的 ID 获取元素
const tab = document.getElementById('L-tab'); // 通过元素的 ID 获取元素
const pagination = document.getElementById('L-pagination'); // 通过元素的 ID 获取元素
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
const tabHeight = tab.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - tabHeight - 160;
5 months ago
6 months ago
}
},
5 months ago
beforeRouteEnter(to, from, next) {
if (to.query.pageType == 'info') {
5 months ago
to.meta.title = '任务审核'
to.meta.pageType = to.query.pageType
to.meta.id = to.query.id
5 months ago
} else if (to.query.pageType == 'look') {
5 months ago
to.meta.title = '任务详情'
to.meta.pageType = to.query.pageType
to.meta.id = to.query.id
}
next();
},
6 months ago
}
</script>
5 months ago
<style lang="scss" scoped>
::v-deep .el-timeline {
padding-left: 0;
font-size: 12px;
}
::v-deep .el-form-item__label {
padding-right: 3px;
}
5 months ago
5 months ago
.look-info {}
::v-deep .el-dialog {
5 months ago
margin-top: 20vh !important;
}
5 months ago
</style>