zhengpz
2021-08-22 493ef0c05b05606dc74219ce3f4d3301ec85ad0d
研判模块表跳转传参
5 files modified
451 ■■■■■ changed files
src/views/securityUnitOperation/economicAnalysis.vue 22 ●●●● patch | view | raw | blame | history
src/views/securityUnitOperation/economicTable.vue 150 ●●●● patch | view | raw | blame | history
src/views/securityUnitOperation/operationAnalysis.vue 15 ●●●●● patch | view | raw | blame | history
src/views/securityUnitOperation/operationTable.vue 260 ●●●●● patch | view | raw | blame | history
src/views/statisticalQueryManagement/companyDetails.vue 4 ●●●● patch | view | raw | blame | history
src/views/securityUnitOperation/economicAnalysis.vue
@@ -6,7 +6,7 @@
          <div class="rowTitle">
            <img src="../../../public/img/bajgxt/u1618.png" />
            <span>数据概览</span>
            <el-select class="select0" v-model="value0" placeholder="请选择">
            <!-- <el-select class="select0" v-model="value0" placeholder="请选择">
              <el-option
                v-for="item in options0"
                :key="item.value"
@@ -14,7 +14,7 @@
                :value="item.value"
              >
              </el-option>
            </el-select>
            </el-select> -->
            <el-select
              class="select1"
              v-model="value1"
