This commit is contained in:
=
2026-05-21 10:02:41 +08:00
parent 9bd1e865b9
commit 416847b279
33 changed files with 1943 additions and 403 deletions
@@ -25,6 +25,9 @@ const flowMixins = {
console.log(this.$refs)
console.log(this.$refs.guava)
// 首页待办已完成页面跳转,自动定位待办详情逻辑暂未启用时,及时关闭加载动画避免页面卡住
loading.close();
// this.oepnAudit({})
//
//
@@ -10,12 +10,12 @@ layout("/layouts/platform.html"){
<table-tool label="子女信息"></table-tool>
<el-descriptions :column="2" border>
<el-descriptions-item label="就读年级">
<el-form-item prop="childRelationship">
<dict-select v-model="formData.childRelationship" code="CHILD_MANAGE_GRADE" style="width: 100%" placeholder="请选择就读年级">
<el-form-item prop="childrenGrade">
<dict-select v-model="formData.childrenGrade" code="CHILD_MANAGE_GRADE" style="width: 100%" placeholder="请选择就读年级">
</dict-select>
</el-form-item></el-descriptions-item>
<el-descriptions-item label="入学年份">
<el-form-item prop="childrenBirthday">
<el-form-item prop="childrenYear">
<el-date-picker
v-model="formData.childrenYear"
type="year"
@@ -146,7 +146,7 @@ layout("/layouts/platform.html"){
bizId: GetQueryString("bizId"),
formData: {},
formRules: {
childRelationship: [{ required: true, message: '请选择就读年级', trigger: 'change' }],
childrenGrade: [{ required: true, message: '请选择就读年级', trigger: 'change' }],
childrenYear: [{ required: true, message: '请选择入学年份', trigger: 'change' }],
childrenName: [{ required: true, message: '请输入子女姓名', trigger: 'blur' }],
childrenIdCard: [{ required: true, message: '请输入子女身份证号', trigger: 'blur' }, {pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的身份证号码', trigger: 'blur'}],
@@ -220,6 +220,7 @@ layout("/layouts/platform.html"){
unionId: union.id,
mobile: mobile,
// 自动填充监护人1信息
guardianUserId1: id,
guardianUserName1: username,
guardianLoginName1: loginname,
guardianMobile1: mobile,
@@ -21,8 +21,8 @@ const INFO = {
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
<el-descriptions-item label="党政职务">{{ viewData.position }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitname }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionname }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
@@ -51,26 +51,26 @@ const INFO = {
<el-descriptions-item></el-descriptions-item>
<!-- <template v-if="viewData.loginname == $store.state.user.loginname">-->
<template>
<template v-if="viewData.loginname == $store.state.user.loginname">
<el-descriptions-item label="家庭主要成员" :span="3">
<el-table v-if="viewData.families&&viewData.families.length"
:data="viewData.families" size="mini" border
:header-cell-style="{background:'#eff3f6'}"
style="width: 100%">
<el-table-column prop="relation" label="与本人关系" align="center"
<el-table-column prop="relation" label="关系" align="center"
header-align="center">
</el-table-column>
<el-table-column prop="name" label="姓名" align="center" header-align="center">
</el-table-column>
<el-table-column prop="unit" label="单位" align="center" header-align="center">
<el-table-column prop="unit" label="工作单位" align="center" header-align="center">
</el-table-column>
<el-table-column prop="remark" label="备注" align="center" header-align="center">
</el-table-column>
</el-table>
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<template slot="label">个人简况</template>
<el-descriptions-item label="个人简历" :span="3">
<template slot="label">个人简历</template>
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
<span v-else>无数据</span>
</el-descriptions-item>
@@ -15,8 +15,8 @@ const MEMBER_ALL_CHANGE_INFO = {
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
<el-descriptions-item label="党政职务">{{ viewData.position }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitname }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionname }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
@@ -56,7 +56,7 @@ const MEMBER_ALL_CHANGE_INFO = {
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<template slot="label">个人简况</template>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
<span v-else>无数据</span>
</el-descriptions-item>
</template>
@@ -350,9 +350,11 @@ const MEMBER_CHANGE = {
},
methods: {
getUnionName(val){
debugger
const data = this.units.find(v => v.id === val)
this.$set(this.formData, 'unionName', data ? data.unionName : '')
// 选择工作单位后,同步保存单位名称和所属工会信息,避免变更记录快照不一致。
this.$set(this.formData, 'unitName', data ? data.name : null)
this.$set(this.formData, 'unionId', data ? (data.unionId || data.unionid) : null)
this.$set(this.formData, 'unionName', data ? (data.unionName || data.unionname) : '')
},
allowFields(prop) {
return !this.allowChangeFields.map(v => v.code).includes(prop)
@@ -74,7 +74,7 @@ layout("/layouts/platform.html"){
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
{ prop: "applyDateTime", label: "申请时间", sortable: true },
{ prop: "curTaskName", label: "当前节点"},
{ prop: "taskName", label: "当前节点"},
{ prop: "instanceState", label: "流程状态"}
],
changeTypeData: [],
@@ -428,7 +428,10 @@
},
getUnionName(val){
const data = this.units.find(v => v.id === val)
this.$set(this.formData, 'unionName', data ? data.unionname : '')
// 选择工作单位后,同步保存单位名称和所属工会信息,避免变更记录快照不一致。
this.$set(this.formData, 'unitName', data ? data.name : null)
this.$set(this.formData, 'unionId', data ? (data.unionId || data.unionid) : null)
this.$set(this.formData, 'unionName', data ? (data.unionName || data.unionname) : '')
},
allowFields(prop) {
return !this.allowChangeFields.map(v => v.code).includes(prop)
@@ -427,7 +427,10 @@ layout("/layouts/platform.html"){
// 获取表单工会名称
getUnionName(val){
const data = this.units.find(v => v.id === val)
this.$set(this.formData, 'unionName', data ? data.unionName : '')
// 选择工作单位后,同步保存单位名称和所属工会信息,避免变更记录快照不一致。
this.$set(this.formData, 'unitName', data ? data.name : null)
this.$set(this.formData, 'unionId', data ? (data.unionId || data.unionid) : null)
this.$set(this.formData, 'unionName', data ? (data.unionName || data.unionname) : '')
},
// 获取表单可编辑的字段信息
allowFields(prop) {
@@ -14,8 +14,8 @@
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
<el-descriptions-item label="党政职务">{{ viewData.position }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitname }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionname }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
@@ -54,7 +54,7 @@
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<template slot="label">个人简况</template>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
<span v-else>无数据</span>
</el-descriptions-item>
</el-descriptions>
@@ -0,0 +1,136 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" class="platform" v-cloak>
<guava ref="guava" padding="0 5%">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="请选择年度"
style="width: 100%"
@change="yearChange"></el-date-picker>
</search-item>
<search-item label="任务名称">
<el-select v-model="pageForm.checkTaskId"
clearable
filterable
placeholder="请选择任务"
style="width: 100%"
@change="doSearch">
<el-option v-for="item in taskOptions"
:key="item.id"
:label="item.taskName"
:value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="所属工会">
<el-select v-model="pageForm.unionId"
clearable
filterable
placeholder="请选择所属工会"
style="width: 100%"
@change="doSearch">
<el-option v-for="item in unions"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="工会确认情况统计"></table-tool>
<el-table :data="tableData"
:size="tableSize"
row-key="unionId"
style="width: 100%"
v-loading="tableLoading"
ref="table"
class="vi-table">
<el-table-column type="index" :index="indexMethod" label="序号" width="80px" align="center" header-align="center"></el-table-column>
<el-table-column prop="unionName" label="工会名称" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="totalCount" label="总人数" align="center" header-align="center"></el-table-column>
<el-table-column prop="confirmedCount" label="已确认人数" align="center" header-align="center"></el-table-column>
<el-table-column prop="unconfirmedCount" label="未确认人数" align="center" header-align="center"></el-table-column>
<el-table-column prop="completeStatus" label="确认完成状态" align="center" header-align="center"></el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
data() {
return {
pageForm: {
year: moment().format("YYYY"),
checkTaskId: "",
unionId: ""
},
unions: [],
taskOptions: []
}
},
methods: {
yearChange() {
return $.get("/platform/member/check/confirm/listEnabledTask", {year: this.pageForm.year}).then((resp) => {
if (resp.code === 0) {
this.taskOptions = resp.data || []
if (this.taskOptions.length > 0 && !this.pageForm.checkTaskId) {
this.$set(this.pageForm, "checkTaskId", this.taskOptions[0].id)
}
if (this.taskOptions.length === 0) {
this.$set(this.pageForm, "checkTaskId", "")
}
this.doSearch()
} else {
this.notifyError(resp.msg)
}
})
},
pageData() {
if (!this.pageForm.year || !this.pageForm.checkTaskId) {
this.tableData = []
this.$set(this.pageForm, "totalCount", 0)
return Promise.resolve()
}
this.tableLoading = true
return $.post("/platform/member/check/confirm/pageData", this.pageForm).then((resp) => {
if (resp.code === 0) {
this.tableData = resp.data.list || []
this.$set(this.pageForm, "totalCount", resp.data.totalCount || 0)
} else {
this.notifyError(resp.msg)
}
}).always(() => {
this.tableLoading = false
})
},
doSearch() {
this.$set(this.pageForm, "pageNumber", 1)
return this.pageData()
}
},
created() {
this.$businessTool.listUnion().then((res) => {
this.unions = res
if (!this.pageForm.unionId && this.unions && this.unions.length === 1) {
this.$set(this.pageForm, "unionId", this.unions[0].id)
}
})
this.yearChange()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,513 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" class="platform" v-cloak>
<guava ref="guava" padding="0 5%">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="请选择年度"
style="width: 100%"
@change="yearChange"></el-date-picker>
</search-item>
<search-item label="任务名称">
<el-select v-model="pageForm.checkTaskId"
placeholder="请选择任务"
clearable
filterable
style="width: 100%"
@change="doSearch">
<el-option v-for="item in taskOptions"
:key="item.id"
:label="item.taskName"
:value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="姓名/工号">
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入姓名或工号"></el-input>
</search-item>
<search-item label="所属工会" v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
<el-select v-model="pageForm.unionIds"
placeholder="请选择所属工会"
clearable
filterable
style="width: 100%"
@change="flushUnits"
@clear="flushUnits">
<el-option v-for="item in unions"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select v-model="pageForm.unitIds"
placeholder="请选择所属单位"
clearable
filterable
multiple
collapse-tags
style="width: 100%">
<el-option v-for="item in units"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="确认状态">
<el-select v-model="pageForm.audit" placeholder="请选择确认状态" clearable style="width: 100%">
<el-option label="已确认" :value="true"></el-option>
<el-option label="未确认" :value="false"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="人员名单">
<el-button type="primary" size="small" @click="openImport">导入名单</el-button>
<el-button type="primary" size="small" @click="openAddUser">添加人员</el-button>
<el-button type="primary" size="small" @click="exportData">导出</el-button>
<el-button type="primary" size="small" :disabled="!pageForm.checkTaskId" @click="doAuditByUnion(true)">按工会确认</el-button>
<el-button type="danger" size="small" :disabled="!pageForm.checkTaskId" @click="doAuditByUnion(false)">按工会取消确认</el-button>
<el-button type="primary" size="small" :disabled="selectedIds.length === 0" @click="doConfirmSelected(true)">勾选确认</el-button>
<el-button type="danger" size="small" :disabled="selectedIds.length === 0" @click="doConfirmSelected(false)">勾选取消确认</el-button>
<el-button type="danger" size="small" :disabled="selectedIds.length === 0" @click="deleteSelected">批量删除</el-button>
</table-tool>
<el-table :data="tableData"
style="width: 100%"
row-key="id"
:size="tableSize"
v-loading="tableLoading"
@selection-change="handleSelectionChange"
@sort-change="pageOrder"
ref="table"
class="vi-table">
<el-table-column type="selection" width="55" align="center" header-align="center"></el-table-column>
<el-table-column type="index" :index="indexMethod" label="序号" width="80px" align="center" header-align="center"></el-table-column>
<el-table-column prop="loginname" label="工号" align="center" header-align="center"></el-table-column>
<el-table-column prop="username" label="姓名" align="center" header-align="center"></el-table-column>
<el-table-column prop="sex" label="性别" align="center" header-align="center"></el-table-column>
<el-table-column prop="unionName" label="所属工会" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="unitName" label="所属单位" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="taskName" label="任务名称" min-width="180px" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="mobile" label="手机号" align="center" header-align="center"></el-table-column>
<el-table-column prop="idCard" label="身份证号" min-width="170px" align="center" header-align="center"></el-table-column>
<el-table-column prop="branchUnionChecked" label="确认状态" align="center" header-align="center">
<template slot-scope="{row}">
<el-tag type="success" v-if="row.branchUnionChecked">已确认</el-tag>
<el-tag type="info" v-else>未确认</el-tag>
</template>
</el-table-column>
<el-table-column prop="auditTime" label="确认时间" min-width="160px" align="center" header-align="center"></el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
</guava>
<el-dialog title="添加人员" :visible.sync="addUserVisible" width="80%" :close-on-click-modal="false">
<el-card shadow="never">
<search @search="addUserDoSearch">
<search-item label="姓名">
<el-input v-model="addUserPageForm.userName" @keyup.enter.native="addUserDoSearch" clearable placeholder="请输入姓名"></el-input>
</search-item>
<search-item label="工号">
<el-input v-model="addUserPageForm.loginName" @keyup.enter.native="addUserDoSearch" clearable placeholder="请输入工号"></el-input>
</search-item>
<search-item label="性别">
<el-select v-model="addUserPageForm.sexTypes" clearable multiple collapse-tags placeholder="请选择性别" style="width: 100%">
<el-option label="男" value="男"></el-option>
<el-option label="女" value="女"></el-option>
</el-select>
</search-item>
<search-item label="出生开始">
<el-date-picker v-model="addUserPageForm.birthdayStartDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择出生开始"
style="width: 100%"></el-date-picker>
</search-item>
<search-item label="出生结束">
<el-date-picker v-model="addUserPageForm.birthdayEndDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择出生结束"
style="width: 100%"></el-date-picker>
</search-item>
<search-item label="所属工会" v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
<el-select v-model="addUserPageForm.unionIds"
clearable
filterable
placeholder="请选择所属工会"
style="width: 100%"
@change="addUserUnionChange"
@clear="addUserUnionChange">
<el-option v-for="item in addUserUnionOptions"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select v-model="addUserPageForm.unitIds"
clearable
filterable
multiple
collapse-tags
placeholder="请选择所属单位"
style="width: 100%">
<el-option v-for="item in addUserUnitOptions"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="人员类型">
<dict-select clearable
code="USER_PERSON_TYPE"
multiple
collapse-tags
placeholder="请选择人员类型"
v-model="addUserPageForm.personTypes"></dict-select>
</search-item>
<search-item label="在职状态">
<dict-select clearable
code="USER_STATE"
multiple
collapse-tags
placeholder="请选择人员状态"
v-model="addUserPageForm.userStates"></dict-select>
</search-item>
<search-item label="是否会员">
<el-select v-model="addUserPageForm.isMember" clearable placeholder="请选择是否会员" style="width: 100%">
<el-option label="是" :value="true"></el-option>
<el-option label="否" :value="false"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<el-table :data="addUserTableData"
:size="tableSize"
row-key="id"
v-loading="addUserTableLoading"
style="width: 100%">
<el-table-column type="index" :index="addUserIndexMethod" label="序号" width="80px" align="center"></el-table-column>
<el-table-column prop="loginname" label="工号" align="center" header-align="center"></el-table-column>
<el-table-column prop="username" label="姓名" align="center" header-align="center"></el-table-column>
<el-table-column prop="sex" label="性别" align="center" header-align="center"></el-table-column>
<el-table-column prop="birthday" label="出生日期" align="center" header-align="center"></el-table-column>
<el-table-column prop="personType" label="人员类型" align="center" header-align="center"></el-table-column>
<el-table-column prop="userState" label="在职状态" align="center" header-align="center"></el-table-column>
<el-table-column prop="unionName" label="所属工会" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="unitName" label="所属单位" align="center" header-align="center" show-overflow-tooltip></el-table-column>
</el-table>
<div class="mt10 text-right">
<el-pagination background
layout="total, sizes, prev, pager, next, jumper"
:current-page.sync="addUserPageForm.pageNumber"
:page-size.sync="addUserPageForm.pageSize"
:page-sizes="[10, 20, 50, 100]"
:total="addUserPageForm.totalCount || 0"
@size-change="addUserPageData"
@current-change="addUserPageData"></el-pagination>
</div>
</el-card>
<template slot="footer">
<el-button @click="addUserVisible=false">取消</el-button>
<el-button type="primary" @click="submitAddUser">确定</el-button>
</template>
</el-dialog>
<excel-import
ref="excelImportRef"
url="/platform/member/check/roster/importCheckUser"
template_url="/platform/member/check/roster/downloadTem"
:visible.sync="importVisible"
title="导入人员名单"
width="700px"
:extra_params="{checkTaskId:pageForm.checkTaskId}"
@import-success="doSearch"
></excel-import>
</div>
<script nonce="${cspNonce!}">
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
data() {
return {
pageForm: {
year: moment().format("YYYY"),
checkTaskId: "",
searchKeyword: "",
unionIds: "",
unitIds: [],
audit: null
},
unions: [],
units: [],
taskOptions: [],
selectedIds: [],
importVisible: false,
addUserVisible: false,
addUserTableLoading: false,
addUserTableData: [],
addUserUnionOptions: [],
addUserUnitOptions: [],
addUserPageForm: {}
}
},
methods: {
handleSelectionChange(rows) {
this.selectedIds = rows.map(function (item) {
return item.id
})
},
yearChange() {
return $.get("/platform/member/check/roster/listEnabledTask", {year: this.pageForm.year}).then((resp) => {
if (resp.code === 0) {
this.taskOptions = resp.data || []
if (this.taskOptions.length > 0 && !this.pageForm.checkTaskId) {
this.$set(this.pageForm, "checkTaskId", this.taskOptions[0].id)
}
if (this.taskOptions.length === 0) {
this.$set(this.pageForm, "checkTaskId", "")
}
this.doSearch()
} else {
this.notifyError(resp.msg)
}
})
},
pageData() {
this.tableLoading = true
return $.post("/platform/member/check/roster/pageData", {
pageForm: JSON.stringify(this.pageForm)
}).then((resp) => {
if (resp.code === 0) {
this.tableData = resp.data.list || []
this.$set(this.pageForm, "totalCount", resp.data.totalCount || 0)
this.selectedIds = []
} else {
this.notifyError(resp.msg)
}
}).always(() => {
this.tableLoading = false
})
},
doSearch() {
this.$set(this.pageForm, "pageNumber", 1)
return this.pageData()
},
flushUnits() {
this.$set(this.pageForm, "unitIds", [])
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
this.$businessTool.listUnit(this.pageForm.unionIds).then((res) => {
this.units = res
})
} else {
this.$businessTool.listUnit().then((res) => {
this.units = res
})
}
this.doSearch()
},
openImport() {
if (!this.pageForm.checkTaskId) {
this.notifyWarning("请先选择任务")
return
}
this.importVisible = true
},
resetAddUserPageForm() {
this.addUserPageForm = {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
checkTaskId: "",
userName: "",
loginName: "",
sexTypes: [],
birthdayStartDate: "",
birthdayEndDate: "",
unionIds: "",
unitIds: [],
personTypes: [],
userStates: [],
isMember: null
}
this.addUserTableData = []
},
openAddUser() {
if (!this.pageForm.checkTaskId) {
this.notifyWarning("请先选择任务")
return
}
this.resetAddUserPageForm()
this.$set(this.addUserPageForm, "checkTaskId", this.pageForm.checkTaskId)
this.addUserVisible = true
this.$businessTool.listUnion().then((res) => {
this.addUserUnionOptions = res
})
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
this.$businessTool.listUnit(this.addUserPageForm.unionIds).then((res) => {
this.addUserUnitOptions = res
})
} else {
this.$businessTool.listUnit().then((res) => {
this.addUserUnitOptions = res
})
}
this.addUserPageData()
},
addUserUnionChange() {
this.$set(this.addUserPageForm, "unitIds", [])
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
this.$businessTool.listUnit(this.addUserPageForm.unionIds).then((res) => {
this.addUserUnitOptions = res
})
}
},
addUserPageData() {
this.addUserTableLoading = true
return $.post("/platform/member/check/roster/notCheckUserPageData", {
pageForm: JSON.stringify(this.addUserPageForm)
}).then((resp) => {
if (resp.code === 0) {
this.addUserTableData = resp.data.list || []
this.$set(this.addUserPageForm, "totalCount", resp.data.totalCount || 0)
} else {
this.notifyError(resp.msg)
}
}).always(() => {
this.addUserTableLoading = false
})
},
addUserDoSearch() {
this.$set(this.addUserPageForm, "pageNumber", 1)
this.addUserPageData()
},
addUserIndexMethod(index) {
return (this.addUserPageForm.pageNumber - 1) * this.addUserPageForm.pageSize + index + 1
},
submitAddUser() {
if (!this.pageForm.checkTaskId) {
this.notifyWarning("请先选择任务")
return
}
this.$set(this.addUserPageForm, "checkTaskId", this.pageForm.checkTaskId)
this.$confirm("当前筛选出" + (this.addUserPageForm.totalCount || 0) + "条数据,确认添加到人员名单吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = this.$loading({
lock: true,
text: "数据保存中,请稍后...",
spinner: "el-icon-loading"
})
$.post("/platform/member/check/roster/addCheckUser", {
pageForm: JSON.stringify(this.addUserPageForm)
}).then((resp) => {
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.addUserVisible = false
this.doSearch()
} else {
this.notifyError(resp.msg)
}
}).always(() => {
loading.close()
})
})
},
doAuditByUnion(flag) {
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"]) && !this.pageForm.unionIds) {
this.notifyWarning("请选择需要确认的分工会")
return
}
const msg = flag ? "确定按当前任务和分工会确认名单吗?" : "确定按当前任务和分工会取消确认吗?"
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
$.post("/platform/member/check/roster/doConfirmUser", {
checkTaskId: this.pageForm.checkTaskId,
unionId: this.pageForm.unionIds,
flag: flag
}).then((resp) => {
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
} else {
this.notifyError(resp.msg)
}
})
})
},
doConfirmSelected(flag) {
const msg = flag ? "确定确认勾选人员吗?" : "确定取消确认勾选人员吗?"
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
$.post("/platform/member/check/roster/doConfirmSelected", {
ids: this.selectedIds.join(","),
flag: flag
}).then((resp) => {
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
} else {
this.notifyError(resp.msg)
}
})
})
},
deleteSelected() {
this.$confirm("确认删除勾选人员吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
$.post("/platform/member/check/roster/deleteSelected", {
ids: this.selectedIds.join(",")
}).then((resp) => {
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
} else {
this.notifyError(resp.msg)
}
})
})
},
exportData() {
const form = JSON.stringify(this.pageForm)
window.open("/platform/member/check/roster/exportCheckUser?pageForm=" + encodeURIComponent(form))
}
},
created() {
this.$businessTool.listUnion().then((res) => {
this.unions = res
if (!this.pageForm.unionIds && this.unions && this.unions.length === 1) {
this.$set(this.pageForm, "unionIds", this.unions[0].id)
}
})
this.flushUnits()
this.yearChange()
}
})
</script>
<!--#
}
#-->
@@ -1,28 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
</guava>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: '#app',
data() {
return{
}
},
methods: {
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -1,25 +1,215 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<div id="app" v-cloak>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="请选择年度"
style="width: 100%"></el-date-picker>
</search-item>
<search-item label="任务名称">
<el-input v-model="pageForm.taskName" placeholder="请输入任务名称查询" clearable></el-input>
</search-item>
<!-- <search-item label="发布状态">-->
<!-- <el-select v-model="pageForm.isEnabled" placeholder="请选择发布状态" clearable style="width: 100%">-->
<!-- <el-option label="已发布" :value="true"></el-option>-->
<!-- <el-option label="未发布" :value="false"></el-option>-->
<!-- </el-select>-->
<!-- </search-item>-->
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="任务列表">
<el-button size="small" type="primary" icon="el-icon-plus" @click="openAdd">新增</el-button>
</table-tool>
<el-table :data="tableData"
row-key="id"
:size="tableSize"
v-loading="tableLoading"
class="vi-table">
<el-table-column type="index" width="80px" label="序号" :index="indexMethod" align="center" header-align="center"></el-table-column>
<el-table-column prop="taskName" label="任务名称" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="year" label="年度" align="center" header-align="center"></el-table-column>
<el-table-column prop="startTime" label="开始时间" align="center" header-align="center" min-width="160px"></el-table-column>
<el-table-column prop="endTime" label="结束时间" align="center" header-align="center" min-width="160px"></el-table-column>
<el-table-column prop="isEnabled" label="是否发布" align="center" header-align="center">
<template slot-scope="{row}">
<el-switch v-model="row.isEnabled"
active-color="#13ce66"
inactive-color="#ff4949"
@change="switchChange(row)"></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" width="180px" fixed="right" align="center" header-align="center">
<template slot-scope="{row}">
<el-button size="mini" type="primary" @click="openEdit(row)">编辑</el-button>
<el-button size="mini" type="danger" @click="onDelete(row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="50%" :close-on-click-modal="false">
<el-form :model="formData" ref="formRef" label-width="100px" :rules="rules">
<el-form-item label="任务名称" prop="taskName">
<el-input v-model="formData.taskName" maxlength="20" placeholder="请输入任务名称"></el-input>
</el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-date-picker v-model="formData.startTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择开始时间"
style="width: 100%"></el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-date-picker v-model="formData.endTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择结束时间"
style="width: 100%"></el-date-picker>
</el-form-item>
<el-form-item label="内容详情" prop="description">
<el-input v-model="formData.description" type="textarea" :rows="5" placeholder="请输入内容详情"></el-input>
</el-form-item>
<!-- <el-form-item label="是否发布" prop="isEnabled">-->
<!-- <el-switch v-model="formData.isEnabled" active-color="#13ce66" inactive-color="#ff4949"></el-switch>-->
<!-- </el-form-item>-->
</el-form>
<template slot="footer">
<el-button @click="dialogVisible=false">取消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button>
</template>
</el-dialog>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: '#app',
data() {
return{
}
},
methods: {
},
created() {
}
})
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
computed: {
dialogTitle() {
return this.formData.id ? "编辑任务" : "新增任务"
}
},
data() {
return {
pageForm: {
year: moment().format("YYYY"),
taskName: "",
isEnabled: null
},
dialogVisible: false,
formData: {
taskName: "",
startTime: "",
endTime: "",
description: "",
isEnabled: true
},
rules: {
taskName: [{required: true, message: "请输入任务名称", trigger: ["change", "blur"]}],
startTime: [{required: true, message: "请选择开始时间", trigger: ["change", "blur"]}],
endTime: [{required: true, message: "请选择结束时间", trigger: ["change", "blur"]}],
description: [{required: true, message: "请输入内容详情", trigger: ["change", "blur"]}]
}
}
},
methods: {
pageData() {
this.tableLoading = true
return $.post("/platform/member/check/task/pageData", this.pageForm).then((resp) => {
if (resp.code === 0) {
this.tableData = resp.data.list || []
this.$set(this.pageForm, "totalCount", resp.data.totalCount || 0)
} else {
this.notifyError(resp.msg)
}
}).always(() => {
this.tableLoading = false
})
},
doSearch() {
this.$set(this.pageForm, "pageNumber", 1)
return this.pageData()
},
openAdd() {
this.formData = {
taskName: "",
startTime: "",
endTime: "",
description: "",
isEnabled: true
}
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.formRef.clearValidate()
})
},
openEdit(row) {
$.get("/platform/member/check/task/findOne", {id: row.id}).then((resp) => {
if (resp.code === 0) {
this.formData = Object.assign({}, resp.data)
this.dialogVisible = true
} else {
this.notifyError(resp.msg)
}
})
},
submitForm() {
this.$refs.formRef.validate((valid) => {
if (!valid) {
return
}
$.post("/platform/member/check/task/doAddOrModify", {
data: JSON.stringify(this.formData)
}).then((resp) => {
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.dialogVisible = false
this.doSearch()
} else {
this.notifyError(resp.msg)
}
})
})
},
switchChange(row) {
$.post("/platform/member/check/task/switchChange", row).then((resp) => {
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.pageData()
} else {
this.notifyError(resp.msg)
}
})
},
onDelete(id) {
this.$confirm("确认删除该任务及其人员名单吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
$.post("/platform/member/check/task/delete", {id: id}).then((resp) => {
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
} else {
this.notifyError(resp.msg)
}
})
}).catch(() => {})
}
},
created() {
this.pageData()
}
})
</script>
<!--#
}
@@ -1,26 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
</div>
<script nonce="${cspNonce!}">
new Vue({
el: '#app',
data() {
return{
}
},
methods: {
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -112,6 +112,7 @@ layout("/layouts/platform.html"){
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
@@ -169,7 +169,8 @@ const selectView = {
selectedOptions: [],
detailVisible: false,
currentOption: null,
activeNames:[]
activeNames:[],
defaultWelfareImage: "/assets/platform/img/v4/not-image.png"
}
},
computed: {
@@ -179,7 +180,7 @@ const selectView = {
return {
...item,
optionName: option.optionName || "未知选项",
imgUrl: option.imgUrl,
imgUrl: option.imgUrl || this.defaultWelfareImage,
description: option.description
}
})
@@ -267,7 +268,11 @@ const selectView = {
},
handleImageError(e) {
e.target.src = "/static/images/default-welfare.png"
// 兜底图加载失败时不再重复替换,避免控制台持续刷 404。
if (!e || !e.target || e.target.src.indexOf(this.defaultWelfareImage) > -1) {
return
}
e.target.src = this.defaultWelfareImage
},
formatDate(dateStr) {