代码调整
This commit is contained in:
parent
5a808c1cd4
commit
6fa98a6585
@ -41,7 +41,7 @@ export default {
|
||||
{
|
||||
name: 'global.scan',
|
||||
handle: this.qcodeEntry,
|
||||
hidden: process.env.NODE_ENV != 'development'
|
||||
hidden: process.env.NODE_ENV != 'development' || getSessionStorage('design')
|
||||
},
|
||||
{
|
||||
name: 'global.quickEntry',
|
||||
|
@ -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>
|
@ -9,10 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { setUserConfigInfo } from '@/api/management/user';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import {getUserMapTree,publisMapCityList} from '@/api/designPlatform';
|
||||
import { getPublishMapTree } from '@/api/management/mapprd';
|
||||
import { publisMapCityList} from '@/api/designPlatform';
|
||||
|
||||
import localStore from 'storejs';
|
||||
|
||||
@ -34,11 +31,11 @@ export default {
|
||||
queryFunction: {
|
||||
type: Function,
|
||||
required: true
|
||||
},
|
||||
localParamName:{
|
||||
type:String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
localParamName: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -54,22 +51,22 @@ export default {
|
||||
// 获取城市列表
|
||||
this.filterOptions=[];
|
||||
|
||||
let resp = this.$route.fullPath.includes('design/userlist')?await this.$Dictionary.cityType():await publisMapCityList('city_type');
|
||||
resp=this.$route.fullPath.includes('design/userlist')?resp:resp.data;
|
||||
let resp = this.$route.fullPath.includes('design/userlist')?await this.$Dictionary.cityType():await publisMapCityList('city_type');
|
||||
resp=this.$route.fullPath.includes('design/userlist')?resp:resp.data;
|
||||
const cityList = resp.sort((a, b) => {
|
||||
return a.code.localeCompare(b.code);
|
||||
});
|
||||
|
||||
this.filterOptions=cityList;
|
||||
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
||||
this.filterOptions=cityList;
|
||||
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
||||
|
||||
this.$emit('filterSelectChange', this.filterSelect);
|
||||
this.$emit('filterSelectChange', this.filterSelect);
|
||||
},
|
||||
filterSelectChange(filterSelect) {
|
||||
// 设置一级选择组件
|
||||
// localStore.set('_cityCode', filterSelect);
|
||||
localStore.set(this.localParamName, filterSelect);
|
||||
this.$emit('filterSelectChange', filterSelect);
|
||||
// localStore.set('_cityCode', filterSelect);
|
||||
localStore.set(this.localParamName, filterSelect);
|
||||
this.$emit('filterSelectChange', filterSelect);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -3,9 +3,7 @@
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ $t('global.mapList') }}</span>
|
||||
</div>
|
||||
<!-- v-if="project!=='xty' " -->
|
||||
<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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px' }">
|
||||
<el-tree
|
||||
|
Loading…
Reference in New Issue
Block a user