|
@@ -21,7 +21,7 @@
|
|
|
<span class=""
|
|
|
>{{ item.lowestSalary }}K-{{ item.highestSalary }}K</span
|
|
|
>
|
|
|
- 工作年限:{{ item.workYear }} 年 / 最低学历:{{ item.educationBg }}
|
|
|
+ 工作年限:{{ item.workYear }} 年以上 / {{ useJobList(item.educationBg) }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="right">
|
|
@@ -77,12 +77,10 @@
|
|
|
<text-edit
|
|
|
:minHeight="jobForm.description.minHeight"
|
|
|
:show-tool="1"
|
|
|
+ v-model="form.description"
|
|
|
></text-edit>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="工资待遇" :label-width="formLabelWidth">
|
|
|
- <el-input v-model="form.name" autocomplete="off"></el-input>
|
|
|
- </el-form-item> -->
|
|
|
<el-form-item
|
|
|
label="最低工资"
|
|
|
prop="lowestSalary"
|
|
@@ -119,10 +117,16 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
label="工作地点"
|
|
|
- prop="workPlace"
|
|
|
:label-width="formLabelWidth"
|
|
|
>
|
|
|
- <el-input v-model="form.workPlace" autocomplete="off"></el-input>
|
|
|
+ <el-cascader
|
|
|
+ size="large"
|
|
|
+ ref="addressSelect"
|
|
|
+ :options="addressOptions"
|
|
|
+ v-model="form.workPlace"
|
|
|
+ :leafOnly="true"
|
|
|
+ @change="handleChange">
|
|
|
+ </el-cascader>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -135,7 +139,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { addcomPost, getComPostList, updateComPost,getDicData } from "@/utils/api";
|
|
|
+import { addcomPost, getComPostList, updateComPost,getDicData,dlComPost } from "@/utils/api";
|
|
|
+
|
|
|
+import { regionDataPlus } from 'element-china-area-data'
|
|
|
import textEdit from './edit/index'
|
|
|
export default {
|
|
|
name: "",
|
|
@@ -144,6 +150,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ addressOptions: regionDataPlus,
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
@@ -179,18 +186,32 @@ export default {
|
|
|
highestSalary: [
|
|
|
{ required: true, message: "请输入最高工资(单位k)", trigger: "blur" },
|
|
|
],
|
|
|
- workPlace: [
|
|
|
- { required: true, message: "请输入工作地点", trigger: "blur" },
|
|
|
- ],
|
|
|
},
|
|
|
};
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
created() {
|
|
|
this.handlegetComPostList();
|
|
|
this.getDicData();
|
|
|
+ this.initMap();
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
+ useJobList: function(data){
|
|
|
+ debugger;
|
|
|
+ let useList = '不限';
|
|
|
+
|
|
|
+ let index = this.jobForm.educations.find(item => {
|
|
|
+
|
|
|
+ return item.dictValue == data
|
|
|
+ })
|
|
|
+ useList=index.dictLabel;
|
|
|
+ return useList;
|
|
|
+ },
|
|
|
+
|
|
|
getDicData(){
|
|
|
let eduDictType = 'degr_educ';
|
|
|
getDicData(eduDictType)
|
|
@@ -200,6 +221,81 @@ export default {
|
|
|
})
|
|
|
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
+ //初始化省市的数据 修改“全部" 为 "全国" "全省" "全市"
|
|
|
+ initMap(){
|
|
|
+ let mapInitData = []
|
|
|
+ regionDataPlus.forEach(function (item,index) {
|
|
|
+ if (item.label=="全部"){
|
|
|
+ item.label = "全国";
|
|
|
+ mapInitData.push(item);
|
|
|
+ }else if (item.children){
|
|
|
+ let childerCity = [];
|
|
|
+ item.children.forEach(function (cityItem,index){
|
|
|
+ if (cityItem.label=="全部"){
|
|
|
+ cityItem.label = "全省";
|
|
|
+ childerCity.push(cityItem);
|
|
|
+ }else if (cityItem.children){
|
|
|
+ let childerArea = [];
|
|
|
+ cityItem.children.forEach(function (areaItem,index){
|
|
|
+ if (areaItem.label=="全部"){
|
|
|
+ areaItem.label = "全市";
|
|
|
+ childerArea.push(areaItem);
|
|
|
+ }else {
|
|
|
+ childerArea.push(areaItem);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ cityItem.children=childerArea;
|
|
|
+ childerCity.push(cityItem);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ item.children=childerCity;
|
|
|
+ mapInitData.push(item);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.addressOptions=mapInitData;
|
|
|
+ },
|
|
|
+
|
|
|
+ //修改以后数据的值
|
|
|
+ handleChange (value) {
|
|
|
+ if (value.length!=0){
|
|
|
+ let arr = this.$refs['addressSelect'].getCheckedNodes()[0].pathLabels;
|
|
|
+ delete this.form['grovinceId'];
|
|
|
+ delete this.form['grovinceName'];
|
|
|
+
|
|
|
+ delete this.form['cityId'];
|
|
|
+ delete this.form['cityName'];
|
|
|
+
|
|
|
+ delete this.form['areaId'];
|
|
|
+ delete this.form['areaName'];
|
|
|
+
|
|
|
+ value.forEach((addId,index)=>{
|
|
|
+
|
|
|
+ if (!addId==''){
|
|
|
+
|
|
|
+ switch (index) {
|
|
|
+ case 0:
|
|
|
+ this.form.grovinceId = addId;
|
|
|
+ this.form.grovinceName = arr[index];
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ this.form.cityId = addId;
|
|
|
+ this.form.cityName = arr[index];
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ this.form.areaId = addId;
|
|
|
+ this.form.areaName = arr[index];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(this.form);
|
|
|
+ },
|
|
|
goDetails(id) {
|
|
|
this.$router.push({ path: "/jobdetails", query: { id: id } });
|
|
|
},
|
|
@@ -216,6 +312,13 @@ export default {
|
|
|
this.form = item;
|
|
|
console.log("item", item);
|
|
|
},
|
|
|
+ del(item) {
|
|
|
+ dlComPost(item).then(
|
|
|
+ (res)=>{
|
|
|
+ this.handlegetComPostList();
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
handlegetComPostList() {
|
|
|
getComPostList({ pageNum: 1, pageSize: 30, postName: "" })
|
|
|
.then((res) => {
|
|
@@ -233,8 +336,9 @@ export default {
|
|
|
if (valid) {
|
|
|
addcomPost(this.form)
|
|
|
.then((res) => {
|
|
|
- console.log("addcomPost", res);
|
|
|
this.$message(res.msg);
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.handlegetComPostList();
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.$message.error(err.msg);
|
|
@@ -290,6 +394,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
::v-deep{
|
|
|
+ .el-cascader{
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .el-select{
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
.el-dialog{
|
|
|
-moz-box-shadow: rgba(169, 169, 169, 0.6) 0px 0px 0px 20px; /* 老的 Firefox */
|
|
|
box-shadow: rgba(169, 169, 169, 0.6) 0px 0px 0px 20px;
|