保安监管系统-验收版本
zhengpz
2021-09-17 0bfdaad01fdcdeef567b59a49f7715a7ac7f0d51
src/views/securityUnitOperation/economicAnalysis.vue
@@ -67,7 +67,7 @@
              @click="showTable('sb')"
            >
              <span>社保缴纳预警(家)</span>
              <span>{{ socialSecurity.num }}</span>
              <span>{{ yj.sb }}</span>
              <span>社保缴纳率小于90%</span>
            </div>
            <div
@@ -76,7 +76,7 @@
              @click="showTable('bx')"
            >
              <span>保险缴纳预警(家)</span>
              <span>{{ socialSecurity.money }}</span>
              <span>{{ yj.bx }}</span>
              <span>保险缴纳率小于90%</span>
            </div>
            <div
@@ -85,7 +85,7 @@
              @click="showTable('fw')"
            >
              <span>服务合同预警(份)</span>
              <span>{{ socialSecurity.paiQ }}</span>
              <span>{{ yj.fw }}</span>
              <span>服务合同小于2份</span>
            </div>
            <div
@@ -94,7 +94,7 @@
              @click="showTable('pq')"
            >
              <span>派遣预警(家)</span>
              <span>{{ socialSecurity.sheBPerson }}</span>
              <span>{{ yj.pq }}</span>
              <span>派遣率小于50%</span>
            </div>
          </div>
@@ -136,153 +136,157 @@
          <el-table-column :key="gridData.type" type="index"> </el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="realName"
            prop="enterprisename"
            label="保安公司名称"
            :show-overflow-tooltip="true"
            width="180"
            width="300"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="deptName"
            prop="jurisdictionName"
            label="所属辖区"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="sex"
            prop="znum"
            label="保安总人数"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="cardid"
            prop="cnum"
            label="社保缴纳人数"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="age"
            label="社保缴纳比例"
            prop="pnum"
            label="社保缴纳率"
            :formatter="kslFormatter"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
          <!-- <el-table-column
            :key="gridData.type"
            prop="age"
            label="备注"
            :show-overflow-tooltip="true"
          ></el-table-column>
          ></el-table-column> -->
        </template>
        <template v-if="gridData.type === 'bx'">
          <el-table-column :key="gridData.type" type="index"> </el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="enterpriseName"
            prop="enterprisename"
            label="保安公司名称"
            width="180"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="znum"
            prop="jurisdictionName"
            label="所属辖区"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="cznum"
            prop="znum"
            label="保安总人数"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="czl"
            prop="cnum"
            label="保险缴纳人数"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="sbnum"
            label="保险缴纳比例"
            prop="pnum"
            label="保险缴纳率"
            :formatter="kslFormatter"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
          <!-- <el-table-column
            :key="gridData.type"
            prop="sbl"
            label="备注"
            :show-overflow-tooltip="true"
          ></el-table-column>
          ></el-table-column> -->
        </template>
        <template v-if="gridData.type === 'fw'">
          <el-table-column :key="gridData.type" type="index"> </el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="enterpriseName"
            prop="enterprisename"
            label="保安公司名称"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="znum"
            prop="jurisdictionName"
            label="所属辖区"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="cznum"
            prop="znum"
            label="服务合同数"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="painum"
            prop="dispatchUnitName"
            label="服务单位名称"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
          <!-- <el-table-column
            :key="gridData.type"
            prop="pql"
            label="备注"
            :show-overflow-tooltip="true"
          ></el-table-column> </template
          ></el-table-column> -->
        </template>
        ><template v-if="gridData.type === 'pq'">
          <el-table-column :key="gridData.type" type="index"> </el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="enterpriseName"
            prop="enterprisename"
            label="保安公司名称"
            width="180"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="znum"
            prop="jurisdictionName"
            label="所属辖区"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="cznum"
            prop="znum"
            label="保安总人数"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="painum"
            prop="cnum"
            label="派遣人数"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="fwnum"
            label="派遣比例"
            prop="pnum"
            label="派遣率"
            :formatter="kslFormatter"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
          <!-- <el-table-column
            :key="gridData.type"
            prop="pql"
            label="备注"
            :show-overflow-tooltip="true"
          ></el-table-column>
          ></el-table-column> -->
        </template>
      </el-table>
      <el-pagination
