first commit
This commit is contained in:
@@ -0,0 +1,343 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" clearable style="width: 100%"
|
||||
@change="flushUnits">
|
||||
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select placeholder="请选择所属单位" v-model="pageForm.unitId"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in unitOptions" :label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="进校时长">
|
||||
<el-input placeholder="请输入进校时长" clearable v-model="pageForm.teachNum"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="办证年份">
|
||||
<el-date-picker
|
||||
format="yyyy"
|
||||
value-format="yyyy"
|
||||
v-model="pageForm.thirtyCertificateProcessingTime"
|
||||
type="year"
|
||||
placeholder="请选择荣誉证办理办证年份"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="在职状态">
|
||||
<dict-select v-model="pageForm.userState" style="width: 100%"
|
||||
clearable
|
||||
placeholder="人员类型"
|
||||
code="USER_STATE"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="人员类型">
|
||||
<dict-select v-model="pageForm.personType" style="width: 100%"
|
||||
clearable
|
||||
placeholder="人员类型"
|
||||
code="USER_PERSON_TYPE"></dict-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="教职工管理">
|
||||
<el-button size="small" @click="batchDelete" type="primary">
|
||||
批量删除
|
||||
</el-button>
|
||||
|
||||
<el-button size="small" @click="setThirtyTeach" type="primary">
|
||||
一键设置
|
||||
</el-button>
|
||||
|
||||
<el-button size="small" @click="openImport" type="primary">
|
||||
导入
|
||||
</el-button>
|
||||
|
||||
<el-button size="small" @click="doExport" type="primary">
|
||||
导出
|
||||
</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table"
|
||||
@selection-change="tableHandleSelectionChange">
|
||||
<el-table-column type="selection" :reserve-selection="true"></el-table-column>
|
||||
<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
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:key="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template v-if="column.prop==='member'" v-slot="{row}">
|
||||
<span v-if="row.member==1" class="text-success ">
|
||||
<i class="fa fa-circle ml5"></i> 是
|
||||
</span>
|
||||
<span v-else class="text-danger">
|
||||
<i class="fa fa-circle ml5"></i> 否
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="column.prop==='thirtyCertificateProcessingTime'" v-slot="{row}">
|
||||
<span v-if="row.isEditThirtyCertificateProcessingTime">
|
||||
<el-date-picker
|
||||
style="width: 100%;"
|
||||
v-model="row.thirtyCertificateProcessingTime"
|
||||
type="month"
|
||||
placeholder="选择日期时间"
|
||||
@change="rowThirtyCertificateProcessingTimeChange(row)"
|
||||
value-format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
|
||||
</span>
|
||||
<span v-else>
|
||||
{{row.thirtyCertificateProcessingTime}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作"
|
||||
width="180px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="primary"
|
||||
@click="row.isEditThirtyCertificateProcessingTime=1">编辑
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<file-import ref="viewImport" temp_url="/platform/thirtyTeach/manage/downloadImportTemp"
|
||||
post_url="/platform/thirtyTeach/manage/doImport" is_show_radio
|
||||
@flush="pageData()"
|
||||
></file-import>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-diaLog title="一键设置" :visible.sync="setThirtyTeachVisible" :close-on-click-modal="false" width="50%">
|
||||
|
||||
<el-form label-width="120px">
|
||||
<el-form-item label="设置年限">
|
||||
<el-input placeholder="请输入要设置的年限" v-model="setThirtyTeachData.setNum" type="number"
|
||||
style="width: 80%"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="更新模式">
|
||||
<el-radio-group v-model="setThirtyTeachData.isFlag">
|
||||
<el-radio-button label="true">清空更新</el-radio-button>
|
||||
<el-radio-button label="false">追加</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
<div style="text-align: right">
|
||||
<span>
|
||||
<el-button @click="setThirtyTeachVisible = false">关 闭</el-button>
|
||||
<el-button type="primary" @click="doSet">确定</el-button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</el-diaLog>
|
||||
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号', sortable: true},
|
||||
{prop: 'username', label: '姓名', sortable: true},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'teachNum', label: '进校时长(年)', sortable: true},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'member', label: '是否会员', sortable: true},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'thirtyCertificateProcessingTime', label: '《30年教龄荣誉证》办理年月', width: 200},
|
||||
],
|
||||
|
||||
setThirtyTeachVisible: false,
|
||||
setThirtyTeachData: {
|
||||
setNum: 30,
|
||||
isFlag: false
|
||||
},
|
||||
checkUsers: [],
|
||||
pageForm: {
|
||||
searchKeyword: '',
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
personType: '',
|
||||
userState: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
rowThirtyCertificateProcessingTimeChange(row) {
|
||||
row.isEditThirtyCertificateProcessingTime = false
|
||||
this.$axios.post('/platform/thirtyTeach/manage/doEditThirtyCertificateProcessingTime', {
|
||||
thirtyCertificateProcessingTime: row.thirtyCertificateProcessingTime,
|
||||
id: row.id,
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
|
||||
},
|
||||
openImport() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.viewImport.resetImportData()
|
||||
})
|
||||
|
||||
},
|
||||
doExport() {
|
||||
const {searchKeyword, unionId, unitId, personType, userState} = this.pageForm
|
||||
window.open('/platform/thirtyTeach/manage/doExport?searchKeyword=' + searchKeyword + '&unionId=' + unionId + '&unitId=' + unitId +
|
||||
'&personType=' + personType + '&userState=' + userState)
|
||||
},
|
||||
doSet() {
|
||||
if (!this.setThirtyTeachData.setNum) {
|
||||
this.notifyWarning("请填写年限!!!")
|
||||
return
|
||||
}
|
||||
this.$axios.post('/platform/thirtyTeach/manage/setThirtyTeach', {
|
||||
setNum: this.setThirtyTeachData.setNum,
|
||||
isFlag: this.setThirtyTeachData.isFlag,
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.setThirtyTeachVisible = false
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
tableHandleSelectionChange(val) {
|
||||
this.checkUsers = val;
|
||||
},
|
||||
async batchDelete() {
|
||||
if (!this.checkUsers.length) {
|
||||
this.notifyWarning("请先勾选需要删除的数据!!!")
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const userIds = this.checkUsers.map(obj => obj.id);
|
||||
this.$axios.post('/platform/thirtyTeach/manage/doBatchDelete', {
|
||||
userIds: JSON.stringify(userIds)
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
setThirtyTeach() {
|
||||
this.setThirtyTeachData = {
|
||||
setNum: 30,
|
||||
isFlag: false
|
||||
}
|
||||
this.setThirtyTeachVisible = true
|
||||
},
|
||||
openView() {
|
||||
},
|
||||
async doDelete(userId) {
|
||||
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
this.$axios.post('/platform/thirtyTeach/manage/doBatchDelete', {
|
||||
userIds: JSON.stringify([userId])
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.unitList = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
|
||||
this.unitOptions = data
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会"
|
||||
clearable style="width: 100%" @change="flushUnits">
|
||||
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select placeholder="请选择所属单位" v-model="pageForm.unitId"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in unitOptions" :label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="教职工汇总">
|
||||
<el-button size="small" @click="doExportSummary" type="primary">
|
||||
导出汇总表
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder" show-summary
|
||||
v-loading="tableLoading" :size="tableSize" 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
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '分工会名称', sortable: true},
|
||||
{prop: 'userNum', label: '在职人数', sortable: true},
|
||||
],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doExportSummary(){
|
||||
const {unionId, unitId} = this.pageForm
|
||||
window.open(loc() + '/doExportSummary?unionId=' + unionId + '&unitId=' + unitId)
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$axios.post(loc() + '/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
},
|
||||
flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.unitList = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
|
||||
this.unitOptions = data
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user