保安服务单位许可和备案申请系统
liuyg
2021-08-26 fd8e1acbc8bac690c020248b806fc4f06af1792e
src/views/home/index.vue
@@ -92,6 +92,19 @@
    this.cc();
    this.onLoad(this.page);
    this.dataCard = ourDatas;
    var cando = [];
    for (var k in ourDatas) {
      cando.push({
        opens: true,
        type: ourDatas[k].type,
      });
    }
    this.$store.commit("setcanDoIt", cando);
  },
  watch: {
    useWhere() {
      this.onLoad(this.page);
    },
  },
  methods: {
    onLoad(page, params = {}) {
@@ -105,25 +118,28 @@
            this.data = this.data.concat(resk.data.data.records);
            getListrev(page.currentPage, page.pageSize, params).then((resv) => {
              this.data = this.data.concat(resv.data.data.records);
              console.log("已有申请数量", this.data.length);
              if (this.data.length == 0) {
                this.$store.commit("changecanDoIt", true);
              } else {
                this.$store.commit("changecanDoIt", false);
              }
              console.log("已有申请数量:", this.data.length);
              this.showCard = true;
              this.data.forEach((item) => {
                for (const key in this.dataCard) {
                  if (this.dataCard[key].ptype == item.ptype) {
                    console.log("已申请名称", this.dataCard[key].menuName);
                    console.log("申请状态", this.dataCard[key].type);
                    if (
                      this.dataCard[key].type == 0 ||
                      this.dataCard[key].type == 2
                    ) {
                      this.$store.commit("changecanDoIt", false);
                    } else {
                      this.$store.commit("changecanDoIt", true);
                  if (this.dataCard[key].type == item.ptype) {
                    // console.log("已申请名称:", item.enterprisename);
                    // console.log("已申请序号:", item.ptype);
                    // console.log("申请状态:", item.type);
                    for (var k in this.canDoIt) {
                      if (this.canDoIt[k].type == item.ptype) {
                        if (item.type == 0 || item.type == 2) {
                          this.$store.commit("changecanDoIt", {
                            o: false,
                            ptype: item.ptype,
                          });
                        } else {
                          this.$store.commit("changecanDoIt", {
                            o: false,
                            ptype: item.ptype,
                          });
                        }
                      }
                    }
                  }
                }
@@ -163,7 +179,6 @@
        this.$store.commit("doitApprovalShow", true);
        return;
      }
      this.onLoad(this.page);
      this.$store.commit("changeuseWhere", val);
    },
  },