添加零工服务
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import request from "@/router/axios";
|
import request from "@/router/axios";
|
||||||
|
|
||||||
/*获取人才列表*/
|
/*获取人才列表*/
|
||||||
export const getList = (current, size, params, groupId) => {
|
export const getList = (current, size, params, groupId) => {
|
||||||
return request({
|
return request({
|
||||||
@@ -8,6 +9,15 @@ export const getList = (current, size, params, groupId) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*获取人才列表*/
|
||||||
|
export const getUserList = (current, size, params, groupId) => {
|
||||||
|
return request({
|
||||||
|
url: "/api/jobslink-api/serve/user/list",
|
||||||
|
method: "get",
|
||||||
|
params: { ...params, current, size, groupId }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/*新增人才*/
|
/*新增人才*/
|
||||||
export const add = row => {
|
export const add = row => {
|
||||||
return request({
|
return request({
|
||||||
@@ -62,6 +72,24 @@ export const addDept = row => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*获取分组 - 零工管理*/
|
||||||
|
export const getServeGroupList = () => {
|
||||||
|
return request({
|
||||||
|
url: "/api/jobslink-api/serve/user/group/listAll",
|
||||||
|
method: "get",
|
||||||
|
params: {}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/*新建分组 - 零工管理*/
|
||||||
|
export const addServeGroup = row => {
|
||||||
|
return request({
|
||||||
|
url: "/api/jobslink-api/serve/user/group/save",
|
||||||
|
method: "post",
|
||||||
|
data: row
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/*编辑分组*/
|
/*编辑分组*/
|
||||||
export const updateDept = row => {
|
export const updateDept = row => {
|
||||||
return request({
|
return request({
|
||||||
@@ -204,3 +232,10 @@ export const getListAllTalents = params =>
|
|||||||
method: "get",
|
method: "get",
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const getListUserAllTalents = params =>
|
||||||
|
request({
|
||||||
|
url: "/api/jobslink-api/serve/user/listAllTalents",
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
|||||||
34
src/views/manage/cuser/serve/Dialog/ServeDetail.vue
Normal file
34
src/views/manage/cuser/serve/Dialog/ServeDetail.vue
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
size="70%"
|
||||||
|
append-to-body
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="drawer"
|
||||||
|
:wrapperClosable="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
|
||||||
|
@closed="closed"
|
||||||
|
>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
drawer: false,
|
||||||
|
title: '服务详情'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onLoad() {
|
||||||
|
this.drawer = true;
|
||||||
|
},
|
||||||
|
closed() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
146
src/views/manage/cuser/serve/Dialog/addGroups.vue
Normal file
146
src/views/manage/cuser/serve/Dialog/addGroups.vue
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 新建分组模板 -->
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="box"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
@closed="closed"
|
||||||
|
width="555px"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:model="form"
|
||||||
|
@submit.native.prevent
|
||||||
|
:rules="rules"
|
||||||
|
ref="groups"
|
||||||
|
label-position="right"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-form-item label="分组名称" prop="groupName">
|
||||||
|
<el-input v-model="form.groupName" placeholder="请输入 分组名称" size="small" :disabled="loading" maxlength="40" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" style="text-align:right">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-check"
|
||||||
|
@click="handleSubmit"
|
||||||
|
:loading="loading"
|
||||||
|
>提交</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-circle-close" @click=" box = false" :loading="loading">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { addServeGroup, updateDept } from "@/api/tenant/serve";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
type: "",
|
||||||
|
title: "",
|
||||||
|
groupId: "",
|
||||||
|
loading: false,
|
||||||
|
box: false,
|
||||||
|
form: {
|
||||||
|
groupName: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
groupName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
whitespace: true,
|
||||||
|
message: "请填写分组名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
closed() {
|
||||||
|
this.form = {
|
||||||
|
groupName: "",
|
||||||
|
};
|
||||||
|
if (this.$refs.groups) {
|
||||||
|
this.$refs.groups.resetFields();
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
},
|
||||||
|
openDialog(type, data) {
|
||||||
|
this.type = type;
|
||||||
|
if (this.type === "add") {
|
||||||
|
this.title = "新建分组";
|
||||||
|
this.box = true;
|
||||||
|
} else if (this.type === "edit") {
|
||||||
|
this.title = "编辑分组";
|
||||||
|
this.groupId = data.id;
|
||||||
|
this.form.groupName = data.groupName;
|
||||||
|
this.box = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
if(this.form.groupName){
|
||||||
|
this.$refs.groups.validate(valid=>{
|
||||||
|
if(valid){
|
||||||
|
if (this.type === "add") {
|
||||||
|
//提交新建分组接口
|
||||||
|
this.loading = true;
|
||||||
|
addServeGroup({
|
||||||
|
groupName: this.form.groupName,
|
||||||
|
}).then(
|
||||||
|
() => {
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "操作成功!",
|
||||||
|
});
|
||||||
|
this.box = false;
|
||||||
|
this.$emit("refresh");
|
||||||
|
this.loading = false;
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
window.console.log(error);
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else if (this.type == "edit") {
|
||||||
|
//提交编辑分组接口
|
||||||
|
this.loading = true;
|
||||||
|
updateDept({
|
||||||
|
id: this.groupId,
|
||||||
|
groupName: this.form.groupName,
|
||||||
|
}).then(
|
||||||
|
() => {
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "操作成功!",
|
||||||
|
});
|
||||||
|
this.box = false;
|
||||||
|
this.$emit("refresh");
|
||||||
|
this.loading = false;
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
window.console.log(error);
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.$message.error('请输入分组名称');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
290
src/views/manage/cuser/serve/Dialog/addLog.vue
Normal file
290
src/views/manage/cuser/serve/Dialog/addLog.vue
Normal file
@@ -0,0 +1,290 @@
|
|||||||
|
<template>
|
||||||
|
<basic-container>
|
||||||
|
<jl-go-back></jl-go-back>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<avue-form :option="formOption" v-model="form" @submit="handleSubmit" ref="form">
|
||||||
|
<template slot="policyFileUrl">
|
||||||
|
<div class="policyFileUrlWrapper">
|
||||||
|
<div class="uploadWrapperAb">
|
||||||
|
<el-upload
|
||||||
|
action="#"
|
||||||
|
ref="upload"
|
||||||
|
:show-file-list="false"
|
||||||
|
:http-request="allUpload"
|
||||||
|
:multiple="false"
|
||||||
|
><el-button size="small" type="primary">点击上传</el-button></el-upload>
|
||||||
|
</div>
|
||||||
|
<avue-input disabled v-model="policyFileUrl" placeholder="点击上传文件"></avue-input>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</avue-form>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<Tinymce v-model="form.note" ref="tinymce" style="height: 100%;"></Tinymce>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</basic-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import 'quill/dist/quill.core.css'
|
||||||
|
import 'quill/dist/quill.snow.css'
|
||||||
|
import 'quill/dist/quill.bubble.css'
|
||||||
|
import { quillEditor } from "vue-quill-editor";
|
||||||
|
|
||||||
|
|
||||||
|
import { addNews, getNewsDetail, editNews } from "@/api/manage/news"
|
||||||
|
import { putFile } from "@/api/resource/oss";
|
||||||
|
import Tinymce from "@/components/Tinymce";
|
||||||
|
import {getClassifyDic} from '@/api/help/article/classify'
|
||||||
|
|
||||||
|
const toolbarItems = [
|
||||||
|
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
|
||||||
|
["blockquote", "code-block"], // 引用 代码块
|
||||||
|
[{ header: 1 }, { header: 2 }], // 1、2 级标题
|
||||||
|
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
|
||||||
|
[{ script: "sub" }, { script: "super" }], // 上标/下标
|
||||||
|
[{ indent: "-1" }, { indent: "+1" }], // 缩进
|
||||||
|
// [{'direction': 'rtl'}], // 文本方向
|
||||||
|
[{ size: ["small", false, "large", "huge"] }], // 字体大小
|
||||||
|
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||||
|
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
||||||
|
[{ font: [] }], // 字体种类
|
||||||
|
[{ align: [] }], // 对齐方式
|
||||||
|
["clean"], // 清除文本格式
|
||||||
|
["image"], // 链接、图片、视频
|
||||||
|
]
|
||||||
|
export default {
|
||||||
|
components: { quillEditor, Tinymce},
|
||||||
|
props: {
|
||||||
|
id: Number,
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.onload()
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
policyFileUrl: '',
|
||||||
|
putFile,
|
||||||
|
imageUrl: '',
|
||||||
|
ruleForm: {
|
||||||
|
content: null,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
note: ''
|
||||||
|
},
|
||||||
|
description:'',
|
||||||
|
formOption: {
|
||||||
|
// labelWidth:120,
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
"label": "服务时间",
|
||||||
|
"span": 24,
|
||||||
|
labelWidth: 100,
|
||||||
|
"prop": "createTime",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"required": true,
|
||||||
|
"message": "请输入服务时间"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "服务发起人",
|
||||||
|
"span": 24,
|
||||||
|
labelWidth: 100,
|
||||||
|
"prop": "fromName",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"required": true,
|
||||||
|
"message": "请输入服务发起人"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "服务对象",
|
||||||
|
"span": 24,
|
||||||
|
labelWidth: 100,
|
||||||
|
"prop": "toName",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"required": true,
|
||||||
|
"message": "请输入服务对象"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "服务主题",
|
||||||
|
"span": 24,
|
||||||
|
labelWidth: 100,
|
||||||
|
"prop": "serveTheme",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"required": true,
|
||||||
|
"message": "请输入服务主题"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "服务内容",
|
||||||
|
"span": 24,
|
||||||
|
labelWidth: 100,
|
||||||
|
"prop": "serveContent",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"required": true,
|
||||||
|
"message": "请输入服务内容"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "备注1",
|
||||||
|
"span": 24,
|
||||||
|
labelWidth: 100,
|
||||||
|
"prop": "bak1",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"required": true,
|
||||||
|
"message": "请输入备注1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "政策文件地址",
|
||||||
|
prop: "policyFileUrl",
|
||||||
|
span: 24,
|
||||||
|
labelWidth: 120,
|
||||||
|
hide: true,
|
||||||
|
slot: true,
|
||||||
|
formslot: true,
|
||||||
|
showWordLimit: true,
|
||||||
|
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
},
|
||||||
|
editorOption: {
|
||||||
|
modules: {
|
||||||
|
toolbar: {
|
||||||
|
container: toolbarItems,
|
||||||
|
handlers: {
|
||||||
|
'image': function (value) {
|
||||||
|
if (value) {
|
||||||
|
document.querySelector('.avatar-uploader input').click()
|
||||||
|
} else {
|
||||||
|
this.quill.format('image', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},//工具菜单栏配置
|
||||||
|
},
|
||||||
|
placeholder: "请在这里编写文章内容", //提示
|
||||||
|
readyOnly: false, //是否只读
|
||||||
|
theme: "snow", //主题 snow/bubble
|
||||||
|
syntax: true, //语法检测
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
// 值发生变化
|
||||||
|
onEditorChange(editor) {
|
||||||
|
this.content = editor.html;
|
||||||
|
},
|
||||||
|
handleSubmit(form, done) {
|
||||||
|
// this.form['note'] = this.$refs.tinymce.getContent()
|
||||||
|
|
||||||
|
if(this.form.note.length>64*512){
|
||||||
|
this.$message.error('文章内容不能超过64KB!');
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if (this.type == 'add') {
|
||||||
|
addNews(
|
||||||
|
this.form.articleTitle,
|
||||||
|
this.form.headPic,
|
||||||
|
this.form.articleSrc,
|
||||||
|
this.form.articleSrcUrl,
|
||||||
|
this.form.author,
|
||||||
|
this.form.description,
|
||||||
|
this.form.note,
|
||||||
|
this.form.type
|
||||||
|
).then(() => {
|
||||||
|
this.$message.success('添加成功');
|
||||||
|
this.$router.go(-1);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else if (this.type == 'edit') {
|
||||||
|
editNews(
|
||||||
|
this.id,
|
||||||
|
this.form.articleTitle,
|
||||||
|
this.form.headPic,
|
||||||
|
this.form.articleSrc,
|
||||||
|
this.form.articleSrcUrl,
|
||||||
|
this.form.author,
|
||||||
|
this.form.description,
|
||||||
|
this.form.note,
|
||||||
|
this.form.type
|
||||||
|
).then(() => {
|
||||||
|
this.$message.success('修改成功');
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
/*上传图片*/
|
||||||
|
handleAvatarSuccess(res) {
|
||||||
|
let quill = this.$refs.QuillEditor.quill
|
||||||
|
let length = quill.getSelection().index;//获取光标所在位置
|
||||||
|
quill.insertEmbed(length, 'image', res.data.link)
|
||||||
|
quill.setSelection(length + 1)//光标后移一位
|
||||||
|
},
|
||||||
|
beforeAvatarUpload(file) {
|
||||||
|
const isJPG = ["image/png", "image/jpeg", "image/svg+xml", "image/gif"].indexOf(file.type) != -1;
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
if (!isJPG) {
|
||||||
|
this.$message.error('上传图片格式不正确');
|
||||||
|
}
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.$message.error('上传图片大小不能超过 2MB!');
|
||||||
|
}
|
||||||
|
return isJPG && isLt2M;
|
||||||
|
},
|
||||||
|
onload() {
|
||||||
|
if (this.id && this.type == 'edit') {
|
||||||
|
getNewsDetail(this.id).then(res => {
|
||||||
|
this.form = res.data.data;
|
||||||
|
this.description=this.form.description;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.avatar-uploader {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-editor {
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
.policyFileUrlWrapper {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploadWrapperAb {
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
z-index: 99;
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
530
src/views/manage/cuser/serve/Dialog/pushService.vue
Normal file
530
src/views/manage/cuser/serve/Dialog/pushService.vue
Normal file
@@ -0,0 +1,530 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer size="100%" append-to-body title="推送服务" :visible.sync="viewDrawer">
|
||||||
|
<div>
|
||||||
|
<div class="content">
|
||||||
|
<!-- 用户板块 -->
|
||||||
|
<div class="content-left relative">
|
||||||
|
<avue-crud height="900" width="500" ref="crud1" :data="leftUserDataList" :option="leftUserOptions"
|
||||||
|
:page.sync="leftPages"
|
||||||
|
@current-change="leftCurrentPageChange" @size-change="leftSizePageChange"
|
||||||
|
@selection-change="leftSelectionChange">
|
||||||
|
<template slot="menuLeft">
|
||||||
|
<div class="leftInput">
|
||||||
|
<el-input size="small" v-model="formInline.userName" class="input-with-select" placeholder="用户名">
|
||||||
|
<el-select size="small" v-model="formInline.groupId" slot="prepend" class="selectWidth"
|
||||||
|
placeholder="请选择">
|
||||||
|
<el-option v-for="item in leftServeOptions" :key="item.id" :label="item.groupName"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-button size="small" slot="append" class="input-search" @click="leftSearch">搜索</el-button>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template slot="labelsBase" slot-scope="{row}">
|
||||||
|
<TextTooltip :content="row.labelsBase" length="20"></TextTooltip>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
<CustomLoading :visible="leftLoading" size="largeXXL" loading-text="用户数据加载中"></CustomLoading>
|
||||||
|
</div>
|
||||||
|
<!-- 操作 -->
|
||||||
|
<div class="content-center">
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" size="small" @click="changeTabs(0)">匹配政策</el-button>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 30px">
|
||||||
|
<el-button :disabled="leftUserSelections.length > 0 ? false : true"
|
||||||
|
type="primary" @click="changeTabs(1)" size="small">匹配岗位
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 列表 -->
|
||||||
|
<div class="content-right relative">
|
||||||
|
<avue-crud height="900" ref="crud2" :data="rightDataList"
|
||||||
|
:option="rightTabs ? rightPostOptions : rightPolicyOptions" :page.sync="rightPages"
|
||||||
|
@current-change="rightCurrentPageChange" @size-change="rightSizePageChange"
|
||||||
|
@selection-change="rightSelectionChange">
|
||||||
|
<template slot="menuLeft">
|
||||||
|
<el-input style="width: 300px" placeholder="搜索岗位" v-show="rightTabs === 1"
|
||||||
|
prefix-icon="el-icon-search"
|
||||||
|
@input="searchInputChange" v-model="searchInput" clearable>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
<template slot="labelName" slot-scope="{row}">
|
||||||
|
<TextTooltip :content="row.labelName" length="40"></TextTooltip>
|
||||||
|
</template>
|
||||||
|
<template slot="jobDescription" slot-scope="{row}">
|
||||||
|
<TextTooltip :content="row.jobDescription" length="40"></TextTooltip>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
<CustomLoading :visible="rightLoading" size="largeXXL" loading-text="智能分析匹配中"></CustomLoading>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content-footer">
|
||||||
|
<el-button type="primary" style="width: 80px" size="small" :disabled="pushState" @click="onSubmit">
|
||||||
|
{{ pushState ? '推送中...' : rightTabs ? '推送岗位' : '推送政策' }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getListAllByLabels,
|
||||||
|
getListGroupByLabels,
|
||||||
|
getServeAllPolicyList,
|
||||||
|
getListByids,
|
||||||
|
getSearchAll,
|
||||||
|
getSearchAllByUserId,
|
||||||
|
pushPolicyUserServe,
|
||||||
|
pushPostUserServe,
|
||||||
|
getListAllByPolicy
|
||||||
|
} from "@/api/tenant/serve.js";
|
||||||
|
import TextTooltip from "@/components/text-tooltip/index.vue";
|
||||||
|
import {debounce} from '@/util/util'
|
||||||
|
import {DateTime} from "@/util/dateTime";
|
||||||
|
import CustomLoading from "@/components/Custom-Loading/index.vue";
|
||||||
|
|
||||||
|
const pages = {pagerCount: 3, total: 0, size: 10, currentPage: 1}
|
||||||
|
const baseOptions = {
|
||||||
|
size: 'medium',
|
||||||
|
dateBtn: false,
|
||||||
|
addBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
height: "auto",
|
||||||
|
reserveSelection: false,
|
||||||
|
border: true,
|
||||||
|
columnBtn: false,
|
||||||
|
refreshBtn: false,
|
||||||
|
menu: false,
|
||||||
|
tip: false,
|
||||||
|
selection: true,
|
||||||
|
align: 'center',
|
||||||
|
}
|
||||||
|
let leftUserOptions = {
|
||||||
|
...baseOptions,
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: '机构名称',
|
||||||
|
prop: 'companyName',
|
||||||
|
fixed: true,
|
||||||
|
}, {
|
||||||
|
label: '姓名',
|
||||||
|
prop: 'name',
|
||||||
|
fixed: true,
|
||||||
|
}, {
|
||||||
|
label: '姓别',
|
||||||
|
prop: 'aac004',
|
||||||
|
}, {
|
||||||
|
label: '身份证',
|
||||||
|
prop: 'idNumber',
|
||||||
|
width: 150,
|
||||||
|
}, {
|
||||||
|
label: '手机号',
|
||||||
|
prop: 'telphone',
|
||||||
|
}, {
|
||||||
|
label: "民族",
|
||||||
|
prop: "aac005",
|
||||||
|
}, {
|
||||||
|
label: "户口性质",
|
||||||
|
prop: "aac009",
|
||||||
|
}, {
|
||||||
|
label: "户口所在地",
|
||||||
|
prop: "aac010",
|
||||||
|
width: 150,
|
||||||
|
}, {
|
||||||
|
label: "文化程度",
|
||||||
|
prop: "aac011",
|
||||||
|
}, {
|
||||||
|
label: "经办时间",
|
||||||
|
prop: "aae036",
|
||||||
|
}, {
|
||||||
|
label: '个人标签',
|
||||||
|
prop: 'labelsBase',
|
||||||
|
width: 150,
|
||||||
|
slot: true,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
let rightPolicyOptions = {
|
||||||
|
...baseOptions,
|
||||||
|
column: [{
|
||||||
|
label: '政策名称',
|
||||||
|
prop: 'name',
|
||||||
|
}, {
|
||||||
|
label: '政策标签',
|
||||||
|
prop: 'labelName',
|
||||||
|
slot: true,
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
let rightPostOptions = {
|
||||||
|
...baseOptions,
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: '岗位名称',
|
||||||
|
prop: 'jobName',
|
||||||
|
}, {
|
||||||
|
label: '用工单位',
|
||||||
|
prop: 'companyName',
|
||||||
|
}, {
|
||||||
|
label: '岗位描述',
|
||||||
|
prop: 'jobDescription',
|
||||||
|
slot: true,
|
||||||
|
}, {
|
||||||
|
label: "岗位类型",
|
||||||
|
prop: "type1",
|
||||||
|
type: "select",
|
||||||
|
dicData: [
|
||||||
|
{
|
||||||
|
value: "0",
|
||||||
|
label: "零工岗位",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "1",
|
||||||
|
label: "全职岗位",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
display: false,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
components: {TextTooltip, CustomLoading},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formInline: {},
|
||||||
|
leftServeOptions: [],
|
||||||
|
leftUserDataList: [],
|
||||||
|
leftUserPages: {},
|
||||||
|
leftUserSelections: [],
|
||||||
|
leftPages: Object.assign({}, pages),
|
||||||
|
leftUserOptions: Object.assign({}, leftUserOptions),
|
||||||
|
leftLoading: false,
|
||||||
|
rightLoading: false,
|
||||||
|
rightDataList: [],
|
||||||
|
rightDataSelections: [],
|
||||||
|
rightPages: Object.assign({}, pages),
|
||||||
|
rightPolicyOptions: Object.assign({}, rightPolicyOptions),
|
||||||
|
rightPostOptions: Object.assign({}, rightPostOptions),
|
||||||
|
searchInput: '',
|
||||||
|
rightTabs: 0, // 0: 政策, 1: 岗位
|
||||||
|
pushState: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
visible: Boolean,
|
||||||
|
rowData: {default: null, type: Function},
|
||||||
|
changeVisible: {default: null, type: Function},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
viewDrawer: {
|
||||||
|
get() {
|
||||||
|
return this.visible;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$emit("update:visible", val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
viewDrawer(val) {
|
||||||
|
val ? this.onPageLoad() : this.onPageInit()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onPageLoad() {
|
||||||
|
console.log('row', this.rowData)
|
||||||
|
if (!this.rowData) return
|
||||||
|
this.getLeftSignGroupList()
|
||||||
|
this.getLeftUserList()
|
||||||
|
// this.getRightListPolicy()
|
||||||
|
},
|
||||||
|
onPageInit() {
|
||||||
|
this.formInline = {}
|
||||||
|
this.leftServeOptions = []
|
||||||
|
this.leftUserDataList = []
|
||||||
|
this.leftUserSelections = []
|
||||||
|
this.leftUserPages = Object({}, pages)
|
||||||
|
this.leftPages = Object.assign({}, pages)
|
||||||
|
this.leftUserOptions = Object.assign({}, leftUserOptions)
|
||||||
|
this.leftLoading = false
|
||||||
|
this.rightLoading = false
|
||||||
|
this.rightDataList = []
|
||||||
|
this.rightDataSelections = []
|
||||||
|
this.rightPages = Object.assign({}, pages)
|
||||||
|
this.rightPolicyOptions = Object.assign({}, rightPolicyOptions)
|
||||||
|
this.rightPostOptions = Object.assign({}, rightPostOptions)
|
||||||
|
this.searchInput = ''
|
||||||
|
this.rightTabs = 0 // 0: 政策
|
||||||
|
this.pushState = false
|
||||||
|
this.$refs.crud1.selectClear()
|
||||||
|
this.$refs.crud2.selectClear()
|
||||||
|
},
|
||||||
|
changeTabs(type) {
|
||||||
|
this.rightDataList = []
|
||||||
|
this.rightTabs = type
|
||||||
|
this.rightDataSelections = []
|
||||||
|
this.$message.success('智能分析匹配中');
|
||||||
|
|
||||||
|
type === 0 && this.getRightListPolicy()
|
||||||
|
type === 1 && this.getRightSearchByUserId()
|
||||||
|
},
|
||||||
|
searchInputChange: debounce(function (val) {
|
||||||
|
this.getRightSearch()
|
||||||
|
}, 1000),
|
||||||
|
leftSearch() {
|
||||||
|
this.leftPages.currentPage = 1
|
||||||
|
this.getLeftUserList('serve')
|
||||||
|
console.log('leftpages:', this.leftPages)
|
||||||
|
},
|
||||||
|
leftCurrentPageChange(current) {
|
||||||
|
this.leftPages.currentPage = current
|
||||||
|
this.getLeftUserList()
|
||||||
|
console.log('leftpages:', this.leftPages)
|
||||||
|
},
|
||||||
|
leftSizePageChange(current) {
|
||||||
|
this.leftPages.size = current
|
||||||
|
this.getLeftUserList()
|
||||||
|
console.log('leftpages:', this.leftPages)
|
||||||
|
},
|
||||||
|
rightCurrentPageChange(current) {
|
||||||
|
this.rightPages.currentPage = current
|
||||||
|
this.rightTabs === 0 && this.getRightListPolicy()
|
||||||
|
this.rightTabs === 1 && this.getRightSearchByUserId()
|
||||||
|
},
|
||||||
|
rightSizePageChange(current) {
|
||||||
|
this.rightPages.size = current
|
||||||
|
this.rightTabs === 0 && this.getRightListPolicy()
|
||||||
|
this.rightTabs === 1 && this.getRightSearchByUserId()
|
||||||
|
},
|
||||||
|
leftSelectionChange(val) {
|
||||||
|
this.leftUserSelections = val
|
||||||
|
console.log(val, '--------------------00000');
|
||||||
|
},
|
||||||
|
rightSelectionChange(val) {
|
||||||
|
this.rightDataSelections = val
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
if (!this.leftUserSelections.length) return this.$message.info('请选择推送用户')
|
||||||
|
if (!this.rightDataSelections.length) return this.$message.info('请选择推送政策或岗位')
|
||||||
|
if (this.rightTabs === 0) {
|
||||||
|
this.pushPolicyAndUser()
|
||||||
|
} else {
|
||||||
|
this.pushPostAndUser()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groupNameChange() {
|
||||||
|
this.getLeftUserList('serve')
|
||||||
|
},
|
||||||
|
async pushPostAndUser() {
|
||||||
|
this.pushState = true
|
||||||
|
const createTime = Date.now() + 2000
|
||||||
|
// console.log(this.rightDataSelections,);
|
||||||
|
let params = {
|
||||||
|
serveId: this.rowData.id,
|
||||||
|
posts: this.rightDataSelections.map((item) => ({id: item.id, type: item.type1, jobName: item.jobName})),
|
||||||
|
users: this.leftUserSelections.map((item) => ({
|
||||||
|
idNumber: item.idNumber,
|
||||||
|
talentsId: item.id,
|
||||||
|
userId: item.userId,
|
||||||
|
userName: item.name
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
console.log(params, "999999999999999999999999999");
|
||||||
|
let resData = await pushPostUserServe(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$message.success('岗位推送成功')
|
||||||
|
this.$refs.crud1.selectClear()
|
||||||
|
this.$refs.crud2.selectClear()
|
||||||
|
this.pushState = false
|
||||||
|
}, timed)
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async pushPolicyAndUser() {
|
||||||
|
this.pushState = true
|
||||||
|
const createTime = Date.now() + 2000
|
||||||
|
let params = {
|
||||||
|
serveId: this.rowData.id,
|
||||||
|
policyIds: this.rightDataSelections.map((item) => item.id),
|
||||||
|
users: this.leftUserSelections.map((item) => ({
|
||||||
|
idNumber: item.idNumber,
|
||||||
|
talentsId: item.id,
|
||||||
|
userId: item.userId,
|
||||||
|
userName: item.name
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
let resData = await pushPolicyUserServe(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$message.success('政策推送成功')
|
||||||
|
this.$refs.crud1.selectClear()
|
||||||
|
this.$refs.crud2.selectClear()
|
||||||
|
this.pushState = false
|
||||||
|
}, timed)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getRightSearch() {
|
||||||
|
let params = {keywords: this.searchInput || '1'}
|
||||||
|
const createTime = Date.now() + 3000
|
||||||
|
this.rightLoading = true
|
||||||
|
let resData = await getSearchAll(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0
|
||||||
|
setTimeout(() => {
|
||||||
|
this.rightLoading = false
|
||||||
|
this.rightDataList = resData.data.data
|
||||||
|
}, timed)
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getRightSearchByUserId() {
|
||||||
|
const {currentPage, size} = this.rightPages
|
||||||
|
const ids = this.leftUserSelections.map(item => item.userId).join(',');
|
||||||
|
const createTime = Date.now() + 3000
|
||||||
|
this.rightLoading = true
|
||||||
|
let params = {
|
||||||
|
ids, current: currentPage,
|
||||||
|
size,
|
||||||
|
}
|
||||||
|
let resData = await getSearchAllByUserId(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0
|
||||||
|
setTimeout(() => {
|
||||||
|
const {records, total, size, current} = resData.data.data
|
||||||
|
this.rightLoading = false
|
||||||
|
this.rightDataList = records
|
||||||
|
this.rightPages = {total, size, currentPage: current}
|
||||||
|
}, timed)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getRightListPolicy() {
|
||||||
|
const {currentPage, size} = this.rightPages
|
||||||
|
let params = {
|
||||||
|
ids: this.rowData.policyIds,
|
||||||
|
current: currentPage,
|
||||||
|
size,
|
||||||
|
}
|
||||||
|
const createTime = Date.now() + 3000
|
||||||
|
this.rightLoading = true
|
||||||
|
let resData = await getListByids(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0
|
||||||
|
setTimeout(() => {
|
||||||
|
const {records, total, size, current} = resData.data.data
|
||||||
|
this.rightLoading = false
|
||||||
|
this.rightDataList = records
|
||||||
|
this.rightPages = {total, size, currentPage: current}
|
||||||
|
}, timed)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getLeftUserList(type) {
|
||||||
|
const {currentPage, size} = this.leftPages
|
||||||
|
const createTime = Date.now() + 3000
|
||||||
|
let params = {
|
||||||
|
...this.formInline,
|
||||||
|
current: currentPage,
|
||||||
|
size,
|
||||||
|
labels: this.rowData.talentsNames.join(','),
|
||||||
|
talentsGroupId: this.rowData.talentsGroupId
|
||||||
|
}
|
||||||
|
console.log('params', params)
|
||||||
|
// params.labels = '未分组'
|
||||||
|
this.leftLoading = true
|
||||||
|
let resData = await getListAllByPolicy(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0
|
||||||
|
setTimeout(() => {
|
||||||
|
const {records, total, size, current} = resData.data.data
|
||||||
|
this.leftUserDataList = records
|
||||||
|
this.leftPages = {total, size, currentPage: current}
|
||||||
|
console.log('leftpages:', this.leftPages)
|
||||||
|
this.leftLoading = false
|
||||||
|
}, timed)
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getLeftSignGroupList() {
|
||||||
|
const arr = this.rowData.talentsNames.map((v) => ({groupName: v, value: v}))
|
||||||
|
this.leftServeOptions = [{groupName: '全部'}, ...arr]
|
||||||
|
// let params = { labels: this.rowData.talentsNames.join(',') }
|
||||||
|
// params.labels = '未分组'
|
||||||
|
// let resData = await getListAllByPolicy(params)
|
||||||
|
// if ( resData.data.code === 200 ) {
|
||||||
|
// this.leftServeOptions = [{groupName: '全部', value: ''}, ...resData.data.data]
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: calc(50% - 40px) 80px calc(50% - 80px);
|
||||||
|
grid-gap: 20px;
|
||||||
|
|
||||||
|
.content-left {
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-center {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-right {
|
||||||
|
|
||||||
|
//修改动画的大小 给文字加粗效果
|
||||||
|
.right-search {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.leftInput {
|
||||||
|
width: 500px;
|
||||||
|
|
||||||
|
.selectWidth {
|
||||||
|
width: 160px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input__inner {
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-search {
|
||||||
|
margin-right: -15px;
|
||||||
|
margin-bottom: -10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-loading-spinner {
|
||||||
|
font-size: 80px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-loading-spinner .circular {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-footer {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.relative {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
110
src/views/manage/cuser/serve/Dialog/transferGroups.vue
Normal file
110
src/views/manage/cuser/serve/Dialog/transferGroups.vue
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 转移分组模板 -->
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="box"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
@closed="closed"
|
||||||
|
width="555px"
|
||||||
|
>
|
||||||
|
<avue-form ref="groups" :option="option" v-model="form" @submit="handleSubmit">
|
||||||
|
<template slot="menuForm" slot-scope="{disabled}">
|
||||||
|
<!-- <el-button type="primary" icon="el-icon-check" @click="copy" :disabled="formLoading">提交</el-button> -->
|
||||||
|
<el-button icon="el-icon-circle-close" @click="box = false" :loading="disabled">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</avue-form>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { transferDept } from "@/api/tenant/serve";
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
ids: String,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: "",
|
||||||
|
groupId: "",
|
||||||
|
box: false,
|
||||||
|
form: {},
|
||||||
|
option: {
|
||||||
|
menuPosition: "right",
|
||||||
|
menuBtn: true,
|
||||||
|
submitBtn: true,
|
||||||
|
emptyBtn: false,
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: "所属分组",
|
||||||
|
prop: "groupId",
|
||||||
|
type: "tree",
|
||||||
|
span: 24,
|
||||||
|
display: true,
|
||||||
|
dicUrl: `/api/jobslink-api/tenant/talents/group/listAll`,
|
||||||
|
dicMethod: "get",
|
||||||
|
dicFormatter: (res) => {
|
||||||
|
return res.data.list; //返回字典的层级结构
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
label: "groupName",
|
||||||
|
value: "id",
|
||||||
|
},
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
whitespace: true,
|
||||||
|
message: "请选择分组",
|
||||||
|
trigger: "change",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
placeholder: "请选择分组",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
closed() {
|
||||||
|
this.form = {};
|
||||||
|
if (this.$refs.groups) {
|
||||||
|
this.$refs.groups.init();
|
||||||
|
this.$refs.groups.clearValidate();
|
||||||
|
this.$refs.groups.resetForm();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
openDialog() {
|
||||||
|
this.title = "转移分组";
|
||||||
|
this.box = true;
|
||||||
|
if (this.$refs.groups) {
|
||||||
|
this.$refs.groups.init();
|
||||||
|
this.$refs.groups.clearValidate();
|
||||||
|
this.$refs.groups.resetForm();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmit(form, done) {
|
||||||
|
//提交转移分组接口
|
||||||
|
transferDept(this.form.groupId, this.ids).then(
|
||||||
|
() => {
|
||||||
|
this.box = false;
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "操作成功!",
|
||||||
|
});
|
||||||
|
this.$emit("refresh");
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
window.console.log(error);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
1629
src/views/manage/cuser/serve/index.vue
Normal file
1629
src/views/manage/cuser/serve/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
35
src/views/manage/cuser/serve/missionView.vue
Normal file
35
src/views/manage/cuser/serve/missionView.vue
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer title="查看任务" :visible.sync="viewDrawer" size="60%">
|
||||||
|
<mission-view :model="model"></mission-view>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import missionView from "@/views/util/mission-view";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { missionView },
|
||||||
|
props: {
|
||||||
|
visible: Boolean,
|
||||||
|
model: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
viewDrawer: {
|
||||||
|
get() {
|
||||||
|
return this.visible;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$emit("update:visible", val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
35
src/views/manage/cuser/serve/workMissionView.vue
Normal file
35
src/views/manage/cuser/serve/workMissionView.vue
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer title="查看岗位" :visible.sync="viewDrawer" size="60%">
|
||||||
|
<work-view :model="model"></work-view>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import workView from "@/views/util/work-view";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { workView },
|
||||||
|
props: {
|
||||||
|
visible: Boolean,
|
||||||
|
model: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
viewDrawer: {
|
||||||
|
get() {
|
||||||
|
return this.visible;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$emit("update:visible", val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
@@ -18,11 +18,11 @@
|
|||||||
<!-- </el-tooltip> -->
|
<!-- </el-tooltip> -->
|
||||||
<span v-show="data.id && data.id !== '0'" style="flex-basis: 20%">
|
<span v-show="data.id && data.id !== '0'" style="flex-basis: 20%">
|
||||||
<el-button type="text" icon="el-icon-edit" size="mini"
|
<el-button type="text" icon="el-icon-edit" size="mini"
|
||||||
v-if="vaildData(permission.tenant_main_talents_latent_index_groupedit, false)"
|
v-if="vaildData(permission.tenant_main_talents_certain_index_groupedit, false)"
|
||||||
@click="() => updateGroups('edit', data)">
|
@click="() => updateGroups('edit', data)">
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="el-icon-delete" type="text" size="mini"
|
<el-button icon="el-icon-delete" type="text" size="mini"
|
||||||
v-if="vaildData(permission.tenant_main_talents_latent_index_groupdelete, false)"
|
v-if="vaildData(permission.tenant_main_talents_certain_index_groupdelete, false)"
|
||||||
@click="() => removeGroups(data)">
|
@click="() => removeGroups(data)">
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<!-- v-show="vaildData(permission.tenant_wage_payroll_view, false)" -->
|
<!-- v-show="vaildData(permission.tenant_wage_payroll_view, false)" -->
|
||||||
<div class="footer" style="padding-left: 6px">
|
<div class="footer" style="padding-left: 6px">
|
||||||
<el-button type="text" icon="el-icon-plus"
|
<el-button type="text" icon="el-icon-plus"
|
||||||
v-if="vaildData(permission.tenant_main_talents_latent_index_groupadd, false)"
|
v-if="vaildData(permission.tenant_main_talents_certain_index_groupadd, false)"
|
||||||
@click="updateGroups('add')">新建分组
|
@click="updateGroups('add')">新建分组
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -46,22 +46,6 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<basic-container>
|
<basic-container>
|
||||||
<!--搜索栏-->
|
|
||||||
<el-form size="small" label-position="right" :inline="true" style="padding-left: 10px; padding-right: 10px">
|
|
||||||
<el-row :span="24">
|
|
||||||
<el-form-item label="姓名:">
|
|
||||||
<el-input v-model="query.name" placeholder="姓名" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="身份证:">
|
|
||||||
<el-input v-model="query.idNumber" placeholder="请输入身份证" clearable></el-input>
|
|
||||||
</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"
|
<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"
|
:permission="permissionList" :before-open="beforeOpen" @row-del="rowDel" @row-update="rowUpdate"
|
||||||
@@ -91,15 +75,15 @@
|
|||||||
<!--自定义按钮-->
|
<!--自定义按钮-->
|
||||||
<template slot="menuLeft">
|
<template slot="menuLeft">
|
||||||
<el-button type="success" size="small" plain icon="el-icon-plus" @click="handleImport"
|
<el-button type="success" size="small" plain icon="el-icon-plus" @click="handleImport"
|
||||||
v-show="vaildData(permission.tenant_main_talents_latent_index_add, false)">批量导入
|
v-show="vaildData(permission.tenant_main_talents_certain_index_add, false)">批量导入
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="warning" size="small" plain :disabled="!selectionList.length" icon="el-icon-sort"
|
<el-button type="warning" size="small" plain :disabled="!selectionList.length" icon="el-icon-sort"
|
||||||
@click="handleTransfer"
|
@click="handleTransfer"
|
||||||
v-show="vaildData(permission.tenant_main_talents_latent_index_tansfergroup, false)">转移推送
|
v-show="vaildData(permission.tenant_main_talents_certain_index_transfergroup, false)">转移推送
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" size="small" icon="el-icon-delete" @click="handleDelete"
|
<el-button type="danger" size="small" icon="el-icon-delete" @click="handleDelete"
|
||||||
:disabled="!selectionList.length" plain
|
:disabled="!selectionList.length" plain
|
||||||
v-show="vaildData(permission.tenant_main_talents_latent_index_tansfergroup, false)">
|
v-show="vaildData(permission.tenant_main_talents_certain_index_transfergroup, false)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -110,6 +94,16 @@
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<!--/自定义按钮-->
|
<!--/自定义按钮-->
|
||||||
|
<template slot="menuRight">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
:disabled="downloadButton"
|
||||||
|
@click="handleExport"
|
||||||
|
>导出
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
|
|
||||||
<!--批量导入-->
|
<!--批量导入-->
|
||||||
@@ -146,8 +140,7 @@ import {
|
|||||||
detail,
|
detail,
|
||||||
getDept,
|
getDept,
|
||||||
removeDept,
|
removeDept,
|
||||||
upload,
|
upload, getDeptMyTree,
|
||||||
getDeptMyTree
|
|
||||||
} from "@/api/tenant/talents";
|
} from "@/api/tenant/talents";
|
||||||
import {getWorkTypes, getLabelList} from "@/api/tenant/common";
|
import {getWorkTypes, getLabelList} from "@/api/tenant/common";
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
@@ -155,7 +148,7 @@ import addGroups from "./Dialog/addGroups";
|
|||||||
import transferGroups from "./Dialog/transferGroups";
|
import transferGroups from "./Dialog/transferGroups";
|
||||||
import Resume from "@/components/resume/index";
|
import Resume from "@/components/resume/index";
|
||||||
import {check18IdCardNo, isvalidatemobile, isExcel} from "@/util/validate";
|
import {check18IdCardNo, isvalidatemobile, isExcel} from "@/util/validate";
|
||||||
import {getTemplate} from "@/api/resource/template";
|
import {getTemplate, getTemplateRecommendExportList} from "@/api/resource/template";
|
||||||
import ied from "@/views/util/import-error-dialog";
|
import ied from "@/views/util/import-error-dialog";
|
||||||
import {excelAccept} from "@/common/accept";
|
import {excelAccept} from "@/common/accept";
|
||||||
import TextTooltip from '@/components/text-tooltip'
|
import TextTooltip from '@/components/text-tooltip'
|
||||||
@@ -173,6 +166,7 @@ export default {
|
|||||||
name: "tenant_talents",
|
name: "tenant_talents",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
downloadButton: false,
|
||||||
activeNames: "1",
|
activeNames: "1",
|
||||||
isIndeterminate: false,
|
isIndeterminate: false,
|
||||||
checkAll: false,
|
checkAll: false,
|
||||||
@@ -196,11 +190,11 @@ export default {
|
|||||||
tempWorkType: [],
|
tempWorkType: [],
|
||||||
worktypeDic: {},
|
worktypeDic: {},
|
||||||
arr: [],//////
|
arr: [],//////
|
||||||
depTree: [],
|
|
||||||
deptId: '',
|
deptId: '',
|
||||||
excelBox: false,
|
excelBox: false,
|
||||||
data: [],
|
data: [],
|
||||||
obj: {},
|
obj: {},
|
||||||
|
depTree: [],
|
||||||
excelForm: {isCovered: 1},
|
excelForm: {isCovered: 1},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -210,10 +204,10 @@ export default {
|
|||||||
...mapGetters(["permission"]),
|
...mapGetters(["permission"]),
|
||||||
permissionList() {
|
permissionList() {
|
||||||
return {
|
return {
|
||||||
addBtn: this.vaildData(this.permission.tenant_main_talents_latent_index_add, false),
|
addBtn: this.vaildData(this.permission.tenant_main_talents_certain_index_add, false),
|
||||||
viewBtn: true,
|
viewBtn: true,
|
||||||
delBtn: this.vaildData(this.permission.tenant_main_talents_latent_index_del, false),
|
delBtn: this.vaildData(this.permission.tenant_main_talents_certain_index_delete, false),
|
||||||
editBtn: this.vaildData(this.permission.tenant_main_talents_latent_index_edit, false),
|
editBtn: this.vaildData(this.permission.tenant_main_talents_certain_index_edit, false)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
ids() {
|
ids() {
|
||||||
@@ -270,21 +264,18 @@ export default {
|
|||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: "机构名称",
|
label: "所属机构",
|
||||||
prop: "companyName",
|
prop: "createDept",
|
||||||
// search: true,
|
type: "tree",
|
||||||
// span: 24,
|
multiple: false,
|
||||||
// rules: [
|
dicData: this.depTree,
|
||||||
// {
|
props: {
|
||||||
// required: true,
|
label: "title",
|
||||||
// whitespace: true,
|
},
|
||||||
// message: "请输入街道名称",
|
checkStrictly: true,
|
||||||
// trigger: "blur",
|
span: 24,
|
||||||
// },
|
search: true,
|
||||||
// ],
|
change: this.deptChange
|
||||||
// slot: true,
|
|
||||||
addDisplay: false,
|
|
||||||
// hide: true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "姓名",
|
label: "姓名",
|
||||||
@@ -299,8 +290,27 @@ export default {
|
|||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
search: true,
|
||||||
slot: true
|
slot: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "姓别",
|
||||||
|
prop: "aac004",
|
||||||
|
type: 'select',
|
||||||
|
dicUrl: "/api/jobslink-api/system/dict-biz/tadict?code=AAC004",
|
||||||
|
props: {
|
||||||
|
label: "dictValue",
|
||||||
|
value: "dictValue",
|
||||||
|
},
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入性别",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "身份证",
|
label: "身份证",
|
||||||
prop: "idNumber",
|
prop: "idNumber",
|
||||||
@@ -310,6 +320,7 @@ export default {
|
|||||||
{required: true, message: "请输入身份证号", trigger: "blur"},
|
{required: true, message: "请输入身份证号", trigger: "blur"},
|
||||||
{trigger: "blur", validator: IdCardNo},
|
{trigger: "blur", validator: IdCardNo},
|
||||||
],
|
],
|
||||||
|
search: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "手机号",
|
label: "手机号",
|
||||||
@@ -325,22 +336,80 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户类型",
|
label: "民族",
|
||||||
prop: "userId",
|
prop: "aac005",
|
||||||
type: "select",
|
type: 'select',
|
||||||
dicData: [
|
dicUrl: "/api/jobslink-api/system/dict-biz/tadict?code=AAC005",
|
||||||
{
|
props: {
|
||||||
value: "0",
|
label: "dictValue",
|
||||||
label: "未注册用户",
|
value: "dictValue",
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
label: "dictValue",
|
||||||
|
value: "dictKey",
|
||||||
|
},
|
||||||
|
rules: [
|
||||||
{
|
{
|
||||||
value: "1",
|
required: true,
|
||||||
label: "已注册用户",
|
message: "请输入民族",
|
||||||
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "户口性质",
|
||||||
|
prop: "aac009",
|
||||||
|
type: 'select',
|
||||||
|
dicUrl: "/api/jobslink-api/system/dict-biz/tadict?code=AAC009",
|
||||||
|
props: {
|
||||||
|
label: "dictValue",
|
||||||
|
value: "dictValue",
|
||||||
|
},
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入户口性质",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "户口所在地",
|
||||||
|
prop: "aac010",
|
||||||
|
// hide: true,
|
||||||
|
span: 24,
|
||||||
|
rules: [
|
||||||
|
{required: true, message: "请输入口所在地", trigger: "blur"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "文化程度",
|
||||||
|
prop: "aac011",
|
||||||
|
type: 'select',
|
||||||
|
dicUrl: "/api/jobslink-api/system/dict-biz/tadict?code=AAC011",
|
||||||
|
props: {
|
||||||
|
label: "dictValue",
|
||||||
|
value: "dictValue",
|
||||||
|
},
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入文化程度",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "经办时间",
|
||||||
|
prop: "aae036",
|
||||||
display: false,
|
display: false,
|
||||||
hide: true,
|
span: 24,
|
||||||
// search: true
|
rules: [
|
||||||
|
{required: true, message: "请输入经办时间", trigger: "blur"},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "分组",
|
label: "分组",
|
||||||
@@ -376,12 +445,6 @@ export default {
|
|||||||
formslot: true,
|
formslot: true,
|
||||||
span: 24,
|
span: 24,
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// label: "简历",
|
|
||||||
// prop: "resume",
|
|
||||||
// slot: true,
|
|
||||||
// display: false
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
label: "备注",
|
label: "备注",
|
||||||
prop: "remarks",
|
prop: "remarks",
|
||||||
@@ -398,7 +461,6 @@ export default {
|
|||||||
excelOption() {
|
excelOption() {
|
||||||
const baseUrl = upload() + `&deptId=${this.deptId}`
|
const baseUrl = upload() + `&deptId=${this.deptId}`
|
||||||
const url = this.tenantId ? `${baseUrl}&id=${this.tenantId}` : baseUrl
|
const url = this.tenantId ? `${baseUrl}&id=${this.tenantId}` : baseUrl
|
||||||
|
|
||||||
return {
|
return {
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
emptyBtn: false,
|
emptyBtn: false,
|
||||||
@@ -490,6 +552,24 @@ export default {
|
|||||||
this.getDept()
|
this.getDept()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleExport() {
|
||||||
|
this.downloadButton = true
|
||||||
|
// 0 潜在 1 已认定
|
||||||
|
getTemplateRecommendExportList({
|
||||||
|
groupType: 9,
|
||||||
|
...this.query
|
||||||
|
}).then((response) => {
|
||||||
|
const blob = window.URL.createObjectURL(new Blob([response.data], {type: response.headers['content-type']}));
|
||||||
|
let fileName = decodeURI(response.headers['content-disposition'].split(';')[1].split('filename=')[1])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
let event = new MouseEvent('click')
|
||||||
|
a.download = fileName || Date.now() + '.xlsx'
|
||||||
|
a.href = blob
|
||||||
|
a.dispatchEvent(event)
|
||||||
|
this.downloadButton = false
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
deptChange({value, column}) {
|
deptChange({value, column}) {
|
||||||
this.deptId = value
|
this.deptId = value
|
||||||
console.log(value)
|
console.log(value)
|
||||||
@@ -677,7 +757,14 @@ export default {
|
|||||||
},
|
},
|
||||||
/*新增人才*/
|
/*新增人才*/
|
||||||
rowSave(row, done) {
|
rowSave(row, done) {
|
||||||
|
let obj = {}
|
||||||
|
for (const rowKey in row) {
|
||||||
|
if (row[rowKey]) {
|
||||||
|
obj[rowKey] = row[rowKey]
|
||||||
|
}
|
||||||
|
}
|
||||||
add({
|
add({
|
||||||
|
...obj,
|
||||||
groupId: row.groupId,
|
groupId: row.groupId,
|
||||||
name: row.name,
|
name: row.name,
|
||||||
idNumber: row.idNumber,
|
idNumber: row.idNumber,
|
||||||
@@ -703,6 +790,7 @@ export default {
|
|||||||
/*编辑人才*/
|
/*编辑人才*/
|
||||||
rowUpdate(row, index, done) {
|
rowUpdate(row, index, done) {
|
||||||
update({
|
update({
|
||||||
|
...row,
|
||||||
id: row.id,
|
id: row.id,
|
||||||
groupId: row.groupId,
|
groupId: row.groupId,
|
||||||
name: row.name,
|
name: row.name,
|
||||||
@@ -878,7 +966,7 @@ export default {
|
|||||||
/*下载人才库模板 */
|
/*下载人才库模板 */
|
||||||
handleTemplate() {
|
handleTemplate() {
|
||||||
this.templateLoading = true;
|
this.templateLoading = true;
|
||||||
getTemplate("lgrydj")
|
getTemplate("rqkdr")
|
||||||
.then((rep) => {
|
.then((rep) => {
|
||||||
this.templateLoading = false;
|
this.templateLoading = false;
|
||||||
window.open(rep.data.data);
|
window.open(rep.data.data);
|
||||||
@@ -910,14 +998,6 @@ export default {
|
|||||||
this.onLoad(this.page, params);
|
this.onLoad(this.page, params);
|
||||||
done();
|
done();
|
||||||
},
|
},
|
||||||
searchReset1() {
|
|
||||||
this.query = {};
|
|
||||||
this.onLoad(this.page);
|
|
||||||
},
|
|
||||||
searchChange1() {
|
|
||||||
this.page.currentPage = 1;
|
|
||||||
this.onLoad(this.page, this.query);
|
|
||||||
},
|
|
||||||
/*人才列表多选 */
|
/*人才列表多选 */
|
||||||
selectionChange(list) {
|
selectionChange(list) {
|
||||||
this.selectionList = list;
|
this.selectionList = list;
|
||||||
|
|||||||
201
src/views/manage/works/supplyDemand/index.vue
Normal file
201
src/views/manage/works/supplyDemand/index.vue
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<basic-container>
|
||||||
|
<el-form
|
||||||
|
size="small"
|
||||||
|
label-position="right"
|
||||||
|
style="padding-left: 10px; padding-right: 10px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-row :span="24">
|
||||||
|
<el-form-item label="类型:">
|
||||||
|
<el-select v-model="query.type">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in types"
|
||||||
|
:key="index"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日期类型:" v-if="query.type === 2">
|
||||||
|
<el-select v-model="query.timeType" @blur="delete query.time">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in times"
|
||||||
|
:key="index"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日期:" v-if="query.type === 2">
|
||||||
|
<el-date-picker
|
||||||
|
v-if="timeEleType[query.timeType] === 'monthrange'"
|
||||||
|
v-model="query.time"
|
||||||
|
:type="timeEleType[query.timeType]"
|
||||||
|
placeholder="选择开始日期"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
<YearRange
|
||||||
|
v-else
|
||||||
|
v-model="query.time"
|
||||||
|
></YearRange>
|
||||||
|
</el-form-item>
|
||||||
|
<div class="searchBtn">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="searchTabs"
|
||||||
|
>搜 索
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button size="small" icon="el-icon-delete" @click="searchReset"
|
||||||
|
>清 空
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<avue-crud
|
||||||
|
:option="option"
|
||||||
|
:table-loading="loading"
|
||||||
|
:page.sync="page"
|
||||||
|
:data="data"
|
||||||
|
ref="crud"
|
||||||
|
v-model="form"
|
||||||
|
></avue-crud>
|
||||||
|
</basic-container>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getAllCountPostCount
|
||||||
|
} from "@/api/work/work";
|
||||||
|
import YearRange from "@/components/yearRange/index.vue";
|
||||||
|
import {missionState} from "@/common/dic";
|
||||||
|
import {dateFormat} from "@/util/date";
|
||||||
|
|
||||||
|
let types = [
|
||||||
|
{value: 0, label: '供需人数'},
|
||||||
|
{value: 1, label: '按行业'},
|
||||||
|
{value: 2, label: '按时间'},
|
||||||
|
]
|
||||||
|
let times = [
|
||||||
|
{value: 3, label: '年'},
|
||||||
|
{value: 1, label: '月'},
|
||||||
|
// {value: 3, label: '周'},
|
||||||
|
]
|
||||||
|
let timeEleType = {
|
||||||
|
3: 'year',
|
||||||
|
1: 'monthrange',
|
||||||
|
// 3: 'week',
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'supplyDemand',
|
||||||
|
components: {YearRange},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
types,
|
||||||
|
times,
|
||||||
|
timeEleType,
|
||||||
|
loading: false,
|
||||||
|
data: [],
|
||||||
|
form: {},
|
||||||
|
query: {
|
||||||
|
type: 0,
|
||||||
|
timeType: 1
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getDetail()
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
option() {
|
||||||
|
return {
|
||||||
|
height: "auto",
|
||||||
|
tip: false,
|
||||||
|
columnBtn: false,
|
||||||
|
searchShow: true,
|
||||||
|
searchMenuSpan: 5,
|
||||||
|
menuWidth: 110,
|
||||||
|
border: true,
|
||||||
|
selection: false,
|
||||||
|
viewBtn: false,
|
||||||
|
menu: false,
|
||||||
|
addBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
dialogClickModal: false,
|
||||||
|
dialogType: "drawer",
|
||||||
|
dialogFullscreen: true,
|
||||||
|
mStatusList: missionState,
|
||||||
|
align: 'center',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: "名称",
|
||||||
|
prop: "name",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "零工人数",
|
||||||
|
prop: "workerCount",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "零工岗位人数",
|
||||||
|
prop: "workCount",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "求人倍率",
|
||||||
|
prop: "ratio",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
searchTabs() {
|
||||||
|
this.getDetail()
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {
|
||||||
|
type: 0,
|
||||||
|
timeType: 1
|
||||||
|
}
|
||||||
|
this.getDetail()
|
||||||
|
},
|
||||||
|
async getDetail() {
|
||||||
|
let params = {
|
||||||
|
...this.query,
|
||||||
|
}
|
||||||
|
if (params.type === 2 && params.timeType) {
|
||||||
|
if (params.time && params.time.length === 2) {
|
||||||
|
params.stime = dateFormat(typeof params.time[0] === 'string' ? new Date(params.time[0]) : params.time[0], 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
params.etime = dateFormat(typeof params.time[1] === 'string' ? new Date(params.time[1]) : params.time[1], 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
delete params.time
|
||||||
|
} else {
|
||||||
|
return this.$message({type: "info", message: "请选择日期"});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let resData = await getAllCountPostCount(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
console.log(resData.data)
|
||||||
|
const {records, page, size, total} = resData.data.data
|
||||||
|
this.data = records
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user