Commit f0ec5a04 authored by “yiyousong”'s avatar “yiyousong”

pref:修改站点信息获取

parent 7d7f0699
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
<img <img
class="logo" class="logo"
v-if="formInfo.logoPath" v-if="formInfo.logoPath"
:src="api + formInfo.logoPath" :src="'/' + formInfo.logoPath"
/> />
<div v-else> <div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" /> <a-icon :type="loading ? 'loading' : 'plus'" />
......
...@@ -289,6 +289,8 @@ export default { ...@@ -289,6 +289,8 @@ export default {
async getSiteList(info = {}) { async getSiteList(info = {}) {
this.loading = true; this.loading = true;
let res = await getSiteList(info); let res = await getSiteList(info);
this.loading = false;
if (res.data.code === 1) {
let { data, dict } = res.data.data; let { data, dict } = res.data.data;
data.forEach((v) => { data.forEach((v) => {
v.modelIds = v.modelIds.split(","); v.modelIds = v.modelIds.split(",");
...@@ -300,12 +302,14 @@ export default { ...@@ -300,12 +302,14 @@ export default {
); );
}); });
this.siteData = data; this.siteData = data;
this.loading = false; }
}, },
// 获取站点信息 // 获取站点信息
async getSiteInfo() { async getSiteInfo() {
this.loading = true; this.loading = true;
let res = await siteInfo({ id: this.siteId }); let res = await siteInfo({ id: this.siteId });
this.loading = false;
if (res.data.code === 1) {
let { data, dict } = res.data; let { data, dict } = res.data;
data.modelIds = data.modelIds.split(","); data.modelIds = data.modelIds.split(",");
data.modelData = Object.keys(dict.modelIds).reduce( data.modelData = Object.keys(dict.modelIds).reduce(
...@@ -315,7 +319,7 @@ export default { ...@@ -315,7 +319,7 @@ export default {
[] []
); );
this.siteData = [data]; this.siteData = [data];
this.loading = false; }
}, },
// 删除 // 删除
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment