Administrator
2021-08-30 ce5ef014015ebd7f31647bc967cba78383bebaba
派遣记录修改
3 files modified
158 ■■■■■ changed files
src/api/dispatch/dispatch.js 9 ●●●●● patch | view | raw | blame | history
src/views/dispatch/dispatchChildoperable.vue 50 ●●●● patch | view | raw | blame | history
src/views/securityGuard/data.js 99 ●●●●● patch | view | raw | blame | history
src/api/dispatch/dispatch.js
@@ -39,6 +39,15 @@
    })
}
export const overDispatcher = (row) => {
    return request({
        url: '/api/dispatcher/over-dispatcher',
        method: 'post',
        data: row
    })
}
export const remove = (ids) => {
    return request({
        url: '/api/dispatcherUnit/remove',
src/views/dispatch/dispatchChildoperable.vue
@@ -29,8 +29,9 @@
  update1,
  remove1,
  getDispatcherUnitByDeptId,
  overDispatcher
} from "@/api/dispatch/dispatch";
import { getListByDeptId } from "@/api/system/user";
import { update,getListByDeptId } from "@/api/system/user";
import { mapState } from "vuex";
export default {
@@ -136,7 +137,7 @@
              label: "realName",
              value: "id",
            },
            dicUrl: `/api/blade-user/page-security-units?deptId={{key}}`,
            dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
            dicData: [],
            rules: [
              {
@@ -155,11 +156,11 @@
            addDisplay: false,
            editDisplay: false,
            // hide: true,
            props: {
              label: "realName",
              value: "id",
            },
            dicUrl: `/api/blade-user/page-security-units?deptId={{key}}`,
            // props: {
            //   label: "realName",
            //   value: "id",
            // },
            // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
            dicData: [],
            rules: [
              {
@@ -380,13 +381,13 @@
      );
    },
    rowDel1(row) {
      this.$confirm("确定将选择数据删除?", {
      this.$confirm("确定结束当前派遣?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove1(row.id);
          return overDispatcher(row);
        })
        .then(() => {
          this.onLoad1(this.page1);
@@ -428,19 +429,19 @@
      this.onLoad1(this.page1, this.query1);
    },
    beforeOpen(done, type) {
      var that = this;
      if (["add", "edit", "view"].includes(type)) {
        if (this.userInfo.role_name == "保安公司管理员") {
          getListByDeptId(that.userInfo.dept_id).then((res) => {
            const userColumn = that.findObject(this.option1.column, "userIds");
            userColumn.dicData = res.data.data;
          });
        }
      }
      this.initFlag = true;
      done();
    },
    // beforeOpen(done, type) {
    //   var that = this;
    //   if (["add", "edit", "view"].includes(type)) {
    //     if (this.userInfo.role_name == "保安公司管理员") {
    //       getListByDeptId(that.userInfo.dept_id).then((res) => {
    //         const userColumn = that.findObject(this.option1.column, "userIds");
    //         userColumn.dicData = res.data.data;
    //       });
    //     }
    //   }
    //   this.initFlag = true;
    //   done();
    // },
    getStartTime() {
      if (
@@ -465,8 +466,9 @@
    //
    onLoad1(page, params = {}) {
      this.loading1 = true;
      var that = this;
      var values;
      //默认查询已派遣的,派遣结束,未派遣的不显示
      params['dispatch'] = 0;
      const { releaseTimeRange } = this.query1;
      if (releaseTimeRange) {
        values = {
@@ -527,7 +529,7 @@
          );
          dispatcherUnitIdColumn.dicData = res.data.data;
        });
        getListByDeptId(that.userInfo.dept_id).then((res) => {
        getListByDeptId(1,that.userInfo.dept_id).then((res) => {
          const userIdsColumn = that.findObject(this.option1.column, "userIds");
          userIdsColumn.dicData = res.data.data;
        });
src/views/securityGuard/data.js
@@ -401,47 +401,66 @@
//表现
export var trackRecordColumn = [{
    label: "id",
    prop: "id",
    hide: true,
    editDisplay: false,
    addDisplay: false
}, {
    label: '工作态度',
    prop: "workingattitude",
    formslot: true,
}, {
    label: '工作成效',
    prop: "achievements",
    formslot: true,
}, {
    label: '表现',
    prop: "score",
    type: "select",
    dicUrl: "/api/blade-system/dict-biz/dictionary?code=scoreType",
    props: {
        label: "dictValue",
        value: "dictKey"
        label: "id",
        prop: "id",
        hide: true,
        editDisplay: false,
        addDisplay: false
    }, {
        label: '工作态度',
        prop: "workingattitude",
        formslot: true,
    }, {
        label: '工作成效',
        prop: "achievements",
        formslot: true,
    }, {
        label: '表现',
        prop: "score",
        type: "select",
        // dicUrl: "/api/blade-system/dict-biz/dictionary?code=scoreType",
        // props: {
        //     label: "dictValue",
        //     value: "dictKey"
        // },
        dicData: [{
                label: "优秀",
                value: 0
            },
            {
                label: "良好",
                value: 1
            },
            {
                label: "一般",
                value: 2
            },
            {
                label: "差",
                value: 3
            },
        ],
        dataType: "number",
        slot: true,
        rules: [{
            required: true,
            message: "请选择表现",
            trigger: "blur"
        }]
    }, {
        label: '时间',
        type: 'date',
        format: "yyyy-MM-dd",
        valueFormat: "yyyy-MM-dd",
        prop: "time",
        formslot: true,
    },
    dataType: "number",
    slot: true,
    rules: [{
        required: true,
        message: "请选择表现",
        trigger: "blur"
    }]
}, {
    label: '时间',
    type: 'date',
    format: "yyyy-MM-dd",
    valueFormat: "yyyy-MM-dd",
    prop: "time",
    formslot: true,
}, {
    label: '服务公司',
    prop: "departmentName",
    formslot: true,
}]
    // {
    //     label: '服务公司',
    //     prop: "departmentName",
    //     formslot: true,
    // }
]
export var securityFormPageColumn = [{