|
@@ -165,7 +165,7 @@
|
|
|
></el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess' @cancal='cancal'></add-legend>
|
|
|
+ <add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess' @cancal='cancal' :key='Date.now()'></add-legend>
|
|
|
<Modal :show='modalStatusTip' title='确定要作废图例吗?' mode='tip' type='error' @close='modalStatusTip=false'>
|
|
|
<template #content>作废后则不可更改</template>
|
|
|
<template #handle>
|
|
@@ -189,6 +189,7 @@ import {
|
|
|
getVisualization,
|
|
|
queryRelation
|
|
|
} from '@/api/legendLibrary.js'
|
|
|
+import { Container } from 'element-ui'
|
|
|
|
|
|
function hexToRgba(hex) {
|
|
|
let opacity = '',
|
|
@@ -304,9 +305,38 @@ export default {
|
|
|
initQueryDeviceAndPOsition() {
|
|
|
let postParams = {}
|
|
|
queryDeviceAndPOsition({ postParams }).then(res => {
|
|
|
+ // let data = res.data
|
|
|
+ // data.forEach(data => {
|
|
|
+ // const map = {
|
|
|
+ // 1: [],
|
|
|
+ // 2: []
|
|
|
+ // }
|
|
|
+ // data.children.forEach(child => map[child.type].push(child))
|
|
|
+ // data.children = [
|
|
|
+ // {
|
|
|
+ // id: `1--${data.id}`,
|
|
|
+ // name: '位置类型',
|
|
|
+ // children: map[1]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: `2--${data.id}`,
|
|
|
+ // name: '设备类型',
|
|
|
+ // children: map[2]
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // })
|
|
|
+ // data.map(i => {
|
|
|
+ // i.children.map(i => {
|
|
|
+ // console.log(i)
|
|
|
+ // if (!i.children.length) {
|
|
|
+ // i.disabled = true
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // })
|
|
|
this.deviceList = res.data
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
//说明书位置
|
|
|
instruction() {
|
|
|
let getParams = {}
|
|
@@ -390,34 +420,6 @@ export default {
|
|
|
deleteClick(row) {
|
|
|
this.deleteObject = row
|
|
|
this.modalStatusTip = true
|
|
|
- // this.$confirm('作废后则不可更改', '确定要作废图例吗?', {
|
|
|
- // confirmButtonText: '作废',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // type: 'warning',
|
|
|
- // center: true
|
|
|
- // })
|
|
|
- // .then(() => {
|
|
|
- // let postParams = [
|
|
|
- // {
|
|
|
- // Id: row.Id
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // deleteLegend({ postParams }).then(res => {
|
|
|
- // if (res.Result == 'success') {
|
|
|
- // this.$message({
|
|
|
- // type: 'success',
|
|
|
- // message: '作废成功!'
|
|
|
- // })
|
|
|
- // this.getTableList()
|
|
|
- // }
|
|
|
- // })
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // this.$message({
|
|
|
- // type: 'info',
|
|
|
- // message: '已取消删除'
|
|
|
- // })
|
|
|
- // })
|
|
|
},
|
|
|
pageChanged(page, size) {
|
|
|
this.currentPage = page
|
|
@@ -452,9 +454,6 @@ export default {
|
|
|
return arr
|
|
|
},
|
|
|
getTableList() {
|
|
|
- // if (this.GraphCategoryIds || this.InfoLocals || this.InfoSystems || this.keyword) {
|
|
|
- // this.currentPage = 1
|
|
|
- // }
|
|
|
let postParams = {
|
|
|
Deleted: this.state == 1 ? false : true,
|
|
|
GraphCategoryIds: this.GraphCategoryIds.length ? this.GraphCategoryIds : undefined, //说明书位置
|