parent
b328f1574c
commit
df103e7be7
@ -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,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,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,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>
|
||||
Loading…
Reference in new issue