12 changed files with 360 additions and 52 deletions
@ -0,0 +1,255 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 秦东 |
||||
|
@ 时间: 2023-03-31 16:26:35 |
||||
|
@ 备注: 定性考核 |
||||
|
--> |
||||
|
<template> |
||||
|
<el-container> |
||||
|
<el-header> |
||||
|
<el-form ref="searchForm" :inline="true" :model="searchInfo" class="demo-form-inline"> |
||||
|
<el-form-item label="行政组织"> |
||||
|
<el-cascader filterable clearable v-model="searchInfo.orgid" :options="orgList" :show-all-levels="false" :props="props1"></el-cascader> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="考核指标"> |
||||
|
<el-input placeholder="请输入名称" v-model="searchInfo.title" clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="日期"> |
||||
|
<el-date-picker |
||||
|
v-model="searchInfo.time" |
||||
|
type="month" |
||||
|
placeholder="选择时间" |
||||
|
format="yyyy 年 MM 月" |
||||
|
value-format="yyyy-MM" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" @click="searckClick">查询</el-button> |
||||
|
<el-button icon="el-icon-refresh" @click="onReset">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-header> |
||||
|
<el-main> |
||||
|
<div class="tableBox" ref="mainBox"> |
||||
|
<el-table |
||||
|
:data="targetList" |
||||
|
:span-method="objectSpanMethod" |
||||
|
border |
||||
|
:height="tableHeight" |
||||
|
style="width: 100%"> |
||||
|
<el-table-column |
||||
|
prop="orgname" |
||||
|
label="行政组织" |
||||
|
width="300" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
label="指标" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-link type="primary" @click="showMethod(scope.row)">{{scope.row.title}}</el-link> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="minusscore" |
||||
|
label="减分" |
||||
|
width="100" |
||||
|
align="center" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="bonuspoints" |
||||
|
label="加分" |
||||
|
width="100" |
||||
|
align="center" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
</el-main> |
||||
|
<el-footer> |
||||
|
<div class="block"> |
||||
|
<el-pagination |
||||
|
@current-change="handleCurrentChange" |
||||
|
:current-page.sync="currentPage" |
||||
|
:page-size="searchInfo.pagesize" |
||||
|
layout="prev, pager, next, jumper" |
||||
|
:total="targetTotal"> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</el-footer> |
||||
|
</el-container> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { tableMergeTrade } from "@/api/people/peopledata"; |
||||
|
import { govthree } from "@/api/personnel/post"; |
||||
|
import { GetQualityTasks } from "@/api/systemaccredit/systemapi" |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
mergeObj: {}, //合并处理后的数据 |
||||
|
mergeArr: ['orgname',"endClick"],// 需要合并的行列信息 |
||||
|
searchInfo:{ |
||||
|
orgid:"", //行政组织 |
||||
|
title:"", //指标名称 |
||||
|
time:"", |
||||
|
page:1, |
||||
|
pagesize:20 |
||||
|
}, |
||||
|
orgList:[], //行政组织 |
||||
|
props1: { |
||||
|
checkStrictly: true, |
||||
|
value: "id", |
||||
|
label: "name", |
||||
|
children: "child", |
||||
|
emitPath:false, |
||||
|
}, |
||||
|
targetList:[], //指标列表 |
||||
|
targetTotal:0, |
||||
|
currentPage:1, |
||||
|
tableHeight:300, //表格高度 |
||||
|
bylawsBox:false, // |
||||
|
orgTarget:{ |
||||
|
orgid:"", //行政组织 |
||||
|
targetid:"", //指标 |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
// 获取 DOM 元素 |
||||
|
this.$nextTick(()=>{ |
||||
|
let $ele = this.$refs.mainBox |
||||
|
this.tableHeight = $ele.offsetHeight |
||||
|
// console.log("获取-height-->",this.tableHeight) |
||||
|
}) |
||||
|
}, |
||||
|
created(){ |
||||
|
// this.tableHeight=this.$refs.mainBox.offsetHeight; |
||||
|
// console.log("获取--->",this.tableHeight) |
||||
|
this.getOrgList(); //获取行政组织列表 |
||||
|
this.dingXingList(); //获取个人需要提交得定性考核数据 |
||||
|
}, |
||||
|
methods:{ |
||||
|
//获取行政组织列表 |
||||
|
async getOrgList(){ |
||||
|
let sendData ={ |
||||
|
page:309, |
||||
|
level:0, |
||||
|
all:1 |
||||
|
} |
||||
|
const res = await govthree(sendData); |
||||
|
this.orgList = res.data |
||||
|
// console.log("this.orgList--->",this.orgList) |
||||
|
}, |
||||
|
//获取个人需要提交得定性考核数据 |
||||
|
async dingXingList(){ |
||||
|
// console.log("获取个人需要提交得定性考核数据--1->",this.searchInfo) |
||||
|
let orgidval = "" |
||||
|
if(this.searchInfo.orgid != "" && this.searchInfo.orgid != null){ |
||||
|
orgidval = this.searchInfo.orgid.toString() |
||||
|
} |
||||
|
let sendData = { |
||||
|
orgid:orgidval, //行政组织 |
||||
|
title:this.searchInfo.title, //指标名称 |
||||
|
time:this.searchInfo.time, |
||||
|
page:this.searchInfo.page, |
||||
|
pagesize:this.searchInfo.pagesize |
||||
|
} |
||||
|
const res = await GetQualityTasks(sendData) |
||||
|
// console.log("获取个人需要提交得定性考核数据--->",res) |
||||
|
if(res.code == 0){ |
||||
|
this.targetList = res.data.list |
||||
|
this.targetTotal = res.data.total |
||||
|
this.mergeObj = tableMergeTrade(this.targetList,this.mergeArr,"endClick") |
||||
|
// console.log("获取个人需要提交得定性考核数据--->",this.mergeObj) |
||||
|
} |
||||
|
}, |
||||
|
// 重置搜索条件 |
||||
|
onReset() { |
||||
|
this.searchInfo = { |
||||
|
orgid:"", //行政组织 |
||||
|
title:"", //指标名称 |
||||
|
time:"", |
||||
|
page:1, |
||||
|
pagesize:20 |
||||
|
} |
||||
|
this.dingXingList(); |
||||
|
}, |
||||
|
//翻页 |
||||
|
handleCurrentChange(val) { |
||||
|
|
||||
|
this.searchInfo.page = val |
||||
|
this.dingXingList(); |
||||
|
}, |
||||
|
//查询指标 |
||||
|
searckClick(){ |
||||
|
this.dingXingList(); |
||||
|
}, |
||||
|
|
||||
|
//计算表格合并行 |
||||
|
// 默认接受四个值 { 当前行的值, 当前列的值, 行的下标, 列的下标 } |
||||
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
||||
|
// console.log("默认接受四个值 { 当前行的值, 当前列的值, 行的下标, 列的下标 }",row, column, rowIndex, columnIndex) |
||||
|
// 判断列的属性 |
||||
|
if(this.mergeArr.indexOf(column.property) !== -1) { |
||||
|
// 判断其值是不是为0 |
||||
|
if(this.mergeObj[column.property][rowIndex]) { |
||||
|
return [this.mergeObj[column.property][rowIndex], 1] |
||||
|
} else { |
||||
|
// 如果为0则为需要合并的行 |
||||
|
return [0, 0]; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
//查看需要提交得指标细则 |
||||
|
async showMethod(val){ |
||||
|
this.orgTarget={ |
||||
|
orgid:val.orgid, //行政组织 |
||||
|
targetid:val.targetid, //指标 |
||||
|
} |
||||
|
|
||||
|
console.log(`查看需要提交得指标细则: `,val); |
||||
|
|
||||
|
|
||||
|
this.bylawsBox=true; |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang='less'> |
||||
|
.el-container { |
||||
|
height:calc(100% - 50px); |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
.el-header, .el-footer { |
||||
|
border-bottom: 1px solid rgb(220, 223, 230); |
||||
|
text-align: left; |
||||
|
padding: 10px 0 0 10px; |
||||
|
} |
||||
|
.el-scrollbar { |
||||
|
height: 101%; |
||||
|
width: 100%; |
||||
|
} |
||||
|
.el-scrollbar__wrap { |
||||
|
|
||||
|
overflow: auto; |
||||
|
overflow: scroll; |
||||
|
} |
||||
|
.el-tree-node.is-current>.el-tree-node__content { |
||||
|
color:#2E89DE!important |
||||
|
} |
||||
|
.el-tree-node_black { |
||||
|
background-color:red !important; |
||||
|
color:#2E89DE!important |
||||
|
} |
||||
|
.block{ |
||||
|
|
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-main{ |
||||
|
padding-bottom: 0px; |
||||
|
} |
||||
|
.tableBox{ |
||||
|
height: 100%; |
||||
|
} |
||||
|
</style> |
||||
Loading…
Reference in new issue