| | |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-drawer title="电子地图" append-to-body="true" :visible.sync="showMap"> |
| | | <iframe id="mapDiv" ref="mapDiv" src="/map/index.html?openid=scurityMap&ISinit=1" frameborder="0" width="100%" |
| | | <!-- <el-drawer title="电子地图" append-to-body="true" :visible.sync="showMap"> |
| | | <iframe id="mapDiv" ref="mapDiv" src="/map/index.html?ISinit=1&openid=SecurityMap" frameborder="0" width="100%" |
| | | height="100%"></iframe> |
| | | </el-drawer> --> |
| | | <el-drawer title="电子地图" append-to-body="true" :visible.sync="showMap"> |
| | | <iframe |
| | | id="securityMap" |
| | | ref="securityMap" |
| | | :src="baseUrl" |
| | | frameborder="0" |
| | | width="100%" |
| | | height="100%" |
| | | name="securityMap" |
| | | ></iframe> |
| | | </el-drawer> |
| | | </basic-container> |
| | | </template> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | baseUrl:"/map/index.html?ISinit=1", |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | showMap: false, |
| | | showMap: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.showMap = false; |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | //打开地图 |
| | | handleMap(row) { |
| | | this.showMap = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.mapDiv.onload = () => { |
| | | var that =this; |
| | | 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[0].init) { |
| | | window.frames[0].init("SecurityMap", { |
| | | x: row.jd, |
| | | y: row.wd, |
| | | code:row.code |
| | | x: row.jd, |
| | | y: row.wd, |
| | | code:row.code |
| | | }); |
| | | }; |
| | | }) |
| | | } else { |
| | | console.log(`没有找到到window.frames[0].init`) |
| | | } |
| | | } |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |