初始化项目
This commit is contained in:
@@ -1,585 +0,0 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<el-tabs v-model="activeName" class="tabs">
|
||||
<el-tab-pane label="账户安全" name="accountSafe">
|
||||
<el-row class="content">
|
||||
<el-col :span="24">
|
||||
<el-row>
|
||||
<el-col :span="24" class="title">
|
||||
<b>账户信息</b>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">登录账号:{{userInfo.account}}</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">姓名:{{userInfo.real_name}}</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="21">手机号码:{{userInfo.account}}</el-col>
|
||||
<el-col :sm="24" :lg="3">
|
||||
<el-button type="text" @click="leaderBox = true" v-show="isAdmin">变更负责人</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="24">
|
||||
<el-row>
|
||||
<el-col :span="24" class="title">
|
||||
<b>账户安全</b>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :sm="24" :lg="6">登录密码:已设置</el-col>
|
||||
<el-col :sm="24" :lg="15">安全性高的密码可以使账号更安全。</el-col>
|
||||
<el-col :sm="24" :lg="3">
|
||||
<el-button type="text" @click="passwordBox = true">修改密码</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :sm="24" :lg="6">绑定手机号码:已绑定</el-col>
|
||||
<el-col :sm="24" :lg="15">绑定手机后,您即可享受丰富的手机服务,如手机找回密码等。</el-col>
|
||||
<el-col :sm="24" :lg="3">
|
||||
<el-button type="text" @click="phoneBox = true">换绑手机号码</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<!--修改负责人-->
|
||||
<el-dialog
|
||||
title="变更负责人"
|
||||
append-to-body
|
||||
:visible.sync="leaderBox"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
width="30%"
|
||||
@closed="closed"
|
||||
:loading="leaderLoading"
|
||||
>
|
||||
<el-form
|
||||
ref="leaderForm"
|
||||
label-position="left"
|
||||
label-width="110px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
:model="leaderForm"
|
||||
>
|
||||
<el-form-item label="用户姓名" prop="realName">
|
||||
<el-input v-model="leaderForm.realName" placeholder="请输入用户名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号码" prop="idNumber">
|
||||
<el-input v-model="leaderForm.idNumber" placeholder="请输入身份证号码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="phone">
|
||||
<el-input v-model="leaderForm.phone" placeholder="请输入手机号码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="短信验证码" prop="code">
|
||||
<el-input v-model="leaderForm.code" placeholder="请输入短信验证码">
|
||||
<template slot="append">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleSend('leaderForm','phone')"
|
||||
class="msg-text"
|
||||
:loading="sending"
|
||||
:disabled="msgKey"
|
||||
>{{msgText}}</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-alert title="注:变更后初始密码为手机号后六位" type="warning" :closable="false"></el-alert>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
icon="el-icon-check"
|
||||
type="primary"
|
||||
@click="submitLeader"
|
||||
size="mini"
|
||||
:loading="leaderLoading"
|
||||
>提 交</el-button>
|
||||
<el-button
|
||||
icon="el-icon-circle-close"
|
||||
@click="leaderBox = false"
|
||||
size="mini"
|
||||
:loading="leaderLoading"
|
||||
>取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--/修改负责人-->
|
||||
|
||||
<!--修改密码-->
|
||||
<el-dialog
|
||||
title="修改密码"
|
||||
append-to-body
|
||||
:visible.sync="passwordBox"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
width="30%"
|
||||
@closed="passwordClosed"
|
||||
>
|
||||
<el-form
|
||||
ref="passwordForm"
|
||||
label-position="left"
|
||||
label-width="110px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
:model="passwordForm"
|
||||
>
|
||||
<el-form-item label="原密码" prop="oldPassword">
|
||||
<el-input
|
||||
v-model="passwordForm.oldPassword"
|
||||
auto-complete="off"
|
||||
placeholder="请输入原登录密码"
|
||||
:type="passwordType"
|
||||
>
|
||||
<i
|
||||
class="el-icon-view el-input__icon"
|
||||
slot="suffix"
|
||||
@mouseenter="passwordType='input'"
|
||||
@mouseleave="passwordType='password'"
|
||||
></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="newPassword">
|
||||
<el-input
|
||||
v-model="passwordForm.newPassword"
|
||||
placeholder="6-20位包含数字和字母"
|
||||
:type="passwordType1"
|
||||
>
|
||||
<i
|
||||
class="el-icon-view el-input__icon"
|
||||
slot="suffix"
|
||||
@mouseenter="passwordType1='input'"
|
||||
@mouseleave="passwordType1='password'"
|
||||
></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" prop="newPassword1">
|
||||
<el-input
|
||||
v-model="passwordForm.newPassword1"
|
||||
placeholder="6-20位包含数字和字母"
|
||||
:type="passwordType2"
|
||||
>
|
||||
<i
|
||||
class="el-icon-view el-input__icon"
|
||||
slot="suffix"
|
||||
@mouseenter="passwordType2='input'"
|
||||
@mouseleave="passwordType2='password'"
|
||||
></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
icon="el-icon-check"
|
||||
type="primary"
|
||||
@click="submitPwd"
|
||||
size="mini"
|
||||
:loading="passwordLoading"
|
||||
>提 交</el-button>
|
||||
<el-button
|
||||
icon="el-icon-circle-close"
|
||||
@click="passwordBox = false"
|
||||
size="mini"
|
||||
:loading="passwordLoading"
|
||||
>取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--/修改密码-->
|
||||
|
||||
<!--修改手机号-->
|
||||
<el-dialog
|
||||
title="换绑手机号码"
|
||||
append-to-body
|
||||
:visible.sync="phoneBox"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
width="30%"
|
||||
@closed="phoneClosed"
|
||||
>
|
||||
<el-form
|
||||
ref="phoneForm"
|
||||
label-position="left"
|
||||
label-width="110px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
:model="phoneForm"
|
||||
>
|
||||
<el-form-item label="原手机号码" prop="oldPhone">
|
||||
<el-input v-model="phoneForm.oldPhone" placeholder="请输入原手机号码" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="新手机号码" prop="newPhone">
|
||||
<el-input v-model="phoneForm.newPhone" placeholder="请输入要更换的手机号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="短信验证码" prop="code">
|
||||
<el-input v-model="phoneForm.code" placeholder="请输入短信验证码">
|
||||
<template slot="append">
|
||||
<el-button
|
||||
type="text"
|
||||
@click.prevent="handleSend('phoneForm','newPhone')"
|
||||
class="msg-text"
|
||||
:loading="sending"
|
||||
:disabled="msgKey"
|
||||
>{{msgText}}</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-alert title="注:变更后初始密码为手机号后六位" type="warning" :closable="false"></el-alert>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
icon="el-icon-check"
|
||||
type="primary"
|
||||
@click="submitPhone"
|
||||
size="mini"
|
||||
:loading="phoneLoading"
|
||||
>提 交</el-button>
|
||||
<el-button
|
||||
icon="el-icon-circle-close"
|
||||
@click="phoneBox = false"
|
||||
size="mini"
|
||||
:loading="phoneLoading"
|
||||
>取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--/修改手机号-->
|
||||
</basic-container>
|
||||
</template>
|
||||
<script>
|
||||
import { isvalidatemobile, check18IdCardNo, password } from "@/util/validate";
|
||||
import {
|
||||
changeLeader,
|
||||
changePwd,
|
||||
sendCode,
|
||||
changePhone,
|
||||
} from "@/api/tenant/account";
|
||||
import { resetRouter } from "@/router/router";
|
||||
import { mapGetters } from "vuex";
|
||||
import md5 from "js-md5";
|
||||
|
||||
const wait = 120;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
const IdCardNo = (rule, value, callback) => {
|
||||
if (check18IdCardNo(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("身份证格式不正确"));
|
||||
}
|
||||
};
|
||||
const validatePhone = (rule, value, callback) => {
|
||||
if (isvalidatemobile(value)[0]) {
|
||||
callback(new Error(isvalidatemobile(value)[1]));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const validateCode = (rule, value, callback) => {
|
||||
if (value && value.length !== 4) {
|
||||
callback(new Error("验证码错误"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
const validatePassDef = (rule, value, callback) => {
|
||||
if (
|
||||
this.passwordForm.oldPassword &&
|
||||
value === this.passwordForm.oldPassword
|
||||
) {
|
||||
callback(new Error("新密码不能与原密码相同"));
|
||||
} else if (password(value)) {
|
||||
callback(new Error("密码需要包含数字和字母,并且长度为6-20位"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
const validatePassDef2 = (rule, value, callback) => {
|
||||
if (value !== this.passwordForm.newPassword) {
|
||||
callback(new Error("两次密码不一致"));
|
||||
} else if (password(value)) {
|
||||
callback(new Error("密码需要包含数字和字母,并且长度为6-20位"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
const validatePhoneDef = (rule, value, callback) => {
|
||||
if (value === this.phoneForm.oldPhone) {
|
||||
callback(new Error("新手机号码与原手机号码不能相同"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
passwordLoading: false,
|
||||
leaderLoading: false,
|
||||
phoneLoading: false,
|
||||
sending: false,
|
||||
passwordType: "password",
|
||||
passwordType1: "password",
|
||||
passwordType2: "password",
|
||||
msgKey: false,
|
||||
msgText: "获取验证码",
|
||||
time: null,
|
||||
activeName: "accountSafe",
|
||||
accountForm: {},
|
||||
leaderForm: {},
|
||||
passwordForm: {},
|
||||
phoneForm: {},
|
||||
loading: false,
|
||||
leaderBox: false,
|
||||
passwordBox: false,
|
||||
phoneBox: false,
|
||||
rules: {
|
||||
realName: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入用户名",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
idNumber: [
|
||||
{ required: true, message: "请输入身份证号", trigger: "blur" },
|
||||
{ validator: IdCardNo, trigger: "blur" },
|
||||
],
|
||||
phone: [{ required: true, trigger: "blur", validator: validatePhone }],
|
||||
code: [
|
||||
{ required: true, message: "请输入短信验证码", trigger: "blur" },
|
||||
{ validator: validateCode, trigger: "blur" },
|
||||
],
|
||||
oldPassword: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入原来登录密码",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
newPassword: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入新密码",
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
validator: validatePassDef,
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
newPassword1: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请再次输入密码",
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
validator: validatePassDef2,
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
oldPhone: [
|
||||
{ required: true, validator: validatePhone, trigger: "blur" },
|
||||
],
|
||||
newPhone: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入要更换的手机号码",
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
validator: validatePhoneDef,
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.phoneForm = { oldPhone: this.userInfo.account };
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
/*发送验证码 */
|
||||
handleSend(form, field) {
|
||||
if (this.msgKey) return;
|
||||
this.$refs[form].validateField(field, (error) => {
|
||||
if (!error) {
|
||||
this.sending = true;
|
||||
sendCode(this[form][field]).then(
|
||||
() => {
|
||||
let time = wait;
|
||||
this.msgText = `剩余${time--}s`;
|
||||
this.msgKey = true;
|
||||
this.time = setInterval(() => {
|
||||
this.msgText = `剩余${time--}s`;
|
||||
if (time <= 0) {
|
||||
this.clearTime(); //清除定时器
|
||||
}
|
||||
}, 1000);
|
||||
this.sending = false;
|
||||
},
|
||||
() => {
|
||||
this.sending = false;
|
||||
this.$message.error("发送失败!");
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
/*提交变更负责人*/
|
||||
submitLeader() {
|
||||
this.$refs.leaderForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.leaderLoading = true;
|
||||
changeLeader(this.leaderForm).then(
|
||||
() => {
|
||||
this.leaderBox = false;
|
||||
this.leaderLoading = false;
|
||||
this.$store.dispatch("LogOut").then(() => {
|
||||
resetRouter();
|
||||
this.$router.push({ path: "/login" });
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功,请重新登录!",
|
||||
});
|
||||
});
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
this.leaderLoading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
/*提交修改密码 */
|
||||
submitPwd() {
|
||||
this.$refs.passwordForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.passwordLoading = true;
|
||||
changePwd(
|
||||
md5(this.passwordForm.oldPassword),
|
||||
md5(this.passwordForm.newPassword),
|
||||
md5(this.passwordForm.newPassword1)
|
||||
).then(
|
||||
() => {
|
||||
this.passwordBox = false;
|
||||
this.passwordLoading = false;
|
||||
this.$store.dispatch("LogOut").then(() => {
|
||||
resetRouter();
|
||||
this.$router.push({ path: "/login" });
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功,请重新登录!",
|
||||
});
|
||||
});
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
this.passwordLoading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
/*提交修改手机号 */
|
||||
submitPhone() {
|
||||
this.$refs.phoneForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.phoneLoading = true;
|
||||
changePhone(this.phoneForm).then(
|
||||
() => {
|
||||
this.phoneBox = false;
|
||||
this.phoneLoading = false;
|
||||
this.$store.dispatch("LogOut").then(() => {
|
||||
resetRouter();
|
||||
this.$router.push({ path: "/login" });
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功,请重新登录!",
|
||||
});
|
||||
});
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
this.phoneLoading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
closed() {
|
||||
this.clearTime();
|
||||
this.leaderForm = {};
|
||||
if (this.$refs.leaderForm) {
|
||||
this.$refs.leaderForm.resetFields();
|
||||
}
|
||||
},
|
||||
passwordClosed() {
|
||||
this.passwordForm = {};
|
||||
if (this.$refs.passwordForm) {
|
||||
this.$refs.passwordForm.resetFields();
|
||||
}
|
||||
},
|
||||
phoneClosed() {
|
||||
this.clearTime();
|
||||
if (this.$refs.phoneForm) {
|
||||
this.$refs.phoneForm.resetFields();
|
||||
}
|
||||
this.phoneForm = { oldPhone: this.userInfo.account };
|
||||
},
|
||||
/*清除code定时器 */
|
||||
clearTime() {
|
||||
this.msgText = "获取验证码";
|
||||
this.msgKey = false;
|
||||
clearInterval(this.time);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["userInfo"]),
|
||||
isAdmin() {
|
||||
return this.userInfo.is_master;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form-item{
|
||||
margin-bottom: 22px !important;
|
||||
}
|
||||
.el-row {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.el-col {
|
||||
margin-bottom: 0px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.tabs {
|
||||
padding: 20px 10px 0;
|
||||
}
|
||||
.content {
|
||||
border: 1px solid #333333;
|
||||
padding: 10px 40px;
|
||||
font-size: 16px;
|
||||
margin: 30px 30px;
|
||||
}
|
||||
.msg-text {
|
||||
display: block;
|
||||
width: 120px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@@ -1,419 +0,0 @@
|
||||
<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>
|
||||
@@ -1,188 +0,0 @@
|
||||
<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>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,524 +0,0 @@
|
||||
<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>
|
||||
@@ -1,607 +0,0 @@
|
||||
<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>
|
||||
@@ -1,495 +0,0 @@
|
||||
<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>
|
||||
@@ -1,293 +0,0 @@
|
||||
<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>
|
||||
@@ -1,212 +0,0 @@
|
||||
<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>
|
||||
@@ -1,360 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<avue-crud
|
||||
:option="option"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
ref="crud"
|
||||
v-model="obj"
|
||||
@row-del="rowDel"
|
||||
@row-update="rowUpdate"
|
||||
@row-save="rowSave"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<!--自定义列-->
|
||||
<template slot="missionTitle" slot-scope="{ row }">
|
||||
<el-tooltip effect="dark" :content="row.missionTitle" placement="top">
|
||||
<div style="color: black">
|
||||
<b>{{ row.missionTitle | ellipsis }}</b>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<!-- 开始日期 -->
|
||||
<template slot="stime" slot-scope="{row}">
|
||||
<span>{{format(row.stime)}}</span>
|
||||
</template>
|
||||
<!-- 完成日期 -->
|
||||
<template slot="etime" slot-scope="{row}">
|
||||
<span>{{format(row.etime)}}</span>
|
||||
</template>
|
||||
<template slot="signUpCount" slot-scope="{ row }">
|
||||
<div style="color: #409eff">
|
||||
<b>{{ row.signUpCount }}人</b>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="takeOnCount" slot-scope="{ row }">
|
||||
<div style="color: #409eff">
|
||||
<b>{{ row.takeOnCount }}人</b>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="missionDate" slot-scope="{ row }">
|
||||
<div>{{ format(row.stime) }}至{{ format(row.etime) }}</div>
|
||||
</template>
|
||||
|
||||
<!--/自定义列-->
|
||||
<!--自定义操作栏-->
|
||||
<div slot="menu" slot-scope="{size,type,row}">
|
||||
<!-- <el-button
|
||||
icon="el-icon-view"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="rowView(row);"
|
||||
v-show="vaildData(permission.tenant_mission_view,false)"
|
||||
>查看</el-button>-->
|
||||
<el-button
|
||||
icon="el-icon-check"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="rowCopy(row, 'copy')"
|
||||
v-show="vaildData(permission.tenant_mission_add, false)"
|
||||
>复制</el-button>
|
||||
<el-button
|
||||
icon="el-icon-delete"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="$refs.crud.rowDel(row)"
|
||||
v-show="vaildData(permission.tenant_mission_delete, false)"
|
||||
>删除</el-button>
|
||||
</div>
|
||||
<!--/自定义操作栏-->
|
||||
<!--自定义按钮-->
|
||||
<template slot="menuLeft">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="small"
|
||||
@click="rowCopy('', 'add')"
|
||||
v-show="vaildData(permission.tenant_mission_add, false)"
|
||||
>发布任务</el-button>
|
||||
</template>
|
||||
<!--/自定义按钮-->
|
||||
</avue-crud>
|
||||
<copy-mission ref="copy" @back="backIndex" v-show="false"></copy-mission>
|
||||
<!--查看dialog-->
|
||||
<mission-view :visible.sync="viewDrawer" :model="view"></mission-view>
|
||||
<!--/查看dialog-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getExpiredList, remove, detail } from "@/api/tenant/mission";
|
||||
import CopyMission from "../Dialog/CopyMission";
|
||||
import SkillSelect from "../Dialog/Skill";
|
||||
import missionView from "./missionView.vue";
|
||||
import SelectMap from "@/components/map/selectLocation";
|
||||
import { mapGetters } from "vuex";
|
||||
import { dateFormat } from "@/util/date";
|
||||
import saveButton from "./saveButton";
|
||||
|
||||
export default {
|
||||
comments: {},
|
||||
filters: {
|
||||
ellipsis (value) {
|
||||
if (!value) return "";
|
||||
if (value.length > 15) {
|
||||
return value.slice(0, 14) + "...";
|
||||
}
|
||||
return value;
|
||||
},
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
viewDrawer: false,
|
||||
view: {},
|
||||
loading: false,
|
||||
isCanEdit: false,
|
||||
selectedSkills: [],
|
||||
tradeData: [],
|
||||
page: {
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
query: {},
|
||||
data: [],
|
||||
obj: {},
|
||||
wageUnitCategory: [
|
||||
{
|
||||
value: 0,
|
||||
label: "元/人·次",
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: "元/人·时",
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: "元/人·天",
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: "元/人·周",
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: "元/人·月",
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: "元/人·个",
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: "元/人·件",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
CopyMission,
|
||||
SkillSelect,
|
||||
SelectMap,
|
||||
missionView,
|
||||
saveButton,
|
||||
},
|
||||
created () { },
|
||||
computed: {
|
||||
...mapGetters(["permission"]),
|
||||
option () {
|
||||
return {
|
||||
height: "auto",
|
||||
calcHeight: 40,
|
||||
align: "center",
|
||||
menuAlign: "center",
|
||||
tip: false,
|
||||
addBtn: false,
|
||||
viewBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
excelBtn: false,
|
||||
columnBtn: false,
|
||||
searchBtn: false,
|
||||
searchShow: false,
|
||||
labelWidth: 100,
|
||||
border: true,
|
||||
index: false,
|
||||
selection: false,
|
||||
dialogType: "drawer",
|
||||
dialogWidth: "60%",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "任务名称",
|
||||
prop: "missionTitle",
|
||||
slot: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "任务编码",
|
||||
prop: "missionNo",
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "开始时间",
|
||||
prop: "stime",
|
||||
display: false,
|
||||
width: 130,
|
||||
slot:true
|
||||
},
|
||||
{
|
||||
label: "完成时间",
|
||||
prop: "etime",
|
||||
display: false,
|
||||
width: 130,
|
||||
slot:true
|
||||
},
|
||||
// {
|
||||
// label: "任务时间",
|
||||
// prop: "missionDate",
|
||||
// slot: true,
|
||||
// display: false,
|
||||
// width: 200,
|
||||
// },
|
||||
{
|
||||
label: "报名人数",
|
||||
prop: "signUpCount",
|
||||
slot: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "录用人数",
|
||||
prop: "takeOnCount",
|
||||
slot: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
prop: "remarks",
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
format (date) {
|
||||
if (date) {
|
||||
return dateFormat(new Date(date), "yyyy/MM/dd");
|
||||
}
|
||||
},
|
||||
/*查看*/
|
||||
rowView (row) {
|
||||
detail(row.missionNo).then((res) => {
|
||||
this.viewDrawer = true;
|
||||
this.view = res;
|
||||
});
|
||||
},
|
||||
/*打开新建 复制*/
|
||||
rowCopy (row, type) {
|
||||
this.$refs.copy.onLoad(row, type);
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.copy.resetFields();//等弹窗里的form表单的dom渲染完在执行this.$refs.staffForm.resetFields(),去除验证
|
||||
})
|
||||
},
|
||||
/*删除任务*/
|
||||
rowDel (row) {
|
||||
const h = this.$createElement;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h("p", { style: "font-size: 16px" }, "您确定要删除此任务吗? "),
|
||||
h("p", { style: "color: red" }, "一旦删除则无法找回"),
|
||||
]),
|
||||
{
|
||||
type: "warning",
|
||||
showClose: false,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === "confirm") {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.cancelButtonLoading = true;
|
||||
instance.closeOnPressEscape = false;
|
||||
instance.closeOnClickModal = false;
|
||||
setTimeout(() => {
|
||||
done();
|
||||
setTimeout(() => {
|
||||
instance.confirmButtonLoading = false;
|
||||
instance.cancelButtonLoading = false;
|
||||
}, 300);
|
||||
}, 1000);
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
remove(row.id).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消'
|
||||
// });
|
||||
});
|
||||
},
|
||||
currentChange (currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange (pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange () {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
/*加载数据*/
|
||||
onLoad (page, params = {}) {
|
||||
this.loading = true;
|
||||
getExpiredList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/*返回首页*/
|
||||
backIndex () {
|
||||
this.$emit("refresh");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-col,
|
||||
.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,334 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<avue-crud
|
||||
:option="option"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
ref="crud"
|
||||
v-model="obj"
|
||||
@row-del="rowDel"
|
||||
@row-update="rowUpdate"
|
||||
@row-save="rowSave"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<!--自定义列-->
|
||||
<template slot="missionTitle" slot-scope="{ row }">
|
||||
<el-tooltip effect="dark" :content="row.missionTitle" placement="top">
|
||||
<div style="color: black">
|
||||
<b>{{ row.missionTitle | ellipsis }}</b>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template slot="takeOnCount" slot-scope="{ row }">
|
||||
<div style="color: #409eff;cursor: pointer;" @click="employmentNum(row)">
|
||||
<b>{{ row.takeOnCount }}人</b>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 开始日期 -->
|
||||
<template slot="stime" slot-scope="{row}">
|
||||
<span>{{format(row.stime)}}</span>
|
||||
</template>
|
||||
<!-- 完成日期 -->
|
||||
<template slot="etime" slot-scope="{row}">
|
||||
<span>{{format(row.etime)}}</span>
|
||||
</template>
|
||||
<template slot="toPayEnd" slot-scope="{ row }">
|
||||
<div v-if="row.toPayEnd < 0" style="color: #f56c6c">
|
||||
<i class="el-icon-warning-outline"></i>
|
||||
<span>已逾期,不再提供支付服务</span>
|
||||
</div>
|
||||
<div v-if="row.toPayEnd >= 0">
|
||||
<i class="el-icon-warning-outline"></i> 距工资结算剩余
|
||||
<span style="color: #f56c6c">
|
||||
<b>{{ row.toPayEnd }}天</b>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="payCount" slot-scope="{ row }">
|
||||
<div style="">
|
||||
<span>{{ row.payCount }}人</span>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="missionDate" slot-scope="{ row }">
|
||||
<div>{{ format(row.stime) }}至{{ format(row.etime) }}</div>
|
||||
</template>
|
||||
<template slot="expiryTime" slot-scope="{ row }">
|
||||
<div>{{ format(row.expiryTime) }}</div>
|
||||
</template>
|
||||
<!--/自定义列-->
|
||||
<!--自定义按钮-->
|
||||
<template slot="menuLeft">
|
||||
<save-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="small"
|
||||
@click="rowCopy('', 'add')"
|
||||
v-show="vaildData(permission.tenant_mission_add, false)"
|
||||
>发布任务</save-button>
|
||||
</template>
|
||||
<!--/自定义按钮-->
|
||||
<!--自定义操作栏-->
|
||||
<div slot="menu" slot-scope="{ size, type, row }">
|
||||
<el-button
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="appraise(row)"
|
||||
v-show="vaildData(permission.tenant_mission_appraise,false)"
|
||||
>评价</el-button>
|
||||
<!-- <el-button
|
||||
icon="el-icon-view"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="rowView(row);"
|
||||
v-show="vaildData(permission.tenant_mission_view,false)"
|
||||
>查看</el-button>-->
|
||||
<el-button
|
||||
icon="el-icon-check"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="rowCopy(row, 'copy')"
|
||||
v-show="vaildData(permission.tenant_mission_add, false)"
|
||||
>复制</el-button>
|
||||
</div>
|
||||
<!--/自定义操作栏-->
|
||||
</avue-crud>
|
||||
<!--复制dialog-->
|
||||
<copy-mission ref="copy" @back="backIndex" v-show="false"></copy-mission>
|
||||
<!--/复制dialog-->
|
||||
<!--评价dialog-->
|
||||
<Appraise ref="appraise" v-show="false"></Appraise>
|
||||
<!--评价dialog-->
|
||||
<!--录用人员dialog-->
|
||||
<Employ ref="employ" :status="status" v-show="false"></Employ>
|
||||
<employment-num ref="employmentNumber" :status="1" v-show="false"></employment-num>
|
||||
<!--查看dialog-->
|
||||
<mission-view :visible.sync="viewDrawer" :model="view"></mission-view>
|
||||
<!--/查看dialog-->
|
||||
<!--录用人员dialog-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList, detail, getWagePerson } from "@/api/tenant/mission";
|
||||
import CopyMission from "../Dialog/CopyMission";
|
||||
import Appraise from "../Dialog/Appraise";
|
||||
import Employ from "../Dialog/Employ";
|
||||
import SkillSelect from "../Dialog/Skill";
|
||||
import missionView from "./missionView.vue";
|
||||
import employmentNum from "../Dialog/EmployNumber";
|
||||
import SelectMap from "@/components/map/selectLocation";
|
||||
import { mapGetters } from "vuex";
|
||||
import { dateFormat } from "@/util/date";
|
||||
import saveButton from "./saveButton";
|
||||
|
||||
export default {
|
||||
filters: {
|
||||
ellipsis (value) {
|
||||
if (!value) return "";
|
||||
if (value.length > 15) {
|
||||
return value.slice(0, 14) + "...";
|
||||
}
|
||||
return value;
|
||||
},
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
viewDrawer: false,
|
||||
view: {},
|
||||
status: 3,
|
||||
loading: false,
|
||||
page: {
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
query: {
|
||||
status: 3,
|
||||
},
|
||||
data: [],
|
||||
obj: {},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
CopyMission,
|
||||
Appraise,
|
||||
Employ,
|
||||
SkillSelect,
|
||||
SelectMap,
|
||||
missionView,
|
||||
saveButton,
|
||||
employmentNum
|
||||
},
|
||||
created () { },
|
||||
computed: {
|
||||
...mapGetters(["permission"]),
|
||||
option () {
|
||||
return {
|
||||
height: "auto",
|
||||
calcHeight: 40,
|
||||
align: "center",
|
||||
menuAlign: "center",
|
||||
tip: false,
|
||||
addBtn: false,
|
||||
viewBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
excelBtn: false,
|
||||
columnBtn: false,
|
||||
searchBtn: false,
|
||||
searchShow: false,
|
||||
labelWidth: 100,
|
||||
border: true,
|
||||
index: false,
|
||||
selection: false,
|
||||
dialogType: "drawer",
|
||||
dialogWidth: "60%",
|
||||
delBtnText: "取消",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "任务名称",
|
||||
prop: "missionTitle",
|
||||
display: false,
|
||||
slot: true,
|
||||
},
|
||||
{
|
||||
label: "任务编码",
|
||||
prop: "missionNo",
|
||||
display: false,
|
||||
},
|
||||
// {
|
||||
// label: "任务时间",
|
||||
// prop: "missionDate",
|
||||
// slot: true,
|
||||
// display: false,
|
||||
// width: 200,
|
||||
// },
|
||||
{
|
||||
label: "开始日期",
|
||||
prop: "stime",
|
||||
display: false,
|
||||
width: 130,
|
||||
slot:true
|
||||
},
|
||||
{
|
||||
label: "完成日期",
|
||||
prop: "etime",
|
||||
display: false,
|
||||
width: 130,
|
||||
slot:true
|
||||
},
|
||||
{
|
||||
label: "录用人数",
|
||||
prop: "takeOnCount",
|
||||
slot: true,
|
||||
display: false,
|
||||
width: 130,
|
||||
},
|
||||
{
|
||||
label: "已发工资人数",
|
||||
prop: "payCount",
|
||||
slot: true,
|
||||
display: false,
|
||||
width: 130,
|
||||
},
|
||||
{
|
||||
label: "发工资截止日期",
|
||||
prop: "expiryTime",
|
||||
slot: true,
|
||||
display: false,
|
||||
width: 160,
|
||||
format: "yyyy-MM-dd",
|
||||
},
|
||||
{
|
||||
label: "提示",
|
||||
prop: "toPayEnd",
|
||||
slot: true,
|
||||
display: false,
|
||||
width: 200,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
format (date) {
|
||||
if (date) {
|
||||
return dateFormat(new Date(date), "yyyy/MM/dd");
|
||||
}
|
||||
},
|
||||
// 录用人数
|
||||
employmentNum(row){
|
||||
this.$refs.employmentNumber.openDialog(row, 2);//查看已录用人员
|
||||
},
|
||||
/*查看*/
|
||||
rowView (row) {
|
||||
detail(row.missionNo).then((res) => {
|
||||
this.viewDrawer = true;
|
||||
this.view = res;
|
||||
});
|
||||
},
|
||||
/*打开录用人员*/
|
||||
employ (row, state) {
|
||||
this.$refs.employ.openDialog(row, state);
|
||||
},
|
||||
/*打开复制*/
|
||||
rowCopy (row, type) {
|
||||
this.$refs.copy.onLoad(row, type);
|
||||
},
|
||||
/*打开评价*/
|
||||
appraise (row) {
|
||||
this.$refs.appraise.openDialog(row);
|
||||
},
|
||||
currentChange (currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange (pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange () {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
/*加载数据*/
|
||||
onLoad (page, params = {}) {
|
||||
this.loading = true;
|
||||
getList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
let data1 = data.records;
|
||||
if (data1.length > 0) {
|
||||
for (let i = 0; i < data1.length; i++) {
|
||||
getWagePerson(data1[i].missionNo).then((res) => {
|
||||
data1[i]["payCount"] = res.data.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
this.data = data1;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/*返回首页*/
|
||||
backIndex () {
|
||||
this.$emit("refresh");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-col,
|
||||
.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,354 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<avue-crud
|
||||
:option="option"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
v-model="obj"
|
||||
ref="crud"
|
||||
@row-del="rowDel"
|
||||
@row-update="rowUpdate"
|
||||
@row-save="rowSave"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<!--自定义列-->
|
||||
<template slot="missionTitle" slot-scope="{ row }">
|
||||
<el-tooltip effect="dark" :content="row.missionTitle" placement="top">
|
||||
<div style="color: black">
|
||||
<b>{{ row.missionTitle | ellipsis }}</b>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<!-- 开始日期 -->
|
||||
<template slot="stime" slot-scope="{row}">
|
||||
<span>{{format(row.stime)}}</span>
|
||||
</template>
|
||||
<!-- 完成日期 -->
|
||||
<template slot="etime" slot-scope="{row}">
|
||||
<span>{{format(row.etime)}}</span>
|
||||
</template>
|
||||
<template slot="takeOnCount" slot-scope="{ row }">
|
||||
<div style="color: #409eff; cursor: pointer;" @click="employmentNum(row)">
|
||||
<b>{{ row.takeOnCount }}人</b>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="toEnd" slot-scope="{ row }">
|
||||
<div>
|
||||
<i class="el-icon-warning-outline"></i> 距任务结束剩余
|
||||
<span style="color: #f56c6c">
|
||||
<b>{{ row.toEnd }}天</b>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="missionDate" slot-scope="{ row }">
|
||||
<div>{{ format(row.stime) }}至{{ format(row.etime) }}</div>
|
||||
</template>
|
||||
|
||||
<!--/自定义列-->
|
||||
<!--自定义按钮-->
|
||||
<template slot="menuLeft">
|
||||
<save-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="small"
|
||||
@click="rowCopy('', 'add')"
|
||||
v-show="vaildData(permission.tenant_mission_add, false)"
|
||||
>发布任务</save-button
|
||||
>
|
||||
</template>
|
||||
<!--/自定义按钮-->
|
||||
<!--自定义操作栏-->
|
||||
<div slot="menu" slot-scope="{ size, type, row }">
|
||||
<save-button
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="rowComplete(row)"
|
||||
v-show="vaildData(permission.tenant_mission_finish, false)"
|
||||
>完成任务</save-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="rowView(row)"
|
||||
v-show="vaildData(permission.tenant_mission_view, false)"
|
||||
>查看</el-button
|
||||
>
|
||||
<save-button
|
||||
icon="el-icon-check"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="rowCopy(row, 'copy')"
|
||||
v-show="vaildData(permission.tenant_mission_add, false)"
|
||||
>复制</save-button
|
||||
>
|
||||
</div>
|
||||
<!--/自定义操作栏-->
|
||||
</avue-crud>
|
||||
<!--复制dialog-->
|
||||
<copy-mission ref="copy" @back="backIndex" v-show="false"></copy-mission>
|
||||
<!--复制dialog-->
|
||||
<!--录用人员dialog-->
|
||||
<Employ ref="employ" :status="status" v-show="false"></Employ>
|
||||
<!-- 录用人数 -->
|
||||
<employment-num
|
||||
ref="employmentNum"
|
||||
:status="1"
|
||||
v-show="false"
|
||||
></employment-num>
|
||||
<!--录用人员dialog-->
|
||||
<!--查看dialog-->
|
||||
<mission-view :visible.sync="viewDrawer" :model="view"></mission-view>
|
||||
<!--/查看dialog-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList, complete, detail } from "@/api/tenant/mission";
|
||||
import CopyMission from "../Dialog/CopyMission";
|
||||
import SkillSelect from "../Dialog/Skill";
|
||||
import Employ from "../Dialog/Employ";
|
||||
import missionView from "./missionView.vue";
|
||||
import SelectMap from "@/components/map/selectLocation";
|
||||
import employmentNum from "../Dialog/EmployNumber";
|
||||
import { mapGetters } from "vuex";
|
||||
import { dateFormat } from "@/util/date";
|
||||
import saveButton from "./saveButton";
|
||||
|
||||
export default {
|
||||
comments: {
|
||||
|
||||
},
|
||||
filters: {
|
||||
ellipsis(value) {
|
||||
if (!value) return "";
|
||||
if (value.length > 15) {
|
||||
return value.slice(0, 14) + "...";
|
||||
}
|
||||
return value;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewDrawer: false,
|
||||
view: {},
|
||||
status: 2,
|
||||
loading: false,
|
||||
page: {
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
query: {
|
||||
status: 2,
|
||||
},
|
||||
data: [],
|
||||
obj: {},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
CopyMission,
|
||||
SkillSelect,
|
||||
Employ,
|
||||
SelectMap,
|
||||
missionView,
|
||||
saveButton,
|
||||
employmentNum
|
||||
},
|
||||
created() {},
|
||||
computed: {
|
||||
...mapGetters(["permission"]),
|
||||
option() {
|
||||
return {
|
||||
height: "auto",
|
||||
calcHeight: 40,
|
||||
align: "center",
|
||||
menuAlign: "center",
|
||||
tip: false,
|
||||
addBtn: false,
|
||||
viewBtn: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
excelBtn: false,
|
||||
columnBtn: false,
|
||||
searchBtn: false,
|
||||
searchShow: false,
|
||||
labelWidth: 100,
|
||||
border: true,
|
||||
index: false,
|
||||
selection: false,
|
||||
dialogType: "drawer",
|
||||
dialogWidth: "60%",
|
||||
delBtnText: "取消",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "任务名称",
|
||||
prop: "missionTitle",
|
||||
display: false,
|
||||
slot: true,
|
||||
},
|
||||
{
|
||||
label: "任务编码",
|
||||
prop: "missionNo",
|
||||
display: false,
|
||||
},
|
||||
// {
|
||||
// label: "任务时间",
|
||||
// prop: "missionDate",
|
||||
// slot: true,
|
||||
// display: false,
|
||||
// width: 200,
|
||||
// },
|
||||
{
|
||||
label: "开始时间",
|
||||
prop: "stime",
|
||||
display: false,
|
||||
width: 130,
|
||||
slot: true,
|
||||
},
|
||||
{
|
||||
label: "完成时间",
|
||||
prop: "etime",
|
||||
display: false,
|
||||
width: 130,
|
||||
slot: true,
|
||||
},
|
||||
{
|
||||
label: "录用人数",
|
||||
prop: "takeOnCount",
|
||||
slot: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "提示",
|
||||
prop: "toEnd",
|
||||
slot: true,
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
format(date) {
|
||||
if (date) {
|
||||
return dateFormat(new Date(date), "yyyy/MM/dd");
|
||||
}
|
||||
},
|
||||
// 录用人数
|
||||
employmentNum(row){
|
||||
this.$refs.employmentNum.openDialog(row, 2);//查看已录用人员
|
||||
},
|
||||
/*查看*/
|
||||
rowView(row) {
|
||||
detail(row.missionNo).then((res) => {
|
||||
this.viewDrawer = true;
|
||||
this.view = res;
|
||||
});
|
||||
},
|
||||
/*打开复制*/
|
||||
rowCopy(row, type) {
|
||||
this.$refs.copy.onLoad(row, type);
|
||||
},
|
||||
/*打开录用人员*/
|
||||
employ(row, state) {
|
||||
this.$refs.employ.openDialog(row, state);
|
||||
},
|
||||
/*完成任务*/
|
||||
rowComplete(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(() => {
|
||||
complete(row.id).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消'
|
||||
// });
|
||||
});
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
/*加载数据*/
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
getList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/*返回首页*/
|
||||
backIndex() {
|
||||
this.$emit("refresh");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-col,
|
||||
.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,420 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<avue-crud
|
||||
:option="option"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
ref="crud"
|
||||
v-model="obj"
|
||||
@row-del="rowDel"
|
||||
@row-update="rowUpdate"
|
||||
@row-save="rowSave"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<!--自定义按钮-->
|
||||
<template slot="menuLeft">
|
||||
<save-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="small"
|
||||
@click="rowCopy('', 'add')"
|
||||
v-show="vaildData(permission.tenant_mission_add, false)"
|
||||
>发布任务</save-button
|
||||
>
|
||||
</template>
|
||||
<!--/自定义按钮-->
|
||||
<!--自定义列-->
|
||||
<template slot="missionTitle" slot-scope="{ row }">
|
||||
<el-tooltip effect="dark" :content="row.missionTitle" placement="top">
|
||||
<div style="color: black">
|
||||
<b>{{ row.missionTitle | ellipsis }}</b>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template slot="signUpCount" slot-scope="{ row }">
|
||||
<div>
|
||||
<span>{{ row.signUpCount }}人</span>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 报名截止日期 -->
|
||||
<template slot="etimePub" slot-scope="{row}">
|
||||
<span>{{format(row.etimePub)}}</span>
|
||||
</template>
|
||||
<!-- 开始日期 -->
|
||||
<template slot="stime" slot-scope="{row}">
|
||||
<span>{{format(row.stime)}}</span>
|
||||
</template>
|
||||
<!-- 完成日期 -->
|
||||
<template slot="etime" slot-scope="{row}">
|
||||
<span>{{format(row.etime)}}</span>
|
||||
</template>
|
||||
<template slot="takeOnCount" slot-scope="{ row }">
|
||||
<div style="color: #409eff;cursor: pointer;" @click="employmentNum(row)">
|
||||
<b>{{ row.takeOnCount }}人</b>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="toStart" slot-scope="{ row }">
|
||||
<div>
|
||||
<i class="el-icon-warning-outline"></i> 距任务开始剩余
|
||||
<span style="color: #f56c6c">
|
||||
<b>{{ row.toStart }}天</b>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<!--/自定义列-->
|
||||
<!--自定义操作栏-->
|
||||
<div slot="menu" slot-scope="{ size, type, row }">
|
||||
<el-button type="text" size="mini" @click="recommend(row)"
|
||||
>人才推荐</el-button
|
||||
>
|
||||
<el-button type="text" size="mini" @click="employ(row, 1)"
|
||||
>录用人员</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click.stop="rowView(row)"
|
||||
v-show="vaildData(permission.tenant_mission_view, false)"
|
||||
>查看</el-button
|
||||
>
|
||||
<save-button
|
||||
icon="el-icon-check"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="rowCopy(row, 'copy')"
|
||||
>复制</save-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-edit"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="rowCopy(row, 'edit')"
|
||||
:disabled="row.signUpCount !== 0"
|
||||
v-show="vaildData(permission.tenant_mission_edit, false)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-delete"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="$refs.crud.rowDel(row)"
|
||||
:disabled="row.signUpCount !== 0"
|
||||
v-show="vaildData(permission.tenant_mission_cancel, false)"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button type="text" size="mini" @click="contrast(row)"
|
||||
>比对人才库</el-button>
|
||||
</div>
|
||||
</avue-crud>
|
||||
<!--发布 复制 编辑dialog-->
|
||||
<copy-mission ref="copy" @back="backIndex" v-show="false"></copy-mission>
|
||||
<!--/发布 复制 编辑dialog-->
|
||||
<!--录用人员dialog-->
|
||||
<Employ
|
||||
ref="employ"
|
||||
@refresh="refreshChange"
|
||||
:status="status"
|
||||
v-show="false"
|
||||
></Employ>
|
||||
<employment-num
|
||||
ref="employmentNum"
|
||||
:status="1"
|
||||
v-show="false"
|
||||
></employment-num>
|
||||
<!--/录用人员dialog-->
|
||||
<!--人才推荐dialog-->
|
||||
<Recommend ref="recommend" v-show="false"></Recommend>
|
||||
<!--/人才推荐dialog-->
|
||||
<!--对比人才库dialog-->
|
||||
<Contrast ref="contrast" v-show="false"></Contrast>
|
||||
<!--对比人才库dialog-->
|
||||
<!--查看dialog-->
|
||||
<mission-view :visible.sync="viewDrawer" :model="view"></mission-view>
|
||||
<!--/查看dialog-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList, cancel, detail } from "@/api/tenant/mission";
|
||||
import CopyMission from "../Dialog/CopyMission";
|
||||
import Employ from "../Dialog/Employ";
|
||||
import employmentNum from "../Dialog/EmployNumber";
|
||||
import Recommend from "../Dialog/Recommend";
|
||||
import Contrast from "../Dialog/Contrast"
|
||||
import SkillSelect from "../Dialog/Skill";
|
||||
import missionView from "./missionView.vue";
|
||||
import SelectMap from "@/components/map/selectLocation";
|
||||
import { mapGetters } from "vuex";
|
||||
import { dateFormat } from "@/util/date";
|
||||
import saveButton from "./saveButton";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CopyMission,
|
||||
Employ,
|
||||
Recommend,
|
||||
SkillSelect,
|
||||
SelectMap,
|
||||
missionView,
|
||||
saveButton,
|
||||
Contrast,
|
||||
employmentNum
|
||||
},
|
||||
filters: {
|
||||
ellipsis(value) {
|
||||
if (!value) return "";
|
||||
if (value.length > 15) {
|
||||
return value.slice(0, 14) + "...";
|
||||
}
|
||||
return value;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: 1,
|
||||
viewDrawer: false,
|
||||
view: {},
|
||||
loading: false,
|
||||
tradeData: [],
|
||||
tradeId: "",
|
||||
page: {
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
query: {
|
||||
status: 1,
|
||||
},
|
||||
data: [],
|
||||
obj: {},
|
||||
missionNo:'',
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
watch: {},
|
||||
computed: {
|
||||
...mapGetters(["permission"]),
|
||||
/*计算时间*/
|
||||
option() {
|
||||
return {
|
||||
height: "auto",
|
||||
calcHeight: 40,
|
||||
menuWidth: 420,
|
||||
align: "center",
|
||||
menuAlign: "center",
|
||||
tip: false,
|
||||
addBtn: false,
|
||||
viewBtn: false,
|
||||
delBtn: false,
|
||||
editBtn: false,
|
||||
excelBtn: false,
|
||||
columnBtn: false,
|
||||
searchBtn: false,
|
||||
searchShow: false,
|
||||
border: true,
|
||||
index: false,
|
||||
selection: false,
|
||||
dialogType: "drawer",
|
||||
dialogWidth: "60%",
|
||||
delBtnText: "取消",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "任务名称",
|
||||
prop: "missionTitle",
|
||||
display: false,
|
||||
slot: true,
|
||||
},
|
||||
{
|
||||
label: "任务编码",
|
||||
prop: "missionNo",
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "报名截止日期",
|
||||
prop: "etimePub",
|
||||
display: false,
|
||||
format: "yyyy-MM-dd",
|
||||
width: 130,
|
||||
slot: true,
|
||||
},
|
||||
{
|
||||
label: "开始日期",
|
||||
prop: "stime",
|
||||
display: false,
|
||||
width: 130,
|
||||
slot: true,
|
||||
},
|
||||
{
|
||||
label: "完成日期",
|
||||
prop: "etime",
|
||||
display: false,
|
||||
width: 130,
|
||||
slot: true,
|
||||
},
|
||||
{
|
||||
label: "报名人数",
|
||||
prop: "signUpCount",
|
||||
slot: true,
|
||||
display: false,
|
||||
width: 110,
|
||||
},
|
||||
{
|
||||
label: "录用人数",
|
||||
prop: "takeOnCount",
|
||||
slot: true,
|
||||
display: false,
|
||||
width: 110,
|
||||
},
|
||||
|
||||
{
|
||||
label: "提示",
|
||||
prop: "toStart",
|
||||
slot: true,
|
||||
display: false,
|
||||
width: 200,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
format(date) {
|
||||
if (date) {
|
||||
return dateFormat(new Date(date), "yyyy/MM/dd");
|
||||
}
|
||||
},
|
||||
// 录用人数
|
||||
employmentNum(row){
|
||||
this.$refs.employmentNum.openDialog(row, 2);//查看已录用人员
|
||||
},
|
||||
/*打开新增 复制 编辑*/
|
||||
rowCopy(row, type) {
|
||||
this.$refs.copy.onLoad(row, type);
|
||||
},
|
||||
/*查看*/
|
||||
rowView(row) {
|
||||
detail(row.missionNo).then((res) => {
|
||||
this.viewDrawer = true;
|
||||
this.view = res;
|
||||
});
|
||||
},
|
||||
/*打开录用人员*/
|
||||
employ(row, status) {
|
||||
this.$refs.employ.openDialog(row, status);
|
||||
},
|
||||
/*打开人才推荐*/
|
||||
recommend(row) {
|
||||
this.$refs.recommend.openDialog(row);
|
||||
},
|
||||
/*打开对比人才库*/
|
||||
contrast(row){
|
||||
this.$refs.contrast.openDialog(row);
|
||||
},
|
||||
/*取消任务*/
|
||||
rowDel(row) {
|
||||
const h = this.$createElement;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h("p", { style: "font-size: 16px" }, "您确定要取消此任务吗? "),
|
||||
h("p", { style: "color: red" }, "一旦取消则任务失效"),
|
||||
]),
|
||||
{
|
||||
type: "warning",
|
||||
showClose: false,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === "confirm") {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.cancelButtonLoading = true;
|
||||
instance.closeOnPressEscape = false;
|
||||
instance.closeOnClickModal = false;
|
||||
setTimeout(() => {
|
||||
done();
|
||||
setTimeout(() => {
|
||||
instance.confirmButtonLoading = false;
|
||||
instance.cancelButtonLoading = false;
|
||||
}, 300);
|
||||
}, 1000);
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
cancel(row.id).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消'
|
||||
// });
|
||||
});
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
/*加载数据*/
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
getList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/*返回首页*/
|
||||
backIndex() {
|
||||
this.$emit("refresh");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-col,
|
||||
.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.map {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.slotForm {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,35 +0,0 @@
|
||||
<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>
|
||||
@@ -1,38 +0,0 @@
|
||||
<template>
|
||||
<el-button
|
||||
:plain="plain"
|
||||
:icon="icon"
|
||||
:size="size"
|
||||
:type="type"
|
||||
@click="click"
|
||||
:disabled="disabled"
|
||||
><slot></slot
|
||||
></el-button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
plain: Boolean,
|
||||
icon: String,
|
||||
size: String,
|
||||
type: String,
|
||||
disabled: Boolean,
|
||||
action: String,
|
||||
data: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
this.$emit("click", { row: this.row, action: this.action });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -1,249 +0,0 @@
|
||||
<template>
|
||||
<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-width="0">
|
||||
<!-- <el-select v-model="search.status" placeholder="任务状态" style="width:100%">
|
||||
<el-option
|
||||
v-for="(item,key,index) in missionTypes"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>-->
|
||||
<el-radio-group v-model="search.status" size="small">
|
||||
<el-radio-button v-for="(item,key,index) in missionTypes" :key="index" :label="item.value">{{item.label}}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="任务编号:">
|
||||
<el-input v-model="search.missionNo" placeholder="任务编号" clearable></el-input>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="任务名称:">
|
||||
<el-input v-model="search.missionTitle" placeholder="任务名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="">
|
||||
<el-select v-model="search.state" placeholder="请选择搜索时间类型" style="width: 100%" @change="date">
|
||||
<el-option
|
||||
v-for="(item, key, index) in timeScreenTerm"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="">
|
||||
<el-date-picker
|
||||
:disabled="!search.state"
|
||||
v-model="timeValue"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="dateChange">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<tool-tip ></tool-tip>
|
||||
|
||||
|
||||
<!-- <el-form-item label="报名截止时间:">-->
|
||||
<!-- <el-date-picker v-model="endDateRange" type="daterange" range-separator="至" start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" @change="endDateChange">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="开始时间:">-->
|
||||
<!-- <el-date-picker v-model="beginTimeValue" type="daterange" range-separator="至" start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" @change="beginDateChange">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="完成时间:">-->
|
||||
<!-- <el-date-picker v-model="successTimeValue" type="daterange" range-separator="至" start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" @change="successDateChange">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<div class="searchBtn">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="handleSearch">搜 索</el-button>
|
||||
<el-button size="small" icon="el-icon-delete" @click="handleClear">清 空</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!--/搜索栏-->
|
||||
<waiting-mission ref="waiting" v-if="search.status === 1" @refresh="handleClear"></waiting-mission>
|
||||
<ongoing-mission ref="onging" v-if="search.status === 2" @refresh="handleClear"></ongoing-mission>
|
||||
<finished-mission ref="finished" v-if="search.status === 3" @refresh="handleClear"></finished-mission>
|
||||
<expired-mission ref="expired" v-if="search.status === 4" @refresh="handleClear"></expired-mission>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import WaitingMission from './Table/WaitingMission'
|
||||
import OngoingMission from './Table/OngoingMission'
|
||||
import FinishedMission from './Table/FinishedMission'
|
||||
import ExpiredMission from './Table/ExpiredMission'
|
||||
import { companyMissionState } from '@/common/dic'
|
||||
|
||||
// import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
comments: {
|
||||
|
||||
},
|
||||
name: "tenant_mission",
|
||||
data() {
|
||||
return {
|
||||
missionTypes: companyMissionState,
|
||||
timeValue: "",
|
||||
endDateRange: "",//报名截止日期筛选
|
||||
beginTimeValue:"",//开始时间筛选
|
||||
successTimeValue:"",//完成时间筛选
|
||||
page: {
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
search: {
|
||||
status: 1
|
||||
},
|
||||
timeScreenTerm:[{
|
||||
value: 1,
|
||||
label: '报名截止日期',
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '开始日期',
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: '完成日期',
|
||||
}],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
WaitingMission,
|
||||
OngoingMission,
|
||||
FinishedMission,
|
||||
ExpiredMission
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
methods: {
|
||||
handleSearch() {
|
||||
if (this.search.status === 1) {
|
||||
this.$refs.waiting.onLoad(this.page, this.search);
|
||||
} else if (this.search.status === 2) {
|
||||
this.$refs.onging.onLoad(this.page, this.search);
|
||||
} else if (this.search.status === 3) {
|
||||
this.$refs.finished.onLoad(this.page, this.search);
|
||||
} else if (this.search.status === 4) {
|
||||
this.$refs.expired.onLoad(this.page, this.search);
|
||||
}
|
||||
},
|
||||
date () {
|
||||
this.dateChange(this.timeValue)
|
||||
},
|
||||
dateChange(val) {
|
||||
// if (val) {
|
||||
// this.search.stime = val[0] + " 00:00:00";
|
||||
// this.search.etime = val[1] + " 23:59:59";
|
||||
// } else {
|
||||
// this.search.stime = '';
|
||||
// this.search.etime = '';
|
||||
// }
|
||||
switch (this.search.state) {
|
||||
case 1:
|
||||
return this.endDateChange(val)
|
||||
case 2:
|
||||
return this.beginDateChange(val);
|
||||
case 3:
|
||||
return this.successDateChange(val);
|
||||
}
|
||||
|
||||
},
|
||||
handleClear() {
|
||||
let curStatus = this.search.status;
|
||||
this.search = {
|
||||
status: curStatus,
|
||||
missionNo: '',
|
||||
missionTitle: '',
|
||||
stime: '',
|
||||
etime: '',
|
||||
etimePubBeginTime: '',
|
||||
etimePubEndTime: '',
|
||||
stimeBeginTime : '',
|
||||
stimeEndTime : '',
|
||||
etimeBeninTime:'',
|
||||
etimeEndTime:'',
|
||||
|
||||
}
|
||||
this.timeValue = '';
|
||||
this.endDateRange = '';
|
||||
this.beginTimeValue="";
|
||||
this.successTimeValue="";
|
||||
this.handleSearch()
|
||||
},
|
||||
// 开始时间
|
||||
beginDateChange(val) {
|
||||
if (val) {
|
||||
this.clearDateTime()
|
||||
this.search.stimeBeginTime = val[0] + " 00:00:00";
|
||||
this.search.stimeEndTime = val[1] + " 23:59:59";
|
||||
} else {
|
||||
this.search.stimeBeginTime = '';
|
||||
this.search.stimeEndTime = '';
|
||||
}
|
||||
},
|
||||
// 完成时间
|
||||
successDateChange(val){
|
||||
if (val) {
|
||||
this.clearDateTime()
|
||||
this.search.etimeBeninTime = val[0] + " 00:00:00";
|
||||
this.search.etimeEndTime = val[1] + " 23:59:59";
|
||||
} else {
|
||||
this.search.etimeBeninTime = '';
|
||||
this.search.etimeEndTime = '';
|
||||
}
|
||||
},
|
||||
// 报名截止时间
|
||||
endDateChange(val){
|
||||
if (val) {
|
||||
this.clearDateTime()
|
||||
this.search.etimePubBeginTime = val[0] + " 00:00:00";
|
||||
this.search.etimePubEndTime = val[1] + " 23:59:59";
|
||||
} else {
|
||||
this.search.etimePubBeginTime = '';
|
||||
this.search.etimePubEndTime = '';
|
||||
}
|
||||
},
|
||||
// 清楚多余时间参数
|
||||
clearDateTime(){
|
||||
this.search.etimePubBeginTime = '';
|
||||
this.search.etimePubEndTime = '';
|
||||
this.search.etimeBeninTime = '';
|
||||
this.search.etimeEndTime = '';
|
||||
this.search.stimeBeginTime = '';
|
||||
this.search.stimeEndTime = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form-item {
|
||||
margin-bottom: 18px !important;
|
||||
margin-right: 10px !important;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
display: inline-block;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,370 +0,0 @@
|
||||
<template>
|
||||
<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-input v-model="query.title" placeholder="消息标题" clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="消息类型:">
|
||||
<el-select v-model="query.category" placeholder="消息类型" style="width:100%" clearable>
|
||||
<el-option v-for="(item,key,index) in newsType" :key="index" :label="item.dictValue" :value="item.dictKey">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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-col> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!--搜索-->
|
||||
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
|
||||
:permission="permissionList" @row-del="rowDel" :page.sync="page" :before-open="beforeOpen"
|
||||
@search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
|
||||
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
|
||||
<template slot="menuLeft">
|
||||
<el-button type="primary" size="small" icon="el-icon-view" @click="handleRemarkRead">标记已读</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-delete" @click="handleDelete">批量删除</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row}" slot="category">
|
||||
<el-tag>{{row.categoryName}}</el-tag>
|
||||
</template>
|
||||
<template v-slot:contentLabel>
|
||||
<div></div>
|
||||
</template>
|
||||
<template v-slot:contentForm>
|
||||
<div v-html="form.content"></div>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getNotice, getNewsType } from "@/api/desk/notice";
|
||||
import { getList, remove, read } from "@/api/tenant/notice";
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
selectionList: [],
|
||||
page: {
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
query: {},
|
||||
data: [],
|
||||
form: {},
|
||||
newsType: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
getNewsType().then(res => {
|
||||
this.newsType = res.data.data;
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
loginType: (state) => state.user.userInfo.login_type,
|
||||
}),
|
||||
ids() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids;
|
||||
},
|
||||
option() {
|
||||
const self = this;
|
||||
return {
|
||||
height: "auto",
|
||||
calcHeight: 30,
|
||||
align: "center",
|
||||
menuAlign: "center",
|
||||
tip: false,
|
||||
addBtn: false,
|
||||
viewBtn: true,
|
||||
delBtn: true,
|
||||
editBtn: false,
|
||||
excelBtn: false,
|
||||
columnBtn: false,
|
||||
searchBtn: true,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
dialogType: "drawer",
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
selection: true,
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "消息标题",
|
||||
prop: "title",
|
||||
display: false,
|
||||
// search: true,
|
||||
},
|
||||
{
|
||||
label: "日期",
|
||||
prop: "releaseTime",
|
||||
type: "date",
|
||||
format: "yyyy年MM月dd日",
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "消息类型",
|
||||
type: "select",
|
||||
dicData: self.newsType,
|
||||
// dicUrl: "/api/jobslink-api/system/dict/dictionary?code=notice",
|
||||
// props: {
|
||||
// label: "dictValue",
|
||||
// value: "dictKey",
|
||||
// },
|
||||
// dataType: "number",
|
||||
display: false,
|
||||
slot: true,
|
||||
prop: "category",
|
||||
// search: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入通知类型",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "isRead",
|
||||
type: "select",
|
||||
display: false,
|
||||
dicData: [
|
||||
{
|
||||
value: 0,
|
||||
label: "未读",
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: "已读",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "通知内容",
|
||||
prop: "content",
|
||||
formslot: true,
|
||||
labelslot: true,
|
||||
hide: true,
|
||||
minRows: 6,
|
||||
labelWidth: 0,
|
||||
span: 24,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
/*删除消息*/
|
||||
rowDel(row) {
|
||||
const h = this.$createElement;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h("p", { style: "font-size: 16px" }, "您确定要删除此消息吗? "),
|
||||
h("p", { style: "color: red" }, "一旦删除则无法找回"),
|
||||
]),
|
||||
{
|
||||
type: "warning",
|
||||
showClose: false,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
return remove(row.id);
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.refreshChange();
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
/*批量删除消息*/
|
||||
handleDelete() {
|
||||
if (this.ids.length === 0) {
|
||||
this.$message.warning("请选择至少一条数据");
|
||||
return;
|
||||
}
|
||||
const h = this.$createElement;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h(
|
||||
"p",
|
||||
{ style: "font-size: 16px" },
|
||||
"您确定要批量删除选中的消息吗? "
|
||||
),
|
||||
]),
|
||||
{
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
return remove(this.ids.join(","));
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.refreshChange();
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
/*标记已读*/
|
||||
handleRemarkRead() {
|
||||
if (this.ids.length === 0) {
|
||||
this.$message.warning("请选择至少一条数据");
|
||||
return;
|
||||
}
|
||||
let idList = []
|
||||
const h = this.$createElement;
|
||||
for (let i = 0; i < this.ids.length; i++) {
|
||||
this.data.forEach(ele => {
|
||||
if (ele.isRead == 0 && ele.id == this.ids[i])
|
||||
idList.push(ele.id)
|
||||
})
|
||||
}
|
||||
if (idList.length == 0) {
|
||||
this.$message.error('所选消息为已读状态,请勿重复操作')
|
||||
}
|
||||
else {
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h(
|
||||
"p",
|
||||
{ style: "font-size: 16px" },
|
||||
"您确定要标记选中消息为已读吗? "
|
||||
),
|
||||
]),
|
||||
{
|
||||
type: "warning",
|
||||
showClose: false,
|
||||
showCancelButton: true,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
return read(idList.join(","));
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.refreshChange();
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, this.query);
|
||||
done();
|
||||
},
|
||||
searchReset1() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
searchChange1() {
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
beforeOpen(done, type) {
|
||||
if (["edit", "view"].includes(type)) {
|
||||
getNotice(this.form.id).then((res) => {
|
||||
const data = res.data.data;
|
||||
if (this.form.isRead === 0) {
|
||||
read(data.id).then(() => {
|
||||
this.$store.commit("NOTICE_READ");
|
||||
this.refreshChange();
|
||||
});
|
||||
}
|
||||
this.form = data;
|
||||
});
|
||||
}
|
||||
done();
|
||||
},
|
||||
selectionClear() {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
if (this.loginType === 'Type-S') {
|
||||
this.$store.dispatch("workGetUnreadCount");
|
||||
} else {
|
||||
this.$store.dispatch("getUnreadCount");
|
||||
}
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
/*加载数据*/
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
var userType = 3
|
||||
if (this.loginType === 'Type-T') {
|
||||
userType = 1
|
||||
} else if (this.loginType === 'Type-S') {
|
||||
userType = 3
|
||||
}
|
||||
getList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(params, this.query),
|
||||
userType
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
this.selectionClear();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form-item {
|
||||
margin-bottom: 18px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
display: inline-block;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,377 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<basic-container>
|
||||
<div class="rules-intro">
|
||||
<ul>
|
||||
<li class="intro-title">{{ rulePromptObj.title }}</li>
|
||||
<li class="intro">
|
||||
{{ rulePromptObj.intro }}
|
||||
</li>
|
||||
<li class="intro-recommend">
|
||||
温馨提示: {{ rulePromptObj.introRecommend }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick" class="rules-tabs">
|
||||
<el-tab-pane
|
||||
v-for="(item, index) in tabItemsList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:name="item.id"
|
||||
>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</basic-container>
|
||||
<div
|
||||
class="rules-second-type-items"
|
||||
v-show="secondTypeList.lenght != 0"
|
||||
ref="rulesSecondTabs"
|
||||
>
|
||||
<el-button
|
||||
plain
|
||||
v-for="(item, index) in secondTypeList"
|
||||
:key="index"
|
||||
@click="getRuleInfo(item.id)"
|
||||
class="rules-second-tabs"
|
||||
>{{ item.name }}</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="rules-items" v-if="ruleDetailList.length != 0">
|
||||
<div
|
||||
class="HR-document-container"
|
||||
v-for="(item, index) in ruleDetailList"
|
||||
:key="index"
|
||||
>
|
||||
<p class="HR-document-title">
|
||||
<span class="HR-title-icon">
|
||||
<img
|
||||
:src="item.iconUrl"
|
||||
alt=""
|
||||
srcset=""
|
||||
style="width: 40px; height: 40px"
|
||||
/>
|
||||
</span>
|
||||
<span class="HR-rules-name">{{ item.docName }}</span>
|
||||
</p>
|
||||
<p class="HR-document-cover">
|
||||
<span class="HR-cover-img">
|
||||
<img
|
||||
:src="item.docImage"
|
||||
alt=""
|
||||
srcset=""
|
||||
style="width: 100%; height: 185px;"
|
||||
/>
|
||||
</span>
|
||||
</p>
|
||||
<p class="HR-document-footer">
|
||||
<span style="border-right: 1px solid #d9dadd">
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="viewRuleInfo(item.docImage, item.docUrl)"
|
||||
>预览</el-button
|
||||
>
|
||||
</span>
|
||||
<span>
|
||||
<el-button type="text" size="mini" @click="downDoc(item.docUrl)"
|
||||
>下载</el-button
|
||||
>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="ruleDetailList.length == 0" class="rules-no-data">暂无文档</div>
|
||||
|
||||
<el-dialog
|
||||
title="预览文档"
|
||||
:visible.sync="viewDialogVisible"
|
||||
width="50%"
|
||||
append-to-body
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<img :src="imgUrl" alt="" srcset="" style="width: 100%; height: auto" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="viewDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="downDoc(docUrl)">下载全文</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--文档预览dialog-->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getRulesItem,
|
||||
ruleGetTypeList,
|
||||
ruleTypeDetail,
|
||||
} from "@/api/manage/rules";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeName: "",
|
||||
tabItemsList: [],
|
||||
secondTypeList: [],
|
||||
rulePromptObj: {},
|
||||
ruleDetailList: [],
|
||||
viewDialogVisible: false,
|
||||
docUrl: "", //预览界面的文件下载链接
|
||||
imgUrl: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getFirstTypeList();
|
||||
},
|
||||
watch: {
|
||||
/* activeName: {
|
||||
handler(val) {
|
||||
|
||||
},
|
||||
},*/
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
handleClick(tab) {
|
||||
this.ruleDetailList = [];
|
||||
this.rulePromptObj = {};
|
||||
ruleTypeDetail(tab.name) //获取一级分类下的介绍
|
||||
.then((res) => {
|
||||
const data = res.data.data;
|
||||
this.rulePromptObj.title = data.name;
|
||||
this.rulePromptObj.intro = data.introduce;
|
||||
this.rulePromptObj.introRecommend = data.prompt;
|
||||
})
|
||||
.then(
|
||||
ruleGetTypeList(tab.name).then((res) => {
|
||||
this.secondTypeList = res.data.data; //获取二级标签列表
|
||||
if (this.secondTypeList.length == 0) {
|
||||
/**如果没有二级标签,就展示一级标签下的数据 */
|
||||
this.$refs.rulesSecondTabs.style.display = "none";
|
||||
getRulesItem(tab.name).then((res) => {
|
||||
let iconUrl = "/manage/img/rules/";
|
||||
res.data.data.forEach((ele) => {
|
||||
ele["iconUrl"] = `${iconUrl}${ele["type"]}.png`;
|
||||
});
|
||||
this.ruleDetailList = res.data.data;
|
||||
});
|
||||
} else {
|
||||
this.$refs.rulesSecondTabs.style.display = "block";
|
||||
getRulesItem(this.secondTypeList[0]["id"]).then((res) => {
|
||||
/**有二级标签,默认展示第一个分类下的数据 */
|
||||
let iconUrl = "/manage/img/rules/";
|
||||
res.data.data.forEach((ele) => {
|
||||
ele["iconUrl"] = `${iconUrl}${ele["type"]}.png`;
|
||||
});
|
||||
this.ruleDetailList = res.data.data;
|
||||
});
|
||||
}
|
||||
})
|
||||
);
|
||||
},
|
||||
getFirstTypeList() {
|
||||
//刚加载进来的页面,获取数据
|
||||
this.tabItemsList = [];
|
||||
ruleGetTypeList(0).then((res) => {
|
||||
//获取tab栏数据
|
||||
if (res.data.data.length != 0) {
|
||||
this.tabItemsList = res.data.data;
|
||||
this.activeName = this.tabItemsList[0]["id"];
|
||||
let val = this.tabItemsList[0]["id"];
|
||||
ruleTypeDetail(val)
|
||||
.then((res) => {
|
||||
const data = res.data.data; //获取一级标签下的介绍内容
|
||||
this.rulePromptObj.title = data.name;
|
||||
this.rulePromptObj.intro = data.introduce;
|
||||
this.rulePromptObj.introRecommend = data.prompt;
|
||||
})
|
||||
.then(
|
||||
ruleGetTypeList(val).then((res) => {
|
||||
this.secondTypeList = res.data.data;
|
||||
if (this.secondTypeList.length == 0) {
|
||||
getRulesItem(this.activeName).then((res) => {
|
||||
this.$refs.rulesSecondTabs.style.display = "none";
|
||||
let iconUrl = "/manage/img/rules/";
|
||||
res.data.data.forEach((ele) => {
|
||||
ele["iconUrl"] = `${iconUrl}${ele["type"]}.png`;
|
||||
});
|
||||
this.ruleDetailList = res.data.data;
|
||||
});
|
||||
} else {
|
||||
this.$refs.rulesSecondTabs.style.display = "block";
|
||||
getRulesItem(this.secondTypeList[0]["id"]).then((res) => {
|
||||
let iconUrl = "/manage/img/rules/";
|
||||
res.data.data.forEach((ele) => {
|
||||
ele["iconUrl"] = `${iconUrl}${ele["type"]}.png`;
|
||||
});
|
||||
this.ruleDetailList = res.data.data;
|
||||
});
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
getRuleInfo(id) {
|
||||
getRulesItem(id).then((res) => {
|
||||
let iconUrl = "/manage/img/rules/";
|
||||
res.data.data.forEach((ele) => {
|
||||
ele["iconUrl"] = `${iconUrl}${ele["type"]}.png`;
|
||||
});
|
||||
this.ruleDetailList = res.data.data;
|
||||
});
|
||||
},
|
||||
/**预览文档 */
|
||||
viewRuleInfo(imgUrl, docUrl) {
|
||||
this.viewDialogVisible = true;
|
||||
this.imgUrl = imgUrl;
|
||||
this.docUrl = docUrl;
|
||||
},
|
||||
downDoc(url) {
|
||||
window.open(url);
|
||||
},
|
||||
/**关闭预览文档dialog */
|
||||
handleClose() {
|
||||
this.imgUrl = "";
|
||||
this.docUrl = "";
|
||||
this.viewDialogVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.rules-items {
|
||||
overflow: hidden;
|
||||
padding-bottom: 60px;
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
.rules-tabs {
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.rules-tabs /deep/ .el-tabs__header {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
|
||||
.rules-intro {
|
||||
height: auto;
|
||||
}
|
||||
.rules-intro ul {
|
||||
list-style: none;
|
||||
padding-inline-start: 10px;
|
||||
}
|
||||
|
||||
.rules-intro ul li {
|
||||
margin-block-start: 1em;
|
||||
margin-block-end: 0em;
|
||||
margin-inline-start: 0px;
|
||||
margin-inline-end: 0px;
|
||||
}
|
||||
|
||||
.rules-intro .intro-title {
|
||||
font-family: "Arial-BoldMT", "Arial Bold", "Arial";
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
}
|
||||
.rules-intro .intro {
|
||||
font-family: "ArialMT", "Arial";
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
}
|
||||
.rules-intro .intro-recommend {
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
font-family: "ArialMT", "Arial";
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
.rules-second-type-items {
|
||||
margin-top: 16px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.rules-second-type-items /deep/ .el-button {
|
||||
margin-bottom: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.rules-second-type-items .rules-second-tabs{
|
||||
font-size: 12px;
|
||||
}
|
||||
/**制度模块样式 */
|
||||
.HR-container {
|
||||
width: 270px;
|
||||
height: 330px;
|
||||
margin-left: 28px;
|
||||
clear: both;
|
||||
}
|
||||
.HR-document-container {
|
||||
width: 230px;
|
||||
height: 300px;
|
||||
margin-right: 20px;
|
||||
margin-top: 18px;
|
||||
float: left;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.HR-document-title {
|
||||
height: 50px;
|
||||
}
|
||||
.HR-document-title .HR-title-icon {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
float: left;
|
||||
margin-left: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.HR-document-title .HR-rules-name {
|
||||
width: 152px;
|
||||
float: right;
|
||||
margin-top: -50px;
|
||||
font-family: "Arial Negreta", "Arial Normal", "Arial";
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
line-height: 20px;
|
||||
display: block;
|
||||
}
|
||||
.HR-document-cover{
|
||||
display: block;
|
||||
border-bottom: 1px solid #d9dadd;
|
||||
}
|
||||
.HR-document-cover .HR-cover-img {
|
||||
width: 96%;
|
||||
margin:0 auto;
|
||||
height: 190px;
|
||||
display: block;
|
||||
margin-top: -20px;
|
||||
}
|
||||
.HR-document-footer {
|
||||
display: block;
|
||||
-webkit-margin-after: 2em;
|
||||
margin-block-end: 2em;
|
||||
}
|
||||
.HR-document-footer span {
|
||||
width: 49%;
|
||||
text-align: center;
|
||||
display: block;
|
||||
float: left;
|
||||
margin-top: -16px;
|
||||
line-height: 48px;
|
||||
}
|
||||
.rules-no-data {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
font-size: 36px;
|
||||
font-family: "Arial Negreta", "Arial Normal", "Arial";
|
||||
font-style: normal;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,146 +0,0 @@
|
||||
<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 { addDept, updateDept } from "@/api/tenant/talents";
|
||||
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;
|
||||
addDept({
|
||||
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>
|
||||
@@ -1,110 +0,0 @@
|
||||
<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/talents";
|
||||
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>
|
||||
@@ -1,908 +0,0 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<basic-container>
|
||||
<!-- <el-collapse v-model="activeNames">
|
||||
<el-collapse-item name="1" disabled="true">
|
||||
<template slot="title">-->
|
||||
<!-- <p>全部({{ personTotal }}人)</p> -->
|
||||
<p>分组管理</p>
|
||||
<!-- </template> -->
|
||||
<div class="box" :style="{ height: leftHeight }">
|
||||
<el-scrollbar style="height: 100%">
|
||||
<el-tree ref="tree" node-key="id" highlight-current :expand-on-click-node="false" @node-click="nodeClick"
|
||||
:data="treeData" :props="props">
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }" style="width: 80%">
|
||||
<!-- <el-tooltip class="item" effect="dark" :content="node.label" placement="top"> -->
|
||||
<span style="
|
||||
flex-basis: 80%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
flex-shrink: 1;
|
||||
">
|
||||
{{ node.label }}
|
||||
({{ data.sumNum }}人)
|
||||
</span>
|
||||
<!-- </el-tooltip> -->
|
||||
<span v-show="data.id && data.id !== '0'" style="flex-basis: 20%">
|
||||
<el-button type="text" icon="el-icon-edit" size="mini" @click="() => updateGroups('edit', data)">
|
||||
</el-button>
|
||||
<el-button icon="el-icon-delete" type="text" size="mini" @click="() => removeGroups(data)">
|
||||
</el-button>
|
||||
</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
<div class="footer" style="padding-left: 6px">
|
||||
<el-button type="text" icon="el-icon-plus" @click="updateGroups('add')"
|
||||
v-show="vaildData(permission.tenant_wage_payroll_view, false)">新建分组</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<!-- </el-collapse-item>
|
||||
</el-collapse>-->
|
||||
</basic-container>
|
||||
<!-- <div>
|
||||
<el-button type="text" icon="el-icon-setting" @click="drawer = true">分组管理</el-button>
|
||||
</div>-->
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<basic-container>
|
||||
<!--搜索栏-->
|
||||
<el-form size="small" label-position="right" :inline="true" style="padding-left: 10px; padding-right: 10px">
|
||||
<el-row :span="24">
|
||||
<el-form-item label="姓名:">
|
||||
<el-input v-model="query.name" placeholder="姓名" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工种:">
|
||||
<el-select v-model="query.worktypes" placeholder="工种" style="width: 100%" filterable clearable>
|
||||
<el-option v-for="(item, key, index) in worktypeData" :key="index" :label="item.name"
|
||||
:value="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<div class="searchBtn">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="searchChange1">搜 索</el-button>
|
||||
<el-button size="small" icon="el-icon-delete" @click="searchReset1">清 空</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!--/搜索栏-->
|
||||
<avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="obj"
|
||||
:permission="permissionList" :before-open="beforeOpen" @row-del="rowDel" @row-update="rowUpdate"
|
||||
@row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
|
||||
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
|
||||
@refresh-change="refreshChange" class="customPage">
|
||||
<!--自定义列-->
|
||||
<template slot="worktypes" slot-scope="{ row }">
|
||||
<el-tooltip effect="dark" :content="row.worktypes" placement="top">
|
||||
<div>{{ row.worktypes | ellipsis }}</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<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="worktypesForm">
|
||||
<tag-select v-model="selectedWorkTypes" :prop="{ label: 'name', value: 'name' }" :data="worktypeData">
|
||||
</tag-select>
|
||||
</template>
|
||||
<!--自定义按钮-->
|
||||
<template slot="menuLeft">
|
||||
<el-button type="success" size="small" plain icon="el-icon-plus" @click="handleImport"
|
||||
v-show="vaildData(permission.tenant_talents_groupadd, false)">导入</el-button>
|
||||
<el-button type="warning" size="small" plain :disabled="!selectionList.length" icon="el-icon-sort"
|
||||
@click="handleTransfer">转移分组</el-button>
|
||||
<el-button type="danger" size="small" icon="el-icon-delete" @click="handleDelete"
|
||||
:disabled="!selectionList.length" plain v-show="vaildData(permission.tenant_talents_groupdelete, false)">
|
||||
删除</el-button>
|
||||
</template>
|
||||
<template slot="name" slot-scope="{row}">
|
||||
<span v-if="row.status==1">{{row.name}}</span>
|
||||
<span v-else>{{row.name}}(<span style="color: red;">未实名</span>)</span>
|
||||
|
||||
</template>
|
||||
<!--/自定义按钮-->
|
||||
</avue-crud>
|
||||
|
||||
<!--批量导入-->
|
||||
<el-dialog title="导入" append-to-body :visible.sync="excelBox" :close-on-click-modal="false" width="555px">
|
||||
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"
|
||||
:upload-before="beforeAvatarUpload" :upload-error="uploadError">
|
||||
<template slot="excelTemplate">
|
||||
<el-button type="primary" @click="handleTemplate()" :loading="templateLoading">
|
||||
点击下载
|
||||
<i class="el-icon-download el-icon--right"></i>
|
||||
</el-button>
|
||||
</template>
|
||||
</avue-form>
|
||||
</el-dialog>
|
||||
<!--/批量导入-->
|
||||
<!--新建 编辑分组dialog-->
|
||||
<add-groups ref="addGroups" @refresh="refresh" :treeData="treeData"></add-groups>
|
||||
<!--/新建 编辑分组dialog-->
|
||||
<!--转移分组dialog-->
|
||||
<transfer-groups ref="transferGroups" @refresh="refresh" :ids="ids"></transfer-groups>
|
||||
<!--/转移分组dialog-->
|
||||
<resume ref="resume" v-show="false"></resume>
|
||||
</basic-container>
|
||||
<ied ref="ied"></ied>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getList,
|
||||
remove,
|
||||
update,
|
||||
add,
|
||||
detail,
|
||||
getDept,
|
||||
removeDept,
|
||||
upload,
|
||||
} from "@/api/tenant/talents";
|
||||
import { getWorkTypes } from "@/api/tenant/common";
|
||||
import { mapGetters } from "vuex";
|
||||
import addGroups from "./Dialog/addGroups";
|
||||
import transferGroups from "./Dialog/transferGroups";
|
||||
import Resume from "@/components/resume/index";
|
||||
import { check18IdCardNo, isvalidatemobile, isExcel } from "@/util/validate";
|
||||
import { getTemplate } from "@/api/resource/template";
|
||||
import ied from "@/views/util/import-error-dialog";
|
||||
import { excelAccept } from "@/common/accept";
|
||||
|
||||
export default {
|
||||
filters: {
|
||||
ellipsis(value) {
|
||||
if (!value) return "";
|
||||
if (value.length > 15) {
|
||||
return value.slice(0, 14) + "...";
|
||||
}
|
||||
return value;
|
||||
},
|
||||
},
|
||||
name: "tenant_talents",
|
||||
data() {
|
||||
return {
|
||||
activeNames: "1",
|
||||
isIndeterminate: false,
|
||||
checkAll: false,
|
||||
checked: false,
|
||||
selectionList: [],
|
||||
loading: true,
|
||||
templateLoading: false,
|
||||
query: {},
|
||||
props: {
|
||||
label: "groupName",
|
||||
id: "id",
|
||||
},
|
||||
personTotal: 0,
|
||||
treeData: [],
|
||||
tenantId: "",
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
tempWorkType: [],
|
||||
worktypeDic: {},
|
||||
arr:[],//////
|
||||
excelOption: {
|
||||
submitBtn: false,
|
||||
emptyBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: "文件上传",
|
||||
prop: "excelFile",
|
||||
type: "upload",
|
||||
drag: true,
|
||||
loadText: "文件上传中,请稍等",
|
||||
span: 24,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
},
|
||||
tip: "请上传 .xls,.xlsx 标准格式文件",
|
||||
accept: excelAccept,
|
||||
showFileList: false,
|
||||
action: upload(),
|
||||
},
|
||||
{
|
||||
label: "模板下载",
|
||||
prop: "excelTemplate",
|
||||
formslot: true,
|
||||
span: 24,
|
||||
},
|
||||
],
|
||||
},
|
||||
excelBox: false,
|
||||
data: [],
|
||||
obj: {},
|
||||
excelForm: { isCovered: 1 },
|
||||
};
|
||||
},
|
||||
components: { addGroups, transferGroups, Resume, ied },
|
||||
watch: {},
|
||||
computed: {
|
||||
...mapGetters(["permission"]),
|
||||
permissionList() {
|
||||
return {
|
||||
addBtn: this.vaildData(this.permission.tenant_talents_groupadd, false),
|
||||
viewBtn: false,
|
||||
delBtn: this.vaildData(
|
||||
this.permission.tenant_talents_groupdelete,
|
||||
false
|
||||
),
|
||||
editBtn: this.vaildData(
|
||||
this.permission.tenant_talents_groupedit,
|
||||
false
|
||||
),
|
||||
};
|
||||
},
|
||||
ids() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids.join(",");
|
||||
},
|
||||
leftHeight: function () {
|
||||
//获取高度值
|
||||
if (document.getElementsByClassName("avue-crud__pagination")[0]) {
|
||||
let pageHeight = document.getElementsByClassName(
|
||||
"avue-crud__pagination"
|
||||
)[0].offsetTop;
|
||||
return pageHeight - 105 + "px";
|
||||
} else {
|
||||
return 725 + "px";
|
||||
}
|
||||
},
|
||||
option() {
|
||||
const self = this;
|
||||
const IdCardNo = (rule, value, callback) => {
|
||||
if (check18IdCardNo(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("身份证格式不正确"));
|
||||
}
|
||||
};
|
||||
const validateTel = (rule, value, callback) => {
|
||||
if (isvalidatemobile(value)[0]) {
|
||||
callback(new Error(isvalidatemobile(value)[1]));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
height: "auto",
|
||||
dialogWidth: "30%",
|
||||
calcHeight: 180,
|
||||
align: "center",
|
||||
menuAlign: "center",
|
||||
tip: false,
|
||||
columnBtn: false,
|
||||
searchBtn: true,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
selection: true,
|
||||
dialogType: "dialog",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "姓名",
|
||||
prop: "name",
|
||||
// search: true,
|
||||
span: 24,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入姓名",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
slot:true
|
||||
},
|
||||
{
|
||||
label: "身份证",
|
||||
prop: "idNumber",
|
||||
hide: true,
|
||||
span: 24,
|
||||
rules: [
|
||||
{ required: true, message: "请输入身份证号", trigger: "blur" },
|
||||
{ trigger: "blur", validator: IdCardNo },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "手机号",
|
||||
prop: "telphone",
|
||||
span: 24,
|
||||
hide: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
validator: validateTel,
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "用户类型",
|
||||
prop: "userId",
|
||||
type: "select",
|
||||
dicData: [
|
||||
{
|
||||
value: "0",
|
||||
label: "未注册用户",
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "已注册用户",
|
||||
},
|
||||
],
|
||||
display: false,
|
||||
hide: true,
|
||||
// search: true
|
||||
},
|
||||
{
|
||||
label: "分组",
|
||||
prop: "groupId",
|
||||
type: "tree",
|
||||
span: 24,
|
||||
display: true,
|
||||
dicData: self.treeData,
|
||||
props: {
|
||||
label: "groupName",
|
||||
value: "id",
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择分组",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
placeholder: "请选择 分组",
|
||||
},
|
||||
{
|
||||
label: "工种",
|
||||
prop: "worktypes",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择工种",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
slot: true,
|
||||
formslot: true,
|
||||
span: 24,
|
||||
},
|
||||
// {
|
||||
// label: "简历",
|
||||
// prop: "resume",
|
||||
// slot: true,
|
||||
// display: false
|
||||
// },
|
||||
{
|
||||
label: "备注",
|
||||
prop: "remarks",
|
||||
type: "textarea",
|
||||
slot: true,
|
||||
hide: true,
|
||||
span: 24,
|
||||
maxlength: 100,
|
||||
showWordLimit: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
selectedWorkTypes: {
|
||||
get() {
|
||||
if (!this.obj.worktypes) {
|
||||
return [];
|
||||
}
|
||||
const result = [];
|
||||
const wt = this.obj.worktypes.split(",");
|
||||
wt.forEach((item) => {
|
||||
result.push({ name: item });
|
||||
});
|
||||
return result;
|
||||
},
|
||||
set(val) {
|
||||
const arr = [];
|
||||
val.forEach((item) => {
|
||||
arr.push(item.name);
|
||||
});
|
||||
this.obj.worktypes = arr.join(",");
|
||||
},
|
||||
},
|
||||
worktypeData() {
|
||||
let rel = [];
|
||||
for(let j=0;j<this.arr.length;j++){
|
||||
const key=this.arr[j];
|
||||
if(this.worktypeDic.hasOwnProperty(key)){
|
||||
rel.push({name:key})
|
||||
}
|
||||
}
|
||||
/* for (const key in this.worktypeDic) {
|
||||
if (this.worktypeDic.hasOwnProperty(key)) {
|
||||
rel.push({ name: key });
|
||||
}
|
||||
}*/
|
||||
for (let i = 0; i < this.tempWorkType.length; i++) {
|
||||
const key = this.tempWorkType[i];
|
||||
if (key && !this.worktypeDic.hasOwnProperty(key)) {
|
||||
rel.push({ name: key });
|
||||
}
|
||||
}
|
||||
return rel;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initDept();
|
||||
this.getWorkTypes();
|
||||
},
|
||||
methods: {
|
||||
getWorkTypes() {
|
||||
|
||||
getWorkTypes().then((res) => {
|
||||
|
||||
for (let i = 0; i < res.data.data.length; i++) {
|
||||
const element = res.data.data[i];
|
||||
this.worktypeDic[element.name] = 1;
|
||||
this.arr.push(element.name)
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
/*加载分组*/
|
||||
initDept(groupId) {
|
||||
getDept().then((res) => {
|
||||
const data = res.data.data.list;
|
||||
this.treeData = data;
|
||||
let treeDataOne = {
|
||||
companyId: "",
|
||||
createTime: "",
|
||||
groupName: "全部",
|
||||
id: "",
|
||||
remarks: "",
|
||||
sort: '',
|
||||
sumNum: res.data.data.sum,
|
||||
type: '',
|
||||
};
|
||||
this.treeData.unshift(treeDataOne);
|
||||
const column = this.findObject(this.option.column, "groupId");
|
||||
column.dicData = this.treeData;
|
||||
if (groupId) {
|
||||
this.$nextTick(function () {
|
||||
this.$refs.tree.setCurrentKey(groupId);
|
||||
}); //默认高亮
|
||||
this.nodeClick({ id: groupId });
|
||||
} else {
|
||||
if (this.treeData.length) {
|
||||
this.$nextTick(function () {
|
||||
this.$refs.tree.setCurrentKey(this.treeData[0].id);
|
||||
}); //默认高亮第一个
|
||||
this.nodeClick({ id: this.treeData[0].id });
|
||||
}
|
||||
}
|
||||
this.personTotal = res.data.data.sum;
|
||||
// this.onLoad();
|
||||
//this.treeData.push(treeDataOne);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/*新建 编辑分组*/
|
||||
updateGroups(type, data) {
|
||||
this.$refs.addGroups.openDialog(type, data);
|
||||
},
|
||||
/*删除分组*/
|
||||
removeGroups(data) {
|
||||
//检验该分组是否存在人员,存在提示无法删除,不存在泽提示确定要删除此分组吗
|
||||
const h = this.$createElement;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h("p", { style: "font-size: 16px" }, "您确定要删除此分组吗? "),
|
||||
h("p", { style: "color: red" }, "一旦删除则无法找回"),
|
||||
]),
|
||||
{
|
||||
type: "warning",
|
||||
showClose: false,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === "confirm") {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.cancelButtonLoading = true;
|
||||
instance.closeOnPressEscape = false;
|
||||
instance.closeOnClickModal = false;
|
||||
setTimeout(() => {
|
||||
done();
|
||||
setTimeout(() => {
|
||||
instance.confirmButtonLoading = false;
|
||||
instance.cancelButtonLoading = false;
|
||||
}, 300);
|
||||
}, 1000);
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
removeDept(data.id).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.refresh("del");
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消'
|
||||
// });
|
||||
});
|
||||
},
|
||||
/*批量转移分组 */
|
||||
handleTransfer() {
|
||||
if (this.selectionList.length === 0) {
|
||||
this.$message.warning("请选择至少一条数据");
|
||||
return;
|
||||
}
|
||||
this.$refs.transferGroups.openDialog();
|
||||
},
|
||||
/*点击分组加载相应人才列表*/
|
||||
nodeClick(data) {
|
||||
this.tenantId = data.id ? data.id : "";
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, this.query);
|
||||
// if (this.tenantId !== data.id) {
|
||||
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
},
|
||||
/*新增 编辑 转移 删除分组 更新人才后*/
|
||||
refresh(type) {
|
||||
this.page.currentPage = 1;
|
||||
this.query = {};
|
||||
if (type === "del") {
|
||||
//删除分组后重新选中分组为未分组
|
||||
this.initDept();
|
||||
this.onLoad(this.page, this.query);
|
||||
} else {
|
||||
this.initDept(this.tenantId);
|
||||
this.onLoad(this.page, this.query);
|
||||
}
|
||||
},
|
||||
/*获取人才详情 */
|
||||
beforeOpen(done, type) {
|
||||
if (["edit", "view", "add"].includes(type)) {
|
||||
if (type === "edit" || type === "view") {
|
||||
setTimeout(() => {
|
||||
detail(this.obj.id).then(
|
||||
(res) => {
|
||||
this.obj = res.data.data;
|
||||
this.tempWorkType = this.obj.worktypes.split(",");
|
||||
done();
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
}
|
||||
);
|
||||
}, 0);
|
||||
} else {
|
||||
this.tempWorkType = [];
|
||||
done();
|
||||
}
|
||||
}
|
||||
},
|
||||
/*新增人才*/
|
||||
rowSave(row, done) {
|
||||
add({
|
||||
groupId: row.groupId,
|
||||
name: row.name,
|
||||
idNumber: row.idNumber,
|
||||
telphone: row.telphone,
|
||||
worktypes: row.worktypes,
|
||||
remarks: row.remarks,
|
||||
}).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
done();
|
||||
this.refresh();
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
done();
|
||||
}
|
||||
);
|
||||
},
|
||||
/*编辑人才*/
|
||||
rowUpdate(row, index, done) {
|
||||
update({
|
||||
id: row.id,
|
||||
groupId: row.groupId,
|
||||
name: row.name,
|
||||
idNumber: row.idNumber,
|
||||
telphone: row.telphone,
|
||||
worktypes: row.worktypes,
|
||||
remarks: row.remarks,
|
||||
}).then(
|
||||
() => {
|
||||
done();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.refresh();
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
done();
|
||||
}
|
||||
);
|
||||
},
|
||||
/*删除人才 */
|
||||
rowDel(row) {
|
||||
const h = this.$createElement;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h("p", { style: "font-size: 16px" }, "您确定要删除此人才吗? "),
|
||||
h("p", { style: "color: red" }, "一旦删除则无法找回"),
|
||||
]),
|
||||
{
|
||||
type: "warning",
|
||||
showClose: false,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === "confirm") {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.cancelButtonLoading = true;
|
||||
instance.closeOnPressEscape = false;
|
||||
instance.closeOnClickModal = false;
|
||||
setTimeout(() => {
|
||||
done();
|
||||
setTimeout(() => {
|
||||
instance.confirmButtonLoading = false;
|
||||
instance.cancelButtonLoading = false;
|
||||
}, 300);
|
||||
}, 1000);
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
remove(row.id).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.refresh();
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消'
|
||||
// });
|
||||
});
|
||||
},
|
||||
/*批量删除人才*/
|
||||
handleDelete() {
|
||||
if (this.selectionList.length === 0) {
|
||||
this.$message.warning("请选择至少一条数据");
|
||||
return;
|
||||
}
|
||||
const h = this.$createElement;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h("p", { style: "font-size: 16px" }, "您确定要批量删除选中人才吗? "),
|
||||
]),
|
||||
{
|
||||
type: "warning",
|
||||
showClose: false,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === "confirm") {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.cancelButtonLoading = true;
|
||||
instance.closeOnPressEscape = false;
|
||||
instance.closeOnClickModal = false;
|
||||
setTimeout(() => {
|
||||
done();
|
||||
setTimeout(() => {
|
||||
instance.confirmButtonLoading = false;
|
||||
instance.cancelButtonLoading = false;
|
||||
}, 300);
|
||||
}, 1000);
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
remove(this.ids).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.onLoad(this.page);
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消'
|
||||
// });
|
||||
});
|
||||
},
|
||||
/*导入人才库*/
|
||||
beforeAvatarUpload(file, done, loading) {
|
||||
if (!isExcel(file)) {
|
||||
loading();
|
||||
this.$message.error("上传人才库信息只能是 .xls,.xlsx 标准格式文件!");
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
uploadAfter(res, done) {
|
||||
if (!(res instanceof Error) && !res.data) {
|
||||
this.excelBox = false;
|
||||
} else if (res.data && res.data.code === 900) {
|
||||
const arr = [];
|
||||
const data = res.data.data;
|
||||
data.error &&
|
||||
data.error.errorList.forEach((item) => {
|
||||
arr.push(`${item.name} ${item.remarks}`);
|
||||
});
|
||||
data.auth &&
|
||||
data.auth.authList.forEach((item) => {
|
||||
arr.push(`${item.name} ${item.remarks}`);
|
||||
});
|
||||
this.$refs.ied.show(arr);
|
||||
}
|
||||
this.refreshChange();
|
||||
this.initDept(this.tenantId);
|
||||
done();
|
||||
},
|
||||
uploadError(error) {
|
||||
if (error) {
|
||||
this.$message.error(error);
|
||||
}
|
||||
},
|
||||
handleImport() {
|
||||
this.excelBox = true;
|
||||
},
|
||||
/*下载人才库模板 */
|
||||
handleTemplate() {
|
||||
this.templateLoading = true;
|
||||
getTemplate("trc")
|
||||
.then((rep) => {
|
||||
this.templateLoading = false;
|
||||
window.open(rep.data.data);
|
||||
})
|
||||
.catch(() => {
|
||||
this.templateLoading = false;
|
||||
});
|
||||
},
|
||||
/*人才列表切换页码 */
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
this.refreshChange();
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
this.refreshChange();
|
||||
},
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
/*搜索 */
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, params);
|
||||
done();
|
||||
},
|
||||
searchReset1() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
searchChange1() {
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
/*人才列表多选 */
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
selectionClear() {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
/*加载人才列表 */
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
getList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(params, this.query),
|
||||
this.tenantId
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
this.selectionClear();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-tree {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 18px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
display: inline-block;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user