Administrator
2021-12-09 d1b058faa19088838b668d6c03dd71c2bcc7d5d3
src/views/dispatch/dispatch.vue
@@ -1,6 +1,11 @@
<template>
  <basic-container>
    <div class="dispatch">
    <div
      :class="[
        'dispatch',
        $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
      ]"
    >
      <!-- <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs>
    <span v-if="typeTABS.prop === 'tab1'"> -->
      <avue-crud
@@ -95,7 +100,7 @@
      <!-- <span v-else-if="typeTABS.prop === 'tab3'">选项卡内容3</span> -->
    </div>
  </basic-container>
</template>
</template>
<script>
import {
@@ -150,6 +155,7 @@
        pageSize: 10,
        currentPage: 1,
        total: 0,
        ...this.$store.state.control.changePageSize,
      },
      query: {},
      data: [],
@@ -216,6 +222,7 @@
        menuWidth: 160,
        align: "center",
        selection: true,
        ...this.$store.state.control.clearOtherBut,
        column: [
          //派遣服务公司登记
          {
@@ -231,13 +238,13 @@
            rules: [
              {
                required: true,
                message: "请输入名称",
                message: "请输入派遣单位名称",
                trigger: "click",
              },
            ],
          },
          {
            label: "保安公司",
            label: "企业名称",
            prop: "deptId",
            type: "tree",
            overHidden: true,
@@ -254,7 +261,7 @@
            rules: [
              {
                required: true,
                message: "请选择保安公司",
                message: "请选择企业名称",
                trigger: "click",
              },
            ],
@@ -310,6 +317,7 @@
            searchSpan: 4,
            overHidden: true,
            labelWidth: 138,
            parent: false,
            type: "tree",
            dicUrl: "/api/jurisdiction/lazy-tree",
            props: {
@@ -320,7 +328,7 @@
            slot: true,
            rules: [
              {
                required: true,
                required: false,
                message: "请选择所属辖区",
                trigger: "click",
              },
@@ -346,17 +354,17 @@
            slot: true,
            rules: [
              {
                required: true,
                required: false,
                message: "请选择所属辖区",
                trigger: "click",
              },
            ],
          },
          // {
          //   label: " 派遣人数",
          //   prop: "num",
          //   labelWidth: 138,
          // },
          {
            label: " 派遣单位地址",
            prop: "address",
            labelWidth: 138,
          },
          // {
          //   label: "合同生效时间",
          //   prop: "releaseTimeRange",
@@ -418,8 +426,37 @@
            // overHidden: true
          },
          {
            label: " 负责人",
            label: " 派遣单位联系人",
            prop: "linkman",
            labelWidth: 138,
            // rules: [
            //   {
            //     required: true,
            //     message: "请输入派遣单位联系人",
            //     trigger: "click",
            //   },
            // ],
          },
          {
            label: "派遣单位联系方式",
            prop: "phone",
            labelWidth: 138,
            width: 130,
            // rules: [
            //   {
            //     required: true,
            //     message: "请输入联系方式",
            //     trigger: "click",
            //   },
            //   {
            //     validator: phones,
            //     trigger: ["change", "blur"],
            //   },
            // ],
          },
          {
            label: " 负责人",
            prop: "securityLinkman",
            labelWidth: 138,
            rules: [
              {
@@ -431,7 +468,7 @@
          },
          {
            label: "负责人联系方式",
            prop: "phone",
            prop: "cell",
            labelWidth: 138,
            width: 110,
            rules: [
@@ -440,9 +477,23 @@
                message: "请输入联系方式",
                trigger: "click",
              },
              // {
              //   validator: phones,
              //   trigger: ["change", "blur"],
              // },
            ],
          },
          {
            label: "派遣保安员数",
            prop: "num",
            type: "number",
            labelWidth: 138,
            width: 110,
            rules: [
              {
                validator: phones,
                trigger: ["change", "blur"],
                required: true,
                message: "请输入派遣保安员数",
                trigger: "click",
              },
            ],
          },
@@ -615,7 +666,6 @@
      this.onLoad(this.page, this.query);
    },
    rowClick(row) {
      // console.log(row);
      window.localStorage.setItem("paqiandata", JSON.stringify(row));
      this.$router.push({
        path: "/dispatchChild",
@@ -668,24 +718,25 @@
      if (this.useifid != 266) {
        values["deptId"] = this.useifid;
      }
      // console.log(values);
      if (this.userInfo.role_name == "公安管理员") {
        values["jurisdiction"] = that.userInfo.jurisdiction;
      }
      console.log(params);
      getdata(
        page.currentPage,
        page.pageSize,
        // Object.assign(params, this.query)
        values
      ).then((res) => {
        // console.log(res);
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        for (var k in this.data) {
          // this.data[k]["deptId"] = that.userInfo.dept_id;
          this.data[k]["tenantName"] = that.userInfo.user_name;
          // console.log(this.data[k], 123456);
          if (this.data[k].num == -1) {
            this.data[k].num = null;
          }
        }
        window.localStorage.setItem("paqiandataS", JSON.stringify(this.data));
        this.loading = false;
@@ -729,4 +780,4 @@
.el-collapse-item {
  padding-top: 15px !important;
}
</style>
</style>