liuyg
2021-09-28 1bd38da39fe35fc20905ee82fa5de4ba8a2862d5
服务对象调整接口和参数
2 files modified
48 ■■■■ changed files
src/views/securityCompany/companyDetails.vue 11 ●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/service.vue 37 ●●●● patch | view | raw | blame | history
src/views/securityCompany/companyDetails.vue
@@ -2,7 +2,7 @@
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: liu
 * @Last Modified time: 2021-09-28 11:50:57
 * @Last Modified time: 2021-09-28 16:49:13
 * menu-name 保安公司详细资料
 */
<template>
@@ -248,7 +248,11 @@
              <punish :forms="forms" v-if="seestaff"></punish>
            </el-tab-pane>
            <el-tab-pane label="服务对象" name="eighth">
              <service :form="forms" v-if="seestaff"></service>
              <service
                :form="forms"
                v-if="seestaff"
                :refresh="seestaff3"
              ></service>
            </el-tab-pane>
            <!-- <el-tab-pane label="其他附件" name="eighth">
              <enclosure :form="form"></enclosure>
@@ -494,6 +498,7 @@
      seestaff: false,
      seestaff2: false,
      seestaff3: true,
    };
  },
  created() {
@@ -587,6 +592,8 @@
        this.manageSearchReset();
      } else if (tab.index == 5) {
        this.seestaff2 = !this.seestaff2;
      } else if (tab.index == 7) {
        this.seestaff3 = !this.seestaff3;
      } else {
        this.getFromData({
          currentPage: 1,
src/views/securityCompany/computents/service.vue
@@ -23,7 +23,7 @@
import { getdatas } from "@/api/securityCompany/securityCompany";
import { mapGetters } from "vuex";
export default {
  props: ["form"],
  props: ["form", "refresh"],
  data() {
    return {
      serviceOption: {
@@ -53,10 +53,10 @@
          {
            label: "派遣单位名称",
            prop: "name",
            // search: true,
            search: true,
            searchLabelWidth: 110,
            overHidden: true,
            searchSpan: 4,
            searchSpan: 5,
            width: 210,
            // span: 12,
            labelWidth: 138,
@@ -93,7 +93,7 @@
            labelWidth: 138,
            width: 230,
            searchLabelWidth: 80,
            search: true,
            // search: true,
            searchSpan: 4,
            // editDisplay: false,
            // addDisplay: false,
@@ -138,7 +138,7 @@
            prop: "jurisdiction",
            // hide: true,
            searchLabelWidth: 80,
            search: true,
            // search: true,
            searchSpan: 4,
            overHidden: true,
            labelWidth: 138,
@@ -290,10 +290,21 @@
      },
      serviceQuery: {},
      serviceSelectionList: [],
      departmentids: "",
    };
  },
  watch: {
    refresh() {
      this.$refs.serviceCrud.refreshTable();
      this.$refs.serviceCrud.doLayout();
    },
  },
  created() {
    var that = this;
    // console.log(this.form);
    this.departmentids = {
      deptId: this.form.departmentid,
    };
    if (this.userInfo.role_name == "保安公司管理员") {
      const deptColumn = this.findObject(this.serviceOption.column, "deptId");
      deptColumn.search = false;
@@ -301,16 +312,22 @@
      deptColumn.editDisplay = false;
      deptColumn.viewDisplay = false;
      deptColumn.hide = true;
      this.useifid = this.userInfo.dept_id;
      this.departmentids = {
        deptId: this.userInfo.dept_id,
      };
    }
    //公安局进入
    if (this.userInfo.role_name == "公安管理员") {
      that.serviceOption.column[1].dicUrl =
        "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697&jurisdiction=" +
        that.userInfo.jurisdiction;
      this.departmentids = {
        jurisdiction: this.userInfo.jurisdiction,
      };
    } else {
      that.serviceOption.column[1].dicUrl =
        "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
      that.serviceOption.column[1].value = this.form.departmentid;
    }
  },
  mounted() {
@@ -326,11 +343,15 @@
    serviceOnLoad(page, params = {}) {
      // console.log(this.form.departmentid, "serviceData");
      this.serviceLoading = true;
      params = {
        ...params,
        ...this.departmentids,
      };
      // console.log(params);
      getdatas(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.serviceQuery),
        this.form.departmentid
        Object.assign(params, this.serviceQuery)
      ).then((res) => {
        const data = res.data.data;