Browse Source

接口错误返回提醒

V1.0
SongZhen 2 years ago
parent
commit
6a6930d43b
  1. 4
      src/components/Tree/nodeWrap.vue
  2. 26
      src/views/dataBoard/organizational/dangTree/index.vue
  3. 26
      src/views/dataBoard/organizational/gridTree/index.vue
  4. 26
      src/views/dataBoard/organizational/jwTree/index.vue
  5. 38
      src/views/dataBoard/organizational/microgrid/components/reportAnEvent.vue
  6. 7
      src/views/dataBoard/organizational/microgrid/index.vue

4
src/components/Tree/nodeWrap.vue

@ -134,11 +134,13 @@ export default {
getHomeTypes(id) {
this.$http.get(`/actual/base/organizational/structure/getResidentCategoryByHouseId?houseId=${"1495582904602800129"}`).then((res) => {
const { code, data } = res.data;
const { code, msg, data } = res.data;
if (code === 0) {
const newItem = data[0];
const itemNumOne = Object.keys(newItem).filter((key) => newItem[key] === 1);
this.homeTypeArr = itemNumOne;
} else {
this.$message.error(msg);
}
});
},

26
src/views/dataBoard/organizational/dangTree/index.vue

@ -68,21 +68,19 @@ export default {
//
getTreeData() {
this.loading = true;
this.$http
.get(`/actual/base/organizational/structure/partyCommitteeOrg?agencyId=${this.$store.state.chooseArea.chooseName.orgId}`)
.then((res) => {
const {
data: { code, data },
} = res;
if (code === 0) {
this.nodeConfig = data[0];
this.getDataPLevel(data);
this.loading = false;
}
})
.catch(() => {
this.$http.get(`/actual/base/organizational/structure/partyCommitteeOrg?agencyId=${this.$store.state.chooseArea.chooseName.orgId}`).then((res) => {
const {
data: { code, msg, data },
} = res;
if (code === 0) {
this.nodeConfig = data[0];
this.getDataPLevel(data);
this.loading = false;
});
} else {
this.loading = false;
this.$message.error(msg);
}
});
},
getTitleNameMapFun(i) {

26
src/views/dataBoard/organizational/gridTree/index.vue

@ -72,21 +72,19 @@ export default {
//
getTreeData() {
this.loading = true;
this.$http
.get(`/gov/org/organizational/neighborhood/getGridCommitteeOrgTreeList?agencyId=${this.$store.state.chooseArea.chooseName.orgId}`)
.then((res) => {
const {
data: { code, data },
} = res;
if (code === 0) {
this.nodeConfig = data[0];
this.getDataPLevel(data);
this.loading = false;
}
})
.catch(() => {
this.$http.get(`/gov/org/organizational/neighborhood/getGridCommitteeOrgTreeList?agencyId=${this.$store.state.chooseArea.chooseName.orgId}`).then((res) => {
const {
data: { code, msg, data },
} = res;
if (code === 0) {
this.nodeConfig = data[0];
this.getDataPLevel(data);
this.loading = false;
});
} else {
this.loading = false;
this.$message.error(msg);
}
});
},
getTitleNameMapFun(i) {

26
src/views/dataBoard/organizational/jwTree/index.vue

@ -74,21 +74,19 @@ export default {
//
getTreeData() {
this.loading = true;
this.$http
.get(`/gov/org/organizational/neighborhood/getNeighborhoodCommitteeOrgTreeList?agencyId=${this.$store.state.chooseArea.chooseName.orgId}`)
.then((res) => {
const {
data: { code, data },
} = res;
if (code === 0) {
this.nodeConfig = data[0];
this.getDataPLevel(data);
this.loading = false;
}
})
.catch(() => {
this.$http.get(`/gov/org/organizational/neighborhood/getNeighborhoodCommitteeOrgTreeList?agencyId=${this.$store.state.chooseArea.chooseName.orgId}`).then((res) => {
const {
data: { code, msg, data },
} = res;
if (code === 0) {
this.nodeConfig = data[0];
this.getDataPLevel(data);
this.loading = false;
});
} else {
this.loading = false;
this.$message.error(msg);
}
});
},
getTitleNameMapFun(i) {

38
src/views/dataBoard/organizational/microgrid/components/reportAnEvent.vue

@ -191,32 +191,28 @@ export default {
getDetailsData(id) {
this.loading = true;
this.$http
.post("/governance/icEvent/detail", { icEventId: id })
.then((res) => {
const { code, data } = res.data;
if (code === 0) {
this.item = data;
}
})
.catch((res) => {
this.$http.post("/governance/icEvent/detail", { icEventId: id }).then((res) => {
const { code, data, msg } = res.data;
if (code === 0) {
this.item = data;
} else {
this.loading = false;
});
this.$message.error(msg);
}
});
},
getProcessData(id) {
this.$http
.post("/governance/icEvent/process", { icEventId: id })
.then((res) => {
const { code, data } = res.data;
if (code === 0) {
this.activities = data;
this.loading = false;
}
})
.catch((err) => {
this.$http.post("/governance/icEvent/process", { icEventId: id }).then((res) => {
const { code, data, msg } = res.data;
if (code === 0) {
this.activities = data;
this.loading = false;
} else {
this.loading = false;
});
this.$message.error(msg);
}
});
},
// /governance/icEvent/detail

7
src/views/dataBoard/organizational/microgrid/index.vue

@ -9,7 +9,7 @@
</div>
</div>
<div class="table">
<el-table :data="list" :loading="loading">
<el-table :data="list" v-loading="loading" element-loading-text="加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 21, 64, 0.3)">
<el-table-column label="序号" type="index" width="80" />
<!-- 上报事件 -->
<template v-if="otherTabel === 'sbsj'">
@ -178,16 +178,19 @@ export default {
},
close(flag) {
this.showDialog = flag;
this.rowId = null;
},
closeEvent(flag) {
this.showDialogEvent = flag;
this.rowId = null;
},
closeSaft(flag) {
this.showDialogSaft = flag;
this.rowId = null;
},
handleView(row) {
this.rowId = row.id;
if (this.itemNav === 1) {
if (this.itemNav === 1 || this.itemNav === 2) {
this.showDialogEvent = true;
}
if (this.itemNav === 3) {

Loading…
Cancel
Save