Administrator
2021-11-08 9b2cede515af4fe957f9a6a2577299685f784d49
src/views/dispatch/dispatchChildoperable.vue
@@ -25,13 +25,13 @@
<script>
import {
  getdata1,
  adddata1,
  update1,
  saveDispatcher,
  updateDispatcher,
  remove1,
  getDispatcherUnitByDeptId,
  overDispatcher,
} from "@/api/dispatch/dispatch";
import { update, getListByDeptId } from "@/api/system/user";
import { update, getSecurityDispatcherTree } from "@/api/system/user";
import { mapState } from "vuex";
export default {
@@ -133,13 +133,20 @@
            searchSpan: 3,
            search: true,
            hide: true,
            // props: {
            //   label: "realName",
            //   value: "id",
            // },
            // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
            dicUrl: `/api/blade-user/security-dispatcher-tree?deptId={{key}}`,
            dicData: [],
            props: {
              label: "realName",
              label: "name",
              value: "id",
            },
            // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
            dicUrl: `/api/blade-user/page-security-units?status=1&deptId={{key}}`,
            dicData: [],
            //不包含父节点值
            leafOnly:true,
            multiple: true,
            rules: [
              {
                required: true,
@@ -162,7 +169,6 @@
            //   value: "id",
            // },
            // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
            dicData: [],
            rules: [
              {
                required: true,
@@ -353,7 +359,11 @@
      if (this.useifid != 266) {
        form["deptId"] = this.useifid;
      }
      adddata1(form).then(
      console.log(form,123456);
      form["ids"] = form.userIds.join(","),
      delete form.userIds;
      console.log(form,321);
      saveDispatcher(form).then(
        (res) => {
          this.onLoad1(this.page1);
          this.$message({
@@ -387,7 +397,7 @@
      if (this.useifid != 266) {
        row["deptId"] = this.useifid;
      }
      update1(row).then(
      updateDispatcher(row).then(
        () => {
          this.onLoad1(this.page1);
          this.$message({
@@ -450,6 +460,11 @@
    beforeOpen(done, type) {
      this.initFlag = true;
      if(type=="edit"){
        // alert(1);
        const userColumn = this.findObject(this.option1.column, "userIds");
        userColumn.multiple = false;
      }
      done();
    },
@@ -543,7 +558,7 @@
          );
          dispatcherUnitIdColumn.dicData = res.data.data;
        });
        getListByDeptId(that.userInfo.dept_id, 1).then((res) => {
        getSecurityDispatcherTree(that.userInfo.dept_id, 1).then((res) => {
          const userIdsColumn = that.findObject(this.option1.column, "userIds");
          userIdsColumn.dicData = res.data.data;
        });