30教龄教职工管理:搜索栏改动从会员管理搬来综合查询的搜索项(性别,在职状态,教职工类别,编制类别;),保留平铺样式(单选改成多选);
This commit is contained in:
@@ -6,15 +6,17 @@ layout("/layouts/platform.html"){
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search :is-search-button="false">
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||
@input="searchChange"
|
||||
@clear="doSearch"
|
||||
style="width: 100%">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" clearable style="width: 100%"
|
||||
@change="flushUnits">
|
||||
@change="flushUnits(true)">
|
||||
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
@@ -23,6 +25,7 @@ layout("/layouts/platform.html"){
|
||||
<el-select placeholder="请选择所属单位" v-model="pageForm.unitId"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
@change="doSearch"
|
||||
filterable>
|
||||
<el-option v-for="item in unitOptions" :label="item.name"
|
||||
:value="item.id"
|
||||
@@ -32,7 +35,8 @@ layout("/layouts/platform.html"){
|
||||
<search-item label="进校时长">
|
||||
<el-input placeholder="请输入进校时长" clearable v-model="pageForm.teachNum"
|
||||
style="width: 100%"
|
||||
@input="pageForm.teachYearTag = ''"
|
||||
@input="teachNumInput"
|
||||
@clear="doSearch"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
@@ -42,6 +46,7 @@ layout("/layouts/platform.html"){
|
||||
type="date"
|
||||
placeholder="请选择截止日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="doSearch"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
<div v-if="pageForm.deadlineDate && pageForm.deadlineDate !== currentDate"
|
||||
@@ -57,22 +62,112 @@ layout("/layouts/platform.html"){
|
||||
v-model="pageForm.thirtyCertificateProcessingTime"
|
||||
type="year"
|
||||
placeholder="请选择荣誉证办理办证年份"
|
||||
@change="doSearch"
|
||||
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>
|
||||
<div class="thirty-query-rows">
|
||||
<div class="thirty-query-row">
|
||||
<div class="thirty-query-title">性别:</div>
|
||||
<div class="thirty-query-content">
|
||||
<el-tag
|
||||
:effect="pageForm.sexTypes.includes(item.name) ? 'dark' : 'plain'"
|
||||
:key="item.code"
|
||||
@click="tagClick('sexTypes', item.name)"
|
||||
v-for="item in sexTypeOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="thirty-query-row">
|
||||
<div class="thirty-query-title">在职状态:</div>
|
||||
<div class="thirty-query-content">
|
||||
<el-tag
|
||||
:effect="pageForm.userStates.includes(item.name) ? 'dark' : 'plain'"
|
||||
:key="item.code"
|
||||
@click="tagClick('userStates', item.name)"
|
||||
v-for="item in userStateOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
<el-link type="danger"
|
||||
v-if="userStateOptions.length && pageForm.userStates.length"
|
||||
:underline="false"
|
||||
@click="pageForm.userStates = []; doSearch()">清空
|
||||
</el-link>
|
||||
<el-link :underline="false"
|
||||
v-if="userStateOptions.length"
|
||||
@click="pageForm.userStates = userStateOptions.map(p => p.name); doSearch()"
|
||||
type="success">全部
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div class="thirty-query-row">
|
||||
<div class="thirty-query-title">教职工类别:</div>
|
||||
<div class="thirty-query-content">
|
||||
<el-tag
|
||||
:effect="pageForm.personTypes.includes(item.name) ? 'dark' : 'plain'"
|
||||
:key="item.code"
|
||||
@click="tagClick('personTypes', item.name)"
|
||||
v-for="item in personTypeOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
<el-link type="danger"
|
||||
v-if="personTypeOptions.length && pageForm.personTypes.length"
|
||||
:underline="false"
|
||||
@click="pageForm.personTypes = []; doSearch()">清空
|
||||
</el-link>
|
||||
<el-link :underline="false"
|
||||
v-if="personTypeOptions.length"
|
||||
@click="pageForm.personTypes = personTypeOptions.map(p => p.name); doSearch()"
|
||||
type="success">全部
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div class="thirty-query-row">
|
||||
<div class="thirty-query-title">编制类别:</div>
|
||||
<div class="thirty-query-content">
|
||||
<el-tag
|
||||
:effect="pageForm.preparedBys.includes(item.name) ? 'dark' : 'plain'"
|
||||
:key="item.code"
|
||||
@click="tagClick('preparedBys', item.name)"
|
||||
v-for="item in preparedByOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
<el-link type="danger"
|
||||
v-if="preparedByOptions.length && pageForm.preparedBys.length"
|
||||
:underline="false"
|
||||
@click="pageForm.preparedBys = []; doSearch()">清空
|
||||
</el-link>
|
||||
<el-link :underline="false"
|
||||
v-if="preparedByOptions.length"
|
||||
@click="pageForm.preparedBys = preparedByOptions.map(p => p.name); doSearch()"
|
||||
type="success">全部
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div class="thirty-query-row">
|
||||
<div class="thirty-query-title">入校时间:</div>
|
||||
<div class="thirty-query-content">
|
||||
<el-date-picker
|
||||
v-model="pageForm.arrivalAtSchoolDateStart"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="arrivalAtSchoolDateChange"
|
||||
placeholder="选择开始日期">
|
||||
</el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="pageForm.arrivalAtSchoolDateEnd"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="arrivalAtSchoolDateChange"
|
||||
placeholder="选择结束日期">
|
||||
</el-date-picker>
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="doReset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
@@ -236,6 +331,13 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
personTypeOptions: [],
|
||||
preparedByOptions: [],
|
||||
userStateOptions: [],
|
||||
sexTypeOptions: [
|
||||
{code: "男", name: "男"},
|
||||
{code: "女", name: "女"}
|
||||
],
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号', sortable: true},
|
||||
{prop: 'username', label: '姓名', sortable: true},
|
||||
@@ -258,6 +360,7 @@ layout("/layouts/platform.html"){
|
||||
deadlineDate: '',
|
||||
isFlag: false
|
||||
},
|
||||
searchTimer: null,
|
||||
checkUsers: [],
|
||||
pageForm: {
|
||||
searchKeyword: '',
|
||||
@@ -265,6 +368,14 @@ layout("/layouts/platform.html"){
|
||||
unitId: '',
|
||||
personType: '',
|
||||
userState: '',
|
||||
teachNum: '',
|
||||
thirtyCertificateProcessingTime: '',
|
||||
sexTypes: [],
|
||||
personTypes: [],
|
||||
userStates: [],
|
||||
preparedBys: [],
|
||||
arrivalAtSchoolDateStart: '',
|
||||
arrivalAtSchoolDateEnd: '',
|
||||
teachYearTag: '',
|
||||
deadlineDate: ''
|
||||
},
|
||||
@@ -297,18 +408,97 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
|
||||
},
|
||||
searchChange() {
|
||||
if (this.searchTimer) {
|
||||
clearTimeout(this.searchTimer)
|
||||
}
|
||||
this.searchTimer = setTimeout(() => {
|
||||
this.doSearch()
|
||||
}, 300)
|
||||
},
|
||||
doSearch() {
|
||||
if (this.searchTimer) {
|
||||
clearTimeout(this.searchTimer)
|
||||
this.searchTimer = null
|
||||
}
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
teachNumInput() {
|
||||
this.$set(this.pageForm, "teachYearTag", "")
|
||||
this.searchChange()
|
||||
},
|
||||
doReset() {
|
||||
if (this.searchTimer) {
|
||||
clearTimeout(this.searchTimer)
|
||||
}
|
||||
this.pageForm.searchKeyword = ''
|
||||
this.pageForm.unionId = ''
|
||||
this.pageForm.unitId = ''
|
||||
this.pageForm.personType = ''
|
||||
this.pageForm.userState = ''
|
||||
this.pageForm.sexTypes = []
|
||||
this.pageForm.personTypes = []
|
||||
this.pageForm.userStates = []
|
||||
this.pageForm.preparedBys = []
|
||||
this.pageForm.arrivalAtSchoolDateStart = ''
|
||||
this.pageForm.arrivalAtSchoolDateEnd = ''
|
||||
this.pageForm.teachNum = ''
|
||||
this.pageForm.teachYearTag = ''
|
||||
this.pageForm.deadlineDate = this.currentDate
|
||||
this.pageForm.thirtyCertificateProcessingTime = ''
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
this.doSearch()
|
||||
},
|
||||
getSearchPageForm() {
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.sexTypes = JSON.stringify(this.pageForm.sexTypes)
|
||||
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
|
||||
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
|
||||
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
|
||||
return pageForm
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
this.$axios.post(loc() + "/pageData", this.getSearchPageForm()).then((res) => {
|
||||
this.tableLoading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
doExport() {
|
||||
const {
|
||||
searchKeyword,
|
||||
unionId,
|
||||
unitId,
|
||||
personType,
|
||||
userState,
|
||||
deadlineDate,
|
||||
teachYearTag
|
||||
} = this.pageForm
|
||||
window.open('/platform/thirtyTeach/manage/doExport?searchKeyword=' + searchKeyword + '&unionId=' + unionId + '&unitId=' + unitId +
|
||||
'&personType=' + personType + '&userState=' + userState + '&deadlineDate=' + deadlineDate + '&teachYearTag=' + teachYearTag)
|
||||
const pageForm = this.getSearchPageForm()
|
||||
const params = []
|
||||
Object.keys(pageForm).forEach(key => {
|
||||
const value = pageForm[key]
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach(v => params.push(key + '=' + encodeURIComponent(v || '')))
|
||||
} else {
|
||||
params.push(key + '=' + encodeURIComponent(value || ''))
|
||||
}
|
||||
})
|
||||
window.open('/platform/thirtyTeach/manage/doExport?' + params.join('&'))
|
||||
},
|
||||
tagClick(key, val) {
|
||||
const idx = this.pageForm[key].indexOf(val)
|
||||
if (idx !== -1) {
|
||||
this.pageForm[key].splice(idx, 1)
|
||||
} else {
|
||||
this.pageForm[key].push(val)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
arrivalAtSchoolDateChange() {
|
||||
if (this.pageForm.arrivalAtSchoolDateStart && this.pageForm.arrivalAtSchoolDateEnd &&
|
||||
Date.parse(this.pageForm.arrivalAtSchoolDateStart) > Date.parse(this.pageForm.arrivalAtSchoolDateEnd)) {
|
||||
this.$set(this.pageForm, "arrivalAtSchoolDateEnd", "")
|
||||
this.notifyWarning("结束时间不能小于开始时间")
|
||||
return
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
selectTeachYearTag(value) {
|
||||
if (this.pageForm.teachYearTag === value) {
|
||||
@@ -395,13 +585,20 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
}
|
||||
},
|
||||
flushUnits() {
|
||||
flushUnits(isSearch) {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.unitList = []
|
||||
this.unitOptions = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
|
||||
this.unitOptions = data
|
||||
})
|
||||
} else {
|
||||
this.$businessTool.listUnit().then((data) => {
|
||||
this.unitOptions = data
|
||||
})
|
||||
}
|
||||
if (isSearch) {
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -410,11 +607,54 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.setThirtyTeachData, "deadlineDate", this.currentDate)
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
this.$businessTool.getDictOptions("USER_PERSON_TYPE").then((data) => (this.personTypeOptions = data))
|
||||
this.$businessTool.getDictOptions("USER_PREPARED_BY_TYPE").then((data) => (this.preparedByOptions = data))
|
||||
this.$businessTool.getDictOptions("USER_STATE").then((data) => (this.userStateOptions = data))
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.thirty-query-rows {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.thirty-query-row {
|
||||
min-height: 46px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-top: 1px dashed #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.thirty-query-row:last-child {
|
||||
border-bottom: 1px dashed #e6e6e6;
|
||||
}
|
||||
|
||||
.thirty-query-title {
|
||||
width: 90px;
|
||||
flex: 0 0 90px;
|
||||
}
|
||||
|
||||
.thirty-query-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 6px 10px;
|
||||
}
|
||||
|
||||
.thirty-query-content .el-tag {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.thirty-query-content .el-date-editor {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
Reference in New Issue
Block a user