Administrator
2021-11-08 9b2cede515af4fe957f9a6a2577299685f784d49
派遣批量新增,社保人员选择接口调整
5 files modified
202 ■■■■■ changed files
src/api/dispatch/dispatch.js 19 ●●●●● patch | view | raw | blame | history
src/api/social/social.js 101 ●●●● patch | view | raw | blame | history
src/api/system/user.js 11 ●●●●● patch | view | raw | blame | history
src/views/dispatch/dispatchChildoperable.vue 37 ●●●● patch | view | raw | blame | history
src/views/securityUnitChild/social.vue 34 ●●●●● patch | view | raw | blame | history
src/api/dispatch/dispatch.js
@@ -31,6 +31,14 @@
    })
}
export const saveDispatcher = (row) => {
    return request({
        url: '/api/dispatcher/saveDispatcher',
        method: 'post',
        data: row
    })
}
export const update = (row) => {
    return request({
        url: '/api/dispatcherUnit/submit',
@@ -81,7 +89,16 @@
export const update1 = (row) => {
    return request({
        url: '/api/dispatcher/submit',
        url: '/api/dispatcher/update',
        method: 'post',
        data: row
    })
}
export const updateDispatcher = (row) => {
    return request({
        url: '/api/dispatcher/updateDispatcher',
        method: 'post',
        data: row
    })
src/api/social/social.js
@@ -2,75 +2,74 @@
export const getListJurisdiction = (current, size, params) => {
  return request({
    url: '/api/social/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
    return request({
        url: '/api/social/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
export const getuseList = (id) => {
  return request({
    url: '/api/blade-user/detail',
    method: 'get',
    params: {
      id
    }
  })
    return request({
        url: '/api/blade-user/detail',
        method: 'get',
        params: {
            id
        }
    })
}
export const getList = (current, size, params) => {
  return request({
    url: '/api/social/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
    return request({
        url: '/api/social/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
export const getDetail = (id) => {
  return request({
    url: '/api/social/detail',
    method: 'get',
    params: {
      id
    }
  })
    return request({
        url: '/api/social/detail',
        method: 'get',
        params: {
            id
        }
    })
}
export const remove = (ids) => {
  return request({
    url: '/api/social/remove',
    method: 'post',
    params: {
      ids,
    }
  })
    return request({
        url: '/api/social/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}
export const add = (row) => {
  return request({
    url: '/api/social/save',
    method: 'post',
    data: row
  })
    return request({
        url: '/api/social/save',
        method: 'post',
        data: row
    })
}
export const update = (row) => {
  return request({
    url: '/api/social/submit',
    method: 'post',
    data: row
  })
}
    return request({
        url: '/api/social/submit',
        method: 'post',
        data: row
    })
}
src/api/system/user.js
@@ -44,6 +44,17 @@
    })
}
export const getSecurityDispatcherTree = (deptId, status) => {
    return request({
        url: '/api/blade-user/security-dispatcher-tree',
        method: 'get',
        params: {
            deptId,
            status
        }
    })
}
export const remove = (ids) => {
    return request({
        url: '/api/blade-user/remove',
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;
        });
src/views/securityUnitChild/social.vue
@@ -147,10 +147,6 @@
                label: "女",
                value: 2,
              },
              {
                label: "未知",
                value: 3,
              },
            ],
            labelWidth: 110,
            addDisabled: true,
@@ -163,21 +159,21 @@
              },
            ],
          },
          {
            label: "民族",
            prop: "nation",
            addDisabled: true,
            editDisabled: true,
            width: 55,
            labelWidth: 110,
            rules: [
              {
                required: true,
                message: "请输入民族",
                trigger: "blur",
              },
            ],
          },
          // {
          //   label: "民族",
          //   prop: "nation",
          //   addDisabled: true,
          //   editDisabled: true,
          //   width: 55,
          //   labelWidth: 110,
          //   rules: [
          //     {
          //       required: true,
          //       message: "请输入民族",
          //       trigger: "blur",
          //     },
          //   ],
          // },
          // {
          //   label: "出生日期",
          //   labelWidth: 110,