@@ -154,12 +154,21 @@
      },
      loading1: true,
      loading2: true,
      loading3: true
      loading3: true,
      enterpriseName: ""
    };
  },
  methods: {
    toEconomicTable() {
      this.$router.push({ path: "/securityUnitOperation/economicTable" });
      this.$router.push({
        path:
          "/securityUnitOperation/economicTable?jurisdiction=" +
          this.value2 +
          "&enterpriseName=" +
          this.enterpriseName +
          "&jurisdiction1=" +
          this.value1
      });
    },
    getFenju() {
      lazyTreeJu().then(res => {
@@ -281,6 +290,11 @@
      });
    },
    changeCompanys() {
      this.options2.forEach(item => {
        if (item.departmentid === this.value2) {
          this.enterpriseName = item.enterpriseName;
        }
      });
      this.pieChange();
      this.getSocialSecurity();
      this.getQueryYearSoil();
src/views/securityUnitOperation/economicTable.vue
@@ -2,12 +2,18 @@
  <basic-container>
    <avue-crud
      :option="tableOption"
      :data="tableData"
      :table-loading="loading"
      :page.sync="tablePage"
      :data="tableData"
      :page.sync="page"
      :permission="permissionList"
      :before-open="beforeOpen"
      @date-change="dateChange"
      ref="crud"
      @row-update="rowUpdates"
      @row-save="rowSave"
      @search-change="searchChange"
      @search-reset="searchReset"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
    >
    </avue-crud>
  </basic-container>
@@ -17,10 +23,16 @@
import XLSX from "xlsx";
import { mapGetters } from "vuex";
import { selectJj } from "../../api/securityUnitOperation/securityUnitOperation";
import { lazyTreeJu } from "../../api/index/index";
export default {
  name: "公司经济情况智能分析详情表",
  data() {
    return {
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0
      },
      value1: "",
      value2: "",
      tableData: [
@@ -55,11 +67,6 @@
        //   bz: ""
        // }
      ],
      tablePage: {
        pageSize: 10,
        currentPage: 1,
        total: 0
      },
      tableOption: {
        excelBtn: true,
        delBtn: false,
@@ -135,35 +142,14 @@
            label: "所属辖区",
            prop: "jurname",
            searchSpan: 4,
            type: "select",
            type: "tree",
            props: {
              label: "label",
              value: "value"
              label: "title",
              value: "id"
            },
            // cascaderItem: ["city", "area"],
            // dicUrl:subofficeOptions,
            dicData: [
              {
                value: "0",
                label: "南昌市公安局"
              },
              {
                value: "2",
                label: "东湖分局"
              },
              {
                value: "3",
                label: "西湖分局"
              },
              {
                value: "4",
                label: "青云谱分局"
              },
              {
                value: "5",
                label: "青山湖分局"
              }
            ],
            dicData: [],
            search: true,
            rules: [
              {
@@ -273,18 +259,102 @@
    }
  },
  methods: {
    dateChange() {},
    getTableData() {
      selectJj({ current: 1, size: 10 }).then(res => {
    rowSave(row, done, loading) {
      adddata(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        },
        error => {
          window.console.log(error);
          loading();
        }
      );
    },
    rowUpdates(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        },
        error => {
          window.console.log(error);
          loading();
        }
      );
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      let param = {};
      param["jurisdiction"] = params["jurisdiction"] || "";
      param["enterpriseName"] = params["enterpriseName"] || "";
      param["current"] = page.currentPage;
      param["size"] = page.pageSize;
      selectJj(param).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.tableData = res.data.data;
        this.loading = false;
      });
    },
    getSubOfficeData() {
      lazyTreeJu().then(res => {
        if (res.data.code === 200) {
          this.tableData = res.data.data;
          this.loading = false;
          this.tableOption.column.forEach(item => {
            if (item.label == "所属辖区") {
              item.dicData = res.data.data;
            }
          });
        } else {
          this.$message.error(res.msg);
        }
      });
    },
    getLocationParams() {
      let url = window.location.href;
      let urlArr = url.split("?")[1].split("&");
      var object = new Object();
      for (var i = 0; i < urlArr.length; i++) {
        let mm = urlArr[i].split("=");
        object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
      }
      let jurisdiction = object["jurisdiction"] || "";
      let enterpriseName = object["enterpriseName"] || "";
      let obj = { jurisdiction: jurisdiction, enterpriseName: enterpriseName };
      this.onLoad(this.page, obj);
    }
  },
  mounted() {
    this.getTableData();
    this.getLocationParams();
    this.getSubOfficeData();
  }
};
</script>
src/views/securityUnitOperation/operationAnalysis.vue
@@ -229,10 +229,12 @@
    toOperationTable() {
      this.$router.push({
        path:
          "/securityUnitOperation/operationTable?jurisdiction =" +
          "/securityUnitOperation/operationTable?jurisdiction=" +
          this.value2 +
          "&enterpriseName =" +
          this.enterpriseName
          "&enterpriseName=" +
          this.enterpriseName +
          "&jurisdiction1=" +
          this.value1
      });
    },
    getFenju() {
@@ -255,9 +257,10 @@
      getCompanys({ jurisdiction: this.value1 }).then(res => {
        if (res.data.code === 200) {
          this.options2 = res.data.data;
          debugger
          this.value2 = this.options2[0] ? this.options2[0].departmentid : "";
          this.enterpriseName = this.options2[0] ? this.options2[0].enterpriseName : "";
          this.enterpriseName = this.options2[0]
            ? this.options2[0].enterpriseName
            : "";
          this.changeCompanys();
        }
      });
@@ -350,7 +353,7 @@
    },
    changeCompanys() {
      this.options2.forEach(item => {
        if (item.value === this.value2) {
        if (item.departmentid === this.value2) {
          this.enterpriseName = item.enterpriseName;
        }
      });
src/views/securityUnitOperation/operationTable.vue
@@ -2,12 +2,19 @@
  <basic-container>
    <avue-crud
      :option="tableOption"
      :data="tableData"
      :table-loading="loading"
      :page.sync="tablePage"
      :data="tableData"
      :page.sync="page"
      :permission="permissionList"
      :before-open="beforeOpen"
      @date-change="dateChange"
      ref="crud"
      @row-update="rowUpdates"
      @row-save="rowSave"
      @search-change="searchChange"
      @search-reset="searchReset"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
    >
    </avue-crud>
  </basic-container>
@@ -21,6 +28,11 @@
  name: "公司运营情况智能分析详情表",
  data() {
    return {
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0
      },
      value1: "",
      value2: "",
      tableData: [
@@ -64,11 +76,6 @@
        //   bz: ""
        // }
      ],
      tablePage: {
        pageSize: 10,
        currentPage: 1,
        total: 0
      },
      tableOption: {
        excelBtn: true,
        delBtn: false,
@@ -88,62 +95,62 @@
        viewBtn: true,
        dialogClickModal: false,
        column: [
          {
            label: "类别",
            hide: true,
            prop: "",
            search: true,
            searchSpan: 4,
            display: true,
            type: "select",
            props: {
              label: "label",
              value: "value"
            },
            // cascaderItem: ["city", "area"],
            // dicUrl:subofficeOptions,
            dicData: [
              {
                value: "0",
                label: "全部"
              },
              {
                value: "1",
                label: "总保安人数"
              },
              {
                value: "2",
                label: "正常保安数"
              },
              {
                value: "3",
                label: "持证保安数"
              },
              {
                value: "4",
                label: "保安派遣数"
              },
              {
                value: "5",
                label: "过考保安数"
              },
              {
                value: "6",
                label: "服务单位数"
              },
              {
                value: "7",
                label: "缴纳社保保安数"
              }
            ],
            rules: [
              {
                required: true,
                message: "请选择类别",
                trigger: "blur"
              }
            ]
          },
          // {
          //   label: "类别",
          //   hide: true,
          //   prop: "",
          //   search: true,
          //   searchSpan: 4,
          //   display: true,
          //   type: "select",
          //   props: {
          //     label: "label",
          //     value: "value"
          //   },
          //   // cascaderItem: ["city", "area"],
          //   // dicUrl:subofficeOptions,
          //   dicData: [
          //     {
          //       value: "0",
          //       label: "全部"
          //     },
          //     {
          //       value: "1",
          //       label: "总保安人数"
          //     },
          //     {
          //       value: "2",
          //       label: "正常保安数"
          //     },
          //     {
          //       value: "3",
          //       label: "持证保安数"
          //     },
          //     {
          //       value: "4",
          //       label: "保安派遣数"
          //     },
          //     {
          //       value: "5",
          //       label: "过考保安数"
          //     },
          //     {
          //       value: "6",
          //       label: "服务单位数"
          //     },
          //     {
          //       value: "7",
          //       label: "缴纳社保保安数"
          //     }
          //   ],
          //   rules: [
          //     {
          //       required: true,
          //       message: "请选择类别",
          //       trigger: "blur"
          //     }
          //   ]
          // },
          {
            label: "公司名称",
            prop: "enterpriseName",
@@ -236,61 +243,102 @@
    };
  },
  methods: {
    rowSave(row, done, loading) {
      adddata(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        },
        error => {
          window.console.log(error);
          loading();
        }
      );
    },
    rowUpdates(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        },
        error => {
          window.console.log(error);
          loading();
        }
      );
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      let param = {};
      param["jurisdiction"] = params["jurisdiction"] || "";
      param["enterpriseName"] = params["enterpriseName"] || "";
      param["current"] = page.currentPage;
      param["size"] = page.pageSize;
      selectTb(param).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.tableData = res.data.data;
        this.loading = false;
      });
    },
    getSubOfficeData() {
      lazyTreeJu().then(res => {
        if (res.data.code === 200) {
          console.log(res.data, 99)
          this.tableOption.column.forEach(item => {
            if (item.label == "所属辖区") {
              item.dicData = res.data.data
              item.dicData = res.data.data;
            }
          })
          // this.subOfficeData = res.data.data;
          // this.subOfficeValue = this.subOfficeData[0].value || "";
          });
        } else {
          this.$message.error(res.msg);
        }
      });
    },
    getTableData() {
      let params = {
        jurisdiction: "",
        enterpriseName: "",
        size: 1,
        current: 10
      };
      selectTb(params).then(res => {
        if (res.data.code === 200) {
          this.tableData = res.data.data;
          this.loading = false;
        }
      });
    getLocationParams() {
      let url = window.location.href;
      let urlArr = url.split("?")[1].split("&");
      var object = new Object();
      for (var i = 0; i < urlArr.length; i++) {
        let mm = urlArr[i].split("=");
        object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
      }
      let jurisdiction = object["jurisdiction"] || "";
      let enterpriseName = object["enterpriseName"] || "";
      let obj = { jurisdiction: jurisdiction, enterpriseName: enterpriseName };
      this.onLoad(this.page, obj);
    }
    // downExcel() {
    //   let et = XLSX.utils.table_to_book(document.getElementById("table"));
    //   let etout = XLSX.write(et, {
    //     bookType: "xlsx",
    //     bookSST: true,
    //     type: "array"
    //   });
    //   try {
    //     FileSaver.saveAs(
    //       new Blob([etout], {
    //         type: "application/octet-stream"
    //       }),
    //       `表.xlsx`
    //     ); //导出的文件名
    //   } catch (e) {
    //     console.log(e, etout);
    //   }
    //   return etout;
    // }
  },
  mounted() {
    this.getSubOfficeData();
    this.getTableData();
    this.getLocationParams();
    this.getSubOfficeData();
  }
};
</script>
src/views/statisticalQueryManagement/companyDetails.vue
@@ -352,7 +352,7 @@
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
      this.onLoad(this.page, this.query);
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
@@ -380,7 +380,7 @@
        this.loading = false;
        // this.selectionClear();
      });
    },
    }
    // getTableData() {
    //   selectUIn(param).then(res => {
    //     if (res.data.code === 200) {