初始化项目
This commit is contained in:
419
src/views/tenant/mission/Dialog/Appraise.vue
Normal file
419
src/views/tenant/mission/Dialog/Appraise.vue
Normal file
@@ -0,0 +1,419 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<el-drawer title="评价" append-to-body :visible.sync="drawer" size="60%">
|
||||
<avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="obj"
|
||||
:permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
|
||||
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
|
||||
@refresh-change="refreshChange" class="customPage" @on-load="getList">
|
||||
<!--自定义列-->
|
||||
<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>
|
||||
<template slot="scoreAll" slot-scope="{ row }">
|
||||
<div @click="rowAppraise(row)">
|
||||
<el-rate v-model="row.scoreAll" disabled></el-rate>
|
||||
</div>
|
||||
</template>
|
||||
<!--/自定义列-->
|
||||
<!--自定义按钮-->
|
||||
<template slot="menuLeft">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleImport" size="small"
|
||||
:disabled="!selectionList.length">导入人才库</el-button>
|
||||
</template>
|
||||
<!--/自定义按钮-->
|
||||
</avue-crud>
|
||||
<!--评价dialog-->
|
||||
<el-dialog title :close-on-click-modal="false" :close-on-press-escape="false" :append-to-body="true" width="500px"
|
||||
:visible.sync="box" @closed="closed">
|
||||
<el-form :model="form" :rules="rules" ref="appraiseForm">
|
||||
<el-form-item prop="scoreAll">
|
||||
评价:
|
||||
<el-rate :disabled="!isCanRate && !rateLoading" v-model="form.scoreAll"
|
||||
style="display: inline-block; vertical-align: text-bottom"></el-rate>
|
||||
</el-form-item>
|
||||
<el-form-item prop="remarks">
|
||||
<el-input type="textarea" placeholder="请输入您的评价" v-model="form.remarks" minlength="0" maxlength="50"
|
||||
show-word-limit :disabled="!isCanRate && !rateLoading" :autosize="{ minRows: 5, maxRows: 5 }"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button icon="el-icon-check" type="primary" size="small" :loading="rateLoading" @click="submit"
|
||||
v-show="isCanRate === true">提 交</el-button>
|
||||
<el-button icon="el-icon-circle-close" :loading="rateLoading" size="small" @click="box = false"
|
||||
v-show="isCanRate === true">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--/评价dialog-->
|
||||
<!--导入人才库dialog-->
|
||||
<el-dialog title="导入人才库" append-to-body :visible.sync="importBox" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false" @closed="closedGorups" width="555px">
|
||||
<avue-form ref="groups" :option="importOption" v-model="importForm" @submit="submitImport">
|
||||
<template slot-scope="{ disabled }" slot="menuForm">
|
||||
<!-- <el-button type="primary" icon="el-icon-check" @click="copy" :disabled="formLoading">提交</el-button> -->
|
||||
<el-button icon="el-icon-circle-close" @click="importBox = false" :loading="disabled">取消</el-button>
|
||||
</template>
|
||||
</avue-form>
|
||||
</el-dialog>
|
||||
<!--/导入dialog-->
|
||||
</el-drawer>
|
||||
<Resume ref="resume"></Resume>
|
||||
<!--导入人才库提示错误信息-->
|
||||
<el-dialog title="提示" :visible.sync="errorDialogVisible" width="30%" :before-close="handleClose" append-to-body>
|
||||
<span style="margin-top: -10px;display: block;"><p v-for="(item,index) in errorTipList" :key="index">{{item}}</p></span>
|
||||
</el-dialog>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getRateList,
|
||||
getRateDetail,
|
||||
submitRate,
|
||||
importTalents,
|
||||
} from "@/api/tenant/mission";
|
||||
import Resume from "@/components/resume/index";
|
||||
// import { isExcel } from "@/util/validate";
|
||||
// import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
comments: {},
|
||||
components: {
|
||||
Resume,
|
||||
},
|
||||
data() {
|
||||
const validateRate = (rule, value, callback) => {
|
||||
if (value > 0) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("请选择评分"));
|
||||
}
|
||||
};
|
||||
return {
|
||||
errorDialogVisible:false,
|
||||
errorTipList:[],
|
||||
missionId: "",
|
||||
worktypeNames: "",
|
||||
userId: "",
|
||||
loading: false,
|
||||
rateLoading: false,
|
||||
isIndeterminate: false,
|
||||
checkAll: false,
|
||||
checked: false,
|
||||
isCanRate: false,
|
||||
form: {},
|
||||
rules: {
|
||||
scoreAll: [
|
||||
{ required: true, validator: validateRate, trigger: "change" },
|
||||
],
|
||||
remarks: [
|
||||
{
|
||||
min: 0,
|
||||
max: 50,
|
||||
message: "长度在 0 到 50 个字符",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
selectionList: [],
|
||||
page: {
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
query: {},
|
||||
drawer: false,
|
||||
box: false,
|
||||
data: [],
|
||||
obj: {},
|
||||
option: {
|
||||
height: "auto",
|
||||
calcHeight: 30,
|
||||
align: "center",
|
||||
menuAlign: "center",
|
||||
menu: false,
|
||||
tip: false,
|
||||
addBtn: false,
|
||||
viewBtn: false,
|
||||
delBtn: false,
|
||||
editBtn: false,
|
||||
excelBtn: false,
|
||||
columnBtn: false,
|
||||
searchBtn: true,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 7,
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
selection: true,
|
||||
dialogType: "drawer",
|
||||
dialogWidth: "60%",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "姓名",
|
||||
prop: "realName",
|
||||
search: true,
|
||||
searchLabelWidth: 45,
|
||||
searchSpan: 7
|
||||
},
|
||||
{
|
||||
label: "性别",
|
||||
prop: "sex",
|
||||
type: "select",
|
||||
dicData: [
|
||||
{
|
||||
label: "男",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "女",
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "年龄",
|
||||
prop: "age",
|
||||
},
|
||||
// {
|
||||
// label: "简历",
|
||||
// prop: "resume",
|
||||
// slot: true
|
||||
// },
|
||||
{
|
||||
label: "评价",
|
||||
prop: "scoreAll",
|
||||
slot: true,
|
||||
width: 180,
|
||||
},
|
||||
],
|
||||
},
|
||||
importForm: {},
|
||||
importOption: {
|
||||
menuPosition: "right",
|
||||
menuBtn: true,
|
||||
submitBtn: true,
|
||||
submitText: "导入",
|
||||
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,
|
||||
message: "请选择分组",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
placeholder: "请选择分组",
|
||||
},
|
||||
],
|
||||
},
|
||||
importBox: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// ...mapGetters(["permission"]),
|
||||
// permissionList() {
|
||||
// return {
|
||||
// addBtn: this.vaildData(this.permission.topmenu_add, false),
|
||||
// viewBtn: this.vaildData(this.permission.topmenu_view, false),
|
||||
// delBtn: this.vaildData(this.permission.topmenu_delete, false),
|
||||
// editBtn: this.vaildData(this.permission.topmenu_edit, false)
|
||||
// };
|
||||
// },
|
||||
ids() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids.join(",");
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
/*打开drawer*/
|
||||
openDialog(row) {
|
||||
this.missionId = row.missionNo;
|
||||
this.worktypeNames = row.worktypeNames;
|
||||
if (this.$refs.crud) {
|
||||
this.$refs.crud.searchReset();
|
||||
} else {
|
||||
this.query = {};
|
||||
this.getList(this.page, this.query);
|
||||
}
|
||||
this.drawer = true;
|
||||
},
|
||||
/*关闭评分dialog*/
|
||||
closed() {
|
||||
if (this.$refs.appraiseForm) {
|
||||
this.$refs.appraiseForm.resetFields();
|
||||
}
|
||||
},
|
||||
/*关闭导入人才库dialog*/
|
||||
closedGorups() {
|
||||
this.importForm = {};
|
||||
this.$refs.groups.init();
|
||||
this.$refs.groups.clearValidate();
|
||||
this.$refs.groups.resetForm();
|
||||
},
|
||||
/*评价人员*/
|
||||
rowAppraise(row) {
|
||||
this.userId = row.userId;
|
||||
if (row.id === "0") {
|
||||
this.isCanRate = true;
|
||||
this.box = true;
|
||||
this.form = {};
|
||||
} else {
|
||||
//打开评价弹框
|
||||
this.isCanRate = false;
|
||||
this.rateLoading = true;
|
||||
getRateDetail(row.id).then((res) => {
|
||||
this.form = res.data.data;
|
||||
this.rateLoading = false;
|
||||
this.box = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
/*提交评价*/
|
||||
submit() {
|
||||
this.rateLoading = true;
|
||||
this.$refs.appraiseForm.validate((valid) => {
|
||||
if (valid) {
|
||||
submitRate(
|
||||
{
|
||||
scoreAll: this.form.scoreAll,
|
||||
remarks: this.form.remarks,
|
||||
},
|
||||
this.missionId,
|
||||
this.userId
|
||||
).then(
|
||||
() => {
|
||||
this.box = false;
|
||||
this.rateLoading = true;
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.rateLoading = false;
|
||||
this.getList(this.page, this.query);
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
this.rateLoading = false;
|
||||
}
|
||||
);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
/*导入人才库 */
|
||||
handleImport() {
|
||||
if (this.selectionList.length === 0) {
|
||||
this.$message.warning("请选择至少一条数据");
|
||||
return;
|
||||
}
|
||||
this.importBox = true;
|
||||
},
|
||||
/*提交导入人才库 */
|
||||
submitImport(form, done) {
|
||||
var arr = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
arr.push({
|
||||
userId: ele.userId,
|
||||
name: ele.realName,
|
||||
idNumber: ele.cardNumber,
|
||||
telphone: ele.telphone,
|
||||
});
|
||||
});
|
||||
//导入分组接口
|
||||
importTalents(form.groupId, this.worktypeNames, arr).then(
|
||||
(res) => {
|
||||
this.importBox = false;
|
||||
const data=res.data.data;
|
||||
this.errorTipList=[];
|
||||
if(Object.getOwnPropertyNames(data).length!=0 && data.length!=0){
|
||||
for(var i=0;i<data.length;i++){
|
||||
this.errorTipList[i]=data[i];
|
||||
}
|
||||
this.errorDialogVisible=true;
|
||||
}
|
||||
else{
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
}
|
||||
this.getList(this.page, this.query);
|
||||
done();
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
done();
|
||||
}
|
||||
);
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.getList(this.page);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.getList(this.page, params);
|
||||
done();
|
||||
},
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
selectionClear() {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
this.getList(this.page);
|
||||
},
|
||||
/*加载数据*/
|
||||
getList(page, params = {}) {
|
||||
this.loading = true;
|
||||
getRateList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(params, this.query),
|
||||
this.missionId
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
this.selectionClear();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
188
src/views/tenant/mission/Dialog/Contrast.vue
Normal file
188
src/views/tenant/mission/Dialog/Contrast.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<el-drawer
|
||||
title="比对人才库"
|
||||
append-to-body
|
||||
:visible.sync="drawer"
|
||||
size="65%"
|
||||
class="drawer"
|
||||
>
|
||||
<avue-crud
|
||||
:option="personListOption"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
:page.sync="page"
|
||||
ref="crud"
|
||||
:permission="permissionList"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset"
|
||||
@selection-change="selectionChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
class="customPage"
|
||||
|
||||
>
|
||||
<!--/自定义按钮-->
|
||||
</avue-crud>
|
||||
<!-- <Resume ref="resume"></Resume> -->
|
||||
<div style="float:right;font-size:18px;">
|
||||
<el-button type="primary" size="small" @click="submitContrastBtn()">提交比对</el-button>
|
||||
<el-button size="small" @click="resetBtn">重置</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<NoEmployed ref="noEmployed" v-show="false"></NoEmployed>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {personCountList} from "@/api/tenant/mission";
|
||||
import { mapGetters } from "vuex";
|
||||
import NoEmployed from "../Dialog/noEmployed"
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
isIndeterminate: false,
|
||||
checkAll: false,
|
||||
checked: false,
|
||||
missionId: "",
|
||||
missionTitle: "",
|
||||
stime: "",
|
||||
drawer: false,
|
||||
selectionList: [],
|
||||
loading: false,
|
||||
query: {},
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
personListOption: {
|
||||
dialogWidth: "50%",
|
||||
align: "center",
|
||||
menuAlign: "center",
|
||||
rowKey: "id",
|
||||
tip: false,
|
||||
menu: false,
|
||||
addBtn: false,
|
||||
columnBtn: false,
|
||||
searchBtn: true,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
searchLabelWidth: 45,
|
||||
menuPosition: "center",
|
||||
labelPosition: "right",
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
selection: true,
|
||||
viewBtn: false,
|
||||
dialogType: "dialog",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "分组名称",
|
||||
prop: "groupName",
|
||||
search: false,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
label: "人数",
|
||||
prop: "sumNum",
|
||||
search: false,
|
||||
span: 24,
|
||||
},
|
||||
],
|
||||
},
|
||||
excelBox: false,
|
||||
data: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
// Resume,
|
||||
NoEmployed
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["userInfo", "permission"]),
|
||||
ids () {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids.join(",");
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//提交对比
|
||||
submitContrastBtn(){
|
||||
if(this.selectionList.length > 0){
|
||||
this.$refs.noEmployed.openDialog(this.missionId,this.ids);
|
||||
}else{
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "请选择要比对的人才库!",
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
//重置
|
||||
resetBtn(){
|
||||
this.onLoad();
|
||||
},
|
||||
/*打开drawer*/
|
||||
openDialog (row) {
|
||||
this.missionId = row.missionNo;
|
||||
this.missionTitle = row.missionTitle;
|
||||
this.stime = row.stime;
|
||||
if (this.$refs.crud) {
|
||||
this.$refs.crud.searchReset();
|
||||
} else {
|
||||
this.query = {};
|
||||
this.onLoad();
|
||||
}
|
||||
this.drawer = true;
|
||||
},
|
||||
searchReset () {
|
||||
this.query = {};
|
||||
this.onLoad();
|
||||
},
|
||||
searchChange (params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad();
|
||||
done();
|
||||
},
|
||||
selectionChange (list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
selectionClear () {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
currentChange (currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
this.onLoad();
|
||||
},
|
||||
sizeChange (pageSize) {
|
||||
this.page.currentPage = 1;
|
||||
this.page.pageSize = pageSize;
|
||||
this.onLoad();
|
||||
},
|
||||
refreshChange () {
|
||||
this.onLoad();
|
||||
},
|
||||
onLoad () {
|
||||
this.loading = true;
|
||||
personCountList().then((res) => {
|
||||
const data = res.data.data;
|
||||
this.data = data;
|
||||
this.loading = false;
|
||||
this.selectionClear();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
1352
src/views/tenant/mission/Dialog/CopyMission.vue
Normal file
1352
src/views/tenant/mission/Dialog/CopyMission.vue
Normal file
File diff suppressed because it is too large
Load Diff
1077
src/views/tenant/mission/Dialog/Employ.vue
Normal file
1077
src/views/tenant/mission/Dialog/Employ.vue
Normal file
File diff suppressed because it is too large
Load Diff
524
src/views/tenant/mission/Dialog/EmployInformation.vue
Normal file
524
src/views/tenant/mission/Dialog/EmployInformation.vue
Normal file
@@ -0,0 +1,524 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
title="确定录用信息"
|
||||
:visible.sync="checkDisplayVisible"
|
||||
size="60%"
|
||||
modal-append-to-body
|
||||
:before-close="drawerClose"
|
||||
class="createOrderTable">
|
||||
<div class="taskInformation">
|
||||
<p><label>任务名称:{{selectTaskInfo.missionTitle | ellipsis }}</label><label>任务编号:{{selectTaskInfo.missionNo}}</label><label>录用人员:<font style="color:#409eff">{{selectionList.length == 0 ? 1 :selectionList.length}} </font> 人</label></p>
|
||||
</div>
|
||||
<div class="create-order-box">
|
||||
<div class="create-order-bill">
|
||||
<div class="create-order-box-title">
|
||||
<span>发票信息</span>
|
||||
<!-- <el-button @click="goSetting" type="text">编辑发票信息</el-button> -->
|
||||
</div>
|
||||
<div class="create-order-box-body">
|
||||
<p>发票抬头:{{fpData.titleName}}</p>
|
||||
<p v-if="fpData.type===0">发票类型:增值税普通发票</p>
|
||||
<p v-if="fpData.type===1">发票类型:增值税专用发票</p>
|
||||
<p>纳税人识别号: {{fpData.regNumber}}</p>
|
||||
<p>注册地址&电话:{{fpData.regAddress}} {{fpData.regTelphone}}</p>
|
||||
<p>开户行及账号:{{fpData.bankName}} {{fpData.bankNumber}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="create-order-address">
|
||||
<div class="create-order-box-title">
|
||||
<span>收件信息</span>
|
||||
<!-- <el-button type="text">添加收件地址</el-button> -->
|
||||
</div>
|
||||
<div class="create-order-box-body">
|
||||
<el-table class="seventy_table_m_height" :data="addresses" max-height="400" @row-click="rowClick" ref="table">
|
||||
<el-table-column width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="addressId" :label="scope.row.id"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="contacts" min-width="60"></el-table-column>
|
||||
<el-table-column prop="telphone" min-width="100"></el-table-column>
|
||||
<el-table-column min-width="180" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<div>{{getCity(scope.row.cityId)}}{{scope.row.address}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="email" min-width="100"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="create-order-pwd">
|
||||
<div>
|
||||
<!-- <p style="text-align:center; font-size:16px">您选择<span class="employ-employNum-count">{{employNum}}</span>人准备录用,请输入密码并确定录用</p> -->
|
||||
<el-form :model="pwdForm" ref="pwdForm" :rules="pwdFormRules" v-if="companyContractOn == 1">
|
||||
<el-form-item
|
||||
label="输入密码:"
|
||||
prop="pwd"
|
||||
:label-position="labelPosition"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-col :span="16">
|
||||
<el-input type="number" v-model="pwdForm.pwd" maxlength="6" onKeypress="return(/^[0-9]*$/.test(String.fromCharCode(event.keyCode)))" show-password placeholder="请输入签章密码"></el-input>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item class="employ-forgetPwd">
|
||||
<el-button type="text" @click="forgetPwd">忘记密码?</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<p>
|
||||
<el-checkbox v-model="read"></el-checkbox>
|
||||
<span @click="read = !read" class="insure-confirm-agreement">
|
||||
我已阅读
|
||||
<a
|
||||
@click.stop
|
||||
href="/blackboard/insure/insureagreement.html"
|
||||
target="blank"
|
||||
style="color:#409eff"
|
||||
>《投保须知》</a
|
||||
>
|
||||
</span>
|
||||
</p>
|
||||
<p style="color:#ff0000;font-size:13px">提示:系统将按照投保规则,在任务开始前一天自动为录用人员投保,投保成功后,请前往“订单管理”模块支付,超过15天未支付则不可以再次发布任务。</p>
|
||||
</div>
|
||||
<!-- <span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="PWDOk" :loading="loadingbut">{{loadingbuttext}}</el-button>
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
</span> -->
|
||||
</div>
|
||||
<el-row class="create-order-footer">
|
||||
<el-col :span="24">
|
||||
<el-button
|
||||
@click="confirm"
|
||||
type="primary"
|
||||
size="small"
|
||||
:loading="confirmBtnLoading"
|
||||
:disabled="confirmDisabled"
|
||||
>确定录用</el-button>
|
||||
<el-button
|
||||
@click="closeConfirm"
|
||||
type="info"
|
||||
size="small"
|
||||
>取消</el-button>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<!--忘记密码dialog-->
|
||||
<el-dialog title="重置密码" :visible.sync="resetPwdDialogVisible" append-to-body width="30%">
|
||||
<el-form class="econtract-resetForm" label-position="right" :model="resetPwdForm" :rules="resetPwdRules" ref="resetPwdForm">
|
||||
<el-form-item label="手机号码:" :label-width="formLabelWidth" prop="account" >
|
||||
<span>{{phone}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="请输入验证码:" :label-width="formLabelWidth" prop="code">
|
||||
<el-input v-model="resetPwdForm.code" autocomplete="off" style="width: 50%;"></el-input>
|
||||
<el-button :disabled="msgKey" style="margin-left: 15px;" type="primary" @click="getCode">{{msgText}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="请设置新密码:" :label-width="formLabelWidth" prop="pwd">
|
||||
<el-input type="number" v-model="resetPwdForm.pwd" maxlength="6" onKeypress="return(/^[0-9]*$/.test(String.fromCharCode(event.keyCode)))" autocomplete="off" show-password placeholder="请输入六位数字密码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="请再次输入新密码:" :label-width="formLabelWidth" prop="pwd2">
|
||||
<el-input type="number" maxlength="6" onKeypress="return(/^[0-9]*$/.test(String.fromCharCode(event.keyCode)))" v-model="resetPwdForm.pwd2" autocomplete="off" show-password placeholder="请再次输入六位数字密码"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="resetPwdDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitResetPwd">确 认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { dateFormat } from "@/util/date";
|
||||
import {applyStatus} from '@/api/manage/econtract'
|
||||
import { employ } from "@/api/tenant/mission";
|
||||
import {certCheckPass,getCode,resetPwd} from "@/api/manage/econtract.js";//api
|
||||
export default {
|
||||
props: { fpData: Object,fpTitleId:Number, checkDisplayVisible: Boolean ,usersInfo:Array},
|
||||
data () {
|
||||
const validatePwdLength=(rule,value,callback)=>{
|
||||
if(value.length!=6 || isNaN(Number(value))){
|
||||
this.loading = false;
|
||||
this.confirmBtnLoading = false;
|
||||
this.confirmDisabled = false;
|
||||
callback(new Error('请输入6位数的数字密码'));
|
||||
}
|
||||
else{
|
||||
callback();
|
||||
}
|
||||
}
|
||||
const validatePwd = (rule, value, callback) => {
|
||||
if (value != this.resetPwdForm.pwd) {
|
||||
callback(new Error('两次输入密码不一致'));
|
||||
}
|
||||
else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const validPwdNums=(rule,value,callback)=>{
|
||||
if(value.length!=6 || isNaN(Number(value))){
|
||||
callback(new Error('请输入6位数的数字密码'));
|
||||
}
|
||||
else{
|
||||
callback();
|
||||
}
|
||||
}
|
||||
return {
|
||||
read: false,
|
||||
confirmDisabled:false,
|
||||
selectTaskInfo:{},
|
||||
selectionList:[],
|
||||
addresses: [],
|
||||
addressId: '',
|
||||
insureNum:0,
|
||||
pwdForm: {
|
||||
pwd: ''
|
||||
},
|
||||
confirmFormData:[],
|
||||
confirmBtnLoading:false,
|
||||
employDataIds:1,
|
||||
pwdFormRules:{
|
||||
pwd:[
|
||||
{
|
||||
required:true,message:'请输入密码',trigger:'blur'
|
||||
},
|
||||
{
|
||||
validator:validatePwdLength,trigger:'blur'
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
loadingbuttext:'确定',
|
||||
loadingbut:false,
|
||||
companyContractOn:'',//电子合同状态
|
||||
conpanySealOn:'',//签章状态
|
||||
/*忘记密码*/
|
||||
resetPwdDialogVisible:false,
|
||||
resetPwdForm:{},
|
||||
formLabelWidth:'150px',
|
||||
msgText: '获取验证码',
|
||||
msgTime:120,
|
||||
//重置密码校验
|
||||
resetPwdRules: {
|
||||
code: [
|
||||
{
|
||||
required: true, message: '请输入验证码', trigger: 'blur'
|
||||
}
|
||||
],
|
||||
pwd: [
|
||||
{
|
||||
required: true, message: '请输入密码', trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: validPwdNums, trigger: 'blur'
|
||||
}
|
||||
],
|
||||
pwd2: [
|
||||
{
|
||||
required: true, message: '请输入确认密码', trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: validatePwd, trigger: 'blur'
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
ellipsis(value) {
|
||||
if (!value) return "";
|
||||
if (value.length > 15) {
|
||||
return value.slice(0, 14) + "...";
|
||||
}
|
||||
return value;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
mounted(){
|
||||
this.checkStatus();
|
||||
},
|
||||
methods: {
|
||||
//输入密码点击确定
|
||||
PWDOk(){
|
||||
this.loading = true;
|
||||
this.confirmBtnLoading = true;
|
||||
this.confirmDisabled = true;
|
||||
this.$refs.pwdForm.validate(valid=>{
|
||||
if(valid){
|
||||
// this.loadingbut = true;
|
||||
// this.loadingbuttext = '提交中...';
|
||||
certCheckPass(this.pwdForm.pwd).then((res)=>{
|
||||
if(res.data.data == true){//输入签章密码正确走录用流程
|
||||
if(this.addressId){
|
||||
this.employApi(this.employDataIds,this.fpTitleId,this.addressId);
|
||||
}else{
|
||||
this.$message.warning("请选择收件地址");
|
||||
}
|
||||
}else{
|
||||
this.$message.closeAll();
|
||||
this.loading = false;
|
||||
this.confirmBtnLoading = false;
|
||||
this.confirmDisabled = false;
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "签章密码输入错误!",
|
||||
});
|
||||
// this.loadingbut=false;
|
||||
// this.loadingbuttext='确定';
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
/*获取验证码*/
|
||||
getCode() {
|
||||
this.msgKey = true;
|
||||
this.msgText = "发送中...";
|
||||
getCode(this.usersInfo.account)
|
||||
.then(() => {
|
||||
this.msgText = "剩余" + 120 + "s";
|
||||
this.msgKey = true;
|
||||
const time = setInterval(() => {
|
||||
this.msgTime--;
|
||||
this.msgText = "剩余" + this.msgTime + "s";
|
||||
if (this.msgTime <= 0) {
|
||||
this.msgTime = 120;
|
||||
this.msgText = "重新获取";
|
||||
this.msgKey = false;
|
||||
clearInterval(time);
|
||||
}
|
||||
}, 1000);
|
||||
})
|
||||
.catch(() => {
|
||||
this.msgText = "重新获取";
|
||||
this.msgKey = false;
|
||||
});
|
||||
|
||||
},
|
||||
forgetPwd(){
|
||||
this.phone=this.usersInfo.account;
|
||||
var pat=/(\d{3})\d*(\d{4})/;
|
||||
this.phone=this.phone.replace(pat,'$1****$2');
|
||||
this.resetPwdDialogVisible=true;
|
||||
this.resetPwdForm={};
|
||||
},
|
||||
//录用确定
|
||||
employApi(ids,fpTitleId,fpAddressId){
|
||||
this.loading = true;
|
||||
this.confirmBtnLoading = true;
|
||||
this.confirmDisabled = true;
|
||||
employ(this.selectTaskInfo.missionNo, ids,fpTitleId,fpAddressId).then(
|
||||
() => {
|
||||
// this.loadingbut = false;
|
||||
// this.loadingbuttext = '确定';
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.checkDisplayVisible = false;
|
||||
this.$emit('checkDisplayVisibleClose');
|
||||
this.$emit("refresh");
|
||||
this.loading = false;
|
||||
this.confirmBtnLoading = false;
|
||||
this.confirmDisabled = false;
|
||||
},
|
||||
(error) => {
|
||||
// this.loadingbut = false;
|
||||
// this.loadingbuttext = '确定';
|
||||
window.console.log(error);
|
||||
this.dialogVisible1 = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
checkStatus(){
|
||||
applyStatus().then(res=>{
|
||||
this.companyContractOn=res.data.data.contractOn;//电子合同是否启用,0=未启用 1=已启用
|
||||
this.conpanySealOn=res.data.data.sealOn;//电子签章是否设置,0=未设置,1=等待审核,2=已设置
|
||||
})
|
||||
},
|
||||
drawerClose(){
|
||||
this.$emit('refresh');
|
||||
this.$emit('checkDisplayVisibleClose');
|
||||
},
|
||||
openDialog (selectTaskInfo,employDataIds,selectionList) {
|
||||
this.read = false;
|
||||
this.selectionList = selectionList;
|
||||
this.pwdForm.pwd = "";
|
||||
this.employDataIds = employDataIds;
|
||||
this.selectTaskInfo = selectTaskInfo;
|
||||
// this.insureNum = this.usersInfo.length;
|
||||
this.confirmBtnLoading = false;
|
||||
this.confirmDisabled = false;
|
||||
},
|
||||
format (date) {
|
||||
if (date) {
|
||||
return dateFormat(new Date(date), "yyyy-MM-dd");
|
||||
}
|
||||
},
|
||||
confirm () {
|
||||
this.loading = true;
|
||||
this.confirmBtnLoading = true;
|
||||
this.confirmDisabled = true;
|
||||
if (!this.read) {
|
||||
this.$message.closeAll();
|
||||
this.$message({ type: "error", message: "请阅读并同意《投保须知》" });
|
||||
this.loading = false;
|
||||
this.confirmBtnLoading = false;
|
||||
this.confirmDisabled = false;
|
||||
return;
|
||||
}
|
||||
if(this.companyContractOn == 1 && !this.pwdForm.pwd){
|
||||
this.$message.closeAll();
|
||||
this.$message({ type: "error", message: "请输入签章密码" });
|
||||
this.loading = false;
|
||||
this.confirmBtnLoading = false;
|
||||
this.confirmDisabled = false;
|
||||
return;
|
||||
}
|
||||
if(this.companyContractOn == 1 && this.pwdForm.pwd){
|
||||
this.PWDOk()
|
||||
}else{
|
||||
if(this.addressId){
|
||||
this.employApi(this.employDataIds,this.fpTitleId,this.addressId);
|
||||
}else{
|
||||
this.$message.warning("请选择收件地址");
|
||||
this.loading = false;
|
||||
this.confirmBtnLoading = false;
|
||||
this.confirmDisabled = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
rowClick (row) {
|
||||
this.addressId = row.id;
|
||||
},
|
||||
closeConfirm(){
|
||||
this.$emit('refresh');
|
||||
this.$emit('checkDisplayVisibleClose');
|
||||
},
|
||||
/*重置密码*/
|
||||
submitResetPwd() {
|
||||
this.$refs.resetPwdForm.validate(valid => {
|
||||
if (valid) {
|
||||
resetPwd(this.usersInfo.account,this.resetPwdForm.pwd,this.resetPwdForm.code).then(()=>{
|
||||
this.$message.success('密码重置成功');
|
||||
this.resetPwdDialogVisible=false;
|
||||
})
|
||||
.catch((err)=>{
|
||||
this.$message.error(err);
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//接受收件地址列表 并设置默认勾选
|
||||
getData (addresses) {
|
||||
this.addresses = addresses;
|
||||
this.addresses.forEach(ele => {
|
||||
if (ele.isDefault === 1) {
|
||||
this.addressId = ele.id;
|
||||
}
|
||||
});
|
||||
},
|
||||
getCity (val) {
|
||||
return this.$store.getters.getAreaParents(val)[0].label + this.$store.getters.getAreaParents(val)[1].label + this.$store.getters.getAreaParents(val)[2].label
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.createOrderTable .el-drawer__header{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.createOrderTable .el-drawer__body{
|
||||
padding-top: 0;
|
||||
}
|
||||
.tipsBox {
|
||||
padding-left:20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.tipsBox .insureNum{
|
||||
color: #000;
|
||||
padding: 10px 0;
|
||||
margin: 0;
|
||||
}
|
||||
.tipsBox .buttonR{
|
||||
float: right;
|
||||
margin-right: 130px;
|
||||
margin-top: -20px;
|
||||
}
|
||||
.tipsBox .insureNum font{
|
||||
color: #ff0000;
|
||||
font-weight: 700;
|
||||
}
|
||||
.tipsBox .tipsSpan{
|
||||
color: #ff0000;
|
||||
font-size: 14px;
|
||||
}
|
||||
.create-order-box {
|
||||
height: 85% !important;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.create-order-bill,
|
||||
.create-order-address {
|
||||
border: 1px solid #ebeef5;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
padding-top: 52px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.create-order-box-title {
|
||||
font-size: 18px;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.create-order-box-body {
|
||||
margin: 10px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.create-order-footer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
.create-order-box .el-table__header {
|
||||
display: none;
|
||||
}
|
||||
.create-order-pwd{
|
||||
background-color: #fafafa;
|
||||
padding: 30px 20px;
|
||||
}
|
||||
.taskInformation label {
|
||||
margin-right: 80px;
|
||||
}
|
||||
.create-order-pwd .employ-forgetPwd{
|
||||
margin-top: -72px;
|
||||
margin-left: 400px;
|
||||
float: left;
|
||||
}
|
||||
.create-order-pwd .el-input--suffix .el-input__inner{
|
||||
width: 280px;
|
||||
}
|
||||
.create-order-pwd .el-input{
|
||||
width: 280px;
|
||||
}
|
||||
.create-order-pwd .el-form-item__content{
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
607
src/views/tenant/mission/Dialog/EmployNumber.vue
Normal file
607
src/views/tenant/mission/Dialog/EmployNumber.vue
Normal file
@@ -0,0 +1,607 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<el-drawer
|
||||
title="已录用人员"
|
||||
append-to-body
|
||||
:visible.sync="drawer"
|
||||
size="80%"
|
||||
class="drawer"
|
||||
:before-close="drawerClose"
|
||||
>
|
||||
<!-- <div class="tipsWrap" v-show="getUserConfig.insuranceOn == 1">录用人员说明:不在保期的人员,不可以录用,请先到 “商保管理" 模块申请投保</div> -->
|
||||
<avue-crud
|
||||
:option="option"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
:page.sync="page"
|
||||
ref="crud"
|
||||
v-model="obj"
|
||||
:permission="permissionList"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
class="customPage"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<!--自定义列-->
|
||||
<template slot="period" slot-scope="{row}">
|
||||
<span v-if="row.startTime && row.endTime">
|
||||
<el-tag type="warning" v-if="row.serviceStatus==0">{{dateFormat(row.startTime)}}-{{dateFormat(row.endTime)}}</el-tag>
|
||||
<el-tag type="success" v-if="row.serviceStatus==1">{{dateFormat(row.startTime)}}-{{dateFormat(row.endTime)}}</el-tag>
|
||||
<el-tag type="danger" v-if="row.serviceStatus==2">{{dateFormat(row.startTime)}}-{{dateFormat(row.endTime)}}</el-tag>
|
||||
<el-tag type="info" v-if="row.serviceStatus==3">{{dateFormat(row.startTime)}}-{{dateFormat(row.endTime)}}</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<template slot="serviceStatus" slot-scope="{row}" >
|
||||
<span>
|
||||
<el-tag type="warning" v-if="row.serviceStatus==0">未生效</el-tag>
|
||||
<el-tag type="success" v-if="row.serviceStatus==1">生效中</el-tag>
|
||||
<el-tag type="danger" v-if="row.serviceStatus==2">即将失效</el-tag>
|
||||
<el-tag type="info" v-if="row.serviceStatus==3">已失效</el-tag>
|
||||
</span>
|
||||
|
||||
</template>
|
||||
<template slot="missionDate" slot-scope="{ row }">
|
||||
<div>{{ row.startDate }}至{{ row.endDate }}</div>
|
||||
</template>
|
||||
<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>
|
||||
<template slot="canBao" slot-scope="{ row }">
|
||||
<div>
|
||||
<el-button type="text" size="mini">{{ row.canBao }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<!--/自定义列-->
|
||||
<template v-slot:cardNumber="{row}">
|
||||
<span>{{idNumberDDesensitization(row.cardNumber)}}</span>
|
||||
</template>
|
||||
|
||||
</avue-crud>
|
||||
</el-drawer>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { employList, cancelEmploy, } from "@/api/tenant/mission";
|
||||
import {getCode,resetPwd} from "@/api/manage/econtract.js";//api
|
||||
import Resume from "@/components/resume/index";
|
||||
import { idNumberDDesensitization } from "@/util/util";
|
||||
import {mapGetters} from 'vuex'
|
||||
import { dateFormat } from "@/util/date";
|
||||
import {getConfig} from '@/api/tenant/config'
|
||||
import EmployInformation from "./EmployInformation";
|
||||
export default {
|
||||
comments: {},
|
||||
components: {
|
||||
Resume,
|
||||
EmployInformation
|
||||
},
|
||||
props: {
|
||||
status: Number,
|
||||
},
|
||||
|
||||
data() {
|
||||
const validatePwdLength=(rule,value,callback)=>{
|
||||
if(value.length!=6 || isNaN(Number(value))){
|
||||
callback(new Error('请输入6位数的数字密码'));
|
||||
}
|
||||
else{
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
const validatePwd = (rule, value, callback) => {
|
||||
if (value != this.resetPwdForm.pwd) {
|
||||
callback(new Error('两次输入密码不一致'));
|
||||
}
|
||||
else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const validPwdNums=(rule,value,callback)=>{
|
||||
if(value.length!=6 || isNaN(Number(value))){
|
||||
callback(new Error('请输入6位数的数字密码'));
|
||||
}
|
||||
else{
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
selectTaskInfo:{},
|
||||
getUserConfig:{},
|
||||
checkDisplayVisible: false,
|
||||
fpTitleId:'',
|
||||
fpData: {},
|
||||
pwdFormRules:{
|
||||
pwd:[
|
||||
{
|
||||
required:true,message:'请输入密码',trigger:'blur'
|
||||
},
|
||||
{
|
||||
validator:validatePwdLength,trigger:'blur'
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
selectionFlag:true,
|
||||
/*忘记密码*/
|
||||
resetPwdDialogVisible:false,
|
||||
resetPwdForm:{},
|
||||
formLabelWidth:'150px',
|
||||
msgText: '获取验证码',
|
||||
msgTime:120,
|
||||
//重置密码校验
|
||||
resetPwdRules: {
|
||||
code: [
|
||||
{
|
||||
required: true, message: '请输入验证码', trigger: 'blur'
|
||||
}
|
||||
],
|
||||
pwd: [
|
||||
{
|
||||
required: true, message: '请输入密码', trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: validPwdNums, trigger: 'blur'
|
||||
}
|
||||
],
|
||||
pwd2: [
|
||||
{
|
||||
required: true, message: '请输入确认密码', trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: validatePwd, trigger: 'blur'
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
|
||||
loadingbut:false,
|
||||
loadingbuttext:'确定',
|
||||
downLoadRow:{},
|
||||
dataCurClick:{},
|
||||
employDataIds:1,
|
||||
employNum:1,
|
||||
imgStr:'',
|
||||
isIndeterminate: false,
|
||||
checkAll: false,
|
||||
checked: false,
|
||||
missionId: "",
|
||||
loading: false,
|
||||
selectionList: [],
|
||||
dialogVisible: false,
|
||||
dialogVisible1: false,
|
||||
contractId:'',
|
||||
labelPosition: 'right',
|
||||
pwdForm: {
|
||||
pwd: ''
|
||||
},
|
||||
page: {
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
query: {
|
||||
status: 1,
|
||||
},
|
||||
drawer: false,
|
||||
data: [],
|
||||
obj: {},
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo']),
|
||||
ids() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids.join(",");
|
||||
},
|
||||
employState() {
|
||||
return this.query.status;
|
||||
},
|
||||
option() {
|
||||
//const self = this;
|
||||
return {
|
||||
height: "auto",
|
||||
align: "center",
|
||||
// menuAlign: "center",
|
||||
tip: false,
|
||||
addBtn: false,
|
||||
viewBtn: false,
|
||||
delBtn: false,
|
||||
editBtn: false,
|
||||
excelBtn: false,
|
||||
columnBtn: false,
|
||||
searchBtn: true,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
searchLabelWidth: 60,
|
||||
menu:false,
|
||||
// menuPosition: "center",
|
||||
labelPosition: "right",
|
||||
border: true,
|
||||
index: false,
|
||||
// index: true,
|
||||
// indexLabel: "序号",
|
||||
// selection: this.selectionFlag,
|
||||
// selectable: function (row) {
|
||||
// return !row.noSelection;
|
||||
// },
|
||||
dialogType: "drawer",
|
||||
dialogWidth: "60%",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "",
|
||||
prop: "status",
|
||||
search: true,
|
||||
searchSpan: 5,
|
||||
searchLabelWidth: 1,
|
||||
hide: true,
|
||||
searchslot: true,
|
||||
},
|
||||
{
|
||||
label: "姓名",
|
||||
prop: "realName",
|
||||
search: true,
|
||||
searchSpan: 4,
|
||||
width:70,
|
||||
},
|
||||
{
|
||||
label: "性别",
|
||||
prop: "sex",
|
||||
search: false,
|
||||
width:50,
|
||||
dicData: [
|
||||
{
|
||||
label: "男",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "女",
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "年龄",
|
||||
prop: "age",
|
||||
search: false,
|
||||
width:50,
|
||||
},
|
||||
{
|
||||
label: "手机号",
|
||||
prop: "telphone",
|
||||
search: false,
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
label: "身份证",
|
||||
prop: "cardNumber",
|
||||
search: false,
|
||||
slot: true,
|
||||
width:110
|
||||
},
|
||||
{
|
||||
label: "最新保期",
|
||||
prop: "period",
|
||||
searchSpan: 5,
|
||||
display: false,
|
||||
slot:true,
|
||||
width:190
|
||||
},
|
||||
{
|
||||
label: "商保状态",
|
||||
prop: "serviceStatus",
|
||||
searchSpan: 5,
|
||||
display: false,
|
||||
type: 'select',
|
||||
dicData: [
|
||||
{
|
||||
label: '未生效',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '生效中',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: '即将失效',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
label: '已失效',
|
||||
value: 3
|
||||
},
|
||||
],
|
||||
slot:true,
|
||||
},
|
||||
{
|
||||
label: "工种",
|
||||
prop: "workTypes",
|
||||
},
|
||||
{
|
||||
label: "来源",
|
||||
prop: "src",
|
||||
search: false,
|
||||
width:70,
|
||||
},
|
||||
{
|
||||
label: "人才库",
|
||||
prop: "groupId",
|
||||
type: "tree",
|
||||
span: 24,
|
||||
search: true,
|
||||
display: true,
|
||||
width: '150',
|
||||
dicUrl: `/api/jobslink-api/tenant/talents/group/listAll`,
|
||||
dicFormatter: (res) => {
|
||||
return res.data.list; //返回字典的层级结构
|
||||
},
|
||||
props: {
|
||||
label: "groupName",
|
||||
value: "id",
|
||||
},
|
||||
placeholder: "请选择分组",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
"query.status": function (val, oldVal) {
|
||||
this.query.realName = '';
|
||||
this.query.groupId = '';
|
||||
if (val !== oldVal) {
|
||||
this.query.status = val;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, this.query);
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
checkDisplayVisibleClose(){
|
||||
this.checkDisplayVisible = false;
|
||||
},
|
||||
rowEmployDisabled(){
|
||||
},
|
||||
dateFormat(date){
|
||||
return dateFormat(new Date(date),'yyyy/MM/dd')
|
||||
},
|
||||
idNumberDDesensitization,
|
||||
drawerClose(){
|
||||
this.$emit('refresh');
|
||||
this.drawer = false;
|
||||
},
|
||||
radioButtonChange(){
|
||||
this.query.realName = '';
|
||||
this.query.groupId = '';
|
||||
if(this.query.status == 2){
|
||||
this.selectionFlag = false;
|
||||
}else{
|
||||
this.selectionFlag = true;
|
||||
}
|
||||
},
|
||||
/*打开drawer*/
|
||||
openDialog(row, status) {
|
||||
this.selectTaskInfo = row;
|
||||
this.missionId = row.missionNo;
|
||||
this.query = {
|
||||
status: status,
|
||||
};
|
||||
if (this.$refs.crud) {
|
||||
this.$refs.crud.searchReset();
|
||||
} else {
|
||||
this.onLoad(this.page, this.query);
|
||||
}
|
||||
this.drawer = true;
|
||||
},
|
||||
/*单行取消*/
|
||||
rowDel(row) {
|
||||
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(() => {
|
||||
cancelEmploy(this.missionId, row.id).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.onLoad(this.page);
|
||||
this.$emit("refresh");
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {
|
||||
status: this.query.status,
|
||||
};
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.page.currentPage = 1;
|
||||
this.query = {
|
||||
realName: params.realName,
|
||||
groupId: params.groupId,
|
||||
status: this.query.status,
|
||||
worktypes: params.worktypes,
|
||||
};
|
||||
this.onLoad(this.page, this.query);
|
||||
done();
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
/*加载数据*/
|
||||
onLoad(page, params) {
|
||||
getConfig().then((res)=>{
|
||||
this.getUserConfig = res.data.data;
|
||||
});
|
||||
this.loading = true;
|
||||
let paramscur = params ? Object.assign(params, this.query) : this.query;
|
||||
employList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
paramscur,
|
||||
this.missionId
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data=data.records;
|
||||
// if(this.getUserConfig.insuranceOn == 1){
|
||||
// this.data.forEach((ele)=>{
|
||||
// if(!ele.effect){
|
||||
// ele.noSelection = 1;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
this.loading = false;
|
||||
/*let datas = data.records;
|
||||
datas.forEach((ele,index)=>{
|
||||
isGenerateContract(ele.userId,ele.missionNo).then((res) => {
|
||||
datas[index].successFlag = res.data.data;
|
||||
})
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.data = datas;
|
||||
this.loading = false;
|
||||
},1000)
|
||||
*/
|
||||
//this.selectionClear();
|
||||
});
|
||||
|
||||
},
|
||||
/*返回首页*/
|
||||
backIndex() {
|
||||
this.$emit("refresh");
|
||||
},
|
||||
forgetPwd(){
|
||||
this.phone=this.userInfo.account;
|
||||
var pat=/(\d{3})\d*(\d{4})/;
|
||||
this.phone=this.phone.replace(pat,'$1****$2');
|
||||
this.resetPwdDialogVisible=true;
|
||||
this.resetPwdForm={};
|
||||
},
|
||||
/*获取验证码*/
|
||||
getCode() {
|
||||
this.msgKey = true;
|
||||
this.msgText = "发送中...";
|
||||
getCode(this.userInfo.account)
|
||||
.then(() => {
|
||||
this.msgText = "剩余" + 120 + "s";
|
||||
this.msgKey = true;
|
||||
const time = setInterval(() => {
|
||||
this.msgTime--;
|
||||
this.msgText = "剩余" + this.msgTime + "s";
|
||||
if (this.msgTime <= 0) {
|
||||
this.msgTime = 120;
|
||||
this.msgText = "重新获取";
|
||||
this.msgKey = false;
|
||||
clearInterval(time);
|
||||
}
|
||||
}, 1000);
|
||||
})
|
||||
.catch(() => {
|
||||
this.msgText = "重新获取";
|
||||
this.msgKey = false;
|
||||
});
|
||||
|
||||
},
|
||||
/*重置密码*/
|
||||
submitResetPwd() {
|
||||
this.$refs.resetPwdForm.validate(valid => {
|
||||
if (valid) {
|
||||
resetPwd(this.userInfo.account,this.resetPwdForm.pwd,this.resetPwdForm.code).then(()=>{
|
||||
this.$message.success('密码重置成功');
|
||||
this.resetPwdDialogVisible=false;
|
||||
})
|
||||
.catch((err)=>{
|
||||
this.$message.error(err);
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.selectBtn{
|
||||
color: #787879 !important;
|
||||
}
|
||||
.selectBtn:hover{
|
||||
color: #787879 !important;
|
||||
}
|
||||
.tipsWrap{
|
||||
font-size: 14px;
|
||||
color: #ff0000;
|
||||
position: absolute;
|
||||
top: 26px;
|
||||
left: 120px;
|
||||
}
|
||||
.employ-employNum-count{
|
||||
color: #2098ee;
|
||||
}
|
||||
.employ-forgetPwd{
|
||||
float: right;
|
||||
margin-top: -33px;
|
||||
}
|
||||
</style>
|
||||
495
src/views/tenant/mission/Dialog/Recommend.vue
Normal file
495
src/views/tenant/mission/Dialog/Recommend.vue
Normal file
@@ -0,0 +1,495 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<el-drawer
|
||||
title="专属人才推荐"
|
||||
append-to-body
|
||||
:visible.sync="drawer"
|
||||
size="60%"
|
||||
class="drawer"
|
||||
>
|
||||
<avue-crud
|
||||
:option="personListOption"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
:page.sync="page"
|
||||
ref="crud"
|
||||
:permission="permissionList"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset"
|
||||
@selection-change="selectionChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
class="customPage"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<!--自定义列-->
|
||||
<template slot="resume" slot-scope="{ row }">
|
||||
<div>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="$refs.resume.openDialog(row)"
|
||||
v-if="row.userId && row.userId !== '0'"
|
||||
>查看简历</el-button
|
||||
>
|
||||
<div v-else>暂无简历</div>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="recommend" slot-scope="{ row }">
|
||||
<div>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-plus"
|
||||
@click="rowRecommend(row)"
|
||||
v-if="row.isApply === 0 && row.telphone != ''"
|
||||
>邀请</el-button
|
||||
>
|
||||
<!-- v-show="row.isApply === 1 && row.telphone == ''" -->
|
||||
<el-button
|
||||
type="info"
|
||||
disabled
|
||||
size="mini"
|
||||
icon="el-icon-plus"
|
||||
|
||||
v-else
|
||||
style="margin-left: 0px"
|
||||
>邀请</el-button
|
||||
>
|
||||
|
||||
<!-- <el-button type="primary" size="mini" disabled v-show="row.count>=2">已邀请</el-button> -->
|
||||
</div>
|
||||
</template>
|
||||
<template slot="count" slot-scope="{ row }">{{
|
||||
2 - row.count
|
||||
}}</template>
|
||||
<!--自定义按钮-->
|
||||
<template slot="menuLeft">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
:disabled="!selectionList.length"
|
||||
icon="el-icon-plus"
|
||||
@click="handleRecommend"
|
||||
>批量邀请</el-button
|
||||
>
|
||||
</template>
|
||||
<template slot="menuRight">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</template>
|
||||
<template v-slot:idNumber="{row}">
|
||||
<span>{{idNumberDDesensitization(row.idNumber)}}</span>
|
||||
</template>
|
||||
<template slot="name" slot-scope="{row}">
|
||||
<span v-if="row.status==1">{{row.name}}</span>
|
||||
<span v-else>{{row.name}}(<span style="color: red;">未实名</span>)</span>
|
||||
|
||||
</template>
|
||||
<!--/自定义按钮-->
|
||||
</avue-crud>
|
||||
<Resume ref="resume"></Resume>
|
||||
</el-drawer>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCommendList, inviteCount,inviteUser,recommendExportList } from "@/api/tenant/mission";
|
||||
import Resume from "@/components/resume/index";
|
||||
import { mapGetters } from "vuex";
|
||||
import { idNumberDDesensitization } from "@/util/util";
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
isIndeterminate: false,
|
||||
checkAll: false,
|
||||
checked: false,
|
||||
missionId: "",
|
||||
missionTitle: "",
|
||||
stime: "",
|
||||
drawer: false,
|
||||
selectionList: [],
|
||||
loading: false,
|
||||
query: {},
|
||||
page: {
|
||||
pageSize: 100,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
personListOption: {
|
||||
height: "auto",
|
||||
dialogWidth: "30%",
|
||||
align: "center",
|
||||
menuAlign: "center",
|
||||
rowKey: "id",
|
||||
tip: false,
|
||||
menu: false,
|
||||
addBtn: false,
|
||||
columnBtn: false,
|
||||
searchBtn: true,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
searchLabelWidth: 60,
|
||||
menuPosition: "center",
|
||||
labelPosition: "right",
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
selection: true,
|
||||
selectable: function (row) {
|
||||
return row.isApply === 0;
|
||||
},
|
||||
viewBtn: false,
|
||||
dialogType: "dialog",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "姓名",
|
||||
prop: "name",
|
||||
search: true,
|
||||
span: 24,
|
||||
width:155,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入姓名",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
slot:true,
|
||||
},
|
||||
{
|
||||
label: "性别",
|
||||
prop: "sex",
|
||||
search: false,
|
||||
span: 24,
|
||||
dicData: [
|
||||
{
|
||||
label: "男",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "女",
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "年龄",
|
||||
prop: "age",
|
||||
search: false,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
label: "身份证",
|
||||
prop: "idNumber",
|
||||
search: false,
|
||||
span: 24,
|
||||
width:150,
|
||||
slot: true
|
||||
},
|
||||
{
|
||||
label: "工种",
|
||||
type: "tree",
|
||||
prop: "worktypes",
|
||||
multiple: true,
|
||||
dicUrl: `/api/jobslink-api/tenant/worktypes/base/list`,
|
||||
dicFormatter: (res) => {
|
||||
return res.data; //返回字典的层级结构
|
||||
},
|
||||
props: {
|
||||
label: "name",
|
||||
value: "name",
|
||||
},
|
||||
search: true,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
label: "人才库",
|
||||
prop: "groupId",
|
||||
type: "tree",
|
||||
span: 24,
|
||||
search: true,
|
||||
display: true,
|
||||
width: '150',
|
||||
dicUrl: `/api/jobslink-api/tenant/talents/group/listAll`,
|
||||
dicFormatter: (res) => {
|
||||
return res.data.list; //返回字典的层级结构
|
||||
},
|
||||
props: {
|
||||
label: "groupName",
|
||||
value: "id",
|
||||
},
|
||||
placeholder: "请选择分组",
|
||||
},
|
||||
// {
|
||||
// label: "简历",
|
||||
// prop: "resume",
|
||||
// slot: true,
|
||||
// display: false
|
||||
// },
|
||||
{
|
||||
label: "剩余邀请次数",
|
||||
prop: "count",
|
||||
slot: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
label: "操作",
|
||||
prop: "recommend",
|
||||
slot: true,
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
excelBox: false,
|
||||
data: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
Resume,
|
||||
},
|
||||
watch: {},
|
||||
computed: {
|
||||
...mapGetters(["userInfo", "permission"]),
|
||||
// permissionList() {
|
||||
// return {
|
||||
// addBtn: this.vaildData(this.permission.user_add, false),
|
||||
// viewBtn: this.vaildData(this.permission.user_view, false),
|
||||
// delBtn: this.vaildData(this.permission.user_delete, false),
|
||||
// editBtn: this.vaildData(this.permission.user_edit, false)
|
||||
// };
|
||||
// },
|
||||
ids () {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.userId);
|
||||
});
|
||||
return ids.join(",");
|
||||
},
|
||||
phones () {
|
||||
let phones = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
phones.push(ele.telphone);
|
||||
});
|
||||
return phones.join(",");
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
idNumberDDesensitization,
|
||||
//导出
|
||||
handleExport(){
|
||||
window.open(recommendExportList(this.missionId,this.query.name?this.query.name:"",this.query.worktypes?this.query.worktypes:"",this.query.groupId?this.query.groupId:""));
|
||||
},
|
||||
/*打开drawer*/
|
||||
openDialog (row) {
|
||||
this.missionId = row.missionNo;
|
||||
this.missionTitle = row.missionTitle;
|
||||
this.stime = row.stime;
|
||||
if (this.$refs.crud) {
|
||||
this.$refs.crud.searchReset();
|
||||
} else {
|
||||
this.query = {};
|
||||
this.onLoad(this.page, this.query);
|
||||
}
|
||||
this.drawer = true;
|
||||
},
|
||||
/*邀请人才 */
|
||||
rowRecommend (row) {
|
||||
const h = this.$createElement;
|
||||
let count = 2 - row.count;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h(
|
||||
"p",
|
||||
{ style: "font-size: 16px" },
|
||||
"您确定要向" + row.name + "发送邀请吗? "
|
||||
),
|
||||
h(
|
||||
"p",
|
||||
{ style: "color: red" },
|
||||
"每个人最多邀请2次,还剩" + count + "次"
|
||||
),
|
||||
]),
|
||||
{
|
||||
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(() => {
|
||||
let rows = [];
|
||||
rows.push({
|
||||
idNumber: row.idNumber,
|
||||
missionNo: this.missionId,
|
||||
missionTitle: this.missionTitle,
|
||||
telphone: row.telphone,
|
||||
});
|
||||
inviteUser(rows).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消'
|
||||
// });
|
||||
});
|
||||
},
|
||||
/*批量邀请人才*/
|
||||
handleRecommend () {
|
||||
if (this.selectionList.length === 0) {
|
||||
this.$message.warning("请选择至少一条数据");
|
||||
return;
|
||||
}
|
||||
const h = this.$createElement;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h("p", { style: "font-size: 16px" }, "您确定要批量发送邀请吗? "),
|
||||
h("p", { style: "color: red" }, "每个人最多邀请2次"),
|
||||
]),
|
||||
{
|
||||
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(() => {
|
||||
let rows = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
rows.push({
|
||||
idNumber: ele.idNumber,
|
||||
missionNo: this.missionId,
|
||||
missionTitle: this.missionTitle,
|
||||
telphone: ele.telphone,
|
||||
});
|
||||
});
|
||||
inviteUser(rows).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消'
|
||||
// });
|
||||
});
|
||||
},
|
||||
searchReset () {
|
||||
this.query = {};
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
searchChange (params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, this.query);
|
||||
done();
|
||||
},
|
||||
selectionChange (list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
selectionClear () {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
currentChange (currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
sizeChange (pageSize) {
|
||||
this.page.currentPage = 1;
|
||||
this.page.pageSize = pageSize;
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
refreshChange () {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
onLoad (page, params = {}) {
|
||||
this.loading = true;
|
||||
getCommendList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(params, this.query),
|
||||
this.missionId
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
if (this.data.length > 0) {
|
||||
for (let i = 0; i < this.data.length; i++) {
|
||||
inviteCount(this.data[i].idNumber, this.missionId).then((res) => {
|
||||
this.$set(this.data[i], "count", res.data.data.count); //count为已邀请次数 2-count为剩余邀请次数
|
||||
this.$set(this.data[i], "isApply", res.data.data.isApply); //isApply===0 可邀请,===1不可邀请
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.selectionClear();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
293
src/views/tenant/mission/Dialog/Skill.vue
Normal file
293
src/views/tenant/mission/Dialog/Skill.vue
Normal file
@@ -0,0 +1,293 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tag
|
||||
class="skill-select-tag"
|
||||
:key="tag.id"
|
||||
v-for="tag in selectedSkills"
|
||||
:disable-transitions="true"
|
||||
size="medium"
|
||||
>{{ tag.name }}</el-tag
|
||||
>
|
||||
<el-button
|
||||
v-if="canSelect"
|
||||
class="button-new-tag"
|
||||
size="small"
|
||||
@click="showSelect"
|
||||
:disabled="!this.id"
|
||||
>+ 选择技能</el-button
|
||||
>
|
||||
<el-dialog
|
||||
title="技能标签"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:append-to-body="true"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div>
|
||||
<el-tag
|
||||
class="skill-select-tag"
|
||||
:key="tag.id"
|
||||
v-for="(tag, index) in tobeSelectedSkills"
|
||||
closable
|
||||
type="primary"
|
||||
:disable-transitions="true"
|
||||
@close="removeSkill(index)"
|
||||
size="medium"
|
||||
>{{ tag.name }}</el-tag
|
||||
>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div>请选择或者添加您所需的技能标签(最多5个)</div>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="autocompleteBox">
|
||||
<el-autocomplete
|
||||
popper-class="my-autocomplete"
|
||||
v-model.trim="search"
|
||||
:fetch-suggestions="querySearch"
|
||||
placeholder="请选择行业类型"
|
||||
@select="handleSelect"
|
||||
maxlength="15"
|
||||
show-word-limit
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled = "addBtnState"
|
||||
slot="suffix"
|
||||
@click="handleIconClick"
|
||||
size="mini"
|
||||
>+添加</el-button>
|
||||
<!-- <i class="el-icon-arrow-down" slot="suffix" @click="handleIconClickArrowDown"></i> -->
|
||||
<template slot-scope="{ item }">
|
||||
<div class="name">{{item.value}}</div>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <el-autocomplete
|
||||
v-model="search"
|
||||
:fetch-suggestions="querySearch"
|
||||
:trigger-on-focus="false"
|
||||
placeholder="搜索您想要的标签"
|
||||
@select="editSkill"
|
||||
style="width: 100%"
|
||||
:validate-event="false"
|
||||
>
|
||||
<template slot-scope="{ item }">
|
||||
<div>{{ item.name }}</div>
|
||||
</template>
|
||||
</el-autocomplete> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div>
|
||||
<a
|
||||
class="skill-select-tag"
|
||||
href="javascript:void(0)"
|
||||
v-for="tag in allSkill"
|
||||
:key="tag.id"
|
||||
@click="editSkill(tag)"
|
||||
>
|
||||
<el-tag
|
||||
type="info"
|
||||
:disable-transitions="true"
|
||||
size="medium"
|
||||
effect="plain"
|
||||
>{{ tag.name }}</el-tag
|
||||
>
|
||||
</a>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
icon="el-icon-circle-plus-outline"
|
||||
type="primary"
|
||||
@click="submit"
|
||||
>保 存</el-button
|
||||
>
|
||||
<el-button icon="el-icon-circle-close" @click="dialogVisible = false"
|
||||
>取 消</el-button
|
||||
>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSkillList } from "@/api/tenant/common";
|
||||
import {skillListAdd} from "@/api/tenant/mission";
|
||||
import _ from "lodash";
|
||||
|
||||
export default {
|
||||
name: "skillSelect",
|
||||
props: {
|
||||
selectedSkills: Array,
|
||||
canSelect: Boolean,
|
||||
id: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: "",
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
tobeSelectedSkills: [],
|
||||
allSkill: [],
|
||||
flags:true,
|
||||
addBtnState:true,
|
||||
nameAttr:[]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
id: function (val, oldVal) {
|
||||
if (val !== oldVal && oldVal) {
|
||||
this.$emit("add-skill", []);
|
||||
}
|
||||
},
|
||||
search:function(n,o){
|
||||
if((n || o!='') && this.tobeSelectedSkills.length != 0){
|
||||
this.$emit('clear-validator');
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//获取技能列表
|
||||
getData() {
|
||||
if (this.id) {
|
||||
this.loading = true;
|
||||
getSkillList(this.id).then((res) => {
|
||||
this.allSkill = res.data.data.records;
|
||||
this.nameAttr = this.allSkill.map((ele)=>{
|
||||
return ele.name
|
||||
})
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleSelect(item) {
|
||||
this.addBtnState = true;
|
||||
// console(item);
|
||||
this.editSkill(item);
|
||||
},
|
||||
querySearch(queryString, cb) {
|
||||
let results = [];
|
||||
let nameState = this.nameAttr.indexOf(queryString);
|
||||
if(nameState == -1){
|
||||
this.addBtnState = false;
|
||||
}else{
|
||||
this.addBtnState = true;
|
||||
}
|
||||
for(let i of this.allSkill){
|
||||
i.value = i.name;
|
||||
}
|
||||
results = queryString ? this.allSkill.filter(this.createStateFilter(queryString)) : this.allSkill;
|
||||
cb(results);
|
||||
},
|
||||
createStateFilter(queryString) {
|
||||
return (state) => {
|
||||
return (state.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
|
||||
};
|
||||
},
|
||||
handleIconClick() {
|
||||
let nameState = this.nameAttr.indexOf(this.search)
|
||||
if(this.search == ""){
|
||||
this.$message.closeAll()
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "请输入要添加的技能!",
|
||||
})
|
||||
}else if(nameState != -1){
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "此技能已存在,请在列表中选择!",
|
||||
})
|
||||
}else{
|
||||
skillListAdd(this.id,this.search).then((res) =>{
|
||||
if(res.data.code == 200){
|
||||
//this.search = res.data.data;
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: res.data.msg,
|
||||
})
|
||||
this.addBtnState = true;
|
||||
this.getData();
|
||||
}else{
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: res.data.msg,
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
/*技能*/
|
||||
editSkill(tag) {
|
||||
if (this.tobeSelectedSkills.length < 5) {
|
||||
if (
|
||||
this.tobeSelectedSkills.find((item) => {
|
||||
return item.id === tag.id;
|
||||
})
|
||||
) {
|
||||
if(!this.flags){
|
||||
this.$message({
|
||||
message: "您已添加该技能标签",
|
||||
type: "warning",
|
||||
});
|
||||
this.flags=true;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.tobeSelectedSkills.push(tag);
|
||||
this.$emit('clear-validator');
|
||||
this.flags=false;
|
||||
}
|
||||
} else {
|
||||
this.$message({
|
||||
message: "最多添加5个技能标签",
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
},
|
||||
removeSkill(index) {
|
||||
this.tobeSelectedSkills.splice(index, 1);
|
||||
},
|
||||
submit() {
|
||||
if (this.tobeSelectedSkills.length) {
|
||||
this.dialogVisible = false;
|
||||
this.$emit("add-skill", this.tobeSelectedSkills);
|
||||
} else {
|
||||
this.$message.closeAll();
|
||||
this.$message({
|
||||
message: "请至少选择一个技能标签",
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
},
|
||||
showSelect() {
|
||||
this.tobeSelectedSkills = _.cloneDeep(this.selectedSkills || []);
|
||||
this.getData();
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.skill-select-tag {
|
||||
margin: 0px 5px;
|
||||
}
|
||||
.autocompleteBox .el-autocomplete{
|
||||
width:100%;
|
||||
}
|
||||
</style>
|
||||
212
src/views/tenant/mission/Dialog/noEmployed.vue
Normal file
212
src/views/tenant/mission/Dialog/noEmployed.vue
Normal file
@@ -0,0 +1,212 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<el-drawer
|
||||
title="比对结果"
|
||||
append-to-body
|
||||
:visible.sync="drawer"
|
||||
size="65%"
|
||||
class="drawer"
|
||||
>
|
||||
<avue-crud
|
||||
:option="personListOption"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
:page.sync="page"
|
||||
ref="crud"
|
||||
:permission="permissionList"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset"
|
||||
@selection-change="selectionChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
class="customPage"
|
||||
>
|
||||
<!--/自定义按钮-->
|
||||
<template slot="menuRight">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</template>
|
||||
<template v-slot:idNumber="{row}">
|
||||
<span>{{idNumberDDesensitization(row.idNumber)}}</span>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</el-drawer>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {userLists,userListsExport} from "@/api/tenant/mission";
|
||||
// import Resume from "@/components/resume/index";
|
||||
import { mapGetters } from "vuex";
|
||||
import { idNumberDDesensitization } from "@/util/util";
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
isIndeterminate: false,
|
||||
checkAll: false,
|
||||
checked: false,
|
||||
missionId: "",
|
||||
missionTitle: "",
|
||||
stime: "",
|
||||
drawer: false,
|
||||
selectionList: [],
|
||||
loading: false,
|
||||
query: {},
|
||||
id:null,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
personListOption: {
|
||||
dialogWidth: "30%",
|
||||
align: "center",
|
||||
menuAlign: "center",
|
||||
rowKey: "id",
|
||||
tip: false,
|
||||
menu: false,
|
||||
addBtn: false,
|
||||
columnBtn: false,
|
||||
searchBtn: true,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
searchLabelWidth: 45,
|
||||
menuPosition: "center",
|
||||
labelPosition: "right",
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
viewBtn: false,
|
||||
dialogType: "dialog",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "姓名",
|
||||
prop: "name",
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
label: "性别",
|
||||
prop: "sex",
|
||||
search: false,
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
label: "年龄",
|
||||
prop: "age",
|
||||
search: false,
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
label: "身份证",
|
||||
prop: "idNumber",
|
||||
search: false,
|
||||
width: 150,
|
||||
slot: true
|
||||
},
|
||||
{
|
||||
label: "联系方式",
|
||||
prop: "telphone",
|
||||
search: false,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
label: "工种",
|
||||
prop: "worktypeName",
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
label: "人才库",
|
||||
prop: "groupName",
|
||||
search: false,
|
||||
},
|
||||
// {
|
||||
// label: "操作",
|
||||
// prop: "recommend",
|
||||
// slot: true,
|
||||
// },
|
||||
],
|
||||
},
|
||||
excelBox: false,
|
||||
data: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
// Resume,
|
||||
},
|
||||
watch: {},
|
||||
computed: {
|
||||
...mapGetters(["userInfo", "permission"]),
|
||||
ids () {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.userId);
|
||||
});
|
||||
return ids.join(",");
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
idNumberDDesensitization,
|
||||
//导出
|
||||
handleExport(){
|
||||
window.open(userListsExport(this.missionId, this.id));
|
||||
},
|
||||
/*打开drawer*/
|
||||
openDialog (missionId,ids) {
|
||||
this.missionId = missionId;
|
||||
this.id = ids;
|
||||
this.ids = ids;
|
||||
this.onLoad(this.page, this.query);
|
||||
this.drawer = true;
|
||||
},
|
||||
/*批量选择*/
|
||||
// handleChoice () {
|
||||
|
||||
// },
|
||||
searchReset () {
|
||||
this.query = {};
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
searchChange (params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, this.query);
|
||||
done();
|
||||
},
|
||||
selectionChange (list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
selectionClear () {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
currentChange (currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
sizeChange (pageSize) {
|
||||
this.page.currentPage = 1;
|
||||
this.page.pageSize = pageSize;
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
refreshChange () {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
onLoad () {
|
||||
this.loading = true;
|
||||
userLists(this.missionId, this.id).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.data = data;
|
||||
this.loading = false;
|
||||
this.selectionClear();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user