master
xy 3 years ago
parent 58da0d8c7b
commit ce400bfef9

@ -1,5 +1,5 @@
<script>
import { index as filedIndex} from "@/api/unifiedRecruitment/templateFiled"
import { index as filedIndex } from "@/api/unifiedRecruitment/templateFiled";
import { show as templateShow } from "@/api/unifiedRecruitment/template";
import { show, save } from "@/api/unifiedRecruitment/recruit";
@ -26,29 +26,43 @@ export default {
>
取消
</Button>
<Button type="primary" on={{ ["click"]: (e) => {
this.$refs["oriElForm"].validate().then((res) => {
if (res) {
this.$refs["elForm"].validate().then((res) => {
Object.defineProperty(this.originalForm, "fileds", {
enumerable: true,
writable: true,
configurable: false,
value: this.form,
});
<Button
type="primary"
on={{
["click"]: (e) => {
this.$refs["oriElForm"].validate().then((res) => {
if (res) {
this.$refs["elForm"].validate().then((res) => {
if (this.type === "editor") {
Object.defineProperty(this.originalForm, "id", {
enumerable: true,
writable: true,
configurable: false,
value: this.id,
});
}
save(this.originalForm).then((res) => {
this.$message({
type: "success",
message: res.msg,
Object.defineProperty(this.originalForm, "fileds", {
enumerable: true,
writable: true,
configurable: false,
value: this.form,
});
save(this.originalForm).then((res) => {
this.$message({
type: "success",
message: res.msg,
});
this.$emit("refresh");
this.$emit("update:isShow", false);
});
this.$emit("refresh");
this.$emit("update:isShow", false);
});
});
}
});
} }}>
}
});
},
}}
>
确认
</Button>
</div>
@ -68,13 +82,11 @@ export default {
clearable={true}
v-model={this.originalForm.template_item_id}
placeholder="请选择模板"
on={
{
['change']:e => {
this.getTemplate()
}
}
}
on={{
["change"]: (e) => {
this.getTemplate();
},
}}
>
{this.templateItems.map((item) => {
return (
@ -93,11 +105,12 @@ export default {
<el-date-picker
clearable={true}
placeholder="请选择年份"
v-model={this.originalForm.year}
value={String(this.originalForm.year)}
type="year"
value-format="yyyy"
on={{
["change"]: (e) => {
this.originalForm.year = e;
this.getTemplate();
},
}}
@ -223,7 +236,7 @@ export default {
default: false,
},
province_ids: Array,
templateItems:Array,
templateItems: Array,
},
data() {
let idcardValidate = (rule, value, callback) => {
@ -238,6 +251,7 @@ export default {
}
};
return {
id: "",
type: "",
//
@ -253,7 +267,7 @@ export default {
candidate_no: "",
allow_no: "",
template_id: "",
template_item_id:""
template_item_id: "",
},
originalRules: {
year: [{ required: true, message: "请选择年份", trigger: "blur" }],
@ -275,13 +289,21 @@ export default {
};
},
methods: {
async getDetail() {
const res = await show({
id: this.id,
});
console.log("data", res);
this.$integrateData(this.originalForm, res);
this.$integrateData(this.form, res.fileds);
},
async getTemplate() {
const res = await filedIndex(
{
template_item_id: this.originalForm.template_item_id,
template_id:this.originalForm.template_id,
page:1,
page_size:999
template_id: this.originalForm.template_id,
page: 1,
page_size: 999,
},
true
);
@ -313,15 +335,32 @@ export default {
this.$forceUpdate();
},
},
computed:{
provincesFormat(){
return this.$route.meta.params.type == 2 ? this.province_ids.filter(item => item.name == '江苏') : this.province_ids
}
computed: {
provincesFormat() {
return this.$route.meta.params.type == 2
? this.province_ids.filter((item) => item.name == "江苏")
: this.province_ids;
},
},
watch: {
async isShow(newVal) {
if (newVal) {
//await this.getTemplate();
if (this.type === "editor") {
await this.getTemplate();
await this.getDetail();
}
} else {
this.originalForm = {
year: `${new Date().getFullYear()}`,
province_id: "",
name: "",
idcard: "",
candidate_no: "",
allow_no: "",
template_id: "",
template_item_id: "",
};
this.form = {}
}
},
},

@ -11,7 +11,7 @@
<header-content :auths="auths_auth_mixin">
<template v-slot:search>
<div style="display: flex; align-items: center">
<el-select v-model="select.template_id" size="small" placeholder="请选择年份" style="width: 160px; margin-right: 6px" @change="getTemplateItems">
<el-select ref="yearSelect" v-model="select.template_id" size="small" placeholder="请选择年份" style="width: 160px; margin-right: 6px" @change="getTemplateItems">
<el-option v-for="item in templates" :label="item.year" :value="item.id" :key="item.id"></el-option>
</el-select>
<!-- <el-date-picker-->
@ -82,7 +82,7 @@
<el-dropdown-item
v-for="item in templateItems"
:key="item.id"
:command="item.name"
:command="`${item.name}\`${item.id}`"
>{{ item.name }}</el-dropdown-item
>
</el-dropdown-menu>
@ -114,8 +114,8 @@
:destroy-action="destroy"
@editor="
(row) => {
$refs['addRecruit'].form.template_id = select.template_id;
$refs['addRecruit'].form.template_item_id = select.template_item_id;
$refs['addRecruit'].originalForm.template_id = select.template_id;
$refs['addRecruit'].originalForm.template_item_id = row.template_item_id;
$refs['addRecruit'].id = row.id;
$refs['addRecruit'].type = 'editor';
isShowAdd = true;
@ -139,7 +139,7 @@
:province_ids="provinces"
:template-items="templateItems"
ref="addRecruit"
@refresh="$refs['xyTable'].getTableData()"
@refresh="getList"
></addRecruit>
<importRecruitInfo
@ -346,10 +346,10 @@ export default {
},
downTemplate(command) {
let temp = command.split('`')
exports({
year: this.select.year,
template_item_id: this.select.template_item_id,
},`${command}模板.xlsx`);
template_item_id: Number(temp[1] || 1),
},`${temp[0] || ''}模板.xlsx`);
},
},
computed: {

@ -145,6 +145,11 @@ export default {
label: "选科",
width: 180,
},
{
prop: "specialize_name",
label: "专业",
width: 180,
},
{
prop: "max_socre",
label: "最高分",

@ -72,7 +72,7 @@
import { index, destroy } from "@/api/yearScore/yearScore";
import { authMixin } from "@/mixin/authMixin";
import { index as provinceIndex } from "@/api/manage/province";
import { destroy as des } from "@/api/yearScore/yearScoreDetail"
import addYearScore from "./component/addYearScore.vue";
import imports from "./component/imports.vue";
export default {

Loading…
Cancel
Save