437 lines
20 KiB
HTML
437 lines
20 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
<el-card shadow="never">
|
|
<div class="search">
|
|
<div class="search-item">
|
|
<div class="search-item-label">年度:</div>
|
|
<div class="search-item-option">
|
|
<el-date-picker
|
|
:picker-options="pickerOptions"
|
|
@change="getZbList"
|
|
style="width: 100%"
|
|
v-model="pageForm.annual"
|
|
type="year"
|
|
value-format="yyyy"
|
|
placeholder="选择年度">
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
<div class="search-item">
|
|
<div class="search-item-label">评测名称:</div>
|
|
<div class="search-item-option">
|
|
<el-select v-model="pageForm.zbId" placeholder="请选择评测名称" filterable
|
|
clearable
|
|
@change="doSearch();zbData = zbList.find(v => v.id === pageForm.zbId)"
|
|
style="width: 100%">
|
|
<el-option
|
|
v-for="item in zbList"
|
|
:key="item.id"
|
|
:label="item.annual+item.assessment"
|
|
:value="item.id">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="search-item">
|
|
<div class="search-item-label">所属工会:</div>
|
|
<div class="search-item-option">
|
|
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
|
style="width: 100%;"
|
|
clearable
|
|
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
|
|
@change="doSearch"
|
|
filterable>
|
|
<el-option v-for="item in unions" :label="item.unionname"
|
|
:value="item.id"></el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-query">
|
|
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
|
|
<el-card shadow="never" class="mt20">
|
|
<table-tool label="工会列表" :app="this">
|
|
<template #func>
|
|
|
|
</template>
|
|
</table-tool>
|
|
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
|
:size="tableSize"
|
|
v-loading="tableLoading" ref="table" class="vi-table">
|
|
<el-table-column align="center" header-align="center" type="index"
|
|
:index="indexMethod" label="序号"
|
|
width="80px"></el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
header-align="center"
|
|
v-for="column in tableColumns"
|
|
show-overflow-tooltip
|
|
:sortable="column.sortable"
|
|
:label="column.label"
|
|
:prop="column.prop" :width="column.width" min-width="100px">
|
|
<template v-if="column.prop=='isGrading'" scope="{row}">
|
|
<el-tag v-if="row.isGrading" type="success">是</el-tag>
|
|
<el-tag v-else type="danger">否</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
|
|
width="380px" fixed="right">
|
|
<template scope="{row}">
|
|
<el-button size="mini" @click="openView(row)">查看</el-button>
|
|
<el-button
|
|
v-if="!row.isGrading && row.num > 0 && ${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
|
|
size="mini" type="primary"
|
|
@click="openGrading(row)">定级
|
|
</el-button>
|
|
<el-button
|
|
v-if="row.isGrading && row.num > 0 && ${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
|
|
size="mini" type="primary"
|
|
@click="editGrading(row)">修改定级
|
|
</el-button>
|
|
<el-tooltip
|
|
:content="canDownload ? ('导出【'+ row.unionName +'】管理员自我评议的评议结果') : ('导出【'+ row.unionName +'】下所有评议结果的压缩包') "
|
|
placement="top">
|
|
<el-button v-if="canDownload && row.num > 0" size="mini" type="primary"
|
|
@click="doDownLoad(row,canDownload)">导出
|
|
</el-button>
|
|
</el-tooltip>
|
|
<el-button size="mini" type="primary" @click="downloadFilesByUnion(row)">导出附件</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
|
|
<template #view>
|
|
<el-card shadow="never">
|
|
<div class="search">
|
|
<div class="search-item">
|
|
<div class="search-item-label">工号/姓名:</div>
|
|
<div class="search-item-option">
|
|
<el-input placeholder="请输入工号/姓名" v-model="userPageForm.searchKeyword">
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
<div class="search-item" style="width: 480px !important;">
|
|
<div class="search-item-option">
|
|
<el-radio-group v-model="userPageForm.reviewResult"
|
|
@change="doUserSearch">
|
|
<el-radio-button label="">
|
|
全部
|
|
<span class="ml2">
|
|
{{reviewResultData.fcmy + reviewResultData.my + reviewResultData.lh + reviewResultData.yb}}
|
|
</span>
|
|
</el-radio-button>
|
|
<el-radio-button label="非常满意">非常满意
|
|
<span class="ml2">{{reviewResultData.fcmy || 0}}</span>
|
|
</el-radio-button>
|
|
<el-radio-button label="满意">满意
|
|
<span class="ml2">{{reviewResultData.my || 0}}</span>
|
|
</el-radio-button>
|
|
<el-radio-button label="良好">良好
|
|
<span class="ml2">{{reviewResultData.lh || 0}}</span>
|
|
</el-radio-button>
|
|
<el-radio-button label="一般">一般
|
|
<span class="ml2">{{reviewResultData.yb || 0}}</span>
|
|
</el-radio-button>
|
|
</el-radio-group>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-query">
|
|
<el-button type="primary" icon="el-icon-search" @click="doUserSearch">搜索</el-button>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
|
|
<el-card shadow="never" class="mt20">
|
|
<el-table :data="userTableData" style="width: 100%" row-key="id"
|
|
:size="tableSize" v-loading="tableLoading" ref="table" class="vi-table">
|
|
|
|
<el-table-column align="center" header-align="center" type="index"
|
|
:index="indexMethod" label="序号" width="80px"></el-table-column>
|
|
|
|
<el-table-column
|
|
align="center"
|
|
header-align="center"
|
|
v-for="column in userTableColumns"
|
|
show-overflow-tooltip
|
|
:sortable="column.sortable"
|
|
:label="column.label"
|
|
:prop="column.prop" :width="column.width" min-width="100px">
|
|
</el-table-column>
|
|
<el-table-column prop="evaluatedPersonName" align="center" show-overflow-tooltip
|
|
label="被测评人" v-if="zbData.assessmentMode==2"></el-table-column>
|
|
<el-table-column prop="presidentOpinions" align="center" show-overflow-tooltip
|
|
label="意见建议" v-if="zbData.assessmentMode==2"></el-table-column>
|
|
<el-table-column prop="reviewTime" align="center"
|
|
label="测评时间"></el-table-column>
|
|
<el-table-column prop="userOnline" align="center" header-align="center"
|
|
label="操作" width="240px" fixed="right">
|
|
<template scope="{row}">
|
|
<el-button size="mini" @click="openUserView(row)">查看</el-button>
|
|
<el-button v-if="canDownload" size="mini" type="primary" @click="downloadByPeoId(row)">导出</el-button>
|
|
<el-button v-if="canDownload" size="mini" type="primary" @click="downloadFilesByPeoId(row)">导出附件</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
|
<el-pagination
|
|
@size-change="userPageSizeChange"
|
|
@current-change="userPageNumberChange"
|
|
:current-page="userPageForm.pageNumber"
|
|
:page-sizes="[5,10, 20, 30, 50]"
|
|
:page-size="userPageForm.pageSize"
|
|
layout="total, sizes, prev, pager, next"
|
|
:total="userPageForm.totalCount">
|
|
</el-pagination>
|
|
</el-row>
|
|
</el-card>
|
|
</template>
|
|
</guava>
|
|
|
|
<el-dialog title="评议结果" :visible.sync="userDrawer" close-on-press-escape>
|
|
<wakes-home-review ref="wakesHomeReview"></wakes-home-review>
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog :title="gradingTitle" :visible.sync="gradingDialog" width="40%" :close-on-press-escape="false">
|
|
<el-form :model="gradingData" ref="gradingForm" :rules="gradingRules" label-width="120px">
|
|
<el-form-item prop="zbName" label="评测名称">
|
|
<el-input readonly v-model="gradingData.zbName"></el-input>
|
|
</el-form-item>
|
|
<el-form-item prop="unionName" label="定级分工会">
|
|
<el-input readonly v-model="gradingData.unionName"></el-input>
|
|
</el-form-item>
|
|
<el-form-item prop="gradingName" label="定级结果">
|
|
<dict-select v-model="gradingData.gradingName" style="width: 100%" clearable
|
|
placeholder="请选择定级结果" code="GRADING_TYPE"></dict-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="gradingDialog = false">取 消</el-button>
|
|
<el-button type="primary" @click="doGrading">确 定</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
userDrawer: false,
|
|
zbData: {},
|
|
zpxx: {
|
|
commentPeo: {},
|
|
zbxx: []
|
|
},
|
|
unions: [],
|
|
zbList: [],
|
|
pageForm: {
|
|
annual: new Date().getFullYear() + ''
|
|
},
|
|
pickerOptions: {
|
|
disabledDate(time) {
|
|
return (
|
|
time.getFullYear() > new Date().getFullYear()
|
|
);
|
|
}
|
|
},
|
|
tableColumns: [
|
|
{prop: 'unionName', label: '分工会名称'},
|
|
{prop: 'num', label: '测评人数'},
|
|
{prop: 'isGrading', label: '是否定级'},
|
|
{prop: 'gradingName', label: '定级结果'},
|
|
],
|
|
tableData: [],
|
|
userTableData: [],
|
|
userTableColumns: [
|
|
{prop: 'loginName', label: '工号'},
|
|
{prop: 'userName', label: '姓名'},
|
|
{prop: 'unitName', label: '单位'},
|
|
{prop: 'reviewResult', label: '测评结果'},
|
|
],
|
|
userPageForm: {
|
|
reviewResult: "",
|
|
searchName: "",
|
|
searchKeyword: "",
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
totalCount: 0,
|
|
pageOrderName: "",
|
|
pageOrderBy: ""
|
|
},
|
|
reviewResultData: {},
|
|
|
|
gradingDialog: false,
|
|
gradingTitle: '',
|
|
gradingData: {
|
|
unionName: '',
|
|
unionId: '',
|
|
zbId: '',
|
|
zbName: '',
|
|
},
|
|
gradingRules: {
|
|
gradingName: [ {required: true, message: '请选择定级结果', trigger: 'blur'} ]
|
|
}
|
|
}
|
|
},
|
|
components: {
|
|
'wakes-home-review': httpVueLoader('/components/wakeshome/review/ReviewResult.vue?v=' + moment(new Date()).unix()),
|
|
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=' + moment(new Date()).unix()),
|
|
},
|
|
methods: {
|
|
editGrading(row) {
|
|
this.gradingData = {...row}
|
|
this.$set(this.gradingData, 'zbId', this.pageForm.zbId)
|
|
this.$set(this.gradingData, 'zbName', this.zbList.find(v => v.id === this.pageForm.zbId).assessment)
|
|
this.gradingDialog = true
|
|
},
|
|
doGrading() {
|
|
this.$refs['gradingForm'].validate(async (valid) => {
|
|
if (valid) {
|
|
const resp = await $.post(loc() + '/doGrading', this.gradingData)
|
|
if (resp.code === 0) {
|
|
this.gradingDialog = false
|
|
this.pageData()
|
|
this.$message.success(resp.msg)
|
|
} else {
|
|
this.$message.warning(resp.msg)
|
|
}
|
|
}
|
|
})
|
|
},
|
|
openGrading(row) {
|
|
this.$set(this.gradingData, 'unionId', row.id)
|
|
this.$set(this.gradingData, 'unionName', row.unionName)
|
|
this.$set(this.gradingData, 'zbId', this.pageForm.zbId)
|
|
this.$set(this.gradingData, 'zbName', this.zbList.find(v => v.id === this.pageForm.zbId).assessment)
|
|
this.gradingDialog = true
|
|
},
|
|
doDownLoad(row, flag) {
|
|
if (flag) {
|
|
// 为true,自我评议
|
|
window.open(loc() + '/doDownLoadSingleByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
|
} else {
|
|
// false, 会员评议,导出压缩包
|
|
window.open(loc() + '/doDownLoadZipByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
|
}
|
|
},
|
|
async downloadFilesByUnion(row) {
|
|
const result = await this.validateHasFiles({unionId: row.id, zbId: this.pageForm.zbId})
|
|
if (result) {
|
|
window.open(loc() + '/exportFilesByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
|
}
|
|
},
|
|
downloadByPeoId(row) {
|
|
window.open(loc() + '/exportByPeoId?peoId=' + row.id)
|
|
},
|
|
async downloadFilesByPeoId(row) {
|
|
const result = await this.validateHasFiles({peoId: row.id})
|
|
if (result) {
|
|
window.open(loc() + '/exportFilesByPeoId?peoId=' + row.id)
|
|
}
|
|
},
|
|
async validateHasFiles(data) {
|
|
const res = await $.post('/platform/wakeshome/review/statistics/validateHasFiles', {
|
|
peoId: data.peoId ? data.peoId : '',
|
|
zbId: data.zbId ? data.zbId : '',
|
|
unionId: data.unionId ? data.unionId : ''
|
|
})
|
|
if (res.code === 0) {
|
|
return true
|
|
} else {
|
|
this.$message.warning("未上传附件,无法导出")
|
|
return false
|
|
}
|
|
},
|
|
async getReviewResultNum(row) {
|
|
const res = await $.post(loc() + "/getReviewResultNum", {
|
|
zbId: this.userPageForm.zbId,
|
|
unionId: row.id
|
|
})
|
|
this.reviewResultData = res.data
|
|
},
|
|
async openUserView(row) {
|
|
this.userDrawer = true
|
|
this.$nextTick(() => {
|
|
this.$refs.wakesHomeReview.findOne(row.id)
|
|
})
|
|
},
|
|
doUserSearch() {
|
|
this.tableKey = new Date().getTime()
|
|
this.userPageForm.pageNumber = 1
|
|
this.userPageData()
|
|
},
|
|
userPageNumberChange(val) {
|
|
this.userPageForm.pageNumber = val;
|
|
this.userPageData();
|
|
},
|
|
userPageSizeChange(val) {
|
|
this.userPageForm.pageSize = val;
|
|
this.userPageData();
|
|
},
|
|
userPageData() {
|
|
sublime.showLoadingbar();
|
|
this.tableLoading = true
|
|
$.post(loc() + "/getUserPeoByZbIdOrUnionId", this.userPageForm, (data) => {
|
|
sublime.closeLoadingbar();
|
|
this.tableLoading = false
|
|
if (data.code === 0) {
|
|
this.userTableData = data.data.list;
|
|
this.userPageForm.totalCount = data.data.totalCount;
|
|
} else {
|
|
this.$message.error(data.msg);
|
|
}
|
|
}, "json");
|
|
},
|
|
async openView(row) {
|
|
this.userPageForm.searchKeyword = ''
|
|
this.userPageForm.unionId = row.id
|
|
this.userPageForm.zbId = this.pageForm.zbId
|
|
this.userPageData()
|
|
await this.getReviewResultNum(row)
|
|
this.$refs.guava.view()
|
|
|
|
},
|
|
async getZbList() {
|
|
const res = await $.get("/platform/wakeshome/review/Xjkhzb/getZbList", {year: this.pageForm.annual})
|
|
this.zbList = res.data
|
|
if (res.data && res.data.length > 0) {
|
|
this.$set(this.pageForm, "zbId", res.data[0].id)
|
|
|
|
} else {
|
|
this.$set(this.pageForm, "zbId", null)
|
|
}
|
|
this.doSearch()
|
|
},
|
|
},
|
|
computed: {
|
|
canDownload() {
|
|
const data = this.zbList.find(v => v.id === this.pageForm.zbId)
|
|
return data.scoringMode == 1
|
|
}
|
|
},
|
|
async created() {
|
|
await this.getZbList()
|
|
this.unions = await getUnions(null)
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|
|
|