代码调整
This commit is contained in:
parent
5a808c1cd4
commit
6fa98a6585
@ -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',
|
||||||
|
@ -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>
|
</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';
|
||||||
|
|
||||||
@ -34,11 +31,11 @@ export default {
|
|||||||
queryFunction: {
|
queryFunction: {
|
||||||
type: Function,
|
type: Function,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
localParamName:{
|
localParamName: {
|
||||||
type:String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -54,22 +51,22 @@ export default {
|
|||||||
// 获取城市列表
|
// 获取城市列表
|
||||||
this.filterOptions=[];
|
this.filterOptions=[];
|
||||||
|
|
||||||
let resp = this.$route.fullPath.includes('design/userlist')?await this.$Dictionary.cityType():await publisMapCityList('city_type');
|
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;
|
resp=this.$route.fullPath.includes('design/userlist')?resp:resp.data;
|
||||||
const cityList = resp.sort((a, b) => {
|
const cityList = resp.sort((a, b) => {
|
||||||
return a.code.localeCompare(b.code);
|
return a.code.localeCompare(b.code);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.filterOptions=cityList;
|
this.filterOptions=cityList;
|
||||||
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
||||||
|
|
||||||
this.$emit('filterSelectChange', this.filterSelect);
|
this.$emit('filterSelectChange', this.filterSelect);
|
||||||
},
|
},
|
||||||
filterSelectChange(filterSelect) {
|
filterSelectChange(filterSelect) {
|
||||||
// 设置一级选择组件
|
// 设置一级选择组件
|
||||||
// localStore.set('_cityCode', filterSelect);
|
// localStore.set('_cityCode', filterSelect);
|
||||||
localStore.set(this.localParamName, filterSelect);
|
localStore.set(this.localParamName, filterSelect);
|
||||||
this.$emit('filterSelectChange', filterSelect);
|
this.$emit('filterSelectChange', filterSelect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user