Commit 4c47a54d by swl

gx

parent 381ae7d8
No preview for this file type
import { api, formatParams } from "@/utils/axios";
import { api1, formatParams1, config } from "@/utils/request";
// import { baseUrl } from '@/config/index'
/**
* 查询列表
*/
export function getList(params) {
return api(
Object.assign(formatParams("POST", params), {
url: `${config.proxy}/admin-api/familyCode/queryList`,
})
);
}
/**
* 查询详情
*/
export function get(params) {
return api(
Object.assign(formatParams("POST", params), {
url: `${config.proxy}admin-api/talent/get`,
})
);
}
/**
* 查询详情
*/
export function getFamily(params) {
return api(
Object.assign(formatParams("GET", params), {
url: `${config.proxy}/admin-api/familyCode/detail`,
})
);
}
/**
* 查询类型
*/
export function getType() {
return api(
Object.assign(formatParams("POST"), {
url: `${config.proxy}/admin-api/familyCode/queryZjCity`,
})
);
}
/**
* 查询状态
*/
export function getReviewState(params) {
return api(
Object.assign(formatParams("GET"), {
url: `${config.proxy}/admin-api/familyCode/reviewState?type=${params}`,
})
);
}
// 审核
export function familyAudit(params) {
return api(
Object.assign(formatParams("POST", params), {
url: `${config.proxy}/admin-api/familyCode/review`,
})
);
}
/**
* 修改状态
*/
export function updateState(params) {
return api1(
Object.assign(formatParams1("POST", params), {
url: `${config.proxy}talent/updateState`,
})
);
}
/**
* 审核改派
*/
export function auditUpdate(params) {
return api(
Object.assign(formatParams1("POST", params), {
url: `${config.proxy}/admin-api/familyCode/reassignment`,
})
);
}
/**
* 操作记录
*/
export function getRecord(params) {
return api(
Object.assign(formatParams("GET", params), {
url: `${config.proxy}/admin-api/familyCode/queryRecordList`,
})
);
}
/**
* 查询责任部门
*/
export function getBranch(params) {
return api1(
Object.assign(formatParams1("GET", params), {
url: `${config.proxy}talent/getBranch?appId=1234`,
})
);
}
/**
* 修改学历状态
*/
export function educationState(params) {
return api1(
Object.assign(formatParams1("POST", params), {
url: `${config.proxy}talent/educationState`,
})
);
}
/**
* 查看学历
*/
export function educationQuery(params) {
return api1(
Object.assign(formatParams1("POST", params), {
url: `${config.proxy}talent/getEducation`,
})
);
}
import { api, formatParams } from "@/utils/axios"; import { api, formatParams } from "@/utils/axios";
import { api1, formatParams1, config } from "@/utils/request"; import { formatParams1, config } from "@/utils/request";
// import { baseUrl } from '@/config/index'
/** /**
* 查询列表 * 查询列表
...@@ -8,7 +7,7 @@ import { api1, formatParams1, config } from "@/utils/request"; ...@@ -8,7 +7,7 @@ import { api1, formatParams1, config } from "@/utils/request";
export function getList(params) { export function getList(params) {
return api( return api(
Object.assign(formatParams("POST", params), { Object.assign(formatParams("POST", params), {
url: `${config.proxy}/admin-api/familyCode/queryList`, url: `${config.proxy}/admin-api/talent/getList`,
}) })
); );
} }
...@@ -19,46 +18,18 @@ export function getList(params) { ...@@ -19,46 +18,18 @@ export function getList(params) {
export function get(params) { export function get(params) {
return api( return api(
Object.assign(formatParams("POST", params), { Object.assign(formatParams("POST", params), {
url: `${config.proxy}admin-api/talent/get`, url: `${config.proxy}/admin-api/talent/get`,
})
);
}
/**
* 查询详情
*/
export function getFamily(params) {
return api(
Object.assign(formatParams("GET", params), {
url: `${config.proxy}/admin-api/familyCode/detail`,
})
);
}
/**
* 查询类型
*/
export function getType() {
return api(
Object.assign(formatParams("POST"), {
url: `${config.proxy}/admin-api/familyCode/queryZjCity`,
}) })
); );
} }
/** /**
* 查询状态 * 查询类型
*/ */
export function getReviewState(params) { export function getType(params) {
return api(
Object.assign(formatParams("GET"), {
url: `${config.proxy}/admin-api/familyCode/reviewState?type=${params}`,
})
);
}
// 审核
export function familyAudit(params) {
return api( return api(
Object.assign(formatParams("POST", params), { Object.assign(formatParams("GET", params), {
url: `${config.proxy}/admin-api/familyCode/review`, url: `${config.proxy}/admin-api/talent/getType?appId=1234`,
}) })
); );
} }
...@@ -67,29 +38,20 @@ export function familyAudit(params) { ...@@ -67,29 +38,20 @@ export function familyAudit(params) {
* 修改状态 * 修改状态
*/ */
export function updateState(params) { export function updateState(params) {
return api1(
Object.assign(formatParams1("POST", params), {
url: `${config.proxy}talent/updateState`,
})
);
}
/**
* 审核改派
*/
export function auditUpdate(params) {
return api( return api(
Object.assign(formatParams1("POST", params), { Object.assign(formatParams1("POST", params), {
url: `${config.proxy}/admin-api/familyCode/reassignment`, url: `${config.proxy}/admin-api/talent/updateState`,
}) })
); );
} }
/** /**
* 操作记录 * 操作记录
*/ */
export function getRecord(params) { export function getRecord(params) {
return api( return api(
Object.assign(formatParams("GET", params), { Object.assign(formatParams1("POST", params), {
url: `${config.proxy}/admin-api/familyCode/queryRecordList`, url: `${config.proxy}/admin-api/talent/getRecord`,
}) })
); );
} }
...@@ -98,9 +60,9 @@ export function getRecord(params) { ...@@ -98,9 +60,9 @@ export function getRecord(params) {
* 查询责任部门 * 查询责任部门
*/ */
export function getBranch(params) { export function getBranch(params) {
return api1( return api(
Object.assign(formatParams1("GET", params), { Object.assign(formatParams1("GET", params), {
url: `${config.proxy}talent/getBranch?appId=1234`, url: `${config.proxy}/admin-api/talent/getBranch?appId=1234`,
}) })
); );
} }
...@@ -109,9 +71,9 @@ export function getBranch(params) { ...@@ -109,9 +71,9 @@ export function getBranch(params) {
* 修改学历状态 * 修改学历状态
*/ */
export function educationState(params) { export function educationState(params) {
return api1( return api(
Object.assign(formatParams1("POST", params), { Object.assign(formatParams1("POST", params), {
url: `${config.proxy}talent/educationState`, url: `${config.proxy}/admin-api/talent/educationState`,
}) })
); );
} }
...@@ -120,9 +82,9 @@ export function educationState(params) { ...@@ -120,9 +82,9 @@ export function educationState(params) {
* 查看学历 * 查看学历
*/ */
export function educationQuery(params) { export function educationQuery(params) {
return api1( return api(
Object.assign(formatParams1("POST", params), { Object.assign(formatParams1("POST", params), {
url: `${config.proxy}talent/getEducation`, url: `${config.proxy}/admin-api/talent/getEducation`,
}) })
); );
} }
const domain = { const domain = {
// dev: "http://192.168.3.87:8881", // 姚镇接口 // dev: "http://192.168.3.87:8881", // 姚镇接口
// dev: "http://81.69.231.72:8881", // 姚镇接口 // dev: "http://81.69.231.72:8881", // 姚镇接口
// dev: "http://81.69.231.72:8881", // 测试接口 dev: "http://81.69.231.72:8881", // 测试接口
dev: "https://exam.smart-zj.cn:9100/smartExam/", // 新正式接口 // dev: "https://exam.smart-zj.cn:9100/smartExam/", // 新正式接口
}; };
// 腾讯地图 key // 腾讯地图 key
const map = { const map = {
......
import axios from "axios"; import axios from "axios";
import { import { Message } from "element-ui";
Message import { baseUrl } from "@/config";
} from "element-ui"; import { getToken } from "@/utils/auth";
import { import { TokenKey } from "@/utils/auth";
baseUrl
} from "@/config";
import {
getToken
} from "@/utils/auth";
import {TokenKey} from '@/utils/auth'
import router from "@/router"; import router from "@/router";
const api = axios.create({ const api = axios.create({
baseURL: `${baseUrl}`, baseURL: `${baseUrl}`,
...@@ -17,14 +11,15 @@ const api = axios.create({ ...@@ -17,14 +11,15 @@ const api = axios.create({
// 请求拦截 // 请求拦截
api.interceptors.request.use( api.interceptors.request.use(
(config) => { (config) => {
config.headers['Authorization'] = 'Bearer ' + localStorage.getItem(TokenKey) config.headers["Authorization"] =
"Bearer " + localStorage.getItem(TokenKey);
let appId = /*getToken()*/ "1234"; let appId = /*getToken()*/ "1234";
if (config.data) config.data.appId = appId; if (config.data) config.data.appId = appId;
return config; return config;
}, },
(error) => ({ (error) => ({
status: 0, status: 0,
msg: error.message msg: error.message,
}) })
); );
// 请求返回 // 请求返回
...@@ -70,9 +65,9 @@ const checkCode = (res) => { ...@@ -70,9 +65,9 @@ const checkCode = (res) => {
}; };
return returnData; return returnData;
} else if (res.data.code == 401) { } else if (res.data.code == 401) {
Message.error('登录已失效,请重新登录') Message.error("登录已失效,请重新登录");
window.localStorage.clear(); window.localStorage.clear();
router.replace('/login') router.replace("/login");
} else { } else {
//统一处理错误 //统一处理错误
const returnData = { const returnData = {
...@@ -106,7 +101,7 @@ const formatParams = (method = "GET", params, type) => { ...@@ -106,7 +101,7 @@ const formatParams = (method = "GET", params, type) => {
} }
let headers = { let headers = {
"Content-Type": contentType, "Content-Type": contentType,
"Authorization": getToken() ? ('Bearer ' + getToken()) : "", Authorization: getToken() ? "Bearer " + getToken() : "",
}; };
// appId设置 // appId设置
// 如果接口需要序列化 type == 'qs' // 如果接口需要序列化 type == 'qs'
...@@ -127,23 +122,23 @@ const formatParams = (method = "GET", params, type) => { ...@@ -127,23 +122,23 @@ const formatParams = (method = "GET", params, type) => {
case "DOWNLOAD": case "DOWNLOAD":
return { return {
responseType: type, responseType: type,
headers, headers,
method: "POST", method: "POST",
data: params, data: params,
}; };
case "PUT": case "PUT":
return { return {
responseType: type, responseType: type,
headers, headers,
method, method,
data: params, data: params,
}; };
case "DELETE": case "DELETE":
return { return {
responseType: type, responseType: type,
headers, headers,
method, method,
data: params, data: params,
}; };
case "GET": case "GET":
return { return {
...@@ -160,8 +155,4 @@ const formatParams = (method = "GET", params, type) => { ...@@ -160,8 +155,4 @@ const formatParams = (method = "GET", params, type) => {
} }
}; };
export { export { api, formatParams, baseUrl };
api,
formatParams,
baseUrl
};
\ No newline at end of file
import axios from "axios"; import axios from "axios";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { TokenKey } from "@/utils/auth";
const config = { const config = {
// proxy: "https://exam.smart-zj.cn:9100/exam/", // 新线上地址 // proxy: "https://exam.smart-zj.cn:9100/exam/", // 新线上地址
// proxy: "http://81.69.231.72:8881/", // 测试地址 proxy: "http://81.69.231.72:8881", // 测试地址
// proxy: "http://192.168.3.87:8881/", //本地 // proxy: "http://192.168.3.87:8881/", //本地
proxy: "https://exam.smart-zj.cn:9100/smartExam/", // 新正式接口 // proxy: "https://exam.smart-zj.cn:9100/smartExam/", // 新正式接口
// proxy: "http://81.69.231.72:9089/", // 测试地址
}; };
//axios基本配置 //axios基本配置
...@@ -55,6 +57,9 @@ const api1 = axios.create({ ...@@ -55,6 +57,9 @@ const api1 = axios.create({
api1.interceptors.request.use( api1.interceptors.request.use(
(conf) => { (conf) => {
//请求带token //请求带token
config.headers["Authorization"] =
"Bearer " + localStorage.getItem(TokenKey);
// conf.headers['Authorization'] = store2('accesstoken') // conf.headers['Authorization'] = store2('accesstoken')
let appId = /*getToken()*/ "1234"; let appId = /*getToken()*/ "1234";
if (conf.data) conf.data.appId = appId; if (conf.data) conf.data.appId = appId;
......
...@@ -611,7 +611,7 @@ import { ...@@ -611,7 +611,7 @@ import {
getReviewState, getReviewState,
familyAudit, familyAudit,
auditUpdate, auditUpdate,
} from "@/api/talents"; } from "@/api/family";
// import { Message } from "element-ui"; // import { Message } from "element-ui";
export default { export default {
......
<template> <template>
<div class="coldfood"> <div class="coldfood">
<div class="search-wrapper"> <div class="search-wrapper">
<el-form :inline="true" :model="searchForm" class="search_form" style="text-align:left"> <el-form
<el-form-item label="姓名" label-width="200"> :inline="true"
<el-input v-model="searchForm.name" placeholder="请输入姓名" @keyup.enter.native="onSubmit"></el-input> :model="searchForm"
</el-form-item> class="search_form"
<el-form-item label="手机号码"> style="text-align: left"
<el-input v-model="searchForm.phone" placeholder="请输入手机号码" @keyup.enter.native="onSubmit"> >
</el-input> <el-form-item label="姓名" label-width="200">
</el-form-item> <el-input
<el-form-item label="单位名称"> v-model="searchForm.name"
<el-input v-model="searchForm.unitName" placeholder="请输入单位名称" @keyup.enter.native="onSubmit"> placeholder="请输入姓名"
</el-input> @keyup.enter.native="onSubmit"
</el-form-item> ></el-input>
<el-form-item label="操作人"> </el-form-item>
<el-input v-model="searchForm.recordName" placeholder="请输入操作人" @keyup.enter.native="onSubmit"> <el-form-item label="手机号码">
</el-input> <el-input
</el-form-item> v-model="searchForm.phone"
<el-form-item label="人才类型" v-if="this.branchCode == '5'"> placeholder="请输入手机号码"
<el-select v-model="searchForm.talentClassification" placeholder="请选择人才类型" style="width: 100%" @keyup.enter.native="onSubmit"
@change="onSubmit"> >
<el-option v-for="item in talentsList" :key="item.id" :label="item.label" :value="item.id"> </el-input>
</el-option> </el-form-item>
</el-select> <el-form-item label="单位名称">
</el-form-item> <el-input
<el-form-item label="认定类型"> v-model="searchForm.unitName"
<el-select v-model="searchForm.typeCode" placeholder="请选择认定类型" style="width: 100%" placeholder="请输入单位名称"
@change="onSubmit"> @keyup.enter.native="onSubmit"
<el-option v-for="item in typeList" :key="item.typeCode" :label="item.typeName" >
:value="item.typeCode"></el-option> </el-input>
</el-select> </el-form-item>
</el-form-item> <el-form-item label="操作人">
<el-form-item v-if="!branchCode" label="责任部门"> <el-input
<el-select v-model="searchForm.branchCode" placeholder="请选择责任部门" style="width: 100%" v-model="searchForm.recordName"
@change="onSubmit"> placeholder="请输入操作人"
<el-option v-for="item in branchList" :key="item.branchCode" :label="item.branchName" @keyup.enter.native="onSubmit"
:value="item.branchCode"></el-option> >
</el-select> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item label="人才类型" v-if="this.branchCode == '5'">
<el-button type="primary" @click="onSubmit">查询</el-button> <el-select
</el-form-item> v-model="searchForm.talentClassification"
<br /> placeholder="请选择人才类型"
<el-form-item label="状态" style="margin-top: 10px;"> style="width: 100%"
<el-radio-group v-model="searchForm.state" @change="onSubmit"> @change="onSubmit"
<el-radio :label="item.state" v-for="item in stateList" :key="item.state">{{ item.stateName }} >
</el-radio> <el-option
</el-radio-group> v-for="item in talentsList"
</el-form-item> :key="item.id"
</el-form> :label="item.label"
</div> :value="item.id"
<!-- 表格 --> >
<div class="table-wrapper1"> </el-option>
<table-template :tableData="tableData" :tableColumns="tableColumns" :loading="loading" </el-select>
:pagination="pagination" @Jump="jumpPage"> </el-form-item>
<el-table-column width="120" prop="talentClassification" label="人才类型" align="center"> <el-form-item label="认定类型">
<template slot-scope="scope"> <el-select
<div v-if="scope.row.talentClassification == '1'"> v-model="searchForm.typeCode"
乡土或创新人才 placeholder="请选择认定类型"
</div> style="width: 100%"
<div v-else-if="scope.row.talentClassification == '2'"> @change="onSubmit"
学历人才 >
</div> <el-option
<div v-else-if="scope.row.talentClassification == '3'"> v-for="item in typeList"
技能人才 :key="item.typeCode"
</div> :label="item.typeName"
<div v-else-if="scope.row.talentClassification == '4'"> :value="item.typeCode"
专技人才 ></el-option>
</div> </el-select>
<div v-else>-</div> </el-form-item>
</template> <el-form-item v-if="!branchCode" label="责任部门">
</el-table-column> <el-select
<el-table-column width="120" prop="overdue" label="逾期状态" align="center"> v-model="searchForm.branchCode"
<template slot-scope="scope"> placeholder="请选择责任部门"
<div v-if="scope.row.state == 1"> style="width: 100%"
<div v-if="scope.row.overdue < 3"></div> @change="onSubmit"
<div class="early" v-if="scope.row.overdue < 5 && scope.row.overdue >= 3"></div> >
<div class="warning" v-if="scope.row.overdue >= 5"></div> <el-option
</div> v-for="item in branchList"
</template> :key="item.branchCode"
</el-table-column> :label="item.branchName"
<el-table-column width="120" key="stateName" prop="onlineName" label="状态" align="center"> :value="item.branchCode"
<template slot-scope="scope"> ></el-option>
<el-tag :type="scope.row.type">{{ scope.row.stateName }}</el-tag> </el-select>
</template> </el-form-item>
</el-table-column> <el-form-item>
<el-table-column fixed="right" label="操作" width="380" align="left"> <el-button type="primary" @click="onSubmit">查询</el-button>
<template slot-scope="scope"> </el-form-item>
<el-button type="primary" size="mini" round @click="view(scope.row)">查看</el-button> <br />
<el-button type="primary" size="mini" round @click="getRecord(scope.row)">记录</el-button> <el-form-item label="状态" style="margin-top: 10px">
<el-radio-group v-model="searchForm.state" @change="onSubmit">
<!-- 公示期的单子可以暂停公示 --> <el-radio
<el-button v-if="scope.row.state === 2" type="warning" size="mini" round :label="item.state"
@click="pause(scope.row.talentCode)">暂停公示</el-button> v-for="item in stateList"
<!-- 暂停公示的单子可以恢复公示 --> :key="item.state"
<el-button v-if="scope.row.state === 4" type="success" size="mini" round >{{ item.stateName }}
@click="recover(scope.row.talentCode)">恢复公示</el-button> </el-radio>
<!-- 审核通过后的单子都可以拉入黑名单撤销 --> </el-radio-group>
<el-button v-if=" </el-form-item>
scope.row.state === 2 || </el-form>
scope.row.state === 3 || </div>
scope.row.state === 4 <!-- 表格 -->
" type="danger" size="mini" round @click="blacklist(scope.row.talentCode)">撤销</el-button> <div class="table-wrapper1">
<!-- 审核通过后的单子都可以打印--> <table-template
<el-button size="mini" round @click="print(scope.row.talentCode, scope.row)">打印</el-button> :tableData="tableData"
</template> :tableColumns="tableColumns"
</el-table-column> :loading="loading"
</table-template> :pagination="pagination"
</div> @Jump="jumpPage"
<!-- 表格end --> >
<el-table-column
<!-- 拒绝对话框 --> width="120"
<el-dialog title="提示" :visible.sync="refuseDialog" width="30%" class="refuseDialog" :before-close="cancelBtn"> prop="talentClassification"
<span>确定拒绝该人才的申请吗?确定的话请<span style="color:red">选择或输入</span>拒绝原因</span> label="人才类型"
<div> align="center"
<el-select v-model="refuseValue" placeholder="请选择拒绝原因" @change="refuseSelect"> >
<el-option v-for="item in refuseOptions" :key="item.value" :label="item.label" :value="item.value"> <template slot-scope="scope">
</el-option> <div v-if="scope.row.talentClassification == '1'">
</el-select> 乡土或创新人才
</div> </div>
<div class="refuseTex"> <div v-else-if="scope.row.talentClassification == '2'">
<el-input type="textarea" autosize placeholder="请输入拒绝原因" v-model="refuseTextarea"> 学历人才
</el-input>
</div> </div>
<span slot="footer" class="dialog-footer"> <div v-else-if="scope.row.talentClassification == '3'">
<el-button @click="cancelBtn">取 消</el-button> 技能人才
<el-button type="primary" @click="successBtn">确 定</el-button> </div>
</span> <div v-else-if="scope.row.talentClassification == '4'">
</el-dialog> 专技人才
<!-- 人才详情的对话框 --> </div>
<el-dialog title="人才详情" :visible.sync="viewShow" width="800px" :close-on-press-escape="false" <div v-else>-</div>
@close="showEdu = false"> </template>
<div class="content"> </el-table-column>
<!-- 开始 --> <el-table-column
<div style="background:#F3F4F6"> width="120"
<div class="cell"> prop="overdue"
<p class="label">申请类型</p> label="逾期状态"
<p class="value">{{ viewDetail.category }}</p> align="center"
</div> >
<div class="cell"> <template slot-scope="scope">
<p class="label">申请内容</p> <div v-if="scope.row.state == 1">
<p class="value">{{ viewDetail.contentName }}</p> <div v-if="scope.row.overdue < 3"></div>
</div> <div
<div class="cell"> class="early"
<p class="label">姓名</p> v-if="scope.row.overdue < 5 && scope.row.overdue >= 3"
<p class="value">{{ viewDetail.name }}</p> ></div>
</div> <div class="warning" v-if="scope.row.overdue >= 5"></div>
<div class="cell"> </div>
<p class="label"> </template>
{{ viewDetail.passport === 0 ? "身份证" : "护照" }} </el-table-column>
</p> <el-table-column
<p class="value">{{ viewDetail.idCard }}</p> width="120"
</div> key="stateName"
<div class="cell" v-if="viewDetail.socialPremiumLocation !== null"> prop="onlineName"
<p class="label">工作或社保所在地</p> label="状态"
<p class="value">{{ viewDetail.socialPremiumLocation }}</p> align="center"
</div> >
<div class="cell"> <template slot-scope="scope">
<p class="label">工作单位名称</p> <el-tag :type="scope.row.type">{{ scope.row.stateName }}</el-tag>
<p class="value">{{ viewDetail.unitName }}</p> </template>
</div> </el-table-column>
<div class="cell" v-if="viewDetail.socialUnit"> <el-table-column fixed="right" label="操作" width="380" align="left">
<p class="label">社保缴纳单位</p> <template slot-scope="scope">
<p class="value">{{ viewDetail.socialUnit }}</p> <el-button type="primary" size="mini" round @click="view(scope.row)"
</div> >查看</el-button
<div class="cell"> >
<p class="label">单位统一社会信用代码</p> <el-button
<p class="value">{{ viewDetail.socialCredit }}</p> type="primary"
</div> size="mini"
<div class="cell"> round
<p class="label">个人承诺函</p> @click="getRecord(scope.row)"
<el-image style="height: 100px; max-width: 150px" :src="viewDetail.promise" >记录</el-button
:preview-src-list="[viewDetail.promise]" :z-index="1000000" /> >
</div>
<div class="cell" v-for="(item, index) in viewDetail.pictureList" :key="index"> <!-- 公示期的单子可以暂停公示 -->
<template v-if="item.pictureType === 1"> <el-button
<p class="label">佐证材料(图片)</p> v-if="scope.row.state === 2"
<el-image style="height: 100px; max-width: 150px" :src="item.picture" type="warning"
:preview-src-list="[item.picture]" :z-index="1000000" /> size="mini"
</template> round
<template v-if="item.pictureType === 2"> @click="pause(scope.row.talentCode)"
<p class="label">佐证材料(文件)</p> >暂停公示</el-button
<div class="info"> >
<p class="item" v-if="item.fileName"> <!-- 暂停公示的单子可以恢复公示 -->
文件名称:{{ item.fileName }} <el-button
</p> v-if="scope.row.state === 4"
<p class="item" v-if="item.documentNumber"> type="success"
文号:{{ item.documentNumber }} size="mini"
</p> round
<p class="item" v-if="item.issuingOrganization"> @click="recover(scope.row.talentCode)"
发文机构:{{ item.issuingOrganization }} >恢复公示</el-button
</p> >
<p class="item"> <!-- 审核通过后的单子都可以拉入黑名单撤销 -->
<a class="download" target="_blank" :href="item.picture">下载文件</a> <el-button
</p> v-if="
</div> scope.row.state === 2 ||
</template> scope.row.state === 3 ||
</div> scope.row.state === 4
</div> "
type="danger"
size="mini"
round
@click="blacklist(scope.row.talentCode)"
>撤销</el-button
>
<!-- 审核通过后的单子都可以打印-->
<el-button
size="mini"
round
@click="print(scope.row.talentCode, scope.row)"
>打印</el-button
>
</template>
</el-table-column>
</table-template>
</div>
<!-- 表格end -->
<!-- 拒绝对话框 -->
<el-dialog
title="提示"
:visible.sync="refuseDialog"
width="30%"
class="refuseDialog"
:before-close="cancelBtn"
>
<span
>确定拒绝该人才的申请吗?确定的话请<span style="color: red"
>选择或输入</span
>拒绝原因</span
>
<div>
<el-select
v-model="refuseValue"
placeholder="请选择拒绝原因"
@change="refuseSelect"
>
<el-option
v-for="item in refuseOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="refuseTex">
<el-input
type="textarea"
autosize
placeholder="请输入拒绝原因"
v-model="refuseTextarea"
>
</el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="cancelBtn">取 消</el-button>
<el-button type="primary" @click="successBtn">确 定</el-button>
</span>
</el-dialog>
<!-- 人才详情的对话框 -->
<el-dialog
title="人才详情"
:visible.sync="viewShow"
width="800px"
:close-on-press-escape="false"
@close="showEdu = false"
>
<div class="content">
<!-- 开始 -->
<div style="background: #f3f4f6">
<div class="cell">
<p class="label">申请类型</p>
<p class="value">{{ viewDetail.category }}</p>
</div>
<div class="cell">
<p class="label">申请内容</p>
<p class="value">{{ viewDetail.contentName }}</p>
</div>
<div class="cell">
<p class="label">姓名</p>
<p class="value">{{ viewDetail.name }}</p>
</div>
<div class="cell">
<p class="label">
{{ viewDetail.passport === 0 ? "身份证" : "护照" }}
</p>
<p class="value">{{ viewDetail.idCard }}</p>
</div>
<div class="cell" v-if="viewDetail.socialPremiumLocation !== null">
<p class="label">工作或社保所在地</p>
<p class="value">{{ viewDetail.socialPremiumLocation }}</p>
</div>
<div class="cell">
<p class="label">工作单位名称</p>
<p class="value">{{ viewDetail.unitName }}</p>
</div>
<div class="cell" v-if="viewDetail.socialUnit">
<p class="label">社保缴纳单位</p>
<p class="value">{{ viewDetail.socialUnit }}</p>
</div>
<div class="cell">
<p class="label">单位统一社会信用代码</p>
<p class="value">{{ viewDetail.socialCredit }}</p>
</div>
<div class="cell">
<p class="label">个人承诺函</p>
<el-image
style="height: 100px; max-width: 150px"
:src="viewDetail.promise"
:preview-src-list="[viewDetail.promise]"
:z-index="1000000"
/>
</div>
<div
class="cell"
v-for="(item, index) in viewDetail.pictureList"
:key="index"
>
<template v-if="item.pictureType === 1">
<p class="label">佐证材料(图片)</p>
<el-image
style="height: 100px; max-width: 150px"
:src="item.picture"
:preview-src-list="[item.picture]"
:z-index="1000000"
/>
</template>
<template v-if="item.pictureType === 2">
<p class="label">佐证材料(文件)</p>
<div class="info">
<p class="item" v-if="item.fileName">
文件名称:{{ item.fileName }}
</p>
<p class="item" v-if="item.documentNumber">
文号:{{ item.documentNumber }}
</p>
<p class="item" v-if="item.issuingOrganization">
发文机构:{{ item.issuingOrganization }}
</p>
<p class="item">
<a class="download" target="_blank" :href="item.picture"
>下载文件</a
>
</p>
</div>
</template>
</div>
</div>
<!-- 结束 --> <!-- 结束 -->
<div class="cell"> <div class="cell">
<p class="label">申报人所属</p> <p class="label">申报人所属</p>
<p class="value"> <p class="value">
{{ viewDetail.passport === 0 ? "国内" : "港澳台及国外" }} {{ viewDetail.passport === 0 ? "国内" : "港澳台及国外" }}
</p> </p>
</div> </div>
<div class="cell" v-if="viewDetail.socialSecurity"> <div class="cell" v-if="viewDetail.socialSecurity">
<p class="label">申报人分类</p> <p class="label">申报人分类</p>
<p class="value">{{ viewDetail.socialSecurity }}</p> <p class="value">{{ viewDetail.socialSecurity }}</p>
</div> </div>
<div class="cell"> <div class="cell">
<p class="label">性别</p> <p class="label">性别</p>
<p class="value">{{ viewDetail.sex === 0 ? "男" : "女" }}</p> <p class="value">{{ viewDetail.sex === 0 ? "男" : "女" }}</p>
</div> </div>
<div class="cell"> <div class="cell">
<p class="label">出生地</p> <p class="label">出生地</p>
<p class="value">{{ viewDetail.birthPlace }}</p> <p class="value">{{ viewDetail.birthPlace }}</p>
</div> </div>
<div class="cell" v-if="viewDetail.nation"> <div class="cell" v-if="viewDetail.nation">
<p class="label">民族</p> <p class="label">民族</p>
<p class="value">{{ viewDetail.nation }}</p> <p class="value">{{ viewDetail.nation }}</p>
</div> </div>
<div class="cell" v-if="viewDetail.politicalFace"> <div class="cell" v-if="viewDetail.politicalFace">
<p class="label">政治面貌</p> <p class="label">政治面貌</p>
<p class="value">{{ viewDetail.politicalFace }}</p> <p class="value">{{ viewDetail.politicalFace }}</p>
</div> </div>
<div class="cell"> <div class="cell">
<p class="label">出生年月</p> <p class="label">出生年月</p>
<p class="value">{{ viewDetail.birthDate }}</p> <p class="value">{{ viewDetail.birthDate }}</p>
</div> </div>
<div class="cell"> <div class="cell">
<p class="label">手机号</p> <p class="label">手机号</p>
<p class="value">{{ viewDetail.phone }}</p> <p class="value">{{ viewDetail.phone }}</p>
</div> </div>
<div class="cell"> <div class="cell">
<p class="label"> <p class="label">
学历所在(<span style="color: red">{{ 学历所在(<span style="color: red">{{
viewDetail.educationState === 0 ? "校验未通过" : "校验已通过" viewDetail.educationState === 0 ? "校验未通过" : "校验已通过"
}}</span>) }}</span
</p> >)
<p class="value"> </p>
{{ viewDetail.educationPassport === 0 ? "国内" : "国外" }} <p class="value">
</p> {{ viewDetail.educationPassport === 0 ? "国内" : "国外" }}
<el-button style="margin-left: 20px" size="mini" type="success" @click="viewEdu">查看</el-button> </p>
<el-button style="margin-left: 20px" v-if="viewDetail.educationState === 0" type="primary" <el-button
size="mini" @click="passEducation">审核通过</el-button> style="margin-left: 20px"
</div> size="mini"
<div class="cell" v-show="showEdu"> type="success"
<p class="label">学历查验</p> @click="viewEdu"
<div class="item"> >查看</el-button
<p class="value" v-for="(edu, index) in eduList" :key="index"> >
{{ edu.cc }}-{{ edu.xxxs }}-{{ edu.yxmc }}-{{ edu.zymc }} <el-button
</p> style="margin-left: 20px"
</div> v-if="viewDetail.educationState === 0"
</div> type="primary"
<div class="cell"> size="mini"
<p class="label">最高学历</p> @click="passEducation"
<p class="value">{{ viewDetail.highestEducation }}</p> >审核通过</el-button
</div> >
<div class="cell" v-if="viewDetail.major"> </div>
<p class="label">所学专业</p> <div class="cell" v-show="showEdu">
<p class="value">{{ viewDetail.major }}</p> <p class="label">学历查验</p>
</div> <div class="item">
<div class="cell"> <p class="value" v-for="(edu, index) in eduList" :key="index">
<p class="label">毕业院校</p> {{ edu.cc }}-{{ edu.xxxs }}-{{ edu.yxmc }}-{{ edu.zymc }}
<p class="value">{{ viewDetail.graduateSchool }}</p> </p>
</div> </div>
<!-- <div class="cell"> </div>
<div class="cell">
<p class="label">最高学历</p>
<p class="value">{{ viewDetail.highestEducation }}</p>
</div>
<div class="cell" v-if="viewDetail.major">
<p class="label">所学专业</p>
<p class="value">{{ viewDetail.major }}</p>
</div>
<div class="cell">
<p class="label">毕业院校</p>
<p class="value">{{ viewDetail.graduateSchool }}</p>
</div>
<!-- <div class="cell">
<p class="label">入学时间</p> <p class="label">入学时间</p>
<p class="value">{{ viewDetail.studyTime }}</p> <p class="value">{{ viewDetail.studyTime }}</p>
</div> --> </div> -->
<div class="cell"> <div class="cell">
<p class="label">毕业时间</p> <p class="label">毕业时间</p>
<p class="value">{{ viewDetail.graduationTime }}</p> <p class="value">{{ viewDetail.graduationTime }}</p>
</div> </div>
<!-- <div class="cell" v-if="viewDetail.highestDegree"> <!-- <div class="cell" v-if="viewDetail.highestDegree">
<p class="label">最高学位</p> <p class="label">最高学位</p>
<p class="value">{{ viewDetail.highestDegree }}</p> <p class="value">{{ viewDetail.highestDegree }}</p>
</div> --> </div> -->
<!-- <div class="cell" v-if="viewDetail.awardingUnit"> <!-- <div class="cell" v-if="viewDetail.awardingUnit">
<p class="label">授予单位</p> <p class="label">授予单位</p>
<p class="value">{{ viewDetail.awardingUnit }}</p> <p class="value">{{ viewDetail.awardingUnit }}</p>
</div> --> </div> -->
<!-- <div class="cell" v-if="viewDetail.timeGrant"> <!-- <div class="cell" v-if="viewDetail.timeGrant">
<p class="label">授予时间</p> <p class="label">授予时间</p>
<p class="value">{{ viewDetail.timeGrant }}</p> <p class="value">{{ viewDetail.timeGrant }}</p>
</div> --> </div> -->
<div class="cell"> <div class="cell">
<p class="label">职称</p> <p class="label">职称</p>
<p class="value">{{ viewDetail.title }}</p> <p class="value">{{ viewDetail.title }}</p>
</div> </div>
<div class="cell"> <div class="cell">
<p class="label">单位类别</p> <p class="label">单位类别</p>
<p class="value"> <p class="value">
{{ {{
viewDetail.unitType === "1" viewDetail.unitType === "1"
? "企业" ? "企业"
: viewDetail.unitType === "2" : viewDetail.unitType === "2"
? "事业单位(专技人员)" ? "事业单位(专技人员)"
: viewDetail.unitType === "3" : viewDetail.unitType === "3"
? "劳务派遣" ? "劳务派遣"
: " " : " "
}} }}
</p> </p>
</div> </div>
<div class="cell"> <div class="cell">
<p class="label">职务/岗位</p> <p class="label">职务/岗位</p>
<p class="value">{{ viewDetail.post }}</p> <p class="value">{{ viewDetail.post }}</p>
</div> </div>
<div class="cell"> <div class="cell">
<p class="label">单位联系人</p> <p class="label">单位联系人</p>
<p class="value">{{ viewDetail.contactPerson }}</p> <p class="value">{{ viewDetail.contactPerson }}</p>
</div> </div>
<div class="cell"> <div class="cell">
<p class="label">单位联系电话</p> <p class="label">单位联系电话</p>
<p class="value">{{ viewDetail.contactNumber }}</p> <p class="value">{{ viewDetail.contactNumber }}</p>
</div> </div>
<div class="cell"> <div class="cell">
<p class="label">个人照片</p> <p class="label">个人照片</p>
<el-image style="height: 100px; max-width: 150px" :src="viewDetail.headPortrait" <el-image
:preview-src-list="[viewDetail.headPortrait]" :z-index="1000000" /> style="height: 100px; max-width: 150px"
</div> :src="viewDetail.headPortrait"
<div class="cell" v-if="viewDetail.payroll && viewDetail.unitType == '2'"> :preview-src-list="[viewDetail.headPortrait]"
<p class="label">工资变动审批表</p> :z-index="1000000"
<a class="download" target="_blank" :href="viewDetail.payroll">下载文件</a> />
</div> </div>
<div class="cell" v-if="viewDetail.payroll && viewDetail.unitType == '3'"> <div
<p class="label">劳务派遣合同个人签字和盖章</p> class="cell"
<el-image style="height: 100px; max-width: 150px" :src="viewDetail.payroll" v-if="viewDetail.payroll && viewDetail.unitType == '2'"
:preview-src-list="[viewDetail.payroll]" :z-index="7777777" /> >
</div> <p class="label">工资变动审批表</p>
<!-- <div class="cell" v-if="viewDetail.titleCertificate">--> <a class="download" target="_blank" :href="viewDetail.payroll"
<!-- <p class="label">职称证明</p>--> >下载文件</a
<!-- <el-image--> >
<!-- style="height: 100px; max-width: 150px"--> </div>
<!-- :src="viewDetail.titleCertificate"--> <div
<!-- :preview-src-list="[viewDetail.titleCertificate]"--> class="cell"
<!-- />--> v-if="viewDetail.payroll && viewDetail.unitType == '3'"
<!-- </div>--> >
<div class="cell" v-if="viewDetail.education"> <p class="label">劳务派遣合同个人签字和盖章</p>
<p class="label">学信网学历证明</p> <el-image
<el-image style="height: 100px; max-width: 150px" :src="viewDetail.education" style="height: 100px; max-width: 150px"
:preview-src-list="[viewDetail.education]" :z-index="7777777" /> :src="viewDetail.payroll"
</div> :preview-src-list="[viewDetail.payroll]"
<div class="cell" v-if="viewDetail.studentStatus"> :z-index="7777777"
<p class="label">学信网学籍证明</p> />
<el-image style="height: 100px; max-width: 150px" :src="viewDetail.studentStatus" :z-index="7777777" </div>
:preview-src-list="[viewDetail.studentStatus]" /> <!-- <div class="cell" v-if="viewDetail.titleCertificate">-->
</div> <!-- <p class="label">职称证明</p>-->
</div> <!-- <el-image-->
<span slot="footer" class="dialog-footer"> <!-- style="height: 100px; max-width: 150px"-->
<!-- 申请的单子有通过拒绝--> <!-- :src="viewDetail.titleCertificate"-->
<el-button v-if="viewRow.state === 1" type="danger" size="mini" round @click="deny(viewRow)">拒绝 <!-- :preview-src-list="[viewDetail.titleCertificate]"-->
</el-button> <!-- />-->
<!-- 通过 --> <!-- </div>-->
<el-button v-if="viewRow.state === 1" type="success" size="mini" round @click="pass(viewRow)">通过 <div class="cell" v-if="viewDetail.education">
</el-button> <p class="label">学信网学历证明</p>
</span> <el-image
</el-dialog> style="height: 100px; max-width: 150px"
<el-dialog title="操作记录" :visible.sync="recordShow" width="800px" :close-on-press-escape="false"> :src="viewDetail.education"
<div class="content"> :preview-src-list="[viewDetail.education]"
<div class="cell" v-for="item in record" :key="item.createTime"> :z-index="7777777"
<p class="label" style="margin-right: 20px"> />
{{ item.stateName }} </div>
<span v-if="item.reason">({{ item.reason }})</span> <div class="cell" v-if="viewDetail.studentStatus">
</p> <p class="label">学信网学籍证明</p>
<div class="info"> <el-image
<p class="item">操作人:{{ item.name }}</p> style="height: 100px; max-width: 150px"
<p class="item">操作时间:{{ item.createTime }}</p> :src="viewDetail.studentStatus"
</div> :z-index="7777777"
</div> :preview-src-list="[viewDetail.studentStatus]"
<p v-if="record.length === 0">暂无记录~</p> />
</div> </div>
</el-dialog> </div>
</div> <span slot="footer" class="dialog-footer">
<!-- 申请的单子有通过拒绝-->
<el-button
v-if="viewRow.state === 1"
type="danger"
size="mini"
round
@click="deny(viewRow)"
>拒绝
</el-button>
<!-- 通过 -->
<el-button
v-if="viewRow.state === 1"
type="success"
size="mini"
round
@click="pass(viewRow)"
>通过
</el-button>
</span>
</el-dialog>
<el-dialog
title="操作记录"
:visible.sync="recordShow"
width="800px"
:close-on-press-escape="false"
>
<div class="content">
<div class="cell" v-for="item in record" :key="item.createTime">
<p class="label" style="margin-right: 20px">
{{ item.stateName }}
<span v-if="item.reason">({{ item.reason }})</span>
</p>
<div class="info">
<p class="item">操作人:{{ item.name }}</p>
<p class="item">操作时间:{{ item.createTime }}</p>
</div>
</div>
<p v-if="record.length === 0">暂无记录~</p>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import TableTemplate from "@/components/Table"; import TableTemplate from "@/components/Table";
import { changeList } from "@/utils"; import { changeList } from "@/utils";
import { import {
getList, getList,
updateState, updateState,
get, get,
getRecord, getRecord,
getBranch, getBranch,
getType, getType,
educationState, educationState,
educationQuery, educationQuery,
} from "@/api/talents"; } from "@/api/talents";
import { Message } from "element-ui"; import { Message } from "element-ui";
import docxtemplater from "docxtemplater"; import docxtemplater from "docxtemplater";
...@@ -401,648 +604,664 @@ import JSZipUtils from "jszip-utils"; ...@@ -401,648 +604,664 @@ import JSZipUtils from "jszip-utils";
import { saveAs } from "file-saver"; import { saveAs } from "file-saver";
let stateArr = [ let stateArr = [
{ {
state: "", state: "",
stateName: "全部", stateName: "全部",
color: "", color: "",
}, },
{ {
state: 1, state: 1,
stateName: "待审核", stateName: "待审核",
type: "warning", type: "warning",
}, },
{ {
state: 2, state: 2,
stateName: "公示中", stateName: "公示中",
type: "warning", type: "warning",
}, },
{ {
state: 3, state: 3,
stateName: "已发码", stateName: "已发码",
type: "success", type: "success",
}, },
{ {
state: 4, state: 4,
stateName: "公示暂停", stateName: "公示暂停",
type: "info", type: "info",
}, },
{ {
state: 5, state: 5,
stateName: "审核拒绝", stateName: "审核拒绝",
type: "warning", type: "warning",
}, },
{ {
state: 6, state: 6,
stateName: "管理撤销", stateName: "管理撤销",
type: "danger", type: "danger",
}, },
{ {
state: 7, state: 7,
stateName: "强制更新", stateName: "强制更新",
type: "danger", type: "danger",
}, },
]; ];
export default { export default {
components: { TableTemplate }, components: { TableTemplate },
data() { data() {
return { return {
refuseDialog: false, refuseDialog: false,
refuseValue: "", refuseValue: "",
refuseTextarea: null, refuseTextarea: null,
refuseCode: "", refuseCode: "",
refuseOptions: [ refuseOptions: [
{ {
value: 1, value: 1,
label: "不符合全日制学历要求", label: "不符合全日制学历要求",
},
{
value: 2,
label: "请上传事业单位工资变动审批表",
},
{
value: 3,
label: "请上传有单位盖章的承诺书",
},
{
value: 4,
label: "您不属于人才码申报范围",
},
{
value: 5,
label: "请上传海外境外学历认证书",
},
{
value: 6,
label: "不符合人才码事业单位专业技术岗和企业全职人员的申报单位要求",
},
{
value: 7,
label: "请上传有单位盖章、本人签字的承诺书",
},
],
branchCode: "", // 管理后台给的code
code: "",
userName: "",
searchForm: {
name: "", // 姓名
phone: "", // 联系方式
unitName: "",
recordName: "",
state: "", // 状态
typeCode: "", // 认定类型
branchCode: "", // 责任部门
talentClassification: "", // 人才分类
socialPremiumLocation: "", // 社保缴纳地
},
loading: false,
// 状态
stateList: [
{
state: "",
stateName: "全部",
color: "",
},
{
state: 1,
stateName: "待审核",
type: "warning",
},
{
state: 2,
stateName: "公示中",
type: "warning",
},
{
state: 3,
stateName: "已发码",
type: "success",
},
// {
// state: 4,
// stateName: "公示暂停",
// type: "info",
// },
// {
// state: 5,
// stateName: "审核拒绝",
// type: "warning",
// },
{
state: 6,
stateName: "已撤销",
type: "danger",
},
{
state: 5,
stateName: "已拒绝",
type: "danger",
},
],
// 责任部门
branchList: [],
// 认定类型
typeList: [],
// 人才类型
talentsList: [
{
id: "",
label: "全部",
},
{
id: "1",
label: "乡土或创新人才",
},
{
id: "2",
label: "学历人才",
},
{
id: "3",
label: "技能人才",
},
{
id: "4",
label: "专技人才",
},
],
tableData: [],
tableColumns: [
{
key: "unitName",
label: "单位名称",
width: 250,
},
// {
// key: "talentCode",
// label: "申请编号",
// width: 200,
// },
{
key: "name",
label: "姓名",
width: 150,
},
// {
// key: "phone",
// label: "手机号",
// },
{
key: "categoryName",
label: "认定类型",
width: 100,
},
{
key: "contentName",
label: "申请内容",
width: 250,
},
{
key: "updateTime",
label: "更新时间",
width: 180,
},
{
key: "recordVOS[0].name",
label: "操作人",
width: 180,
},
],
pagination: {
total: 0,
pageSize: 10,
currentPage: 1,
},
viewShow: false,
viewDetail: {},
record: [],
recordShow: false,
showEdu: false,
eduList: [],
// 查看对话框当前row
viewRow: {},
};
},
watch: {
$route() {
if (this.$route) {
this.userName = localStorage.getItem('userName');
this.branchCode = this.$route.query.branchCode ? this.$route.query.branchCode : ''
this.code = this.$route.query.code ? this.$route.query.code : ''
this.searchForm.name = ''
this.searchForm.phone = ''
this.searchForm.typeCode = ''
this.searchForm.state = ''
this.searchForm.recordName = ''
this.searchForm.unitName = ''
this.init();
this.initType();
if (!this.branchCode) {
this.initBranch();
}
}
}
},
methods: {
switechBranch(branchCode) {
switch (branchCode) {
case "5":
return "镇江市区";
case "17":
return "丹阳市";
case "18":
return "句容市";
case "19":
return "扬中市";
}
}, },
init() { {
this.tableData = [] value: 2,
this.loading = true; label: "请上传事业单位工资变动审批表",
// console.log(1);
// console.log("this.branchCode---", this.branchCode);
let params = {
name: this.searchForm.name,
phone: this.searchForm.phone,
typeCode: this.searchForm.typeCode,
state: this.searchForm.state,
recordName: this.searchForm.recordName,
unitName: this.searchForm.unitName,
branchCode: this.branchCode ? this.branchCode : this.searchForm.branchCode,
pageNum: this.pagination.currentPage,
pageSize: this.pagination.pageSize,
talentClassification: this.searchForm.talentClassification, // 人才分类
socialPremiumLocation: this.switechBranch(this.code), // 社保缴纳地
};
// console.log("params-----", params);
getList(params).then((res) => {
this.loading = false;
if (res.success) {
this.pagination.total = res.data.total;
if (res.data.total) {
this.tableData = res.data.list.map((item) => {
// console.log("人才码列表----", item);
item.updateTime = item.updateTime.substring(0, 10);
item.stateName = this.getSatusArr(item.state).stateName;
item.type = this.getSatusArr(item.state).type;
return item;
});
var date = new Date();
var time = date.getTime();
var oneDay = 1000 * 60 * 60 * 24;
this.tableData = this.tableData.map((item) => {
item.overdue = Math.floor(
(time - new Date(item.updateTime).getTime()) / oneDay
);
return item;
});
if (localStorage.getItem('userName') == 'admin') {
this.tableData = changeList(this.tableData)
}
} else {
this.tableData = []
}
}
});
}, },
initType() { {
this.typeList = [{ value: 3,
typeCode: "", label: "请上传有单位盖章的承诺书",
typeName: "全部",
},]
getType({}).then((res) => {
this.typeList = this.typeList.concat(res.data);
});
}, },
initBranch() { {
this.branchList = [{ value: 4,
branchCode: "", label: "您不属于人才码申报范围",
branchName: "全部",
},]
getBranch({}).then((res) => {
this.branchList = this.branchList.concat(res.data);
console.log("this.branchList----", this.branchList);
});
}, },
jumpPage() { {
this.init(); value: 5,
label: "请上传海外境外学历认证书",
}, },
onSubmit() { {
this.pagination.currentPage = 1; value: 6,
this.init(); label: "不符合人才码事业单位专业技术岗和企业全职人员的申报单位要求",
}, },
view(row) { {
let params = { value: 7,
talentCode: row.talentCode, label: "请上传有单位盖章、本人签字的承诺书",
};
get(params).then((res) => {
this.viewDetail = res.data;
this.viewRow = row;
this.viewShow = true;
});
}, },
getRecord(row) { ],
let params = { branchCode: "", // 管理后台给的code
talentCode: row.talentCode, code: "",
}; userName: "",
getRecord(params).then((res) => { searchForm: {
this.record = res.data.map((item) => { name: "", // 姓名
item.stateName = this.getSatusArr(item.state) phone: "", // 联系方式
? this.getSatusArr(item.state).stateName unitName: "",
: "未知状态"; recordName: "",
return item; state: "", // 状态
}); typeCode: "", // 认定类型
this.recordShow = true; branchCode: "", // 责任部门
}); talentClassification: "", // 人才分类
socialPremiumLocation: "", // 社保缴纳地
},
loading: false,
// 状态
stateList: [
{
state: "",
stateName: "全部",
color: "",
}, },
print(talentCode, row) { {
// console.log("row---", row); state: 1,
get({ talentCode }).then((res) => { stateName: "待审核",
// console.log(res); type: "warning",
let arr = res.data;
arr.nation = arr.nation ? arr.nation : "";
arr.politicalFace = arr.politicalFace ? arr.politicalFace : "";
arr.major = arr.major ? arr.major : "";
// arr.highestDegree = arr.highestDegree ? arr.highestDegree : "";
arr.awardingUnit = arr.awardingUnit ? arr.awardingUnit : "";
arr.timeGrant = arr.timeGrant ? arr.timeGrant : "";
arr.unitTypeName = arr.unitType === "1" ? "企业" : "事业单位(专技人员)";
arr.sexName = arr.sex === 0 ? "男" : "女";
arr.adoptTime = row.state === 3 ? arr.adoptTime : "";
arr.promiseDes = arr.promise ? "已上传" : "未上传";
arr.pictureDes = arr.pictureList.length > 0 ? "已上传" : "未上传";
arr.educationDes = arr.education ? "已验证" : "未上传";
arr.studentStatusDes = arr.studentStatus ? "已验证" : "未上传";
let docxsrc = "./static/talents.docx"; //模板文件的位置
let docxname = "人才码审核表"; //导出文件的名字
// 读取并获得模板文件的二进制内容
JSZipUtils.getBinaryContent(docxsrc, function (error, content) {
// docxsrc是模板。我们在导出的时候,会根据此模板来导出对应的数据
// 抛出异常
if (error) {
throw error;
}
// 创建一个PizZip实例,内容为模板的内容
// console.log(content);
// console.log(error);
let zip = new PizZip(content);
// 创建并加载docx templater实例对象
let doc = new docxtemplater().loadZip(zip);
// 设置模板变量的值
doc.setData({
...arr, // e中的数据可以再模板中直接使用
});
try {
// 用模板变量的值替换所有模板变量
doc.render();
} catch (error) {
// 抛出异常
let e = {
message: error.message,
name: error.name,
stack: error.stack,
properties: error.properties,
};
console.log(
JSON.stringify({
error: e,
})
);
throw error;
}
// 生成一个代表docxtemplater对象的zip文件(不是一个真实的文件,而是在内存中的表示)
let out = doc.getZip().generate({
type: "blob",
mimeType:
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
});
// 将目标文件对象保存为目标类型的文件,并命名
saveAs(out, docxname);
});
});
}, },
pass(row) { {
if (this.viewDetail.educationState === 0) { state: 2,
this.$message.error("学历验证未通过,请先通过学历验证!"); stateName: "公示中",
return; type: "warning",
}
this.$confirm("确定通过该人才的申请吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let params = {
talentCode: row.talentCode,
userName: this.userName,
state: 2,
};
updateState(params).then((res) => {
console.log(res);
Message.success("审核通过");
this.viewShow = false;
this.init();
});
})
.catch(() => {
// console.log("取消审核");
});
}, },
passEducation() { {
if (this.viewDetail.educationState !== 0) return; state: 3,
educationState({ stateName: "已发码",
educationState: 1, type: "success",
talentCode: this.viewDetail.talentCode,
}).then((res) => {
// console.log("审核按钮res-----", res);
if (res.success) {
this.viewDetail.educationState = 1;
this.init();
} else {
this.$message.error(res.msg);
}
});
}, },
viewEdu() { // {
educationQuery({ // state: 4,
idCard: this.viewDetail.idCard, // stateName: "公示暂停",
name: this.viewDetail.name, // type: "info",
}).then((res) => { // },
if (res.success) { // {
if (res.data.data && res.data.data.length > 0) { // state: 5,
this.showEdu = true; // stateName: "审核拒绝",
this.eduList = res.data.data; // type: "warning",
} else { // },
this.$message.error(res.data.msg); {
} state: 6,
} else { stateName: "已撤销",
this.$message.error(res.msg); type: "danger",
}
});
}, },
refuseSelect(val) { {
// console.log("--------", val); state: 5,
this.refuseTextarea = val stateName: "已拒绝",
? this.refuseOptions.find((ele) => ele.value === val).label type: "danger",
: "";
}, },
// 拒绝对话框 ],
deny(talentCode) { // 责任部门
this.refuseDialog = true; branchList: [],
this.refuseCode = talentCode; // 认定类型
typeList: [],
// 人才类型
talentsList: [
{
id: "",
label: "全部",
}, },
cancelBtn() { {
this.refuseTextarea = null; id: "1",
this.refuseValue = ""; label: "乡土或创新人才",
this.refuseDialog = false;
}, },
successBtn() { {
if (this.refuseTextarea === null || this.refuseTextarea == "") { id: "2",
this.$message.error("未输入拒绝原因"); label: "学历人才",
} else {
// console.log("this.refuseTextarea----", this.refuseTextarea);
// console.log("this.refuseCode----", this.refuseCode);
let params = {
talentCode: this.refuseCode.talentCode,
userName: this.userName,
state: 5,
reason: this.refuseTextarea,
};
updateState(params).then((res) => {
console.log("res---", res);
Message.success("审核拒绝");
this.viewShow = false;
this.init();
});
this.refuseDialog = false;
}
}, },
// deny(talentCode) { {
// console.log('talentCode----',talentCode); id: "3",
label: "技能人才",
// this.$prompt("确定拒绝该人才的申请吗?确定的话,请输入拒绝原因。", "提示", { },
// confirmButtonText: "确定", {
// cancelButtonText: "取消", id: "4",
// inputPlaceholder: "请输入拒绝原因", label: "专技人才",
// inputType: "textarea", },
// }) ],
// .then(({ value }) => { tableData: [],
// if (!value) { tableColumns: [
// this.$message.error("未输入拒绝原因"); {
// } else { key: "unitName",
// let params = { label: "单位名称",
// talentCode, width: 250,
// userName: this.userName, },
// state: 5, // {
// reason: value, // key: "talentCode",
// }; // label: "申请编号",
// updateState(params).then((res) => { // width: 200,
// console.log(res); // },
// Message.success("审核拒绝"); {
// this.init(); key: "name",
// }); label: "姓名",
// } width: 150,
// }) },
// .catch(() => { // {
// console.log("取消"); // key: "phone",
// }); // label: "手机号",
// }, // },
pause(talentCode) { {
this.$confirm("确定暂停该人才的公示吗?", "提示", { key: "categoryName",
confirmButtonText: "确定", label: "认定类型",
cancelButtonText: "取消", width: 100,
type: "warning",
})
.then(() => {
let params = {
talentCode,
userName: this.userName,
state: 4,
};
updateState(params).then((res) => {
console.log(res);
Message.success("暂停成功");
this.init();
});
})
.catch(() => {
// console.log("取消暂停");
});
}, },
recover(talentCode) { {
this.$confirm("确定恢复该人才的公示吗?", "提示", { key: "contentName",
confirmButtonText: "确定", label: "申请内容",
cancelButtonText: "取消", width: 250,
type: "warning",
})
.then(() => {
let params = {
talentCode,
userName: this.userName,
state: 2,
};
updateState(params).then((res) => {
console.log(res);
Message.success("恢复成功");
this.init();
});
})
.catch(() => {
// console.log("取消恢复");
});
}, },
blacklist(talentCode) { {
this.$prompt( key: "updateTime",
"确定撤销该申请吗?此操作后去需要重亲提交申请!确定的话,请输入原因。", label: "更新时间",
"提示", width: 180,
{
confirmButtonText: "确定",
cancelButtonText: "取消",
inputPlaceholder: "请输入原因",
inputType: "textarea",
}
)
.then(({ value }) => {
if (!value) {
this.$message.error("未输入拒绝原因");
} else {
let params = {
talentCode,
userName: this.userName,
state: 6,
reason: value,
};
updateState(params).then((res) => {
console.log(res);
Message.success("撤销成功");
this.init();
});
}
})
.catch(() => {
// console.log("取消");
});
}, },
getSatusArr(state) { {
return stateArr.filter((item) => { key: "recordVOS[0].name",
return item.state === state; label: "操作人",
})[0]; width: 180,
}, },
}, ],
created() { pagination: {
this.userName = localStorage.getItem('userName'); total: 0,
this.branchCode = this.$route.query.branchCode ? this.$route.query.branchCode : '' pageSize: 10,
this.code = this.$route.query.code ? this.$route.query.code : '' currentPage: 1,
},
viewShow: false,
viewDetail: {},
record: [],
recordShow: false,
showEdu: false,
eduList: [],
// 查看对话框当前row
viewRow: {},
};
},
watch: {
$route() {
if (this.$route) {
this.userName = localStorage.getItem("userName");
this.branchCode = this.$route.query.branchCode
? this.$route.query.branchCode
: "";
this.code = this.$route.query.code ? this.$route.query.code : "";
this.searchForm.name = "";
this.searchForm.phone = "";
this.searchForm.typeCode = "";
this.searchForm.state = "";
this.searchForm.recordName = "";
this.searchForm.unitName = "";
this.init(); this.init();
this.initType(); this.initType();
if (!this.branchCode) { if (!this.branchCode) {
this.initBranch(); this.initBranch();
}
}
},
},
methods: {
switechBranch(branchCode) {
switch (branchCode) {
case "5":
return "镇江市区";
case "17":
return "丹阳市";
case "18":
return "句容市";
case "19":
return "扬中市";
}
},
init() {
this.tableData = [];
this.loading = true;
// console.log(1);
// console.log("this.branchCode---", this.branchCode);
let params = {
name: this.searchForm.name,
phone: this.searchForm.phone,
typeCode: this.searchForm.typeCode,
state: this.searchForm.state,
recordName: this.searchForm.recordName,
unitName: this.searchForm.unitName,
branchCode: this.branchCode
? this.branchCode
: this.searchForm.branchCode,
pageNum: this.pagination.currentPage,
pageSize: this.pagination.pageSize,
talentClassification: this.searchForm.talentClassification, // 人才分类
socialPremiumLocation: this.switechBranch(this.code), // 社保缴纳地
};
// console.log("params-----", params);
getList(params).then((res) => {
this.loading = false;
if (res.success) {
this.pagination.total = res.data.total;
if (res.data.total) {
this.tableData = res.data.list.map((item) => {
// console.log("人才码列表----", item);
item.updateTime = item.updateTime?.substring(0, 10);
item.stateName = this.getSatusArr(item.state).stateName;
item.type = this.getSatusArr(item.state).type;
return item;
});
var date = new Date();
var time = date.getTime();
var oneDay = 1000 * 60 * 60 * 24;
this.tableData = this.tableData.map((item) => {
item.overdue = Math.floor(
(time - new Date(item.updateTime).getTime()) / oneDay
);
return item;
});
if (localStorage.getItem("userName") == "admin") {
this.tableData = changeList(this.tableData);
}
} else {
this.tableData = [];
}
}
});
},
initType() {
this.typeList = [
{
typeCode: "",
typeName: "全部",
},
];
getType().then((res) => {
console.log(res);
if (res.code == 200) {
console.log("initType--->", res);
this.typeList = this.typeList.concat(res.data);
}
});
},
initBranch() {
this.branchList = [
{
branchCode: "",
branchName: "全部",
},
];
getBranch({}).then((res) => {
this.branchList = this.branchList.concat(res.data);
console.log("this.branchList----", this.branchList);
});
},
jumpPage() {
this.init();
},
onSubmit() {
this.pagination.currentPage = 1;
this.init();
},
view(row) {
let params = {
talentCode: row.talentCode,
};
get(params).then((res) => {
this.viewDetail = res.data;
this.viewRow = row;
this.viewShow = true;
});
},
getRecord(row) {
let params = {
talentCode: row.talentCode,
};
getRecord(params).then((res) => {
this.record = res.data.map((item) => {
item.stateName = this.getSatusArr(item.state)
? this.getSatusArr(item.state).stateName
: "未知状态";
return item;
});
this.recordShow = true;
});
},
print(talentCode, row) {
// console.log("row---", row);
get({ talentCode }).then((res) => {
// console.log(res);
let arr = res.data;
arr.nation = arr.nation ? arr.nation : "";
arr.politicalFace = arr.politicalFace ? arr.politicalFace : "";
arr.major = arr.major ? arr.major : "";
// arr.highestDegree = arr.highestDegree ? arr.highestDegree : "";
arr.awardingUnit = arr.awardingUnit ? arr.awardingUnit : "";
arr.timeGrant = arr.timeGrant ? arr.timeGrant : "";
arr.unitTypeName = arr.unitType === "1" ? "企业" : "事业单位(专技人员)";
arr.sexName = arr.sex === 0 ? "男" : "女";
arr.adoptTime = row.state === 3 ? arr.adoptTime : "";
arr.promiseDes = arr.promise ? "已上传" : "未上传";
arr.pictureDes = arr.pictureList.length > 0 ? "已上传" : "未上传";
arr.educationDes = arr.education ? "已验证" : "未上传";
arr.studentStatusDes = arr.studentStatus ? "已验证" : "未上传";
let docxsrc = "./static/talents.docx"; //模板文件的位置
let docxname = "人才码审核表"; //导出文件的名字
// 读取并获得模板文件的二进制内容
JSZipUtils.getBinaryContent(docxsrc, function (error, content) {
// docxsrc是模板。我们在导出的时候,会根据此模板来导出对应的数据
// 抛出异常
if (error) {
throw error;
}
// 创建一个PizZip实例,内容为模板的内容
// console.log(content);
// console.log(error);
let zip = new PizZip(content);
// 创建并加载docx templater实例对象
let doc = new docxtemplater().loadZip(zip);
// 设置模板变量的值
doc.setData({
...arr, // e中的数据可以再模板中直接使用
});
try {
// 用模板变量的值替换所有模板变量
doc.render();
} catch (error) {
// 抛出异常
let e = {
message: error.message,
name: error.name,
stack: error.stack,
properties: error.properties,
};
console.log(
JSON.stringify({
error: e,
})
);
throw error;
}
// 生成一个代表docxtemplater对象的zip文件(不是一个真实的文件,而是在内存中的表示)
let out = doc.getZip().generate({
type: "blob",
mimeType:
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
});
// 将目标文件对象保存为目标类型的文件,并命名
saveAs(out, docxname);
});
});
},
pass(row) {
if (this.viewDetail.educationState === 0) {
this.$message.error("学历验证未通过,请先通过学历验证!");
return;
}
this.$confirm("确定通过该人才的申请吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let params = {
talentCode: row.talentCode,
userName: this.userName,
state: 2,
};
updateState(params).then((res) => {
console.log(res);
Message.success("审核通过");
this.viewShow = false;
this.init();
});
})
.catch(() => {
// console.log("取消审核");
});
},
passEducation() {
if (this.viewDetail.educationState !== 0) return;
educationState({
educationState: 1,
talentCode: this.viewDetail.talentCode,
}).then((res) => {
// console.log("审核按钮res-----", res);
if (res.success) {
this.viewDetail.educationState = 1;
this.init();
} else {
this.$message.error(res.msg);
}
});
},
viewEdu() {
educationQuery({
idCard: this.viewDetail.idCard,
name: this.viewDetail.name,
}).then((res) => {
if (res.success) {
if (res.data.data && res.data.data.length > 0) {
this.showEdu = true;
this.eduList = res.data.data;
} else {
this.$message.error(res.data.msg);
}
} else {
this.$message.error(res.msg);
}
});
},
refuseSelect(val) {
// console.log("--------", val);
this.refuseTextarea = val
? this.refuseOptions.find((ele) => ele.value === val).label
: "";
},
// 拒绝对话框
deny(talentCode) {
this.refuseDialog = true;
this.refuseCode = talentCode;
},
cancelBtn() {
this.refuseTextarea = null;
this.refuseValue = "";
this.refuseDialog = false;
},
successBtn() {
if (this.refuseTextarea === null || this.refuseTextarea == "") {
this.$message.error("未输入拒绝原因");
} else {
// console.log("this.refuseTextarea----", this.refuseTextarea);
// console.log("this.refuseCode----", this.refuseCode);
let params = {
talentCode: this.refuseCode.talentCode,
userName: this.userName,
state: 5,
reason: this.refuseTextarea,
};
updateState(params).then((res) => {
console.log("res---", res);
Message.success("审核拒绝");
this.viewShow = false;
this.init();
});
this.refuseDialog = false;
}
},
// deny(talentCode) {
// console.log('talentCode----',talentCode);
// this.$prompt("确定拒绝该人才的申请吗?确定的话,请输入拒绝原因。", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// inputPlaceholder: "请输入拒绝原因",
// inputType: "textarea",
// })
// .then(({ value }) => {
// if (!value) {
// this.$message.error("未输入拒绝原因");
// } else {
// let params = {
// talentCode,
// userName: this.userName,
// state: 5,
// reason: value,
// };
// updateState(params).then((res) => {
// console.log(res);
// Message.success("审核拒绝");
// this.init();
// });
// }
// })
// .catch(() => {
// console.log("取消");
// });
// },
pause(talentCode) {
this.$confirm("确定暂停该人才的公示吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let params = {
talentCode,
userName: this.userName,
state: 4,
};
updateState(params).then((res) => {
console.log(res);
Message.success("暂停成功");
this.init();
});
})
.catch(() => {
// console.log("取消暂停");
});
},
recover(talentCode) {
this.$confirm("确定恢复该人才的公示吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let params = {
talentCode,
userName: this.userName,
state: 2,
};
updateState(params).then((res) => {
console.log(res);
Message.success("恢复成功");
this.init();
});
})
.catch(() => {
// console.log("取消恢复");
});
},
blacklist(talentCode) {
this.$prompt(
"确定撤销该申请吗?此操作后去需要重亲提交申请!确定的话,请输入原因。",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
inputPlaceholder: "请输入原因",
inputType: "textarea",
} }
)
.then(({ value }) => {
if (!value) {
this.$message.error("未输入拒绝原因");
} else {
let params = {
talentCode,
userName: this.userName,
state: 6,
reason: value,
};
updateState(params).then((res) => {
console.log(res);
Message.success("撤销成功");
this.init();
});
}
})
.catch(() => {
// console.log("取消");
});
},
getSatusArr(state) {
return stateArr.filter((item) => {
return item.state === state;
})[0];
}, },
},
created() {
this.userName = localStorage.getItem("userName");
this.branchCode = this.$route.query.branchCode
? this.$route.query.branchCode
: "";
this.code = this.$route.query.code ? this.$route.query.code : "";
this.init();
this.initType();
if (!this.branchCode) {
this.initBranch();
}
},
}; };
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '~@/stylus/common'; @import '~@/stylus/common';
.table-wrapper1{ .table-wrapper1{
...@@ -1135,4 +1354,3 @@ export default { ...@@ -1135,4 +1354,3 @@ export default {
border-radius: 2px; border-radius: 2px;
} }
</style> </style>
\ No newline at end of file
const env = process.env.NODE_ENV === "production"; const env = process.env.NODE_ENV === "production";
const publicPath = env ? "/manage-h5/" : "/"; //正式 // const publicPath = env ? "/manage-h5/" : "/"; //正式
// const publicPath = env ? "/smartExam-h5/" : "/"; //测试 const publicPath = env ? "/smartExam-h5/" : "/"; //测试
module.exports = { module.exports = {
publicPath, publicPath,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment