flat:9-11暂存

This commit is contained in:
史典卓
2024-09-11 15:10:55 +08:00
parent 1016f6f3f3
commit c40af81ac4
21 changed files with 1339 additions and 1292 deletions

View File

@@ -27,13 +27,17 @@
<!--自定义列-->
<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>
<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}" >
</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>
@@ -41,7 +45,7 @@
<el-tag type="info" v-if="row.serviceStatus==3">已失效</el-tag>
</span>
</template>
</template>
<template slot="missionDate" slot-scope="{ row }">
<div>{{ row.startDate }}{{ row.endDate }}</div>
</template>
@@ -52,7 +56,8 @@
size="mini"
@click="$refs.resume.openDialog(row)"
v-if="row.userId && row.userId !== '0'"
>查看简历</el-button
>查看简历
</el-button
>
<div v-else>暂无简历</div>
</div>
@@ -64,7 +69,7 @@
</template>
<!--/自定义列-->
<template v-slot:cardNumber="{row}">
<span>{{idNumberDDesensitization(row.cardNumber)}}</span>
<span>{{ idNumberDDesensitization(row.cardNumber) }}</span>
</template>
</avue-crud>
@@ -73,14 +78,15 @@
</template>
<script>
import { employList, cancelEmploy, } from "@/api/tenant/postzp";
import {getCode,resetPwd} from "@/api/manage/econtract.js";//api
import {employList, cancelEmploy,} from "@/api/tenant/postzp";
import {getCode, resetPwd} from "@/api/manage/econtract.js";//api
import Resume from "@/components/resume/index";
import { idNumberDDesensitization } from "@/util/util";
import {idNumberDDesensitization} from "@/util/util";
import {mapGetters} from 'vuex'
import { dateFormat } from "@/util/date";
import {dateFormat} from "@/util/date";
import {getConfig} from '@/api/tenant/config'
import EmployInformation from "./EmployInformation";
export default {
comments: {},
components: {
@@ -92,89 +98,86 @@ export default {
},
data() {
const validatePwdLength=(rule,value,callback)=>{
if(value.length!=6 || isNaN(Number(value))){
callback(new Error('请输入6位数的数字密码'));
}
else{
callback();
}
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();
}
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:{},
selectTaskInfo: {},
getUserConfig: {},
checkDisplayVisible: false,
fpTitleId:'',
fpTitleId: '',
fpData: {},
pwdFormRules:{
pwd:[
pwdFormRules: {
pwd: [
{
required:true,message:'请输入密码',trigger:'blur'
required: true, message: '请输入密码', trigger: 'blur'
},
{
validator:validatePwdLength,trigger:'blur'
validator: validatePwdLength, trigger: 'blur'
},
]
},
selectionFlag:true,
selectionFlag: true,
/*忘记密码*/
resetPwdDialogVisible:false,
resetPwdForm:{},
formLabelWidth:'150px',
resetPwdDialogVisible: false,
resetPwdForm: {},
formLabelWidth: '150px',
msgText: '获取验证码',
msgTime:120,
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'
}
]
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:'',
loadingbut: false,
loadingbuttext: '确定',
downLoadRow: {},
dataCurClick: {},
employDataIds: 1,
employNum: 1,
imgStr: '',
isIndeterminate: false,
checkAll: false,
checked: false,
@@ -183,11 +186,11 @@ export default {
selectionList: [],
dialogVisible: false,
dialogVisible1: false,
contractId:'',
contractId: '',
labelPosition: 'right',
pwdForm: {
pwd: ''
},
pwd: ''
},
page: {
pageSize: 20,
currentPage: 1,
@@ -227,11 +230,11 @@ export default {
editBtn: false,
excelBtn: false,
columnBtn: false,
searchBtn: true,
searchShow: true,
searchBtn: false,
searchShow: false,
searchMenuSpan: 6,
searchLabelWidth: 60,
menu:false,
menu: false,
// menuPosition: "center",
labelPosition: "right",
border: true,
@@ -258,15 +261,12 @@ export default {
{
label: "姓名",
prop: "realName",
search: true,
searchSpan: 4,
width:70,
},
{
label: "性别",
prop: "sex",
search: false,
width:50,
dicData: [
{
label: "男",
@@ -282,48 +282,17 @@ export default {
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: "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: "请选择分组",
},
],
};
@@ -341,31 +310,31 @@ export default {
},
},
methods: {
checkDisplayVisibleClose(){
checkDisplayVisibleClose() {
this.checkDisplayVisible = false;
},
rowEmployDisabled(){
rowEmployDisabled() {
},
dateFormat(date){
return dateFormat(new Date(date),'yyyy/MM/dd')
dateFormat(date) {
return dateFormat(new Date(date), 'yyyy/MM/dd')
},
idNumberDDesensitization,
drawerClose(){
this.$emit('refresh');
this.drawer = false;
drawerClose() {
this.$emit('refresh');
this.drawer = false;
},
radioButtonChange(){
radioButtonChange() {
this.query.realName = '';
this.query.groupId = '';
if(this.query.status == 2){
if (this.query.status == 2) {
this.selectionFlag = false;
}else{
} else {
this.selectionFlag = true;
}
},
/*打开drawer*/
openDialog(row, status) {
this.selectTaskInfo = row;
this.selectTaskInfo = row;
this.missionId = row.missionNo;
this.query = {
status: status,
@@ -382,7 +351,7 @@ export default {
const h = this.$createElement;
this.$confirm(
h("div", null, [
h("p", { style: "font-size: 16px" }, "您确定要取消录用该人员吗? "),
h("p", {style: "font-size: 16px"}, "您确定要取消录用该人员吗? "),
]),
{
type: "warning",
@@ -456,8 +425,8 @@ export default {
},
/*加载数据*/
onLoad(page, params) {
getConfig().then((res)=>{
this.getUserConfig = res.data.data;
getConfig().then((res) => {
this.getUserConfig = res.data.data;
});
this.loading = true;
let paramscur = params ? Object.assign(params, this.query) : this.query;
@@ -469,7 +438,7 @@ export default {
).then((res) => {
const data = res.data.data;
this.page.total = data.total;
this.data=data.records;
this.data = data.records;
// if(this.getUserConfig.insuranceOn == 1){
// this.data.forEach((ele)=>{
// if(!ele.effect){
@@ -498,75 +467,79 @@ export default {
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={};
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;
});
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)=>{
},
/*重置密码*/
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{
.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;
}
.employ-employNum-count {
color: #2098ee;
}
.employ-forgetPwd {
float: right;
margin-top: -33px;
}
</style>