liuyg
2021-12-10 56a2e064f54346cf312736d8652863c0e5d197b7
+样式适配以及培训公司登入只有企业名称做验证
17 files modified
175 ■■■■ changed files
src/store/getters.js 2 ●●●●● patch | view | raw | blame | history
src/store/modules/control.js 2 ●●●●● patch | view | raw | blame | history
src/views/securityAnalysis/child/assignment.vue 2 ●●● patch | view | raw | blame | history
src/views/securityAnalysis/child/certificate.vue 2 ●●● patch | view | raw | blame | history
src/views/securityAnalysis/child/dispatch.vue 2 ●●● patch | view | raw | blame | history
src/views/securityAnalysis/child/examination.vue 2 ●●● patch | view | raw | blame | history
src/views/securityAnalysis/child/situation.vue 4 ●●●● patch | view | raw | blame | history
src/views/securityAnalysis/child/socialSecurity.vue 1 ●●●● patch | view | raw | blame | history
src/views/securityAnalysis/index.vue 3 ●●●● patch | view | raw | blame | history
src/views/securityEquipment/car.vue 22 ●●●●● patch | view | raw | blame | history
src/views/securityEquipment/equipments.vue 22 ●●●●● patch | view | raw | blame | history
src/views/securityEquipment/gun.vue 2 ●●● patch | view | raw | blame | history
src/views/securityUnit/selfRecruitedSecurityGuard.vue 12 ●●●●● patch | view | raw | blame | history
src/views/securityUnitChild/index.vue 52 ●●●●● patch | view | raw | blame | history
src/views/securityUnitChild/licence.vue 2 ●●● patch | view | raw | blame | history
src/views/securityUnitChild/social.vue 18 ●●●● patch | view | raw | blame | history
src/views/trainingRegistration/index.vue 25 ●●●● patch | view | raw | blame | history
src/store/getters.js
@@ -28,5 +28,7 @@
  flowRoutes: state => state.dict.flowRoutes,
  //控制按钮消失(表格右侧显影按钮)
  clearOtherBut: state => state.control.clearOtherBut,
  windowWidth: state => state.control.windowWidth,
  windowHeight: state => state.control.windowHeight,
}
export default getters
src/store/modules/control.js
@@ -17,12 +17,14 @@
      pageSizes: [15, 30, 50, 100],
    },
    windowWidth: 1025,
    windowHeight: '',
  },
  actions: {
  },
  mutations: {
    setWindowSize: (state, data) => {
      state.windowWidth = data.innerWidth;
      state.windowHeight = data.innerHeight;
      // console.log(data)
    },
  }
src/views/securityAnalysis/child/assignment.vue
@@ -112,7 +112,7 @@
        // menu: false,
        searchSize: "mini",
        searchMenuSpan: 8,
        height: 450,
        height: "auto",
        cellBtn: false,
        delBtnText: "结束派遣",
        editBtnText: "更改派遣",
src/views/securityAnalysis/child/certificate.vue
@@ -56,7 +56,7 @@
        // refreshBtn: false,
        // card: true,
        menu: false,
        height: 450,
        height: "auto",
        widtd: "auto",
        // calcHeight: 54,
        border: true, //liu
src/views/securityAnalysis/child/dispatch.vue
@@ -56,7 +56,7 @@
        // refreshBtn: false,
        // card: true,
        menu: false,
        height: 450,
        height: "auto",
        widtd: "auto",
        // calcHeight: 54,
        border: true, //liu
src/views/securityAnalysis/child/examination.vue
@@ -45,7 +45,7 @@
        // refreshBtn: false,
        // card: true,
        menu: false,
        height: 450,
        height: "auto",
        widtd: "auto",
        // calcHeight: 54,
        border: true, //liu
src/views/securityAnalysis/child/situation.vue
@@ -57,7 +57,7 @@
        // refreshBtn: false,
        // card: true,
        menu: false,
        height: 450,
        height: "auto",
        widtd: "auto",
        // calcHeight: 54,
        border: true, //liu
