| | |
| | | */ |
| | | import request from '@/utils/request'; |
| | | import axios from 'axios'; |
| | | |
| | | import service from '@/utils/service'; |
| | | //å
¬å¸åå° |
| | | const service = axios.create({ |
| | | // baseURL: '/api', // apiçbase_url |
| | | //baseURL: 'http://192.168.20.106/', // apiçbase_url |
| | | baseURL: 'http://192.168.20.39/', // apiçbase_url |
| | | timeout: 35000, |
| | | }); |
| | | // const service = axios.create({ |
| | | // // baseURL: '/api', // apiçbase_url |
| | | // //baseURL: 'http://192.168.20.106/', // apiçbase_url |
| | | // baseURL: BASE_URL, // apiçbase_url |
| | | |
| | | // }); |
| | | //åå
¸ç®¡çå表 |
| | | export function selectByPageAndCount(params) { |
| | | //请æ±å°å |
| | |
| | | } |
| | | //æ°æ®åå¸ => æ°æ®æå
¥ |
| | | export function publish_insert(params) { |
| | | return request.post('/publish/insertForPub', params); |
| | | return service.post('/publish/insertForPub', params); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | .Black_theme .tabsSpan { |
| | | color: #fff; |
| | | } |
| | | |
| | | .Black_theme .el-icon-full-screen { |
| | | color: #fff !important; |
| | | } |
| | | |
| | | .Black_theme .el-icon-crop { |
| | | color: #fff !important; |
| | | } |
| | |
| | | |
| | | .tabsSpan { |
| | | color: #000; |
| | | } |
| | | |
| | | .el-icon-full-screen { |
| | | color: #000 !important; |
| | | } |
| | | |
| | | .el-icon-crop { |
| | | color: #000 !important; |
| | | } |
| | |
| | | } |
| | | }, |
| | | handleMenuClick(menu) { |
| | | |
| | | this.currMenu = menu.menuName |
| | | }, |
| | | handlePopoverClick(child) { |
| | |
| | | |
| | | //å·¥ç¨å·¡è§ |
| | | async showPathLine(params) { |
| | | |
| | | this.$bus.$emit("closeLeftAndRightMenu", true) |
| | | |
| | | const line = wktToGeoJSON(params.wkt) |
| | | const position = line.coordinates[0] |
| | | const result = [] |
| | |
| | | pos.push(1000) |
| | | result.push(...pos) |
| | | }) |
| | | // console.log("line", position) |
| | | |
| | | |
| | | window.sgworld.Creator.getFlyData(result, data => { |
| | | data.showPoint = false |
| | |
| | | window.PathAnimationData = { |
| | | flyData: data, |
| | | } |
| | | var that = this |
| | | window.PathAnimationData.winIndex = layer.open({ |
| | | type: 2, |
| | | title: "å·¥ç¨å·¡è§", |
| | |
| | | content: SmartEarthRootUrl + "Workers/path/ProjectPath.html", |
| | | end: function () { |
| | | PathAnimationData.fly && PathAnimationData.fly.exit() |
| | | that.$bus.$emit("closeLeftAndRightMenu", false) |
| | | }, |
| | | }) |
| | | }) |
| | |
| | | //ä¸é¢å±ç¤º |
| | | changeProject(params) { |
| | | this.$bus.$emit("changeProject", params.name) |
| | | var lon, lat, height; |
| | | if (params.name.indexOf("å
¨å½") != -1) { |
| | | height = 20000000; |
| | | lon = 110; |
| | | lat = 32; |
| | | window.viewer.camera.flyTo({ |
| | | destination: new Cesium.Cartesian3.fromDegrees(lon, lat, height), |
| | | orientation: { |
| | | heading: Cesium.Math.toRadians(0), |
| | | pitch: Cesium.Math.toRadians(-90), |
| | | }, |
| | | }) |
| | | } else if (params.name.indexOf("å
¨ç") != -1) { |
| | | lon = 85; |
| | | lat = 25; |
| | | height = 30000000; |
| | | window.viewer.camera.flyTo({ |
| | | destination: new Cesium.Cartesian3.fromDegrees(lon, lat, height), |
| | | orientation: { |
| | | heading: Cesium.Math.toRadians(0), |
| | | pitch: Cesium.Math.toRadians(-90), |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | handleTree(params) { |
| | | this.showTree = !this.showTree |
| | |
| | | <template> |
| | | <div class="current"> |
| | | <div class="leftarrow"> |
| | | <img :src="leftImg" @click="ChangeLeft" /> |
| | | <img |
| | | :src="leftImg" |
| | | @click="ChangeLeft" |
| | | /> |
| | | </div> |
| | | <div class="leftContainer" v-if="currentDisplay == '大å±' && ChartDisplay"> |
| | | <div class="current1" id="leftCurrent1"> |
| | | <div |
| | | class="leftContainer" |
| | | v-if="currentDisplay == '大å±' && ChartDisplay" |
| | | > |
| | | <div |
| | | class="current1" |
| | | id="leftCurrent1" |
| | | > |
| | | <div class="aside-title">æ°æ®ç³è¯·æ¬¡æ°</div> |
| | | <count-data-apply></count-data-apply> |
| | | </div> |
| | | <div class="current1" id="leftCurrent2"> |
| | | <div |
| | | class="current1" |
| | | id="leftCurrent2" |
| | | > |
| | | <div class="aside-title">ç¨æ·è®¿é®é</div> |
| | | <service-type></service-type> |
| | | </div> |
| | | <div class="current1" id="leftCurrent3"> |
| | | <div |
| | | class="current1" |
| | | id="leftCurrent3" |
| | | > |
| | | <div class="aside-title">项ç®åå¨ä¿¡æ¯</div> |
| | | <data-storage></data-storage> |
| | | </div> |
| | | </div> |
| | | <!-- å
¨çãå
¨å½ç»è®¡æ¬¡æ° --> |
| | | <div class="leftContainer" v-if="currentDisplay == '项ç®'"> |
| | | <div class="current1" id="leftCurrent1"> |
| | | <div |
| | | class="leftContainer" |
| | | v-if="currentDisplay == '项ç®'" |
| | | > |
| | | <div |
| | | class="current1" |
| | | id="leftCurrent1" |
| | | > |
| | | <div class="aside-title">æ°æ®æ»è§</div> |
| | | <div class="wrapper"> |
| | | <div class="title">{{ currentProject }}</div> |
| | | <dv-digital-flop style="height: 40px" :config="xmCountConfig" /> |
| | | <dv-digital-flop |
| | | style="height: 40px" |
| | | :config="xmCountConfig" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="current1" id="leftCurrent2"> |
| | | <div |
| | | class="current1" |
| | | id="leftCurrent2" |
| | | > |
| | | <div class="aside-title">åå¨ä¿¡æ¯</div> |
| | | <base-line-chart |
| | | :requsetFn="requsetFn" |
| | |
| | | title="æ°æ®åå¨é" |
| | | ></base-line-chart> |
| | | </div> |
| | | <div class="current1" id="leftCurrent3"> |
| | | <div |
| | | class="current1" |
| | | id="leftCurrent3" |
| | | > |
| | | <div class="aside-title">æ°æ®åå¨é</div> |
| | | <data-storage-type></data-storage-type> |
| | | </div> |
| | | </div> |
| | | <!-- å
¨çãå
¨å½ç®¡ç½å¾ --> |
| | | <div class="leftContainer" v-if="currentDisplay == '管ç½'"> |
| | | <div class="current1" id="leftCurrent1"> |
| | | <div |
| | | class="leftContainer" |
| | | v-if="currentDisplay == '管ç½'" |
| | | > |
| | | <div |
| | | class="current1" |
| | | id="leftCurrent1" |
| | | > |
| | | <div class="aside-title">æ°æ®æ»è§</div> |
| | | <div class="wrapper"> |
| | | <div class="title">{{ currentProject }}</div> |
| | | <dv-digital-flop style="height: 40px" :config="xmCountConfig" /> |
| | | <dv-digital-flop |
| | | style="height: 40px" |
| | | :config="xmCountConfig" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="current1" id="leftCurrent2"> |
| | | <div |
| | | class="current1" |
| | | id="leftCurrent2" |
| | | > |
| | | <div class="aside-title">管ç½é¿åº¦</div> |
| | | <base-line-chart |
| | | :requsetFn="requsetFn" |
| | |
| | | <!-- <base-pie-chart :project="currentProject"></base-pie-chart> --> |
| | | <!-- <service-type></service-type> --> |
| | | </div> |
| | | <div class="current1" id="leftCurrent3"> |
| | | <div |
| | | class="current1" |
| | | id="leftCurrent3" |
| | | > |
| | | <div class="aside-title">æ°æ®åå¨é</div> |
| | | <data-storage-type></data-storage-type> |
| | | </div> |
| | | </div> |
| | | <!-- å个工ç¨å±ç¤º --> |
| | | <div class="leftContainer" v-if="currentDisplay == 'å·¥ç¨'"> |
| | | <div |
| | | class="leftContainer" |
| | | v-if="currentDisplay == 'å·¥ç¨'" |
| | | > |
| | | <div class="current1"> |
| | | <div class="aside-title">å·¥ç¨ç®ä»</div> |
| | | <projectintroduction></projectintroduction> |
| | |
| | | ...this.xmCountConfig, |
| | | } |
| | | } |
| | | }) |
| | | this.$bus.$on("closeLeftAndRightMenu", (res) => { |
| | | this.ChartDisplay = res; |
| | | this.ProjectreeDisplay = res; |
| | | this.ChangeLeft(); |
| | | }) |
| | | }, |
| | | methods: { |
| | |
| | | startValue: dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)], |
| | | endValue: |
| | | dataAxis[ |
| | | Math.min(params.dataIndex + zoomSize / 2, data.length - 1) |
| | | Math.min(params.dataIndex + zoomSize / 2, data.length - 1) |
| | | ], |
| | | }) |
| | | }) |
| | |
| | | <template> |
| | | <div class="current"> |
| | | <div class="rightContainer" v-if="currentDisplay == '大å±' && ChartDisplay"> |
| | | <div |
| | | class="rightContainer" |
| | | v-if="currentDisplay == '大å±' && ChartDisplay" |
| | | > |
| | | <div class="current1"> |
| | | <div class="aside-title">项ç®ç»è®¡</div> |
| | | <project-category></project-category> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- å
¨çãå
¨å½é¡¹ç® --> |
| | | <div class="rightContainer" v-if="currentDisplay == '项ç®'"> |
| | | <div |
| | | class="rightContainer" |
| | | v-if="currentDisplay == '项ç®'" |
| | | > |
| | | <div class="current1"> |
| | | <div class="aside-title"></div> |
| | | <!-- <country-dimension-bar ref="barRef"></country-dimension-bar> --> |
| | |
| | | v-if="currentProject == 'å
¨ç项ç®'" |
| | | ref="pieRef" |
| | | ></country-dimension-pie> |
| | | <province-dimension-pie v-else ref="pieRef"></province-dimension-pie> |
| | | <province-dimension-pie |
| | | v-else |
| | | ref="pieRef" |
| | | ></province-dimension-pie> |
| | | </div> |
| | | <div class="current1"> |
| | | <div class="aside-title">æ°æ®ä½¿ç¨æ
åµ</div> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- å
¨å½ãå
¨çç®¡ç½ --> |
| | | <div class="rightContainer" v-if="currentDisplay == '管ç½'"> |
| | | <div |
| | | class="rightContainer" |
| | | v-if="currentDisplay == '管ç½'" |
| | | > |
| | | <div class="current1"> |
| | | <div class="aside-title">ç«åºåº§æ°</div> |
| | | <!-- <country-dimension-bar ref="barRef"></country-dimension-bar> --> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- åä¸ªå·¥ç¨ --> |
| | | <div class="rightContainer" v-if="currentDisplay == 'å·¥ç¨'"> |
| | | <div |
| | | class="rightContainer" |
| | | v-if="currentDisplay == 'å·¥ç¨'" |
| | | > |
| | | <div class="current1"> |
| | | <div class="aside-title">æ°æ®åå¨é</div> |
| | | <base-line-chart |
| | |
| | | </div> |
| | | <div class="current1"> |
| | | <div class="aside-title">ç®¡éæ¡æ°</div> |
| | | <div class="content" style="height: 30px"> |
| | | <div |
| | | class="content" |
| | | style="height: 30px" |
| | | > |
| | | <div class="header"> |
| | | <div>æ ¼å¼</div> |
| | | <div>æ°é</div> |
| | |
| | | </div> |
| | | |
| | | <div class="rightarrow"> |
| | | <img :src="RightImg" @click="ChangeRight" /> |
| | | <img |
| | | :src="RightImg" |
| | | @click="ChangeRight" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | projectCode: code, |
| | | } |
| | | }) |
| | | this.$bus.$on("closeLeftAndRightMenu", (res) => { |
| | | this.ChartDisplay = res |
| | | this.ChangeRight(); |
| | | }) |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | <img src="../../assets/img/Screen/ptree.png" /> |
| | | <span>å·¥ç¨é¡¹ç®</span> |
| | | </div> --> |
| | | <div class="topleft__curr"> |
| | | <div |
| | | class="topleft__curr" |
| | | @click="setMapViewStart()" |
| | | > |
| | | <img src="../../assets/img/Screen/ptree.png" /> |
| | | <span :title="currentProject">{{ currentProject }}</span> |
| | | </div> |
| | |
| | | <img src="../../assets/img/Screen/bigST.png" /> |
| | | <span>è¿å大å±</span> |
| | | </div> |
| | | <div class="topright1 toprightC" @click="ReturnLast"> |
| | | <div |
| | | class="topright1 toprightC" |
| | | @click="ReturnLast" |
| | | > |
| | | <img src="../../assets/img/Screen/return.png" /> |
| | | <span>è¿åä¸çº§</span> |
| | | </div> |
| | |
| | | this.$parent.$refs.mapright.OpenLeftInit() |
| | | this.currentProject = "大å±è§å¾" |
| | | // åå°åå§åè§è§ |
| | | this.setMapViewStart(); |
| | | }, |
| | | setMapViewStart() { |
| | | window.viewer.camera.flyTo({ |
| | | destination: new Cesium.Cartesian3.fromDegrees(110, 32, 20000000), |
| | | orientation: { |
| | |
| | | }, |
| | | }) |
| | | }, |
| | | |
| | | //æå¼å·¥ç¨æ |
| | | OpenProjectree() { |
| | | this.screen = false |
| | |
| | | //æ¾ç¤ºfps |
| | | Viewer.scene.debugShowFramesPerSecond = false; |
| | | //å¯¼èªæ§ä»¶ |
| | | window.sgworld.navControl("nav", false); |
| | | // window.sgworld.navControl("nav", false); |
| | | //æ¯ä¾å°º |
| | | window.sgworld.navControl("scale", false); |
| | | // window.sgworld.navControl("scale", false); |
| | | //å¼å¯æ·±åº¦æ£æµ |
| | | // sg.Analysis.depthTestAgainstTerrain(true) |
| | | Viewer.scene.globe.depthTestAgainstTerrain = true; |
| | |
| | | import dataV from '@jiaminghi/data-view' |
| | | import directive from '@/directive/index.js' // directive |
| | | import drag from '@/assets/js/drag.js' |
| | | import elDragDialog from './utils/diaLog.js' |
| | | Vue.directive('el-drag-dialog', elDragDialog); |
| | | ElementUI.Dialog.props.closeOnClickModal.default = false; |
| | | Vue.use(directive) |
| | | Vue.use(dataV) |
| | | Vue.use(VueParticles) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | bind(el, binding, vnode, oldVnode) { |
| | | const resizeEvent = new CustomEvent('drag-resize', { |
| | | detail: '尺寸åå', |
| | | bubbles: false |
| | | }) |
| | | // åå§å䏿大å |
| | | el.fullscreen = false |
| | | // å¼¹æ¡å¯æä¼¸æå°å®½é« |
| | | const minWidth = 1100 |
| | | const minHeight = 570 |
| | | // å½åå®½é« |
| | | let nowWidth = minWidth |
| | | // eslint-disable-next-line no-unused-vars |
| | | let nowHight = minHeight |
| | | // å½åé¡¶é¨é«åº¦ |
| | | let nowMarginTop = 0 |
| | | // è·åå¼¹æ¡å¤´é¨ï¼è¿é¨åå¯åå»å
¨å±ï¼ |
| | | const dialogHeaderEl = el.querySelector('.el-dialog__header') |
| | | let hasSetBodyHight = false |
| | | // å¼¹çª |
| | | const dragDom = el.querySelector('.el-dialog') |
| | | el.style.overflow = 'initial' |
| | | dragDom.className += ' el-drag-dialog' |
| | | |
| | | // ç»å¼¹çªå ä¸overflow autoï¼ä¸ç¶ç¼©å°æ¶æ¡å
çæ ç¾å¯è½è¶
åºdialogï¼ |
| | | dragDom.style.overflow = 'auto' |
| | | // æ¸
é¤éæ©å¤´é¨æåææ |
| | | // eslint-disable-next-line no-new-func |
| | | dialogHeaderEl.onselectstart = new Function('return false') |
| | | // 头é¨å ä¸å¯æå¨cursor |
| | | dialogHeaderEl.style.cursor = 'move' |
| | | |
| | | // è·ååæå±æ§ ie domå
ç´ .currentStyle ç«çè°·æ window.getComputedStyle(domå
ç´ , null); |
| | | const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null) |
| | | |
| | | // 头鍿å
¥æå¤§åæå°åå
ç´ |
| | | const maxMin = document.createElement('button') |
| | | maxMin.className += ' el-dialog__headerbtn el-dialog__minmax' |
| | | maxMin.style.right = '40px' |
| | | maxMin.style.color = '#ffffff' |
| | | maxMin.title = el.fullscreen ? 'è¿å' : 'æå¤§å' |
| | | maxMin.innerHTML = '<i class=' + (el.fullscreen ? '"el-icon-crop"' : '"el-icon-full-screen"') + ' onMouseOver="this.style.color=\'#409EFF\'" onMouseOut="this.style.color=\'inherit\'"></i>' |
| | | dialogHeaderEl.insertBefore(maxMin, dialogHeaderEl.childNodes[1]) |
| | | const moveDown = (e) => { |
| | | // é¼ æ æä¸ï¼è®¡ç®å½åå
ç´ è·ç¦»å¯è§åºçè·ç¦» |
| | | const disX = e.clientX - dialogHeaderEl.offsetLeft |
| | | const disY = e.clientY - dialogHeaderEl.offsetTop |
| | | |
| | | // è·åå°çå¼å¸¦px æ£åå¹é
æ¿æ¢ |
| | | let styL, styT |
| | | |
| | | // 注æå¨ieä¸ ç¬¬ä¸æ¬¡è·åå°çå¼ä¸ºç»ä»¶èªå¸¦50% ç§»å¨ä¹åèµå¼ä¸ºpx |
| | | if (sty.left.includes('%')) { |
| | | styL = +document.body.clientWidth * (+sty.left.replace(/\\%/g, '') / 100) |
| | | styT = +document.body.clientHeight * (+sty.top.replace(/\\%/g, '') / 100) |
| | | } else { |
| | | styL = +sty.left.replace(/\px/g, '') |
| | | styT = +sty.top.replace(/\px/g, '') |
| | | } |
| | | |
| | | document.onmousemove = function (e) { |
| | | // éè¿äºä»¶å§æï¼è®¡ç®ç§»å¨çè·ç¦» |
| | | const l = e.clientX - disX |
| | | const t = e.clientY - disY |
| | | |
| | | // ç§»å¨å½åå
ç´ |
| | | dragDom.style.left = `${l + styL}px` |
| | | dragDom.style.top = `${t + styT}px` |
| | | |
| | | // å°æ¤æ¶çä½ç½®ä¼ åºå» |
| | | // binding.value({x:e.pageX,y:e.pageY}) |
| | | } |
| | | |
| | | document.onmouseup = function (e) { |
| | | document.onmousemove = null |
| | | document.onmouseup = null |
| | | } |
| | | } |
| | | dialogHeaderEl.onmousedown = moveDown |
| | | let bodyHeight = 'auto' |
| | | |
| | | function setMaxMin() { |
| | | if (el.fullscreen) { |
| | | let i = maxMin.querySelector('.el-icon-crop'); |
| | | i.classList.remove('el-icon-crop'); |
| | | i.classList.add('el-icon-full-screen'); |
| | | maxMin.innerHTML = '<i class="el-icon-full-screen"></i>'; |
| | | maxMin.title = 'æå¤§å'; |
| | | dragDom.style.height = nowHight + 'px'; |
| | | dragDom.style.width = nowWidth + 'px'; |
| | | dragDom.style.marginTop = window.innerHeight * 0.07 + 'px'; |
| | | el.fullscreen = false; |
| | | dialogHeaderEl.style.cursor = 'move'; |
| | | dialogHeaderEl.onmousedown = moveDown; |
| | | // dragDom.querySelector('.el-dialog__body').style.height = bodyHeight; |
| | | hasSetBodyHight = false; |
| | | } else { |
| | | const i = maxMin.querySelector('.el-icon-full-screen') |
| | | i.classList.remove('el-icon-full-screen') |
| | | i.classList.add('el-icon-crop') |
| | | maxMin.title = 'è¿å' |
| | | bodyHeight = dragDom.querySelector('.el-dialog__body').offsetHeight + 'px' |
| | | nowHight = dragDom.clientHeight |
| | | nowWidth = dragDom.clientWidth |
| | | nowMarginTop = dragDom.style.marginTop |
| | | dragDom.style.left = 0 |
| | | dragDom.style.top = 0 |
| | | dragDom.style.height = window.innerHeight + 'px' |
| | | dragDom.style.width = '100VW' |
| | | dragDom.style.marginTop = 0 |
| | | el.fullscreen = true |
| | | dialogHeaderEl.style.cursor = 'initial' |
| | | dialogHeaderEl.onmousedown = null |
| | | if (!hasSetBodyHight) { |
| | | const footerHeight = dragDom.querySelector('.el-dialog__footer') && dragDom.querySelector('.el-dialog__footer').offsetHeight |
| | | // dragDom.querySelector('.el-dialog__body').style.height = |
| | | // 'calc(90% - ' + (dialogHeaderEl.offsetHeight + footerHeight) + 'px)' |
| | | dragDom.querySelector('.el-dialog__body').style.height = |
| | | 'calc(90% - ' + (dialogHeaderEl.offsetHeight + footerHeight) + 'px)' |
| | | /* dragDom.querySelector('.el-dialog__body').style.height = |
| | | window.innerHeight*0.9 |
| | | - (dialogHeaderEl.offsetHeight + footerHeight) + 'px'*/ |
| | | hasSetBodyHight = true |
| | | } |
| | | } |
| | | el.dispatchEvent(resizeEvent) |
| | | } |
| | | |
| | | // ç¹å»æ¾å¤§ç¼©å°ææ |
| | | maxMin.onclick = setMaxMin |
| | | // åå»å¤´é¨ææ |
| | | dialogHeaderEl.ondblclick = setMaxMin |
| | | // æä¼¸ |
| | | const resizeEl = document.createElement('div') |
| | | dragDom.appendChild(resizeEl) |
| | | // å¨å¼¹çªå³ä¸è§å ä¸ä¸ä¸ª10-10pxçæ§å¶å |
| | | resizeEl.style.cursor = 'se-resize' |
| | | resizeEl.style.position = 'absolute' |
| | | resizeEl.style.height = '10px' |
| | | resizeEl.style.width = '10px' |
| | | resizeEl.style.right = '0px' |
| | | resizeEl.style.bottom = '0px' |
| | | resizeEl.style.zIndex = '99'; |
| | | // é¼ æ æä¼¸å¼¹çª |
| | | resizeEl.onmousedown = (e) => { |
| | | // è®°å½åå§xä½ç½® |
| | | const clientX = e.clientX |
| | | // é¼ æ æä¸ï¼è®¡ç®å½åå
ç´ è·ç¦»å¯è§åºçè·ç¦» |
| | | const disX = e.clientX - resizeEl.offsetLeft |
| | | const disY = e.clientY - resizeEl.offsetTop |
| | | document.onmousemove = function (e) { |
| | | e.preventDefault() // ç§»å¨æ¶ç¦ç¨é»è®¤äºä»¶ |
| | | // éè¿äºä»¶å§æï¼è®¡ç®ç§»å¨çè·ç¦» |
| | | const x = e.clientX - disX + (e.clientX - clientX)// è¿é ç±äºelementUIçdialogæ§å¶å±
ä¸çï¼æä»¥æ°´å¹³æä¼¸æææ¯åå |
| | | const y = e.clientY - disY |
| | | // æ¯è¾æ¯å¦å°äºæå°å®½é« |
| | | dragDom.style.width = x > minWidth ? `${x}px` : minWidth + 'px' |
| | | dragDom.style.height = y > minHeight ? `${y}px` : minHeight + 'px' |
| | | if (!hasSetBodyHight) { |
| | | const footerHeight = dragDom.querySelector('.el-dialog__footer') && dragDom.querySelector('.el-dialog__footer').offsetHeight |
| | | dragDom.querySelector('.el-dialog__body').style.height = 'calc(90% - ' + (dialogHeaderEl.offsetHeight + footerHeight) + 'px)' |
| | | hasSetBodyHight = true |
| | | } |
| | | } |
| | | // æä¼¸ç»æ |
| | | document.onmouseup = function (e) { |
| | | document.onmousemove = null |
| | | document.onmouseup = null |
| | | el.dispatchEvent(resizeEvent) |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * @Description: |
| | | * @Author: çæ |
| | | * @Date: 2022-03-03 15:10:54 |
| | | * @LastEditTime: 2022-03-08 17:40:02 |
| | | * @LastEditors: çæ |
| | | */ |
| | | import axios from "axios"; |
| | | import { Message } from "element-ui"; |
| | | import store from "@/store"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import router from "../router" |
| | | // create an axios instance |
| | | const service = axios.create({ |
| | | baseURL: BASE_URL, // apiçbase_url |
| | | timeout: -1, // 请æ±è¶
æ¶æ¶é´ |
| | | headers: { |
| | | "content-type": "application/json;charset=UTF-8", |
| | | }, |
| | | // withCredentials: true, |
| | | }); |
| | | |
| | | // request interceptor |
| | | service.interceptors.request.use( |
| | | (config) => { |
| | | // è¯·æ±æºå¸¦token |
| | | let token = getToken(); |
| | | if (token) { |
| | | config.headers["token"] = token; |
| | | } |
| | | //å è½½loading |
| | | store.commit("UPDATE_API_COUNT", "add"); |
| | | return config; |
| | | }, |
| | | (error) => { |
| | | //åå»loading |
| | | store.commit("UPDATE_API_COUNT", "sub"); |
| | | console.log(error); // for debug |
| | | return Promise.reject(error); |
| | | } |
| | | ); service.interceptors.response.use( |
| | | (response) => { |
| | | if (window.localStorage.getItem("LFToken") != null) { |
| | | var expire = JSON.parse(window.localStorage.getItem("LFToken")).expire; |
| | | var timeire = new Date().getTime(); |
| | | if (timeire >= expire) { |
| | | |
| | | router.push('/login') |
| | | localStorage.removeItem("LFToken"); |
| | | } |
| | | } |
| | | |
| | | store.commit("UPDATE_API_COUNT", "sub"); |
| | | //console.log(response) |
| | | //è¿åå æResponeType===Blob ,åå¼å¤ç |
| | | if (Object.prototype.toString.call(response.data).indexOf("Blob") > -1) { |
| | | let reader = new FileReader() |
| | | reader.onload = function (e) { |
| | | { |
| | | try { |
| | | let str = this.result.toString(); |
| | | let res = JSON.parse(str); |
| | | if (res.code != null) { |
| | | if (res.code !== 200) { |
| | | Message.error(res.msg); |
| | | } |
| | | } |
| | | |
| | | } catch { } |
| | | } |
| | | } |
| | | reader.readAsText(response.data, "utf-8"); |
| | | } else { |
| | | if (response.data.code !== 200) { |
| | | // Message.error(response.data.msg); |
| | | } |
| | | }// æ¥éæç¤º |
| | | return response.data; |
| | | }, |
| | | (error) => { |
| | | store.commit("UPDATE_API_COUNT", "sub"); |
| | | const { status, data } = error.response; |
| | | //è¿åå æResponeType===Blob ,åå¼å¤ç |
| | | if (Object.prototype.toString.call(data).indexOf("Blob") > -1) { |
| | | let reader = new FileReader() |
| | | reader.onload = function (e) { |
| | | { |
| | | let str = this.result.toString(); |
| | | let res = JSON.parse(str); |
| | | |
| | | Message({ |
| | | message: res.message, |
| | | type: "error", |
| | | duration: 5 * 1000, |
| | | }); |
| | | } |
| | | } |
| | | reader.readAsText(data, "utf-8"); |
| | | } else { |
| | | Message({ |
| | | message: data.message, |
| | | type: "error", |
| | | duration: 5 * 1000, |
| | | }); |
| | | } |
| | | return Promise.reject(error); |
| | | } |
| | | ); |
| | | |
| | | |
| | | export default service; |
| | |
| | | } |
| | | }); |
| | | } |
| | | } else if (data.serveType == "TMS") { |
| | | debugger |
| | | if (data.pubid) { |
| | | debugger |
| | | } else { |
| | | var res; |
| | | if (data.url.indexOf("{host}") != -1) { |
| | | res = data.url.replace("{host}", iisHost); |
| | | } else { |
| | | res = data.url |
| | | } |
| | | var url = res.split(';') |
| | | debugger |
| | | window.sgworld.Creator.createImageryProvider('mptå½±å', "wms", { |
| | | url: url[0], |
| | | layers: url[1] |
| | | }, "0", undefined, true, ""); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | }); |
| | | window.map.addLayer(vectorLayer); |
| | | } else if (res.serveType == "Tileset") { |
| | | var url; |
| | | if (res.url.indexOf("{host}") != -1) { |
| | | url = res.url.replace("{host}", iisHost); |
| | | } else { |
| | | url = modelUrl + "/" + res.url |
| | | } |
| | | var tileset = Viewer.scene.primitives.add( |
| | | new Cesium.Cesium3DTileset({ |
| | | name: res.cnName, |
| | | url: modelUrl + "/" + res.url, //192.168.20.106,to4 |
| | | url: url, //192.168.20.106,to4 |
| | | maximumScreenSpaceError: 64, // æå¤§å±å¹ç©ºé´é误ï¼16 |
| | | maximumMemoryUsage: 768, // æå¤§å
åï¼512 |
| | | dynamicScreenSpaceError: true, // åå°ç¦»ç¸æºè¾è¿çå±å¹ç©ºé´é误ï¼false |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--æå¤§åæå°åç»ä»¶å°è£
--> |
| | | <template> |
| | | <div class="header-title"> |
| | | <span class="title-name">{{ dialogTittle }}</span> |
| | | <span |
| | | style="float: right; color: #909399; cursor: pointer;" |
| | | class="el-icon-close" |
| | | @click="() => closed" |
| | | ></span> |
| | | <span |
| | | style="float: right; margin-right: 10px; color:#909399; cursor: pointer;" |
| | | :class="flodIconClass" |
| | | @click="() => isFullscreen" |
| | | ></span> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | dialogTittle: { |
| | | type: String, |
| | | default: () => '' |
| | | }, |
| | | fullscreen: { |
| | | type: Boolean, |
| | | default: () => false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | header_box: { |
| | | 'display': 'flex', |
| | | 'align-items': 'center' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | flodIconClass() { |
| | | return this.fullscreen ? 'el-icon-full-screen' : 'el-icon-copy-document'; |
| | | }, |
| | | isFullscreen() { |
| | | this.$emit('is-fullscreen', !this.fullscreen); |
| | | }, |
| | | closed() { |
| | | this.$emit('handle-closed', 2) |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | <!-- å°åé¢è§ --> |
| | | <el-dialog |
| | | :title="$t('common.preview')" |
| | | :class="isFullscreen ? '' : 'dialogClass_his'" |
| | | custom-class="handleDialogClass" |
| | | width="73.4%" |
| | | :fullscreen="isFullscreen" |
| | | v-if="dialogVisible" |
| | | :visible.sync="dialogVisible" |
| | | :show-close="false" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | > |
| | | <dialog-header |
| | | slot="title" |
| | | :dialog-tittle="$t('common.preview')" |
| | | :fullscreen="isFullscreen" |
| | | @handle-closed="handleClose" |
| | | @is-fullscreen="onFullscreen" |
| | | ></dialog-header> |
| | | <div :class="{'fullscreen1':isFullscreen}"> |
| | | <mapview v-if="showMapView"></mapview> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- <el-dialog |
| | | :title="$t('common.preview')" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | :before-close="handleClose" |
| | | top="13vh" |
| | | :lock-scroll="false" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | v-el-drag-dialog |
| | | > |
| | | <div style="width:100%;height:65vh"> |
| | | <mapview v-if="showMapView"></mapview> |
| | | </div> |
| | | </el-dialog> |
| | | <div |
| | | id="MapDiv" |
| | | style="background:red;widht:100%;height:calc(100% - 10px)" |
| | | ></div> |
| | | <!-- |
| | | </el-dialog> --> |
| | | <!-- ä¿®æ¹æ°æ® --> |
| | | <el-dialog |
| | | :title="$t('common.update')" |
| | |
| | | :visible.sync="insertDialogVisible" |
| | | width="40%" |
| | | :close-on-click-modal="false" |
| | | :show-close="false" |
| | | > |
| | | <div style="width:100%;height:30vh"> |
| | | <el-form |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.vmobj.minLevel')"> |
| | | <el-input |
| | | <!-- <el-input |
| | | v-model="insertLayer.min" |
| | | :placeholder="$t('dataManage.vmobj.labe11')" |
| | | ></el-input> |
| | | ></el-input> --> |
| | | <el-select |
| | | style="width:100%" |
| | | v-model="insertLayer.min" |
| | | :placeholder="$t('dataManage.vmobj.labe11')" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.vmobj.maxLevel')"> |
| | | <el-input |
| | | <!-- <el-input |
| | | v-model="insertLayer.max" |
| | | :placeholder="$t('dataManage.vmobj.labe12')" |
| | | ></el-input> |
| | | ></el-input> --> |
| | | <el-select |
| | | style="width:100%" |
| | | v-model="insertLayer.max" |
| | | :placeholder="$t('dataManage.vmobj.labe12')" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | element-loading-text="æ°æ®åå¸ä¸" |
| | | style="margin: 0px 20px;widht:100%;height:calc(100% - 80px); " |
| | | > |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import axios from 'axios'; |
| | | import dialogHeader from './dialogHeader.vue' |
| | | import mapview from '../../components/preview_map.vue' |
| | | import MyBread from "../../components/MyBread.vue" |
| | | import { |
| | |
| | | } from '../../api/api.js' |
| | | |
| | | export default { |
| | | components: { MyBread, mapview }, |
| | | components: { |
| | | MyBread, mapview, |
| | | 'dialog-header': dialogHeader, |
| | | }, |
| | | data() { |
| | | return { |
| | | active: 'first', |
| | |
| | | detailsDialogVisible: false, |
| | | itemdetail: {}, |
| | | insertDialogVisible: false, |
| | | insertLayer: { name: '', number: null, min: 4, max: 8 }, |
| | | loadDialogVisible: false |
| | | insertLayer: { name: '', number: null, min: 4, max: 18 }, |
| | | loadDialogVisible: false, |
| | | options: [], |
| | | isFullscreen: false, |
| | | } |
| | | }, |
| | | methods: { |
| | | setOptions() { |
| | | var std = []; |
| | | for (var i = 0; i < 21; i++) { |
| | | std.push({ |
| | | value: i, |
| | | label: i |
| | | }) |
| | | } |
| | | this.options = std; |
| | | }, |
| | | setloadDialogVisible() { |
| | | this.loadDialogVisible = false |
| | | }, |
| | | setinsertLayerCancel() { |
| | | this.insertDialogVisible = false; |
| | | this.insertLayer = { name: '', number: null, min: 4, max: 8 }; |
| | | this.insertLayer = { name: '', number: null, min: 4, max: 18 }; |
| | | }, |
| | | //åå¸æäº¤ |
| | | async setinsertLayerSubmit() { |
| | |
| | | } |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i]) |
| | | std.push(this.multipleSelection[i].id) |
| | | } |
| | | var obj = { |
| | | dircode: this.formInline.dirid, |
| | |
| | | min: min, |
| | | max: max, |
| | | name: name, |
| | | ids: std.toString(), |
| | | ids: std, |
| | | type: this.formInline.type |
| | | } |
| | | this.loadDialogVisible = true |
| | | this.insertDialogVisible = false; |
| | | |
| | | const data = await publish_insert(obj); |
| | | if (data.code != 200) { |
| | | if (data.code != 200 || data.count > 0) { |
| | | this.$message.error("æ°æ®åå¸å¤±è´¥") |
| | | |
| | | } else { |
| | |
| | | } else { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i]) |
| | | std.push(this.multipleSelection[i].id) |
| | | } |
| | | var obj = { |
| | | dircode: this.formInline.dirid, |
| | | depcode: this.formInline.depid, |
| | | |
| | | ids: std.toString(), |
| | | ids: std, |
| | | type: this.formInline.type |
| | | } |
| | | this.loadDialogVisible = true |
| | |
| | | this.editDialogVisible = true; |
| | | }, |
| | | //å é¤ |
| | | async setPageDelete() { |
| | | setPageDelete() { |
| | | if (this.multipleSelection.length == 0) { |
| | | return this.$message.error("è¯·éæ©è¦å é¤çæ°æ®") |
| | | } else { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | const data = await publish_deletes({ ids: std.toString() }); |
| | | if (data.code != 200) { |
| | | this.$message.error("åä½å表è·å失败") |
| | | return |
| | | } else { |
| | | this.$message({ |
| | | message: 'å 餿å', |
| | | type: 'success' |
| | | var that = this |
| | | this.$confirm('ç¡®å®æ¯å¦å 餿éå
容?') |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | .catch(_ => { |
| | | that.deletePage() |
| | | }); |
| | | this.getTableData(); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | async deletePage() { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | const data = await publish_deletes({ ids: std.toString() }); |
| | | if (data.code != 200) { |
| | | this.$message.error("åä½å表è·å失败") |
| | | return |
| | | } else { |
| | | this.$message({ |
| | | message: 'å 餿å', |
| | | type: 'success' |
| | | }); |
| | | this.getTableData(); |
| | | } |
| | | }, |
| | | //é¢è§å¼¹çªæå¼ |
| | | setPreviewLayer(res) { |
| | | this.$store.state.previewLayer = res; |
| | | this.dialogVisible = true; |
| | | this.showMapView = true; |
| | | }, |
| | | //æ¯å¦ä¸ºå
¨å±å½æ° |
| | | onFullscreen(fullscreen) { |
| | | this.isFullscreen = fullscreen; |
| | | }, |
| | | //é¢è§å¼¹çªå
³é |
| | | handleClose() { |
| | |
| | | mounted() { |
| | | this.active = 'first'; |
| | | this.setPageStart(); |
| | | this.setOptions(); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | background: transparent !important; |
| | | } |
| | | } |
| | | .fullscreen1 { |
| | | width: 100%; |
| | | height: 92vh; |
| | | } |
| | | /deep/.el-dialog__body { |
| | | padding: 10px !important; |
| | | } |
| | | /deep/.el-dialog__header { |
| | | padding: 10px !important; |
| | | } |
| | | } |
| | | </style> |