| | |
| | | import { isPort, isIPv4 } from "@/scripts/validate"; |
| | | |
| | | export default { |
| | | props: { |
| | | id: {}, |
| | | }, |
| | | created() { |
| | | this.initGB28181Conf(); |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | initGB28181Conf() { |
| | | getGB28181Config().then((rsp) => { |
| | | getGB28181Config(this.id).then((rsp) => { |
| | | if (rsp && rsp.success) { |
| | | this.gb28181 = rsp.data; |
| | | //this.gb28181.idType = 0; |
| | |
| | | }); |
| | | getGb28181AreaList().then((rsp) => { |
| | | if (rsp && rsp.success) { |
| | | this.locationCity.provinceOptions = rsp.data; |
| | | this.locationCity.provinceOptions = rsp.data.list; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | 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(); |
| | | } |
| | |
| | | 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; |
| | | } |
| | | }); |
| | |
| | | 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; |
| | | } |
| | | }); |
| | | }, |