|
@@ -19,6 +19,7 @@
|
|
|
<div class='input-right' ref='graph' v-show='ruleForm.Type=="Zone" || ruleForm.Type=="Image" || ruleForm.Type =="Line"'>
|
|
|
<div v-show=' ruleForm.Type=="Image" && ruleForm.Url' class='input-right'>
|
|
|
<img :src='`/serve/topology-wanda/Picture/query/${ruleForm.Url}`' alt />
|
|
|
+ <!-- {{ruleForm.Url}} -->
|
|
|
</div>
|
|
|
<canvas id='canvas' :width='canvasWidth' :height='canvasHeight' v-show='!(ruleForm.Type=="Image" && ruleForm.Url)'></canvas>
|
|
|
</div>
|
|
@@ -54,11 +55,6 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
|
|
|
- <!-- <el-select v-model='ruleForm.LineWidth' placeholder='请选择' size='small' style='width:160px;' ref='select' @change='changeLineWidth'>
|
|
|
- <el-option v-for='item in linepxOption' :key='item.id' :label='item.src' :value='item.id'>
|
|
|
- <img :src='item.src' alt />
|
|
|
- </el-option>
|
|
|
- </el-select>-->
|
|
|
<div style='position:relative'>
|
|
|
<a-input-number id='inputNumber' v-model='ruleForm.LineWidth' :min='1' :max='10' ref='select' @change='changeLineWidth' />
|
|
|
<span class='line-width'>px</span>
|
|
@@ -92,21 +88,15 @@
|
|
|
<el-select v-model='value' placeholder='请选择' size='small' style='width:200px;margin-right:48px'>
|
|
|
<el-option v-for='item in options2' :key='item.value' :label='item.label' :value='item.value'></el-option>
|
|
|
</el-select>
|
|
|
- <!-- <el-select v-model='value' placeholder='请选择' size='small' style='width:200px;'>
|
|
|
- <el-option v-for='item in options3' :key='item.value' :label='item.label' :value='item.value'></el-option>
|
|
|
- </el-select>-->
|
|
|
+
|
|
|
<TreeSelect
|
|
|
- title='已选项'
|
|
|
- unit='个'
|
|
|
- placeholder='请选择'
|
|
|
tipPlace='top'
|
|
|
- height='300'
|
|
|
+ height='200'
|
|
|
:notNull='true'
|
|
|
:returnParentNode='false'
|
|
|
:isShowAllChoice='true'
|
|
|
- :selectedIds='select11'
|
|
|
:choseArea='true'
|
|
|
- :data='dataTreeMultiple5'
|
|
|
+ :data='typeVisualization'
|
|
|
@change='treeConfirm'
|
|
|
@focusChange='focusChange'
|
|
|
/>
|
|
@@ -116,7 +106,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { createLegend, updateLegend, uploadImg } from '@/api/legendLibrary.js'
|
|
|
+import { createLegend, updateLegend, uploadImg, getVisualization } from '@/api/legendLibrary.js'
|
|
|
import { FloorView } from '@/lib/FloorView'
|
|
|
import { FloorScene } from '@/lib/FloorScene'
|
|
|
import { GraphView } from '@/lib/GraphView'
|
|
@@ -185,8 +175,8 @@ export default {
|
|
|
canvasHeight: 114,
|
|
|
view: null,
|
|
|
scene: null,
|
|
|
- dataTreeMultiple5: [],
|
|
|
- select11: []
|
|
|
+ typeVisualization: [],
|
|
|
+ visualizationList: [] //已选铺位可视化
|
|
|
}
|
|
|
},
|
|
|
props: ['ruleForm', 'title'],
|
|
@@ -311,6 +301,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
base64ToFile(dataurl, filename) {
|
|
|
+ console.log(dataurl, 'url')
|
|
|
let arr = dataurl.split(',')
|
|
|
let mime = arr[0].match(/:(.*?);/)[1]
|
|
|
if (!filename) {
|
|
@@ -354,9 +345,32 @@ export default {
|
|
|
},
|
|
|
focusChange(status) {
|
|
|
console.log('focusChange', status)
|
|
|
+ },
|
|
|
+ visualization() {
|
|
|
+ getVisualization({}).then(res => {
|
|
|
+ this.typeVisualization = res.Data && res.Data.map(i => this.getTree(i))
|
|
|
+ console.log(this.typeVisualization)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getTree(data) {
|
|
|
+ return {
|
|
|
+ id: data.Id,
|
|
|
+ name: data.Name,
|
|
|
+ children: data.Children ? data.Children.map(i => this.getTree(i)) : []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ treeConfirm(id) {
|
|
|
+ this.visualizationList = id.map(i => {
|
|
|
+ return { id: i }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ focusChange(status) {
|
|
|
+ console.log('focusChange', status)
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.visualization()
|
|
|
+
|
|
|
if (this.title == '修改图例库') {
|
|
|
this.changeLineWidth(this.ruleForm.LineWidth)
|
|
|
this.changeLineType(this.ruleForm.LineDash)
|