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.

185 lines
5.1 KiB

3 years ago
<template>
<div>
<!-- 任务列表 -->
<u-subsection :list="['定性考核', '定量考核']" @change="thumbChange"></u-subsection>
<el-table :data="dataList" border v-show="show==0" :cell-style="{padding:'0px'}">
<el-table-column align="center" label="部门" prop="departmentname"/>
<el-table-column align="center" label="指标">
<template #default="scope">
<el-button
style="font-size: 14px"
size="small"
type="text"
@click="toZhi(scope.row)"
>{{scope.row.title}}</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="加分" prop="extrapoints"/>
<el-table-column align="center" label="减分" prop="scorereduction"/>
</el-table>
<!-- <u-table style="margin-top: 10px;" v-if="show==0">
<u-tr>
<u-th>部门</u-th>
<u-th>指标</u-th>
<u-th>加分</u-th>
<u-th>减分</u-th>
</u-tr>
<u-tr v-for="(iteam,index) in dataList" :key="index">
<u-td>{{iteam.departmentname}}</u-td>
<u-td style="color: #2979FF;">
<view @click="toZhi(iteam)" class="">{{iteam.title}}</view>
</u-td>
<u-td>{{iteam.extrapoints}}</u-td>
<u-td>{{iteam.scorereduction}}</u-td>
</u-tr>
</u-table> -->
<el-table :data="liangDataList" border v-show="show==1" :cell-style="{padding:'0px'}">
<el-table-column align="center" label="部门" prop="parentname"/>
<el-table-column align="center" label="指标" prop="targetname"/>
<el-table-column align="center" label="操作">
<template #default="scope">
<el-button
style="font-size: 14px"
size="small"
type="text"
@click="toShi(scope.row)"
>提报</el-button>
</template>
</el-table-column>
</el-table>
<!-- <u-table style="margin-top: 10px;" v-if="show==1">
<u-tr>
<u-th>部门</u-th>
<u-th>指标</u-th>
<u-th>数据</u-th>
</u-tr>
<u-tr v-for="(iteam,index) in liangDataList" :key="index">
<u-td>{{iteam.parentname}}</u-td>
<u-td>
<view class="">{{iteam.targetname}}</view>
</u-td>
<u-td style="color: #2979FF;">
<view class="" @click="toShi(iteam)">
提报
</view>
</u-td>
</u-tr>
</u-table> -->
</div>
</template>
<script>
export default {
data() {
return {
props1: {
checkStrictly: true,
value: "id",
label: "name",
children: "children",
emitPath:false,
},
show:0,
liangDataList:[],
dataList:[
// {
// group: 3, //集团
// groupname: "恒信高科", //集团名称
// department: 2, //部门ID
// departmentname: "化产分厂", //部门名称
// dimension: 16468024536587500, //维度ID
// dimensionname: "高效运营", //维度名称
// target: 6, //指标ID
// title: "安全环保", //指标名称
// extrapoints: 0, //总加分
// scorereduction: 4.6 //总减分
// },
// {
// group: 3, //集团
// groupname: "恒信高科", //集团名称
// department: 2, //部门ID
// departmentname: "化产分厂", //部门名称
// dimension: 16468024536587500, //维度ID
// dimensionname: "高效运营", //维度名称
// target: 6, //指标ID
// title: "指标1", //指标名称
// extrapoints: 0, //总加分
// scorereduction: 9 //总减分
// },
// {
// group: 3, //集团
// groupname: "恒信高科", //集团名称
// department: 2, //部门ID
// departmentname: "化产分厂", //部门名称
// dimension: 16468024536587500, //维度ID
// dimensionname: "高效运营", //维度名称
// target: 6, //指标ID
// title: "指标2", //指标名称
// extrapoints: 9, //总加分
// scorereduction: 0 //总减分
// },
// {
// group: 3, //集团
// groupname: "恒信高科", //集团名称
// department: 2, //部门ID
// departmentname: "化产分厂", //部门名称
// dimension: 16468024536587500, //维度ID
// dimensionname: "高效运营", //维度名称
// target: 6, //指标ID
// title: "指标3", //指标名称
// extrapoints: 4, //总加分
// scorereduction: 5 //总减分
// },
]
}
},
onShow() {
this.$u.api.Duty.newqualitative().then(res => {
if(res.code==0){
this.dataList=res.data
}
})
this.$u.api.Duty.qualitativeevalration().then(res => {
if(res.code==0){
this.liangDataList=res.data
}
})
},
onLoad(){
// if (this.$store.state.isLogin==false) {
// window.location.href = 'https://www.hxgk.group/jumpapiurl/?url=http://new.hxgk.group/sj/index';
// }
},
methods: {
thumbChange(index) {
this.show=index
},
toShi(iteam){
this.$u.route('/pages/task/data', iteam);
},
toZhi(iteam){
this.$u.route('/pages/task/details', iteam);
},
}
}
</script>
<style scoped lang="scss">
::v-deep.el-table .el-table__cell{
padding: 0 0;
}
</style>