Commit beaf5d45 authored by co_dengxiongwen's avatar co_dengxiongwen

tj

parent 5b57600b
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'name', label: 'name',
level: 'level', level: 'level'
}, },
nodeKey: 'id', nodeKey: 'id',
station: {}, //当前选择的站点 station: {}, //当前选择的站点
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
tierId: '', tierId: '',
tierName: '', tierName: '',
resourceId: '', resourceId: '',
sId: localStorage.getItem('stationId'), sId: localStorage.getItem('stationId')
}, },
currentNode: {}, currentNode: {},
dragAble: false, dragAble: false,
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
x: 0, x: 0,
y: 0, y: 0,
show: false, show: false,
name: '', name: ''
}, },
spanDragListNow: {}, spanDragListNow: {},
mousemoveStatus: false, mousemoveStatus: false,
...@@ -172,17 +172,17 @@ export default { ...@@ -172,17 +172,17 @@ export default {
//当前选择的层级 //当前选择的层级
tierMap: null, tierMap: null,
cancelDisabled: false, cancelDisabled: false,
submitlDisabled: false, submitlDisabled: false
} }
}, },
components: { components: {
AddOrUpdate, AddOrUpdate,
QueryDetail, QueryDetail
}, },
watch: { watch: {
searchInput(val) { searchInput(val) {
this.$refs.tree.filter(val) this.$refs.tree.filter(val)
}, }
}, },
created() { created() {
that = this that = this
...@@ -229,7 +229,7 @@ export default { ...@@ -229,7 +229,7 @@ export default {
// 投影 // 投影
code: 'xkcd-image', code: 'xkcd-image',
units: 'pixels', units: 'pixels',
extent: extent, extent: extent
}) })
if (mapList.length > 0) { if (mapList.length > 0) {
for (var i = 0; i < mapList.length; i++) { for (var i = 0; i < mapList.length; i++) {
...@@ -238,9 +238,9 @@ export default { ...@@ -238,9 +238,9 @@ export default {
source: new ImageStatic({ source: new ImageStatic({
url: mapList[i].readPath, //这里添加静态图片的地址 url: mapList[i].readPath, //这里添加静态图片的地址
projection: projection, projection: projection,
imageExtent: extent, imageExtent: extent
}), }),
visible: false, visible: false
}) })
this.imgLayerList.push(layerItem) this.imgLayerList.push(layerItem)
} }
...@@ -248,7 +248,7 @@ export default { ...@@ -248,7 +248,7 @@ export default {
let zoomControl = new Zoom({ let zoomControl = new Zoom({
delta: 0.2, delta: 0.2,
zoomInTipLabel: '', zoomInTipLabel: '',
zoomOutTipLabel: '', zoomOutTipLabel: ''
}) })
// 大图 // 大图
this.map = new Map({ this.map = new Map({
...@@ -261,8 +261,8 @@ export default { ...@@ -261,8 +261,8 @@ export default {
zoom: 2.5, zoom: 2.5,
maxZoom: 5, maxZoom: 5,
minZoom: 1.5, minZoom: 1.5,
extent: [-1100, -100, 2000, 1000], //[minX,minY,maxX,maxY] 控制拖动 extent: [-1100, -100, 2000, 1000] //[minX,minY,maxX,maxY] 控制拖动
}), })
}) })
// 删除默认的双击事件 // 删除默认的双击事件
const dblClickInteraction = this.map const dblClickInteraction = this.map
...@@ -398,7 +398,7 @@ export default { ...@@ -398,7 +398,7 @@ export default {
) )
//新建一个要素ol.Feature //新建一个要素ol.Feature
let newFeature = new OlFeature({ let newFeature = new OlFeature({
geometry: new OlGeomPoint(coordinate), //几何信息 geometry: new OlGeomPoint(coordinate) //几何信息
}) })
newFeature.setStyle( newFeature.setStyle(
this.getPointStyle(this.iconStyle.value + '.png', this.iconStyle.name) this.getPointStyle(this.iconStyle.value + '.png', this.iconStyle.name)
...@@ -420,7 +420,7 @@ export default { ...@@ -420,7 +420,7 @@ export default {
maxPoints: 2, maxPoints: 2,
style: this.getLineStyle(), style: this.getLineStyle(),
// 绘制时停止点击事件 // 绘制时停止点击事件
stopClick: true, stopClick: true
}) })
//添加绘制对象 //添加绘制对象
this.map.addInteraction(this.draw) this.map.addInteraction(this.draw)
...@@ -454,7 +454,7 @@ export default { ...@@ -454,7 +454,7 @@ export default {
that.modify.source_.addFeature(lineFeature) that.modify.source_.addFeature(lineFeature)
//新建一个要素ol.Feature //新建一个要素ol.Feature
let newFeature = new OlFeature({ let newFeature = new OlFeature({
geometry: new OlGeomPoint(coordinate), //几何信息 geometry: new OlGeomPoint(coordinate) //几何信息
}) })
newFeature.setStyle( newFeature.setStyle(
that.getPointStyle( that.getPointStyle(
...@@ -493,8 +493,8 @@ export default { ...@@ -493,8 +493,8 @@ export default {
let style = new OlStyleStyle({ let style = new OlStyleStyle({
stroke: new Stroke({ stroke: new Stroke({
color: 'transparent', color: 'transparent',
width: 1, width: 1
}), })
}) })
return style return style
}, },
...@@ -518,8 +518,8 @@ export default { ...@@ -518,8 +518,8 @@ export default {
// }), // }),
stroke: new Stroke({ stroke: new Stroke({
color: '#409EFF', color: '#409EFF',
width: 3, width: 3
}), })
}) })
return style return style
}, },
...@@ -529,17 +529,17 @@ export default { ...@@ -529,17 +529,17 @@ export default {
anchor: [0.5, 0.5], anchor: [0.5, 0.5],
scale: zoom || 0.4, scale: zoom || 0.4,
//rotation:0 旋转度 //rotation:0 旋转度
src: require('@/assets/images/' + src), src: require('@/assets/images/' + src)
}), }),
text: new Text({ text: new Text({
text: name, // 添加文字描述 text: name, // 添加文字描述
font: '14px font-size', // 设置字体大小 font: '14px font-size', // 设置字体大小
fill: new Fill({ fill: new Fill({
// 设置字体颜色 // 设置字体颜色
color: 'black', color: 'black'
}),
offsetY: 30, // 设置文字偏移量
}), }),
offsetY: 30 // 设置文字偏移量
})
}) })
return style return style
}, },
...@@ -559,14 +559,14 @@ export default { ...@@ -559,14 +559,14 @@ export default {
this.lineVectorLayer = new OlLayerVector({ this.lineVectorLayer = new OlLayerVector({
source: new OlSourceVector({ source: new OlSourceVector({
features: [], features: []
}), }),
style: new OlStyleStyle({ style: new OlStyleStyle({
stroke: new Stroke({ stroke: new Stroke({
color: '#409EFF', color: '#409EFF',
width: 3, width: 3
}), })
}), })
}) })
this.map.addLayer(this.lineVectorLayer) this.map.addLayer(this.lineVectorLayer)
...@@ -615,8 +615,8 @@ export default { ...@@ -615,8 +615,8 @@ export default {
this.vectorLayer = new OlLayerVector({ this.vectorLayer = new OlLayerVector({
source: new OlSourceVector({ source: new OlSourceVector({
features: featuresArr.concat(LinefeaturesArr), features: featuresArr.concat(LinefeaturesArr)
}), })
}) })
this.map.addLayer(this.vectorLayer) this.map.addLayer(this.vectorLayer)
//将点和线的Feature对象 ,放在一个数组里面 //将点和线的Feature对象 ,放在一个数组里面
...@@ -629,8 +629,8 @@ export default { ...@@ -629,8 +629,8 @@ export default {
// }) // })
this.modify = new Modify({ this.modify = new Modify({
source: new OlSourceVector({ source: new OlSourceVector({
features: modifyFeatures, features: modifyFeatures
}), })
}) })
this.modify.on('modifyend', (e) => { this.modify.on('modifyend', (e) => {
let pixel = this.map.getEventPixel(e.mapBrowserEvent.originalEvent) let pixel = this.map.getEventPixel(e.mapBrowserEvent.originalEvent)
...@@ -739,7 +739,7 @@ export default { ...@@ -739,7 +739,7 @@ export default {
getFeature(x, y) { getFeature(x, y) {
return new OlFeature({ return new OlFeature({
type: 'icon', type: 'icon',
geometry: new OlGeomPoint([x, y]), geometry: new OlGeomPoint([x, y])
}) })
}, },
handwheel(e, item) { handwheel(e, item) {
...@@ -798,7 +798,7 @@ export default { ...@@ -798,7 +798,7 @@ export default {
isLine: 0, isLine: 0,
//生成资源点编码的前缀 //生成资源点编码的前缀
codeType: item.remark, codeType: item.remark,
addOrUpdate: 'save', addOrUpdate: 'save'
} }
}, },
// 树节点过滤 // 树节点过滤
...@@ -812,9 +812,9 @@ export default { ...@@ -812,9 +812,9 @@ export default {
url: this.$http.adornUrl('/liResource/getTreeList'), url: this.$http.adornUrl('/liResource/getTreeList'),
method: 'post', method: 'post',
data: { data: {
stationId: this.checkedData.sId, // stationId: this.checkedData.sId,
name: this.searchInput, name: this.searchInput
}, }
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.treeData = data.nodes this.treeData = data.nodes
...@@ -891,13 +891,13 @@ export default { ...@@ -891,13 +891,13 @@ export default {
lineId: this.checkedData.lineId, lineId: this.checkedData.lineId,
stationId: this.checkedData.stationId, stationId: this.checkedData.stationId,
tierId: this.checkedData.tierId, tierId: this.checkedData.tierId,
subCode: this.checkedData.subCode, subCode: this.checkedData.subCode
} }
// console.log('初始化线路树请求参数:', data) // console.log('初始化线路树请求参数:', data)
this.$http({ this.$http({
url: this.$http.adornUrl('/liResource/getResourceTreeList'), url: this.$http.adornUrl('/liResource/getResourceTreeList'),
method: 'post', method: 'post',
data: data, data: data
}).then((data) => { }).then((data) => {
// console.log('初始化线路树:', data.nodes) // console.log('初始化线路树:', data.nodes)
if (data && data.code === 0) { if (data && data.code === 0) {
...@@ -910,7 +910,7 @@ export default { ...@@ -910,7 +910,7 @@ export default {
this.$http({ this.$http({
url: this.$http.adornUrl(`/liStation/getId/${id}`), url: this.$http.adornUrl(`/liStation/getId/${id}`),
method: 'get', method: 'get',
params: this.$http.adornParams(), params: this.$http.adornParams()
}) })
.then((data) => { .then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
...@@ -1240,8 +1240,8 @@ export default { ...@@ -1240,8 +1240,8 @@ export default {
method: 'post', method: 'post',
data: { data: {
stationId: this.checkedData.sId, stationId: this.checkedData.sId,
name: this.searchInput, name: this.searchInput
}, }
}) })
.then((data) => { .then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
...@@ -1354,7 +1354,7 @@ export default { ...@@ -1354,7 +1354,7 @@ export default {
this.$http({ this.$http({
url: this.$http.adornUrl(`/liResource/updateList`), url: this.$http.adornUrl(`/liResource/updateList`),
method: 'post', method: 'post',
data: paramList, data: paramList
}).then((data) => { }).then((data) => {
// console.log(data) // console.log(data)
if (data.message) { if (data.message) {
...@@ -1374,7 +1374,7 @@ export default { ...@@ -1374,7 +1374,7 @@ export default {
this.iconId = '' this.iconId = ''
this.listItem = '' this.listItem = ''
this.submitlDisabled = false this.submitlDisabled = false
}, }
}) })
} else { } else {
this.iconId = '' this.iconId = ''
...@@ -1391,7 +1391,7 @@ export default { ...@@ -1391,7 +1391,7 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
closeOnClickModal: false, closeOnClickModal: false
} }
) )
.then(() => { .then(() => {
...@@ -1399,7 +1399,7 @@ export default { ...@@ -1399,7 +1399,7 @@ export default {
this.$http({ this.$http({
url: this.$http.adornUrl(`/liResource/updateList`), url: this.$http.adornUrl(`/liResource/updateList`),
method: 'post', method: 'post',
data: paramList, data: paramList
}) })
.then((data) => { .then((data) => {
// console.log(data) // console.log(data)
...@@ -1418,7 +1418,7 @@ export default { ...@@ -1418,7 +1418,7 @@ export default {
this.checkedData.resourceId = '' this.checkedData.resourceId = ''
this.delflag = true this.delflag = true
this.submitlDisabled = false this.submitlDisabled = false
}, }
}) })
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
...@@ -1440,13 +1440,13 @@ export default { ...@@ -1440,13 +1440,13 @@ export default {
type: 'error', type: 'error',
message: '存在重复信息,保存失败!', message: '存在重复信息,保存失败!',
duration: 1500, duration: 1500,
showClose: true, showClose: true
}) })
this.$notify({ this.$notify({
title: '以下信息存在重复,请核实:', title: '以下信息存在重复,请核实:',
message: message, message: message,
duration: 0, duration: 0,
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true
}) })
this.submitlDisabled = false this.submitlDisabled = false
}, },
...@@ -1517,8 +1517,8 @@ export default { ...@@ -1517,8 +1517,8 @@ export default {
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
stationId: localStorage.getItem('stationId'), stationId: localStorage.getItem('stationId'),
id: ids[i], id: ids[i]
}), })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
//删除绘制的图标和线 //删除绘制的图标和线
...@@ -1693,8 +1693,8 @@ export default { ...@@ -1693,8 +1693,8 @@ export default {
url: this.$http.adornUrl('/sysDictionary/getSubSystemDicList'), url: this.$http.adornUrl('/sysDictionary/getSubSystemDicList'),
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
stationId: localStorage.getItem('stationId'), stationId: localStorage.getItem('stationId')
}), })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.systemList = data.list this.systemList = data.list
...@@ -1706,8 +1706,8 @@ export default { ...@@ -1706,8 +1706,8 @@ export default {
url: this.$http.adornUrl('/sysDictionary/getResourceTypeDicList'), url: this.$http.adornUrl('/sysDictionary/getResourceTypeDicList'),
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
stationId: localStorage.getItem('stationId'), stationId: localStorage.getItem('stationId')
}), })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.typeList = JSON.parse(JSON.stringify(data.list)) this.typeList = JSON.parse(JSON.stringify(data.list))
...@@ -1721,8 +1721,8 @@ export default { ...@@ -1721,8 +1721,8 @@ export default {
iconMousedown(e) { iconMousedown(e) {
e.width = Number(e.width) + 10 e.width = Number(e.width) + 10
//console.log(e.width) //console.log(e.width)
}, }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment