liuyg
2021-07-07 065a9b3f8ebad7273d9d8c9da7817cdb550558f3
招聘多选
2 files modified
216 ■■■■■ changed files
src/views/recruitmentManagement/data.js 114 ●●●● patch | view | raw | blame | history
src/views/recruitmentManagement/index.vue 102 ●●●● patch | view | raw | blame | history
src/views/recruitmentManagement/data.js
@@ -7,39 +7,6 @@
        value: 2,
    }
]
var educationS = [
    {
        label: '高中及以上',
        value: "高中及以上"
    }, {
        label: '大专及以上',
        value: "大专及以上"
    }
    // {
    //     label: '初中及以下',
    //     value: "初中及以下",
    // }, {
    //     label: '高中/中技/中专',
    //     value: '高中/中技/中专',
    // },
    //  {
    //     label: '大专',
    //     value: '大专',
    // }, {
    //     label: '本科',
    //     value: '本科',
    // }, {
    //     label: '硕士',
    //     value: '硕士',
    // }, {
    //     label: '博士',
    //     value: '博士',
    // }, {
    //     label: '不限',
    //     value: '不限',
    // }
]
export var column = [
    {
@@ -76,19 +43,6 @@
    },
    {
        label: "学历要求",
        // prop: 'education',
        // filter: false,
        // type: 'tree',
        // search: true,
        // searchSpan: 5,
        // dicData: educationS
        // prop: "education",
        // // search: true,
        // // searchSpan: 4,
        // props: {
        //     label: 'educationType',
        //     value: 1
        // }
        prop: "education",
        addDisplay: true,
        editDisplay: true,
@@ -101,17 +55,31 @@
        },
        search: true,
        type: "select",
        rules: [{
            required: true,
            message: "请选择学历",
            trigger: "blur"
        }],
        // rules: [{
        //     required: true,
        //     message: "请选择学历",
        //     trigger: "blur"
        // }],
    },
    {
        label: "工作经验",
        prop: "experience",
        search: true,
        addDisplay: true,
        editDisplay: true,
        viewDisplay: true,
        searchSpan: 4,
        dicUrl: "/api/blade-system/dict-biz/dictionary?code=experienceType",
        props: {
            label: "dictValue",
            value: "dictKey"
        },
        search: true,
        type: "select",
        // rules: [{
        //     required: true,
        //     message: "请选择工作经验",
        //     trigger: "blur"
        // }],
    },
    {
        label: "工作任务",
@@ -140,9 +108,44 @@
        searchSpan: 4,
    },
    {
        label: "单位性质",
        prop: "unitsNature",
        addDisplay: true,
        editDisplay: true,
        viewDisplay: true,
        searchSpan: 4,
        dicUrl: "/api/blade-system/dict-biz/dictionary?code=unitsNatureType",
        props: {
            label: "dictValue",
            value: "dictKey"
        },
        // search: true,
        type: "select",
        // rules: [{
        //     required: false,
        //     message: "请选择单位规模",
        //     trigger: "blur"
        // }],
    },
    {
        label: "单位规模",
        prop: "unitsScale",
        addDisplay: true,
        editDisplay: true,
        viewDisplay: true,
        searchSpan: 4,
        dicUrl: "/api/blade-system/dict-biz/dictionary?code=unitsScaleType",
        props: {
            label: "dictValue",
            value: "dictKey"
        },
        // search: true,
        type: "select",
        // rules: [{
        //     required: true,
        //     message: "请选择单位规模",
        //     trigger: "blur"
        // }],
    },
    {
        label: "联系人",
@@ -183,7 +186,12 @@
        prop: 'status',
        filter: false,
        type: 'tree',
        dicData: DIC
        dicData: DIC,
        // rules: [{
        //     required: true,
        //     message: "请选择单位规模",
        //     trigger: "blur"
        // }],
    },
]
src/views/recruitmentManagement/index.vue
@@ -4,13 +4,28 @@
      :option="option"
      :data="data"
      :page.sync="page"
      ref="crudrec"
      @on-load="onLoad"
      :table-loading="loading"
      @row-save="rowSave"
      @search-change="searchChange"
      @search-reset="searchReset"
      @row-update="rowUpdate"
      @row-del="rowDel"
    ></avue-crud>
      @selection-change="selectionChange"
      @refresh-change="refreshChange"
    >
      <template slot="menuLeft">
        <el-button
          type="danger"
          size="small"
          plain
          icon="el-icon-delete"
          @click="handleDelete"
          >删 除
        </el-button>
      </template>
    </avue-crud>
  </div>
</template>
@@ -27,7 +42,7 @@
  data() {
    return {
      loading: true,
      Ourdata: "",
      selectionList: [],
      page: {
        pageSize: 10,
        currentPage: 1,
@@ -37,13 +52,24 @@
      data: [],
      option: {
        card: true,
        searchSize: "mini",
        searchMenuSpan: 6,
        height: 545,
        height: 547,
        menuWidth: 160,
        align: "center",
        selection: true,
        column: column,
      },
    };
  },
  computed: {
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  methods: {
    sizeChange(val) {
@@ -59,20 +85,24 @@
    },
    rowSave(form, done, loading) {
      var that = this;
      adddata(form).then(
        (res) => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
      var form = this.data[0];
      delete form.id;
      for (var k = 0; k < 3; k++) {
        adddata(form).then(
          (res) => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
          },
          (error) => {
            window.console.log(error);
            loading();
          }
        );
      }
    },
    searchChange(params, done) {
      this.query = params;
@@ -118,6 +148,34 @@
          });
        });
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crudrec.toggleSelection();
        });
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      getdata(
@@ -137,7 +195,7 @@
  mounted() {
    // this.Ourdata = data;
    // this.getData();
    this.onLoad(this.page);
    // this.onLoad(this.page);
  },
};
</script>
@@ -149,4 +207,12 @@
  //   border: 1px solid #000;
  box-sizing: border-box;
}
.el-card__body {
  padding-bottom: 5px !important;
}
.avue-crud__tip,
.el-tag,
.el-tag--light {
  padding: 0 !important;
}
</style>