parent
e7368ed818
commit
8b12ab06d9
@ -0,0 +1,36 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function index(isLoading = true,params){
|
||||
return request({
|
||||
url:"/api/admin/province/index",
|
||||
method:"get",
|
||||
isLoading,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function show(isLoading = true,params){
|
||||
return request({
|
||||
url:"/api/admin/province/show",
|
||||
method:"get",
|
||||
isLoading,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data){
|
||||
return request({
|
||||
url:"/api/admin/province/save",
|
||||
method:"post",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params){
|
||||
return request({
|
||||
url:"/api/admin/province/destroy",
|
||||
method:"get",
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@ -0,0 +1,36 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function index(isLoading = true,params){
|
||||
return request({
|
||||
url:"/api/admin/specialize/index",
|
||||
method:"get",
|
||||
isLoading,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function show(isLoading = true,params){
|
||||
return request({
|
||||
url:"/api/admin/specialize/show",
|
||||
method:"get",
|
||||
isLoading,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data){
|
||||
return request({
|
||||
url:"/api/admin/specialize/save",
|
||||
method:"post",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params){
|
||||
return request({
|
||||
url:"/api/admin/specialize/destroy",
|
||||
method:"get",
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function index(isLoading = true,params){
|
||||
return request({
|
||||
url:"/api/admin/progress/index",
|
||||
method:"get",
|
||||
isLoading,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function show(isLoading = true,params){
|
||||
return request({
|
||||
url:"/api/admin/progress/show",
|
||||
method:"get",
|
||||
isLoading,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data){
|
||||
return request({
|
||||
url:"/api/admin/progress/save",
|
||||
method:"post",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params){
|
||||
return request({
|
||||
url:"/api/admin/progress/destroy",
|
||||
method:"get",
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function init(isLoading = true,data){
|
||||
return request({
|
||||
url:"/api/admin/progress/init",
|
||||
method:"post",
|
||||
isLoading,
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
auths:{
|
||||
type:Array,
|
||||
default:()=>[]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
render(){
|
||||
let _this = this
|
||||
//权限排序后(让按钮排序)
|
||||
let temp = JSON.parse(JSON.stringify(this.auths))
|
||||
if(temp.indexOf('search') !== -1){
|
||||
console.log(temp.indexOf('search'))
|
||||
temp.splice(temp.indexOf('search'),1)
|
||||
temp.unshift('search')
|
||||
}
|
||||
|
||||
console.log(temp)
|
||||
return (
|
||||
<div style={
|
||||
{
|
||||
'display':'flex',
|
||||
'flex-warp':'wrap'
|
||||
}
|
||||
}>
|
||||
<div style={
|
||||
{
|
||||
'margin-right':'10px'
|
||||
}
|
||||
}>
|
||||
{ _this.$scopedSlots.default ? _this.$scopedSlots.default() : '' }
|
||||
</div>
|
||||
{
|
||||
temp.map((item,index) => {
|
||||
if(_this.$scopedSlots[item]){
|
||||
return (
|
||||
<div style={
|
||||
{
|
||||
'margin-right':'10px'
|
||||
}
|
||||
}>
|
||||
{ _this.$scopedSlots[item](item,index) }
|
||||
</div>
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@
|
||||
const progressStatus = [
|
||||
{
|
||||
id: 1,
|
||||
value: "待投档",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
value: "录取中",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
value: "录取结束",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
value: "已邮寄通知书",
|
||||
},
|
||||
];
|
||||
|
||||
function getProgressStatus(type = "array") {
|
||||
if (type === "array") {
|
||||
return progressStatus;
|
||||
}
|
||||
if (type === "map") {
|
||||
let map = new Map();
|
||||
progressStatus.forEach((item) => {
|
||||
map.set(item.id, item.value);
|
||||
});
|
||||
return map;
|
||||
}
|
||||
}
|
||||
export { getProgressStatus };
|
||||
@ -0,0 +1,13 @@
|
||||
export const authMixin = {
|
||||
data(){
|
||||
return {
|
||||
auths_auth_mixin:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if(this.$route.meta.auths.length > 0 && this.$route.meta.auths[0]){
|
||||
this.auths_auth_mixin = this.$route.meta.auths
|
||||
}
|
||||
console.log(this.auths_auth_mixin)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,101 @@
|
||||
<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:create>
|
||||
<Button type="primary" @click="$refs['addProvince'].isShow = true"
|
||||
>新建</Button
|
||||
>
|
||||
</template>
|
||||
</header-content>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
|
||||
<xy-table
|
||||
ref="xyTable"
|
||||
:table-item="table"
|
||||
:action="index"
|
||||
:auths="auths_auth_mixin"
|
||||
@editor="row => {
|
||||
$refs['addProvince'].id = row.id;
|
||||
$refs['addProvince'].type = 'editor';
|
||||
$refs['addProvince'].isShow = true
|
||||
}"
|
||||
@delete="row => {
|
||||
destroy({
|
||||
id:row.id
|
||||
}).then(res => {
|
||||
$successMessage('destroy','省份')
|
||||
$refs['xyTable'].getTableData()
|
||||
})
|
||||
}"
|
||||
></xy-table>
|
||||
|
||||
<addProvince
|
||||
ref="addProvince"
|
||||
@refresh="$refs['xyTable'].getTableData(true)"
|
||||
></addProvince>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { index,destroy } from "@/api/manage/province";
|
||||
import { authMixin } from "@/mixin/authMixin";
|
||||
|
||||
import addProvince from "@/views/manage/component/addProvince.vue";
|
||||
export default {
|
||||
mixins: [authMixin],
|
||||
components: {
|
||||
addProvince,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
table: [
|
||||
{
|
||||
prop: "id",
|
||||
label: "序号",
|
||||
width: 78,
|
||||
sortable: "custom"
|
||||
},
|
||||
{
|
||||
prop: "name",
|
||||
label: "名称",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
prop: "english",
|
||||
label: "拼音/英文",
|
||||
width: 140,
|
||||
},
|
||||
{
|
||||
prop: "code",
|
||||
label: "编码",
|
||||
width: 120,
|
||||
sortable: "custom"
|
||||
},
|
||||
{
|
||||
prop: "remark",
|
||||
label: "备注",
|
||||
minWth: 220,
|
||||
align: "left",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
index,
|
||||
destroy,
|
||||
},
|
||||
computed: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@ -0,0 +1,101 @@
|
||||
<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:create>
|
||||
<Button
|
||||
type="primary"
|
||||
@click="
|
||||
($refs['addSpecialize'].type = 'add'),
|
||||
($refs['addSpecialize'].isShow = true)
|
||||
"
|
||||
>新建</Button
|
||||
>
|
||||
</template>
|
||||
</header-content>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
|
||||
<xy-table
|
||||
ref="xyTable"
|
||||
:action="index"
|
||||
:table-item="table"
|
||||
:auths="auths_auth_mixin"
|
||||
@editor="row => {
|
||||
$refs['addSpecialize'].id = row.id;
|
||||
$refs['addSpecialize'].type = 'editor';
|
||||
$refs['addSpecialize'].isShow = true
|
||||
}"
|
||||
@delete="row => {
|
||||
destroy({
|
||||
id:row.id
|
||||
}).then(res => {
|
||||
$successMessage('destroy','专业')
|
||||
$refs['xyTable'].getTableData()
|
||||
})
|
||||
}"
|
||||
></xy-table>
|
||||
|
||||
<add-specialize
|
||||
ref="addSpecialize"
|
||||
@refresh="$refs['xyTable'].getTableData(true)"
|
||||
></add-specialize>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { authMixin } from "@/mixin/authMixin";
|
||||
import { index,destroy } from "@/api/manage/specialize";
|
||||
|
||||
import addSpecialize from "./component/addSpecialize.vue";
|
||||
export default {
|
||||
mixins: [authMixin],
|
||||
components: {
|
||||
addSpecialize,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
table: [
|
||||
{
|
||||
prop: "id",
|
||||
label: "序号",
|
||||
width: 78,
|
||||
sortable: "custom",
|
||||
},
|
||||
{
|
||||
prop: "name",
|
||||
label: "专业名称",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
prop: "code",
|
||||
label: "专业编码",
|
||||
sortable: "custom",
|
||||
width: 140,
|
||||
},
|
||||
{
|
||||
prop: "remark",
|
||||
label: "备注",
|
||||
align: "left",
|
||||
minWidth: 220,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
index,
|
||||
destroy,
|
||||
},
|
||||
computed: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div>
|
||||
<Modal width="52" :value="isShow" @on-visible-change="e => $emit('update:isShow',e)">
|
||||
<div>
|
||||
<el-date-picker
|
||||
size="small"
|
||||
type="year"
|
||||
placement="bottom"
|
||||
placeholder="年份选择"
|
||||
style="width: 160px"
|
||||
value-format="yyyy"
|
||||
v-model="select.year"
|
||||
@change="$refs['xyTable'].getTableData()"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
<xy-table ref="xyTable" :action="index" :req-opt="select" :is-page="false" :table-item="table">
|
||||
<template v-slot:btns></template>
|
||||
</xy-table>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { index } from "@/api/unifiedRecruitment/progress"
|
||||
import {getProgressStatus} from "@/const";
|
||||
export default {
|
||||
props:{
|
||||
isShow:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
provinces: {
|
||||
type:Array,
|
||||
default:() => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select:{
|
||||
year:"",
|
||||
page_size:9999
|
||||
},
|
||||
table:[
|
||||
{
|
||||
width:60,
|
||||
align:'center',
|
||||
headerAlign:'center',
|
||||
type:"selection"
|
||||
},
|
||||
{
|
||||
prop: "province_id",
|
||||
label: "省份",
|
||||
width: 140,
|
||||
formatter: (cell, data, val) => {
|
||||
return (
|
||||
this.provinces.filter((item) => {
|
||||
return val === item.id;
|
||||
})[0]?.name || val
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: "start_date",
|
||||
label: "开始时间",
|
||||
minWidth: 160,
|
||||
sortable: "custom",
|
||||
},
|
||||
{
|
||||
prop: "end_date",
|
||||
label: "结束时间",
|
||||
minWidth: 160,
|
||||
sortable: "custom",
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
index,
|
||||
},
|
||||
computed: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -0,0 +1,153 @@
|
||||
<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>
|
||||
<el-date-picker
|
||||
size="small"
|
||||
type="year"
|
||||
placement="bottom"
|
||||
placeholder="年份选择"
|
||||
style="width: 160px"
|
||||
value-format="yyyy"
|
||||
v-model="select.year"
|
||||
@change="$refs['xyTable'].getTableData()"
|
||||
></el-date-picker>
|
||||
</template>
|
||||
<template v-slot:init>
|
||||
<Button style="margin-left: 10px" type="primary" @click="isShowInit = true">初始化</Button>
|
||||
</template>
|
||||
<template v-slot:create>
|
||||
<Button
|
||||
type="primary"
|
||||
@click="
|
||||
($refs['addProgress'].type = 'add'),
|
||||
($refs['addProgress'].isShow = 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"
|
||||
@editor="
|
||||
(row) => {
|
||||
$refs['addProgress'].id = row.id;
|
||||
$refs['addProgress'].type = 'editor';
|
||||
$refs['addProgress'].isShow = true;
|
||||
}
|
||||
"
|
||||
></xy-table>
|
||||
|
||||
<addProgress
|
||||
ref="addProgress"
|
||||
:province_ids="provinces"
|
||||
@refresh="$refs['xyTable'].getTableData(true)"
|
||||
></addProgress>
|
||||
|
||||
<init :is-show.sync="isShowInit" :provinces="provinces"></init>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { authMixin } from "@/mixin/authMixin";
|
||||
import { index as provinceIndex } from "@/api/manage/province";
|
||||
import { index } from "@/api/unifiedRecruitment/progress";
|
||||
import { getProgressStatus } from "@/const";
|
||||
|
||||
import addProgress from "./component/addProgress.vue";
|
||||
import init from "./component/init.vue"
|
||||
export default {
|
||||
mixins: [authMixin],
|
||||
components: {
|
||||
addProgress,
|
||||
init
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
provinces: [],
|
||||
isShowInit:false,
|
||||
select:{
|
||||
year:''
|
||||
},
|
||||
table: [
|
||||
{
|
||||
prop: "year",
|
||||
label: "年份",
|
||||
width: 140,
|
||||
sortable: "custom",
|
||||
},
|
||||
{
|
||||
prop: "province_id",
|
||||
label: "省份",
|
||||
width: 140,
|
||||
formatter: (cell, data, val) => {
|
||||
return (
|
||||
this.provinces.filter((item) => {
|
||||
return val === item.id;
|
||||
})[0]?.name || val
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: "status_id",
|
||||
label: "进度",
|
||||
width: 140,
|
||||
formatter: (cell, data, val) => {
|
||||
let map = getProgressStatus("map");
|
||||
return map.get(val);
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: "start_date",
|
||||
label: "开始时间",
|
||||
width: 160,
|
||||
sortable: "custom",
|
||||
},
|
||||
{
|
||||
prop: "end_date",
|
||||
label: "结束时间",
|
||||
width: 160,
|
||||
sortable: "custom",
|
||||
},
|
||||
{
|
||||
prop: "remark",
|
||||
label: "其他说明",
|
||||
align: "left",
|
||||
minWidth: 220,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
index,
|
||||
async getProvinces() {
|
||||
const res = await provinceIndex(false, {
|
||||
page: 1,
|
||||
page_size: 9999,
|
||||
});
|
||||
this.provinces = res.data;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getProvinces();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Loading…
Reference in new issue