| | |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | showMap: true, |
| | | showMap: false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.showMap = false; |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | |
| | | //打开地图 |
| | | handleMap(row) { |
| | | var that =this; |
| | | this.showMap=true; |
| | | if(row.jd=="" || row.jd=="0.0"){ |
| | | var rwjd = "115.862321"; |
| | | var rwwd = "28.591108"; |
| | |
| | | }else{ |
| | | that.baseUrl = `/map/index.html?ISinit=1&openid=SecurityMap&jd=${row.jd}&wd=${row.wd}&code=${row.code}&name=${row.realName}`; |
| | | } |
| | | this.showMap=true; |
| | | this.$refs.securityMap.onload = () => { |
| | | if (window.frames[1].init) { |
| | | if(row.jd=="" || row.jd=="0.0"){ |
| | | //如果处警员无位置信息,则赋值一个默认数据,否则地图无法加载 |
| | | window.frames[1].init("SecurityMap", { |
| | | x: rwjd, |
| | | y: rwwd, |
| | | code:row.code |
| | | }); |
| | | }else{ |
| | | window.frames[1].init("SecurityMap", { |
| | | x: row.jd, |
| | | y: row.wd, |
| | | code:row.code |
| | | }); |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.securityMap.onload = () => { |
| | | if (window.frames[0].init) { |
| | | if(row.jd=="" || row.jd=="0.0"){ |
| | | //如果处警员无位置信息,则赋值一个默认数据,否则地图无法加载 |
| | | window.frames[0].init("SecurityMap", { |
| | | x: rwjd, |
| | | y: rwwd, |
| | | code:row.code |
| | | }); |
| | | }else{ |
| | | window.frames[0].init("SecurityMap", { |
| | | x: row.jd, |
| | | y: row.wd, |
| | | code:row.code |
| | | }); |
| | | } |
| | | |
| | | } else { |
| | | console.log(`没有找到到window.frames[0].init`) |
| | | } |
| | | |
| | | } else { |
| | | console.log(`没有找到到window.frames[1].init`) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |