代码调整

This commit is contained in:
fan 2019-10-24 18:19:06 +08:00
parent 5a808c1cd4
commit 6fa98a6585
4 changed files with 15 additions and 124 deletions

View File

@ -41,7 +41,7 @@ export default {
{ {
name: 'global.scan', name: 'global.scan',
handle: this.qcodeEntry, handle: this.qcodeEntry,
hidden: process.env.NODE_ENV != 'development' hidden: process.env.NODE_ENV != 'development' || getSessionStorage('design')
}, },
{ {
name: 'global.quickEntry', name: 'global.quickEntry',

View File

@ -1,104 +0,0 @@
<template>
<div
ref="drapBox"
class="drapHeight"
:style="{width: width + 'px', height: height + 'px', top: heightUp +'px'}"
@mousedown="mousedown"
/>
</template>
<script>
import localStore from 'storejs';
export default {
name: 'DrapUp',
props: {
heightUp: {
type: Number,
required: true
},
isSave: {
type: Boolean,
default: true
},
max: {
type: Number,
default: 0
},
min: {
type: Number,
default: 0
},
width: {
type: Number,
default: 0
},
height: {
type: Number,
default: 36
}
},
data() {
return {
heightUps: 0
};
},
computed: {
heightTotol() {
return this.$store.state.app.height - 50;
},
},
mounted() {
const oDiv = this.$refs.drapBox;
oDiv.onmousedown = () => {
return false;
};
},
methods: {
mousedown(e) {
const oDiv = this.$refs.drapBox;
const maxNum = this.max || this.heightTotol-200;
const minNum = this.min || 150;
oDiv.onmousedown = function() {
return false;
};
e.stopPropagation();
window.event.cancelBubble = true;
const odiv = e.target;
const disY = e.clientY - odiv.offsetTop ;
document.onmousemove = (e) => {
let top = e.clientY - disY;
if (top > maxNum) {
top = maxNum;
} else if (top < minNum) {
top = minNum;
}
odiv.style.top = top + 'px';
this.$emit('drapHeight', top);
this.heightUps = top;
};
document.onmouseup = (e) => {
if (this.isSave) {
if (this.heightUps > minNum) {
localStore('upHeight', JSON.stringify(this.heightUps));
}
}
document.onmousemove = null;
document.onmouseup = null;
};
}
}
};
</script>
<style>
.drapHeight {
float: left;
width: 16px;
background: red;
opacity: 0;
cursor: n-resize;
position: absolute;
top: 0;
z-index: 9999;
}
</style>

View File

@ -9,10 +9,7 @@
</template> </template>
<script> <script>
import { setUserConfigInfo } from '@/api/management/user'; import { publisMapCityList} from '@/api/designPlatform';
import { listPublishMap } from '@/api/jmap/map';
import {getUserMapTree,publisMapCityList} from '@/api/designPlatform';
import { getPublishMapTree } from '@/api/management/mapprd';
import localStore from 'storejs'; import localStore from 'storejs';
@ -35,8 +32,8 @@ export default {
type: Function, type: Function,
required: true required: true
}, },
localParamName:{ localParamName: {
type:String, type: String,
required: true required: true
} }
}, },

View File

@ -3,9 +3,7 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{ $t('global.mapList') }}</span> <span>{{ $t('global.mapList') }}</span>
</div> </div>
<!-- v-if="project!=='xty' " -->
<filter-city ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" /> <filter-city ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
<!-- v-if="project!=='xty' " -->
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable /> <el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px' }"> <el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px' }">
<el-tree <el-tree