保安监管系统-验收版本
zhengpz
2021-09-17 0bfdaad01fdcdeef567b59a49f7715a7ac7f0d51
src/views/securityUnitOperation/operationAnalysis.vue
@@ -77,7 +77,7 @@
              @click="showTable('fw')"
            >
              <span>服务对象预警(家)</span>
              <span>{{ card.czBaoan }}</span>
              <span>{{ yj.fuwu }}</span>
              <span>服务对象小于2家</span>
            </div>
            <div
@@ -86,7 +86,7 @@
              @click="showTable('pq')"
            >
              <span>派遣预警(家)</span>
              <span>{{ card.kh }}</span>
              <span>{{ yj.paiqian }}</span>
              <span>派遣率小于50%</span>
            </div>
            <div
@@ -95,7 +95,7 @@
              @click="showTable('cz')"
            >
              <span>持证上岗预警(家)</span>
              <span>{{ card.sheb }}</span>
              <span>{{ yj.chizheng }}</span>
              <span>持证率小于50%</span>
            </div>
          </div>
@@ -161,116 +161,116 @@
          <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"
          ></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="服务对象数"
            :formatter="sexFormatter"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="cardid"
            prop="dispatchUnitName"
            label="服务单位名称"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
          <!-- <el-table-column
            :key="gridData.type"
            prop="age"
            label="备注"
            :show-overflow-tooltip="true"
            width="100"
          ></el-table-column>
          ></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="czl"
            prop="cnum"
            label="派遣人数"
            :show-overflow-tooltip="true"
          ></el-table-column>
          <el-table-column
            :key="gridData.type"
            prop="sbnum"
            prop="pnum"
            label="派遣比例"
            :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 === 'cz'">
          <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"
            prop="pnum"
            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>
          ></el-table-column> -->
        </template>
      </el-table>
      <el-pagination
@@ -295,7 +295,10 @@
  getCompanys,
  queryYearKh,
  queryYearG,
  selectAge
  selectAge,
  getSecurityUnitServerLessPage,
  getSecurityUnitDispatcherLessPage,
  getSecurityUnitHoldLessPage
} from "../../api/securityUnitOperation/securityUnitOperation";
export default {
  data() {
@@ -318,6 +321,11 @@
        addsheb: 0,
        baoanPq: 0,
        addbaoanPq: 0
      },
      yj: {
        fuwu: 0,
        paiqian: 0,
        chizheng: 0
      },
      options0: [
        {
@@ -386,15 +394,27 @@
    };
  },
  methods: {
    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 === "fw") {
        this.gridData.title = "服务对象预警保安公司";
        this.getSecurityUnitServerLessPage();
      } else if (type === "pq") {
        this.gridData.title = "派遣预警保安公司";
        this.getSecurityUnitDispatcherLessPage();
      } else if (type === "cz") {
        this.gridData.title = "持证上岗预警保安公司";
        this.getSecurityUnitHoldLessPage();
      }
    },
    //点击节点
@@ -561,11 +581,70 @@
        baoanPq: 0,
        addbaoanPq: 0
      };
      this.yj = {
        fuwu: 0,
        paiqian: 0,
        chizheng: 0
      };
      this.ageData = {
        qing: 0,
        zhong: 0,
        lao: 0
      };
    },
    getSecurityUnitServerLessPage() {
      let params = {
        jurisdiction: this.value1,
        departmentid: this.value2,
        current: this.gridData.current,
        size: 10
      };
      getSecurityUnitServerLessPage(params).then(res => {
        if (res.data.code === 200) {
          this.yj.fuwu = 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.paiqian = res.data.data.total;
          this.gridData.data = res.data.data.records;
          this.gridData.total = res.data.data.total;
        }
        if (this.dialogloading) {
          this.dialogloading = false;
        }
      });
    },
    getSecurityUnitHoldLessPage() {
      let params = {
        jurisdiction: this.value1,
        departmentid: this.value2,
        current: this.gridData.current,
        size: 10
      };
      getSecurityUnitHoldLessPage(params).then(res => {
        if (res.data.code === 200) {
          this.yj.chizheng = 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 => {
@@ -578,6 +657,9 @@
      this.getQueryYearKh();
      this.getQueryYearG();
      this.setAgeEchart();
      this.getSecurityUnitServerLessPage();
      this.getSecurityUnitDispatcherLessPage();
      this.getSecurityUnitHoldLessPage();
    }
  },
  mounted() {