|
@@ -211,69 +211,69 @@ export default {
|
|
|
options: [
|
|
|
{
|
|
|
id: 'None',
|
|
|
- name: '非图例'
|
|
|
+ name: '非图例',
|
|
|
},
|
|
|
{
|
|
|
id: 'Zone',
|
|
|
- name: '区域'
|
|
|
+ name: '区域',
|
|
|
},
|
|
|
{
|
|
|
id: 'Image',
|
|
|
- name: '图标'
|
|
|
+ name: '图标',
|
|
|
},
|
|
|
{
|
|
|
id: 'Line',
|
|
|
- name: '线条'
|
|
|
- }
|
|
|
+ name: '线条',
|
|
|
+ },
|
|
|
],
|
|
|
kuan: [
|
|
|
{ id: '16', name: '16' },
|
|
|
{ id: '32', name: '32' },
|
|
|
- { id: '64', name: '64' }
|
|
|
+ { id: '64', name: '64' },
|
|
|
],
|
|
|
gao: [
|
|
|
{ id: '16', name: '16' },
|
|
|
{ id: '32', name: '32' },
|
|
|
- { id: '64', name: '64' }
|
|
|
+ { id: '64', name: '64' },
|
|
|
],
|
|
|
selectedIds: [],
|
|
|
borderLineOption: [
|
|
|
{
|
|
|
id: 'solid',
|
|
|
- src: require('@/assets/imgs/1pxlines.png')
|
|
|
+ src: require('@/assets/imgs/1pxlines.png'),
|
|
|
},
|
|
|
{
|
|
|
id: 'dashed',
|
|
|
- src: require('@/assets/imgs/dashedLines.png')
|
|
|
+ src: require('@/assets/imgs/dashedLines.png'),
|
|
|
},
|
|
|
{
|
|
|
id: 'dotted',
|
|
|
- src: require('@/assets/imgs/dotLines.png')
|
|
|
- }
|
|
|
+ src: require('@/assets/imgs/dotLines.png'),
|
|
|
+ },
|
|
|
],
|
|
|
linepxOption: [
|
|
|
{
|
|
|
id: 1,
|
|
|
- src: require('@/assets/imgs/1pxline.jpg')
|
|
|
+ src: require('@/assets/imgs/1pxline.jpg'),
|
|
|
},
|
|
|
{
|
|
|
id: 2,
|
|
|
- src: require('@/assets/imgs/2pxline.jpg')
|
|
|
+ src: require('@/assets/imgs/2pxline.jpg'),
|
|
|
},
|
|
|
{
|
|
|
id: 3,
|
|
|
- src: require('@/assets/imgs/3pxline.jpg')
|
|
|
- }
|
|
|
+ src: require('@/assets/imgs/3pxline.jpg'),
|
|
|
+ },
|
|
|
],
|
|
|
fileList: [],
|
|
|
file: '',
|
|
|
// this.ruleForm.Url 图标的key,/serve/topology-wanda/Picture/query/${this.ruleForm.Url}
|
|
|
value: '',
|
|
|
linepxObject: {
|
|
|
- src: ''
|
|
|
+ src: '',
|
|
|
},
|
|
|
borderLineOptionObject: {
|
|
|
- src: ''
|
|
|
+ src: '',
|
|
|
},
|
|
|
canvasWidth: 28,
|
|
|
canvasHeight: 28,
|
|
@@ -286,7 +286,7 @@ export default {
|
|
|
key: 1,
|
|
|
InfoLocals: undefined, //工程信息化
|
|
|
// InfoSystems: undefined, //工程信息化专业/系统
|
|
|
- InfoTypeIds: undefined //铺位可视化typeid
|
|
|
+ InfoTypeIds: undefined, //铺位可视化typeid
|
|
|
}
|
|
|
},
|
|
|
props: ['ruleForm', 'title', 'InfosList', 'InfoTypeIdList'],
|
|
@@ -301,10 +301,10 @@ export default {
|
|
|
//业下设备分类和位置分类树形结构
|
|
|
initQueryDeviceAndPOsition() {
|
|
|
let postParams = {}
|
|
|
- queryDeviceAndPOsition({ postParams }).then(res => {
|
|
|
- this.deviceList = res.data.map(i => {
|
|
|
+ queryDeviceAndPOsition({ postParams }).then((res) => {
|
|
|
+ this.deviceList = res.data.map((i) => {
|
|
|
i.children &&
|
|
|
- i.children.map(child => {
|
|
|
+ i.children.map((child) => {
|
|
|
child.id = child.id + child.type
|
|
|
child.name = child.name
|
|
|
})
|
|
@@ -321,7 +321,7 @@ export default {
|
|
|
this.file = file.file
|
|
|
var reader = new FileReader()
|
|
|
reader.readAsDataURL(this.file)
|
|
|
- reader.onload = e => {
|
|
|
+ reader.onload = (e) => {
|
|
|
this.view.url = e.target.result
|
|
|
}
|
|
|
},
|
|
@@ -333,9 +333,9 @@ export default {
|
|
|
this.ruleForm.FillColor = this.hexify(this.ruleForm.FillColor)
|
|
|
}
|
|
|
let postParams = {
|
|
|
- Content: [this.ruleForm]
|
|
|
+ Content: [this.ruleForm],
|
|
|
}
|
|
|
- createLegend({ postParams }).then(res => {
|
|
|
+ createLegend({ postParams }).then((res) => {
|
|
|
if (res.Result == 'success') {
|
|
|
this.$message.success('添加图例成功!')
|
|
|
this.$emit('addSuccess')
|
|
@@ -353,9 +353,9 @@ export default {
|
|
|
this.ruleForm.FillColor = this.hexify(this.ruleForm.FillColor)
|
|
|
}
|
|
|
let postParams = {
|
|
|
- Content: [this.ruleForm]
|
|
|
+ Content: [this.ruleForm],
|
|
|
}
|
|
|
- updateLegend({ postParams }).then(res => {
|
|
|
+ updateLegend({ postParams }).then((res) => {
|
|
|
if (res.Result == 'success') {
|
|
|
this.$message.success('图例修改成功!')
|
|
|
this.$emit('updateSuccess')
|
|
@@ -433,7 +433,7 @@ export default {
|
|
|
//线条类型改变
|
|
|
changeLineType(val) {
|
|
|
if (val) {
|
|
|
- this.borderLineOptionObject = val && this.borderLineOption.find(item => item.id == val)
|
|
|
+ this.borderLineOptionObject = val && this.borderLineOption.find((item) => item.id == val)
|
|
|
this.$nextTick(() => {
|
|
|
if (this.$refs.select1 && this.$refs.select1.$el) {
|
|
|
this.$refs.select1.$el.children[0].children[0].setAttribute(
|
|
@@ -494,7 +494,7 @@ export default {
|
|
|
formData.append('file', this.file)
|
|
|
}
|
|
|
let postParams = formData
|
|
|
- uploadImg({ postParams }).then(res => {
|
|
|
+ uploadImg({ postParams }).then((res) => {
|
|
|
if (res.Result == 'success') {
|
|
|
this.$set(vm.ruleForm, 'Url', res.EntityList[0])
|
|
|
this.$message.success('图标上传成功!')
|
|
@@ -520,18 +520,12 @@ export default {
|
|
|
|
|
|
//位置/设备
|
|
|
treeConfirmDevice(id, info) {
|
|
|
- console.log('%ctreeConfirmDevice=============','color:blue')
|
|
|
- console.log(id, info)
|
|
|
- console.log('%ctreeConfirmDevice=============','color:blue')
|
|
|
let InfoSystem = [],
|
|
|
InfoSystems = [],
|
|
|
InfoLocal = []
|
|
|
- this.deviceList.forEach(i => {
|
|
|
+ this.deviceList.forEach((i) => {
|
|
|
i.children.length > 0 &&
|
|
|
- i.children.forEach(j => {
|
|
|
- console.log('%this.deviceList.forEach=============','color:blue')
|
|
|
- console.log(id)
|
|
|
- console.log('%this.deviceList.forEach=============','color:blue')
|
|
|
+ i.children.forEach((j) => {
|
|
|
if (id.includes(j.id)) {
|
|
|
InfoSystems.push(i)
|
|
|
}
|
|
@@ -539,22 +533,22 @@ export default {
|
|
|
})
|
|
|
InfoSystem = JSON.parse(JSON.stringify(InfoSystems))
|
|
|
.reduce((prev, element) => {
|
|
|
- if (!prev.find(el => el.id == element.id)) {
|
|
|
+ if (!prev.find((el) => el.id == element.id)) {
|
|
|
prev.push(element)
|
|
|
}
|
|
|
return prev
|
|
|
}, [])
|
|
|
- .map(i => {
|
|
|
+ .map((i) => {
|
|
|
if (i.children.length) {
|
|
|
delete i.children
|
|
|
}
|
|
|
return i
|
|
|
})
|
|
|
- InfoLocal = info.map(i => {
|
|
|
+ InfoLocal = info.map((i) => {
|
|
|
return {
|
|
|
type: i.id.split('')[i.id.length - 1],
|
|
|
name: i.name,
|
|
|
- id: i.id.substr(0, i.id.length - 1)
|
|
|
+ id: i.id.substr(0, i.id.length - 1),
|
|
|
}
|
|
|
})
|
|
|
this.$set(this.ruleForm, 'InfoLocal', InfoLocal)
|
|
@@ -564,21 +558,21 @@ export default {
|
|
|
// //console.log('focusChange', status)
|
|
|
},
|
|
|
visualization() {
|
|
|
- getVisualization({}).then(res => {
|
|
|
+ getVisualization({}).then((res) => {
|
|
|
this.typeVisualization =
|
|
|
res.Data &&
|
|
|
- res.Data.map(i => {
|
|
|
+ res.Data.map((i) => {
|
|
|
return {
|
|
|
id: i.Id,
|
|
|
name: i.Name,
|
|
|
children: i.Children
|
|
|
- ? i.Children.map(j => {
|
|
|
+ ? i.Children.map((j) => {
|
|
|
return {
|
|
|
id: j.Id,
|
|
|
- name: j.Id + '-' + j.Name
|
|
|
+ name: j.Id + '-' + j.Name,
|
|
|
}
|
|
|
})
|
|
|
- : []
|
|
|
+ : [],
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -587,12 +581,12 @@ export default {
|
|
|
return {
|
|
|
id: data.Id,
|
|
|
name: data.Name,
|
|
|
- children: data.Children ? data.Children.map(i => this.getTree(i)) : []
|
|
|
+ children: data.Children ? data.Children.map((i) => this.getTree(i)) : [],
|
|
|
}
|
|
|
},
|
|
|
focusChange(status) {
|
|
|
//console.log('focusChange', status)
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
console.log(this.ruleForm, 'form')
|
|
@@ -616,9 +610,9 @@ export default {
|
|
|
}
|
|
|
this.initGraph()
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|