Ver código fonte

提交的工作地点数据为空,统计的数量需要刷新问题

gcz 2 anos atrás
pai
commit
7ae01c9a00
1 arquivos alterados com 8 adições e 1 exclusões
  1. 8 1
      src/components/jobs.vue

+ 8 - 1
src/components/jobs.vue

@@ -190,7 +190,7 @@ import {
   dlComPost,
 } from "@/utils/api";
 
-import { regionDataPlus } from "element-china-area-data";
+import { regionDataPlus,CodeToText } from "element-china-area-data";
 import textEdit from "./edit/index";
 import Empty from "@/components/empty.vue";
 export default {
@@ -415,6 +415,12 @@ export default {
     },
     submit() {
       console.log("this.form", this.form);
+      this.form.provinceId=this.form.workPlace[0];
+      this.form.cityId=this.form.workPlace[0];
+      this.form.areaId=this.form.workPlace[0];
+      this.form.provinceName= CodeToText[this.form.workPlace[0]];
+      this.form.cityName= CodeToText[this.form.workPlace[1]];
+      this.form.areaName= CodeToText[this.form.workPlace[2]];
       if (this.dialogTitle == "新增职位") {
         this.$refs["form"].validate((valid) => {
           if (valid) {
@@ -422,6 +428,7 @@ export default {
               .then((res) => {
                 this.$message(res.msg);
                 this.dialogVisible = false;
+                this.$emit("getTotal");
                 this.handlegetComPostList();
               })
               .catch((err) => {