liuyg
2021-09-25 0402148a2773899316c9630ac5824145f8582bcc
保安公司详情bug  调整
6 files modified
240 ■■■■■ changed files
src/api/securityCompany/securityCompany.js 2 ●●● patch | view | raw | blame | history
src/views/securityCompany/companyDetails.vue 137 ●●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/equipment.vue 8 ●●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/punish.vue 13 ●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/service.vue 5 ●●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/staff.vue 75 ●●●●● patch | view | raw | blame | history
src/api/securityCompany/securityCompany.js
@@ -14,7 +14,7 @@
}
export const getListestaff = (current, size, params, deptId) => {
    return request({
        url: '/api/blade-user/page',
        url: '/api/blade-user/page-security',
        method: 'get',
        params: {
            ...params,
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-18 09:16:59
 * @Last Modified time: 2021-09-25 11:25:05
 * menu-name 保安公司详细资料
 */
<template>
@@ -38,61 +38,7 @@
                    </el-form-item>
                  </el-col>
                </el-row>
                <!-- <el-row>
                  <el-col span="12">
                    <el-col span="12">
                      <el-form-item label="注册时间">
                        <el-input
                          disabled="true"
                          v-model="form.establishtime"
                          autocomplete="off"
                        ></el-input>
                      </el-form-item>
                    </el-col>
                  </el-col>
                  <el-col span="12">
                    <el-form-item label="注册资金">
                      <el-input
                        disabled="true"
                        v-model="form.registeredcapital"
                        autocomplete="off"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row> -->
                <!-- <el-row>
                  <el-col span="12">
                    <el-form-item label="实缴资金">
                      <el-input
                        disabled="true"
                        v-model="form.capital"
                        autocomplete="off"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col span="12">
                    <el-form-item label="组织机构代码">
                      <el-input
                        disabled="true"
                        v-model="form.organizationcode"
                        autocomplete="off"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row> -->
                <el-row>
                  <!-- <el-col span="12">
                    <el-form-item label="工商注册号">
                      <el-input
                        disabled="true"
                        v-model="form.registrationnumber"
                        autocomplete="off"
                      ></el-input>
                    </el-form-item>
                  </el-col> -->
                  <el-col span="24">
                    <el-form-item label="注册地址">
                      <el-input
@@ -109,7 +55,7 @@
                    <el-form-item label="所属辖区">
                      <el-input
                        disabled="true"
                        v-model="form.$jurisdiction"
                        v-model="jurisdictionSee"
                        autocomplete="off"
                      ></el-input>
                    </el-form-item>
@@ -263,13 +209,13 @@
                :data="investorData"
                ref="investorCrud"
                :page.sync="investorPage"
                @on-load="investorOnLoad"
                @selection-change="investorSelectionChange"
                @search-change="investorSearchChange"
                @search-reset="investorSearchReset"
                @current-change="investorCurrentChange"
                @size-change="investorSizeChange"
                @refresh-change="investorSizerefresh"
                @on-load="investorOnLoad"
              >
              </avue-crud>
            </el-tab-pane>
@@ -282,27 +228,27 @@
                :data="manageData"
                ref="manageCrud"
                :page.sync="managePage"
                @on-load="manageOnLoad"
                @selection-change="manageSelectionChange"
                @search-change="manageSearchChange"
                @search-reset="manageSearchReset"
                @current-change="manageCurrentChange"
                @size-change="manageSizeChange"
                @refresh-change="manageSizerefresh"
                @on-load="manageOnLoad"
              >
              </avue-crud>
            </el-tab-pane>
            <el-tab-pane label="装备信息" name="fifth">
              <equipment :form="form"></equipment>
              <equipment :forms="forms" v-if="seestaff"></equipment>
            </el-tab-pane>
            <el-tab-pane label="保安员信息" name="sixth">
              <staff :form="form"></staff>
              <staff :forms="forms" v-if="seestaff" :doit="seestaff2"></staff>
            </el-tab-pane>
            <el-tab-pane label="处罚信息" name="seventh">
              <punish :form="form"></punish>
              <punish :forms="forms" v-if="seestaff"></punish>
            </el-tab-pane>
            <el-tab-pane label="服务对象" name="eighth">
              <service :form="form"></service>
              <service :form="forms" v-if="seestaff"></service>
            </el-tab-pane>
            <!-- <el-tab-pane label="其他附件" name="eighth">
              <enclosure :form="form"></enclosure>
@@ -374,7 +320,6 @@
    var w = 160,
      s = 12;
    return {
      finalDeptid: "",
      businessLicenseUrl: "",
      licenceUrl: "",
@@ -407,7 +352,7 @@
        dialogClickModal: false,
        // 操作栏宽度
        menuWidth: 156,
        height: 600,
        column: [
          {
            label: "id",
@@ -505,7 +450,7 @@
        dialogClickModal: false,
        // 操作栏宽度
        menuWidth: 156,
        height: 600,
        column: [
          {
            label: "管理人姓名",
@@ -543,6 +488,12 @@
      },
      manageQuery: {},
      manageSelectionList: [],
      forms: {}, //防串数据
      jurisdictionSee: "", //中文辖区
      seestaff: false,
      seestaff2: false,
    };
  },
  created() {
@@ -552,7 +503,10 @@
      that = this;
    this.$store.state.tags.tagList.forEach((item, index) => {
      if (item.label == "保安公司详细信息") {
      if (
        item.label == "保安公司详细资料" ||
        item.label == "保安公司详细信息"
      ) {
        if (flag == false) {
          ind = index;
          flag = true;
@@ -564,45 +518,40 @@
      this.$store.state.tags.tagList.splice(ind, 1);
    }
    if (this.$route.query.fromSecunityGuardId) {
      console.log(this.$route.query.fromSecunityGuardId, "fromSecunityGuardId");
      // getList().then(res=>{
      //   console.log
      // console.log(this.$route.query.fromSecunityGuardId, "fromSecunityGuardId");
      var page = {
          currentPage: 1,
          pageSize: 10,
        },
        params = { departmentid: this.$route.query.fromSecunityGuardId };
      getList(page.currentPage, page.pageSize, params).then((res) => {
        console.log(res.data.data.records[0]);
        that.form = res.data.data.records[0];
        this.businessLicenseUrl = res.data.data.records[0].businessLicense;
        this.licenceUrl = res.data.data.records[0].licence;
        // console.log(that.form, "that.form1");
        this.jurisdictionSee = this.form.jurisdictionName;
        that.forms = res.data.data.records[0];
        that.seestaff = true;
        that.businessLicenseUrl = res.data.data.records[0].businessLicense;
        that.licenceUrl = res.data.data.records[0].licence;
        // console.log(that.form, "this.forms1");
      });
      // })
    } else {
      this.form = this.$route.query;
      // console.log(this.$route.query, "this.$route.query.");
      // console.log(this.form, "obj1");
      this.finalDeptid = this.form.departmentid;
      // console.log(this.finalDeptid, " this.finalDeptid");
      // this.businessLicenseUrl = this.form.businessLicense;
      // this.licenceUrl = this.form.licence;
      // console.log(that.form, "that.form2");
      this.jurisdictionSee = this.form.$jurisdiction;
      this.forms = this.$route.query;
      this.seestaff = true;
      // console.log(this.forms, "this.forms2");
      this.getFromData({
        currentPage: 1,
        pageSize: 10,
      });
    }
    // usejurisdiction().then((res) => {
    //   const data = res.data.data;
    //   console.log(data);
    //   let d = this.inspects(data, this.form.region);
    //   this.form.region = d;
    // });
  },
  methods: {
    getFromData(page, params = {}) {
      var that = this;
      params["departmentid"] = this.finalDeptid;
      params["departmentid"] = this.forms.departmentid;
      getList(page.currentPage, page.pageSize, params).then((res) => {
        // console.log(res.data.data.records[0], "多次获取该单位信息");
        that.form = res.data.data.records[0];
@@ -636,6 +585,8 @@
        this.investorSearchReset();
      } else if (tab.index == 3) {
        this.manageSearchReset();
      } else if (tab.index == 5) {
        this.seestaff2 = !this.seestaff2;
      } else {
        this.getFromData({
          currentPage: 1,
@@ -652,26 +603,26 @@
      //
    },
    getManifestationData() {
      manifestationList(this.form.cardid).then((res) => {
      manifestationList(this.forms.cardid).then((res) => {
        this.manifestationData = res.data.data.records;
        this.manifestationData.forEach((item) => {
          item.name = this.form.realName;
          item.name = this.forms.realName;
          item.time = item.time.substring(0, 10);
        });
      });
    },
    getDispatchData() {
      dispatchList(this.form.cardid).then((res) => {
      dispatchList(this.forms.cardid).then((res) => {
        this.dispatchData = res.data.data.records;
      });
    },
    getHonorchData() {
      honorchList(this.form.cardid).then((res) => {
      honorchList(this.forms.cardid).then((res) => {
        this.honorchData = res.data.data.records;
      });
    },
    getTrainData() {
      trainList(this.form.cardid).then((res) => {
      trainList(this.forms.cardid).then((res) => {
        this.trainData = res.data.data;
        this.trainData.forEach((item) => {
@@ -684,7 +635,7 @@
      });
    },
    getExaminationData() {
      examinationList(this.form.cardid).then((res) => {
      examinationList(this.forms.cardid).then((res) => {
        this.examinationData = res.data.data;
        this.examinationData.forEach((item) => {
@@ -705,7 +656,7 @@
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.investorQuery),
        this.form.creditcode
        this.forms.creditcode
      ).then((res) => {
        const data = res.data.data;
@@ -749,7 +700,7 @@
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.manageQuery),
        this.form.creditcode
        this.forms.creditcode
      ).then((res) => {
        const data = res.data.data;
src/views/securityCompany/computents/equipment.vue
@@ -13,6 +13,7 @@
    @current-change="equipmentCurrentChange"
    @size-change="equipmentSizeChange"
    @refresh-change="equipmentSizerefresh"
    @on-load="equipmentOnLoad"
  >
  </avue-crud>
  <!-- @on-load="equipmentOnLoad" -->
@@ -21,7 +22,7 @@
<script>
import { getListequipment } from "@/api/securityCompany/securityCompany";
export default {
  props: ["form"],
  props: ["forms"],
  data() {
    return {
      equipmentOption: {
@@ -36,6 +37,7 @@
        align: "center",
        height: "auto",
        calcHeight: 270,
        height: 600,
        tip: false,
        searchShow: false,
        searchMenuSpan: 4,
@@ -176,7 +178,6 @@
    };
  },
  mounted() {
    console.log(this.form, "equipmentData");
    this.equipmentOnLoad(this.equipmentPage);
  },
  methods: {
@@ -184,12 +185,13 @@
      this.equipmentOnLoad(this.equipmentPage, this.equipmentQuery);
    },
    equipmentOnLoad(page, params = {}) {
      // console.log(this.forms.departmentid, "equipmentData");
      this.equipmentLoading = true;
      getListequipment(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.equipmentQuery),
        this.form.departmentid
        this.forms.departmentid
      ).then((res) => {
        const data = res.data.data;
src/views/securityCompany/computents/punish.vue
@@ -13,6 +13,7 @@
    @current-change="punishCurrentChange"
    @size-change="punishSizeChange"
    @refresh-change="equipmentSizerefresh"
    @on-load="punishOnLoad"
  >
  </avue-crud>
  <!-- @on-load="punishOnLoad" -->
@@ -21,7 +22,7 @@
<script>
import { getListPunish } from "@/api/securityCompany/security";
export default {
  props: ["form"],
  props: ["forms"],
  data() {
    return {
      punishOption: {
@@ -33,7 +34,6 @@
        selection: true,
        border: true,
        menu: false,
        align: "center",
        height: "auto",
        calcHeight: 270,
@@ -46,6 +46,7 @@
        dialogClickModal: false,
        // 操作栏宽度
        menuWidth: 156,
        height: 600,
        column: [
          {
@@ -103,8 +104,8 @@
    };
  },
  mounted() {
    console.log(this.form, "pu");
    this.punishOnLoad(this.punishPage);
    // console.log(this.form, "pu");
    // this.punishOnLoad(this.punishPage);
  },
  methods: {
    equipmentSizerefresh() {
@@ -112,12 +113,12 @@
    },
    punishOnLoad(page, params = {}) {
      this.punishLoading = true;
      // console.log(this.form.departmentid);
      // console.log(this.forms.departmentid, "pu");
      getListPunish(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.punishQuery),
        this.form.departmentid
        this.forms.departmentid
      ).then((res) => {
        const data = res.data.data;
src/views/securityCompany/computents/service.vue
@@ -13,6 +13,7 @@
    @current-change="serviceCurrentChange"
    @size-change="serviceSizeChange"
    @refresh-change="equipmentSizerefresh"
    @on-load="serviceOnLoad"
  >
  </avue-crud>
  <!-- @on-load="serviceOnLoad" -->
@@ -45,7 +46,7 @@
        dialogClickModal: false,
        // 操作栏宽度
        menuWidth: 156,
        height: 600,
        column: [
          {
            label: "姓名",
@@ -163,7 +164,6 @@
    };
  },
  mounted() {
    console.log(this.form, "serviceData");
    this.serviceOnLoad(this.servicePage);
  },
  methods: {
@@ -171,6 +171,7 @@
      this.serviceOnLoad(this.servicePage, this.serviceQuery);
    },
    serviceOnLoad(page, params = {}) {
      // console.log(this.form.departmentid, "serviceData");
      this.serviceLoading = true;
      getListeservice(
        page.currentPage,
src/views/securityCompany/computents/staff.vue
@@ -13,6 +13,7 @@
    @current-change="staffCurrentChange"
    @size-change="staffSizeChange"
    @refresh-change="equipmentSizerefresh"
    @on-load="staffOnLoad"
  >
    <!-- @on-load="staffOnLoad" -->
  </avue-crud>
@@ -21,7 +22,7 @@
<script>
import { getListestaff } from "@/api/securityCompany/securityCompany";
export default {
  props: ["form"],
  props: ["forms", "doit"],
  data() {
    return {
      staffOption: {
@@ -36,6 +37,7 @@
        align: "center",
        height: "auto",
        calcHeight: 270,
        height: 600,
        tip: false,
        searchShow: false,
        searchMenuSpan: 4,
@@ -197,50 +199,6 @@
            width: 70,
          },
        ],
        // [
        //   {
        //     label: "投资人姓名",
        //     prop: "shareholder",
        //     slot: true,
        //     display: false,
        //   },
        //   {
        //     label: "投资比例",
        //     prop: "shareholdingratio",
        //     slot: true,
        //     display: false,
        //     formatter: function (row, value) {
        //       return (value = value + "%");
        //     },
        //   },
        //   {
        //     label: "出资金额",
        //     prop: "capital",
        //     slot: true,
        //     display: false,
        //     formatter: function (row, value) {
        //       return (value = value + "万元");
        //     },
        //   },
        //   {
        //     label: "投资时间",
        //     prop: "capitaltime",
        //     slot: true,
        //     display: false,
        //   },
        //   {
        //     label: "身份证号",
        //     prop: "cardid",
        //     slot: true,
        //     display: false,
        //   },
        //   {
        //     label: "联系电话",
        //     prop: "cell",
        //     slot: true,
        //     display: false,
        //   },
        // ],
      },
      staffSearch: {},
      staffLoading: true,
@@ -252,10 +210,19 @@
      },
      staffQuery: {},
      staffSelectionList: [],
      departmentid: "",
      i: 1,
    };
  },
  watch: {
    doit() {
      this.$refs.staffCrud.refreshTable();
      this.$refs.staffCrud.doLayout();
      // this.equipmentSizerefresh();
    },
  },
  mounted() {
    console.log(this.form, "staff");
    this.departmentid = this.forms.departmentid;
    this.staffOnLoad(this.staffPage);
  },
  methods: {
@@ -263,22 +230,30 @@
      this.staffOnLoad(this.staffPage, this.staffQuery);
    },
    staffOnLoad(page, params = {}) {
      // if (this.i != 2) {
      this.staffLoading = true;
      // }
      // console.log(this.forms.departmentid, "staff");
      getListestaff(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.staffQuery),
        this.form.departmentid
        this.forms.departmentid
      ).then((res) => {
        const data = res.data.data;
        this.staffPage.total = data.total;
        this.staffData = data.records;
        // console.log(this.staffData, "staffData");
        this.staffLoading = false;
        this.$refs.staffCrud.refreshTable();
        this.$refs.staffCrud.doLayout();
        this.staffSelectionClear();
        // if (this.i == 1) {
        //   console.log(this.i, "iiiiiiii");
        //   this.i++;
        //   // setTimeout((res) => {
        //   this.equipmentSizerefresh();
        //   // }, 20);
        // }
      });
    },
    staffSelectionClear() {