@@ -309,7 +313,11 @@
  queryYearSoil,
  queryYearAn,
  queryYearPz,
  queryYearKh
  queryYearKh,
  getSecurityUnitSoilLessPage,
  getSecurityUnitInsuranceLessPage,
  getSecurityUnitServerLessPage1,
  getSecurityUnitDispatcherLessPage
} from "../../api/securityUnitOperation/securityUnitOperation";
export default {
  data() {
@@ -378,21 +386,47 @@
        title: ""
      },
      dialogloading: false,
      dialogTableVisible: false
      dialogTableVisible: false,
      yj: {
        sb: 0,
        bx: 0,
        fw: 0,
        pq: 0
      }
    };
  },
  methods: {
    kslFormatter(row) {
      if (row.pnum && row.pnum !== "0") {
        return row.pnum + "%";
      } else {
        return row.pnum;
      }
    },
    changePage() {
      this.showcurTable(this.gridData.type);
    },
    showTable(type) {
      this.gridData.type = type;
      this.gridData.current = 1;
      this.gridData.data = [];
      this.showcurTable(type);
    },
    showcurTable(type) {
      this.dialogloading = true;
      this.dialogTableVisible = true;
      if (type === "sb") {
        this.gridData.title = "社保缴纳预警保安公司";
        this.getSecurityUnitSoilLessPage();
      } else if (type === "bx") {
        this.gridData.title = "保险缴纳预警保安公司";
        this.getSecurityUnitInsuranceLessPage();
      } else if (type === "fw") {
        this.gridData.title = "服务合同预警保安公司";
        this.getSecurityUnitServerLessPage();
      } else if (type === "pq") {
        this.gridData.title = "派遣预警保安公司";
        this.getSecurityUnitDispatcherLessPage();
      }
    },
    //点击节点
@@ -448,7 +482,7 @@
      getCompanys({ jurisdiction: this.value1 }).then(res => {
        if (res.data.code === 200) {
          this.options2 = res.data.data;
          this.value2 = this.options2[0] ? this.options2[0].departmentid : "";
          this.value2 = "";
          this.changeCompanys();
        }
      });
@@ -531,6 +565,79 @@
        this.loading3 = false;
      });
    },
    getSecurityUnitSoilLessPage() {
      let params = {
        jurisdiction: this.value1,
        departmentid: this.value2,
        current: this.gridData.current,
        size: 10
      };
      getSecurityUnitSoilLessPage(params).then(res => {
        if (res.data.code === 200) {
          this.yj.sb = res.data.data.total;
          this.gridData.data = res.data.data.records;
          this.gridData.total = res.data.data.total;
        }
        if (this.dialogloading) {
          this.dialogloading = false;
        }
      });
    },
    getSecurityUnitInsuranceLessPage() {
      let params = {
        jurisdiction: this.value1,
        departmentid: this.value2,
        current: this.gridData.current,
        size: 10
      };
      getSecurityUnitInsuranceLessPage(params).then(res => {
        if (res.data.code === 200) {
          this.yj.bx = res.data.data.total;
          this.gridData.data = res.data.data.records;
          this.gridData.total = res.data.data.total;
        }
        if (this.dialogloading) {
          this.dialogloading = false;
        }
      });
    },
    getSecurityUnitServerLessPage() {
      let params = {
        jurisdiction: this.value1,
        departmentid: this.value2,
        current: this.gridData.current,
        size: 10
      };
      getSecurityUnitServerLessPage1(params).then(res => {
        if (res.data.code === 200) {
          this.yj.fw = res.data.data.total;
          this.gridData.data = res.data.data.records;
          this.gridData.total = res.data.data.total;
        }
        if (this.dialogloading) {
          this.dialogloading = false;
        }
      });
    },
    getSecurityUnitDispatcherLessPage() {
      let params = {
        jurisdiction: this.value1,
        departmentid: this.value2,
        current: this.gridData.current,
        size: 10
      };
      getSecurityUnitDispatcherLessPage(params).then(res => {
        if (res.data.code === 200) {
          this.yj.pq = res.data.data.total;
          this.gridData.data = res.data.data.records;
          this.gridData.total = res.data.data.total;
        }
        if (this.dialogloading) {
          this.dialogloading = false;
        }
      });
    },
    changeCompanys() {
      this.options2.forEach(item => {
        if (item.departmentid === this.value2) {
@@ -541,6 +648,10 @@
      this.getSocialSecurity();
      this.getQueryYearSoil();
      this.getQueryYearAn();
      this.getSecurityUnitSoilLessPage();
      this.getSecurityUnitInsuranceLessPage();
      this.getSecurityUnitServerLessPage();
      this.getSecurityUnitDispatcherLessPage();
    }
  },
  mounted() {