Commit 84764eff by songwenlu

gx

parent 9400f471
{
"editor.suggest.snippetsPreventQuickSuggestions": false
"editor.suggest.snippetsPreventQuickSuggestions": false,
"nuxt.isNuxtApp": false
}
\ No newline at end of file
......@@ -7,14 +7,14 @@ import {
formatParams1,
config
} from '@/utils/request'
import { baseUrl } from '@/config/index'
// import { baseUrl } from '@/config/index'
/**
* 查询列表
*/
export function getList(params) {
return api(Object.assign(formatParams('POST', params), {
url: `/admin-api/familyCode/queryList`
url: `${config.proxy}/admin-api/familyCode/queryList`
}))
}
......@@ -23,7 +23,7 @@ export function getList(params) {
*/
export function get(params) {
return api(Object.assign(formatParams('GET', params), {
url: `/admin-api/familyCode/detail`
url: `${config.proxy}/admin-api/familyCode/detail`
}))
}
......@@ -32,16 +32,22 @@ export function get(params) {
*/
export function getType() {
return api(Object.assign(formatParams('POST',), {
url: `${baseUrl}/admin-api/familyCode/queryZjCity`
url: `${config.proxy}/admin-api/familyCode/queryZjCity`
}))
}
/**
* 查询状态
*/
export function getType1() {
return api(Object.assign(formatParams('POST'), {
url: `${baseUrl}/admin-api/familyCode/reviewState`
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`
}))
}
......@@ -59,7 +65,7 @@ export function updateState(params) {
*/
export function getRecord(params) {
return api(Object.assign(formatParams('GET', params), {
url: `${baseUrl}/admin-api/familyCode/queryRecordList`
url: `${config.proxy}/admin-api/familyCode/queryRecordList`
}))
}
......
......@@ -3,9 +3,9 @@ import { Message } from "element-ui";
import { getToken } from "@/utils/auth";
const config = {
// proxy: 'http://192.168.3.144:9089/', // 本地
proxy: "https://exam.smart-zj.cn:9100/exam/", // 新线上地址
// proxy: "http://81.69.231.72:9089/", // 测试地址
proxy: 'http://192.168.3.87:8881', // 本地
// proxy: "https://exam.smart-zj.cn:9100/exam/", // 新线上地址
// proxy: "http://81.69.231.72:9089", // 测试地址
};
//axios基本配置
......
......@@ -7,7 +7,10 @@
class="search_form"
style="text-align: left; margin-bottom: 10px"
>
<el-form-item label="姓名" label-width="200">
<el-form-item
label="姓名"
label-width="200"
>
<el-input
v-model="searchForm.name"
placeholder="请输入姓名"
......@@ -44,7 +47,7 @@
placeholder="请输入状态码"
>
<el-option
v-for="item in options1"
v-for="item in reviewStateOptions"
:key="item.value"
:label="item.label"
:value="item.value"
......@@ -53,7 +56,10 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
<el-button
type="primary"
@click="onSubmit"
>查询</el-button>
</el-form-item>
</el-form>
</div>
......@@ -66,39 +72,60 @@
:pagination="pagination"
@Jump="jumpPage"
>
<el-table-column fixed="right" label="操作" width="380" align="left">
<template slot-scope="scope">
<el-button type="primary" size="mini" round @click="view(scope.row)"
>查看</el-button
<el-table-column
fixed="right"
label="操作"
width="380"
align="left"
>
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
round
@click="view(scope.row)"
>查看</el-button>
<el-button
type="warning"
size="mini"
round
@click="getRecord(scope.row)"
>记录</el-button
>
>记录</el-button>
<el-button
v-if="scope.row.state=='待审核'"
type="success"
size="mini"
round
@click="auditHandle(scope.row,'0')"
>通过</el-button>
<el-button
type="danger"
size="mini"
round
v-if="scope.row.state=='待审核'"
@click="auditHandle(scope.row,'1')"
>拒绝</el-button>
<!-- 公示期的单子可以暂停公示 -->
<el-button
<!-- <el-button
v-if="scope.row.state === 2"
type="warning"
size="mini"
round
@click="pause(scope.row.talentCode)"
>暂停公示</el-button
>
> -->
<!-- 暂停公示的单子可以恢复公示 -->
<el-button
<!-- <el-button
v-if="scope.row.state === 4"
type="success"
size="mini"
round
@click="recover(scope.row.talentCode)"
>恢复公示</el-button
>
> -->
<!-- 审核通过后的单子都可以拉入黑名单撤销 -->
<el-button
<!-- <el-button
v-if="
scope.row.state === 2 ||
scope.row.state === 3 ||
......@@ -109,14 +136,14 @@
round
@click="blacklist(scope.row.talentCode)"
>撤销</el-button
>
> -->
<!-- 审核通过后的单子都可以打印-->
<el-button
<!-- <el-button
size="mini"
round
@click="print(scope.row.talentCode, scope.row)"
>打印</el-button
>
> -->
</template>
</el-table-column>
</table-template>
......@@ -125,51 +152,77 @@
<!-- 拒绝对话框 -->
<el-dialog
title="提示"
:visible.sync="refuseDialog"
title="审核"
:visible.sync="auditDialog"
width="30%"
class="refuseDialog"
class="auditDialog"
:before-close="cancelBtn"
>
<span v-if="flag == 0"
>确定拒绝该人才的申请吗?确定的话请<span style="color: red"
>选择或输入</span
>拒绝原因</span
>
<span v-else>确定通过该人才的申请吗?</span>
<div class="refuseTex" v-if="flag == 0">
<!-- 通过0 拒绝1 -->
<div v-if="flag == 1">
<span>确定拒绝该家庭码的申请吗?确定的话请<span style="color: red">选择和输入</span>拒绝原因</span>
<div style="margin-top:15px">
<el-input
type="textarea"
autosize
:autosize="{ minRows: 4, maxRows: 4}"
placeholder="请输入拒绝原因"
v-model="refuseTextarea"
v-model="auditData.record"
>
</el-input>
</div>
</div>
<div v-else>
<span>确定通过该家庭码的申请吗?确定的话请<span style="color: red">选择通过状态</span>和输入说明</span>
<el-form
:model="auditData"
label-width="80px"
ref="form"
>
<el-form-item label="状态码">
<el-select
v-model="refuseValue"
placeholder="请选择拒绝原因"
@change="refuseSelect"
v-model="auditData.state"
placeholder="请选择通过状态"
>
<el-option
v-for="item in refuseOptions"
v-for="item in passOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="说明"
prop="record"
>
<el-input
type="textarea"
placeholder="请输入说明"
v-model="auditData.record"
:autosize="{ minRows: 4, maxRows: 4}"
>
</el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<span
slot="footer"
class="dialog-footer"
>
<el-button @click="cancelBtn">取 消</el-button>
<el-button type="primary" @click="successBtn">确 定</el-button>
<el-button
type="primary"
@click="confirmBtn"
>确 定</el-button>
</span>
</el-dialog>
<!-- 人才详情的对话框 -->
<el-dialog
title="人才详情"
title="家庭详情"
:visible.sync="viewShow"
width="800px"
:close-on-press-escape="false"
......@@ -232,15 +285,18 @@
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<span
slot="footer"
class="dialog-footer"
>
<!-- 申请的单子有通过拒绝-->
<el-button type="danger" size="mini" round @click="deny(viewRow)"
<!-- <el-button type="danger" size="mini" round @click="deny(viewRow)"
>拒绝
</el-button>
</el-button> -->
<!-- 通过 -->
<el-button type="success" size="mini" round @click="pass(viewRow)"
<!-- <el-button type="success" size="mini" round @click="pass(viewRow)"
>通过
</el-button>
</el-button> -->
</span>
</el-dialog>
<el-dialog
......@@ -251,8 +307,15 @@
>
<div class="content">
<template v-if="record && record.length > 0">
<div class="cell" :key="index" v-for="(item, index) in record">
<p class="label" style="margin-right: 20px">
<div
class="cell"
:key="index"
v-for="(item, index) in record"
>
<p
class="label"
style="margin-right: 20px"
>
{{ item?.state }}
<span v-if="item?.record">({{ item?.record }})</span>
</p>
......@@ -265,240 +328,103 @@
<p v-else>暂无记录~</p>
</div>
</el-dialog>
</div>
</template>
<script>
import TableTemplate from '@/components/Table';
import TableTemplate from "@/components/Table";
// import { changeList } from '@/utils';
import {
getList,
updateState,
get,
getRecord,
getBranch,
getType,
getType1,
educationState,
educationQuery,
} from '@/api/talents';
import { Message } from 'element-ui';
import docxtemplater from 'docxtemplater';
import PizZip from 'pizzip';
import JSZipUtils from 'jszip-utils';
import { saveAs } from 'file-saver';
let stateArr = [
{
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: 7,
stateName: '强制更新',
type: 'danger',
},
];
getReviewState,
familyAudit,
} from "@/api/talents";
// import { Message } from "element-ui";
export default {
components: { TableTemplate },
data() {
return {
refuseDialog: false,
refuseValue: '',
auditDialog: false,
refuseValue: "",
refuseTextarea: null,
refuseCode: '',
refuseOptions: [
{
value: 1,
label: '不符合全日制学历要求',
},
{
value: 2,
label: '请上传事业单位工资变动审批表',
},
{
value: 3,
label: '请上传有单位盖章的承诺书',
},
{
value: 4,
label: '您不属于人才码申报范围',
},
{
value: 5,
label: '请上传海外境外学历认证书',
},
{
value: 6,
label: '不符合人才码事业单位专业技术岗和企业全职人员的申报单位要求',
},
{
value: 7,
label: '请上传有单位盖章、本人签字的承诺书',
},
],
refuseCode: "",
// 居住地址
options: [],
// 状态吗
options1: [],
branchCode: '', // 管理后台给的code
code: '',
userName: '',
reviewStateOptions: [],
branchCode: "", // 管理后台给的code
code: "",
userName: "",
searchForm: {
name: '', // 姓名
phone: '', // 联系方式
areaCode: '', // 居住地址
stateCode: '', // 状态
name: "", // 姓名
phone: "", // 联系方式
areaCode: "", // 居住地址
stateCode: "", // 状态
},
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',
// 审核状态
auditData: {
state: "",
stateCode: "",
record: "", //评语
departName: "卫健委",
familyCode: "",
},
],
// 责任部门
branchList: [],
// 认定类型
typeList: [],
// 人才类型
talentsList: [
{
id: '',
label: '全部',
},
{
id: '1',
label: '乡土或创新人才',
},
{
id: '2',
label: '学历人才',
},
{
id: '3',
label: '技能人才',
},
{
id: '4',
label: '专技人才',
},
],
tableData: [],
tableColumns: [
{
key: 'area',
label: '居住地址',
key: "familyCode",
label: "家庭码",
width: 250,
},
{
key: 'familyCode',
label: '家庭码',
key: "area",
label: "居住地址",
width: 250,
},
{
key: 'haveChildren',
label: '是否有孩子',
key: "haveChildren",
label: "是否有孩子",
width: 250,
},
{
key: 'idCard',
label: '证件',
key: "idCard",
label: "证件",
width: 250,
},
{
key: 'marriageState',
label: '婚姻状况',
key: "marriageState",
label: "婚姻状况",
width: 250,
},
{
key: 'name',
label: '姓名',
key: "name",
label: "姓名",
width: 250,
},
{
key: 'phone',
label: '手机号',
key: "phone",
label: "手机号",
width: 250,
},
{
key: 'state',
label: '状态描述',
key: "state",
label: "状态描述",
width: 250,
},
{
key: 'workUnit',
label: '工作单位',
key: "workUnit",
label: "工作单位",
width: 250,
},
],
......@@ -516,6 +442,7 @@ export default {
// 查看对话框当前row
viewRow: {},
flag: 0,
passOptions: [], //审核通过的状态
};
},
watch: {
......@@ -544,14 +471,14 @@ export default {
methods: {
switechBranch(branchCode) {
switch (branchCode) {
case '5':
return '镇江市区';
case '17':
return '丹阳市';
case '18':
return '句容市';
case '19':
return '扬中市';
case "5":
return "镇江市区";
case "17":
return "丹阳市";
case "18":
return "句容市";
case "19":
return "扬中市";
}
},
init() {
......@@ -588,29 +515,33 @@ export default {
});
});
},
initType1() {
getType1().then((res) => {
console.log(res);
this.options1 = res.data.map((item) => {
initReviewState() {
getReviewState(0).then((res) => {
this.reviewStateOptions = res.data.map((item) => {
return {
label: item.state,
value: item.code,
};
});
});
},
initBranch() {
this.branchList = [
{
branchCode: '',
branchName: '全部',
},
];
getBranch({}).then((res) => {
this.branchList = this.branchList.concat(res.data);
console.log('this.branchList----', this.branchList);
getReviewState(1).then((res) => {
let arr = [];
res.data.forEach((item) => {
if (item.state != "不符合") {
arr.push({
label: item.state,
value: item.code,
});
}
});
this.passOptions = arr;
console.log(this.passOptions, "pass");
});
},
jumpPage() {
this.init();
},
......@@ -637,305 +568,75 @@ export default {
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() {
this.flag = 1;
this.refuseDialog = true;
// this.refuseCode = row;
// if (this.viewDetail.educationState === 0) {
// this.$message.error('学历验证未通过,请先通过学历验证!');
// return;
// }
// this.flag = 1;
// 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
: '';
auditHandle(row, flag) {
this.flag = flag;
this.auditData.familyCode = row.familyCode;
this.auditDialog = true;
},
// 拒绝对话框
deny(talentCode) {
this.flag = 0;
this.refuseDialog = true;
this.auditDialog = 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.refuseValue = "";
this.auditDialog = false;
},
confirmBtn() {
if (this.flag == 0) {
// 通过
if (this.auditData.state) {
familyAudit(this.auditData).then((res) => {
if (res.code == 200) {
this.$message.success(res.msg || "审核成功");
this.auditDialog = false;
this.init();
});
this.refuseDialog = false;
}else{
this.$message.success(res.msg || "审核失败");
}
},
// 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',
} else {
this.$message.warning("请先选择审批状态");
}
)
.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.auditData.state = "不符合";
this.auditData.stateCode = "002";
familyAudit(this.auditData).then((res) => {
if (res.code == 200) {
console.log(res, 111);
this.$message.success(res.msg || "审核成功");
this.auditDialog = false;
this.init();
});
} else {
this.$message.success(res.msg || "审核失败");
}
})
.catch(() => {
// console.log("取消");
});
},
getSatusArr(state) {
return stateArr.filter((item) => {
return item.state === state;
})[0];
}
},
},
mounted() {},
created() {
this.userName = localStorage.getItem('userName');
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.code = this.$route.query.code ? this.$route.query.code : "";
this.init();
this.initType();
this.initType1();
// if (!this.branchCode) {
// this.initBranch();
// }
this.initReviewState();
},
};
</script>
<style lang="stylus" scoped>
@import '~@/stylus/common';
.table-wrapper1{
.table-wrapper1 {
margin-top: 20px;
padding: 15px;
background: #fff;
......@@ -945,9 +646,11 @@ export default {
max-height: calc(100vh - 320px);
overflow: auto;
}
.el-form-item {
margin-right:5px
margin-right: 5px;
}
.early, .warning {
width: 28px;
height: 28px;
......@@ -1004,17 +707,6 @@ export default {
}
}
.refuseDialog {
/deep/.el-select {
width: 100%;
margin: 20px 0;
}
/deep/textarea {
height: 100px !important;
}
}
::-webkit-scrollbar {
width: 5px;
height: 5px;
......@@ -1024,4 +716,9 @@ export default {
background-color: #a1a3a9;
border-radius: 2px;
}
.state {
display: flex;
align-items: center;
}
</style>
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