Merge remote-tracking branch 'origin/main'

main 62
hshansha 2 months ago
commit 4d15534271

@ -1,6 +1,7 @@
<template>
<div class="app-container">
<div class="title">{{ vote.voteTitle }}</div>
<div class="title">{{ vote.pingceName }}</div>
<div class="title" style="font-size: 22px">{{ vote.voteTitle }}</div>
<div class="time">时间{{ vote.sTime }} - {{ vote.eTime }}</div>
<div class="time" v-if="vote.khitemTypeid===1 && vote.umax"> {{ vote.umax }}</div>
<div class="des">{{ vote.vDescription }}</div>
@ -9,6 +10,7 @@
<div class="tou_piao_item">
<div>
{{ item.bkhdxName }}
<el-link type="primary" @click="goPage(item)" icon="el-icon-view"></el-link>
</div>
<div class="_desc">参与评分 {{ item.voteNum!==null?item.voteNum: ''}} </div>
<div class="_desc">均值{{ item.avgScore!==null?item.avgScore: '' }} </div>
@ -24,6 +26,7 @@
<div class="tou_piao_item">
<div>
{{ item.bkhdxName }}
<el-link type="primary" @click="goPage(item)" icon="el-icon-view"></el-link>
</div>
<div class="_desc">参与评分 {{ item.voteNum!==null?item.voteNum: ''}} </div>
<div class="_desc">均值{{ item.avgScore!==null?item.avgScore: '' }} </div>
@ -43,20 +46,78 @@
<el-button type="primary" icon="el-icon-s-promotion" @click="VoteSubmit" v-hasPermi="['kaohe:vote_emp:edit']"></el-button>
</div>
<!-- 详情对话框 -->
<el-dialog :title="uploadFJ.title" :visible.sync="uploadFJ.open" width="800px" append-to-body>
<el-row :gutter="20" v-if="vote.bkhdxType==='0'">
<el-col :span="24">
<span>部门名称</span><span>{{ detail.deptName }}</span>
</el-col>
</el-row>
<el-row :gutter="20" v-if="vote.bkhdxType==='1'">
<el-col :span="8">
<span>工号</span><span>{{ detail.wordId }}</span>
</el-col>
<el-col :span="8">
<span>职工姓名</span><span>{{ detail.empName }}</span>
</el-col>
<el-col :span="8">
<span>部门名称</span><span>{{ detail.deptName }}</span>
</el-col>
</el-row>
<el-row class="mt20" :gutter="20" v-for="item in uploadFJ.docDiscripList">
<el-col :span="24">
<span>附件主题</span><span>{{ item.title }}</span>
</el-col>
<el-col class="mt5" :span="24">
<span>附件简介</span><span>{{ item.docDiscrip }}</span>
</el-col>
</el-row>
<el-card style="margin-bottom: 10px;">
<div slot="header">
<span>附件</span>
</div>
<div v-for="(item,index) in uploadFJ.fileList" :key="item.url" class="yy_fj_list">
<a :href="item.url" :download="item.name" target="_blank">{{ item.name }}</a>
</div>
</el-card>
<div slot="footer" class="dialog-footer">
<el-button @click="uploadFJ.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getVote } from "@/api/kaohe/vote"
import { listVote_emp, VoteEmpSubmit } from "@/api/kaohe/vote_emp"
import { getEmployee } from "@/api/kaohe/employee";
import { getDept } from "@/api/system/dept"
export default {
name: "votepage",
data() {
return {
vote: {},
loading:null,
loading: null,
voteList: [],
//
uploadFJ: {
//
open: false,
//
title: '',
//
fileList: [],
//
docDiscripList: []
},
//
detail: {},
}
},
created() {
@ -153,7 +214,82 @@ export default {
type: 'Danger'
})
}
},
//
reset() {
this.detail = {};
this.uploadFJ = {
//
open: false,
//
fileList: [],
//
docDiscripList: []
};
},
goPage(row){
this.reset()
// 0
if(this.vote.bkhdxType==='0'){
this.zzjgDetail(row)
}
// 1
if(this.vote.bkhdxType==='1'){
this.zgDetail(row)
}
},
//
zzjgDetail(row){
getDept(row.bkhdxId).then(response => {
this.detail = response.data;
if(this.detail.docs){
let arr = this.detail.docs.split(';');
arr.forEach( item => {
let arr1 = item.split(',');
this.uploadFJ.fileList.push({
name: arr1[0],
url: arr1[1]
});
})
}
if(this.detail.docDiscrip){
this.uploadFJ.docDiscripList = JSON.parse(this.detail.docDiscrip);
}else {
this.uploadFJ.docDiscripList=[{
title:'',
docDiscrip:'',
}]
}
this.uploadFJ.open = true;
this.uploadFJ.title = '组织架构详情';
})
},
//
zgDetail(row){
getEmployee(row.bkhdxId).then(response => {
this.detail = response.data;
if(this.detail.docs){
let arr = this.detail.docs.split(';');
arr.forEach( item => {
let arr1 = item.split(',');
this.uploadFJ.fileList.push({
name: arr1[0],
url: arr1[1]
});
})
}
if(this.detail.docDiscrip){
this.uploadFJ.docDiscripList = JSON.parse(this.detail.docDiscrip);
}else {
this.uploadFJ.docDiscripList=[{
title:'',
docDiscrip:'',
}]
}
this.uploadFJ.open = true;
this.uploadFJ.title = '职工详情';
})
},
}
}
</script>
@ -161,11 +297,12 @@ export default {
<style scoped lang="scss">
.app-container{
margin: 0 auto;
padding: 30px;
.title{
font-size: 24px;
text-align: center;
margin-bottom: 50px;
margin-bottom: 20px;
}
.des{
padding: 10px;
@ -196,6 +333,19 @@ export default {
}
}
}
}
.el-dialog__body{
padding: 20px;
.el-card{
margin-top: 10px;
}
.yy_fj_list {
height: 36px;
line-height: 36px;
border-bottom: 1px solid #39CCCC;
}
}
</style>

Loading…
Cancel
Save