first commit
This commit is contained in:
@@ -0,0 +1,235 @@
|
||||
<template>
|
||||
<div style="padding: 20px 50px">
|
||||
<el-timeline>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-button size="medium" style="width: 200px"
|
||||
@click="$downLoad('/platform/activity/basic/scope/downloadImport')" icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-form>
|
||||
<el-upload
|
||||
action="#"
|
||||
name="file"
|
||||
ref="upload"
|
||||
:on-remove="
|
||||
(file, fileList) => {
|
||||
importData.fileList = fileHandleRemove(file, fileList)
|
||||
importResult = {
|
||||
errorCount: 0,
|
||||
successCount: 0,
|
||||
totalCount: 0,
|
||||
errorList: []
|
||||
}
|
||||
}
|
||||
"
|
||||
:on-change="
|
||||
(file, fileList) => {
|
||||
importData.fileList = fileHandleChange(file, fileList, { type: ['xls', 'xlsx'] })
|
||||
}
|
||||
"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:file-list="importData.fileList"
|
||||
>
|
||||
<el-button size="medium" type="" icon="el-icon-upload" style="width: 200px">选择文件</el-button>
|
||||
<div class="el-upload__tip" slot="tip" style="color: #f56c6c">只能上传 xls/xlsx 文件</div>
|
||||
</el-upload>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item placement="top" timestamp="导入结果">
|
||||
<el-card shadow="never">
|
||||
<p>总记录数:{{ errorInfoData.totalCount }}</p>
|
||||
<p>
|
||||
成功数:
|
||||
<span class="text-success">{{ errorInfoData.successCount }}</span>
|
||||
</p>
|
||||
<p>
|
||||
错误数:
|
||||
<span class="text-danger">{{ errorInfoData.errorCount }}</span>
|
||||
</p>
|
||||
<el-link @click="exportErrors" type="primary" v-if="errorInfoData.errorCount > 0">下载错误记录</el-link>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<div style="text-align: right">
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="clearImportDialog" type="primary"
|
||||
:disabled="importLoading">取 消</el-button>
|
||||
<el-button type="primary" @click="clearSearchCnd"
|
||||
:loading="importLoading">清空查询条件</el-button>
|
||||
<el-button type="primary" @click="doImport" :loading="importLoading">核对人员</el-button>
|
||||
<el-button type="primary" @click="doImportSearch"
|
||||
:loading="importLoading">查询人员</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
exists_login_name_redis_key: {type: String, required: ""},
|
||||
group_id: {type: Number, required: ""},
|
||||
do_import_url: {type: String, required: ""}
|
||||
},
|
||||
mounted() {
|
||||
const s = document.createElement("script")
|
||||
s.type = "text/javascript"
|
||||
s.src = "/assets/platform/plugins/xlsx/xlsx.full.min.js"
|
||||
document.body.appendChild(s)
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
importData: {
|
||||
fileList: [],
|
||||
isFlag: false
|
||||
},
|
||||
errorInfoData: {
|
||||
totalCount: 0,
|
||||
successCount: 0,
|
||||
errorCount: 0,
|
||||
errorList: 0
|
||||
},
|
||||
importLoading: false,
|
||||
doImportUrl:""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clearImportDialog() {
|
||||
this.$emit("clear_import_dialog")
|
||||
},
|
||||
clearSearchCnd() {
|
||||
this.importData = {
|
||||
fileList: [],
|
||||
}
|
||||
this.errorInfoData = {
|
||||
totalCount: 0,
|
||||
successCount: 0,
|
||||
errorCount: 0,
|
||||
errorList: [],
|
||||
}
|
||||
|
||||
$.get('/platform/activity/basic/scope/clearSearchCnd', {existsLoginNameRedisKey: this.exists_login_name_redis_key}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$emit("flush", this.exists_login_name_redis_key)
|
||||
this.$message.success(res.msg)
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
resetImportData() {
|
||||
this.importData = {
|
||||
fileList: [],
|
||||
}
|
||||
this.errorInfoData = {
|
||||
totalCount: 0,
|
||||
successCount: 0,
|
||||
errorCount: 0,
|
||||
errorList: 0
|
||||
}
|
||||
},
|
||||
doImportSearch() {
|
||||
this.$emit("flush", this.exists_login_name_redis_key)
|
||||
this.clearImportDialog()
|
||||
},
|
||||
doImport() {
|
||||
if (this.importData.fileList.length === 0) {
|
||||
this.$message.error({
|
||||
title: "错误",
|
||||
message: "请选择文件!"
|
||||
})
|
||||
return
|
||||
}
|
||||
const data = new FormData()
|
||||
data.append("groupId", this.group_id)
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name)
|
||||
})
|
||||
this.importLoading = true
|
||||
this.$axios.post(this.do_import_url, data).then((res) => {
|
||||
if (res.code === 0) {
|
||||
if (res.data.errorList && res.data.errorList.length > 0) {
|
||||
this.$message.warning("核对失败")
|
||||
} else {
|
||||
this.$message.success("核对成功")
|
||||
}
|
||||
|
||||
this.errorInfoData = res.data
|
||||
this.$emit("flush", res.data.existsLoginNameRedisKey)
|
||||
} else {
|
||||
this.$message.warning("核对失败")
|
||||
}
|
||||
this.importLoading = false
|
||||
})
|
||||
},
|
||||
exportErrors() {
|
||||
const data = this.errorInfoData.errorList
|
||||
|
||||
// 创建工作簿
|
||||
const workbook = XLSX.utils.book_new()
|
||||
|
||||
// 创建工作表
|
||||
const worksheet = XLSX.utils.json_to_sheet(data)
|
||||
|
||||
// 将工作表添加到工作簿
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1")
|
||||
|
||||
// 将工作簿转换为二进制对象
|
||||
const excelBuffer = XLSX.write(workbook, {bookType: "xlsx", type: "array"})
|
||||
|
||||
// 将二进制对象转换为Blob对象
|
||||
const blob = new Blob([excelBuffer], {type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})
|
||||
|
||||
// 创建下载链接并设置相关属性
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement("a")
|
||||
link.href = url
|
||||
link.download = "错误记录.xlsx"
|
||||
|
||||
// 模拟点击下载链接
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
// 清理下载链接
|
||||
document.body.removeChild(link)
|
||||
window.URL.revokeObjectURL(url)
|
||||
},
|
||||
fileHandleRemove(file, fileList) {
|
||||
return fileList
|
||||
},
|
||||
fileHandleChange(file, fileList, {type, size}) {
|
||||
const removeFile = () => {
|
||||
fileList.splice(fileList.findIndex((v) => v === file))
|
||||
}
|
||||
|
||||
if (!file.size) {
|
||||
this.$message.warning("您选择的是空文件!")
|
||||
removeFile()
|
||||
}
|
||||
|
||||
if (type && type.length && !type.includes(file.name.split(".").pop().toLowerCase())) {
|
||||
this.$message.warning(`文件只能是 ${type.map((v) => v.toUpperCase()).join("/")} 格式!`)
|
||||
removeFile()
|
||||
}
|
||||
|
||||
if (size && !file.size < size) {
|
||||
this.$message.warning(`文件大小不能超过 ${size / 1024 / 1024}MB!`)
|
||||
removeFile()
|
||||
}
|
||||
|
||||
return fileList
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-card__body {
|
||||
padding: 25px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-drawer title="" size="78%" :visible.sync="userScopeDialog" :append-to-body="true" :with-header="false">
|
||||
<div style="padding: 0px 16px" class="clearfix">
|
||||
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="userScopeDialog = false">返回</el-button>
|
||||
</div>
|
||||
<el-tabs tab-position="top" v-model="activeName" @tab-click="handleClick" style="margin: 20px">
|
||||
<el-tab-pane label="人员设置" name="1">
|
||||
<template>
|
||||
<user-scope ref="userScope" @group_change="group_change" :group_id.sync="groupId"></user-scope>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="人员调整" name="2">
|
||||
<user-data-scope @group_change="group_change" ref="userDataScope"></user-data-scope>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {},
|
||||
model: {},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
groupId: "",
|
||||
userScopeDialog: false,
|
||||
activeName: "1"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
if (this.activeName === "2") {
|
||||
this.$refs.userDataScope.getActivityGroup()
|
||||
} else {
|
||||
this.$refs.userScope.getActivityGroup()
|
||||
}
|
||||
},
|
||||
group_change() {
|
||||
this.$emit("group_change")
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"user-data-scope": httpVueLoader("/components/module/activity/UserDataScope.vue"),
|
||||
"user-scope": httpVueLoader("/components/module/activity/UserScope.vue")
|
||||
},
|
||||
watch: {
|
||||
groupId: {
|
||||
async handler(newVal) {
|
||||
this.$emit("update:group_id", newVal)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动分组</div>
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
placeholder="活动分组"
|
||||
v-model="pageForm.groupId"
|
||||
style="width: 100%"
|
||||
@change="
|
||||
doSearch()
|
||||
viewGroupName()
|
||||
"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in activityGroupList"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"
|
||||
:key="item.groupId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名/工号</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable
|
||||
placeholder="请输入姓名或工号"
|
||||
v-model="pageForm.searchKeyword">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="is_sysadmin || is_A06">
|
||||
<div class="search-item-label">所属工会</div>
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
placeholder="所属工会"
|
||||
v-model="pageForm.unionId"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
@change="flushUnits"
|
||||
@clear="flushUnits"
|
||||
filterable
|
||||
>
|
||||
<el-option v-for="item in unions" :label="item.name" :value="item.id" :key="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.unitId" style="width: 100%" clearable @change="doSearch"
|
||||
filterable>
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="search-item"
|
||||
v-if="${@shiro.hasRole('sysadmin')}">
|
||||
<div class="search-item-label">活动工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.activityUnionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true">
|
||||
<el-option v-for="item in ActivityUnions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')}">
|
||||
<div class="search-item-label">活动单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.activityUnitId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in ActivityUnits" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">教职工类别</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.personType" code="USER_PERSON_TYPE" @change="doSearch"
|
||||
style="width: 100%"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">在职状态</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select
|
||||
v-model="pageForm.userState"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
placeholder="在职状态"
|
||||
@change="doSearch"
|
||||
code="USER_STATE"
|
||||
></dict-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="mt10">
|
||||
<table-tool :label="currentGroupName">
|
||||
<el-button v-if="is_sysadmin||is_A06"
|
||||
type="primary" size="medium" icon="el-icon-printer" @click="importDialogVisible=true">
|
||||
导入XLSX查询
|
||||
</el-button>
|
||||
<el-button @click="doExportUser" icon="el-icon-printer" size="small" type="primary"
|
||||
:disabled="!pageForm.groupId">
|
||||
导出活动分组人员xlsx
|
||||
</el-button>
|
||||
<el-button @click="doDelete(null)" type="danger" size="small" :disabled="tableData.length === 0">
|
||||
删除{{ currentGroupName }}
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table ref="userTable" :data="tableData" stripe border :size="tableSize" @sort-change="pageOrder">
|
||||
<el-table-column label="序号" type="index" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }}</span>
|
||||
</template>
|
||||
</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"
|
||||
:key="column.prop"
|
||||
:sortable="column.sortable"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="100">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[5, 10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount"
|
||||
></el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="importDialogVisible" title="人员导入" width="45%" :append-to-body="true"
|
||||
:close-on-click-modal="false">
|
||||
<activity-import-user ref="importUserRef"
|
||||
@clear_import_dialog="clearImportDialog"
|
||||
@flush="flush"
|
||||
do_import_url="/platform/activity/basic/user/doImport"
|
||||
:group_id="pageForm.groupId"
|
||||
:exists_login_name_redis_key="pageForm.existsLoginNameRedisKey"></activity-import-user>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
group_id: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
is_H10() {
|
||||
return this.roleData.is_H10
|
||||
},
|
||||
is_A06() {
|
||||
return this.roleData.is_A06
|
||||
},
|
||||
is_H04() {
|
||||
return this.roleData.is_H04
|
||||
},
|
||||
is_H02() {
|
||||
return this.roleData.is_H02
|
||||
},
|
||||
is_H03() {
|
||||
return this.roleData.is_H03
|
||||
},
|
||||
is_sysadmin() {
|
||||
return this.roleData.is_sysadmin
|
||||
},
|
||||
unionid() {
|
||||
return this.roleData.unionid
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activityGroupList: [],
|
||||
ActivityUnions: [],
|
||||
ActivityUnits: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
pageForm: {
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
searchName: "username",
|
||||
personTypes: [],
|
||||
userStates: [],
|
||||
memberStatus: [],
|
||||
year: moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: "loginName", label: "工号"},
|
||||
{prop: "userName", label: "姓名"},
|
||||
{prop: "sex", label: "性别", sortable: true},
|
||||
{prop: "birthday", label: "出生年月"},
|
||||
{prop: "mobile", label: "联系电话"},
|
||||
{prop: "personType", label: "教职工类别", sortable: true},
|
||||
{prop: "userState", label: "在职状态", sortable: true},
|
||||
{prop: "unitName", label: "所属单位", sortable: true},
|
||||
{prop: "unionName", label: "所属工会", sortable: true},
|
||||
{prop: "groupName", label: "所属分组", sortable: true}
|
||||
],
|
||||
roleData: {},
|
||||
currentGroupName: null,
|
||||
importDialogVisible: false,
|
||||
}
|
||||
},
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"activity-import-user": httpVueLoader("/components/module/activity/ActivityImportUser.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
flush(exists_login_name_redis_key) {
|
||||
this.pageForm.existsLoginNameRedisKey = exists_login_name_redis_key
|
||||
this.doSearch()
|
||||
},
|
||||
clearImportDialog() {
|
||||
this.importDialogVisible = false
|
||||
},
|
||||
viewGroupName() {
|
||||
if (this.pageForm?.groupId) {
|
||||
const group = this.activityGroupList.find((v) => v.groupId === this.pageForm.groupId)
|
||||
this.currentGroupName = group.groupName + "人员"
|
||||
return
|
||||
}
|
||||
this.currentGroupName = "全部人员"
|
||||
},
|
||||
doExportUser() {
|
||||
window.open("/platform/activity/basic/user/doExportUser?groupId=" + this.pageForm.groupId)
|
||||
},
|
||||
doSearch2() {
|
||||
this.getActivityGroup()
|
||||
this.doSearch()
|
||||
},
|
||||
async doDelete(id, groupId) {
|
||||
const confirm = await this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
let pageForm = clone(this.pageForm)
|
||||
pageForm.id = id
|
||||
const resp = await $.post("/platform/activity/basic/user/doDelete", pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
await this.getActivityGroup(this.pageForm.groupId)
|
||||
this.$emit("group_change")
|
||||
} else {
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.is_A06 || this.is_sysadmin) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
// this.ActivityUnits = await getActivityUnits(this.pageForm.activityUnionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.unionid)
|
||||
}
|
||||
},
|
||||
async getActivityGroup(id) {
|
||||
const resp = await $.get("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||
this.activityGroupList = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
if (id) {
|
||||
if (this.activityGroupList.some((v) => v.groupId === id)) {
|
||||
this.$set(this.pageForm, "groupId", id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
||||
}
|
||||
} else {
|
||||
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
||||
}
|
||||
}
|
||||
await this.doSearch()
|
||||
},
|
||||
async getRolesAndUnion() {
|
||||
const {data} = await $.post("/platform/activity/basic/scope/getRolesAndUnion")
|
||||
this.roleData = data
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await $.post("/platform/activity/basic/user/pageData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
// this.ActivityUnions = await getActivityUnions()
|
||||
await this.flushUnits()
|
||||
await this.getActivityGroup()
|
||||
await this.getRolesAndUnion()
|
||||
this.viewGroupName()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,751 @@
|
||||
<template>
|
||||
<div class="user-scope">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-row class="query-row">
|
||||
<el-col class="query-title">姓名/工号:</el-col>
|
||||
<el-select
|
||||
clearable
|
||||
v-model="pageForm.userId"
|
||||
filterable
|
||||
remote
|
||||
collapse-tags
|
||||
placeholder="输入工号或者姓名查找"
|
||||
:remote-method="queryUser"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
multiple
|
||||
>
|
||||
<el-option v-for="o in userList" :label="o.username + '(' + o.loginname + ')'" :value="o.id"
|
||||
:key="o.id"></el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
|
||||
<el-row class="query-row" v-if="is_A06 === true || is_sysadmin === true || is_H02 === true">
|
||||
<el-col class="query-title hidden-xs-only">会员类型:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-tag
|
||||
:effect="pageForm.memberTypes.includes(item.name) ? 'dark' : 'plain'"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
@click="tagClick('memberTypes', item.name)"
|
||||
style="margin-right: 10px; cursor: pointer"
|
||||
v-for="item in memberTypeOptions"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="query-row">
|
||||
<el-col class="query-title hidden-xs-only">性别:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-tag
|
||||
:effect="pageForm.sexTypes.includes(item.name) ? 'dark' : 'plain'"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
@click="tagClick('sexTypes', item.name)"
|
||||
style="margin-right: 10px; cursor: pointer"
|
||||
v-for="item in sexTypeOptions"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="query-row" v-if="is_A06 === true || is_sysadmin === true || is_H04 === true">
|
||||
<el-col class="query-title">教职工类别:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-tag
|
||||
:effect="pageForm.personTypes.includes(item.name) ? 'dark' : 'plain'"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
@click="tagClick('personTypes', item.name)"
|
||||
style="margin-right: 10px; cursor: pointer"
|
||||
v-for="item in personTypeOptions"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
|
||||
<el-link
|
||||
:underline="false"
|
||||
@click="
|
||||
pageForm.personTypes = []
|
||||
doSearch()
|
||||
"
|
||||
type="danger"
|
||||
v-if="personTypeOptions.length && pageForm.personTypes.length"
|
||||
>
|
||||
清空
|
||||
</el-link>
|
||||
|
||||
<el-link
|
||||
:underline="false"
|
||||
@click="
|
||||
pageForm.personTypes = personTypeOptions.map((p) => p.code)
|
||||
doSearch()
|
||||
"
|
||||
type="success"
|
||||
>
|
||||
全部
|
||||
</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="query-row" v-if="is_A06 === true || is_sysadmin === true || is_H04 === true">
|
||||
<el-col class="query-title">在职状态:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-tag
|
||||
:effect="pageForm.userStates.includes(item.name) ? 'dark' : 'plain'"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
@click="tagClick('userStates', item.name)"
|
||||
style="margin-right: 10px; cursor: pointer"
|
||||
v-for="item in userStateOptions"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
|
||||
<el-link
|
||||
:underline="false"
|
||||
@click="
|
||||
pageForm.userStates = []
|
||||
doSearch()
|
||||
"
|
||||
type="danger"
|
||||
v-if="userStateOptions.length && pageForm.userStates.length"
|
||||
>
|
||||
清空
|
||||
</el-link>
|
||||
<el-link
|
||||
:underline="false"
|
||||
@click="
|
||||
pageForm.userStates = userStateOptions.map((p) => p.code)
|
||||
doSearch()
|
||||
"
|
||||
type="success"
|
||||
>
|
||||
全部
|
||||
</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="query-row" v-if="is_A06 === true || is_sysadmin === true || is_H04 === true">
|
||||
<el-col class="query-title">部门查询:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="12" :md="12" :sm="24" :xl="12" :xs="24">
|
||||
<el-select
|
||||
@change="
|
||||
flushUnits()
|
||||
doSearch()
|
||||
"
|
||||
@clear="
|
||||
flushUnits()
|
||||
doSearch()
|
||||
"
|
||||
:clearable="is_A06 === true || is_sysadmin === true"
|
||||
filterable
|
||||
placeholder="所属工会"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.unionId"
|
||||
>
|
||||
<el-option :label="item.name" :value="item.id" :key="item.id" v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :lg="12" :md="12" :sm="24" :xl="12" :xs="24">
|
||||
<el-select
|
||||
@change="doSearch"
|
||||
@clear="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="所属单位"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.unitId"
|
||||
>
|
||||
<el-option :label="item.name" :value="item.id" :key="item.id" v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<template v-if="is_A06 === true || is_sysadmin === true">
|
||||
<!--<el-row class="query-row">
|
||||
<el-col class="query-title">活动部门:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="12" :md="12" :sm="24" :xl="12" :xs="24">
|
||||
<el-select @change="flushUnits();doSearch()" @clear="flushUnits();doSearch()"
|
||||
:clearable="is_A06===true||is_sysadmin===true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%"
|
||||
v-model="pageForm.activityUnionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in activityUnions"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :lg="12" :md="12" :sm="24" :xl="12" :xs="24">
|
||||
<el-select @change="doSearch" @clear="doSearch" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属单位"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.activityUnitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in activityUnits"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
|
||||
<el-row class="query-row">
|
||||
<el-col class="query-title">系统角色:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-select
|
||||
@change="doSearch" clearable filterable
|
||||
placeholder="请选择角色"
|
||||
multiple
|
||||
style="width: 100%"
|
||||
v-model="pageForm.roleIds">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
:key="item.id"
|
||||
v-for="item in roleList"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select placeholder="请选择教代会" v-model="pageForm.sessionId" clearable style="width: 100%">
|
||||
<el-option v-for="item in sessionOptions" :label="item.fullName" :value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-row class="query-row"
|
||||
v-if="is_A06===true||is_sysadmin===true||is_H02===true">
|
||||
<el-col class="query-title">协会:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-select v-model="pageForm.clubId" placeholder="请选择协会" @change="doSearch"
|
||||
filterable
|
||||
:clearable="is_A06===true||is_sysadmin===true||(is_H04===true&&is_H02===true)"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in clubOptions"
|
||||
:key="item.id"
|
||||
:label="item.clubName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="query-row">
|
||||
<el-col class="query-title">活动组别:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-select
|
||||
@change="doSearch()"
|
||||
placeholder="请选择活动组别范围之外的人员"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.activityGroupId"
|
||||
>
|
||||
<el-option
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"
|
||||
:key="item.groupId"
|
||||
v-for="item in activityGroupList2"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="query-row" v-if="is_A06 === true || is_sysadmin === true || is_H04 === true">
|
||||
<el-col class="query-title">年龄范围:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-row type="flex" style="align-items: center">
|
||||
<el-col :span="15">
|
||||
<el-slider v-model="pageForm.age" range show-stops :max="100"></el-slider>
|
||||
</el-col>
|
||||
<el-col :span="9" class="pl20">当前范围:{{ pageForm.age }}</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row class="query-row"
|
||||
v-if="is_H10===true||is_A06===true||is_sysadmin===true||is_H04===true">
|
||||
<el-col class="query-title">条件匹配:</el-col>
|
||||
<el-col class="query-content">
|
||||
<user-cnd
|
||||
@cnd="(v)=>{this.$set(this.pageForm,'activityUserCnd',v)}"></user-cnd>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
|
||||
<el-row class="query-row" style="justify-content: end">
|
||||
<el-checkbox v-model="pageForm.reverseSelection" label="是否反选" border @change="doSearch"
|
||||
class="reverseCheckBox"></el-checkbox>
|
||||
<el-button type="danger" icon="el-icon-circle-close" @click="doReset">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="筛选人员">
|
||||
<el-button v-if="is_sysadmin||is_A06"
|
||||
type="primary" size="medium" icon="el-icon-printer" @click="importDialogVisible=true">
|
||||
导入XLSX设置分组
|
||||
</el-button>
|
||||
<el-button @click="doExportUser" size="medium" type="primary" icon="el-icon-download">导出查询人员</el-button>
|
||||
<el-button @click="setDialogVisible = true" size="medium" type="primary">设置为活动人员</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" border ref="userTable" stripe>
|
||||
<el-table-column label="序号" type="index" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, prev, pager, next"
|
||||
:total="pageForm.totalCount"
|
||||
></el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
<el-dialog :visible.sync="setDialogVisible" title="设置活动人员" width="45%" :append-to-body="true"
|
||||
:close-on-click-modal="false">
|
||||
<el-form :model="formData" :rules="rules" label-width="100px" ref="setForm">
|
||||
<el-form-item label="添加方式" prop="setGroupType">
|
||||
<el-radio-group size="small" v-model="formData.setGroupType">
|
||||
<el-radio :label="1">添加至原有分组</el-radio>
|
||||
<el-radio :label="2">添加到新分组</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-row v-if="formData.setGroupType === 1">
|
||||
<el-form-item label="原有分组" prop="setGroupId">
|
||||
<el-radio-group size="small" v-model="formData.setGroupId">
|
||||
<el-radio
|
||||
:disabled="item.groupId != pageForm.activityGroupId"
|
||||
:label="item.groupId"
|
||||
:key="item.groupId"
|
||||
border
|
||||
v-for="item in activityGroupList"
|
||||
>
|
||||
{{ item.groupName }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row v-if="formData.setGroupType === 2">
|
||||
<el-form-item label="新分组" prop="setGroupName">
|
||||
<el-input placeholder="请输入新分组名称" v-model="formData.setGroupName"></el-input>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="setDialogVisible = false">取 消</el-button>
|
||||
<el-button @click="doSetActivityUser" type="primary" v-loading="settingLoading">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="importDialogVisible" title="设置活动人员" width="45%" :append-to-body="true"
|
||||
:close-on-click-modal="false">
|
||||
<activity-import-user ref="importUserRef"
|
||||
@clear_import_dialog="clearImportDialog"
|
||||
@flush="flush"
|
||||
do_import_url="/platform/activity/basic/scope/doImport"
|
||||
:exists_login_name_redis_key="pageForm.existsLoginNameRedisKey"></activity-import-user>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {},
|
||||
model: {},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
userList: [],
|
||||
clubOptions: [],
|
||||
settingLoading: false,
|
||||
setDialogVisible: false,
|
||||
setGroupType: null,
|
||||
setGroupId: null,
|
||||
setGroupName: null,
|
||||
personTypeOptions: [],
|
||||
userStateOptions: [],
|
||||
activityGroupList: [],
|
||||
activityGroupList2: [],
|
||||
memberTypeOptions: [
|
||||
{
|
||||
code: "unionMember",
|
||||
name: "工会会员"
|
||||
},
|
||||
{
|
||||
code: "welfareMember",
|
||||
name: "福利会员"
|
||||
},
|
||||
{
|
||||
code: "sickFundMember",
|
||||
name: "基金会员"
|
||||
}
|
||||
],
|
||||
sexTypeOptions: [
|
||||
{code: "男", name: "男"},
|
||||
{code: "女", name: "女"}
|
||||
],
|
||||
pageForm: {
|
||||
age: [0, 0],
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
clubId: "",
|
||||
searchName: "u.username",
|
||||
personTypes: [],
|
||||
userStates: [],
|
||||
memberStatus: [],
|
||||
memberTypes: [],
|
||||
sexTypes: [],
|
||||
minAge: 0,
|
||||
maxAge: 0,
|
||||
year: moment().format("YYYY"),
|
||||
module: "",
|
||||
teacherMeetingId: "",
|
||||
activityGroupId: "",
|
||||
roleIds: [],
|
||||
userId: [],
|
||||
activityUserCnd: "",
|
||||
reverseSelection: false
|
||||
},
|
||||
activityUnions: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
activityUnits: [],
|
||||
meetingOptions: [],
|
||||
roleList: [],
|
||||
tableHeight: "0px",
|
||||
tableColumns: [
|
||||
{prop: "loginName", label: "工号"},
|
||||
{prop: "userName", label: "姓名"},
|
||||
{prop: "sex", label: "性别"},
|
||||
{prop: "birthday", label: "出生年月", sortable: true},
|
||||
{prop: "age", label: "年龄", sortable: true},
|
||||
{prop: "mobile", label: "联系电话"},
|
||||
{prop: "personType", label: "教职工类别", sortable: true},
|
||||
{prop: "userState", label: "在职状态", sortable: true},
|
||||
{prop: "unitName", label: "所属单位", sortable: true},
|
||||
{prop: "unionName", label: "所属工会", sortable: true}
|
||||
// {prop: 'activityUnionName', label: '活动工会', sortable: true},
|
||||
],
|
||||
rules: {
|
||||
setGroupType: [{required: true, message: "请选择添加方式", trigger: ["blur", "change"]}],
|
||||
setGroupId: [{required: true, message: "请选择分组", trigger: ["blur", "change"]}],
|
||||
setGroupName: [{required: true, message: "请输入分组名称", trigger: ["blur", "change"]}]
|
||||
},
|
||||
relatedSessionMenus: ["aca4d14498c145ceb5b24ed70776aae2", "733d7266652740a3aeac9da97ab5eeca", "fe2d0768e26d4a80beeb159306bb8d01"],
|
||||
roleData: {},
|
||||
importDialogVisible: false,
|
||||
sessionOptions: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
is_H10() {
|
||||
return this.roleData.is_H10
|
||||
},
|
||||
is_A06() {
|
||||
return this.roleData.is_A06
|
||||
},
|
||||
is_H04() {
|
||||
return this.roleData.is_H04
|
||||
},
|
||||
is_H02() {
|
||||
return this.roleData.is_H02
|
||||
},
|
||||
is_sysadmin() {
|
||||
return this.roleData.is_sysadmin
|
||||
},
|
||||
unionid() {
|
||||
return this.roleData.unionid
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"user-cnd": httpVueLoader("/components/plugins/UserCnd.vue"),
|
||||
"activity-import-user": httpVueLoader("/components/module/activity/ActivityImportUser.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
listSession() {
|
||||
this.$axios.post("/platform/teacherCongress/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
flush(exists_login_name_redis_key) {
|
||||
this.pageForm.existsLoginNameRedisKey = exists_login_name_redis_key
|
||||
this.doSearch()
|
||||
},
|
||||
clearImportDialog() {
|
||||
this.importDialogVisible = false
|
||||
},
|
||||
doExportUser() {
|
||||
let props = {}
|
||||
this.tableColumns.forEach((v) => {
|
||||
props[v.prop] = v.label
|
||||
})
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
|
||||
pageForm.userStates = JSON.stringify(pageForm.userStates)
|
||||
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
|
||||
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
|
||||
pageForm.sexTypes = JSON.stringify(pageForm.sexTypes)
|
||||
pageForm.roleIds = JSON.stringify(pageForm.roleIds)
|
||||
pageForm.userId = JSON.stringify(pageForm.userId)
|
||||
pageForm.age = JSON.stringify(pageForm.age)
|
||||
pageForm.props = JSON.stringify(props)
|
||||
pageForm.activityUserCnd = pageForm.activityUserCnd ? JSON.stringify(pageForm.activityUserCnd) : pageForm.activityUserCnd
|
||||
this.$downLoad("/platform/activity/basic/scope/doExportUser", {
|
||||
data: JSON.stringify(pageForm)
|
||||
})
|
||||
},
|
||||
doReset() {
|
||||
this.pageForm.userId = []
|
||||
this.pageForm.memberTypes = []
|
||||
this.pageForm.sexTypes = []
|
||||
this.pageForm.personTypes = []
|
||||
this.pageForm.userStates = []
|
||||
this.pageForm.unionId = ""
|
||||
this.pageForm.unitId = ""
|
||||
this.pageForm.module = ""
|
||||
this.pageForm.teacherMeetingId = ""
|
||||
this.pageForm.roleIds = []
|
||||
this.pageForm.clubId = ""
|
||||
this.pageForm.activityGroupId = ""
|
||||
this.pageForm.activityUserCnd = ""
|
||||
this.pageForm.age = [0, 0]
|
||||
this.pageForm.reverseSelection = false
|
||||
this.doSearch()
|
||||
},
|
||||
async queryUser(val) {
|
||||
const resp = await $.get("/open/common/userOptions", {query: val})
|
||||
this.userList = resp.data
|
||||
},
|
||||
tagClick(key, val) {
|
||||
let idx = this.pageForm[key].indexOf(val)
|
||||
if (idx !== -1) {
|
||||
this.pageForm[key].splice(idx, 1)
|
||||
} else {
|
||||
this.pageForm[key].push(val)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.is_sysadmin || this.is_A06) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
// this.activityUnits = await getActivityUnits(this.pageForm.activityUnionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.unionId)
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
|
||||
pageForm.userStates = JSON.stringify(pageForm.userStates)
|
||||
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
|
||||
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
|
||||
pageForm.sexTypes = JSON.stringify(pageForm.sexTypes)
|
||||
pageForm.roleIds = JSON.stringify(pageForm.roleIds)
|
||||
pageForm.userId = JSON.stringify(pageForm.userId)
|
||||
pageForm.age = JSON.stringify(pageForm.age)
|
||||
pageForm.activityUserCnd = pageForm.activityUserCnd ? JSON.stringify(pageForm.activityUserCnd) : pageForm.activityUserCnd
|
||||
|
||||
const resp = await $.post("/platform/activity/basic/scope/pageData", {data: JSON.stringify(pageForm)})
|
||||
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSetActivityUser() {
|
||||
const valid = await this.$refs.setForm.validate()
|
||||
if (!valid) {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.tableData.length === 0) {
|
||||
this.$message.warning("请先指定筛选条件!")
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm("是否将符合搜索条件的用户设为活动人员?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
this.settingLoading = true
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
|
||||
pageForm.userStates = JSON.stringify(pageForm.userStates)
|
||||
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
|
||||
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
|
||||
pageForm.sexTypes = JSON.stringify(pageForm.sexTypes)
|
||||
pageForm.roleIds = JSON.stringify(pageForm.roleIds)
|
||||
pageForm.userId = JSON.stringify(pageForm.userId)
|
||||
pageForm.age = JSON.stringify(pageForm.age)
|
||||
pageForm.activityUserCnd = pageForm.activityUserCnd ? JSON.stringify(pageForm.activityUserCnd) : pageForm.activityUserCnd
|
||||
|
||||
Object.assign(pageForm, this.formData)
|
||||
const resp = await $.post("/platform/activity/basic/scope/doSetActivityUser", {data: JSON.stringify(pageForm)})
|
||||
if (resp.code === 0) {
|
||||
this.setDialogVisible = false
|
||||
// this.userScopeDialog = false
|
||||
await this.getActivityGroup()
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
this.formData = {
|
||||
setGroupType: null,
|
||||
setGroupId: null,
|
||||
setGroupName: null
|
||||
}
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
this.settingLoading = false
|
||||
this.$emit("update:group_id", resp.data)
|
||||
this.$emit("group_change")
|
||||
}
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const resp = await $.get("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||
this.activityGroupList = resp.data
|
||||
this.activityGroupList2 = []
|
||||
resp.data.forEach((v) => {
|
||||
this.activityGroupList2.push({
|
||||
groupId: v.groupId,
|
||||
groupName: v.groupName + "范围之外人员"
|
||||
})
|
||||
})
|
||||
},
|
||||
async getRoleListByMenuId() {
|
||||
const {data} = await $.post("/platform/activity/basic/scope/getRoleListByMenuId")
|
||||
this.roleList = data
|
||||
},
|
||||
async getRolesAndUnion() {
|
||||
const {data} = await $.post("/platform/activity/basic/scope/getRolesAndUnion")
|
||||
this.roleData = data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.listSession()
|
||||
await this.getRolesAndUnion()
|
||||
this.clubOptions = await this.$businessTool.listCLubByRole()
|
||||
if ((this.is_sysadmin || this.is_A06 || this.is_H02) === false && this.is_H04 === true) {
|
||||
this.unions = this.$businessTool.listUnion(this.unionid)
|
||||
this.$set(this.pageForm, "unionId", this.unions[0].id)
|
||||
} else {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
}
|
||||
if (this.is_H04 === false && this.is_H02 === true) {
|
||||
if (this.clubOptions.length > 0) {
|
||||
this.$set(this.pageForm, "clubId", this.clubOptions[0].id)
|
||||
}
|
||||
}
|
||||
await this.flushUnits()
|
||||
await this.getActivityGroup()
|
||||
this.personTypeOptions = await this.$businessTool.getDictOptions("USER_PERSON_TYPE")
|
||||
this.userStateOptions = await this.$businessTool.getDictOptions("USER_STATE")
|
||||
await this.getRoleListByMenuId()
|
||||
await this.pageData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.query-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row > .query-title {
|
||||
width: 100px;
|
||||
max-width: 100px;
|
||||
min-width: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row > .query-content {
|
||||
min-width: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row > .query-content > .el-tag {
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 992px) {
|
||||
.query-row:nth-child(4) .query-content .el-col:not(:last-child) {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.query-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.header_card .el-card__body {
|
||||
padding: 2px 20px;
|
||||
}
|
||||
|
||||
.user_card .el-card__body {
|
||||
padding: 2px 20px;
|
||||
}
|
||||
|
||||
.user_card {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.user_table {
|
||||
max-height: 260px;
|
||||
}
|
||||
|
||||
.user_table .el-table__cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.reverseCheckBox {
|
||||
margin: 0 10px 0 0 !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<el-table :data="tableData" style="width: 100%;height: 100%" stripe border
|
||||
ref="MaleFemaleTab"
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini" fixed>
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px" fixed></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionname" header-align="center"
|
||||
align="center" fixed show-overflow-tooltip width="250px"></el-table-column>
|
||||
<el-table-column label="甲组" header-align="center" v-if="tableColumns.length>0">
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="乙组" header-align="center" v-if="tableColumns2.length>0">
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns2"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="丙组" header-align="center" v-if="tableColumns3.length>0">
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns3"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="丁组" header-align="center" v-if="tableColumns4.length>0">
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns4"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="团体" header-align="center" v-if="tableColumns5.length>0">
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns5"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="总分" prop="totalScore" header-align="center"
|
||||
align="center" show-overflow-tooltip fixed="right"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" show-overflow-tooltip label="名次"
|
||||
width="80px" fixed="right"></el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
Form: {
|
||||
type: Object,
|
||||
default: {},
|
||||
}
|
||||
},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
maxHeight: 0,
|
||||
tableColumns2: [],
|
||||
tableColumns3: [],
|
||||
tableColumns4: [],
|
||||
tableColumns5: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
/* const tabHeight = document.getElementById("app").clientHeight - (this.$refs.MaleFemaleTab.$el.offsetTop + 60)
|
||||
this.$nextTick(()=>{
|
||||
this.maxHeight = tabHeight
|
||||
})*/
|
||||
},
|
||||
methods: {
|
||||
async isMaleFemale() {
|
||||
|
||||
this.tableColumns = []
|
||||
this.tableColumns2 = []
|
||||
this.tableColumns3 = []
|
||||
this.tableColumns4 = []
|
||||
this.tableColumns5 = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/isMaleFemale", this.Form)
|
||||
data.eventList.forEach(v => {
|
||||
if (v.baname == "甲组" || v.baname == "乙组" || v.baname == "丙组" || v.baname == "丁组") {
|
||||
this.tableColumns.push({label: v.isMenWomen ? v.label.substr(4) : v.label.substr(2), prop: v.label})
|
||||
} else {
|
||||
|
||||
this.tableColumns5.push({label: v.label, prop: v.label})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
this.tableData = data.score.sort(this.compare("totalScore"))
|
||||
if (this.Form.unionname) {
|
||||
this.tableData = this.tableData.filter(v => v.unionname == this.Form.unionname)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
compare(prop) {
|
||||
return function (obj1, obj2) {
|
||||
const val1 = obj1[prop];
|
||||
const val2 = obj2[prop];
|
||||
if (val1 > val2) {
|
||||
return -1;
|
||||
} else if (val1 < val2) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<el-table :data="tableData" style="width: 100%;height: 100%" stripe border
|
||||
ref="MaleFemaleTab"
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini" fixed >
|
||||
<!--:max-height="maxHeight"-->
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px" fixed></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionname" header-align="center"
|
||||
align="center" fixed show-overflow-tooltip></el-table-column>
|
||||
|
||||
<el-table-column label="总分" prop="totalScore" header-align="center"
|
||||
align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="名次"
|
||||
width="80px" ></el-table-column>
|
||||
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
Form: {
|
||||
type: Object,
|
||||
default: {},
|
||||
}
|
||||
},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
maxHeight: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
/*const tabHeight = document.getElementById("app").clientHeight - (this.$refs.MaleFemaleTab.$el.offsetTop + 60)
|
||||
this.$nextTick(() => {
|
||||
this.maxHeight = tabHeight
|
||||
})*/
|
||||
},
|
||||
methods: {
|
||||
async isScoreTopEight() {
|
||||
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isScoreTopEight", this.Form)
|
||||
const table = data.score.sort(this.compare("totalScore"))
|
||||
this.tableData = table.slice(0, 8)
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
compare(prop) {
|
||||
return function (obj1, obj2) {
|
||||
const val1 = obj1[prop];
|
||||
const val2 = obj2[prop];
|
||||
if (val1 > val2) {
|
||||
return -1;
|
||||
} else if (val1 < val2) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,93 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <el-table :data="tableData" style="width: 100%" stripe border
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="名次"
|
||||
width="100px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>-->
|
||||
<table class="table table-bordered" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center!important;">项目</th>
|
||||
<th style="text-align: center!important;" v-for="i in 8">第{{ i }}名</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="i in tableData">
|
||||
<td align="center" width="20%">{{ i.label }}</td>
|
||||
<td v-for="x in 8" align="center" width="10%">
|
||||
{{ getTableTdContent(i.sss, x) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
Form: {
|
||||
type: Object,
|
||||
default: {},
|
||||
}
|
||||
},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableTdContent(d, i) {
|
||||
return d.filter(v => {
|
||||
if (v.ranking == i) {
|
||||
return v.username
|
||||
}
|
||||
}).map(v => {
|
||||
return v.username
|
||||
}).toString()
|
||||
},
|
||||
async isTopEight() {
|
||||
var loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据正在查询中,请稍后...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isTopEight", this.Form)
|
||||
data.eventList.map(v => {
|
||||
v.sss = []
|
||||
data.userList.map(x => {
|
||||
if (v.label === x.allname) {
|
||||
console.log(x)
|
||||
v.sss.push(x)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this.tableData = data.eventList
|
||||
loading.close();
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="自动计算得分" :visible.sync="show_modal" :close-on-click-modal="false">
|
||||
<el-table :data="tableData" v-loading="loading" element-loading-text="智能查分中"
|
||||
element-loading-spinner="el-icon-loading text-primary"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)">
|
||||
<el-table-column type="index"></el-table-column>
|
||||
<el-table-column v-for="column in tableColumn"
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
show-overflow-tooltip
|
||||
header-align="center"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<el-button @click="closeCalcTable">取 消</el-button>
|
||||
<el-button type="primary" @click="autoFillTab" :disabled="loading">自动计算填入</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
relation_year: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
show_modal: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
tableData: [],
|
||||
tableColumn: [],
|
||||
proposalTableColumn: [
|
||||
{label: '提案编号', prop: 'proposalCode'},
|
||||
{label: '提案名称', prop: 'proposalName'},
|
||||
{label: '提案人', prop: 'username'},
|
||||
{label: '提案时间', prop: 'createTime'},
|
||||
{label: '教代会届次', prop: 'jdhallname'}
|
||||
],
|
||||
secTeaMeetTableColumn: [
|
||||
{label: '会议名称', prop: 'meeting_name'},
|
||||
{label: '会议时间', prop: 'meeting_time'},
|
||||
{label: '届次', prop: 'jdhallname'},
|
||||
{label: '申请人', prop: 'username'},
|
||||
],
|
||||
ConTableColumn: [
|
||||
{label: '被慰问/补助人', prop: 'be_username'},
|
||||
{label: '被慰问/补助人', prop: 'be_loginname'},
|
||||
{label: '申请时间', prop: 'apply_time'},
|
||||
{label: '慰问/补助类型', prop: 'typename'},
|
||||
{label: '类型', prop: 'querytype'},
|
||||
],
|
||||
PerformanceTableColumn: [
|
||||
{label: '获奖活动', prop: 'activityName'},
|
||||
{label: '获奖项目', prop: 'eventName'},
|
||||
{label: '获奖名次', prop: 'ranking'},
|
||||
{label: '获奖积分', prop: 'integral'},
|
||||
{label: '参加人数', prop: 'numberOfPeople'},
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
relation_year: {
|
||||
async handler(v) {
|
||||
switch (v.bz_relation_id) {
|
||||
case 'proposal':
|
||||
this.tableColumn = this.proposalTableColumn
|
||||
break
|
||||
case 'secteameet':
|
||||
this.tableColumn = this.secTeaMeetTableColumn
|
||||
break
|
||||
case 'ConandDif':
|
||||
this.tableColumn = this.ConTableColumn
|
||||
break
|
||||
case 'Performance':
|
||||
this.tableColumn = this.PerformanceTableColumn
|
||||
break
|
||||
default:
|
||||
this.tableColumn = []
|
||||
}
|
||||
|
||||
this.tableData = []
|
||||
this.loading = true
|
||||
const res = await $.get('/platform/TradeUnionAssessmentCalcScore/CalcScore', v)
|
||||
if (res.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.loading = false
|
||||
this.tableData = res.data == null ? [] : res.data
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
immediate: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
autoFillTab() {
|
||||
// this.$emit('get_score_item_num', this.tableData.length)
|
||||
this.$emit('get_table_data', this.tableData)
|
||||
this.$emit('update:show_modal', false)
|
||||
},
|
||||
closeCalcTable() {
|
||||
this.$emit('update:show_modal', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/**
|
||||
修改el-dialog样式
|
||||
*/
|
||||
.el-dialog__wrapper {
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
.el-dialog {
|
||||
margin-top: 5vh !important;
|
||||
/*height: 90vh;*/
|
||||
max-height: 90vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.el-dialog .el-dialog__header {
|
||||
height: 54px;
|
||||
max-height: 54px;
|
||||
}
|
||||
|
||||
/**
|
||||
header + footer
|
||||
(54 + 70) = 124px
|
||||
*/
|
||||
.el-dialog .el-dialog__body {
|
||||
overflow-y: auto !important;
|
||||
max-height: calc(90vh - 124px) !important;
|
||||
}
|
||||
|
||||
.el-dialog .el-dialog__footer {
|
||||
height: 70px;
|
||||
max-height: 70px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,423 @@
|
||||
<template>
|
||||
|
||||
<el-form class="el_form" :model="formData" ref="addForm" :rules="formRules" label-width="100px">
|
||||
<table-tool label="指标信息"></table-tool>
|
||||
<template v-if="!is_view">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="annual" label="年  度">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
:picker-options="pickerOptions"
|
||||
v-model="formData.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="assessment" label="考核名称">
|
||||
<el-input maxlength="30" v-model="formData.assessment" placeholder="请输入考核名称" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="assessment" label="">
|
||||
<el-checkbox v-model="formData.isEvaluationIndex">是否采用往年考核指标</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="zbId" label="往年指标" v-if="formData.isEvaluationIndex">
|
||||
<el-select v-model="formData.zbId" placeholder="请选择指标" filterable clearable
|
||||
style="width: 100%" @change="getByZbData">
|
||||
<el-option
|
||||
v-for="item in zbList"
|
||||
:key="item.id"
|
||||
:label="item.annual+item.assessment"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="fillTime" label="填报时间">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.fillTimeRange"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="填报开始时间"
|
||||
end-placeholder="填报结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="appealTime" label="申诉时间">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.appealTimeRange"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="申诉开始时间"
|
||||
end-placeholder="申诉结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-descriptions border class="descriptions-form" v-if="is_view" :column="2">
|
||||
<el-descriptions-item label="年度">{{ formData.annual }}</el-descriptions-item>
|
||||
<el-descriptions-item label="考核名称">{{ formData.assessment }}</el-descriptions-item>
|
||||
<el-descriptions-item label="填报时间">{{ formData.startDateTime }} 至 {{ formData.endDateTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申诉时间">{{ formData.startApplyTime }} 至 {{ formData.endApplyTime }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<table-tool label="考核内容" class="mt10"></table-tool>
|
||||
|
||||
<el-form-item label="" label-width="0" v-for="(nr,idx) in formData.nrs" :key="idx">
|
||||
<el-row type="flex" justify="space-between">
|
||||
<div style="width: 80%">
|
||||
<el-input v-model="nr.content" :disabled="is_view" maxlength="30" style="width: 68%" placeholder="请填写考核内容">
|
||||
<template slot="prepend"><span>{{ idx + 1 }}</span></template>
|
||||
</el-input>
|
||||
<el-select v-model="nr.auditUser" :disabled="is_view" placeholder="请根据姓名或工号选择审核人" style="width: 300px"
|
||||
remote reserve-keyword :remote-method="selectUser"
|
||||
clearable filterable>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.loginName"
|
||||
:label="item.userName + item.loginName + '(' + item.unitName + ')'"
|
||||
:value="item.loginName">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</div>
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<el-button v-if="!is_view" size="small" icon="el-icon-plus" type="primary"
|
||||
@click="formData.nrs.push({bzs:[{}], auditUser: ''})">
|
||||
添加内容
|
||||
</el-button>
|
||||
<el-button v-if="!is_view" size="small" :disabled="formData.nrs.length<=1" type="danger"
|
||||
@click="formData.nrs.splice(idx,1)" icon="el-icon-delete">
|
||||
</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary :summary-method="getSummaries" size="small">
|
||||
<el-table-column label="序号" type="index" width="50px">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核标准" prop="inspection" >
|
||||
<template v-slot="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.inspection" placeholder="请填写考核标准"></el-input>
|
||||
<span v-else>{{ row.inspection }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="单项分" prop="single_score" width="200px">
|
||||
<template v-slot="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.single_score" placeholder="请填写单项分"></el-input>
|
||||
<span v-else>{{ row.single_score }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="标准分" prop="score" width="200px">
|
||||
<template v-slot="{row}">
|
||||
<el-input v-if="!is_view" v-model.number="row.score" maxlength="4" placeholder="请填写标准分"></el-input>
|
||||
<span v-else>{{ row.score }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核验收方式" prop="remark" width="300px">
|
||||
<template v-slot="{row}">
|
||||
<el-input v-if="!is_view" v-model.number="row.remark" placeholder="请填写考核验收方式"></el-input>
|
||||
<span v-else>{{ row.remark }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="能否超过标准分" prop="beyond_highestscore" width="120px">
|
||||
<template v-slot="{row}">
|
||||
<el-switch
|
||||
v-if="!is_view"
|
||||
v-model="row.beyond_highestscore"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
<el-switch
|
||||
v-else
|
||||
disabled
|
||||
v-model="row.beyond_highestscore">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="是否提供佐证材料" prop="isEvidence" width="120px">
|
||||
<template v-slot="{row}">
|
||||
<el-switch
|
||||
v-if="!is_view"
|
||||
v-model="row.isEvidence"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
<el-switch
|
||||
v-else
|
||||
disabled
|
||||
v-model="row.isEvidence">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="关联模块" prop="associatedmodule" width="200px">-->
|
||||
<!-- <template v-slot="{row}">-->
|
||||
<!-- <el-input v-if="!is_view" v-model="row.associatedmodule" maxlength="10" placeholder="请填写关联模块"></el-input>-->
|
||||
<!-- <span v-else>{{ row.associatedmodule }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<!-- <el-table-column label="关联标识" prop="bz_relation_id" width="100px">-->
|
||||
<!-- <template v-slot="{row}">-->
|
||||
<!-- <el-input v-if="!is_view" v-model="row.bz_relation_id" maxlength="20" placeholder="请填写关联标识,该标识唯一"></el-input>-->
|
||||
<!-- <span v-else>{{ row.bz_relation_id }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<!-- <el-table-column label="能否删除" prop="canDelete" width="100px">-->
|
||||
<!-- <template v-slot="{row}">-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-if="!is_view"-->
|
||||
<!-- :disabled="row.canDelete==false"-->
|
||||
<!-- v-model="row.canDelete"-->
|
||||
<!-- active-color="#13ce66"-->
|
||||
<!-- inactive-color="#ff4949">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-else-->
|
||||
<!-- :disabled="!row.canDelete && row.id"-->
|
||||
<!-- v-model="row.canDelete">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column v-if="!is_view" label="操作" width="100px">
|
||||
<template v-slot="{row,$index}">
|
||||
<el-button size="mini" :disabled="nr.bzs.length<=1 || (!row.canDelete && row.id !== null)" type="danger" icon="el-icon-delete"
|
||||
@click="nr.bzs.splice($index,1)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<el-button v-if="!is_view" type="primary" plain style="width: 100%" size="mini" icon="el-icon-plus"
|
||||
@click="nr.bzs.push({})">
|
||||
添加考核标准
|
||||
</el-button>
|
||||
|
||||
<el-divider></el-divider>
|
||||
</el-row>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const METHOD_NAME = "change"
|
||||
|
||||
module.exports = {
|
||||
props: {
|
||||
is_view: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
form_data: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
return {
|
||||
nrs: [{
|
||||
bzs: [{}],
|
||||
auditUser: '',
|
||||
}],
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
formData: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
this.$emit(METHOD_NAME, val)
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isEvaluationIndex: false,
|
||||
zbList: [],
|
||||
formRules: {
|
||||
xxx: [{required: true, message: '请填写年度', trigger: ['blur', 'change']}],
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
relationData:[
|
||||
{moduleName:'提案系统模块',id:'proposal'},
|
||||
{moduleName:'二级教代会',id:'secteameet'},
|
||||
{moduleName:'慰问/补助',id:'ConandDif'},
|
||||
],
|
||||
formData:{},
|
||||
userOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async selectUser(query) {
|
||||
if (query) {
|
||||
this.userOptions = []
|
||||
this.userOptions = await this.getUserList(query)
|
||||
}
|
||||
},
|
||||
async getUserList(query) {
|
||||
const resp = await this.$axios.post("/platform/ghkh/Xjkhzb/getUserByKeyWord", {
|
||||
keyWord: query,
|
||||
})
|
||||
return resp.data
|
||||
},
|
||||
async getByZbData() {
|
||||
this.$axios.post('/platform/ghkh/khzb/edit', {id: this.formData.zbId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this.formData, "nrs", res.data.nrs)
|
||||
}
|
||||
})
|
||||
},
|
||||
async getZbList() {
|
||||
this.$axios.post("/platform/ghkh/Xjkhzb/getZbList").then(res => {
|
||||
if (res.code === 0) {
|
||||
this.zbList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
async getKh() {
|
||||
this.$axios.post("/platform/ghkh/khph/getKh", {"annual": this.formData.annual}).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (res.data.length != 0) {
|
||||
this.kh = res.data
|
||||
this.data.khid = this.kh[0].id
|
||||
} else {
|
||||
this.kh = []
|
||||
this.pageForm.khid = ""
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async khSearch() {
|
||||
await this.getKh()
|
||||
},
|
||||
getSummaries(param) {
|
||||
const {columns, data} = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '小计';
|
||||
return;
|
||||
} else if ([1,4,5,6,7].includes(index)) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += ' 分';
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.getZbList()
|
||||
if (!this.form_data || !Object.keys(this.form_data).length) {
|
||||
this.formData = {
|
||||
nrs: [{
|
||||
bzs: [{}],
|
||||
auditUser: '',
|
||||
}],
|
||||
}
|
||||
} else {
|
||||
this.formData = this.form_data
|
||||
// 初始化时间范围数据用于编辑
|
||||
if (this.formData.startDateTime && this.formData.endDateTime) {
|
||||
this.$set(this.formData, 'fillTimeRange', [this.formData.startDateTime, this.formData.endDateTime]);
|
||||
}
|
||||
if (this.formData.startApplyTime && this.formData.endApplyTime) {
|
||||
this.$set(this.formData, 'appealTimeRange', [this.formData.startApplyTime, this.formData.endApplyTime]);
|
||||
}
|
||||
// 回显审核人
|
||||
if (this.formData.nrs.length > 0) {
|
||||
const users = [...new Set(
|
||||
this.formData.nrs
|
||||
.map(o => o.auditUser)
|
||||
.filter(o => o != null && o !== '')
|
||||
)]
|
||||
let array = []
|
||||
for (const o of users) {
|
||||
array = array.concat(await this.getUserList(o))
|
||||
}
|
||||
this.userOptions = array
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.fixedBox {
|
||||
position: fixed;
|
||||
top: 200px;
|
||||
right: 10px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #409EFF;
|
||||
}
|
||||
|
||||
.el_form {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-input-group__prepend {
|
||||
background-color: #419BF8;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.el-descriptions-item__content {
|
||||
width: 300px;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.el-descriptions-item__label.is-bordered-label {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<el-form :model="data" ref="form" :rules="formRules" label-width="100px">
|
||||
|
||||
<el-form-item prop="nr" label="考核内容">
|
||||
<el-input disabled v-model="data.nr" type="text"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="bz" label="考核标准">
|
||||
<el-input disabled v-model="data.bz" type="textarea" :autosize="{ minRows: 2, maxRows: 10}"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="remark" label="考核验收方式">
|
||||
<el-input disabled v-model="data.remark" type="textarea" :autosize="{ minRows: 2, maxRows: 10}"
|
||||
placeholder="暂无考核验收方式"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="clnr" label="材料说明">
|
||||
<el-input v-model="data.clnr" type="textarea" :autosize="{ minRows: 2, maxRows: 10}"
|
||||
placeholder="暂无材料说明" :disabled="is_view"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="佐证材料">
|
||||
<template v-if="is_view">
|
||||
<span v-if="!data.files">暂无佐证材料</span>
|
||||
<file-preview v-else :files="data.files" complete_result></file-preview>
|
||||
</template>
|
||||
<template v-else>
|
||||
<file-upload
|
||||
:value.sync="data.files"
|
||||
:upload_number="50"
|
||||
upload_mode="drag"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
:accept="'.pdf,.doc,.docx,.jpg,.png'"
|
||||
></file-upload>
|
||||
</template>
|
||||
</el-form-item>
|
||||
|
||||
<slot name="extra"></slot>
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
const METHOD_NAME = "change"
|
||||
|
||||
module.exports = {
|
||||
props: {
|
||||
is_view: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
width: "200px",
|
||||
data: {
|
||||
type: Object,
|
||||
default: {
|
||||
files: () => [],
|
||||
}
|
||||
},
|
||||
},
|
||||
// components: {
|
||||
// 'file-upload': httpVueLoader('/components/plugins/FileUpload.vue')
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
formRules: {
|
||||
xxx: [{required: true, message: '', trigger: ['blur', 'change']}]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,282 @@
|
||||
<template>
|
||||
<el-form class="el_form" :model="data" ref="addForm" :rules="formRules" label-width="100px">
|
||||
<vi-title title="指标信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="annual" label="年  度">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-if="!is_view"
|
||||
:picker-options="pickerOptions"
|
||||
v-model="data.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
<el-input v-else style="color: #F6F7FA;" disabled v-model="data.annual"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="assessment" label="考核名称">
|
||||
<el-input maxlength="30" v-if="!is_view" v-model="data.assessment" placeholder="请填写考核名称"
|
||||
type="text">
|
||||
</el-input>
|
||||
<el-input v-else style="color: #F6F7FA;" disabled v-model="data.assessment"></el-input>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="assessment" label="" v-if="!is_view">
|
||||
<el-checkbox v-model="data.isEvaluationIndex">是否采用往年考核指标</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item prop="zbId" label="往年指标" v-show="data.isEvaluationIndex">
|
||||
<el-select v-model="data.zbId" placeholder="请选择指标" filterable clearable
|
||||
style="width: 100%" @change="getByZbData">
|
||||
<el-option
|
||||
v-for="item in zbList"
|
||||
:key="item.id"
|
||||
:label="item.annual+item.assessment"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<vi-title2 title="考核项目">
|
||||
<template #func>
|
||||
<el-button v-if="!is_view" size="small" style="float: right" icon="el-icon-plus" type="primary"
|
||||
@click="data.nrs.push({bzs:[{}]})">
|
||||
添加内容
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
|
||||
<el-form-item label="" label-width="0" v-for="nr,idx in data.nrs">
|
||||
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<el-input v-model="nr.content" v-if="!is_view" maxlength="30" style="width: 50%" placeholder="请填写考核项目">
|
||||
<template slot="prepend"><span v-model="nr.contentNumber">{{ nr.contentNumber = idx + 1 }}</span></template>
|
||||
</el-input>
|
||||
<span style="background-color: #F6F7FA;" v-else>{{ idx + 1 }} {{ nr.content }}</span>
|
||||
<el-button v-if="!is_view" size="medium" :disabled="data.nrs.length<=1" type="danger"
|
||||
@click="data.nrs.splice(idx,1)"
|
||||
icon="el-icon-delete"></el-button>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary :summary-method="getSummaries" size="small">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index" width="70px">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考评内容" prop="inspection" header-align="center" align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.inspection" placeholder="请填写考核标准"
|
||||
maxlength="500" type="textarea" autosize></el-input>
|
||||
<span v-else>{{ row.inspection }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="评分标准" prop="scoringCriteria" header-align="center" align="center" width="300px"
|
||||
min-width="200">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.scoringCriteria" placeholder="请填写评分标准"
|
||||
maxlength="250" type="textarea" autosize></el-input>
|
||||
<span v-else>{{ row.scoringCriteria }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="项目自评(分数)" prop="score" header-align="center" align="center" width="120px">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" type="number" v-model.number="row.score" maxlength="4"
|
||||
placeholder="请填写项目自评"></el-input>
|
||||
<span v-else>{{ row.score }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核办法" prop="assessmentMethod" header-align="center" align="center" width="300px">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="!is_view" v-model="row.assessmentMethod" maxlength="50"
|
||||
placeholder="请填写考核办法"></el-input>
|
||||
<span v-else>{{ row.assessmentMethod }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="是否提供佐证材料" prop="isEvidence" header-align="center" align="center"-->
|
||||
<!-- width="120px">-->
|
||||
<!-- <template scope="{row}">-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-if="!is_view"-->
|
||||
<!-- v-model="row.isEvidence"-->
|
||||
<!-- active-color="#13ce66"-->
|
||||
<!-- inactive-color="#ff4949">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-else-->
|
||||
<!-- disabled-->
|
||||
<!-- v-model="row.isEvidence">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
|
||||
<el-table-column v-if="!is_view" label="操作" header-align="center" align="center" width="100px">
|
||||
<template slot="header" scope="{row,$index}">
|
||||
<el-button size="mini" icon="el-icon-plus" type="primary" @click="nr.bzs.push({})" title="添加考评内容"></el-button>
|
||||
</template>
|
||||
<template scope="{row,$index}">
|
||||
<el-button size="mini" :disabled="nr.bzs.length<=1 || (!row.canDelete && row.id)" type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="nr.bzs.splice($index,1)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<!-- <el-button v-if="!is_view" type="primary" plain style="width: 100%" size="mini" icon="el-icon-plus"-->
|
||||
<!-- @click="nr.bzs.push({})">-->
|
||||
<!-- 添加考核标准-->
|
||||
<!-- </el-button>-->
|
||||
|
||||
<!-- <el-divider></el-divider>-->
|
||||
</el-row>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const METHOD_NAME = "change"
|
||||
|
||||
module.exports = {
|
||||
props: {
|
||||
is_view: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: {
|
||||
nrs: [{
|
||||
bzs: [{}]
|
||||
}],
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
data: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
this.$emit(METHOD_NAME, val)
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isEvaluationIndex: false,
|
||||
zbList: [],
|
||||
formRules: {
|
||||
xxx: [{required: true, message: '请填写年度', trigger: ['blur', 'change']}],
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
relationData: [
|
||||
{moduleName: '提案系统模块', id: 'proposal'},
|
||||
{moduleName: '二级教代会', id: 'secteameet'},
|
||||
{moduleName: '慰问/补助', id: 'ConandDif'},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getByZbData() {
|
||||
const {code, data, msg} = await $.get('/platform/xhkh/khzb/edit', {id: this.data.zbId})
|
||||
this.$set(this.data, "nrs", data.nrs)
|
||||
},
|
||||
async getZbList() {
|
||||
await $.get("/platform/xhkh/Xjkhzb/getZbList").then(res => {
|
||||
this.zbList = res.data
|
||||
})
|
||||
},
|
||||
async getKh() {
|
||||
await $.get("/platform/xhkh/khph/getKh", {"annual": this.data.annual}).then(res => {
|
||||
if (res.data.length != 0) {
|
||||
this.kh = res.data
|
||||
this.data.khid = this.kh[0].id
|
||||
} else {
|
||||
this.kh = []
|
||||
this.pageForm.khid = ""
|
||||
}
|
||||
})
|
||||
},
|
||||
async khSearch() {
|
||||
await this.getKh()
|
||||
},
|
||||
getSummaries(param) {
|
||||
const {columns, data} = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '小计';
|
||||
return;
|
||||
} else if ([1, 4, 5, 6, 7].includes(index)) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += ' 分';
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getZbList()
|
||||
if (!this.data || !Object.keys(this.data).length) {
|
||||
this.data = {
|
||||
nrs: [{
|
||||
bzs: [{}]
|
||||
}],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.fixedBox {
|
||||
position: fixed;
|
||||
top: 200px;
|
||||
right: 10px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #409EFF;
|
||||
}
|
||||
|
||||
.el_form {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,51 @@
|
||||
/** *Desc: *Create by: jug *Create time:2023/6/8/10:29 */
|
||||
<template>
|
||||
<div>
|
||||
<el-input v-model="cnd.memberSearchKeyWord" placeholder="请输入值" style="width: 100%">
|
||||
<el-select v-model="cnd.memberSearchName" slot="prepend" placeholder="字段" style="width: 80px">
|
||||
<el-option
|
||||
v-for="column in columnInfos"
|
||||
:key="column.COLUMN_NAME"
|
||||
:label="column.COLUMN_COMMENT"
|
||||
:value="column.COLUMN_NAME"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "MemberCnd",
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
columnInfos: [],
|
||||
cnd: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cnd: {
|
||||
handler(val) {
|
||||
this.$emit("cnd", val)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getColumnInfo() {
|
||||
const { data, msg, code } = await $.post("/platform/activity/basic/scope/getUserTableColumnInfo")
|
||||
if (code !== 0) {
|
||||
this.$notify.warning(msg)
|
||||
return
|
||||
}
|
||||
this.columnInfos = data
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getColumnInfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,195 @@
|
||||
<style>
|
||||
.field .van-field__error-message {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div>
|
||||
<van-form @submit="onSubmit" ref="form">
|
||||
|
||||
<template v-for="column in dynamicData">
|
||||
<!-- 文本、数值、时间 -->
|
||||
<template v-if="['CHAR', 'VARCHAR', 'TEXT', 'INT', 'DATE', 'DATETIME'].includes(column.columnType)">
|
||||
<van-field
|
||||
class="field"
|
||||
v-model="column.columnValue"
|
||||
:clickable="['SELECT'].includes(column.columnFormType)"
|
||||
:label="column.columnName"
|
||||
:name="column.columnCode"
|
||||
:type="['INT'].includes(column.columnType) ? 'digit' : ''"
|
||||
:placeholder="(['SELECT'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName"
|
||||
:readonly="['SELECT'].includes(column.columnFormType)"
|
||||
:rules="[{ required: column.isRequired, message: (['SELECT'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName }]"
|
||||
:required="column.isRequired"
|
||||
@click="selectFieldClick(column)"
|
||||
>
|
||||
<template v-if="['STEPPER'].includes(column.columnFormType)" #input>
|
||||
<van-stepper v-model="column.columnValue" :max="3" :min="1"/>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-popup
|
||||
v-if="['SELECT'].includes(column.columnFormType)"
|
||||
v-model="pickerStates[column.columnCode + 'Picker']"
|
||||
position="bottom"
|
||||
>
|
||||
<template v-if="['DATETIME', 'DATE'].includes(column.columnType)">
|
||||
<van-datetime-picker
|
||||
:title="column.columnName"
|
||||
:type="column.columnType.toLocaleLowerCase()"
|
||||
show-toolbar
|
||||
@cancel="
|
||||
pickerStates[column.columnCode + 'Picker'] = false
|
||||
column.columnValue = ''
|
||||
"
|
||||
@confirm="
|
||||
(time) => {
|
||||
dateTimePickerConfirm(time, column)
|
||||
}
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-picker
|
||||
:columns="column.selectValues"
|
||||
:title="column.columnName"
|
||||
show-toolbar
|
||||
@cancel="
|
||||
pickerStates[column.columnCode + 'Picker'] = false
|
||||
column.columnValue = ''
|
||||
"
|
||||
@confirm="
|
||||
(value) => {
|
||||
ordinaryPickerConfirm(value, column)
|
||||
}
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
</van-popup>
|
||||
</template>
|
||||
<!-- 单选框 -->
|
||||
<template v-else-if="['BOOLEAN'].includes(column.columnType)"></template>
|
||||
<!-- 文件 -->
|
||||
<template v-else-if="['JSON'].includes(column.columnType)">
|
||||
<van-field
|
||||
:required="column.isRequired"
|
||||
:label="column.columnName"
|
||||
:rules="[{ required: column.isRequired, message: '请上传' + column.columnName }]"
|
||||
>
|
||||
<template #input>
|
||||
<!-- <van-uploader v-model="fileList" :after-read="(file)=>{fileAfterRead(file,column)}"
|
||||
:max-count="column.fileNumber"/>-->
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="column.columnValue"
|
||||
:upload_number="column.fileNumber"
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</van-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 请在van-form中引用 -->
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "TrainDynamicForm",
|
||||
components: {},
|
||||
props: {
|
||||
dynamicData: []
|
||||
},
|
||||
model: {
|
||||
prop: "dynamicData",
|
||||
event: "updateDynamicData"
|
||||
},
|
||||
watch: {
|
||||
dynamicData: {
|
||||
handler: function (newValue, oldValue) {
|
||||
this.$emit("updateDynamicData", newValue)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//所有的picker状态
|
||||
pickerStates: {},
|
||||
fileList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async validForm() {
|
||||
try {
|
||||
this.$refs.form.validate().then(() => {
|
||||
return true
|
||||
}).catch(() => {
|
||||
return false
|
||||
})
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
},
|
||||
async onSubmit() {
|
||||
|
||||
},
|
||||
selectFieldClick(column) {
|
||||
this.$set(this.pickerStates, column.columnCode + "Picker", true)
|
||||
if (!["DATE", "DATETIME"].includes(column.columnType)) {
|
||||
//说明是普通的下拉框
|
||||
// column.selectValues = ['1', '2', '3']
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 时间picker确认
|
||||
* @param time
|
||||
* @param column
|
||||
*/
|
||||
dateTimePickerConfirm(time, column) {
|
||||
if (column.columnType === "DATE") {
|
||||
column.columnValue = this.$moment(time).format("YYYY-MM-DD")
|
||||
} else if (column.columnType === "DATETIME") {
|
||||
column.columnValue = this.$moment(time).format("YYYY-MM-DD HH:mm:ss")
|
||||
} else {
|
||||
//预留别的类型
|
||||
column.columnValue = this.$moment(time).format("YYYY-MM-DD HH:mm:ss")
|
||||
}
|
||||
this.pickerStates[column.columnCode + "Picker"] = false
|
||||
},
|
||||
/**
|
||||
* 普通picker确认
|
||||
* @param value
|
||||
* @param column
|
||||
*/
|
||||
ordinaryPickerConfirm(value, column) {
|
||||
column.columnValue = value
|
||||
this.pickerStates[column.columnCode + "Picker"] = false
|
||||
},
|
||||
/**
|
||||
* 文件读取
|
||||
*/
|
||||
fileAfterRead(file, column) {
|
||||
console.log(file)
|
||||
console.log(column)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log(this.dynamicData)
|
||||
// this.dynamicData.forEach(v => {
|
||||
// if (v.columnFormType === 'SELECT') {
|
||||
// v.columnPickerName = v.columnCode+'Picker'
|
||||
// }
|
||||
// })
|
||||
// console.log(this.dynamicData)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="process-title">基本信息</div>
|
||||
<el-descriptions :column="3" border class="descriptions-form">
|
||||
<el-descriptions-item label="工号">{{ viewData.loginname }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生日期">
|
||||
{{ viewData.birthday ? $moment(viewData.birthday).format("YYYY-MM-DD") : null }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
|
||||
<el-descriptions-item label="籍贯">{{ viewData.nativePlace }}</el-descriptions-item>
|
||||
<el-descriptions-item label="国籍">{{ viewData.nationality }}</el-descriptions-item>
|
||||
<el-descriptions-item label="证件类别">{{ viewData.idCardType }}</el-descriptions-item>
|
||||
<el-descriptions-item label="证件号码">{{ viewData.idCard }}</el-descriptions-item>
|
||||
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
|
||||
<el-descriptions-item label="入党时间">
|
||||
{{ viewData.joinPartyDate ? $moment(viewData.joinPartyDate).format("YYYY-MM-DD") : null }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="来校时间">
|
||||
{{ viewData.arrivalAtSchoolDate ? $moment(viewData.arrivalAtSchoolDate).format("YYYY-MM-DD") : null }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="身份类别">{{ viewData.identityType }}</el-descriptions-item>
|
||||
<el-descriptions-item label="编制类别">{{ viewData.preparedBy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教职工类别">{{ viewData.personType }}</el-descriptions-item>
|
||||
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预计离退休时间">
|
||||
{{ viewData.retireDate ? $moment(viewData.retireDate).format("YYYY-MM-DD") : null }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<div class="process-title">会员信息</div>
|
||||
<el-descriptions :column="3" border class="descriptions-form">
|
||||
<el-descriptions-item label="是否会员">
|
||||
<el-tag v-if="viewData.member === 1" size="mini" type="success">是</el-tag>
|
||||
<el-tag v-else type="info" size="mini">否</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属分工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<div class="process-title">学历信息</div>
|
||||
<el-descriptions :column="3" border class="descriptions-form">
|
||||
<el-descriptions-item label="最高学历">{{ viewData.education }}</el-descriptions-item>
|
||||
<el-descriptions-item label="最高学位">{{ viewData.academicDegree }}</el-descriptions-item>
|
||||
<el-descriptions-item label=""></el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<div class="process-title">职称信息</div>
|
||||
<el-descriptions :column="3" border class="descriptions-form">
|
||||
<el-descriptions-item label="职称">{{ viewData.technicalTitle }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职称级别">{{ viewData.technicalTitleLevel }}</el-descriptions-item>
|
||||
<el-descriptions-item label=""></el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<div class="process-title">职务信息</div>
|
||||
<el-descriptions :column="3" border class="descriptions-form">
|
||||
<el-descriptions-item label="现聘职务">{{ viewData.position }}</el-descriptions-item>
|
||||
<el-descriptions-item label="现聘职级">{{ viewData.positionLevel }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职员等级">{{ viewData.employeeLevel }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "userInfo",
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
if (!id) {
|
||||
return
|
||||
}
|
||||
this.$axios.post("/platform/member/apply/common/findOne", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user