|
@@ -10,13 +10,19 @@
|
|
|
<el-collapse-transition>
|
|
|
<div class='legend-tab' v-if='show'>
|
|
|
<div class='legend-table'>
|
|
|
- <lengend-view :tableData='tableData' @changeSwitch='handleSwich'></lengend-view>
|
|
|
+ <lengend-view
|
|
|
+ v-if='viewTable.length>=0'
|
|
|
+ :loading='loading'
|
|
|
+ :viewTable='viewTable'
|
|
|
+ @changeSwitch='handleSwich'
|
|
|
+ :editChange='editChange'
|
|
|
+ ></lengend-view>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-collapse-transition>
|
|
|
<el-collapse-transition>
|
|
|
<div v-if='show2'>
|
|
|
- <lengend-edit ref='editLen' @cance='cance' :tableData='tableData'></lengend-edit>
|
|
|
+ <lengend-edit v-if='editTable.length>=0' :loading='loading1' ref='editLen' @saveNum='saveNum' @cance='cance' :editText='editText'></lengend-edit>
|
|
|
</div>
|
|
|
</el-collapse-transition>
|
|
|
<edit-list></edit-list>
|
|
@@ -38,7 +44,7 @@
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
- <remarks ref='EditdMarks'></remarks>
|
|
|
+ <remarks ref='EditdMarks' @editChange='editChange'></remarks>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -47,7 +53,7 @@ import editList from '@/components/edit.vue'
|
|
|
import lengendView from '@/components/viewLengend'
|
|
|
import Remarks from '@/components/legendremarks'
|
|
|
import lengendEdit from '@/components/editLengend'
|
|
|
-
|
|
|
+import { queryStatis, updateStatis } from '@/api/public.js'
|
|
|
export default {
|
|
|
name: 'Legend',
|
|
|
data() {
|
|
@@ -61,119 +67,32 @@ export default {
|
|
|
{ id: 'test3', name: '下级分项' },
|
|
|
{ id: 'test4', name: '滑动平均滑动平均' }
|
|
|
],
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '1',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '5',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '5',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '2',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '3',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '4',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '5',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '2',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '3',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '4',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '3',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '2',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '3',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '4',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- },
|
|
|
- {
|
|
|
- project: '建筑面积',
|
|
|
- num: '3',
|
|
|
- type: '㎡',
|
|
|
- lege: '---'
|
|
|
- }
|
|
|
- ],
|
|
|
+ loading: false,
|
|
|
+ loading1: false,
|
|
|
+ viewTable: [],
|
|
|
+ editTable: [],
|
|
|
tbData1: [],
|
|
|
tbData2: [],
|
|
|
tbData3: [],
|
|
|
multipleSelection: [],
|
|
|
- testModel: ['test3']
|
|
|
+ editText: ''
|
|
|
}
|
|
|
},
|
|
|
components: { editList, lengendView, Remarks, lengendEdit },
|
|
|
methods: {
|
|
|
- testClick(data) {
|
|
|
- console.log(data)
|
|
|
- },
|
|
|
+ testClick(data) {},
|
|
|
legendClik() {
|
|
|
this.$refs.EditdMarks.showModal()
|
|
|
},
|
|
|
+ editChange(val) {
|
|
|
+ this.editText = val
|
|
|
+ },
|
|
|
showTl() {
|
|
|
this.show = !this.show
|
|
|
if (this.show) {
|
|
|
this.show2 = false
|
|
|
}
|
|
|
+ this.queryView(true)
|
|
|
},
|
|
|
cance() {
|
|
|
this.show2 = false
|
|
@@ -183,14 +102,39 @@ export default {
|
|
|
this.show2 = true
|
|
|
},
|
|
|
handleSwich(val) {
|
|
|
- console.log(val)
|
|
|
+ this.queryView(val)
|
|
|
+ },
|
|
|
+ // 查询图例
|
|
|
+ queryView(flag) {
|
|
|
+ let postParams = {}
|
|
|
+ if (flag) {
|
|
|
+ postParams.Filters = "graphId='1';projectId='1';Num!=0"
|
|
|
+ } else {
|
|
|
+ postParams.Filters = "graphId='1';projectId='1'"
|
|
|
+ }
|
|
|
+ let data = {}
|
|
|
+ queryStatis({ data, postParams }).then(res => {
|
|
|
+ this.loading = false
|
|
|
+ this.loading1 = false
|
|
|
+ console.log('图例', res)
|
|
|
+ this.viewTable = res.data.Content
|
|
|
+ this.editTable = res.data.Content
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 编辑数量
|
|
|
+ queryEdit(val) {
|
|
|
+ let postParams = {
|
|
|
+ Content: val
|
|
|
+ }
|
|
|
+ updateStatis({ postParams }).then(res => {
|
|
|
+ console.log('编辑', res)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ saveNum(val) {
|
|
|
+ this.queryEdit(val)
|
|
|
}
|
|
|
},
|
|
|
- watch: {
|
|
|
- testModel(n, o) {
|
|
|
- console.log(n, o)
|
|
|
- }
|
|
|
- }
|
|
|
+ mounted() {}
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
@@ -198,7 +142,6 @@ export default {
|
|
|
position: relative;
|
|
|
top: -13px;
|
|
|
.legend {
|
|
|
- // padding: 12px 8px;
|
|
|
text-align: center;
|
|
|
line-height: 44px;
|
|
|
width: 44px;
|
|
@@ -206,7 +149,9 @@ export default {
|
|
|
font-size: 14px;
|
|
|
font-family: MicrosoftYaHei;
|
|
|
color: rgba(2, 91, 170, 1);
|
|
|
- background: #ffffff;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ box-shadow: 0px 2px 15px 0px rgba(31, 36, 41, 0.08);
|
|
|
+ border-radius: 2px;
|
|
|
cursor: pointer;
|
|
|
line-height: 44px;
|
|
|
text-align: center;
|
|
@@ -214,8 +159,6 @@ export default {
|
|
|
|
|
|
.legend-tab {
|
|
|
position: absolute;
|
|
|
- // width: 600px;
|
|
|
- // height: 500px;
|
|
|
top: 0;
|
|
|
right: 44px;
|
|
|
.legend-table {
|
|
@@ -223,7 +166,6 @@ export default {
|
|
|
padding-left: 16px;
|
|
|
padding-right: 16px;
|
|
|
width: 420px;
|
|
|
- // height: 546px;
|
|
|
background: rgba(255, 255, 255, 1);
|
|
|
box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
|
|
|
border-radius: 2px;
|
|
@@ -235,7 +177,7 @@ export default {
|
|
|
position: fixed;
|
|
|
bottom: 28px;
|
|
|
right: 28px;
|
|
|
- z-index: 2;
|
|
|
+ z-index: 1;
|
|
|
.edit-icon {
|
|
|
width: 48px;
|
|
|
height: 48px;
|
|
@@ -246,15 +188,11 @@ export default {
|
|
|
line-height: 48px;
|
|
|
display: inline-block;
|
|
|
cursor: pointer;
|
|
|
- // &:hover + .hover-div {
|
|
|
- // display: block;
|
|
|
- // }
|
|
|
}
|
|
|
.hover-div {
|
|
|
position: absolute;
|
|
|
bottom: 58px;
|
|
|
right: 28px;
|
|
|
- // display: none;
|
|
|
.icon1 {
|
|
|
width: 40px;
|
|
|
height: 40px;
|
|
@@ -294,7 +232,7 @@ export default {
|
|
|
}
|
|
|
.el-table td,
|
|
|
.el-table th {
|
|
|
- padding: 5px 0;
|
|
|
+ padding: 6px 0;
|
|
|
}
|
|
|
}
|
|
|
</style>
|