单位端新增页面

lijinlong
李劲龙 5 months ago
parent a4ef00a1d5
commit e16395bf54

@ -47,3 +47,19 @@ export function addassetTaskadd(data) {
data, data,
}) })
} }
export function assetTaskzc(data) {
return request({
url: `/unit/assetTask/zc`,
method: "post",
data,
})
}
export function assetTaskjyTj(data) {
return request({
url: `/unit/assetTask/jyTj`,
method: "post",
data,
})
}

@ -2974,9 +2974,9 @@ export default {
}, },
// form // form
removeDomain(item,type) { removeDomain(item,type) {
var index = this[type].indexOf(item) var index = this.ruleForm[type].indexOf(item)
if (index !== -1) { if (index !== -1) {
this[type].splice(index, 1) this.ruleForm[type].splice(index, 1)
} }
}, },
// form // form

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -108,19 +108,19 @@
<el-table-column label="审核状态" key="status" width="200px" prop="status" class-name="table-status" <el-table-column label="审核状态" key="status" width="200px" prop="status" class-name="table-status"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status === 0" style="color: #F59A23;"> <span v-if="scope.row.status == 0" style="color: #F59A23;">
待核查 待核查
</span> </span>
<span v-if="scope.row.status === 1" style="color: #F43147;"> <span v-if="scope.row.status == 1" style="color: #F43147;">
待审核 待审核
</span> </span>
<span v-if="scope.row.status === 3" style="color: #C51717;"> <span v-if="scope.row.status == 3" style="color: #00FF00;">
审核通过 审核通过
</span> </span>
<span v-if="scope.row.status === 4" style="color: #C51717;"> <span v-if="scope.row.status == 4" style="color: #C51717;">
审核不通过 审核不通过
</span> </span>
<span v-if="scope.row.status === 5" style="color: #C51717;"> <span v-if="scope.row.status == 5" style="color: #C51717;">
已报废 已报废
</span> </span>
</template> </template>

File diff suppressed because it is too large Load Diff

