2024-02-21 11:30:24 +08:00
|
|
|
|
<template>
|
2024-02-26 19:03:31 +08:00
|
|
|
|
<div>
|
2024-02-21 11:30:24 +08:00
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="5">
|
|
|
|
|
|
<basic-container>
|
|
|
|
|
|
<p>分组管理</p>
|
|
|
|
|
|
<div class="box" :style="{ height: leftHeight }">
|
|
|
|
|
|
<el-scrollbar style="height: 100%">
|
|
|
|
|
|
<el-tree ref="tree" node-key="id" highlight-current :expand-on-click-node="false" @node-click="nodeClick"
|
|
|
|
|
|
:data="treeData" :props="props">
|
|
|
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }" style="width: 80%">
|
|
|
|
|
|
<span style="
|
|
|
|
|
|
flex-basis: 80%;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
flex-shrink: 1;
|
|
|
|
|
|
">
|
|
|
|
|
|
{{ node.label }}
|
|
|
|
|
|
({{ data.sumNum }}人)
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span v-show="data.id && data.id !== '0'" style="flex-basis: 20%">
|
|
|
|
|
|
<el-button type="text" icon="el-icon-edit" size="mini" @click="() => updateGroups('edit', data)">
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
<el-button icon="el-icon-delete" type="text" size="mini" @click="() => removeGroups(data)">
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</el-tree>
|
|
|
|
|
|
<div class="footer" style="padding-left: 6px">
|
|
|
|
|
|
<el-button type="text" icon="el-icon-plus" @click="updateGroups('add')">新建分组</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</basic-container>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="19">
|
|
|
|
|
|
<basic-container>
|
|
|
|
|
|
<!--搜索栏-->
|
|
|
|
|
|
<el-form size="small" label-position="right" :inline="true" style="padding-left: 10px; padding-right: 10px">
|
|
|
|
|
|
<el-row :span="24">
|
2024-02-25 17:01:27 +08:00
|
|
|
|
<el-form-item label="服务名:">
|
|
|
|
|
|
<el-input v-model="query.name" placeholder="服务名" clearable></el-input>
|
2024-02-21 11:30:24 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="searchBtn">
|
|
|
|
|
|
<el-button type="primary" size="small" icon="el-icon-search" @click="searchChange1">搜 索</el-button>
|
|
|
|
|
|
<el-button size="small" icon="el-icon-delete" @click="searchReset1">清 空</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<!--/搜索栏-->
|
|
|
|
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="obj"
|
|
|
|
|
|
:permission="permissionList" :before-open="beforeOpen" @row-del="rowDel" @row-update="rowUpdate"
|
|
|
|
|
|
@row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
|
|
|
|
|
|
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
|
|
|
|
|
|
@refresh-change="refreshChange" class="customPage">
|
|
|
|
|
|
<!--自定义列-->
|
|
|
|
|
|
<template slot="worktypes" slot-scope="{ row }">
|
|
|
|
|
|
<el-tooltip effect="dark" :content="row.worktypes" placement="top">
|
|
|
|
|
|
<div>{{ row.worktypes | ellipsis }}</div>
|
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
</template>
|
2024-02-26 19:03:31 +08:00
|
|
|
|
<template slot="status" slot-scope="{ row }">
|
|
|
|
|
|
<div>
|
2024-02-27 20:33:33 +08:00
|
|
|
|
<span v-if="row.status == 1" style="color: green">
|
|
|
|
|
|
<b>{{ statusArr[row.status] }}</b>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span v-if="row.status == 0" style="color: red">
|
2024-02-26 19:03:31 +08:00
|
|
|
|
<b>{{ statusArr[row.status] }}</b>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
2024-02-21 11:30:24 +08:00
|
|
|
|
<template slot="resume" slot-scope="{ row }">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<el-button type="text" size="mini" @click="$refs.resume.openDialog(row)"
|
|
|
|
|
|
v-if="row.userId && row.userId !== '0'">查看简历</el-button>
|
|
|
|
|
|
<div v-else>暂无简历</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<!--/自定义列-->
|
2024-02-25 17:01:27 +08:00
|
|
|
|
<template slot="serveLabelsForm">
|
2024-02-21 11:30:24 +08:00
|
|
|
|
<tag-select v-model="selectedWorkTypes" :prop="{ label: 'name', value: 'name' }" :data="worktypeData">
|
|
|
|
|
|
</tag-select>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<!--自定义按钮-->
|
|
|
|
|
|
<template slot="menuLeft">
|
|
|
|
|
|
<el-button type="danger" size="small" icon="el-icon-delete" @click="handleDelete"
|
|
|
|
|
|
:disabled="!selectionList.length" plain v-show="vaildData(permission.tenant_talents_groupdelete, false)">
|
|
|
|
|
|
删除</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template slot="name" slot-scope="{row}">
|
2024-02-27 14:09:15 +08:00
|
|
|
|
<span>{{ row.name }}</span>
|
|
|
|
|
|
<!-- <span v-else>{{ row.name }}(<span style="color: red;">未实名</span>)</span> -->
|
2024-02-21 11:30:24 +08:00
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<!--/自定义按钮-->
|
2024-02-25 17:01:27 +08:00
|
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
|
|
|
|
<el-button type="text"
|
|
|
|
|
|
icon="el-icon-document"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
@click="showKeyAudience(row)"
|
2024-02-26 19:03:31 +08:00
|
|
|
|
>服务详情</el-button>
|
2024-02-27 19:21:26 +08:00
|
|
|
|
<el-button type="text"
|
|
|
|
|
|
v-if="row.status == 0"
|
|
|
|
|
|
icon="el-icon-video-play"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
@click="playServe(row)"
|
|
|
|
|
|
>启用</el-button>
|
|
|
|
|
|
<el-button type="text"
|
|
|
|
|
|
v-if="row.status == 1"
|
|
|
|
|
|
icon="el-icon-video-pause"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
@click="pauseServe(row)"
|
2024-02-27 20:33:33 +08:00
|
|
|
|
>关闭</el-button>
|
2024-02-25 17:01:27 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<!--/父子表-->
|
2024-02-21 11:30:24 +08:00
|
|
|
|
</avue-crud>
|
|
|
|
|
|
|
|
|
|
|
|
<!--批量导入-->
|
|
|
|
|
|
<el-dialog title="导入" append-to-body :visible.sync="excelBox" :close-on-click-modal="false" width="555px">
|
|
|
|
|
|
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"
|
|
|
|
|
|
:upload-before="beforeAvatarUpload" :upload-error="uploadError">
|
|
|
|
|
|
<template slot="excelTemplate">
|
|
|
|
|
|
<el-button type="primary" @click="handleTemplate()" :loading="templateLoading">
|
|
|
|
|
|
点击下载
|
|
|
|
|
|
<i class="el-icon-download el-icon--right"></i>
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</avue-form>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<!--/批量导入-->
|
|
|
|
|
|
<!--新建 编辑分组dialog-->
|
|
|
|
|
|
<add-groups ref="addGroups" @refresh="refresh" :treeData="treeData"></add-groups>
|
|
|
|
|
|
<!--/新建 编辑分组dialog-->
|
|
|
|
|
|
<!--转移分组dialog-->
|
|
|
|
|
|
<transfer-groups ref="transferGroups" @refresh="refresh" :ids="ids"></transfer-groups>
|
|
|
|
|
|
<!--/转移分组dialog-->
|
|
|
|
|
|
<resume ref="resume" v-show="false"></resume>
|
|
|
|
|
|
</basic-container>
|
|
|
|
|
|
<ied ref="ied"></ied>
|
|
|
|
|
|
</el-col>
|
2024-02-27 20:28:13 +08:00
|
|
|
|
|
2024-02-21 11:30:24 +08:00
|
|
|
|
</el-row>
|
2024-02-26 19:03:31 +08:00
|
|
|
|
<!-- <serve-detail ref="copy" @back="backIndex" v-show="false"></serve-detail> -->
|
|
|
|
|
|
<el-drawer
|
2024-02-26 21:23:17 +08:00
|
|
|
|
size="85%"
|
2024-02-26 19:03:31 +08:00
|
|
|
|
append-to-body
|
|
|
|
|
|
title="服务详情"
|
|
|
|
|
|
:visible.sync="drawer"
|
|
|
|
|
|
:direction="direction"
|
|
|
|
|
|
:before-close="handleClose">
|
|
|
|
|
|
<avue-crud
|
|
|
|
|
|
:data="infoData"
|
|
|
|
|
|
:option="infoOption"
|
2024-02-26 21:23:17 +08:00
|
|
|
|
:search.sync="search"
|
2024-02-26 19:03:31 +08:00
|
|
|
|
:page.sync="infoPage"
|
2024-02-27 20:28:13 +08:00
|
|
|
|
@search-change="serveSearchChange"
|
2024-02-26 21:23:17 +08:00
|
|
|
|
@search-reset="serveResetChange"
|
2024-02-26 19:03:31 +08:00
|
|
|
|
@size-change="infoSizeChange"
|
|
|
|
|
|
@current-change="infoCurrentChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
|
|
|
|
<el-button type="text"
|
|
|
|
|
|
icon="el-icon-document"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
@click="matchWorkStation(row)"
|
|
|
|
|
|
>匹配任务/岗位</el-button>
|
|
|
|
|
|
<el-button type="text"
|
|
|
|
|
|
icon="el-icon-document"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
@click="matchPolicy(row)"
|
|
|
|
|
|
>匹配政策</el-button>
|
|
|
|
|
|
<el-button type="text"
|
|
|
|
|
|
icon="el-icon-document"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
@click="serveLog(row)"
|
|
|
|
|
|
>服务日志</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</avue-crud>
|
|
|
|
|
|
<el-drawer
|
|
|
|
|
|
title="匹配任务/岗位"
|
|
|
|
|
|
size="80%"
|
|
|
|
|
|
:append-to-body="true"
|
|
|
|
|
|
:before-close="handleCloseWork"
|
|
|
|
|
|
:visible.sync="innerDrawer1">
|
|
|
|
|
|
<avue-crud
|
|
|
|
|
|
:data="workData"
|
|
|
|
|
|
:option="workOption"
|
|
|
|
|
|
:page.sync="workPage"
|
|
|
|
|
|
@size-change="workSizeChange"
|
|
|
|
|
|
@current-change="workCurrentChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot="missionDesc" slot-scope="{ row }">
|
2024-02-26 21:23:17 +08:00
|
|
|
|
<el-tooltip class="item" effect="dark" :content="row.missionDesc" placement="top-start">
|
|
|
|
|
|
<span>{{ row.missionDesc.length > 50 ? row.missionDesc.substring(0, 50) : row.missionDesc}}</span>
|
|
|
|
|
|
</el-tooltip>
|
2024-02-26 19:03:31 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
|
|
|
|
<el-button type="text"
|
|
|
|
|
|
icon="el-icon-document"
|
|
|
|
|
|
size="small"
|
2024-02-26 22:07:01 +08:00
|
|
|
|
@click="toWorkMissionDetail(row)"
|
2024-02-26 19:03:31 +08:00
|
|
|
|
>查看详情</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</avue-crud>
|
|
|
|
|
|
</el-drawer>
|
|
|
|
|
|
<el-drawer
|
|
|
|
|
|
title="匹配政策"
|
|
|
|
|
|
size="80%"
|
|
|
|
|
|
:append-to-body="true"
|
|
|
|
|
|
:before-close="handleClosePolicy"
|
|
|
|
|
|
:visible.sync="innerDrawer2">
|
|
|
|
|
|
<avue-crud
|
|
|
|
|
|
:data="policyData"
|
|
|
|
|
|
:option="policyOption"
|
|
|
|
|
|
:page.sync="policyPage"
|
|
|
|
|
|
@size-change="policySizeChange"
|
|
|
|
|
|
@current-change="policyCurrentChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
</avue-crud>
|
|
|
|
|
|
</el-drawer>
|
|
|
|
|
|
<el-drawer
|
|
|
|
|
|
title="服务日志"
|
|
|
|
|
|
size="80%"
|
|
|
|
|
|
:append-to-body="true"
|
|
|
|
|
|
:before-close="handleCloseLog"
|
|
|
|
|
|
:visible.sync="innerDrawer3">
|
2024-02-27 20:33:33 +08:00
|
|
|
|
<!-- <div>
|
2024-02-27 14:09:15 +08:00
|
|
|
|
<span>姓名:</span>
|
|
|
|
|
|
<span>身份证号:</span>
|
2024-02-27 20:33:33 +08:00
|
|
|
|
</div> -->
|
2024-02-26 19:03:31 +08:00
|
|
|
|
<avue-crud
|
|
|
|
|
|
:data="logData"
|
|
|
|
|
|
:option="logOption"
|
|
|
|
|
|
:page.sync="logPage"
|
|
|
|
|
|
@size-change="logSizeChange"
|
|
|
|
|
|
@current-change="logCurrentChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
</avue-crud>
|
|
|
|
|
|
</el-drawer>
|
|
|
|
|
|
</el-drawer>
|
2024-02-26 22:07:01 +08:00
|
|
|
|
<mission-view :visible.sync="viewDrawer" :model="view"></mission-view>
|
|
|
|
|
|
<work-view :visible.sync="workViewDrawer" :model="workViewModel"></work-view>
|
2024-02-26 19:03:31 +08:00
|
|
|
|
</div>
|
2024-02-21 11:30:24 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {
|
|
|
|
|
|
getList,
|
|
|
|
|
|
remove,
|
|
|
|
|
|
update,
|
|
|
|
|
|
add,
|
|
|
|
|
|
detail,
|
|
|
|
|
|
getDept,
|
|
|
|
|
|
removeDept,
|
|
|
|
|
|
upload,
|
2024-02-26 19:03:31 +08:00
|
|
|
|
getServeListTalents,
|
|
|
|
|
|
getMatchWorkStation,
|
|
|
|
|
|
getMatchPolicy,
|
|
|
|
|
|
getMatchServeList
|
2024-02-21 15:02:40 +08:00
|
|
|
|
} from "@/api/tenant/serve";
|
2024-02-26 22:07:01 +08:00
|
|
|
|
import { detail as missionDetail } from "@/api/tenant/mission";
|
|
|
|
|
|
import { detail as workDetail } from "@/api/tenant/postzp";
|
2024-02-27 20:28:13 +08:00
|
|
|
|
import {getLabelList, getWorkTypes} from "@/api/tenant/common";
|
2024-02-21 11:30:24 +08:00
|
|
|
|
import { mapGetters } from "vuex";
|
|
|
|
|
|
import addGroups from "./Dialog/addGroups";
|
|
|
|
|
|
import transferGroups from "./Dialog/transferGroups";
|
|
|
|
|
|
import Resume from "@/components/resume/index";
|
|
|
|
|
|
import { check18IdCardNo, isvalidatemobile, isExcel } from "@/util/validate";
|
|
|
|
|
|
import { getTemplate } from "@/api/resource/template";
|
|
|
|
|
|
import ied from "@/views/util/import-error-dialog";
|
|
|
|
|
|
import { excelAccept } from "@/common/accept";
|
2024-02-26 22:07:01 +08:00
|
|
|
|
import missionView from "../../mission/Table/missionView.vue";
|
|
|
|
|
|
import workView from "../../works/Table/missionView.vue"
|
2024-02-25 17:01:27 +08:00
|
|
|
|
const page = {
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
}
|
2024-02-21 11:30:24 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
filters: {
|
|
|
|
|
|
ellipsis(value) {
|
|
|
|
|
|
if (!value) return "";
|
|
|
|
|
|
if (value.length > 15) {
|
|
|
|
|
|
return value.slice(0, 14) + "...";
|
|
|
|
|
|
}
|
|
|
|
|
|
return value;
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
name: "tenant_talents",
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2024-02-26 21:23:17 +08:00
|
|
|
|
search: {
|
|
|
|
|
|
companyName: '',
|
|
|
|
|
|
name: ''
|
|
|
|
|
|
},
|
2024-02-26 22:07:01 +08:00
|
|
|
|
viewDrawer: false,
|
|
|
|
|
|
workViewDrawer: false,
|
|
|
|
|
|
view: {},
|
|
|
|
|
|
workViewModel: {},
|
2024-02-26 19:03:31 +08:00
|
|
|
|
statusArr: {
|
|
|
|
|
|
0: "未启用",
|
|
|
|
|
|
1: "服务中",
|
|
|
|
|
|
2: "已完成",
|
|
|
|
|
|
3: "关闭",
|
|
|
|
|
|
},
|
|
|
|
|
|
direction: 'rtl',
|
|
|
|
|
|
drawer: false,
|
|
|
|
|
|
innerDrawer1: false,
|
|
|
|
|
|
innerDrawer2: false,
|
|
|
|
|
|
innerDrawer3: false,
|
2024-02-21 11:30:24 +08:00
|
|
|
|
activeNames: "1",
|
|
|
|
|
|
isIndeterminate: false,
|
|
|
|
|
|
checkAll: false,
|
|
|
|
|
|
checked: false,
|
|
|
|
|
|
selectionList: [],
|
|
|
|
|
|
loading: true,
|
|
|
|
|
|
templateLoading: false,
|
|
|
|
|
|
query: {},
|
|
|
|
|
|
props: {
|
|
|
|
|
|
label: "groupName",
|
|
|
|
|
|
id: "id",
|
|
|
|
|
|
},
|
|
|
|
|
|
personTotal: 0,
|
|
|
|
|
|
treeData: [],
|
|
|
|
|
|
tenantId: "",
|
2024-02-25 17:01:27 +08:00
|
|
|
|
page: Object.assign({} ,page),
|
2024-02-21 11:30:24 +08:00
|
|
|
|
tempWorkType: [],
|
|
|
|
|
|
worktypeDic: {},
|
|
|
|
|
|
arr: [],//////
|
|
|
|
|
|
excelOption: {
|
|
|
|
|
|
submitBtn: false,
|
|
|
|
|
|
emptyBtn: false,
|
|
|
|
|
|
column: [
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "文件上传",
|
|
|
|
|
|
prop: "excelFile",
|
|
|
|
|
|
type: "upload",
|
|
|
|
|
|
drag: true,
|
|
|
|
|
|
loadText: "文件上传中,请稍等",
|
|
|
|
|
|
span: 24,
|
|
|
|
|
|
propsHttp: {
|
|
|
|
|
|
res: "data",
|
|
|
|
|
|
},
|
|
|
|
|
|
tip: "请上传 .xls,.xlsx 标准格式文件",
|
|
|
|
|
|
accept: excelAccept,
|
|
|
|
|
|
showFileList: false,
|
|
|
|
|
|
action: upload(),
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "模板下载",
|
|
|
|
|
|
prop: "excelTemplate",
|
|
|
|
|
|
formslot: true,
|
|
|
|
|
|
span: 24,
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
},
|
|
|
|
|
|
excelBox: false,
|
|
|
|
|
|
data: [],
|
2024-02-25 17:01:27 +08:00
|
|
|
|
visibleAudience: false,
|
|
|
|
|
|
selectInfo: null,
|
|
|
|
|
|
infoData: [],
|
2024-02-26 19:03:31 +08:00
|
|
|
|
workData: [],
|
|
|
|
|
|
policyData: [],
|
|
|
|
|
|
logData: [],
|
2024-02-25 17:01:27 +08:00
|
|
|
|
infoPage: Object.assign({} ,page),
|
2024-02-26 19:03:31 +08:00
|
|
|
|
workPage: Object.assign({} ,page),
|
|
|
|
|
|
policyPage: Object.assign({} ,page),
|
|
|
|
|
|
logPage: Object.assign({} ,page),
|
2024-02-21 11:30:24 +08:00
|
|
|
|
obj: {},
|
|
|
|
|
|
excelForm: { isCovered: 1 },
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
2024-02-26 22:07:01 +08:00
|
|
|
|
components: { addGroups, transferGroups, Resume, ied, missionView, workView},
|
2024-02-21 11:30:24 +08:00
|
|
|
|
watch: {},
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
...mapGetters(["permission"]),
|
|
|
|
|
|
permissionList() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
addBtn: this.vaildData(this.permission.tenant_talents_groupadd, false),
|
|
|
|
|
|
viewBtn: true,
|
|
|
|
|
|
delBtn: this.vaildData(
|
|
|
|
|
|
this.permission.tenant_talents_groupdelete,
|
|
|
|
|
|
false
|
|
|
|
|
|
),
|
|
|
|
|
|
editBtn: this.vaildData(
|
|
|
|
|
|
this.permission.tenant_talents_groupedit,
|
|
|
|
|
|
false
|
|
|
|
|
|
),
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
ids() {
|
|
|
|
|
|
let ids = [];
|
|
|
|
|
|
this.selectionList.forEach((ele) => {
|
|
|
|
|
|
ids.push(ele.id);
|
|
|
|
|
|
});
|
|
|
|
|
|
return ids.join(",");
|
|
|
|
|
|
},
|
|
|
|
|
|
leftHeight: function () {
|
|
|
|
|
|
//获取高度值
|
|
|
|
|
|
if (document.getElementsByClassName("avue-crud__pagination")[0]) {
|
|
|
|
|
|
let pageHeight = document.getElementsByClassName(
|
|
|
|
|
|
"avue-crud__pagination"
|
|
|
|
|
|
)[0].offsetTop;
|
|
|
|
|
|
return pageHeight - 105 + "px";
|
|
|
|
|
|
} else {
|
|
|
|
|
|
return 725 + "px";
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
option() {
|
|
|
|
|
|
const self = this;
|
|
|
|
|
|
const IdCardNo = (rule, value, callback) => {
|
|
|
|
|
|
if (check18IdCardNo(value)) {
|
|
|
|
|
|
callback();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback(new Error("身份证格式不正确"));
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
const validateTel = (rule, value, callback) => {
|
|
|
|
|
|
if (isvalidatemobile(value)[0]) {
|
|
|
|
|
|
callback(new Error(isvalidatemobile(value)[1]));
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback();
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
return {
|
|
|
|
|
|
height: "auto",
|
|
|
|
|
|
dialogWidth: "30%",
|
|
|
|
|
|
calcHeight: 180,
|
|
|
|
|
|
align: "center",
|
|
|
|
|
|
menuAlign: "center",
|
|
|
|
|
|
tip: false,
|
|
|
|
|
|
columnBtn: false,
|
|
|
|
|
|
searchBtn: true,
|
|
|
|
|
|
searchShow: true,
|
|
|
|
|
|
viewBtn: true,
|
|
|
|
|
|
searchMenuSpan: 6,
|
|
|
|
|
|
border: true,
|
2024-02-26 19:03:31 +08:00
|
|
|
|
index: false,
|
2024-02-21 11:30:24 +08:00
|
|
|
|
indexLabel: "序号",
|
|
|
|
|
|
selection: true,
|
|
|
|
|
|
dialogType: "dialog",
|
|
|
|
|
|
dialogClickModal: false,
|
|
|
|
|
|
column: [
|
|
|
|
|
|
{
|
2024-02-25 17:01:27 +08:00
|
|
|
|
label: "服务名",
|
2024-02-21 11:30:24 +08:00
|
|
|
|
prop: "name",
|
|
|
|
|
|
// search: true,
|
|
|
|
|
|
span: 24,
|
|
|
|
|
|
rules: [
|
|
|
|
|
|
{
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
whitespace: true,
|
|
|
|
|
|
message: "请输入姓名",
|
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
slot: true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "用户类型",
|
|
|
|
|
|
prop: "userId",
|
|
|
|
|
|
type: "select",
|
|
|
|
|
|
dicData: [
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "0",
|
|
|
|
|
|
label: "未注册用户",
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "1",
|
|
|
|
|
|
label: "已注册用户",
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
display: false,
|
|
|
|
|
|
hide: true,
|
|
|
|
|
|
// search: true
|
|
|
|
|
|
},
|
2024-02-25 17:01:27 +08:00
|
|
|
|
{
|
|
|
|
|
|
label: "标签",
|
|
|
|
|
|
prop: "serveLabels",
|
|
|
|
|
|
rules: [
|
|
|
|
|
|
{
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: "请选择标签",
|
|
|
|
|
|
trigger: ["blur"],
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
formslot: true,
|
|
|
|
|
|
},
|
2024-02-26 19:03:31 +08:00
|
|
|
|
{
|
|
|
|
|
|
label: "状态",
|
|
|
|
|
|
prop: "status",
|
|
|
|
|
|
display: false,
|
|
|
|
|
|
slot: true,
|
|
|
|
|
|
},
|
2024-02-21 11:30:24 +08:00
|
|
|
|
{
|
|
|
|
|
|
label: "分组",
|
|
|
|
|
|
prop: "groupId",
|
|
|
|
|
|
type: "tree",
|
|
|
|
|
|
span: 24,
|
|
|
|
|
|
display: true,
|
|
|
|
|
|
dicData: self.treeData,
|
2024-02-26 19:03:31 +08:00
|
|
|
|
hide: true,
|
2024-02-21 11:30:24 +08:00
|
|
|
|
props: {
|
|
|
|
|
|
label: "groupName",
|
|
|
|
|
|
value: "id",
|
|
|
|
|
|
},
|
|
|
|
|
|
rules: [
|
|
|
|
|
|
{
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: "请选择分组",
|
|
|
|
|
|
trigger: "change",
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
placeholder: "请选择 分组",
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "备注",
|
|
|
|
|
|
prop: "remarks",
|
|
|
|
|
|
type: "textarea",
|
|
|
|
|
|
slot: true,
|
|
|
|
|
|
hide: true,
|
|
|
|
|
|
span: 24,
|
|
|
|
|
|
maxlength: 100,
|
|
|
|
|
|
showWordLimit: true,
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
2024-02-26 19:03:31 +08:00
|
|
|
|
workOption() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
editBtn: false,
|
|
|
|
|
|
delBtn: false,
|
|
|
|
|
|
addBtn: false,
|
|
|
|
|
|
border: true,
|
|
|
|
|
|
index: true,
|
|
|
|
|
|
indexLabel: "序号",
|
|
|
|
|
|
refreshBtn: false,
|
|
|
|
|
|
height: '100',
|
|
|
|
|
|
column: [{
|
|
|
|
|
|
label: "名称",
|
|
|
|
|
|
prop: "missionTitle",
|
|
|
|
|
|
}, {
|
|
|
|
|
|
label: "描述",
|
|
|
|
|
|
prop: "missionDesc",
|
|
|
|
|
|
slot: true
|
|
|
|
|
|
}]
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
policyOption() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
editBtn: false,
|
|
|
|
|
|
delBtn: false,
|
|
|
|
|
|
addBtn: false,
|
|
|
|
|
|
border: true,
|
|
|
|
|
|
index: true,
|
|
|
|
|
|
indexLabel: "序号",
|
|
|
|
|
|
refreshBtn: false,
|
|
|
|
|
|
height: '100',
|
|
|
|
|
|
column: [{
|
|
|
|
|
|
label: '名称',
|
|
|
|
|
|
prop: 'name'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
label: '内容',
|
|
|
|
|
|
prop: 'policyContent'
|
|
|
|
|
|
}]
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
logOption() {
|
|
|
|
|
|
return {
|
2024-02-27 14:09:15 +08:00
|
|
|
|
editBtn: true,
|
|
|
|
|
|
delBtn: true,
|
|
|
|
|
|
addBtn: true,
|
2024-02-26 19:03:31 +08:00
|
|
|
|
border: true,
|
|
|
|
|
|
index: true,
|
|
|
|
|
|
indexLabel: "序号",
|
|
|
|
|
|
refreshBtn: false,
|
|
|
|
|
|
height: '100',
|
|
|
|
|
|
column: [{
|
|
|
|
|
|
label: '备注1',
|
|
|
|
|
|
prop: 'bak1'
|
|
|
|
|
|
},{
|
|
|
|
|
|
label: '备注2',
|
|
|
|
|
|
prop: 'bak2'
|
|
|
|
|
|
},{
|
|
|
|
|
|
label: '备注3',
|
|
|
|
|
|
prop: 'bak3'
|
|
|
|
|
|
},{
|
|
|
|
|
|
label: '备注4',
|
|
|
|
|
|
prop: 'bak4'
|
|
|
|
|
|
}]
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2024-02-25 17:01:27 +08:00
|
|
|
|
infoOption() {
|
|
|
|
|
|
return {
|
2024-02-27 14:09:15 +08:00
|
|
|
|
dialogWidth: "50%",
|
|
|
|
|
|
dialogType: "drawer",
|
|
|
|
|
|
dialogClickModal: false,
|
2024-02-25 17:01:27 +08:00
|
|
|
|
editBtn: false,
|
|
|
|
|
|
delBtn: false,
|
|
|
|
|
|
addBtn: false,
|
2024-02-27 14:09:15 +08:00
|
|
|
|
viewBtn: true,
|
2024-02-26 19:03:31 +08:00
|
|
|
|
border: true,
|
2024-02-25 17:01:27 +08:00
|
|
|
|
refreshBtn: false,
|
2024-02-26 19:03:31 +08:00
|
|
|
|
searchBtn: true,
|
|
|
|
|
|
searchShow: true,
|
|
|
|
|
|
searchMenuSpan: 6,
|
2024-02-25 17:01:27 +08:00
|
|
|
|
height: '100',
|
|
|
|
|
|
column: [
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "姓名",
|
|
|
|
|
|
prop: "name",
|
2024-02-26 19:03:31 +08:00
|
|
|
|
search: true
|
2024-02-25 17:01:27 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "身份证",
|
|
|
|
|
|
prop: "idNumber",
|
2024-02-27 14:09:15 +08:00
|
|
|
|
search: true
|
2024-02-25 17:01:27 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "手机号",
|
|
|
|
|
|
prop: "telphone",
|
|
|
|
|
|
},
|
2024-02-27 20:45:04 +08:00
|
|
|
|
// {
|
|
|
|
|
|
// label: "用户类型",
|
|
|
|
|
|
// prop: "userId",
|
|
|
|
|
|
// },
|
2024-02-25 17:01:27 +08:00
|
|
|
|
{
|
2024-02-27 20:45:04 +08:00
|
|
|
|
label: "身份标签",
|
2024-02-25 17:01:27 +08:00
|
|
|
|
prop: "labelsBase",
|
|
|
|
|
|
},
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2024-02-21 11:30:24 +08:00
|
|
|
|
selectedWorkTypes: {
|
|
|
|
|
|
get() {
|
2024-02-25 17:01:27 +08:00
|
|
|
|
if (!this.obj.serveLabels) {
|
2024-02-21 11:30:24 +08:00
|
|
|
|
return [];
|
|
|
|
|
|
}
|
|
|
|
|
|
const result = [];
|
2024-02-25 17:01:27 +08:00
|
|
|
|
const wt = this.obj.serveLabels.split(",");
|
2024-02-21 11:30:24 +08:00
|
|
|
|
wt.forEach((item) => {
|
|
|
|
|
|
result.push({ name: item });
|
|
|
|
|
|
});
|
|
|
|
|
|
return result;
|
|
|
|
|
|
},
|
|
|
|
|
|
set(val) {
|
|
|
|
|
|
const arr = [];
|
|
|
|
|
|
val.forEach((item) => {
|
|
|
|
|
|
arr.push(item.name);
|
|
|
|
|
|
});
|
2024-02-25 17:01:27 +08:00
|
|
|
|
this.obj.serveLabels = arr.join(",");
|
2024-02-21 11:30:24 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
worktypeData() {
|
|
|
|
|
|
let rel = [];
|
|
|
|
|
|
for (let j = 0; j < this.arr.length; j++) {
|
|
|
|
|
|
const key = this.arr[j];
|
|
|
|
|
|
if (this.worktypeDic.hasOwnProperty(key)) {
|
|
|
|
|
|
rel.push({ name: key })
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
for (let i = 0; i < this.tempWorkType.length; i++) {
|
|
|
|
|
|
const key = this.tempWorkType[i];
|
|
|
|
|
|
if (key && !this.worktypeDic.hasOwnProperty(key)) {
|
|
|
|
|
|
rel.push({ name: key });
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return rel;
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
|
|
|
this.initDept();
|
2024-02-27 20:28:13 +08:00
|
|
|
|
// this.getWorkTypes();
|
|
|
|
|
|
this.getLabelList();
|
2024-02-21 11:30:24 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2024-02-27 20:28:13 +08:00
|
|
|
|
getLabelList() {
|
|
|
|
|
|
getLabelList().then( (res) => {
|
|
|
|
|
|
const arr = res.data.data.flatMap(obj => obj.child.map(item => item.concatName));
|
|
|
|
|
|
this.arr = arr.map(concatName => {
|
|
|
|
|
|
this.worktypeDic[concatName] = 1;
|
|
|
|
|
|
return concatName;
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2024-02-25 17:01:27 +08:00
|
|
|
|
showKeyAudience(row) {
|
|
|
|
|
|
this.selectInfo = row
|
|
|
|
|
|
this.getKeyAudience({
|
|
|
|
|
|
id: row.id
|
|
|
|
|
|
})
|
2024-02-26 19:03:31 +08:00
|
|
|
|
this.drawer = true;
|
2024-02-25 17:01:27 +08:00
|
|
|
|
},
|
|
|
|
|
|
getKeyAudience(params) {
|
|
|
|
|
|
const _this = this
|
|
|
|
|
|
return getServeListTalents(params).then((res) => {
|
|
|
|
|
|
if(res.data.code === 200) {
|
|
|
|
|
|
const {records, current, size, total} = res.data.data
|
|
|
|
|
|
_this.infoData = records
|
|
|
|
|
|
_this.visibleAudience = true
|
|
|
|
|
|
_this.infoPage = {
|
|
|
|
|
|
pageSize: size,
|
|
|
|
|
|
currentPage: current,
|
|
|
|
|
|
total: total,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
infoSizeChange(pageSize) {
|
|
|
|
|
|
const {currentPage, total} = this.infoPage
|
|
|
|
|
|
this.getKeyAudience({
|
|
|
|
|
|
pageSize: pageSize,
|
|
|
|
|
|
currentPage: currentPage,
|
|
|
|
|
|
total: total,
|
|
|
|
|
|
id: this.selectInfo.id
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
infoCurrentChange(currentPage) {
|
|
|
|
|
|
const { pageSize, total} = this.infoPage
|
|
|
|
|
|
this.getKeyAudience({
|
|
|
|
|
|
pageSize: pageSize,
|
|
|
|
|
|
currentPage: currentPage,
|
|
|
|
|
|
total: total,
|
|
|
|
|
|
id: this.selectInfo.id
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
infoRefreshChange() {
|
|
|
|
|
|
const { currentPage, pageSize, total} = this.infoPage
|
|
|
|
|
|
this.getKeyAudience({
|
|
|
|
|
|
pageSize: pageSize,
|
|
|
|
|
|
currentPage: currentPage,
|
|
|
|
|
|
total: total,
|
|
|
|
|
|
id: this.selectInfo.id
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2024-02-21 11:30:24 +08:00
|
|
|
|
getWorkTypes() {
|
|
|
|
|
|
|
2024-02-25 17:01:27 +08:00
|
|
|
|
getWorkTypes(1).then((res) => {
|
2024-02-21 11:30:24 +08:00
|
|
|
|
for (let i = 0; i < res.data.data.length; i++) {
|
|
|
|
|
|
const element = res.data.data[i];
|
|
|
|
|
|
this.worktypeDic[element.name] = 1;
|
|
|
|
|
|
this.arr.push(element.name)
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
/*加载分组*/
|
|
|
|
|
|
initDept(groupId) {
|
|
|
|
|
|
getDept().then((res) => {
|
|
|
|
|
|
const data = res.data.data.list;
|
|
|
|
|
|
this.treeData = data;
|
|
|
|
|
|
let treeDataOne = {
|
|
|
|
|
|
companyId: "",
|
|
|
|
|
|
createTime: "",
|
|
|
|
|
|
groupName: "全部",
|
|
|
|
|
|
id: "",
|
|
|
|
|
|
remarks: "",
|
|
|
|
|
|
sort: '',
|
|
|
|
|
|
sumNum: res.data.data.sum,
|
|
|
|
|
|
type: '',
|
|
|
|
|
|
};
|
|
|
|
|
|
this.treeData.unshift(treeDataOne);
|
|
|
|
|
|
const column = this.findObject(this.option.column, "groupId");
|
|
|
|
|
|
column.dicData = this.treeData;
|
|
|
|
|
|
if (groupId) {
|
|
|
|
|
|
this.$nextTick(function () {
|
|
|
|
|
|
this.$refs.tree.setCurrentKey(groupId);
|
|
|
|
|
|
}); //默认高亮
|
|
|
|
|
|
this.nodeClick({ id: groupId });
|
|
|
|
|
|
} else {
|
|
|
|
|
|
if (this.treeData.length) {
|
|
|
|
|
|
this.$nextTick(function () {
|
|
|
|
|
|
this.$refs.tree.setCurrentKey(this.treeData[0].id);
|
|
|
|
|
|
}); //默认高亮第一个
|
|
|
|
|
|
this.nodeClick({ id: this.treeData[0].id });
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.personTotal = res.data.data.sum;
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
/*新建 编辑分组*/
|
|
|
|
|
|
updateGroups(type, data) {
|
|
|
|
|
|
this.$refs.addGroups.openDialog(type, data);
|
|
|
|
|
|
},
|
|
|
|
|
|
/*删除分组*/
|
|
|
|
|
|
removeGroups(data) {
|
|
|
|
|
|
//检验该分组是否存在人员,存在提示无法删除,不存在泽提示确定要删除此分组吗
|
|
|
|
|
|
const h = this.$createElement;
|
|
|
|
|
|
this.$confirm(
|
|
|
|
|
|
h("div", null, [
|
|
|
|
|
|
h("p", { style: "font-size: 16px" }, "您确定要删除此分组吗? "),
|
|
|
|
|
|
h("p", { style: "color: red" }, "一旦删除则无法找回"),
|
|
|
|
|
|
]),
|
|
|
|
|
|
{
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
showClose: false,
|
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
|
beforeClose: (action, instance, done) => {
|
|
|
|
|
|
if (action === "confirm") {
|
|
|
|
|
|
instance.confirmButtonLoading = true;
|
|
|
|
|
|
instance.cancelButtonLoading = true;
|
|
|
|
|
|
instance.closeOnPressEscape = false;
|
|
|
|
|
|
instance.closeOnClickModal = false;
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
done();
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
instance.confirmButtonLoading = false;
|
|
|
|
|
|
instance.cancelButtonLoading = false;
|
|
|
|
|
|
}, 300);
|
|
|
|
|
|
}, 1000);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
done();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
)
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
removeDept(data.id).then(
|
|
|
|
|
|
() => {
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
type: "success",
|
|
|
|
|
|
message: "操作成功!",
|
|
|
|
|
|
});
|
|
|
|
|
|
this.refresh("del");
|
|
|
|
|
|
},
|
|
|
|
|
|
(error) => {
|
|
|
|
|
|
window.console.log(error);
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
/*批量转移分组 */
|
|
|
|
|
|
handleTransfer() {
|
|
|
|
|
|
if (this.selectionList.length === 0) {
|
|
|
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$refs.transferGroups.openDialog();
|
|
|
|
|
|
},
|
|
|
|
|
|
/*点击分组加载相应人才列表*/
|
|
|
|
|
|
nodeClick(data) {
|
|
|
|
|
|
this.tenantId = data.id ? data.id : "";
|
|
|
|
|
|
this.page.currentPage = 1;
|
|
|
|
|
|
this.onLoad(this.page, this.query);
|
|
|
|
|
|
},
|
|
|
|
|
|
/*新增 编辑 转移 删除分组 更新人才后*/
|
|
|
|
|
|
refresh(type) {
|
|
|
|
|
|
this.page.currentPage = 1;
|
|
|
|
|
|
this.query = {};
|
|
|
|
|
|
if (type === "del") {
|
|
|
|
|
|
//删除分组后重新选中分组为未分组
|
|
|
|
|
|
this.initDept();
|
|
|
|
|
|
this.onLoad(this.page, this.query);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.initDept(this.tenantId);
|
|
|
|
|
|
this.onLoad(this.page, this.query);
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
/*获取人才详情 */
|
|
|
|
|
|
beforeOpen(done, type) {
|
|
|
|
|
|
if (["edit", "view", "add"].includes(type)) {
|
|
|
|
|
|
if (type === "edit" || type === "view") {
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
detail(this.obj.id).then(
|
|
|
|
|
|
(res) => {
|
|
|
|
|
|
this.obj = res.data.data;
|
2024-02-27 20:28:13 +08:00
|
|
|
|
this.tempWorkType = this.obj.serveLabels.split(",");
|
2024-02-21 11:30:24 +08:00
|
|
|
|
done();
|
|
|
|
|
|
},
|
|
|
|
|
|
(error) => {
|
|
|
|
|
|
window.console.log(error);
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
|
|
|
|
|
}, 0);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.tempWorkType = [];
|
|
|
|
|
|
done();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
/*新增人才*/
|
|
|
|
|
|
rowSave(row, done) {
|
|
|
|
|
|
add({
|
|
|
|
|
|
groupId: row.groupId,
|
|
|
|
|
|
name: row.name,
|
2024-02-25 17:01:27 +08:00
|
|
|
|
serveLabels: row.serveLabels,
|
2024-02-21 11:30:24 +08:00
|
|
|
|
remarks: row.remarks,
|
|
|
|
|
|
}).then(
|
|
|
|
|
|
() => {
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
type: "success",
|
|
|
|
|
|
message: "操作成功!",
|
|
|
|
|
|
});
|
|
|
|
|
|
done();
|
|
|
|
|
|
this.refresh();
|
|
|
|
|
|
},
|
|
|
|
|
|
(error) => {
|
|
|
|
|
|
window.console.log(error);
|
|
|
|
|
|
done();
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
|
|
|
|
|
},
|
|
|
|
|
|
/*编辑人才*/
|
|
|
|
|
|
rowUpdate(row, index, done) {
|
|
|
|
|
|
update({
|
|
|
|
|
|
id: row.id,
|
|
|
|
|
|
groupId: row.groupId,
|
|
|
|
|
|
name: row.name,
|
2024-02-25 17:01:27 +08:00
|
|
|
|
serveLabels: row.serveLabels,
|
2024-02-21 11:30:24 +08:00
|
|
|
|
remarks: row.remarks,
|
|
|
|
|
|
}).then(
|
|
|
|
|
|
() => {
|
|
|
|
|
|
done();
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
type: "success",
|
|
|
|
|
|
message: "操作成功!",
|
|
|
|
|
|
});
|
|
|
|
|
|
this.refresh();
|
|
|
|
|
|
},
|
|
|
|
|
|
(error) => {
|
|
|
|
|
|
window.console.log(error);
|
|
|
|
|
|
done();
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
|
|
|
|
|
},
|
|
|
|
|
|
/*删除人才 */
|
|
|
|
|
|
rowDel(row) {
|
|
|
|
|
|
const h = this.$createElement;
|
|
|
|
|
|
this.$confirm(
|
|
|
|
|
|
h("div", null, [
|
|
|
|
|
|
h("p", { style: "font-size: 16px" }, "您确定要删除此人才吗? "),
|
|
|
|
|
|
h("p", { style: "color: red" }, "一旦删除则无法找回"),
|
|
|
|
|
|
]),
|
|
|
|
|
|
{
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
showClose: false,
|
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
|
beforeClose: (action, instance, done) => {
|
|
|
|
|
|
if (action === "confirm") {
|
|
|
|
|
|
instance.confirmButtonLoading = true;
|
|
|
|
|
|
instance.cancelButtonLoading = true;
|
|
|
|
|
|
instance.closeOnPressEscape = false;
|
|
|
|
|
|
instance.closeOnClickModal = false;
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
done();
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
instance.confirmButtonLoading = false;
|
|
|
|
|
|
instance.cancelButtonLoading = false;
|
|
|
|
|
|
}, 300);
|
|
|
|
|
|
}, 1000);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
done();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
)
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
remove(row.id).then(
|
|
|
|
|
|
() => {
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
type: "success",
|
|
|
|
|
|
message: "操作成功!",
|
|
|
|
|
|
});
|
|
|
|
|
|
this.refresh();
|
|
|
|
|
|
},
|
|
|
|
|
|
(error) => {
|
|
|
|
|
|
window.console.log(error);
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
/*批量删除人才*/
|
|
|
|
|
|
handleDelete() {
|
|
|
|
|
|
if (this.selectionList.length === 0) {
|
|
|
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
const h = this.$createElement;
|
|
|
|
|
|
this.$confirm(
|
|
|
|
|
|
h("div", null, [
|
|
|
|
|
|
h("p", { style: "font-size: 16px" }, "您确定要批量删除选中人才吗? "),
|
|
|
|
|
|
]),
|
|
|
|
|
|
{
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
showClose: false,
|
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
|
beforeClose: (action, instance, done) => {
|
|
|
|
|
|
if (action === "confirm") {
|
|
|
|
|
|
instance.confirmButtonLoading = true;
|
|
|
|
|
|
instance.cancelButtonLoading = true;
|
|
|
|
|
|
instance.closeOnPressEscape = false;
|
|
|
|
|
|
instance.closeOnClickModal = false;
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
done();
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
instance.confirmButtonLoading = false;
|
|
|
|
|
|
instance.cancelButtonLoading = false;
|
|
|
|
|
|
}, 300);
|
|
|
|
|
|
}, 1000);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
done();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
)
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
remove(this.ids).then(
|
|
|
|
|
|
() => {
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
type: "success",
|
|
|
|
|
|
message: "操作成功!",
|
|
|
|
|
|
});
|
|
|
|
|
|
this.onLoad(this.page);
|
|
|
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
|
|
|
},
|
|
|
|
|
|
(error) => {
|
|
|
|
|
|
window.console.log(error);
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
/*导入人才库*/
|
|
|
|
|
|
beforeAvatarUpload(file, done, loading) {
|
|
|
|
|
|
if (!isExcel(file)) {
|
|
|
|
|
|
loading();
|
|
|
|
|
|
this.$message.error("上传人才库信息只能是 .xls,.xlsx 标准格式文件!");
|
|
|
|
|
|
} else {
|
|
|
|
|
|
done();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
uploadAfter(res, done) {
|
|
|
|
|
|
if (!(res instanceof Error) && !res.data) {
|
|
|
|
|
|
this.excelBox = false;
|
|
|
|
|
|
} else if (res.data && res.data.code === 900) {
|
|
|
|
|
|
const arr = [];
|
|
|
|
|
|
const data = res.data.data;
|
|
|
|
|
|
data.error &&
|
|
|
|
|
|
data.error.errorList.forEach((item) => {
|
|
|
|
|
|
arr.push(`${item.name} ${item.remarks}`);
|
|
|
|
|
|
});
|
|
|
|
|
|
data.auth &&
|
|
|
|
|
|
data.auth.authList.forEach((item) => {
|
|
|
|
|
|
arr.push(`${item.name} ${item.remarks}`);
|
|
|
|
|
|
});
|
|
|
|
|
|
this.$refs.ied.show(arr);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.refreshChange();
|
|
|
|
|
|
this.initDept(this.tenantId);
|
|
|
|
|
|
done();
|
|
|
|
|
|
},
|
|
|
|
|
|
uploadError(error) {
|
|
|
|
|
|
if (error) {
|
|
|
|
|
|
this.$message.error(error);
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
handleImport() {
|
|
|
|
|
|
this.excelBox = true;
|
|
|
|
|
|
},
|
|
|
|
|
|
/*下载人才库模板 */
|
|
|
|
|
|
handleTemplate() {
|
|
|
|
|
|
this.templateLoading = true;
|
|
|
|
|
|
getTemplate("trc")
|
|
|
|
|
|
.then((rep) => {
|
|
|
|
|
|
this.templateLoading = false;
|
|
|
|
|
|
window.open(rep.data.data);
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
this.templateLoading = false;
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
/*人才列表切换页码 */
|
|
|
|
|
|
currentChange(currentPage) {
|
|
|
|
|
|
this.page.currentPage = currentPage;
|
|
|
|
|
|
this.refreshChange();
|
|
|
|
|
|
},
|
|
|
|
|
|
sizeChange(pageSize) {
|
|
|
|
|
|
this.page.pageSize = pageSize;
|
|
|
|
|
|
this.refreshChange();
|
|
|
|
|
|
},
|
|
|
|
|
|
refreshChange() {
|
|
|
|
|
|
this.onLoad(this.page, this.query);
|
|
|
|
|
|
},
|
|
|
|
|
|
/*搜索 */
|
|
|
|
|
|
searchReset() {
|
|
|
|
|
|
this.query = {};
|
|
|
|
|
|
this.onLoad(this.page);
|
|
|
|
|
|
},
|
|
|
|
|
|
searchChange(params, done) {
|
|
|
|
|
|
this.query = params;
|
|
|
|
|
|
this.page.currentPage = 1;
|
|
|
|
|
|
this.onLoad(this.page, params);
|
|
|
|
|
|
done();
|
|
|
|
|
|
},
|
2024-02-26 21:23:17 +08:00
|
|
|
|
serveSearchChange(params, done) {
|
|
|
|
|
|
console.log(params);
|
|
|
|
|
|
this.infoPage.currentPage = 1;
|
|
|
|
|
|
const {currentPage, pageSize} = this.infoPage
|
|
|
|
|
|
this.getKeyAudience({
|
|
|
|
|
|
currentPage,
|
|
|
|
|
|
pageSize,
|
|
|
|
|
|
id: this.selectInfo.id,
|
|
|
|
|
|
...params
|
|
|
|
|
|
})
|
|
|
|
|
|
done();
|
|
|
|
|
|
},
|
2024-02-21 11:30:24 +08:00
|
|
|
|
searchReset1() {
|
|
|
|
|
|
this.query = {};
|
|
|
|
|
|
this.onLoad(this.page);
|
|
|
|
|
|
},
|
|
|
|
|
|
searchChange1() {
|
|
|
|
|
|
this.page.currentPage = 1;
|
|
|
|
|
|
this.onLoad(this.page, this.query);
|
|
|
|
|
|
},
|
|
|
|
|
|
/*人才列表多选 */
|
|
|
|
|
|
selectionChange(list) {
|
|
|
|
|
|
this.selectionList = list;
|
|
|
|
|
|
},
|
|
|
|
|
|
selectionClear() {
|
|
|
|
|
|
this.selectionList = [];
|
|
|
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
|
|
|
},
|
|
|
|
|
|
/*加载人才列表 */
|
|
|
|
|
|
onLoad(page, params = {}) {
|
|
|
|
|
|
this.loading = true;
|
|
|
|
|
|
getList(
|
|
|
|
|
|
page.currentPage,
|
|
|
|
|
|
page.pageSize,
|
|
|
|
|
|
Object.assign(params, this.query),
|
|
|
|
|
|
this.tenantId
|
|
|
|
|
|
).then((res) => {
|
|
|
|
|
|
const data = res.data.data;
|
|
|
|
|
|
this.page.total = data.total;
|
|
|
|
|
|
this.data = data.records;
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
this.selectionClear();
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2024-02-26 19:03:31 +08:00
|
|
|
|
// 匹配任务和岗位
|
|
|
|
|
|
matchWorkStation(row) {
|
|
|
|
|
|
console.log('匹配任务和岗位')
|
|
|
|
|
|
getMatchWorkStation({id: row.id, serveId: this.selectInfo.id, companyId: this.selectInfo.companyId}).then(res => {
|
|
|
|
|
|
console.log(res)
|
|
|
|
|
|
this.innerDrawer1 = true
|
|
|
|
|
|
let _this = this;
|
|
|
|
|
|
const {records, current, size, total} = res.data.data
|
|
|
|
|
|
_this.workData = records
|
|
|
|
|
|
_this.innerDrawer1 = true
|
|
|
|
|
|
_this.workPage = {
|
|
|
|
|
|
pageSize: size,
|
|
|
|
|
|
currentPage: current,
|
|
|
|
|
|
total: total,
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// 匹配政策
|
|
|
|
|
|
matchPolicy(row) {
|
|
|
|
|
|
console.log('匹配政策')
|
|
|
|
|
|
getMatchPolicy({id: row.id, serveId: this.selectInfo.id}).then(res => {
|
|
|
|
|
|
let _this = this;
|
|
|
|
|
|
const {records, current, size, total} = res.data.data
|
|
|
|
|
|
_this.policyData = records
|
|
|
|
|
|
_this.innerDrawer2 = true
|
|
|
|
|
|
_this.policyPage = {
|
|
|
|
|
|
pageSize: size,
|
|
|
|
|
|
currentPage: current,
|
|
|
|
|
|
total: total,
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// 服务日志
|
|
|
|
|
|
serveLog(row) {
|
|
|
|
|
|
console.log('服务日志')
|
|
|
|
|
|
getMatchServeList({id: row.id, serveId: this.selectInfo.id, companyId: this.selectInfo.companyId, current: 1, size: 10}).then(res => {
|
|
|
|
|
|
let _this = this;
|
|
|
|
|
|
const {records, current, size, total} = res.data.data
|
|
|
|
|
|
_this.logData = records
|
|
|
|
|
|
_this.innerDrawer3 = true
|
|
|
|
|
|
_this.logPage = {
|
|
|
|
|
|
pageSize: size,
|
|
|
|
|
|
currentPage: current,
|
|
|
|
|
|
total: total,
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
/**/
|
|
|
|
|
|
handleClose() {
|
|
|
|
|
|
this.drawer = false;
|
|
|
|
|
|
this.innerDrawer3 = false
|
|
|
|
|
|
this.infoData = null;
|
|
|
|
|
|
},
|
|
|
|
|
|
handleCloseWork() {
|
|
|
|
|
|
this.innerDrawer1 = false
|
|
|
|
|
|
},
|
|
|
|
|
|
handleClosePolicy() {
|
|
|
|
|
|
this.innerDrawer2 = false
|
|
|
|
|
|
},
|
|
|
|
|
|
handleCloseLog() {
|
|
|
|
|
|
this.innerDrawer3 = false
|
2024-02-26 22:07:01 +08:00
|
|
|
|
},
|
|
|
|
|
|
/*查看*/
|
|
|
|
|
|
toWorkMissionDetail(row) {
|
|
|
|
|
|
if(row.type == 0) {
|
|
|
|
|
|
missionDetail(row.missionNo).then((res) => {
|
|
|
|
|
|
this.viewDrawer = true;
|
|
|
|
|
|
this.view = res;
|
|
|
|
|
|
});
|
|
|
|
|
|
} else if(row.type == 1) {
|
|
|
|
|
|
workDetail(row.id).then(res => {
|
|
|
|
|
|
this.workViewDrawer = true;
|
|
|
|
|
|
this.workViewModel = res;
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2024-02-27 20:28:13 +08:00
|
|
|
|
|
2024-02-26 22:07:01 +08:00
|
|
|
|
},
|
2024-02-27 19:21:26 +08:00
|
|
|
|
// 启用服务
|
|
|
|
|
|
playServe(row) {
|
2024-02-27 20:33:33 +08:00
|
|
|
|
this.$confirm('是否确认启用该服务?', {
|
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
|
type: "warning"
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
return update({id: row.id, status: 1})
|
|
|
|
|
|
}).then(
|
|
|
|
|
|
() => {
|
2024-02-27 19:21:26 +08:00
|
|
|
|
this.$message({
|
|
|
|
|
|
type: "success",
|
|
|
|
|
|
message: "启用成功!",
|
|
|
|
|
|
});
|
|
|
|
|
|
this.refresh();
|
|
|
|
|
|
},
|
|
|
|
|
|
(error) => {
|
|
|
|
|
|
window.console.log(error);
|
2024-02-27 20:33:33 +08:00
|
|
|
|
})
|
2024-02-27 19:21:26 +08:00
|
|
|
|
},
|
|
|
|
|
|
pauseServe(row) {
|
2024-02-27 20:33:33 +08:00
|
|
|
|
this.$confirm('是否确认关闭该服务?', {
|
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
|
type: "warning"
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
return update({id: row.id, status: 0})
|
|
|
|
|
|
}).then(
|
|
|
|
|
|
() => {
|
2024-02-27 19:21:26 +08:00
|
|
|
|
this.$message({
|
|
|
|
|
|
type: "success",
|
2024-02-27 20:33:33 +08:00
|
|
|
|
message: "关闭成功!",
|
2024-02-27 19:21:26 +08:00
|
|
|
|
});
|
|
|
|
|
|
this.refresh();
|
|
|
|
|
|
},
|
|
|
|
|
|
(error) => {
|
|
|
|
|
|
window.console.log(error);
|
2024-02-27 20:33:33 +08:00
|
|
|
|
})
|
2024-02-27 19:21:26 +08:00
|
|
|
|
}
|
2024-02-21 11:30:24 +08:00
|
|
|
|
},
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.el-tree {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.custom-tree-node {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
padding-right: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-form-item {
|
|
|
|
|
|
margin-bottom: 18px;
|
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.searchBtn {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
margin-bottom: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|