f6b4106f by zhaoqian

Merge remote-tracking branch 'origin/master'

2 parents 2cb34c31 db6f3d57
......@@ -160,9 +160,22 @@ ol, ul { list-style:none; }
margin: 0;
padding: 7px 16px;
cursor: pointer;
position: relative;
.childUl{
display: none;
position: absolute;
left: 92px !important;
top: 0!important;
li{
width: 76px;
}
}
}
li:hover {
background: #eee;
>.childUl{
display: block;
}
}
.noEdit{
color: #E6E6E6;
......
......@@ -58,7 +58,15 @@
>
<li @click="postionToMap">定位</li>
<li @click="importGeo">导入图形</li>
<li @click="exportToShp">导出图形</li>
<li @click="exportToShp">
导出图形
<ul class="contextmenu childUl">
<li>文本</li>
<li>CAD</li>
<li>Excel</li>
<li>ESRI Shape</li>
</ul>
</li>
<li v-show="isZD">导入属性</li>
<li v-show="!isZD">导入楼盘</li>
<li>重叠分析</li>
......
......@@ -2,7 +2,7 @@ import store from '../../store/index'
import axios from 'axios'
import router from '../../router'
import {Message, MessageBox} from 'element-ui'
import { Loading } from 'element-ui';
// import { Loading } from 'element-ui';
import {httpStatus} from '@/api/config'
// 创建一个 axios 实例
......@@ -19,7 +19,7 @@ const service = axios.create({
function errorLog() {
//请求完成关闭loading
// this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
loadingInstance.close();
// loadingInstance.close();
// });
MessageBox.alert('报错了请联系管理员', '消息提示', {
confirmButtonText: '确定',
......@@ -27,7 +27,7 @@ function errorLog() {
})
}
//定义loading
let loadingInstance = null
// let loadingInstance = null
// 请求拦截器
service.interceptors.request.use(
......@@ -37,12 +37,12 @@ service.interceptors.request.use(
// 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
// config.headers['authkey'] = token
//请求发送成功显示loading
loadingInstance = Loading.service({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
// loadingInstance = Loading.service({
// lock: true,
// text: 'Loading',
// spinner: 'el-icon-loading',
// background: 'rgba(0, 0, 0, 0.5)'
// });
return config
},
error => {
......@@ -59,7 +59,7 @@ service.interceptors.response.use(
const {code} = dataAxios
//请求完成关闭loading
// this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
loadingInstance.close();
// loadingInstance.close();
// });
// 根据 code 进行判断
if (code === undefined) {
......@@ -90,7 +90,7 @@ service.interceptors.response.use(
},
error => {
if (error && error.response) {
loadingInstance.close();
// loadingInstance.close();
switch (error.response.status) {
case 400:
error.message = '请求错误';
......