master
xy 3 years ago
parent b328f1574c
commit df103e7be7

@ -1,5 +1,5 @@
import request from "@/utils/request";
import qs from 'qs';
export function index(params,isLoading = true){
return request({
url:"/api/admin/progress/index",
@ -41,6 +41,9 @@ export function init(data,isLoading = true){
url:"/api/admin/progress/init",
method:"post",
isLoading,
data
data:qs.stringify(data),
headers:{
'Content-Type':'application/x-www-form-urlencoded'
}
})
}

@ -0,0 +1,53 @@
import request from "@/utils/request";
import { download } from "@/utils/downloadRequest";
export function index(params,isLoading = true){
return request({
url:"/api/admin/recruit/index",
method:"get",
isLoading,
params
})
}
export function show(params,isLoading = true){
return request({
url:"/api/admin/recruit/show",
method:"get",
isLoading,
params
})
}
export function save(data,isLoading = true){
return request({
url:"/api/admin/recruit/save",
method:"post",
data,
isLoading
})
}
export function destroy(params,isLoading = true){
return request({
url:"/api/admin/recruit/destroy",
method:"get",
params,
isLoading
})
}
export function imports(data,isLoading = true){
return request({
url:"/api/admin/recruit/import",
method:"post",
data,
isLoading
})
}
export async function exports(params){
await download('/api/admin/recruit/export','get',params,`统招生管理-${params.year}`)
}

@ -1,5 +1,5 @@
import request from "@/utils/request";
import qs from 'qs';
export function index(params,isLoading = true){
return request({
url:"/api/admin/year_socre/index",
@ -22,8 +22,11 @@ export function save(data,isLoading = true){
return request({
url:"/api/admin/year_socre/save",
method:"post",
data,
isLoading
data:qs.stringify(data),
isLoading,
headers:{
'Content-Type':'application/x-www-form-urlencoded'
}
})
}

@ -60,6 +60,7 @@ export default {
},
showChange(e){
this.$emit('update:isShow',e)
this.$emit('on-visible-change',e)
},
validate(){
return new Promise((resolve,reject)=>{

@ -1,32 +1,47 @@
const progressStatus = [
{
id: 1,
value: "待投档",
},
{
id: 2,
value: "录取中",
},
{
id: 3,
value: "录取结束",
},
{
id: 4,
value: "已邮寄通知书",
},
];
const data = {
"progressStatus":[
{
id: 1,
value: "待投档",
},
{
id: 2,
value: "录取中",
},
{
id: 3,
value: "录取结束",
},
{
id: 4,
value: "已邮寄通知书",
},
],
"templateType":[
{
id: 1,
value: "文本",
type:"text"
},
{
id:2,
value:"年份",
type:"year"
}
]
}
function getProgressStatus(type = "array") {
function getConst(name,type = "array") {
let arr = data[name]
if (type === "array") {
return progressStatus;
return arr;
}
if (type === "map") {
let map = new Map();
progressStatus.forEach((item) => {
arr.forEach((item) => {
map.set(item.id, item.value);
});
return map;
}
}
export { getProgressStatus };
export { getConst };

@ -0,0 +1,92 @@
import axios from 'axios'
import { getToken } from '@/utils/auth'
import { Loading, Message } from 'element-ui'
/*
* @params {string} url 请求拼接地址
* @params {object} info 请求参数params或data
*/
let loading;
export async function download(url,method='get',info,filename){
loading = Loading.service({
lock:true,
background:"rgba(0,0,0,0.4)",
text:"文件正在生成中..."
})
let options = {
baseURL:process.env.VUE_APP_BASE_API,
url,
method,
responseType: 'blob',
timeout:10000,
headers: {
Accept: 'application/json','Content-Type':'application/json; charset=utf-8',
withCredentials: true,
Authorization:"Bearer " + getToken()
},
}
if(method === 'get'){
Object.defineProperty(options,'params',{
value:info,
enumerable:true,
writable:false
})
}
if(method === 'post'){
Object.defineProperty(options,'data',{
value:info,
enumerable:true,
writable:false
})
}
try {
const response = await axios.request(options)
loading.close()
// 提取文件名
if(!filename){
filename = response.headers['content-disposition']?.match(
/filename=(.*)/
)[1] || ''
}
// 将二进制流转为blob
const blob = new Blob([response.data], { type: 'application/octet-stream' })
if (typeof window.navigator.msSaveBlob !== 'undefined') {
// 兼容IEwindow.navigator.msSaveBlob以本地方式保存文件
window.navigator.msSaveBlob(blob, decodeURI(filename))
} else {
// 创建新的URL并指向File对象或者Blob对象的地址
const blobURL = window.URL.createObjectURL(blob)
// 创建a标签用于跳转至下载链接
const tempLink = document.createElement('a')
tempLink.style.display = 'none'
tempLink.href = blobURL
tempLink.setAttribute('download', decodeURI(filename))
// 兼容某些浏览器不支持HTML5的download属性
if (typeof tempLink.download === 'undefined') {
tempLink.setAttribute('target', '_blank')
}
// 挂载a标签
document.body.appendChild(tempLink)
tempLink.click()
document.body.removeChild(tempLink)
// 释放blob URL地址
window.URL.revokeObjectURL(blobURL)
}
}catch (err){
console.error(err)
loading.close()
Message({
type:'error',
message:err
})
}
}

@ -1,26 +1,54 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增统招进度' : '编辑统招进度'" :form="form" :rules="rules" @submit="submit">
<xy-dialog
ref="dialog"
:is-show.sync="isShow"
type="form"
:title="type === 'add' ? '新增统招进度' : '编辑统招进度'"
:form="form"
:rules="rules"
@submit="submit"
>
<template v-slot:year>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>
年份
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.year" type="year" placeholder="请选择年份" style="width: 300px;" value-format="yyyy"></el-date-picker>
<el-date-picker
v-model="form.year"
type="year"
placeholder="请选择年份"
style="width: 300px"
value-format="yyyy"
></el-date-picker>
</div>
</div>
</template>
<template v-slot:province_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>
省份
</div>
<div class="xy-table-item-content">
<el-select v-model="form.province_id" clearable placeholder="请选择省份 " style="width: 300px;">
<el-option v-for="item in province_ids" :key="item.id" :label="item.name" :value="item.id"></el-option>
<el-select
v-model="form.province_id"
clearable
placeholder="请选择省份 "
style="width: 300px"
>
<el-option
v-for="item in province_ids"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
@ -28,43 +56,66 @@
<template v-slot:status_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>
进度
</div>
<div class="xy-table-item-content">
<el-select v-model="form.status_id" clearable placeholder="请选择进度 " style="width: 300px;">
<el-option v-for="item in getProgressStatus('array')" :key="item.id" :label="item.value" :value="item.id"></el-option>
<el-select
v-model="form.status_id"
clearable
placeholder="请选择进度 "
style="width: 300px"
>
<el-option
v-for="item in getConst('progressStatus', 'array')"
:key="item.id"
:label="item.value"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:start_date>
<div class="xy-table-item">
<div class="xy-table-item-label">
开始时间
</div>
<div class="xy-table-item-label">开始时间 </div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.start_date" placeholder="请选择开始时间" style="width: 300px;" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker
v-model="form.start_date"
placeholder="请选择开始时间"
style="width: 300px"
value-format="yyyy-MM-dd"
></el-date-picker>
</div>
</div>
</template>
<template v-slot:end_date>
<div class="xy-table-item">
<div class="xy-table-item-label">
结束时间
</div>
<div class="xy-table-item-label">结束时间 </div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.end_date" placeholder="请选择结束时间" style="width: 300px;" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker
v-model="form.end_date"
placeholder="请选择结束时间"
style="width: 300px"
value-format="yyyy-MM-dd"
></el-date-picker>
</div>
</div>
</template>
<template v-slot:remark>
<div class="xy-table-item">
<div class="xy-table-item-label">
备注
</div>
<div class="xy-table-item-label">备注 </div>
<div class="xy-table-item-content">
<el-input type="textarea" :autosize="{minRows:2}" v-model="form.remark " clearable placeholder="请输入备注 " style="width: 300px;" />
<el-input
type="textarea"
:autosize="{ minRows: 2 }"
v-model="form.remark"
clearable
placeholder="请输入备注 "
style="width: 300px"
/>
</div>
</div>
</template>
@ -73,103 +124,104 @@
</template>
<script>
import {
show,
save
} from '@/api/unifiedRecruitment/progress';
import { getProgressStatus } from "@/const"
export default {
props:{
province_ids: {
type:Array,
default:()=>[]
},
import { show, save } from "@/api/unifiedRecruitment/progress";
import { getConst } from "@/const";
export default {
props: {
province_ids: {
type: Array,
default: () => [],
},
data() {
return {
isShow: false,
id: '',
type: '',
},
data() {
return {
isShow: false,
id: "",
type: "",
form: {
year: "",
province_id: "",
status_id: "",
start_date: "",
end_date: "",
remark: "",
},
rules: {
year: [{
form: {
year: "",
province_id: "",
status_id: "",
start_date: "",
end_date: "",
remark: "",
},
rules: {
year: [
{
required: true,
message: "请填写年份"
}],
province_id: [{
message: "请填写年份",
},
],
province_id: [
{
required: true,
message: "请填写省份"
}],
status_id: [{
message: "请填写省份",
},
],
status_id: [
{
required: true,
message: "请填写进度"
}],
}
}
},
methods: {
getProgressStatus,
async getDetail() {
const res = await show({
id:this.id
})
this.$integrateData(this.form, res)
message: "请填写进度",
},
],
},
};
},
methods: {
getConst,
submit() {
if(this.type === 'add'){
if(this.form.hasOwnProperty('id')){
delete this.form.id
}
}
if (this.type === 'editor') {
Object.defineProperty(this.form, 'id', {
value: this.id,
enumerable: true,
configurable: true,
writable: true
})
async getDetail() {
const res = await show({
id: this.id,
});
this.$integrateData(this.form, res);
},
submit() {
if (this.type === "add") {
if (this.form.hasOwnProperty("id")) {
delete this.form.id;
}
save(this.form).then(res => {
this.$successMessage(this.type, '')
this.isShow = false
this.$emit('refresh')
})
}
if (this.type === "editor") {
Object.defineProperty(this.form, "id", {
value: this.id,
enumerable: true,
configurable: true,
writable: true,
});
}
save(this.form).then((res) => {
this.$successMessage(this.type, "");
this.isShow = false;
this.$emit("refresh");
});
},
watch: {
isShow(val) {
if (val) {
if (this.type === 'editor') {
this.getDetail()
}
} else {
this.id = ''
this.type = ''
this.$refs['dialog'].reset()
delete this.form.id
},
watch: {
isShow(val) {
if (val) {
if (this.type === "editor") {
this.getDetail();
}
},
"form.year"(val){
this.form.year = "" + val
} else {
this.id = "";
this.type = "";
this.$refs["dialog"].reset();
delete this.form.id;
}
}
}
},
"form.year"(val) {
this.form.year = "" + val;
},
},
};
</script>
<style scoped lang="scss">
::v-deep .el-input__inner {
text-align: left;
}
::v-deep .el-input__inner {
text-align: left;
}
</style>

@ -0,0 +1,78 @@
<script>
import { show as templateShow } from "@/api/unifiedRecruitment/template";
import { show, save } from "@/api/unifiedRecruitment/recruit";
export default {
render(h) {
return (
<Modal
title={this.type === "add" ? "新增统招生" : "编辑统招生"}
width="54"
value={this.isShow}
loading={true}
on={{
["on-visible-change"]: (e) => this.$emit("update:isShow", e),
}}
>
{
this.getTable()
}
</Modal>
);
},
props: {
isShow: {
type: Boolean,
default: false,
},
},
data() {
return {
type: "",
form: {},
originalForm: {
year: `${2022}`,
},
slots: {},
};
},
methods: {
async getTemplate() {
const res = await templateShow(
{
year: this.originalForm.year,
},
true
);
if (res?.fileds) {
res?.fileds.forEach((item) => {
this.form[item.en] = "";
});
}
this.$forceUpdate()
},
getTable(){
let temp = [];
for(let key in this.form){
temp.push(
<el-input v-model={this.form[key]}></el-input>
)
}
return temp
}
},
watch: {
async isShow(newVal) {
if (newVal) {
await this.getTemplate();
}
},
},
created() {
//this.getTemplate()
},
};
</script>

@ -0,0 +1,287 @@
<template>
<div>
<xy-dialog
ref="dialog"
:is-show.sync="isShow"
type="form"
:title="type === 'add' ? '新增统招生' : '编辑统招生'"
:form="form"
:rules="rules"
@submit="submit"
>
<template v-slot:extraFormTop>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>
年份
</div>
<div class="xy-table-item-content">
<el-date-picker
type="year"
v-model="originalForm.year"
placeholder="请选择年份"
style="width: 300px"
value-format="yyyy"
@change="getTemplate"
></el-date-picker>
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>
省份
</div>
<div class="xy-table-item-content">
<el-select
v-model="form.province_id"
clearable
placeholder="请选择省份 "
style="width: 300px"
>
<el-option
v-for="item in province_ids"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>
姓名
</div>
<div class="xy-table-item-content">
<el-input
v-model="form.name"
clearable
placeholder="请输入姓名 "
style="width: 300px"
/>
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>
身份证号
</div>
<div class="xy-table-item-content">
<el-input
v-model="form.idcard"
clearable
placeholder="请输入身份证号 "
style="width: 300px"
/>
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>
考生号
</div>
<div class="xy-table-item-content">
<el-input
v-model="form.candidate_no"
clearable
placeholder="请输入考生号 "
style="width: 300px"
/>
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>
准考证号
</div>
<div class="xy-table-item-content">
<el-input
v-model="form.allow_no"
clearable
placeholder="请输入准考证号 "
style="width: 300px"
/>
</div>
</div>
</template>
<template v-for="(val,key) in form" v-slot:[key]>
<div>{val}</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import { show as templateShow } from "@/api/unifiedRecruitment/template";
import { show, save } from "@/api/unifiedRecruitment/recruit";
export default {
props: {
province_ids: {
type: Array,
default: () => [],
},
},
data() {
let idcardValidate = (rule, value, callback) => {
let IDRe18 =
/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
let IDre15 =
/^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;
if (value) {
if (IDre15.test(value) || IDRe18.test(value)) {
callback();
} else {
callback(new Error("身份证格式错误"));
}
} else {
callback(new Error("请填写身份证号"));
}
};
return {
isShow: false,
id: "",
type: "",
originalForm: {
year: new Date().getFullYear() + '',
province_id: "",
name: "",
idcard: "",
candidate_no: "",
allow_no: "",
},
form:{
},
rules: {
year: [
{
required: true,
message: "请填写年份",
},
],
province_id: [
{
required: true,
message: "请填写省份",
},
],
name: [
{
required: true,
message: "请填写姓名",
},
],
idcard: [
{
validator: idcardValidate
},
],
candidate_no: [
{
required: true,
message: "请填写考生号",
},
],
allow_no: [
{
required: true,
message: "请填写准考证号",
},
],
},
};
},
methods: {
async getTemplate(){
const res = await templateShow({
year:this.originalForm.year
},true)
if(res?.fileds){
res?.fileds.forEach(item => {
Object.defineProperty(this.form,item.en,{
enumerable:true,
writable:true,
configurable:true,
value:""
})
})
}
},
async getDetail() {
const res = await show({ id: this.id }, true);
this.$integrateData(this.form, res);
},
submit() {
if (this.type === "add") {
if (this.form.hasOwnProperty("id")) {
delete this.form.id;
}
}
if (this.type === "editor") {
Object.defineProperty(this.form, "id", {
value: this.id,
enumerable: true,
configurable: true,
writable: true,
});
}
save(this.form).then((res) => {
this.$successMessage(this.type, "");
this.isShow = false;
this.$emit("refresh");
});
},
},
watch: {
isShow(val) {
if (val) {
this.getTemplate()
if (this.type === "editor") {
this.getDetail();
}
} else {
this.id = "";
this.type = "";
this.$refs["dialog"].reset();
delete this.form.id;
}
},
"originalForm.year"(newVal) {
this.originalForm.year = newVal + "";
},
},
created() {
}
};
</script>
<style scoped lang="scss">
::v-deep .el-input__inner {
text-align: left;
}
</style>

@ -74,9 +74,9 @@ export default {
},
methods: {
async getDetail() {
const res = await show(true, {
const res = await show({
id: this.id,
});
},true);
this.$integrateData(this.form, res);
},
@ -114,6 +114,9 @@ export default {
delete this.form.id;
}
},
"form.year"(newVal){
this.form.year = newVal + ''
}
},
};
</script>

@ -1,21 +1,35 @@
<template>
<div>
<Modal
title="模板设置"
width="52"
:value="isShow"
:loading="true"
@on-ok="submit"
@on-visible-change="(e) => $emit('update:isShow', e)"
title="模板设置"
width="80"
:value="isShow"
:loading="true"
@on-ok="submit"
@on-visible-change="(e) => $emit('update:isShow', e)"
>
<xy-table ref="xyTable" :is-page="false" :action="show" res-prop="fields" :req-opt="{id}" :table-item="table"></xy-table>
<el-tabs v-model="activeName">
<el-tab-pane label="录取考生" name="first">
<el-button type="primary" size="small" @click="add"></el-button>
<xy-table
ref="xyTable"
:list="list"
:table-item="table"
style="margin-top: 10px"
:is-page="false"
>
<template v-slot:btns></template>
</xy-table>
</el-tab-pane>
</el-tabs>
</Modal>
</div>
</template>
<script>
import { index } from '@/api/unifiedRecruitment/templateFiled'
import { show } from '@/api/unifiedRecruitment/template'
import { index, save, destroy } from "@/api/unifiedRecruitment/templateFiled";
import { show } from "@/api/unifiedRecruitment/template";
import { getConst } from "@/const";
export default {
props: {
isShow: {
@ -25,37 +39,242 @@ export default {
},
data() {
return {
id:'',
select: {
},
form: {
},
table:[
flag: ["年份", "姓名", "身份证号", "考生号", "准考证号"],
visiblePopover: false,
popIndex: "",
id: "",
activeName: "first",
select: {},
form: {},
list: [],
originalList: [
{
name:"年份",
student_query:1,
type:2,
remark:"无"
},
{
name:"姓名",
student_query:1,
type:1,
remark:"无"
},
{
name:"身份证号",
student_query:1,
type:1,
remark:"无"
},
{
name:"考生号",
student_query:1,
type:1,
remark:"无"
},
{
name:"准考证号",
student_query:1,
type:1,
remark:"无"
},
],
table: [
{
label: "列名",
width: 140,
customFn: (row) => {
return (
<el-input
v-model={row.name}
placeholder="请输入列名"
size="small"
disabled={this.flag.indexOf(row.name) !== -1}
></el-input>
);
},
},
{
label: "学生可查",
width: 90,
customFn: (row) => {
return (
<el-checkbox
true-label={1}
false-label={0}
v-model={row.student_query}
disabled={this.flag.indexOf(row.name) !== -1}
></el-checkbox>
);
},
},
{
label: "数据类型",
width: 140,
customFn: (row) => {
return (
<el-select
v-model={row.type}
size="mini"
placeholder="请选择类型"
disabled={this.flag.indexOf(row.name) !== -1}
>
{getConst("templateType", "array").map((item) => {
return (
<el-option
key={item.id}
value={item.id}
label={item.value}
></el-option>
);
})}
</el-select>
);
},
},
{
label: "说明",
minWidth: 240,
align: "left",
customFn: (row) => {
return (
<el-input
disabled={this.flag.indexOf(row.name) !== -1}
v-model={row.remark}
type="textarea"
autosize={{ minRows: 2 }}
></el-input>
);
},
},
{
label: "操作",
minWidth: 200,
align: "left",
customFn: (row, { $index }) => {
return (
<div
style={{
display: "flex",
"justify-content": "flex-start",
"align-items": "center",
"flex-wrap": "wrap",
}}
>
{this.flag.indexOf(row.name) === -1 ? (
<el-button
type="primary"
size="mini"
style={{
"margin-right": "4px",
}}
on={{
["click"]: (e) => {
save(row).then((res) => {
this.$message({
type: "success",
message: "列添加成功",
});
this.getDetail();
});
},
}}
>
确认
</el-button>
) : (
""
)}
{this.flag.indexOf(row.name) === -1 ? (
<el-popover
placement="top"
width="160"
value={$index === this.popIndex}
>
<p>这是一段内容这是一段内容确定删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text">
取消
</el-button>
<el-button
type="primary"
size="mini"
on={{
["click"]: (e) => {
if (row.id) {
destroy({
id: row.id,
}).then((res) => {
this.$message({
type: "success",
message: "列删除成功",
});
this.getDetail();
});
} else {
this.list.splice($index, 1);
}
},
}}
>
确定
</el-button>
</div>
]
<el-button
size="mini"
type="danger"
slot="reference"
on={{
["mouseenter"]: (e) => {
this.popIndex = $index;
},
}}
>
删除
</el-button>
</el-popover>
) : (
""
)}
</div>
);
},
},
],
};
},
methods: {
id() {
return id
async getDetail() {
const res = await show({
id: this.id,
});
this.list = [...this.originalList,...res.fileds];
},
show,
submit(){
add() {
this.list.push({
name: "",
type: "",
student_query: 0,
remark: "",
template_id: this.id,
});
},
}
submit() {},
},
computed: {},
watch: {
isShow(newVal) {
if (newVal) {
this.$refs['xyTable'].getTableData()
this.getDetail();
} else {
this.id = "";
}
},
},
};
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

@ -22,7 +22,12 @@
></el-date-picker>
</template>
<template v-slot:init>
<Button style="margin-left: 10px" type="primary" @click="isShowInit = true">初始化</Button>
<Button
style="margin-left: 10px"
type="primary"
@click="isShowInit = true"
>初始化</Button
>
</template>
<template v-slot:create>
<Button
@ -68,23 +73,23 @@
<script>
import { authMixin } from "@/mixin/authMixin";
import { index as provinceIndex } from "@/api/manage/province";
import { index,destroy } from "@/api/unifiedRecruitment/progress";
import { getProgressStatus } from "@/const";
import { index, destroy } from "@/api/unifiedRecruitment/progress";
import { getConst } from "@/const";
import addProgress from "./component/addProgress.vue";
import init from "./component/init.vue"
import init from "./component/init.vue";
export default {
mixins: [authMixin],
components: {
addProgress,
init
init,
},
data() {
return {
provinces: [],
isShowInit:false,
select:{
year:''
isShowInit: false,
select: {
year: "",
},
table: [
{
@ -110,7 +115,7 @@ export default {
label: "进度",
width: 140,
formatter: (cell, data, val) => {
let map = getProgressStatus("map");
let map = getConst("progressStatus", "map");
return map.get(val);
},
},
@ -139,10 +144,13 @@ export default {
index,
destroy,
async getProvinces() {
const res = await provinceIndex({
page: 1,
page_size: 9999,
},false);
const res = await provinceIndex(
{
page: 1,
page_size: 9999,
},
false
);
this.provinces = res.data;
},
},

@ -0,0 +1,157 @@
<template>
<div>
<div ref="lxHeader">
<lx-header
icon="md-apps"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
text="统招生管理"
>
<div slot="content"></div>
<slot>
<header-content :auths="auths_auth_mixin">
<template v-slot:search>
<div style="display: flex; align-items: center">
<el-date-picker
size="small"
type="year"
placement="bottom"
placeholder="年份选择"
style="width: 160px; margin-right: 6px"
value-format="yyyy"
v-model="select.year"
></el-date-picker>
<el-input
v-model="select.keyword"
style="width: 160px; margin-right: 6px"
size="small"
placeholder="关键词搜索"
></el-input>
<Button type="primary" @click="$refs['xyTable'].getTableData()"
>搜索</Button
>
</div>
</template>
<template v-slot:create>
<Button
type="primary"
@click="($refs['addRecruit'].type = 'add'), (isShowAdd = true)"
>新建</Button
>
</template>
</header-content>
</slot>
</lx-header>
</div>
<xy-table
ref="xyTable"
:req-opt="select"
:action="index"
:table-item="table"
:auths="auths_auth_mixin"
:destroy-action="destroy"
@editor="
(row) => {
$refs['addRecruit'].id = row.id;
$refs['addRecruit'].type = 'editor';
isShowAdd = true;
}
"
></xy-table>
<addRecruit
:is-show.sync="isShowAdd"
:province_ids="provinces"
ref="addRecruit"
@refresh="$refs['xyTable'].getTableData()"
></addRecruit>
</div>
</template>
<script>
import { index, destroy } from "@/api/unifiedRecruitment/recruit";
import { authMixin } from "@/mixin/authMixin";
import { index as provinceIndex } from "@/api/manage/province";
import addRecruit from "./component/addRecruit.vue";
export default {
mixins: [authMixin],
components: {
addRecruit,
},
data() {
return {
isShowAdd: false,
provinces: [],
select: {
year: "",
keyword: "",
},
table: [
{
prop: "year",
label: "年份",
width: 100,
sortable: "custom",
},
{
prop: "name",
label: "姓名",
width: 120,
},
{
prop: "province_id",
label: "省份",
width: 120,
formatter: (cell, data, val) => {
return (
this.provinces.filter((item) => item.id === val)[0]?.name ?? ""
);
},
},
{
prop: "idcard",
label: "省份证号",
width: 180,
sortable: "custom",
},
{
prop: "candidate_no",
label: "考生号",
width: 180,
sortable: "custom",
},
{
prop: "allow_no",
label: "准考证号",
width: 180,
sortable: "custom",
},
],
};
},
methods: {
index,
destroy,
async getProvinces() {
const res = await provinceIndex(
{
page: 1,
page_size: 9999,
},
false
);
this.provinces = res.data;
},
},
computed: {},
created() {
this.getProvinces();
},
};
</script>
<style scoped lang="scss"></style>

@ -43,17 +43,25 @@
:destroy-action="destroy"
:table-item="table"
:auths="auths_auth_mixin"
@editor=""
@editor="
(row) => {
$refs['addTemplate'].id = row.id;
$refs['addTemplate'].type = 'editor';
$refs['addTemplate'].isShow = true;
}
"
>
<template v-slot:setting="scope">
<Button
size="small"
type="primary"
ghost
@click="e => {
$refs['setting'].id = scope.row.id
isShowSetting = true
}"
size="small"
type="primary"
ghost
@click="
(e) => {
$refs['setting'].id = scope.row.id;
isShowSetting = true;
}
"
>模版设置</Button
>
</template>

@ -41,12 +41,16 @@
文件
</div>
<div class="xy-table-item-content">
<div v-if="form.avatar" style="position: relative;">
<img :src="form.avatar" class="avatar">
<Button class="img__delete" icon="md-close" shape="circle" size="small" type="error" @click="form.file_ids = ''"></Button>
</div>
<el-upload v-else :action="action" :before-upload="uploadBefore" :limit="1" :on-error="uploadFail" :on-success="uploadSuccess" :show-file-list="true" accept="picture" class="avatar-uploader" list-type="picture-card">
<i class="el-icon-plus avatar-uploader-icon"></i>
<el-upload
class="upload-demo"
:action="action"
:before-upload="uploadBefore"
:on-error="uploadFail"
:on-success="uploadSuccess"
multiple
:limit="5">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div>
</el-upload>
</div>
</div>

Loading…
Cancel
Save