|
@@ -0,0 +1,823 @@
|
|
|
+/**
|
|
|
+*@author:han_yao_long
|
|
|
+*@date:2020.12.28
|
|
|
+*@info:图例
|
|
|
+*/
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class='legend-container'>
|
|
|
+ <div :class='showView===1?"legend2":"legend"' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage && legendTable.length>0'>图例</div>
|
|
|
+ <!-- 图里展示状态组件 -->
|
|
|
+ <el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage && legendTable.length>0'>
|
|
|
+ <div class='legend-tab' v-if='showView===1'>
|
|
|
+ <div class='legend-table2' v-if='systemName=="土建装饰"'>
|
|
|
+ <lengend-view @changeSwitch='handleSwich' ref='viewLengend' :systemName='systemName'></lengend-view>
|
|
|
+ </div>
|
|
|
+ <div class='legend-table' v-else>
|
|
|
+ <div>
|
|
|
+ <lengend-view @changeSwitch='handleSwich' ref='viewLengend' :systemName='systemName'></lengend-view>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-collapse-transition>
|
|
|
+ <!-- 图例编辑状态组件 -->
|
|
|
+ <el-collapse-transition>
|
|
|
+ <div v-if='showView===2'>
|
|
|
+ <lengend-edit
|
|
|
+ @changeSwitch='handleSwich'
|
|
|
+ v-if='editTable.length>0'
|
|
|
+ :loading='loading1'
|
|
|
+ ref='editLen'
|
|
|
+ :floorInfo='type=="0"?floorInfo:""'
|
|
|
+ :editTable='editTable'
|
|
|
+ @saveNum='saveNum'
|
|
|
+ :tableHeigth='tableHeigth'
|
|
|
+ ></lengend-edit>
|
|
|
+ </div>
|
|
|
+ </el-collapse-transition>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 单独展示新增分布图 -->
|
|
|
+ <el-tooltip
|
|
|
+ v-show='permissions ? permissions.includes("GLSMS_PLANARGRAPH_MANAGE"):false'
|
|
|
+ effect='dark'
|
|
|
+ v-if='floors.length==0'
|
|
|
+ content='新增分布图'
|
|
|
+ placement='left'
|
|
|
+ >
|
|
|
+ <div class='edit_map1' @click='addFloor'>
|
|
|
+ <!-- <p class='tltk' style='margin-left: -5px;'> -->
|
|
|
+ <img src='@/assets/imgs/bjj.png' alt />
|
|
|
+ <!-- </p> -->
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
+ <div class='select-floor' v-if='isFloor'>
|
|
|
+ <p class='p1'>{{`请选择需要创建"${categoryId=='FZQZL'?'分水器支路分布图':'消防泵房引出管路分布图'}"的楼层`}}</p>
|
|
|
+ <p class='p2'>
|
|
|
+ <Select width='240' tipPlace='top' v-model='floor' caption='楼层:' size='mini' :selectdata='floorSelectAble' :placeholder='"请选择"'></Select>
|
|
|
+ </p>
|
|
|
+ <p class='p3'>
|
|
|
+ <span @click='cancel'>取消</span>
|
|
|
+ <span @click='determine'>确定</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <legend-remarks @queryView='queryView' @queryMarks='queryMarks' ref='EditdMarks'></legend-remarks>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import lengendView from '@/components/viewLengend'
|
|
|
+import legendRemarks from '@/components/legendremarks'
|
|
|
+import lengendEdit from '@/components/editLengend'
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
+import bus from '@/utils/bus.js'
|
|
|
+import { queryStatis, updateStatis, queryRead, queryDraftNum } from '@/api/public.js'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'Legend',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ text1: '主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房',
|
|
|
+ text2: '图例后×的数字,代表此位置的数量',
|
|
|
+ loading: true,
|
|
|
+ loading1: true,
|
|
|
+ viewTable: [],
|
|
|
+ editTable: [],
|
|
|
+ tbData1: [],
|
|
|
+ tbData2: [],
|
|
|
+ tbData3: [],
|
|
|
+ multipleSelection: [],
|
|
|
+ editText: '',
|
|
|
+ editSwitch: false,
|
|
|
+ isFloor: false,
|
|
|
+ floorSelectAble: [],
|
|
|
+ floor: '', //传的楼层
|
|
|
+ floorName: '',
|
|
|
+ draftNum: null, //草稿箱数量, 编辑器修改icon右上角显示
|
|
|
+ interval: 10 * 60 * 1000, //定时器时长,默认 10分钟
|
|
|
+ timer: null, //保存定时器
|
|
|
+ timer1: null,
|
|
|
+ tableHeigth: 300, // 编辑图例框得高度
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters([
|
|
|
+ 'planNum',
|
|
|
+ 'typeNum',
|
|
|
+ 'remarksText',
|
|
|
+ 'plazaId',
|
|
|
+ 'fmapID',
|
|
|
+ 'floorSelect2',
|
|
|
+ 'isMessage',
|
|
|
+ 'ssoToken',
|
|
|
+ 'showView',
|
|
|
+ 'legendTable',
|
|
|
+ 'permissions',
|
|
|
+ ]),
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ floors: {
|
|
|
+ //原理图中有数据楼层
|
|
|
+ default: () => {
|
|
|
+ ;[]
|
|
|
+ },
|
|
|
+ type: Array,
|
|
|
+ },
|
|
|
+ type: {
|
|
|
+ // 原理图类型 == 0 ;
|
|
|
+ default: '1',
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ systemName: {
|
|
|
+ default: '',
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ categoryId: {
|
|
|
+ default: '',
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ editTips: {
|
|
|
+ // 编辑器文案
|
|
|
+ type: String,
|
|
|
+ default: '',
|
|
|
+ },
|
|
|
+ // 区分lengend 在外边 0 还是弹窗内部 1
|
|
|
+ innerLeng: {
|
|
|
+ type: Number,
|
|
|
+ default: 0,
|
|
|
+ },
|
|
|
+ // 弹窗组件内部传入的楼层信息
|
|
|
+ floorInfo: {
|
|
|
+ type: Object,
|
|
|
+ default() {
|
|
|
+ return {}
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ components: { lengendView, legendRemarks, lengendEdit },
|
|
|
+ watch: {
|
|
|
+ // 监听 vuex 中currentFloor的变化,切换楼层后,调用接口查询,显示右下角小红点
|
|
|
+ '$store.state.currentFloor': {
|
|
|
+ handler(newV, oldV) {
|
|
|
+ if (newV.gname !== oldV.gname) {
|
|
|
+ clearInterval(this.timer)
|
|
|
+ this.getDraftNum()
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.getDraftNum()
|
|
|
+ }, this.interval)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ '$store.state.categoryId': {
|
|
|
+ handler(newV, oldV) {
|
|
|
+ if (newV !== oldV) {
|
|
|
+ clearInterval(this.timer1)
|
|
|
+ this.getDraftNum()
|
|
|
+ this.timer1 = setInterval(() => {
|
|
|
+ this.getDraftNum()
|
|
|
+ }, this.interval)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ // 弹窗组件内传入floorInfo,查询 getDraftNum
|
|
|
+ floorInfo: {
|
|
|
+ handler(newV, oldV) {
|
|
|
+ if (newV !== oldV) {
|
|
|
+ clearInterval(this.timer)
|
|
|
+ this.getDraftNum()
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.getDraftNum()
|
|
|
+ }, this.interval)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ '$refs.viewLengend': {
|
|
|
+ handler(newV, oldV) {
|
|
|
+ this.$refs.viewLengend.setSelected()
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /**
|
|
|
+ * @name getDraftNum
|
|
|
+ * @description 查询草稿箱数量
|
|
|
+ */
|
|
|
+ async getDraftNum() {
|
|
|
+ let res = null,
|
|
|
+ floorId = this.$store.state.currentFloor.gname || this.$cookie.get('floorMapId'),
|
|
|
+ categoryId = this.categoryId || this.$cookie.get('categoryId')
|
|
|
+ // 弹窗组件内传入floorInfo,使用其楼层id
|
|
|
+ this.floorInfo.gname && (floorId = this.floorInfo.gname)
|
|
|
+ // 增加校验 floorId,防止上传 undefined
|
|
|
+ if (!floorId) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ Distinct: true,
|
|
|
+ Filters: `projectId='${this.plazaId}';isPub=false;BuildingId='1';categoryId='${categoryId}';floorId='${floorId}'`,
|
|
|
+ PageNumber: 1,
|
|
|
+ PageSize: 500,
|
|
|
+ Projection: ['floorId'],
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ // 调用接口
|
|
|
+ res = await queryDraftNum(data)
|
|
|
+ } catch (error) {
|
|
|
+ console.error(error)
|
|
|
+ }
|
|
|
+ if (!res) {
|
|
|
+ this.draftNum = null
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ // 草稿箱总条数使用 res.Total, 不使用 Content数组的长度
|
|
|
+ this.draftNum = res.Total || null
|
|
|
+ },
|
|
|
+ formatFloor() {
|
|
|
+ this.floorSelectAble = []
|
|
|
+ this.floorSelectAble = this.floorSelect2.filter((item) => {
|
|
|
+ const hit = this.floors.find((i) => i.gname == item.id)
|
|
|
+ return !hit
|
|
|
+ })
|
|
|
+ },
|
|
|
+ testClick(data) {},
|
|
|
+ // 编辑备注
|
|
|
+ legendClik() {
|
|
|
+ this.$refs.EditdMarks.showModal()
|
|
|
+ },
|
|
|
+ // 查询备注
|
|
|
+ queryMarks() {
|
|
|
+ let postParams = {
|
|
|
+ categoryId: this.categoryId ? this.categoryId : this.$cookie.get('categoryId'),
|
|
|
+ projectId: this.$store.state.plazaId,
|
|
|
+ BuildingID: '1',
|
|
|
+ Pub: true,
|
|
|
+ FloorID: this.$cookie.get('floorNow'),
|
|
|
+ }
|
|
|
+ let data = {}
|
|
|
+ queryRead({ data, postParams }).then((res) => {
|
|
|
+ // this.$store.commit('SETREMARKSTEXT', '')
|
|
|
+ if (res.data) {
|
|
|
+ let Res = res.data.Data && res.data.Data[0] ? res.data.Data[0].Note : ''
|
|
|
+ if (Res) {
|
|
|
+ this.$store.commit('SETREMARKSTEXT', Res)
|
|
|
+ } else {
|
|
|
+ let marks = ''
|
|
|
+ if (this.planNum && this.typeNum) {
|
|
|
+ marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
|
|
|
+ } else if (this.planNum) {
|
|
|
+ marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
|
|
|
+ } else if (this.typeNum) {
|
|
|
+ marks = `<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
|
|
|
+ } else {
|
|
|
+ marks = ''
|
|
|
+ }
|
|
|
+ this.$store.commit('SETREMARKSTEXT', marks)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 点击展示图例框
|
|
|
+ showTl() {
|
|
|
+ if (this.showView != 1) {
|
|
|
+ this.$store.commit('SETSHOWVIEW', 1)
|
|
|
+ setTimeout(() => {
|
|
|
+ this.setLengedHeight()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$store.commit('SETSHOWVIEW', 0)
|
|
|
+ }
|
|
|
+ this.queryView(false)
|
|
|
+ },
|
|
|
+ // 编辑图例
|
|
|
+ editTl() {
|
|
|
+ if (this.showView != 2) {
|
|
|
+ this.setLengedHeight()
|
|
|
+ this.$store.commit('SETSHOWVIEW', 2)
|
|
|
+ } else {
|
|
|
+ this.$store.commit('SETSHOWVIEW', 0)
|
|
|
+ }
|
|
|
+ this.queryEditNum(true)
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @name goToEditer
|
|
|
+ * @description 跳转editer编辑器
|
|
|
+ */
|
|
|
+ goToEditer() {
|
|
|
+ // let FloorID = this.floor ? this.floor : this.$cookie.get('floorMapId') || 'f1'
|
|
|
+ // let categoryId = this.categoryId ? this.categoryId : this.$cookie.get('categoryId')
|
|
|
+ // let floorName = this.floorName ? this.floorName : this.$cookie.get('floorNow')
|
|
|
+ // let seq = this.$cookie.get('currentFloorId')
|
|
|
+
|
|
|
+ //主页面(楼层功能,设备设置中的)legend, 楼层参数参数处理
|
|
|
+ let FloorID = this.$cookie.get('floorMapId')
|
|
|
+ let floorName = this.$cookie.get('floorNow')
|
|
|
+ let seq = this.$cookie.get('currentFloorId')
|
|
|
+ let categoryId = this.$cookie.get('categoryId') //系统
|
|
|
+
|
|
|
+ // 弹窗组件内传入floorInfo, 楼层参数处理
|
|
|
+ if (this.floorInfo.gname && !this.floor) {
|
|
|
+ FloorID = this.floorInfo.gname
|
|
|
+ floorName = this.floorInfo.code
|
|
|
+ seq = this.floorInfo.seq
|
|
|
+ categoryId = this.categoryId
|
|
|
+ }
|
|
|
+ //弹窗组件点击新增楼层,确认的楼层 楼层字段处理
|
|
|
+ if (this.floor) {
|
|
|
+ // 从store中筛选出选中的楼层信息
|
|
|
+ let floorInfo = this.$store.state.floorsArr.filter((item) => item.gname === this.floor)[0]
|
|
|
+ FloorID = this.floor
|
|
|
+ floorName = floorInfo.code
|
|
|
+ seq = floorInfo.seq
|
|
|
+ categoryId = this.categoryId
|
|
|
+ }
|
|
|
+ const { conf } = window.__systemConf
|
|
|
+ const editerUrl = conf[process.env.NODE_ENV + '_editerUrl']
|
|
|
+ if (!this.plazaId) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let data = `categoryId=${categoryId}&projectId=${this.plazaId}&BuildingID=1&FloorID=${FloorID}&FloorName=${floorName}&fmapID=${this.fmapID}&seq=${seq}&token=${this.ssoToken}`
|
|
|
+ let url = editerUrl + 'editer?' + encodeURIComponent(data)
|
|
|
+ window.open(url, 'edit')
|
|
|
+ },
|
|
|
+ handleSwich(val) {
|
|
|
+ this.queryView(!val)
|
|
|
+ },
|
|
|
+ // 默认隐藏为0的项目
|
|
|
+ handleSwich2(val) {
|
|
|
+ this.editSwitch = val
|
|
|
+ this.queryEditNum(!this.editSwitch)
|
|
|
+ },
|
|
|
+ queryViewMethods() {},
|
|
|
+ // 查询图例
|
|
|
+ queryView(flag) {
|
|
|
+ let postParams = {}
|
|
|
+ let categoryId = this.categoryId || this.$cookie.get('categoryId')
|
|
|
+ let data = {
|
|
|
+ categoryId,
|
|
|
+ graphId: this.$cookie.get('graphId'),
|
|
|
+ projectId: this.$store.state.plazaId,
|
|
|
+ flag: flag,
|
|
|
+ buildingId: '1',
|
|
|
+ floorId: this.$store.state.currentFloor.gname,
|
|
|
+ }
|
|
|
+ // 弹窗组件内传入floorInfo,使用其楼层id
|
|
|
+ this.floorInfo.gname && (data.floorId = this.floorInfo.gname)
|
|
|
+ queryStatis({ data, postParams }).then((res) => {
|
|
|
+ // this.$store.commit('SETREMARKSTEXT', '')
|
|
|
+ this.$store.commit('SETPLANNUM', '')
|
|
|
+ this.loading = false
|
|
|
+ let viewTable = []
|
|
|
+ viewTable = res.data.Data ? res.data.Data : []
|
|
|
+ this.$store.commit('SETLEGENDTABLE', viewTable)
|
|
|
+ if (viewTable.length > 0) {
|
|
|
+ viewTable.forEach((el) => {
|
|
|
+ if (el.Name == '主要设备房') {
|
|
|
+ this.$store.commit('SETPLANNUM', el.Num)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (this.remarksText) {
|
|
|
+ this.$store.commit('SETREMARKSTEXT', this.remarksText)
|
|
|
+ } else {
|
|
|
+ let marks = ''
|
|
|
+ if (this.planNum && this.typeNum) {
|
|
|
+ marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
|
|
|
+ } else if (this.planNum) {
|
|
|
+ marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
|
|
|
+ } else if (this.typeNum) {
|
|
|
+ marks = `<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
|
|
|
+ } else {
|
|
|
+ marks = ''
|
|
|
+ }
|
|
|
+ this.$store.commit('SETREMARKSTEXT', marks)
|
|
|
+ }
|
|
|
+ setTimeout(() => {
|
|
|
+ this.setLengedHeight()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.viewLengend) {
|
|
|
+ this.$refs.viewLengend.setSelected()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查询编辑状态图例
|
|
|
+ queryEditNum(flag) {
|
|
|
+ let postParams = {}
|
|
|
+ let categoryId = this.categoryId || this.$cookie.get('categoryId')
|
|
|
+ let data = {
|
|
|
+ categoryId,
|
|
|
+ graphId: this.$cookie.get('graphId'),
|
|
|
+ projectId: this.$store.state.plazaId,
|
|
|
+ flag: flag,
|
|
|
+ buildingId: '1',
|
|
|
+ floorId: this.$store.state.currentFloor.gname,
|
|
|
+ }
|
|
|
+ // 弹窗组件内传入floorInfo,使用其楼层id
|
|
|
+ this.floorInfo.gname && (data.floorId = this.floorInfo.gname)
|
|
|
+ queryStatis({ data, postParams }).then((res) => {
|
|
|
+ this.loading1 = false
|
|
|
+ this.editTable = res.data.Data ? res.data.Data : []
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 编辑数量
|
|
|
+ queryEdit(val) {
|
|
|
+ let arr = []
|
|
|
+ if (val.length > 0) {
|
|
|
+ val.forEach((e) => {
|
|
|
+ let obj = {
|
|
|
+ BuildingId: '1',
|
|
|
+ Num: Number(e.Num),
|
|
|
+ GraphElementId: e.GraphElementId,
|
|
|
+ FloorId: this.$cookie.get('floorMapId'),
|
|
|
+ ProjectId: e.ProjectId,
|
|
|
+ CategoryId: e.GraphCategoryId,
|
|
|
+ }
|
|
|
+ arr.push(obj)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ postParams: {
|
|
|
+ Content: arr,
|
|
|
+ },
|
|
|
+ }
|
|
|
+ updateStatis(params)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.Result == 'success') {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ this.$store.commit('SETSHOWVIEW', 1)
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: '操作失败',
|
|
|
+ type: 'error',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error',
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ saveNum(val) {
|
|
|
+ if (val.length > 0) {
|
|
|
+ val.forEach((element) => {
|
|
|
+ element.Modify = element.IsModify
|
|
|
+ })
|
|
|
+ this.queryEdit(val)
|
|
|
+ this.$store.commit('SETSHOWVIEW', 1)
|
|
|
+ this.handleSwich(true)
|
|
|
+ } else {
|
|
|
+ this.$store.commit('SETSHOWVIEW', 1)
|
|
|
+ this.handleSwich(true)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ addFloor() {
|
|
|
+ this.isFloor = true
|
|
|
+ this.formatFloor()
|
|
|
+ },
|
|
|
+ // 新增楼层取消
|
|
|
+ cancel() {
|
|
|
+ this.isFloor = false
|
|
|
+ },
|
|
|
+ // 新增楼层确定
|
|
|
+ determine() {
|
|
|
+ this.isFloor = false
|
|
|
+ this.goToEditer()
|
|
|
+ },
|
|
|
+ queryRemarksMethods() {},
|
|
|
+ init() {
|
|
|
+ // 图例
|
|
|
+ bus.$off('queryViewMethods') //解决触发多次监听
|
|
|
+ bus.$on('queryViewMethods', () => {
|
|
|
+ this.queryView(false)
|
|
|
+ })
|
|
|
+ // 备注
|
|
|
+ bus.$off('queryRemarksMethods')
|
|
|
+ bus.$on('queryRemarksMethods', (res) => {
|
|
|
+ // this.$store.commit('SETREMARKSTEXT', '')
|
|
|
+ if (res) {
|
|
|
+ this.$store.commit('SETREMARKSTEXT', res)
|
|
|
+ } else {
|
|
|
+ let marks = ''
|
|
|
+ if (this.planNum && this.typeNum) {
|
|
|
+ marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
|
|
|
+ } else if (this.planNum) {
|
|
|
+ marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
|
|
|
+ } else if (this.typeNum) {
|
|
|
+ marks = `<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
|
|
|
+ } else {
|
|
|
+ marks = ''
|
|
|
+ }
|
|
|
+ this.$store.commit('SETREMARKSTEXT', marks)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 设置图例整体高度
|
|
|
+ setLengedHeight() {
|
|
|
+ let dom = document.getElementsByClassName('legend-table')[0]
|
|
|
+ if (!dom) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (window.screen.height > 1000) {
|
|
|
+ dom.style.maxHeight = '768px'
|
|
|
+ this.tableHeigth = '500px'
|
|
|
+ } else {
|
|
|
+ dom.style.maxHeight = '434px'
|
|
|
+ this.tableHeigth = '334px'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.init()
|
|
|
+ // 定时查询草稿箱数量
|
|
|
+ this.getDraftNum() //首次查询
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.getDraftNum()
|
|
|
+ }, this.interval)
|
|
|
+ // 页面销毁前,清除定时器
|
|
|
+ this.$once('hook:beforeDestroy', () => {
|
|
|
+ clearInterval(this.timer)
|
|
|
+ })
|
|
|
+ // 设置图例最大高度
|
|
|
+ this.setLengedHeight()
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+@red: rgb(255, 0, 0); //红色
|
|
|
+.legend-container {
|
|
|
+ position: relative;
|
|
|
+ // top: -23px;
|
|
|
+ .legend {
|
|
|
+ text-align: center;
|
|
|
+ line-height: 44px;
|
|
|
+ width: 44px;
|
|
|
+ height: 44px;
|
|
|
+ font-size: 14px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ font-family: MicrosoftYaHei;
|
|
|
+ color: rgba(2, 91, 170, 1);
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ .legend2 {
|
|
|
+ text-align: center;
|
|
|
+ line-height: 44px;
|
|
|
+ cursor: pointer;
|
|
|
+ width: 44px;
|
|
|
+ height: 44px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
|
|
|
+ border-radius: 2px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: MicrosoftYaHei;
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ .legend-tab {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ right: 47px;
|
|
|
+ .legend-table {
|
|
|
+ padding: 16px;
|
|
|
+ width: 385px;
|
|
|
+ max-height: 700px;
|
|
|
+ overflow: auto;
|
|
|
+ overflow-y: auto;
|
|
|
+ position: relative;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
|
|
|
+ border-radius: 2px;
|
|
|
+ border: 1px solid rgba(228, 229, 231, 1);
|
|
|
+ &::-webkit-scrollbar {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .legend-table2 {
|
|
|
+ padding: 16px;
|
|
|
+ // height: 356px;
|
|
|
+ max-height: 700px;
|
|
|
+ width: 385px;
|
|
|
+ // width: 420px;
|
|
|
+ overflow: auto;
|
|
|
+ overflow: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ position: relative;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
|
|
|
+ border-radius: 2px;
|
|
|
+ border: 1px solid rgba(228, 229, 231, 1);
|
|
|
+ &::-webkit-scrollbar {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.edit_map {
|
|
|
+ position: fixed;
|
|
|
+ bottom: 28px;
|
|
|
+ z-index: 1;
|
|
|
+ right: 28px;
|
|
|
+ .edit-icon,
|
|
|
+ .edit-icon2 {
|
|
|
+ width: 48px;
|
|
|
+ height: 48px;
|
|
|
+ background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
|
|
|
+ box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.2);
|
|
|
+ border-radius: 50%;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 48px;
|
|
|
+ display: inline-block;
|
|
|
+ img {
|
|
|
+ line-height: 48px;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin-top: -4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .edit-icon {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ /** 右下角修改,角标样式 */
|
|
|
+ .corner-con {
|
|
|
+ position: relative;
|
|
|
+ .corner {
|
|
|
+ position: absolute;
|
|
|
+ right: 3px;
|
|
|
+ top: 3px;
|
|
|
+ display: inline-block;
|
|
|
+ width: 8px;
|
|
|
+ height: 8px;
|
|
|
+ background: @red;
|
|
|
+ border-radius: 90px;
|
|
|
+ font-size: 12px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 18px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .bjtk {
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ display: inline-block;
|
|
|
+ text-align: center;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ box-shadow: 0px 2px 15px 0px rgba(31, 36, 41, 0.08);
|
|
|
+ border-radius: 90px;
|
|
|
+ line-height: 40px;
|
|
|
+ font-size: 12px;
|
|
|
+ margin: 0 auto;
|
|
|
+ cursor: pointer;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ margin-left: 4px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ margin-top: 10px;
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .tltk {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: none;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .tltk-1 {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: none;
|
|
|
+ cursor: pointer;
|
|
|
+ border: 1px solid #eee;
|
|
|
+ }
|
|
|
+ .tltk-1 {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: none;
|
|
|
+ cursor: pointer;
|
|
|
+ border: 1px solid #eee;
|
|
|
+ }
|
|
|
+}
|
|
|
+.edit_map:hover .tltk {
|
|
|
+ margin-left: -10px;
|
|
|
+ right: 22px;
|
|
|
+ z-index: 1;
|
|
|
+ width: 48px;
|
|
|
+ height: 48px;
|
|
|
+ background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
|
|
|
+ box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.2);
|
|
|
+ border-radius: 90px;
|
|
|
+ text-align: center;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.edit_map:hover .tltk-1 {
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.edit_map:hover .bjtk {
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.edit_map1 {
|
|
|
+ position: fixed;
|
|
|
+ bottom: 28px;
|
|
|
+ right: 30px;
|
|
|
+ z-index: 1;
|
|
|
+ width: 48px;
|
|
|
+ height: 48px;
|
|
|
+ background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
|
|
|
+ box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.2);
|
|
|
+ border-radius: 90px;
|
|
|
+ text-align: center;
|
|
|
+ img {
|
|
|
+ display: block;
|
|
|
+ margin-top: 12px;
|
|
|
+ margin-left: 12px;
|
|
|
+ }
|
|
|
+ .select-floor {
|
|
|
+ width: 288px;
|
|
|
+ height: 220px;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
|
|
|
+ border-radius: 2px;
|
|
|
+ border: 1px solid rgba(228, 229, 231, 1);
|
|
|
+ position: relative;
|
|
|
+ right: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+.select-floor {
|
|
|
+ width: 288px;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
|
|
|
+ border-radius: 2px;
|
|
|
+ border: 1px solid rgba(228, 229, 231, 1);
|
|
|
+ position: fixed;
|
|
|
+ bottom: 26px;
|
|
|
+ right: 84px;
|
|
|
+ padding: 24px 24px 20px 24px;
|
|
|
+ .p1 {
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: MicrosoftYaHei;
|
|
|
+ color: rgba(31, 36, 41, 1);
|
|
|
+ line-height: 19px;
|
|
|
+ }
|
|
|
+ .p2 {
|
|
|
+ margin-top: 8px;
|
|
|
+ margin-bottom: 68px;
|
|
|
+ }
|
|
|
+ .p3 {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: MicrosoftYaHei;
|
|
|
+ line-height: 22px;
|
|
|
+ text-align: center;
|
|
|
+ span:nth-of-type(1) {
|
|
|
+ width: 58px;
|
|
|
+ height: 24px;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ border: 1px solid rgba(195, 199, 203, 1);
|
|
|
+ margin-right: 12px;
|
|
|
+ border-radius: 2px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ span:nth-of-type(2) {
|
|
|
+ width: 58px;
|
|
|
+ height: 24px;
|
|
|
+ background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
|
|
|
+ border-radius: 2px;
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ border-radius: 2px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+@media screen and (max-width: 1600px) {
|
|
|
+ .legend-container .legend-tab .legend-table {
|
|
|
+ max-height: 546px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+<style lang="less">
|
|
|
+.legend-container {
|
|
|
+ .el-table thead {
|
|
|
+ background: rgba(2, 91, 170, 0.1);
|
|
|
+ }
|
|
|
+ .el-table td,
|
|
|
+ .el-table th {
|
|
|
+ padding: 3px 0;
|
|
|
+ }
|
|
|
+ .el-checkbox__input.is-checked .el-checkbox__inner,
|
|
|
+ .el-checkbox__input.is-indeterminate .el-checkbox__inner {
|
|
|
+ background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
|
|
|
+ border-radius: 2px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|