Files
cmanager/src/views/tenant/main/serve/index.vue

927 lines
27 KiB
Vue
Raw Normal View History

2024-02-21 11:30:24 +08:00
<template>
<div>
2024-05-20 10:30:34 +08:00
<el-row>
2024-06-05 14:47:10 +08:00
<el-col :span="6">
2024-05-20 10:30:34 +08:00
<basic-container>
2024-06-05 14:47:10 +08:00
<div style="display: flex; justify-content: space-between; align-items: center">
<div>服务分组管理</div>
<div>
<el-button type="text" icon="el-icon-plus"
v-if="vaildData(permission.tenant_main_serve_index_groupadd, false)"
@click="updateGroups('add')">新建分组
</el-button>
</div>
</div>
<div class="box" :style="{height: leftHeight}">
2024-05-20 10:30:34 +08:00
<el-scrollbar style="height: 100%">
2024-06-05 14:47:10 +08:00
<el-tree ref="tree" node-key="id" highlight-current @node-click="nodeClick"
:default-expand-all="true" :data="treeData" :props="{ label: 'groupName', id: 'id'}">
2024-02-21 11:30:24 +08:00
<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;
">
2024-06-05 14:47:10 +08:00
{{ data.groupName || data.name }}
{{ data.sumNum ? `${data.sumNum}个)` : '' }}
2024-02-21 11:30:24 +08:00
</span>
2024-06-05 14:47:10 +08:00
<span v-show="data.children && data.id && data.id !== '0'" style="flex-basis: 20%">
2024-03-28 14:25:43 +08:00
<el-button type="text" icon="el-icon-edit" size="mini"
v-if="vaildData(permission.tenant_main_serve_index_groupedit, false)"
@click="() => updateGroups('edit', data)">
2024-02-21 11:30:24 +08:00
</el-button>
2024-03-28 14:25:43 +08:00
<el-button icon="el-icon-delete" type="text" size="mini"
v-if="vaildData(permission.tenant_main_serve_index_groupdel, false)"
@click="() => removeGroups(data)">
2024-02-21 11:30:24 +08:00
</el-button>
</span>
</span>
2024-05-20 10:30:34 +08:00
</el-tree>
</el-scrollbar>
</div>
</basic-container>
</el-col>
2024-06-05 14:47:10 +08:00
<el-col :span="18">
2024-05-20 10:30:34 +08:00
<basic-container>
2024-06-05 14:47:10 +08:00
<avue-crud
v-model="obj"
ref="crud"
:data="dataSource"
:option="option"
:search.sync="query"
:page.sync="page"
:table-loading="loading"
@search-change="serveSearchChange"
@search-reset="serveResetChange"
@size-change="infoSizeChange"
@current-change="infoCurrentChange">
2024-05-20 10:30:34 +08:00
<template slot="menuLeft">
2024-06-05 14:47:10 +08:00
<el-button type="primary" size="small" @click="selectPushService">推送服务</el-button>
2024-05-20 10:30:34 +08:00
</template>
<template slot-scope="{row,index}" slot="menu">
<el-button type="text"
icon="el-icon-document"
size="small"
2024-06-05 14:47:10 +08:00
@click="matchWorkStation(row)"
2024-06-05 21:24:49 +08:00
>查看匹配岗位
2024-05-20 10:30:34 +08:00
</el-button>
<el-button type="text"
icon="el-icon-document"
size="small"
2024-06-05 14:47:10 +08:00
@click="matchPolicy(row)"
2024-06-05 21:24:49 +08:00
>查看匹配政策
2024-05-20 10:30:34 +08:00
</el-button>
<el-button type="text"
2024-06-05 14:47:10 +08:00
icon="el-icon-document"
2024-05-20 10:30:34 +08:00
size="small"
2024-06-05 14:47:10 +08:00
@click="serveLog(row)"
2024-06-11 10:14:57 +08:00
>管理服务日志
2024-05-20 10:30:34 +08:00
</el-button>
</template>
2024-05-20 10:30:34 +08:00
</avue-crud>
</basic-container>
</el-col>
</el-row>
2024-06-05 14:47:10 +08:00
<!-- 匹配任务/岗位 -->
2024-05-20 10:30:34 +08:00
<el-drawer
2024-06-05 14:47:10 +08:00
title="匹配任务/岗位"
size="80%"
:append-to-body="true"
:before-close="() => innerDrawer1 = false"
:visible.sync="innerDrawer1">
2024-05-20 10:30:34 +08:00
<avue-crud
2024-06-05 14:47:10 +08:00
:data="workData"
:option="workOption"
:page.sync="workPage"
@size-change="workSizeChange"
@current-change="workCurrentChange"
2024-05-20 10:30:34 +08:00
>
2024-06-05 14:47:10 +08:00
<template slot="missionDesc" slot-scope="{ row }">
<TextTooltip :content="row.missionDesc"></TextTooltip>
</template>
2024-05-20 10:30:34 +08:00
<template slot-scope="{row,index}" slot="menu">
<el-button type="text"
icon="el-icon-document"
size="small"
2024-06-05 14:47:10 +08:00
@click="toWorkMissionDetail(row)"
>查看详情
2024-05-20 10:30:34 +08:00
</el-button>
</template>
</avue-crud>
2024-06-05 14:47:10 +08:00
</el-drawer>
<!-- 匹配政策-->
<el-drawer
title="匹配政策"
size="80%"
:append-to-body="true"
:before-close="() => innerDrawer2 = false"
:visible.sync="innerDrawer2">
<avue-crud
:data="policyData"
:option="policyOption"
:page.sync="policyPage"
@size-change="policySizeChange"
@current-change="policyCurrentChange"
>
<template slot="policyContent" slot-scope="{ row }">
<el-tooltip class="item" effect="dark" placement="top-start">
<div slot="content">
<div v-for="(item, index) in clipStr(row.policyContent)" :key="index">
<div>{{ item }}</div>
2024-05-20 10:30:34 +08:00
</div>
2024-06-05 14:47:10 +08:00
</div>
<span>{{ row.policyContent.length > 50 ? row.policyContent.substring(0, 50) : row.policyContent }}</span>
</el-tooltip>
</template>
<template slot="labelName" slot-scope="{ row }">
<el-tooltip class="item" effect="dark" placement="top-start">
<div slot="content">
<div v-for="(item, index) in clipStr(row.labelName)" :key="index">
<div>{{ item }}</div>
2024-05-20 10:30:34 +08:00
</div>
</div>
2024-06-05 14:47:10 +08:00
<span>{{ row.labelName.length > 50 ? row.labelName.substring(0, 50) : row.labelName }}</span>
</el-tooltip>
</template>
<template slot="labelNameForm" slot-scope="{row}">
<div>
<el-tag style="margin: 4px 10px" v-for="(item, index) in row.labelName.split(',')" :key="index">{{
item
}}
</el-tag>
</div>
</template>
2024-02-28 15:19:45 +08:00
2024-06-05 14:47:10 +08:00
<template slot="guidelineContentForm" slot-scope="{row}">
<div>
<Tinymce v-model="row.guidelineContent" :visibleToolbar="false" :visibleMenubar="false"></Tinymce>
</div>
</template>
<template slot="policyContentForm" slot-scope="{row}">
<div>
<Tinymce v-model="row.policyContent" :visibleToolbar="false" :visibleMenubar="false"></Tinymce>
</div>
</template>
2024-05-20 10:30:34 +08:00
2024-06-05 14:47:10 +08:00
</avue-crud>
</el-drawer>
2024-06-05 14:47:10 +08:00
<!-- 服务日志-->
<el-drawer
title="服务日志"
size="80%"
:append-to-body="true"
:before-close="() => innerDrawer3 = false"
:visible.sync="innerDrawer3">
<!-- <div>
<span>姓名</span>
<span>身份证号</span>
</div> -->
<avue-crud
:data="logData"
:option="logOption"
@row-save="saveLog"
@row-update="saveUpdateLog"
@row-del="removeLog"
:page.sync="logPage"
@size-change="logSizeChange"
@current-change="logCurrentChange"
>
<!-- <template slot="menuLeft">
<el-button @click="addNewLog" icon="el-icon-plus" type="primary" size="mini">添加</el-button>
</template>
<template slot="menu" slot-scope="{row}">
<el-button type="text" @click="editLogInfo(row.id)" icon="el-icon-edit" size="mini">修改</el-button>
<el-button type="text" @click="editLogInfo(row.id)" icon="el-icon-edit" size="mini">查看附件</el-button>
</template> -->
</avue-crud>
</el-drawer>
<!--新建 编辑分组dialog-->
<add-groups ref="addGroups" @refresh="refresh" :listAllPolicyTree="listAllPolicyTree"
:treeData="treeData" :data="worktypeData" :worktypeDic="worktypeDic"
:talentsList="talentsList"></add-groups>
2024-03-18 21:15:52 +08:00
<PushService
2024-03-19 17:23:29 +08:00
:visible.sync="PushServiceVisible"
2024-03-18 21:15:52 +08:00
:rowData="selectPushServiceData"
></PushService>
2024-06-05 14:47:10 +08:00
<mission-view :visible.sync="viewDrawer" :model="view"></mission-view>
<work-view :visible.sync="workViewDrawer" :model="workViewModel"></work-view>
2024-05-20 10:30:34 +08:00
</div>
2024-02-21 11:30:24 +08:00
</template>
<script>
import {
2024-06-05 14:47:10 +08:00
addServeLog, detail,
getDepTree,
2024-02-21 11:30:24 +08:00
getList,
getListAllPolicy,
2024-06-05 14:47:10 +08:00
getListAllTalents, getMatchPolicy, getMatchServeList, getMatchWorkStation,
getServeListTalents,
removeDept, removeServeLog, updateServeLog
2024-02-21 15:02:40 +08:00
} from "@/api/tenant/serve";
2024-05-20 10:30:34 +08:00
import {mapGetters} from "vuex";
2024-06-05 14:47:10 +08:00
import addGroups from "./Dialog/addGroup";
import {getLabelList} from "@/api/tenant/common";
2024-02-26 22:07:01 +08:00
import missionView from "../../mission/Table/missionView.vue";
import workView from "../../works/Table/missionView.vue"
2024-03-29 11:31:03 +08:00
import TextTooltip from "@/components/text-tooltip/index.vue";
2024-06-05 14:47:10 +08:00
import {serviceType} from "@/common/dic";
import PushService from './Dialog/pushService.vue'
2024-05-20 10:30:34 +08:00
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 {
2024-06-05 14:47:10 +08:00
components: {addGroups, missionView, workView, TextTooltip, PushService},
2024-02-21 11:30:24 +08:00
data() {
return {
2024-06-05 14:47:10 +08:00
arr: [],
worktypeDic: {},
2024-02-21 11:30:24 +08:00
treeData: [],
2024-06-05 14:47:10 +08:00
loading: false,
tenantId: null,
2024-05-20 10:30:34 +08:00
page: Object.assign({}, page),
2024-06-05 14:47:10 +08:00
workPage: Object.assign({}, page),
dataSource: [],
2024-02-21 11:30:24 +08:00
tempWorkType: [],
2024-06-05 14:47:10 +08:00
talentsList: [],
query: {},
obj: {},
2024-02-25 17:01:27 +08:00
selectInfo: null,
2024-06-05 14:47:10 +08:00
innerDrawer1: false,
viewDrawer: false,
workViewDrawer: false,
workViewModel: {},
view: {},
workData: [],
policyData: [],
2024-06-05 14:47:10 +08:00
innerDrawer2: false,
2024-05-20 10:30:34 +08:00
policyPage: Object.assign({}, page),
2024-06-05 14:47:10 +08:00
innerDrawer3: false,
logData: [],
2024-05-20 10:30:34 +08:00
logPage: Object.assign({}, page),
selectUserServeLog: null,
2024-06-05 14:47:10 +08:00
selectPushServiceData: null,
PushServiceVisible: false,
}
2024-02-21 11:30:24 +08:00
},
computed: {
2024-05-29 18:03:21 +08:00
...mapGetters(["permission", "userInfo"]),
2024-02-21 11:30:24 +08:00
permissionList() {
return {
2024-03-28 14:25:43 +08:00
addBtn: this.vaildData(this.permission.tenant_main_serve_index_add, false),
2024-02-21 11:30:24 +08:00
viewBtn: true,
2024-05-20 10:30:34 +08:00
delBtn: this.vaildData(this.permission.tenant_main_serve_index_del, false),
editBtn: this.vaildData(this.permission.tenant_main_serve_index_edit, false),
2024-02-21 11:30:24 +08:00
};
},
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";
}
},
2024-06-05 14:47:10 +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})
2024-02-21 11:30:24 +08:00
}
2024-06-05 14:47:10 +08:00
}
// 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;
},
option() {
2024-02-21 11:30:24 +08:00
return {
2024-06-05 14:47:10 +08:00
dialogWidth: "50%",
dialogType: "drawer",
dialogClickModal: false,
editBtn: false,
delBtn: false,
2024-03-18 11:34:50 +08:00
addBtn: false,
2024-02-21 11:30:24 +08:00
viewBtn: true,
border: true,
2024-06-05 14:47:10 +08:00
refreshBtn: false,
searchBtn: true,
searchShow: true,
searchMenuSpan: 6,
height: '100',
2024-02-21 11:30:24 +08:00
column: [
2024-03-13 19:17:06 +08:00
{
2024-06-05 14:47:10 +08:00
label: "姓名",
2024-02-21 11:30:24 +08:00
prop: "name",
2024-06-05 14:47:10 +08:00
search: true,
searchLabelWidth: 50,
searchSpan: 7,
2024-02-25 17:01:27 +08:00
},
{
2024-06-05 14:47:10 +08:00
label: "身份证",
prop: "idNumber",
search: true,
searchLabelWidth: 60,
searchSpan: 7,
},
{
2024-06-05 14:47:10 +08:00
label: "手机号",
prop: "telphone",
},
2024-06-05 14:47:10 +08:00
// {
// label: "用户类型",
// prop: "userId",
// },
2024-02-21 11:30:24 +08:00
{
2024-06-05 14:47:10 +08:00
label: "身份标签",
prop: "labelsBase",
2024-02-21 11:30:24 +08:00
},
2024-06-05 14:47:10 +08:00
]
}
2024-02-21 11:30:24 +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',
2024-05-20 10:30:34 +08:00
viewBtn: true,
2024-02-28 15:19:45 +08:00
dialogType: "drawer",
column: [{
2024-02-27 22:09:13 +08:00
label: '政策名称',
prop: 'name'
2024-02-27 22:09:13 +08:00
},
2024-02-28 15:19:45 +08:00
{
label: "政策级别",
prop: "level",
span: 12,
hide: true,
},
{
label: "政策文号",
prop: "number",
span: 12,
hide: true,
},
{
label: "发文机构",
prop: "issuingAuthority",
span: 12,
hide: true,
},
{
label: "分组",
prop: "groupId",
type: "tree",
hide: true,
span: 12,
display: true,
placeholder: "请选择 分组",
},
{
label: "有效性",
prop: "status",
type: "tree",
span: 12,
hide: true,
display: true,
2024-05-20 10:30:34 +08:00
dicData: [{name: "有效", value: 1}, {name: "无效", value: 0}],
2024-02-28 15:19:45 +08:00
props: {
label: "name",
value: "value",
},
},
{
label: "服务类型",
prop: "stype",
type: "tree",
span: 12,
display: true,
hide: true,
dicData: serviceType,
props: {
label: "label",
value: "value",
},
rules: [
{
required: true,
message: "请选择服务类型",
trigger: "change",
},
],
placeholder: "请选择 服务类型",
},
{
label: "发文字号",
prop: "issuingNumber",
hide: true,
span: 12,
// row: true,
maxlength: 50,
showWordLimit: true,
},
{
label: "类别",
prop: "category",
span: 12,
hide: true,
maxlength: 50,
showWordLimit: true,
},
{
label: "标签",
prop: "labelName",
hide: false,
formslot: true,
span: 24,
},
{
label: "政策文件名",
prop: "policyFileName",
hide: true,
span: 24,
},
{
label: '政策内容',
prop: 'policyContent',
slot: true,
2024-03-13 09:46:47 +08:00
hide: true,
2024-02-28 15:19:45 +08:00
formslot: true,
span: 24,
},
{
label: "指南文件名",
prop: "guidelineFileName",
hide: true,
span: 24,
maxlength: 50,
showWordLimit: true,
},
{
label: "指南内容",
prop: "guidelineContent",
hide: true,
formslot: true,
span: 24,
},
{
label: "备注",
prop: "remarks",
type: "textarea",
hide: true,
span: 24,
maxlength: 100,
showWordLimit: true,
},
2024-02-27 22:09:13 +08:00
]
}
},
logOption() {
return {
2024-03-14 10:09:11 +08:00
editBtn: true,
2024-02-27 14:09:15 +08:00
delBtn: true,
2024-03-14 10:09:11 +08:00
addBtn: true,
2024-03-14 10:19:04 +08:00
viewBtn: true,
border: true,
index: true,
indexLabel: "序号",
refreshBtn: false,
2024-03-13 20:55:24 +08:00
dialogType: "drawer",
height: '100',
column: [{
2024-03-13 17:33:26 +08:00
label: '服务时间',
2024-05-20 10:30:34 +08:00
prop: 'createTime',
2024-05-21 14:29:41 +08:00
type: 'date',
format: "yyyy-MM-dd",
2024-05-21 15:50:59 +08:00
valueFormat: "yyyy-MM-dd HH:mm:ss",
2024-06-06 11:30:25 +08:00
rules: [
{
required: true,
message: "请选择服务时间",
trigger: "blur",
},
],
2024-06-12 15:27:14 +08:00
}, {
label: '服务名称',
prop: 'serveName',
display: false,
2024-05-20 10:30:34 +08:00
}, {
2024-03-13 17:33:26 +08:00
label: '服务发起人',
2024-05-29 18:03:21 +08:00
prop: 'fromName',
display: false,
2024-05-20 10:30:34 +08:00
}, {
2024-03-13 17:33:26 +08:00
label: '服务对象',
2024-05-29 18:03:21 +08:00
prop: 'toName',
display: false,
2024-05-20 10:30:34 +08:00
}, {
2024-03-13 17:33:26 +08:00
label: '服务主题',
2024-06-06 11:30:25 +08:00
prop: 'serveTheme',
rules: [
{
required: true,
message: "请输入服务主题",
trigger: "blur",
},
],
2024-05-20 10:30:34 +08:00
}, {
2024-03-13 17:33:26 +08:00
label: '服务内容',
2024-05-29 18:03:21 +08:00
span: 24,
2024-06-06 11:30:25 +08:00
prop: 'serveContent',
type: 'textarea',
rules: [
{
required: true,
message: "请输入服务内容",
trigger: "blur",
},
],
2024-05-20 10:30:34 +08:00
}, {
2024-03-13 21:01:06 +08:00
label: '备注说明',
2024-05-29 18:03:21 +08:00
span: 24,
type: 'textarea',
prop: 'bak1'
}]
}
},
2024-02-21 11:30:24 +08:00
},
created() {
this.initDept();
2024-03-18 11:34:50 +08:00
this.getListAllPolicyTree()
2024-06-05 14:47:10 +08:00
this.getLabelList()
this.ListAllTalents()
2024-02-21 11:30:24 +08:00
},
methods: {
2024-06-05 14:47:10 +08:00
/*点击分组加载相应人才列表*/
nodeClick(data) {
if (data.children) return;
this.selectInfo = data
this.tenantId = data.id ? data.id : "";
this.page.currentPage = 1;
this.onLoad(this.page, this.query);
2024-02-28 15:19:45 +08:00
},
2024-06-05 14:47:10 +08:00
/*加载分组*/
2024-02-27 20:28:13 +08:00
getLabelList() {
2024-05-20 10:30:34 +08:00
getLabelList().then((res) => {
2024-02-27 20:28:13 +08:00
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-06-05 14:47:10 +08:00
async ListAllTalents() {
let resData = await getListAllTalents()
if (resData.data.code === 200) {
this.talentsList = resData.data.data
}
2024-02-21 11:30:24 +08:00
},
initDept(groupId) {
2024-06-05 14:47:10 +08:00
getDepTree().then((res) => {
const data = res.data.data.list.map((item) => ({
...item,
disabled: true
}));
2024-02-21 11:30:24 +08:00
this.treeData = data;
2024-06-05 14:47:10 +08:00
// const column = this.findObject(this.option.column, "groupId");
// column.dicData = this.treeData;
2024-02-21 11:30:24 +08:00
if (groupId) {
this.$nextTick(function () {
this.$refs.tree.setCurrentKey(groupId);
}); //默认高亮
2024-05-20 10:30:34 +08:00
this.nodeClick({id: groupId});
2024-02-21 11:30:24 +08:00
} else {
if (this.treeData.length) {
2024-06-05 14:47:10 +08:00
const serveId2 = this.treeData[0].id
const serveId = this.treeData[0].children[0].id
2024-02-21 11:30:24 +08:00
this.$nextTick(function () {
2024-06-05 14:47:10 +08:00
this.$refs.tree.setCurrentKey(serveId);
2024-02-21 11:30:24 +08:00
}); //默认高亮第一个
2024-06-05 14:47:10 +08:00
this.nodeClick({id: serveId});
2024-02-21 11:30:24 +08:00
}
}
this.loading = false;
});
},
2024-06-05 14:47:10 +08:00
async getListAllPolicyTree() {
let resData = await getListAllPolicy({})
if (resData.data.code === 200) {
this.listAllPolicyTree = resData.data.data
}
},
2024-02-21 11:30:24 +08:00
updateGroups(type, data) {
this.$refs.addGroups.openDialog(type, data);
},
/*删除分组*/
removeGroups(data) {
//检验该分组是否存在人员,存在提示无法删除,不存在泽提示确定要删除此分组吗
const h = this.$createElement;
this.$confirm(
h("div", null, [
2024-05-20 10:30:34 +08:00
h("p", {style: "font-size: 16px"}, "您确定要删除此分组吗? "),
h("p", {style: "color: red"}, "一旦删除则无法找回"),
2024-02-21 11:30:24 +08:00
]),
{
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(() => {
});
},
2024-06-05 14:47:10 +08:00
/*加载人才列表 */
onLoad(page, params = {}) {
this.loading = true;
let paramsed = {
current: page.currentPage,
pageSize: page.pageSize,
id: this.tenantId,
...params
2024-02-21 11:30:24 +08:00
}
2024-06-05 14:47:10 +08:00
getServeListTalents(paramsed).then((res) => {
const {records, current, size, total} = res.data.data
this.dataSource = records
this.loading = false;
console.log({
pageSize: size,
currentPage: current,
total: total,
})
this.page = {
pageSize: size,
currentPage: current,
total: total,
}
// this.selectionClear();
});
2024-02-21 11:30:24 +08:00
},
refresh(type) {
this.page.currentPage = 1;
this.query = {};
if (type === "del") {
//删除分组后重新选中分组为未分组
this.initDept();
2024-06-05 14:47:10 +08:00
// this.onLoad(this.page, this.query);
2024-02-21 11:30:24 +08:00
} else {
this.initDept(this.tenantId);
2024-06-05 14:47:10 +08:00
// this.onLoad(this.page, this.query);
2024-02-21 11:30:24 +08:00
}
},
2024-02-26 21:23:17 +08:00
serveSearchChange(params, done) {
2024-06-05 14:47:10 +08:00
this.page.currentPage = 1;
this.query = params
this.onLoad(this.page, this.query);
2024-02-26 21:23:17 +08:00
done();
},
2024-06-05 14:47:10 +08:00
serveResetChange() {
2024-02-21 11:30:24 +08:00
this.page.currentPage = 1;
2024-06-05 14:47:10 +08:00
this.query = {}
2024-02-21 11:30:24 +08:00
this.onLoad(this.page, this.query);
},
2024-06-05 14:47:10 +08:00
infoSizeChange(pageSize) {
this.onLoad(this.page, this.query);
2024-02-21 11:30:24 +08:00
},
2024-06-05 14:47:10 +08:00
infoCurrentChange(currentPage) {
this.onLoad(this.page, this.query);
2024-02-21 11:30:24 +08:00
},
// 匹配任务和岗位
matchWorkStation(row) {
2024-05-20 10:30:34 +08:00
getMatchWorkStation({
serveUserId: row.serveUserId,
serveId: this.selectInfo.id,
companyId: this.selectInfo.companyId
}).then(res => {
const {records, current, size, total} = res.data.data
2024-03-29 11:31:03 +08:00
this.innerDrawer1 = true
this.workData = records
this.workPage = {
pageSize: size,
currentPage: current,
total: total,
}
})
},
// 匹配政策
matchPolicy(row) {
console.log('匹配政策')
2024-03-29 14:29:11 +08:00
getMatchPolicy({id: row.id, serveId: this.selectInfo.id, serveUserId: row.serveUserId}).then(res => {
let _this = this;
const {records, current, size, total} = res.data.data
2024-05-20 10:30:34 +08:00
_this.policyData = records
_this.innerDrawer2 = true
_this.policyPage = {
pageSize: size,
currentPage: current,
total: total,
}
})
},
// 服务日志
serveLog(row) {
2024-05-29 18:03:21 +08:00
console.log('服务日志', row)
2024-05-20 10:30:34 +08:00
this.selectUserServeLog = row
getMatchServeList({
id: row.id,
serveId: this.selectInfo.id,
companyId: this.selectInfo.companyId,
current: this.logPage.currentPage,
size: this.logPage.pageSize
}).then(res => {
let _this = this;
const {records, current, size, total} = res.data.data
2024-05-20 10:30:34 +08:00
_this.logData = records
_this.innerDrawer3 = true
_this.logPage = {
pageSize: size,
currentPage: current,
total: total,
}
})
},
2024-06-05 14:47:10 +08:00
async saveLog(row, index, done, loading) {
let params = {
...row,
serveId: this.selectInfo.id,
serveUserId: this.selectUserServeLog.serveUserId,
talentsId: this.selectUserServeLog.id,
idNumber: this.selectUserServeLog.idNumber,
toName: this.selectUserServeLog.name,
fromName: this.userInfo.real_name
}
let resData = await addServeLog(params)
done()
if (resData.data.code === 200) {
this.$message({
type: "success",
message: "添加成功!",
});
this.serveLog(this.selectUserServeLog)
}
},
async saveUpdateLog(row, index, done, loading) {
let params = {
id: row.id,
createTime: row.createTime,
fromName: row.fromName,
toName: row.toName,
serveTheme: row.serveTheme,
serveContent: row.serveContent,
bak1: row.bak1,
}
let resData = await updateServeLog(params)
done()
if (resData.data.code === 200) {
this.$message({
type: "success",
message: "修改成功!",
});
this.serveLog(this.selectUserServeLog)
}
},
removeLog(row, index, done, loading) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
return removeServeLog({ids: row.id});
})
.then(() => {
this.serveLog(this.selectUserServeLog)
this.$message({
type: "success",
message: "操作成功!",
});
});
},
logSizeChange(pageSize) {
this.logPage.pageSize = pageSize;
this.serveLog(this.selectUserServeLog)
},
logCurrentChange(currentPage) {
this.logPage.currentPage = currentPage;
this.serveLog(this.selectUserServeLog)
},
workSizeChange() {
},
workCurrentChange() {
},
2024-06-05 14:47:10 +08:00
policySizeChange() {
},
2024-06-05 14:47:10 +08:00
policyCurrentChange() {
},
2024-06-05 14:47:10 +08:00
selectPushService() {
detail(this.selectInfo.id).then((res) => {
if (res.data.code === 200) {
this.selectPushServiceData = res.data.data
this.PushServiceVisible = true
}
})
// this.selectPushServiceData = deepClone(this.selectInfo)
// this.PushServiceVisible = true
2024-02-26 22:07:01 +08:00
},
/*查看*/
toWorkMissionDetail(row) {
2024-05-20 10:30:34 +08:00
if (row.type == 0) {
2024-02-26 22:07:01 +08:00
missionDetail(row.missionNo).then((res) => {
this.viewDrawer = true;
this.view = res;
});
2024-05-20 10:30:34 +08:00
} else if (row.type == 1) {
2024-02-26 22:07:01 +08:00
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-06-05 14:47:10 +08:00
clipStr(str) {
const clip = []
if (str && str.length > 50) {
for (let i = 0; i < Math.ceil(str.length / 50); i++) {
clip.push(str.slice(i * 50, i * 50 + 50))
}
return clip
}
return [str]
2024-03-13 20:55:24 +08:00
},
2024-06-05 14:47:10 +08:00
}
2024-02-21 11:30:24 +08:00
}
2024-06-05 14:47:10 +08:00
</script>
2024-02-21 11:30:24 +08:00
2024-06-05 14:47:10 +08:00
<style lang="scss" scoped>
2024-02-21 11:30:24 +08:00
</style>