361 lines
16 KiB
HTML
361 lines
16 KiB
HTML
<!--#
|
||
layout("/layouts/platform.html"){
|
||
#-->
|
||
<style>
|
||
.file-down-span {
|
||
background: black;
|
||
opacity: 0.5;
|
||
z-index: 1000;
|
||
width: 100px;
|
||
text-align: center;
|
||
position: relative;
|
||
bottom: -100px;
|
||
cursor: pointer;
|
||
}
|
||
</style>
|
||
<div id="app" v-cloak>
|
||
<guava ref="guava">
|
||
<el-card shadow="never">
|
||
<div class="btn-group tool-button mt5">
|
||
<el-date-picker
|
||
:picker-options="pickerOptions"
|
||
@change="hdSearch"
|
||
placeholder="选择年"
|
||
type="year"
|
||
v-model="pageForm.year"
|
||
value-format="yyyy">
|
||
</el-date-picker>
|
||
</div>
|
||
|
||
<div class="btn-group tool-button mt5">
|
||
<el-select @change="doSearch()" placeholder="请选择活动"
|
||
v-model="pageForm.hdid">
|
||
<el-option
|
||
:key="item.id"
|
||
:label="item.name"
|
||
:value="item.id"
|
||
v-for="item in lxyHd">
|
||
</el-option>
|
||
</el-select>
|
||
</div>
|
||
|
||
<div class="btn-group tool-button mt5">
|
||
<el-select clearable filterable placeholder="请选择工会"
|
||
v-model="pageForm.ghid">
|
||
<el-option
|
||
:key="item.id"
|
||
:label="item.unionname"
|
||
:value="item.id"
|
||
v-for="item in ghList">
|
||
</el-option>
|
||
</el-select>
|
||
</div>
|
||
|
||
<div class="btn-group tool-button mt5">
|
||
<el-input placeholder="请输入工号或姓名" v-model="pageForm.searchKey"></el-input>
|
||
</div>
|
||
|
||
<div class="btn-group tool-button mt5">
|
||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||
</div>
|
||
|
||
<div class="pull-right offscreen-right mt5">
|
||
<el-button @click="doExport" icon="el-icon-download" plain type="primary">导 出</el-button>
|
||
</div>
|
||
</el-card>
|
||
|
||
<el-card class="mt10" shadow="never">
|
||
<el-table :data="tableData" row-key="id" style="width: 100%" v-loading="tabLoading">
|
||
<el-table-column align="center" header-align="center" label="序号" width="100px">
|
||
<template scope="scope">
|
||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column align="center" header-align="center" label="姓名"
|
||
prop="username"></el-table-column>
|
||
<el-table-column align="center" header-align="center" label="性别"
|
||
prop="sex"></el-table-column>
|
||
<el-table-column align="center" header-align="center" label="年龄"
|
||
prop="age" sortable></el-table-column>
|
||
<el-table-column align="center" header-align="center" label="民族"
|
||
prop="mz" sortable></el-table-column>
|
||
<el-table-column align="center" header-align="center" label="手机号"
|
||
prop="mobile" show-overflow-tooltip></el-table-column>
|
||
<el-table-column align="center" header-align="center" label="身份证号" prop="idcard"
|
||
width="300px"></el-table-column>
|
||
<el-table-column align="center" header-align="center" label="工会"
|
||
prop="unionname" show-overflow-tooltip sortable></el-table-column>
|
||
<el-table-column align="center" header-align="center" label="单位"
|
||
prop="unitname" show-overflow-tooltip sortable></el-table-column>
|
||
<el-table-column align="center" header-align="center" label="职务"
|
||
prop="zw" sortable></el-table-column>
|
||
|
||
|
||
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="120px">
|
||
<template scope="scope">
|
||
<el-button @click="openView(scope.row)" size="mini" type="primary">查看
|
||
</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
|
||
<el-row class="el-pagination-container">
|
||
<el-pagination
|
||
:current-page="pageForm.pageNumber"
|
||
:page-size="pageForm.pageSize"
|
||
:page-sizes="[10, 20, 30, 50]"
|
||
:total="pageForm.totalCount"
|
||
@current-change="pageNumberChange"
|
||
@size-change="pageSizeChange"
|
||
layout="total, sizes, prev, pager, next">
|
||
</el-pagination>
|
||
</el-row>
|
||
|
||
</el-card>
|
||
|
||
<template #view>
|
||
|
||
<el-row style="padding: 50px 150px">
|
||
|
||
<el-form label-position="right" label-width="120px" style="padding: 20px 0">
|
||
<vi-title title="个人信息"></vi-title>
|
||
<el-row gutter="20">
|
||
<el-col :span="12">
|
||
<el-form-item label="工号:">
|
||
{{viewData.loginname}}
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="姓名:">
|
||
{{viewData.username}}
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="职务:">
|
||
{{viewData.zw}}
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="人事编制:">
|
||
{{viewData.rsbz}}
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="性别:">
|
||
{{viewData.sex}}
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="年龄:">
|
||
{{viewData.age}}
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="所在单位:">
|
||
{{viewData.unitname}}
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="手机号:">
|
||
{{viewData.mobile}}
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<vi-title title="曾获荣誉"></vi-title>
|
||
<el-table :data="viewData.chry" show-header="false" size="mini" style="width: 100%">
|
||
<el-table-column align="center" header-align="center" label="获得时间" prop="hdsj"
|
||
width="250px">
|
||
<template slot-scope="{row}">
|
||
<el-date-picker format="yyyy-MM-dd" readonly type="date"
|
||
v-model="row.hdsj"></el-date-picker>
|
||
</template>
|
||
</el-table-column>
|
||
|
||
<el-table-column align="center" header-align="center" label="曾获荣誉" prop="shry">
|
||
<template slot-scope="{row}">
|
||
<el-input readonly v-model="row.shry"></el-input>
|
||
</template>
|
||
</el-table-column>
|
||
|
||
<el-table-column align="center" header-align="center" label="附件" width="120px">
|
||
<template slot-scope="{row}">
|
||
<div @click="dd3s.download(row.filepath,row.filename)"
|
||
class="file-down-span">
|
||
<i class="el-icon-download"></i>
|
||
</div>
|
||
<el-image :src="'${AppFileDomain!}'+row.filepath" @click="dd3s.showpic(row.filepath)"
|
||
fit="cover"
|
||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||
v-if="dd3s.isPic(row.filepath)">
|
||
</el-image>
|
||
<el-image src="***"
|
||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||
v-else>
|
||
<div class="image-slot" slot="error"
|
||
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
|
||
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
|
||
text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical">{{row.filename}}</span>
|
||
</div>
|
||
</el-image>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
<template v-if="viewData.files&&viewData.files.length">
|
||
<vi-title title="身份证复印件"></vi-title>
|
||
<div style="text-align: left;">
|
||
<div style="display: inline-block;width: 100px;margin-right:10px"
|
||
v-for="item in viewData.files">
|
||
<div @click="dd3s.download(item.filepath,item.filename)"
|
||
class="file-down-span">
|
||
<i class="el-icon-download"></i>
|
||
</div>
|
||
<el-image :src="'${AppFileDomain!}'+item.filepath" @click="dd3s.showpic(item.filepath)"
|
||
fit="cover"
|
||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||
v-if="dd3s.isPic(item.filepath)">
|
||
</el-image>
|
||
<el-image src="***"
|
||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||
v-else>
|
||
<div class="image-slot" slot="error"
|
||
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
|
||
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
|
||
text-overflow: ellipsis;
|
||
display: -webkit-box;
|
||
-webkit-line-clamp: 2;
|
||
-webkit-box-orient: vertical">{{item.filename}}</span>
|
||
</div>
|
||
</el-image>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
</el-form>
|
||
</el-row>
|
||
</template>
|
||
|
||
</guava>
|
||
|
||
|
||
</div>
|
||
|
||
<script>
|
||
var vue = new Vue({
|
||
el: '#app',
|
||
data() {
|
||
return {
|
||
tableData: [],
|
||
viewData: [],
|
||
lxyHd: [],
|
||
ghList: [],
|
||
personForm: {
|
||
pageNumber: 1,
|
||
pageSize: 10,
|
||
},
|
||
pageForm: {
|
||
hdid: "",
|
||
year: "",
|
||
ghid: "",
|
||
searchKey: "",
|
||
pageNumber: 1,
|
||
pageSize: 10,
|
||
totalCount: 0,
|
||
},
|
||
pickerOptions: {
|
||
disabledDate(time) {
|
||
return (
|
||
time.getFullYear() > new Date().getFullYear()
|
||
);
|
||
}
|
||
},
|
||
tabLoading: false,
|
||
personLoading: false,
|
||
v: "index",
|
||
|
||
}
|
||
},
|
||
methods: {
|
||
doExport() {
|
||
let obj = this.lxyHd.find(o => {
|
||
return o.id === this.pageForm.hdid
|
||
})
|
||
this.$confirm('确定要导出' + obj.name + '人员名单吗?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
}).then(async () => {
|
||
window.location.href = '/platform/zgfw/lxy/hdtj/doExport?hdid=' + this.pageForm.hdid + '&ghid=' + this.pageForm.ghid + '&hdname=' + obj.name
|
||
})
|
||
},
|
||
|
||
pageData() {
|
||
sublime.showLoadingbar();
|
||
this.tabLoading = true
|
||
$.post(base + "/platform/zgfw/lxy/hdtj/pageData", this.pageForm, (res) => {
|
||
let {code, data, msg} = res
|
||
sublime.closeLoadingbar();
|
||
this.tabLoading = false
|
||
if (code == 0) {
|
||
data.list.map(v => {
|
||
v.chry = JSON.parse(v.chry).map(x => {
|
||
return x.shry
|
||
}).join(",")
|
||
})
|
||
this.tableData = data.list;
|
||
this.pageForm.totalCount = data.totalCount;
|
||
} else {
|
||
this.$message({
|
||
message: msg,
|
||
type: 'error'
|
||
});
|
||
}
|
||
}, "json");
|
||
},
|
||
async getLxyHd() {
|
||
await $.get("/platform/zgfw/lxy/hdtj/getLxyHd", {year: this.pageForm.year}).then(res => {
|
||
if (res.data.length != 0) {
|
||
this.lxyHd = res.data
|
||
this.pageForm.hdid = this.lxyHd[0].id
|
||
} else {
|
||
this.lxyHd = []
|
||
this.pageForm.hdid = ""
|
||
}
|
||
})
|
||
},
|
||
async getLxyBmInfo(id) {
|
||
const {data} = await $.get(base + "/platform/zgfw/lxy/fghsh/getBmInfo", {id})
|
||
return data
|
||
},
|
||
async openView(row) {
|
||
this.v = "view"
|
||
this.$refs.guava.view()
|
||
this.viewData = await this.getLxyBmInfo(row.id)
|
||
this.viewData.unitname = row.unitname
|
||
},
|
||
|
||
doSearch() {
|
||
this.pageData()
|
||
},
|
||
pageNumberChange(val) {//页码更新操作
|
||
this.pageForm.pageNumber = val;
|
||
this.pageData();
|
||
},
|
||
pageSizeChange(val) {//分页大小更新操作
|
||
this.pageForm.pageSize = val;
|
||
this.pageData();
|
||
},
|
||
async hdSearch() {
|
||
await this.getLxyHd()
|
||
},
|
||
},
|
||
async created() {
|
||
this.pageForm.year = new Date().getFullYear() + ""
|
||
await this.getLxyHd()
|
||
this.ghList = await getUnions()
|
||
this.pageData()
|
||
}
|
||
})
|
||
</script>
|
||
<!--#
|
||
}
|
||
#--> |