@@ -76,7 +76,7 @@
            searchLabelWidth: "50",
            width: 80,
            overHidden: true,
            searchSpan: 3,
            searchSpan: 4,
            search: true,
          },
          {
src/views/securityAnalysis/child/socialSecurity.vue
@@ -128,7 +128,6 @@
        searchMenuSpan: 6,
        border: true,
        index: true,
        height: 430,
        addBtn: sees,
        viewBtn: true,
        menu: false,
src/views/securityAnalysis/index.vue
@@ -54,7 +54,8 @@
        :title="titles"
        append-to-body
        :visible.sync="dialogVisible"
        top="9vh"
        top="8vh"
        height="70%"
      >
        <situation
          :card="{ deptId: deptid, jurisdiction: jurisdiction }"
src/views/securityEquipment/car.vue
@@ -7,6 +7,7 @@
      ]"
    >
      <avue-crud
        v-if="visible"
        :option="option"
        :data="data"
        :page.sync="page"
@@ -67,9 +68,23 @@
import { getdata, adddata, update, remove } from "@/api/car/car";
import { mapGetters } from "vuex";
export default {
  props: ["fromDeptId"],
  props: ["fromDeptId", "windowHeight"],
  watch: {
    windowHeight() {
      if (!this.windowHeight) {
        return;
      }
      this.option.height = this.windowHeight - 320;
      this.visible = false;
      this.$nextTick(() => {
        this.visible = true;
        this.refreshChange();
      });
    },
  },
  data() {
    return {
      visible: true,
      deptIds: "",
      excelBox: false,
      excelForm: {},
@@ -115,7 +130,7 @@
        searchSize: "mini",
        border: true,
        searchMenuSpan: 6,
        height: 583,
        height: "auto",
        menuWidth: 160,
        align: "center",
        selection: true,
@@ -140,6 +155,9 @@
    this.deptIds = this.userInfo.dept_id;
  },
  created() {
    if (this.windowHeight) {
      this.option.height = this.windowHeight - 320;
    }
    var that = this;
    if (
      this.userInfo.role_name == "装备管理员" ||
src/views/securityEquipment/equipments.vue
@@ -7,6 +7,7 @@
      ]"
    >
      <avue-crud
        v-if="visible"
        :option="option"
        :data="data"
        :page.sync="page"
@@ -67,9 +68,23 @@
import { getdata, adddata, update, remove } from "@/api/equipments/equipments";
import { mapGetters } from "vuex";
export default {
  props: ["fromDeptId"],
  props: ["fromDeptId", "windowHeight"],
  watch: {
    windowHeight() {
      if (!this.windowHeight) {
        return;
      }
      this.option.height = this.windowHeight - 320;
      this.visible = false;
      this.$nextTick(() => {
        this.visible = true;
        this.refreshChange();
      });
    },
  },
  data() {
    return {
      visible: true,
      excelBox: false,
      excelForm: {},
      excelOption: {
@@ -113,7 +128,7 @@
        tip: false,
        searchSize: "mini",
        searchMenuSpan: 6,
        height: 583,
        height: "auto",
        index: true,
        menuWidth: 160,
        border: true,
@@ -139,6 +154,9 @@
    },
  },
  created() {
    if (this.windowHeight) {
      this.option.height = this.windowHeight - 320;
    }
    var that = this;
    if (
      this.userInfo.role_name == "装备管理员" ||
src/views/securityEquipment/gun.vue
@@ -114,7 +114,7 @@
        tip: false,
        searchSize: "mini",
        searchMenuSpan: 6,
        height: 583,
        height: "auto",
        index: true,
        menuWidth: 160,
        align: "center",
src/views/securityUnit/selfRecruitedSecurityGuard.vue
@@ -268,7 +268,7 @@
        tip: false,
        searchSize: "mini",
        searchMenuSpan: 6,
        height: 583,
        height: "auto",
        menuWidth: 275,
        align: "center",
        border: true,
@@ -299,6 +299,16 @@
  created() {
    this.option0.column[4].value = 0;
    this.option0.column[4].disabled = true;
    if (this.userInfo.role_name == "培训公司管理员") {
      for (let k in this.option0.column) {
        if (this.option0.column[k].prop == "enterprisename") {
          continue;
        }
        if (this.option0.column[k].rules) {
          delete this.option0.column[k].rules;
        }
      }
    }
  },
  computed: {
    ...mapGetters(["userInfo"]),
src/views/securityUnitChild/index.vue
@@ -151,6 +151,7 @@
      >
        <basic-container>
          <avue-crud
            v-if="visible"
            :option="option1"
            :data="data1"
            :page.sync="page1"
@@ -197,6 +198,7 @@
      >
        <basic-container>
          <avue-crud
            v-if="visible"
            :option="option2"
            :data="data2"
            :page.sync="page2"
@@ -236,13 +238,21 @@
      <!-- <span v-else-if="typeTABS.prop === 'tab4'" class="tab"> -->
      <el-tab-pane label="装备管理" name="tab4">
        <!-- 装备管理 -->
        <equipments :fromDeptId="departmentid" v-if="overzb"></equipments>
        <equipments
          v-if="overzb"
          :fromDeptId="departmentid"
          :windowHeight="windowHeight"
        ></equipments>
        <!-- </span> -->
      </el-tab-pane>
      <!-- <span v-else-if="typeTABS.prop === 'tab5'" class="tab"> -->
      <el-tab-pane label="车辆管理" name="tab5">
        <!-- 车辆管理 -->
        <car :fromDeptId="departmentid" v-if="overcar"></car>
        <car
          :fromDeptId="departmentid"
          v-if="overcar"
          :windowHeight="windowHeight"
        ></car>
        <!-- </span> -->
      </el-tab-pane>
      <!-- <span v-else-if="typeTABS.prop === 'tab6'" class="tab">
@@ -337,7 +347,7 @@
import licence from "./licence.vue";
import businessLicense from "./businessLicense.vue";
import social from "./social.vue";
import { mapState } from "vuex";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
export default {
@@ -373,6 +383,7 @@
      ],
    };
    return {
      visible: false,
      overcar: false, //结决id传入、信息获取的优先级
      overzb: false, //结决id传入、信息获取的优先级
      overcar: false, //结决id传入、信息获取的优先级
@@ -534,7 +545,7 @@
        tip: false,
        searchSize: "mini",
        searchMenuSpan: 8,
        height: 563,
        height: "auto",
        menuWidth: 200,
        align: "center",
        selection: true,
@@ -557,7 +568,7 @@
        tip: false,
        searchSize: "mini",
        searchMenuSpan: 8,
        height: 563,
        height: "auto",
        menuWidth: 200,
        menuAlign: "center",
        align: "center",
@@ -568,9 +579,7 @@
    };
  },
  computed: {
    ...mapState({
      userInfo: (state) => state.user.userInfo,
    }),
    ...mapGetters(["userInfo", "windowHeight"]),
    chuzitime() {
      return this.data1.capitaltime;
    },
@@ -814,7 +823,7 @@
    //
    onLoad1(page, params = {}) {
      this.loading1 = true;
      console.log(page, params, 3435434);
      // console.log(page, params, 3435434);
      params["deptId"] = this.departmentid;
      getdataOnce1(
        page.currentPage,
@@ -825,11 +834,11 @@
        const data = res.data.data;
        this.page1.total = data.total;
        this.data1 = data.records;
        console.log(this.data1);
        // console.log(this.data1);
        this.loading1 = false;
        this.$refs.crudrec1.refreshTable();
        this.$refs.crudrec1.doLayout();
        // this.$refs.crudrec1.refreshTable();
        // this.$refs.crudrec1.doLayout();
      });
      // onLoad1(page, params = {}) {
      //   this.loading1 = true;
@@ -975,7 +984,7 @@
        const data = res.data.data;
        this.page2.total = data.total;
        this.data2 = data.records;
        console.log(this.data2);
        // console.log(this.data2);
        this.loading2 = false;
        this.$refs.crudrec2.refreshTable();
        this.$refs.crudrec2.doLayout();
@@ -999,7 +1008,7 @@
        if (that.readLock("danweidata") != null) {
          row = JSON.parse(that.readLock("danweidata"));
          // that.obj0.title = row.enterprisename;
          console.log(row, "rowneibu");
          // console.log(row, "rowneibu");
          that.departmentid = row.departmentid;
          for (var k in row) {
            that.obj0[k] = row[k];
@@ -1112,9 +1121,20 @@
    this.onloads();
  },
  watch: {
    // chuzitime() {
    // console.log(this.chuzitime, "chuzitime");
    // windowWidth() {
    //   console.log(this.windowWidth, "windowWidth");
    // },
    windowHeight() {
      // console.log(this.windowHeight, "windowHeight");
      this.option1.height = this.windowHeight - 320;
      this.option2.height = this.windowHeight - 320;
      this.visible = false;
      this.$nextTick(() => {
        this.visible = true;
        this.refreshChange1();
        this.refreshChange2();
      });
    },
  },
};
</script>
src/views/securityUnitChild/licence.vue
@@ -47,7 +47,7 @@
  },
  mounted() {
    this.seeImg();
    console.log(this.row.licence);
    // console.log(this.row.licence);
  },
  comments: {
    srcList() {
src/views/securityUnitChild/social.vue
@@ -3,6 +3,7 @@
    :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
  >
    <avue-crud
      v-if="visible"
      :option="option"
      :table-loading="loading"
      :data="data"
@@ -84,6 +85,7 @@
      deptid = this.$store.getters.userInfo.dept_id;
    }
    return {
      visible: true,
      form: { cardid: "" },
      query: {},
@@ -98,7 +100,7 @@
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        // calcHeight: 30,
        tip: false,
        searchShow: true,
        align: "center",
@@ -384,9 +386,21 @@
      this.$refs.crud.refreshTable();
      this.$refs.crud.doLayout();
    },
    windowHeight() {
      console.log(this.windowHeight);
      this.option.height = this.windowHeight - 320;
      this.visible = false;
      this.$nextTick(() => {
        this.visible = true;
        this.refreshChange();
      });
    },
  },
  created() {
    this.option.height = this.windowHeight - 320;
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    ...mapGetters(["permission", "userInfo", "windowHeight"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.social_add, true),
src/views/trainingRegistration/index.vue
@@ -3,6 +3,7 @@
    :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
  >
    <avue-crud
      v-if="visibles"
      :option="option"
      :table-loading="loading"
      :data="data"
@@ -135,6 +136,7 @@
export default {
  data() {
    return {
      visibles: true,
      choiceName: [],
      loading: true,
      excelBox: false,
@@ -311,10 +313,10 @@
        // tip: false,
        // searchSize: "mini",
        searchMenuSpan: 6,
        height: 563,
        height: "auto",
        index: false,
        selectable: (row, index) => {
          console.log(row, index);
          // console.log(row, index);
          if (row.auditStatus == 4 && row.cancel == 1) {
            return true;
          } else {
@@ -342,7 +344,7 @@
      });
      return ids.join(",");
    },
    ...mapGetters(["userInfo", "permission"]),
    ...mapGetters(["userInfo", "permission", "windowWidth"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.notice_add, false),
@@ -356,6 +358,17 @@
    this.search["cancel"] = 1;
    this.search["auditStatus"] = 4;
    this.search["isExam"] = 1;
  },
  watch: {
    windowHeight() {
      // console.log(this.windowHeight, "windowHeight");
      this.option.height = this.windowHeight - 320;
      this.visibles = false;
      this.$nextTick(() => {
        this.visibles = true;
        this.refreshChange();
      });
    },
  },
  mounted() {
    // if (window.name == "baoming") {
@@ -554,7 +567,11 @@
      roleIds.forEach((roleId) => {
        getRoleDetail(roleId).then((res) => {
          var roleAlias = res.data.data.roleAlias;
          if (roleAlias == "保安公司管理员" || roleAlias == "保安" || roleAlias == "分公司管理员") {
          if (
            roleAlias == "保安公司管理员" ||
            roleAlias == "保安" ||
            roleAlias == "分公司管理员"
          ) {
            //如果是保安公司管理员
            params["deptId"] = that.userInfo.dept_id;
          }