web-zk-admin/src/views/dashboard/hasIndex.vue

544 lines
14 KiB
Vue
Raw Normal View History

2025-03-23 10:03:12 +08:00
<!--
* @Descripttion:
* @version:
* @Author: kBank
* @Date: 2023-03-21 17:14:47
-->
<!--
* @Descripttion:
* @version:
* @Author: kBank
* @Date: 2022-10-24 10:45:39
-->
<template>
<div class="page">
<topBar
v-if="topList.length > 0"
2025-07-18 14:53:41 +08:00
:top-list="topList"
2025-03-23 10:03:12 +08:00
:moren="moren"
2025-07-18 14:53:41 +08:00
:wait-approval-num="waitApprovalNum"
:receive-approval-num="receiveApprovalNum"
/>
2025-03-23 10:03:12 +08:00
<div class="main">
<div class="form_all">
<el-form ref="select" :model="select" label-width="auto">
<el-row :gutter="10">
<el-col :span="4">
2025-05-26 10:41:35 +08:00
<!-- <el-form-item :label="'来源'">
2025-03-23 10:03:12 +08:00
<el-select clearable
v-model="select.signSource">
<el-option v-for="item in sourceList"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="签呈编号">
<el-input
v-model="select.approvalCode"
2025-07-18 14:53:41 +08:00
clearable
2025-05-26 10:41:35 +08:00
:placeholder="'请输入'"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
</el-form-item>
</el-col>
<!-- 一层 -->
<el-col :span="4">
2025-05-26 10:41:35 +08:00
<el-form-item :label="'业务类型'">
2025-03-23 10:03:12 +08:00
<el-select
2025-07-18 14:53:41 +08:00
v-model="select.approvalBusiness"
2025-03-23 10:03:12 +08:00
clearable
filterable
>
<el-option
v-for="item in ywsqList"
:key="item.value"
:label="item.label"
:value="item.value"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="业务类型内容">
<el-input
v-model="select.approvalBusinessVal"
2025-07-18 14:53:41 +08:00
clearable
2025-05-26 10:41:35 +08:00
:placeholder="'请输入'"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="情况说明">
<el-input
v-model="select.remark"
2025-07-18 14:53:41 +08:00
clearable
2025-05-26 10:41:35 +08:00
:placeholder="'请输入'"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
</el-form-item>
</el-col>
<!-- <el-col :span="4">
2025-05-26 10:41:35 +08:00
<el-form-item :label="'审核状态'">
2025-03-23 10:03:12 +08:00
<el-select clearable
v-model="select.approvalOperation">
<el-option v-for="item in checkList"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="4">
2025-05-26 10:41:35 +08:00
<el-form-item :label="'签呈状态'">
2025-07-18 14:53:41 +08:00
<el-select v-model="select.approveStatus" clearable>
2025-03-23 10:03:12 +08:00
<el-option
v-for="item in approveStatusList"
:key="item.value"
:label="item.label"
:value="item.value"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
2025-05-26 10:41:35 +08:00
<el-form-item :label="'创建日期'">
2025-03-23 10:03:12 +08:00
<el-date-picker
v-model="select.creationTime"
value-format="yyyy-MM-dd"
type="daterange"
2025-05-26 10:41:35 +08:00
:range-separator="'至'"
:start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
</el-form-item>
</el-col>
<el-col :span="8">
2025-05-26 10:41:35 +08:00
<el-form-item :label="'终审日期'">
2025-03-23 10:03:12 +08:00
<el-date-picker
v-model="select.endTime"
value-format="yyyy-MM-dd"
type="daterange"
2025-05-26 10:41:35 +08:00
:range-separator="'至'"
:start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="getDataList1">
2025-07-18 14:53:41 +08:00
{{ '搜索' }}</el-button>
2025-05-26 10:41:35 +08:00
<el-button @click="reset"> {{ '重置' }}</el-button>
2025-03-23 10:03:12 +08:00
</el-col>
</el-row>
</el-form>
</div>
<div class="main_a">
<div class="mainbtn">
2025-07-18 14:53:41 +08:00
<el-button size="small" class="exportBtn" @click="handleExport">
{{ '导出' }}</el-button>
2025-03-23 10:03:12 +08:00
</div>
</div>
<el-table
2025-07-18 14:53:41 +08:00
v-loading="loading"
2025-03-23 10:03:12 +08:00
:data="tableData1"
style="width: 100%"
height="100%"
:header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName"
>
2025-07-18 14:53:41 +08:00
<el-table-column align="center" prop="approvalCode" label="签呈编号" />
2025-03-23 10:03:12 +08:00
<el-table-column
align="center"
prop="approvalBusinessVal"
2025-05-26 10:41:35 +08:00
:label="'业务类型'"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
<el-table-column
align="center"
prop="parentClassifyName"
:min-width="300"
2025-05-26 10:41:35 +08:00
:label="'签呈进度'"
2025-03-23 10:03:12 +08:00
>
<!-- <template slot-scope="scope">
<div class="bz_a">
<div class="bz_i"
v-for="(item,index) in scope.row.detailList"
:key="item.deptName">
<div :class="item.useTime == undefined?'qiu':'quan'"></div>
<div :class="scope.row.detailList[index+1].useTime == undefined?'gun1':'gun'"
v-if="index!=scope.row.detailList.length-1"></div>
<div class="time">{{ item.useTime }}</div>
<div class="zhi">{{ item.deptName }}</div>
</div>
</div>
</template> -->
<template slot-scope="scope">
<div class="bz_a">
<div
v-for="(item, index) in scope.row.detailList"
:key="index"
2025-07-18 14:53:41 +08:00
class="bz_i"
2025-03-23 10:03:12 +08:00
>
2025-07-18 14:53:41 +08:00
<div :class="item.useTime == undefined ? 'qiu' : 'quan'" />
2025-03-23 10:03:12 +08:00
<div
2025-07-18 14:53:41 +08:00
v-if="index != scope.row.detailList.length - 1"
2025-03-23 10:03:12 +08:00
:class="
scope.row.detailList[index + 1].useTime == undefined
? 'gun1'
: 'gun'
"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
<div class="time">{{ item.useTime }}</div>
<div class="zhi">
<div>{{ item.nickName }}</div>
<div>({{ item.deptName }})</div>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
prop="sendStr"
2025-05-26 10:41:35 +08:00
:label="'抄送人'"
2025-03-23 10:03:12 +08:00
>
<template slot-scope="scope">
<div
:class="
scope.row.receiveList.length > 0 &&
2025-07-18 14:53:41 +08:00
scope.row.receiveList[0].receiveStatus == 1
2025-03-23 10:03:12 +08:00
? 'act'
: 'act2'
"
>
{{ scope.row.sendStr }}
</div>
</template>
</el-table-column>
<el-table-column
align="center"
prop="useTime"
2025-05-26 10:41:35 +08:00
:label="'总耗时'"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
<!-- <el-table-column align="center"
prop="approvalOperationVal"
2025-05-26 10:41:35 +08:00
:label="'审核状态'">
2025-03-23 10:03:12 +08:00
</el-table-column> -->
<el-table-column
align="center"
prop="approveStatusVal"
2025-05-26 10:41:35 +08:00
:label="'签呈状态'"
2025-07-18 14:53:41 +08:00
/>
2025-03-23 10:03:12 +08:00
<!-- <el-table-column align="center"
prop="remark"
label="情况说明">
</el-table-column> -->
<el-table-column
align="center"
prop="creationTime"
2025-05-26 10:41:35 +08:00
:label="'创建日期'"
2025-07-18 14:53:41 +08:00
/>
<el-table-column align="center" prop="endTime" :label="'终审日期'" />
2025-03-23 10:03:12 +08:00
<el-table-column
align="center"
prop="time"
2025-05-26 10:41:35 +08:00
:label="'操作'"
2025-03-23 10:03:12 +08:00
fixed="right"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
2025-07-18 14:53:41 +08:00
@click="toFixed(scope.row.approvalCode, 1)"
2025-03-23 10:03:12 +08:00
>
2025-05-26 10:41:35 +08:00
{{ '查看签呈' }}
2025-03-23 10:03:12 +08:00
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getDataList1"
/>
</div>
</div>
</template>
<script>
2025-07-18 14:53:41 +08:00
import { mapGetters } from 'vuex'
import * as api from '@/api/manage.js'
import topBar from '@/components/topBar'
import topBarMixin from './mixins/top-bar-mixin'
2025-03-23 10:03:12 +08:00
export default {
2025-07-18 14:53:41 +08:00
name: 'Dashboard',
mixins: [topBarMixin],
2025-03-23 10:03:12 +08:00
computed: {
2025-07-18 14:53:41 +08:00
...mapGetters(['name'])
2025-03-23 10:03:12 +08:00
},
data() {
return {
loading: false,
queryParams: {
pageNum: 1,
2025-07-18 14:53:41 +08:00
pageSize: 50
2025-03-23 10:03:12 +08:00
},
total: 0,
tableData: [],
tableData1: [],
tabActive: 0,
select: {},
2025-07-18 14:53:41 +08:00
moren: 'hasIndex',
2025-03-23 10:03:12 +08:00
ywsqList: [],
checkList: [],
sourceList: [],
approveStatusList: [],
2025-07-18 14:53:41 +08:00
waitApprovalNum: '',
receiveApprovalNum: ''
}
2025-03-23 10:03:12 +08:00
},
mounted() {
// 获取列表
2025-07-18 14:53:41 +08:00
this.getDataList1()
this.getApprove()
this.getSignType()
this.getSource()
this.getApprovalStatus()
2025-03-23 10:03:12 +08:00
},
methods: {
reset() {
2025-07-18 14:53:41 +08:00
this.select = {}
this.getDataList1()
2025-03-23 10:03:12 +08:00
},
getApprove() {
api.approvalBusiness().then((res) => {
2025-07-18 14:53:41 +08:00
this.ywsqList = res.data
})
2025-03-23 10:03:12 +08:00
},
getSource() {
api.signSource().then((res) => {
2025-07-18 14:53:41 +08:00
this.sourceList = res.data
})
2025-03-23 10:03:12 +08:00
},
getSignType() {
api.approvalOperation().then((res) => {
2025-07-18 14:53:41 +08:00
this.checkList = res.data
})
2025-03-23 10:03:12 +08:00
},
getApprovalStatus() {
api.approvalStatus().then((res) => {
2025-07-18 14:53:41 +08:00
this.approveStatusList = res.data
})
2025-03-23 10:03:12 +08:00
api.waitApprovalNum().then((res) => {
2025-07-18 14:53:41 +08:00
this.waitApprovalNum = res.data
})
2025-03-23 10:03:12 +08:00
api.receiveApprovalNum().then((res) => {
2025-07-18 14:53:41 +08:00
this.receiveApprovalNum = res.data
})
2025-03-23 10:03:12 +08:00
},
// 切换tab
handleLink(id) {
2025-07-18 14:53:41 +08:00
this.tabActive = id
2025-03-23 10:03:12 +08:00
if (id == 0) {
// 获取列表
2025-07-18 14:53:41 +08:00
this.getDataList()
2025-03-23 10:03:12 +08:00
} else {
// 获取列表
2025-07-18 14:53:41 +08:00
this.getDataList1()
2025-03-23 10:03:12 +08:00
}
},
getDataList() {
api.waitApproval().then((res) => {
2025-07-18 14:53:41 +08:00
this.tableData = res.data
})
2025-03-23 10:03:12 +08:00
},
getDataList1() {
2025-07-18 14:53:41 +08:00
this.loading = true
2025-03-23 10:03:12 +08:00
api
.completeApproval(Object.assign({}, this.queryParams, this.select))
.then((res) => {
2025-07-18 14:53:41 +08:00
this.loading = false
this.tableData1 = res.rows
this.total = res.total
})
2025-03-23 10:03:12 +08:00
},
toFixed(id, index) {
this.$router.push({
2025-07-18 14:53:41 +08:00
path: 'manageDetails',
2025-03-23 10:03:12 +08:00
query: {
id: id,
2025-07-18 14:53:41 +08:00
index: index
}
})
2025-03-23 10:03:12 +08:00
},
/** 导出按钮操作 */
handleExport() {
2025-06-08 15:32:44 +08:00
this.$confirm('是否确认导出所有数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
2025-07-18 14:53:41 +08:00
type: 'warning'
2025-03-23 10:03:12 +08:00
}).then((_) => {
this.download(
2025-07-18 14:53:41 +08:00
'/system/manage/index/export-approval',
2025-03-23 10:03:12 +08:00
Object.assign({}, this.queryParams, this.select),
`已办${new Date().getTime()}.xlsx`
2025-07-18 14:53:41 +08:00
)
})
2025-03-23 10:03:12 +08:00
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
2025-07-18 14:53:41 +08:00
return 'warning-row'
2025-03-23 10:03:12 +08:00
} else if (rowIndex % 2 == 0) {
2025-07-18 14:53:41 +08:00
return 'success-row'
2025-03-23 10:03:12 +08:00
}
2025-07-18 14:53:41 +08:00
return ''
}
}
}
2025-03-23 10:03:12 +08:00
</script>
<style lang="scss" scoped>
.page {
padding: 20px;
background: #f9f9f9;
font-size: 14px;
}
.main {
display: flex;
flex-direction: column;
background: #ffffff;
border-radius: 8px;
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
}
.form_all {
padding: 0px 20px 0 0px;
// margin-bottom: 20px;
background: #fff;
border-radius: 8px;
}
.topbox {
align-items: center;
padding: 0px 0 3px 0;
display: flex;
// background: skyblue;
.levelList_i {
margin-left: 20px;
position: relative;
cursor: pointer;
padding: 0 5px;
width: 88px;
height: 34px;
border-radius: 17px;
border: 1px solid #cccccc;
font-size: 14px;
font-family: MicrosoftYaHei;
text-align: center;
line-height: 34px;
}
.act {
color: #ffffff;
background: #08143f;
}
.act1 {
border-bottom: 3px solid #1890ff !important;
}
.cha {
font-size: 16px;
color: #606266;
position: absolute;
top: 10px;
}
.li {
width: 40px;
margin: 0 auto;
border-bottom: 3px solid transparent;
}
}
.main_a {
display: flex;
padding: 0px 20px 0px 0px;
justify-content: space-between;
align-items: center;
background: #fff;
border-radius: 8px;
}
.bz_a {
display: flex;
// justify-content: center;
// padding-left: 80px;
// padding:0px 0 45px 80px;
padding: 35px 0;
// padding-left: 30px;
display: flex;
justify-content: center;
.bz_i {
display: flex;
// flex-direction: column;
align-items: center;
position: relative;
// padding: 20px 0;
.quan {
width: 14px;
height: 14px;
border: 2px solid #1678ff;
border-radius: 50%;
}
.qiu {
width: 14px;
height: 14px;
background: #ccc;
border-radius: 50%;
}
.gun {
width: 60px;
height: 2px;
background: #1678ff;
}
.gun1 {
width: 60px;
height: 2px;
background: #ccc;
}
.time {
position: absolute;
top: -20px;
left: -80px;
// transform: translateX(-120%);
font-size: 10px;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
width: 50px;
white-space: nowrap;
}
.zhi {
line-height: 14px;
font-size: 8px;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
position: absolute;
left: 3px;
// right: 0;
transform: translateX(-45%);
bottom: -30px;
white-space: nowrap;
}
}
.bz_i:last-child {
// width: 100px;
}
}
::v-deep .el-date-editor--daterange {
width: 100%;
}
.act {
color: #e41b1b;
}
.act2 {
color: rgb(83, 177, 30);
}
</style>