From edef6ae8f59823258ce610c9074d32e698958b51 Mon Sep 17 00:00:00 2001 From: ZZJ <10913410+zzj2100@user.noreply.gitee.com> Date: 星期四, 28 七月 2022 15:30:44 +0800 Subject: [PATCH] 本地图片适配 --- src/views/GB28181/components/FormArea.vue | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/views/GB28181/components/FormArea.vue b/src/views/GB28181/components/FormArea.vue index f7ce4c2..42bfb6f 100644 --- a/src/views/GB28181/components/FormArea.vue +++ b/src/views/GB28181/components/FormArea.vue @@ -116,6 +116,9 @@ import { isPort, isIPv4 } from "@/scripts/validate"; export default { + props: { + id: {}, + }, created() { this.initGB28181Conf(); }, @@ -168,7 +171,7 @@ }, methods: { initGB28181Conf() { - getGB28181Config().then((rsp) => { + getGB28181Config(this.id).then((rsp) => { if (rsp && rsp.success) { this.gb28181 = rsp.data; //this.gb28181.idType = 0; @@ -179,7 +182,7 @@ }); getGb28181AreaList().then((rsp) => { if (rsp && rsp.success) { - this.locationCity.provinceOptions = rsp.data; + this.locationCity.provinceOptions = rsp.data.list; } }); }, @@ -205,7 +208,7 @@ let pid = this.locationCity.province; getGb28181AreaList({ parentId: pid }).then((rsp) => { if (rsp && rsp.success) { - this.locationCity.cityOptions = rsp.data; + this.locationCity.cityOptions = rsp.data.list; this.locationCity.city = this.locationCity.cityOptions[0].id; this.changeCity(); } @@ -215,7 +218,7 @@ let pid = this.locationCity.city; getGb28181AreaList({ parentId: pid }).then((rsp) => { if (rsp && rsp.success) { - this.locationCity.countyOptions = rsp.data; + this.locationCity.countyOptions = rsp.data.list; this.locationCity.county = this.locationCity.countyOptions[0].id; } }); @@ -224,7 +227,7 @@ let cCode = this.locationCity.county + ""; newGb28181ID({ code: cCode }).then((rsp) => { if (rsp && rsp.success) { - this.gb28181.PublicId = rsp.data; + this.gb28181.PublicId = rsp.data.code; } }); }, @@ -303,7 +306,7 @@ padding: 20px 0; border-top: 1px solid #e9ebee; display: flex; - justify-content: end; + justify-content: flex-end; text-align: center; .cancel { -- Gitblit v1.8.0