|
@@ -29,7 +29,7 @@
|
|
>
|
|
>
|
|
<p class="font-big">{{values.existComputed}}</p>
|
|
<p class="font-big">{{values.existComputed}}</p>
|
|
<p class="exist-title">{{values.existTitle}}</p>
|
|
<p class="exist-title">{{values.existTitle}}</p>
|
|
- <getCascader :RelationTypeName="RelationTypeName"/>
|
|
|
|
|
|
+ <getCascader :RelationTypeName="RelationTypeName" :number="number"/>
|
|
<!-- <el-row :span="24" style="margin-top: 10px">-->
|
|
<!-- <el-row :span="24" style="margin-top: 10px">-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <p class="demonstration">{{values.originEquipment}}</p>-->
|
|
<!-- <p class="demonstration">{{values.originEquipment}}</p>-->
|
|
@@ -181,6 +181,8 @@
|
|
:on-progress="progress"
|
|
:on-progress="progress"
|
|
:on-success="success"
|
|
:on-success="success"
|
|
:on-error="error"
|
|
:on-error="error"
|
|
|
|
+
|
|
|
|
+
|
|
accept="xlsx,xls"
|
|
accept="xlsx,xls"
|
|
>
|
|
>
|
|
<i class="el-icon-upload"/>
|
|
<i class="el-icon-upload"/>
|
|
@@ -234,16 +236,19 @@
|
|
import storage from '@/framework/utils/storage'
|
|
import storage from '@/framework/utils/storage'
|
|
import setCascader from "./setCascader";
|
|
import setCascader from "./setCascader";
|
|
import getCascader from "./getCascader";
|
|
import getCascader from "./getCascader";
|
|
- import {addSource} from "@/api/relation/api";
|
|
|
|
|
|
+ import {addSource, calcSpecial} from "@/api/relation/api";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "RelationMaintain",
|
|
name: "RelationMaintain",
|
|
props: ['values', 'isComputed', 'source', 'TableVisibleMoreLoading', 'ManualMaintenance'],
|
|
props: ['values', 'isComputed', 'source', 'TableVisibleMoreLoading', 'ManualMaintenance'],
|
|
components: {setCascader,getCascader},
|
|
components: {setCascader,getCascader},
|
|
created() {
|
|
created() {
|
|
- this.showCascader()
|
|
|
|
|
|
+ // this.showCascader()
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ console.log(this.$refs.child1, '===')
|
|
|
|
+ })
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -291,8 +296,10 @@
|
|
RelationTypeName: '',//卡片名称
|
|
RelationTypeName: '',//卡片名称
|
|
deviceGroup: [],
|
|
deviceGroup: [],
|
|
deviceValue: '',
|
|
deviceValue: '',
|
|
|
|
+ number: 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
computed: {
|
|
computed: {
|
|
...mapGetters('layout', ['projectId']),
|
|
...mapGetters('layout', ['projectId']),
|
|
headers() {
|
|
headers() {
|
|
@@ -345,24 +352,31 @@
|
|
Content: this.sourceList
|
|
Content: this.sourceList
|
|
}
|
|
}
|
|
addSource(params, res => {
|
|
addSource(params, res => {
|
|
|
|
+ ++this.number
|
|
this.$message.success('保存成功')
|
|
this.$message.success('保存成功')
|
|
})
|
|
})
|
|
this.dialogEquipment = false
|
|
this.dialogEquipment = false
|
|
},
|
|
},
|
|
- showCascader() {
|
|
|
|
- ++this.isResouceShow
|
|
|
|
- let copy = this.deepCopy(this.source)
|
|
|
|
- copy.forEach(item => {
|
|
|
|
- item.Items.forEach(child => {
|
|
|
|
- child.lId = this.list.length
|
|
|
|
- this.list.push(child)
|
|
|
|
- child.Items.forEach(i => {
|
|
|
|
- i.lId = i.Id + i.BlockId
|
|
|
|
- i.IsSource == true && this.ops.push([child.lId, i.lId])
|
|
|
|
- i.IsSource == false && this.filterOps.push([child.lId, i.lId])
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ // showCascader() {
|
|
|
|
+ // ++this.isResouceShow
|
|
|
|
+ // let copy = this.deepCopy(this.source)
|
|
|
|
+ // copy.forEach(item => {
|
|
|
|
+ // item.Items.forEach(child => {
|
|
|
|
+ // child.lId = this.list.length
|
|
|
|
+ // this.list.push(child)
|
|
|
|
+ // child.Items.forEach(i => {
|
|
|
|
+ // i.lId = i.Id + i.BlockId
|
|
|
|
+ // i.IsSource == true && this.ops.push([child.lId, i.lId])
|
|
|
|
+ // i.IsSource == false && this.filterOps.push([child.lId, i.lId])
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
|
|
+ showCascader(relation) {
|
|
|
|
+ this.RelationTypeName = relation.RelationTypeName
|
|
|
|
+ // this.$refs.getUpdate.getData()
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
downloadProject(str) {
|
|
downloadProject(str) {
|
|
let relType = this.ManualMaintenance.RelationType ? `?relType=${this.ManualMaintenance.RelationType}` : ''
|
|
let relType = this.ManualMaintenance.RelationType ? `?relType=${this.ManualMaintenance.RelationType}` : ''
|
|
@@ -371,7 +385,7 @@
|
|
if (str === 'excel') {
|
|
if (str === 'excel') {
|
|
relType = this.ManualMaintenance.RelationType ? `&relType=${this.ManualMaintenance.RelationType}` : ''
|
|
relType = this.ManualMaintenance.RelationType ? `&relType=${this.ManualMaintenance.RelationType}` : ''
|
|
// url = `/api/datacenter/graphic/export?code=对象ID${relType}${zoneType}`
|
|
// url = `/api/datacenter/graphic/export?code=对象ID${relType}${zoneType}`
|
|
- if(zoneType) {
|
|
|
|
|
|
+ if (zoneType) {
|
|
url = '/api/datacenter/graphic/export?code=对象ID' + relType + zoneType
|
|
url = '/api/datacenter/graphic/export?code=对象ID' + relType + zoneType
|
|
|
|
|
|
} else {
|
|
} else {
|
|
@@ -468,9 +482,16 @@
|
|
// this.dialogTableVisibleMore = false
|
|
// this.dialogTableVisibleMore = false
|
|
//
|
|
//
|
|
// }
|
|
// }
|
|
- this.resultOrigin.push(...this.resultEnd)
|
|
|
|
- this.$emit('openComputed', this.resultOrigin)
|
|
|
|
|
|
+ // this.resultOrigin.push(...this.resultEnd)
|
|
|
|
+ // this.$emit('openComputed', this.resultOrigin)
|
|
this.dialogTableVisibleMore = false
|
|
this.dialogTableVisibleMore = false
|
|
|
|
+ let params = {
|
|
|
|
+ ProjectId: this.projectId,
|
|
|
|
+ RelationType: this.isComputed.RelationType
|
|
|
|
+ }
|
|
|
|
+ calcSpecial(params, res => {
|
|
|
|
+ this.$message.success('计算成功')
|
|
|
|
+ })
|
|
|
|
|
|
},
|
|
},
|
|
}
|
|
}
|