调整接口

This commit is contained in:
aixianling
2024-06-24 16:50:05 +08:00
parent d1c0c4a784
commit e7991254fa

View File

@@ -116,7 +116,7 @@ export default {
methods: { methods: {
loadNode(node, resolve) { loadNode(node, resolve) {
if (node.level == 0) { if (node.level == 0) {
this.instance.post(`/api/appCorpStat/getCorpStatTotal`).then((res) => { this.instance.post(`/api/appcorp2/getCorpStatTotal`).then((res) => {
if (res.data) { if (res.data) {
return resolve([{name: `全国 (${res.data})`}]); return resolve([{name: `全国 (${res.data})`}]);
} }
@@ -128,11 +128,11 @@ export default {
if (node.level == 1) { //全国 if (node.level == 1) { //全国
areaId = '' areaId = ''
} }
this.instance.post(`/api/appCorpStat/getCorpStatByArea?areaId=${areaId}`).then((res) => { this.instance.post(`/api/appcorp2/getCorpStatByArea?areaId=${areaId}`).then((res) => {
if (res.data) { if (res.data) {
res.data.map((item) => { res.data.map((item) => {
item.name = item.name + `(${item.total})` item.name = item.name + `(${item.total})`
item.leaf = !/0{8}$/.test(item.id) item.leaf = !/0{10}$/.test(item.id)
}) })
resolve(res.data) resolve(res.data)
} }
@@ -159,22 +159,19 @@ export default {
}, },
getInfo() { getInfo() {
this.info = {} this.instance.post(`/api/appcorp2/getLatestInfo?areaId=${this.areaId}`).then(res => {
this.instance.post(`/api/appCorpStat/getLatestInfo?areaId=${this.areaId}`).then(res => { if (res?.data) {
if (res.code === 0) { this.info = res.data || {}
this.info = res.data
} }
}) })
}, },
getTableData() { getTableData() {
this.instance.post(`/api/appCorp/page?areaId=${this.areaId}&current=${this.page.current}&size=${this.page.size}&name=${this.name}`,).then(res => { this.instance.post(`/api/appcorp2/list?areaId=${this.areaId}&current=${this.page.current}&size=${this.page.size}&name=${this.name}`,).then(res => {
if (res.code === 0) { if (res?.data) {
if (res.data) {
this.gropList = res.data.records this.gropList = res.data.records
this.page.total = res.data.total this.page.total = res.data.total
} }
}
}) })
}, },
}, },
@@ -252,7 +249,6 @@ export default {
gap: 16px; gap: 16px;
.title { .title {
line-height: 60px; line-height: 60px;
font-size: 18px; font-size: 18px;