@ -30,12 +30,10 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item >
<!-- <el-date-picker v-model="formInline.time" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
<el-form-item label="任务完成时间:">
<el-date-picker v-model="formInline.time" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="请选择"> type="datetimerange" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="请选择">
</el-date-picker> </el-date-picker> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16" style="text-align: right;padding-right: 20px;"> <el-col :span="16" style="text-align: right;padding-right: 20px;">
@ -48,22 +46,12 @@
</el-form> </el-form>
</div> </div>
<main> <main>
<div class="search-title">
<span class="search-title-span">任务列表</span>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"></el-button>
</el-col>
</el-row>
</div>
<section> <section>
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :max-height="tabHeader" <el-table v-loading="loading" :data="tableData" :height="tabHeader" :max-height="tabHeader"
:row-class-name="tableRowClassName"> :row-class-name="tableRowClassName">
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="任务编号" key="taskId" width="200px" prop="taskId" align="center" /> <el-table-column label="任务编号" key="id" width="200px" prop="id" align="center" />
<el-table-column label="任务名称" key="taskName" prop="taskName" align="center" /> <el-table-column label="任务名称" key="taskName" prop="taskName" align="center" />
<el-table-column label="任务下发时间" key="taskTime" prop="taskTime" align="center"> <el-table-column label="任务下发时间" key="taskTime" prop="taskTime" align="center">
<!-- <template slot-scope="scope"> <!-- <template slot-scope="scope">
@ -71,28 +59,28 @@
</template> --> </template> -->
</el-table-column> </el-table-column>
<el-table-column label="任务期限" key="taskDeadline" prop="taskDeadline" align="center" /> <el-table-column label="任务期限" key="taskDeadline" prop="taskDeadline" align="center" />
<el-table-column label="任务完成时间" key="taskFinishTime" prop="taskFinishTime" align="center" /> <!-- <el-table-column label="任务完成时间" key="taskFinishTime" prop="taskFinishTime" align="center" /> -->
<el-table-column label="任务状态" key="taskStatus" width="200px" prop="taskStatus" class-name="table-status" <el-table-column label="任务状态" key="taskStatus" width="200px" prop="taskStatus" class-name="table-status"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status === 1" style="color: #F58A0C;"> <span v-if="scope.row.taskStatus == 1" style="color: #F58A0C;">
进行中 进行中
</span> </span>
<span v-if="scope.row.status === 2" style="color: #F50C0C;"> <span v-if="scope.row.taskStatus == 2" style="color: #F50C0C;">
正常完成 正常完成
</span> </span>
<span v-if="scope.row.status === 3" style="color: #16B771;"> <span v-if="scope.row.taskStatus == 3" style="color: #16B771;">
超期完成 超期完成
</span> </span>
<span v-if="scope.row.status === 4" style="color: #1485EF;"> <span v-if="scope.row.taskStatus == 4" style="color: #1485EF;">
正常完成 正常完成
</span> </span>
<span v-if="scope.row.status === 5" style="color: #1485EF;"> <span v-if="scope.row.taskStatus == 5" style="color: #1485EF;">
审核驳回 审核驳回
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" prop="userId" width="180px" class-name="table-operation" align="center"> <el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;"> <div style="display: flex;align-items: center;justify-content: center;">
<div style="display: flex;align-items: center;cursor: pointer;"> <div style="display: flex;align-items: center;cursor: pointer;">
@ -321,16 +309,18 @@ export default {
goInfo(row) { goInfo(row) {
getassetTaskid(row.id) getassetTaskid(row.id)
this.$router.push({ this.$router.push({
name: 'TaskInfo', query: { name: 'mytaskInfo', query: {
pageType: "look", pageType: "look",
id:row.id id:row.id
} }
}) })
}, },
delInfo() { delInfo(row) {
//taskAudit
this.$router.push({ this.$router.push({
name: 'taskAudit', query: { name: 'mytaskInfo', query: {
pageType: "info", pageType: "info",
id:row.id
} }
}) })
}, },

@ -1,246 +1,388 @@
<template> <template>
<!-- 任务核查 -->
<div class="L-task-info"> <div class="L-task-info">
<el-row> <div class="info-left" id="L-size-main">
<el-col :span="20"> <div class="content-info" id="L-header">
<div class="info-left info-left-two" id="L-size-main"> <div class="info-title">任务详情</div>
<div class="content-info content-info-two" id="L-header"> <div class="top-info">
<div class="info-title">任务基本信息</div> <el-row class="top-row">
<div class="top-info"> <el-col :span="8">
<el-row class="top-row"> 任务编号<span>{{ titleInfoObj.id }}</span>
<el-col :span="8"> </el-col>
任务编号<span>20240101001</span> <el-col :span="8">
</el-col> 任务名称<span>{{ titleInfoObj.taskName }}</span>
<el-col :span="8"> </el-col>
任务名称<span>XXXXX资产核查任务</span> <el-col :span="8">
</el-col> 任务状态<span>{{ taskstatus(titleInfoObj.taskStatus) }}</span>
<el-col :span="8"> </el-col>
任务状态<span>待审核</span> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="8">
<el-row> 任务期限<span>{{ titleInfoObj.taskDeadline }}</span>
<el-col :span="8"> </el-col>
任务期限<span>2024-11-11 09:00:00</span> <el-col :span="8">
</el-col> 任务下发时间<span>{{ titleInfoObj.taskTime }}</span>
<el-col :span="8"> </el-col>
任务下发时间<span>2024-11-11 09:00:00</span> </el-row>
</el-col>
</el-row>
</div>
</div>
<main class="renwuxiangqing">
<div class="info-cut-off-rule-my" id="L-tab">
<div class="info-title">资产信息</div>
</div>
<div class="info-bottom-box">
<!-- <el-form :inline="true" :model="formInline" size="small" class="demo-form-inline">
<el-row>
<el-col :span="7">
<el-form-item label="资产名称:">
<el-input v-model="formInline.name" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="资产类型:">
<el-select v-model="formInline.type" placeholder="请选择">
<el-option label="item.label" value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="核查状态:">
<el-select v-model="formInline.status" placeholder="请选择">
<el-option label="item.label" value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<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>
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :max-height="tabHeader" :row-class-name="tableRowClassName">
<el-table-column type="index" width="50" label="序号" align="center"/>
<el-table-column label="资产编号" key="number" width="200px" prop="number" align="center" />
<el-table-column label="资产名称" key="name" prop="name" align="center" />
<el-table-column label="资产类型" key="type" prop="type" align="center">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
</template> -->
</el-table-column>
<el-table-column label="核查单位" key="unit" prop="unit" align="center" />
<el-table-column label="审核状态" key="status" width="200px" prop="status" class-name="table-status" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status === 0" style="color: #F59A23;">
审核通过
</span>
<span v-if="scope.row.status === 1" style="color: #F43147;">
审核不通过
</span>
<span v-if="scope.row.status === 2" style="color: #C51717;">
已报废
</span>
</template>
</el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;cursor: pointer;">
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;">
<span class="look-info" @click="goInfo(scope.row)" style="color: #1485EF;margin-right: 15px;">查看</span>
</div>
</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>
</main>
</div> </div>
</el-col> </div>
<el-col :span="4"> <div class="info-cut-off-rule" id="L-tab">
<div class="info-right"> <div class="left-tab" :class="index == 1 ? 'active-tab' : ''" @click="activeTab(1)"></div>
<div class="info-title">任务详情</div> </div>
<div class="timeline"> <div class="info-bottom-box">
<el-timeline> <el-form :inline="true" :model="formInline" size="small" class="demo-form-inline" v-if="index == 1">
<el-timeline-item <el-row>
v-for="(activity, index) in activities" <el-col :span="8">
:key="index" <el-form-item label="核查单位:">
:timestamp="activity.timestamp"> <el-input v-model="formInline.dwmc" placeholder="请输入"></el-input>
{{activity.content}} </el-form-item>
</el-timeline-item> </el-col>
</el-timeline> <el-col :span="9">
<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>
<el-col :span="9">
<el-form-item label="审核状态:">
<el-select v-model="formInline.status" placeholder="请选择">
<el-option label="未核查" value="0">
</el-option>
<el-option label="已核查" value="1">
</el-option>
<el-option label="审核通过" value="3">
</el-option>
<el-option label="审核不通过" value="4">
</el-option>
<el-option label="已报废" value="5">
</el-option>
</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="单位名称:">
<el-input v-model="formInlineTwo.unitName" placeholder="请输入"></el-input>
<!-- <el-select v-model="formInline.unit" placeholder="请选择"> -->
<!-- <el-option
v-for="dict in dict.type.bms_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option> -->
<!-- </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">
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :max-height="tabHeader"
:row-class-name="tableRowClassName">
<el-table-column type="index" width="50" label="序号" align="center" />
<!-- <el-table-column label="资产编号" key="id" width="200px" prop="id" align="center" /> -->
<el-table-column label="系统名称" key="xtmc" prop="xtmc" align="center" />
<el-table-column label="系统类型" key="xtlx" prop="xtlx" align="center">
<template slot-scope="scope">
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx" />
</template>
</el-table-column>
<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">
<span v-if="scope.row.status == 0" style="color: #F59A23;">
未核查
</span>
<span v-if="scope.row.status == 1" style="color: #F43147;">
已核查
</span>
<span v-if="scope.row.status == 3" style="color: #00FF00;">
审核通过
</span>
<span v-if="scope.row.status == 4" style="color: #C51717;">
审核不通过
</span>
<span v-if="scope.row.status == 5" style="color: #C51717;">
已报废
</span>
</template>
</el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="scope">
<span class="look-info" @click="goInfo(1, scope.row)" style="color: #192A92;cursor: pointer;">查看</span>
<span class="look-info" @click="goInfo(2, scope.row)" style="color: #192A92;cursor: pointer;"
v-if="$route.query.pageType == 'info'&& scope.row.status != 3&& scope.row.status != 5&&scope.row.status != 1">核查</span>
</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>
<div class="info-right" v-if="$route.query.pageType == 'look'">
<div class="info-title">任务流程节点</div>
<div class="timeline">
<div class="timeline-items" v-for="(item,index) in timeLineData">
<div class="left-box">
<img class="main-img" v-if="item.status == 1" src="@/assets/images/rwxf.png" alt="">
<img class="main-img" v-if="item.status == 2" src="@/assets/images/wctj.png" alt="">
<img class="main-img" v-if="item.status == 3" src="@/assets/images/shbh.png" alt="">
<img class="main-img" v-if="item.status == 4" src="@/assets/images/shtg.png" alt="">
<img class="icon-jt" v-if="(index + 1) != timeLineData.length" src="@/assets/images/icon-jt@2x.png" alt="">
</div>
<div class="right-box">
<span class="span-title" v-if="item.status == 1">:</span>
<span class="span-title" v-if="item.status == 2">:</span>
<span class="span-title" v-if="item.status == 3">:</span>
<span class="span-title" v-if="item.status == 4">:</span>
<span class="span-time">{{ item.timestamp }}</span>
</div> </div>
</div> </div>
</el-col> </div>
</el-row> </div>
</div> </div>
</template> </template>
<script> <script>
import myPagination from "@/views/components/Pagination/index.vue" import myPagination from "@/views/components/Pagination/index.vue"
import { getassetTaskid, geassetTaskcHc } from "@/api/renwuApi/index.js"
export default { export default {
components:{myPagination}, dicts: ['zc_xtlx'],
components: { myPagination },
data() { data() {
return { return {
formInline:{ index: 1,
name:"", formInline: {
type:"",
status:"", },
formInlineTwo: {
unitName: "",
}, },
total:0, total: 0,
pagination:{ pagination: {
current:1, current: 1,
size:10, size: 10,
}, },
tableData:[ tableData: [
{
number:20230001,
name:"XXX资产",
type:"1类资产",
unit:"太仓市XXX局",
status:0,
},{
number:20230001,
name:"XXX资产",
type:"1类资产",
unit:"太仓市XXX局",
status:1,
},{
number:20230001,
name:"XXX资产",
type:"1类资产",
unit:"太仓市XXX局",
status:2,
},
], ],
loading:false, tableDataTwo: [
],
loading: false,
tabHeader: undefined, tabHeader: undefined,
activities: [{ timeLineData: [{
content: '管理员任务下发', status: 1,
timestamp: '2024-11-11 17:00:00'
}, {
status: 2,
timestamp: '2024-11-11 17:00:00'
}, {
status: 3,
timestamp: '2024-11-11 17:00:00'
}, {
status: 2,
timestamp: '2024-11-11 17:00:00'
}, {
status: 4,
timestamp: '2024-11-11 17:00:00'
}, {
status: 2,
timestamp: '2024-11-11 17:00:00'
}, {
status: 4,
timestamp: '2024-11-11 17:00:00' timestamp: '2024-11-11 17:00:00'
}, { }, {
content: '单位核查完成提交', status: 2,
timestamp: '2024-11-11 17:00:00' timestamp: '2024-11-11 17:00:00'
}, { }, {
content: '管理员审核驳回', status: 4,
timestamp: '2024-11-11 17:00:00' timestamp: '2024-11-11 17:00:00'
}, { }, {
content: '单位重新审核提交', status: 2,
timestamp: '2024-11-11 17:00:00' timestamp: '2024-11-11 17:00:00'
}, { }, {
content: '管理员审核通过', status: 4,
timestamp: '2024-11-11 17:00:00' timestamp: '2024-11-11 17:00:00'
}] }],
titleInfoObj: {}
} }
}, },
mounted(){ mounted() {
this.getList(); this.getList();
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce); window.addEventListener('resize', this.cancalDebounce);
this.titleInfo()
}, },
destroyed() { destroyed() {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);
}, },
methods:{
methods: {
goInfo(type, row) {
//
if (type == 1) {
this.$router.push({
name: 'mytaskAuditInfo', query: {
pageType: "look",
taskId: row.taskId,
assetId:row.id
}
})
}
//
if (type == 2) {
this.$router.push({
name: 'mytaskAuditInfo', query: {
pageType: "change",
taskId: row.taskId,
assetId:row.id
}
})
}
// getassetTaskid(row.id)
},
taskstatus(id) {
if (id) {
let obj = {
1: "进行中",
2: "正常完成", 3: "超期完成", 4: "正常完成", 5: "审核驳回"
}
return obj[id]
} else {
return "-"
}
},
titleInfo() {
console.log(this.$route.query);
getassetTaskid(this.$route.query.id).then(res => {
if (res.code == 200) {
this.titleInfoObj = res.data
}
})
},
// //
resetQuery(){ resetQuery() {
this.pagination = { this.pagination = {
current: 1, current: 1,
size: 10, size: 10,
} }
this.formInline = { if (this.index == 1) {
unit:"", this.formInline = {
type:"",
status:"", }
this.getList();
} else if (this.index == 2) {
this.formInlineTwo = {
unitName: "",
}
this.getListTwo();
} }
this.getList();
}, },
// //
handleQuery(){ handleQuery() {
this.pagination = { this.pagination = {
current: 1, current: 1,
size: 10, size: 10,
} }
this.pagination = { ...this.pagination,...this.formInline }; if (this.index == 1) {
this.getList(); this.pagination = { ...this.pagination, ...this.formInline };
this.getList();
} else if (this.index == 2) {
this.getListTwo();
}
}, },
// //
getPagination(){ getPagination() {
this.pagination.current = pages.page; this.pagination.current = pages.page;
this.pagination.size = pages.limit; this.pagination.size = pages.limit;
this.getList(); if (this.index == 1) {
this.getList();
} else if (this.index == 2) {
this.getListTwo();
}
}, },
getList(){}, // tab
activeTab(id) {
this.index = id
if (id == 1) {
this.formInline = {
unit: "",
type: "",
status: "",
}
this.getList();
} else {
this.formInlineTwo = {
unitName: "",
}
this.getList();
}
},
getList() {
geassetTaskcHc(this.pagination).then(res => {
this.tableData = res.data.records
})
},
getListTwo() { },
// table // table
tableRowClassName({row, rowIndex}){ tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) { if (rowIndex % 2 !== 0) {
return 'evenNumber-row'; return 'evenNumber-row';
} }
return ''; return '';
}, },
// //
cancalDebounce(){ cancalDebounce() {
const element = document.getElementById('L-size-main'); // ID const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID const header = document.getElementById('L-header'); // ID
const tab = document.getElementById('L-tab'); // ID const tab = document.getElementById('L-tab'); // ID
const pagination = document.getElementById('L-pagination'); // ID const pagination = document.getElementById('L-pagination'); // ID
const elementHeight = element.offsetHeight; const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight; const headerHeight = header.offsetHeight;
const tabHeight = tab.offsetHeight;
const paginationtHeight = pagination.offsetHeight; const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - tabHeight - 80; const tabHeight = tab.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - tabHeight - 120;
} }
}, },
} }
</script> </script>
<style lang="scss" scoped>
::v-deep .el-timeline {
padding-left: 0;
font-size: 12px;
}
::v-deep .el-form-item__label {
padding-right: 3px;
}
.look-info {
margin-left: 10px;
}
</style>

Loading…
Cancel
Save