flat: 暂存

This commit is contained in:
Apcallover
2024-04-14 15:46:31 +08:00
parent 3483786677
commit 66d0653a8c
7 changed files with 118 additions and 21 deletions

View File

@@ -345,6 +345,15 @@ export const getMounthDays = (date) => {
})
}
export const getDictionary = (params) => {
return request({
url: '/api/jobslink-api/system/dict-biz/dictionary',
method: 'get',
params
})
}
/*导入任务*/
export const upload = () => {
return `/api/jobslink-api/missions/mission/importMission?isCovered=1`

View File

@@ -349,3 +349,11 @@ export const getMounthDays = (date) => {
export const upload = () => {
return `/api/jobslink-api/jkWorks/jkWorks/importJkWorks?isCovered=1`
}
export const getDictionary = (params) => {
return request({
url: '/api/jobslink-api/system/dict-biz/dictionary',
method: 'get',
params
})
}

View File

@@ -356,6 +356,7 @@ export const serviceType = [
export const recruitStatus = [
{ value: 9, label: "已驳回" },
{ value: 8, label: "关闭" },
{ value: 1, label: "通过" },
{ value: 0, label: "未审核" },
];

View File

@@ -51,8 +51,8 @@
></select-map>
</template>
<template slot-scope="{ row }" slot="wage">
<el-input placeholder="请输入工资" v-model="obj.wage" class="input-with-select">
<el-select v-model="obj.wageUnitCategory" slot="append" placeholder="请选择">
<el-input placeholder="请输入工资" type="number" v-model="obj.wage" class="input-with-select" @blur="wageBlur">
<el-select v-model="obj.wageUnitCategory" slot="append" placeholder="请选择" @change="getMaxAndMin">
<el-option :label="item.label" v-for="item in wageUnitCategory" :key="item.value" :value="item.value"></el-option>
</el-select>
</el-input>
@@ -107,7 +107,7 @@
</template>
<script>
import { add, detail, update, tradeListAdd, workListAdd,getMounthDays} from "@/api/tenant/mission";
import { add, detail, update, tradeListAdd, workListAdd,getMounthDays, getDictionary} from "@/api/tenant/mission";
import { getTrade, getWork, getWorkTypes} from "@/api/tenant/common";
import SkillSelect from "../Dialog/Skill";
import SelectMap from "@/components/map/selectLocation";
@@ -148,7 +148,8 @@ export default {
workDataIdAttr:[],
skillIdAttr:[],
obj: {
wageUnitCategory: null,
wage: 0,
wageUnitCategory: 3,
sex: 0,
ageDesc: "不限年龄",
education: 7,
@@ -167,6 +168,7 @@ export default {
days:null,//某个月份的天数
endTimeFlag:true,
stimeDate:null,
wallMaxAndMin: []
};
},
components: {
@@ -176,7 +178,7 @@ export default {
created() {
this.$store.dispatch("InitArea");
this.initData();
this.getMaxAndMin()
},
watch: {
"obj.tradeId": function (val, oldval) {
@@ -198,15 +200,27 @@ export default {
this.obj.worktypeIds = "";
}
},
"obj.wageUnitCategory": function () {
if (this.$refs.form) this.$refs.form.$refs.form.validateField("wage");
},
// "obj.wageUnitCategory": function () {
// if (this.$refs.form) this.$refs.form.$refs.form.validateField("wage");
// },
"stimeDate":function(n){
if(n){
getMounthDays(n).then(res=>{
this.days=res.data.data;
})
}
},
wallMaxAndMin(val) {
if(!val.length) {return;}
switch (true) {
case this.obj.wage < Math.min(...val):
this.obj.wage = Math.min(...val)
return
case this.obj.wage > Math.max(...val):
this.obj.wage = Math.max(...val)
return
}
}
},
computed: {
@@ -709,6 +723,32 @@ export default {
},
},
methods: {
wageBlur(e) {
const value = e.target.value
const val = this.wallMaxAndMin
if(!val.length) {return;}
switch (true) {
case this.obj.wage < Math.min(...val):
this.obj.wage = Math.min(...val)
return
case this.obj.wage > Math.max(...val):
this.obj.wage = Math.max(...val)
return
}
},
async getMaxAndMin(id) {
let params = {
code: `wages_limit_${this.obj.wageUnitCategory}`
}
const arr = []
const resData = await getDictionary(params)
if(resData.data.code === 200) {
resData.data.data.map((item) => {
arr.push(Number(item.dictKey))
})
this.wallMaxAndMin = arr
}
},
inputAddress(val) {
this.obj.address = val;
},
@@ -868,7 +908,7 @@ export default {
this.$refs.form.resetForm();
this.$refs.form.clearValidate();
this.obj = {
wageUnitCategory: null,
wageUnitCategory: 3,
sex: 0,
ageDesc: "不限年龄",
education: 7,
@@ -1064,7 +1104,7 @@ export default {
} else if (type === "add") {
this.title = "发布任务";
this.obj = {
wageUnitCategory: 2,
wageUnitCategory: 3,
sex: 0,
ageDesc: "不限年龄",
education: 7,

View File

@@ -59,7 +59,7 @@
<!-- <save-button icon="el-icon-check" :size="size" :type="type" @click="rowCopy(row, 'copy')">复制</save-button> -->
<el-button icon="el-icon-edit" :size="size" :type="type" @click="rowCopy(row, 'edit')"
:disabled="row.signUpCount !== 0" v-show="vaildData(permission.tenant_mission_edit, false)">编辑</el-button>
<el-button icon="el-icon-delete" :size="size" :type="type" @click="$refs.crud.rowDel(row)"
<el-button v-if="row.reviewState !== 8" icon="el-icon-delete" :size="size" :type="type" @click="$refs.crud.rowDel(row)"
:disabled="row.signUpCount !== 0" v-show="vaildData(permission.tenant_mission_cancel, false)">取消</el-button>
</div>
</avue-crud>

View File

@@ -57,8 +57,8 @@
></jl-city-cascader>
</template>
<template slot-scope="{ row }" slot="wage">
<el-input placeholder="请输入工资" v-model="obj.wage" class="input-with-select">
<el-select v-model="obj.wageUnitCategory" slot="append" placeholder="请选择">
<el-input placeholder="请输入工资" type="number" v-model="obj.wage" class="input-with-select">
<el-select v-model="obj.wageUnitCategory" slot="append" placeholder="请选择" @change="getMaxAndMin">
<el-option :label="item.label" v-for="item in wageUnitCategory" :key="item.value" :value="item.value"></el-option>
</el-select>
</el-input>
@@ -146,7 +146,7 @@
</template>
<script>
import { add, detail, update, tradeListAdd,getMounthDays} from "@/api/tenant/postzp";
import { add, detail, update, tradeListAdd,getMounthDays, getDictionary} from "@/api/tenant/postzp";
import { getTrade, getWork, getSkillList, getWorkTypes} from "@/api/tenant/common";
import SkillSelect from "../Dialog/Skill";
import SelectMap from "@/components/map/selectLocation";
@@ -189,7 +189,8 @@ export default {
workDataIdAttr:[],
skillIdAttr:[],
obj: {
wageUnitCategory: null,
wage: 0,
wageUnitCategory: 3,
sex: 0,
ageDesc: "不限年龄",
education: 7,
@@ -209,6 +210,7 @@ export default {
endTimeFlag:true,
stimeDate:null,
workTypesNameList: [],
wallMaxAndMin: []
};
},
components: {
@@ -218,7 +220,7 @@ export default {
created() {
this.$store.dispatch("InitArea");
this.initData();
this.getMaxAndMin()
},
watch: {
"obj.tradeId": function (val, oldval) {
@@ -240,15 +242,26 @@ export default {
this.obj.worktypeIds = "";
}
},
"obj.wageUnitCategory": function () {
if (this.$refs.form) this.$refs.form.$refs.form.validateField("wage");
},
// "obj.wageUnitCategory": function () {
// if (this.$refs.form) this.$refs.form.$refs.form.validateField("wage");
// },
"stimeDate":function(n){
if(n){
getMounthDays(n).then(res=>{
this.days=res.data.data;
})
}
},
wallMaxAndMin(val) {
if(!val.length) {return;}
switch (true) {
case this.obj.wage < Math.min(...val):
this.obj.wage = Math.min(...val)
return
case this.obj.wage > Math.max(...val):
this.obj.wage = Math.max(...val)
return
}
}
},
computed: {
@@ -833,6 +846,32 @@ export default {
},
},
methods: {
wageBlur(e) {
const value = e.target.value
const val = this.wallMaxAndMin
if(!val.length) {return;}
switch (true) {
case this.obj.wage < Math.min(...val):
this.obj.wage = Math.min(...val)
return
case this.obj.wage > Math.max(...val):
this.obj.wage = Math.max(...val)
return
}
},
async getMaxAndMin(id) {
let params = {
code: `wages_limit_${this.obj.wageUnitCategory}`
}
const arr = []
const resData = await getDictionary(params)
if(resData.data.code === 200) {
resData.data.data.map((item) => {
arr.push(Number(item.dictKey))
})
this.wallMaxAndMin = arr
}
},
inputAddress(val) {
this.obj.address = val;
},
@@ -1003,7 +1042,7 @@ export default {
this.$refs.form.resetForm();
this.$refs.form.clearValidate();
this.obj = {
wageUnitCategory: null,
wageUnitCategory: 3,
sex: 0,
ageDesc: "不限年龄",
education: 7,

View File

@@ -63,7 +63,7 @@
<el-button icon="el-icon-edit" :size="size" :type="type" @click="rowCopy(row, 'edit')" :disabled="false"
v-show="vaildData(permission.tenant_mission_edit, false)">编辑</el-button>
<el-button icon="el-icon-delete" :size="size" :type="type" @click="$refs.crud.rowDel(row)" :disabled="false"
v-show="vaildData(permission.tenant_mission_cancel, false)">取消</el-button>
v-show="vaildData(permission.tenant_mission_cancel, false)" v-if="row.reviewState !== 8">取消</el-button>
<!-- <el-button type="text" size="mini" @click="contrast(row)"
>比对人才库</el-button> -->
</div>