| | |
| | | :data="item" |
| | | :ind="item.type" |
| | | @open="openMain" |
| | | v-show="showCard" |
| | | ></examineCard> |
| | | <!-- v-show="showCard" --> |
| | | <!-- :background="" --> |
| | | </div> |
| | | </div> |
| | |
| | | import examineCard from "@/components/examineCard/examineCard.vue"; //卡片 |
| | | import Approval from "@/components/Approval/Approval.vue"; //审批进度查询 |
| | | import cardPopup from "@/components/cardPopup/cardPopup.vue"; // 卡片弹窗 |
| | | import { |
| | | // getDetail, |
| | | getList, |
| | | getListre, |
| | | getListrek, |
| | | getListrev, |
| | | } from "@/api/permit/permit"; |
| | | import { mapGetters } from "vuex"; |
| | | import { resetRouter } from "@/router/router"; |
| | | |
| | |
| | | data() { |
| | | return { |
| | | userName: "", |
| | | showCard: false, |
| | | zhezao: false, |
| | | data: [], |
| | | dataCard: [], |
| | | out: true, |
| | | d: [], |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | created() { |
| | | this.cc(); |
| | | this.onLoad(this.page); |
| | | this.dataCard = ourDatas; |
| | | var cando = []; |
| | | for (var k in ourDatas) { |
| | |
| | | } |
| | | this.$store.commit("setcanDoIt", cando); |
| | | }, |
| | | watch: { |
| | | useWhere() { |
| | | this.onLoad(this.page); |
| | | }, |
| | | }, |
| | | methods: { |
| | | onLoad(page, params = {}) { |
| | | params["cardid"] = this.userInfo.Id; |
| | | getList(page.currentPage, page.pageSize, params).then((res) => { |
| | | const data = res.data.data; |
| | | this.data = data.records; |
| | | getListre(page.currentPage, page.pageSize, params).then((ress) => { |
| | | this.data = this.data.concat(ress.data.data.records); |
| | | getListrek(page.currentPage, page.pageSize, params).then((resk) => { |
| | | 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); |
| | | this.showCard = true; |
| | | this.data.forEach((item) => { |
| | | for (const key in this.dataCard) { |
| | | 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) { |
| | | this.$store.commit("changecanDoIt", { |
| | | o: true, |
| | | ptype: item.ptype, |
| | | }); |
| | | if (item.type == 0 || item.type == 2) { |
| | | this.$store.commit("changecanDoIt", { |
| | | o: false, |
| | | ptype: item.ptype, |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | // onLoad(page, params = {}, val) { |
| | | // params["cardid"] = this.userInfo.Id; |
| | | // getList(page.currentPage, page.pageSize, params).then((res) => { |
| | | // const data = res.data.data; |
| | | // this.data = data.records; |
| | | // getListre(page.currentPage, page.pageSize, params).then((ress) => { |
| | | // this.data = this.data.concat(ress.data.data.records); |
| | | // getListrek(page.currentPage, page.pageSize, params).then((resk) => { |
| | | // 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); |
| | | // console.log(val); |
| | | // if (this.data.length == 0) { |
| | | // this.$store.commit("changecanDoIt", { |
| | | // o: true, |
| | | // ptype: val, |
| | | // }); |
| | | // console.log("一条数据都没有"); |
| | | // this.$store.commit("changeuseWhere", val); |
| | | // return; |
| | | // } |
| | | // this.data.forEach((item) => { |
| | | // if (item.ptype == val) { |
| | | // if (item.type == 0 || item.type == 2) { |
| | | // this.$store.commit("changecanDoIt", { |
| | | // o: false, |
| | | // ptype: val, |
| | | // }); |
| | | // console.log("有数据"); |
| | | // this.$store.commit("changeuseWhere", val); |
| | | // } else { |
| | | // this.$store.commit("changecanDoIt", { |
| | | // o: true, |
| | | // ptype: val, |
| | | // }); |
| | | // console.log("无数据"); |
| | | // this.$store.commit("changeuseWhere", val); |
| | | // } |
| | | // } |
| | | // }); |
| | | // }); |
| | | // }); |
| | | // }); |
| | | // }); |
| | | // }, |
| | | cc: function () { |
| | | this.userName = this.userInfo.user_name; |
| | | }, |
| | |
| | | this.$store.commit("doitApprovalShow", true); |
| | | return; |
| | | } |
| | | // this.onLoad(this.page, {}, val); |
| | | this.$store.commit("changeuseWhere", val); |
| | | }, |
| | | }, |