Merge remote-tracking branch 'origin/build' into build

This commit is contained in:
wanglei
2024-06-27 09:39:07 +08:00

View File

@@ -107,6 +107,10 @@ export default {
{label: 'CORP_ID', prop: "corpId"},
{slot: 'options'}
]
},
globalParams: v => {
const {aiEnable} = v.$route.query
return {aiEnable}
}
},
mounted() {
@@ -116,7 +120,7 @@ export default {
methods: {
loadNode(node, resolve) {
if (node.level == 0) {
this.instance.post(`/api/appcorp2/getCorpStatTotal`).then((res) => {
this.instance.post(`/api/appcorp2/getCorpStatTotal`, null, {...this.globalParams}).then((res) => {
if (res.data) {
return resolve([{name: `全国 (${res.data})`}]);
}
@@ -128,7 +132,7 @@ export default {
if (node.level == 1) { //全国
areaId = ''
}
this.instance.post(`/api/appcorp2/getCorpStatByArea?areaId=${areaId}`).then((res) => {
this.instance.post(`/api/appcorp2/getCorpStatByArea`, null, {areaId, ...this.globalParams}).then((res) => {
if (res.data) {
res.data.map((item) => {
item.name = item.name + `(${item.total})`
@@ -155,14 +159,17 @@ export default {
this.getTableData()
},
getInfo() {
this.instance.post(`/api/appcorp2/getLatestInfo?areaId=${this.areaId}`).then(res => {
this.instance.post(`/api/appcorp2/getLatestInfo?areaId=${this.areaId}`, null, {...this.globalParams}).then(res => {
if (res?.data) {
this.info = res.data || {}
}
})
},
getTableData() {
this.instance.post(`/api/appcorp2/list?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}&name=${this.name}`, null, {
...this.page,
...this.globalParams
}).then(res => {
if (res?.data) {
this.gropList = res.data.records
this.page.total = res.data.total