Commit beaf5d45 authored by co_dengxiongwen's avatar co_dengxiongwen

tj

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