修改看板

dev
夜笙歌 1 year ago
parent 9d92c8c968
commit 71d7663982

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 13 KiB

@ -42,8 +42,9 @@
class="scrollTable"> class="scrollTable">
{{ item.value3 }} {{ item.value3 }}
</div> </div>
<div class="scrollTable"> <div class="scrollTable" style="width: 25%">
<el-button size="mini" type="primary">处理</el-button> <el-button v-if="item.status === '0'" size="mini" type="primary" @click="dispose"></el-button>
<span v-else></span>
</div> </div>
</div> </div>
</div> </div>
@ -143,6 +144,23 @@ export default {
this.setElectronicNumVo() this.setElectronicNumVo()
}, },
methods: { methods: {
dispose() {
this.$confirm('该问题已处理?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '已处理!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
createMap() { createMap() {
map = new AMap.Map('map', { map = new AMap.Map('map', {
zoom: 11, zoom: 11,
@ -233,6 +251,7 @@ export default {
value1: i, value1: i,
value2: '高温预警', value2: '高温预警',
value3: e.monitorUnitName, value3: e.monitorUnitName,
status:e.handleStatus
} }
}) })
}, },

@ -41,14 +41,15 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="terminalList"> <div class="terminalList">
<div v-for="i in controlList" class="item"> <div v-for="(i,k) in controlList" class="item">
<div class="icon"></div> <div class="icon"></div>
<div class="title">{{ i.deviceName }}</div> <div class="title">{{ i.deviceName }}</div>
<div class="switch"> <div class="switch">
<el-switch <el-switch
v-model="data1" v-model="i.deviceType==='1'"
active-color="#1165a1" active-color="#1165a1"
inactive-color="#1facf4"> inactive-color="#1facf4"
@change="switchChange(k)">
</el-switch> </el-switch>
</div> </div>
</div> </div>
@ -68,12 +69,9 @@
</div> </div>
</div> </div>
<div class="btn"> <div class="btn">
<div class="btnC" style="bottom: 55%"> <div class="btnC" style="top: 50%">
<el-button type="primary">详细信息</el-button> <el-button type="primary">详细信息</el-button>
</div> </div>
<div class="btnC" style="top: 55%">
<el-button type="primary">关联关系</el-button>
</div>
</div> </div>
</div> </div>
@ -106,7 +104,7 @@ export default {
treeData: [], treeData: [],
controlList: [], controlList: [],
acquisitionList: [], acquisitionList: [],
MonitorInfo:{} MonitorInfo: {}
} }
}, },
mounted() { mounted() {
@ -116,6 +114,24 @@ export default {
this.setMonitorById() this.setMonitorById()
}, },
methods: { methods: {
switchChange(e) {
this.$confirm((this.controlList[e].deviceType === '1' ? '关闭' : '开启')+'该设备?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '成功!'
});
this.controlList[e].deviceType === '1' ? this.controlList[e].deviceType = '0' : this.controlList[e].deviceType = '1'
}).catch(() => {
this.$message({
type: 'info',
message: '取消'
});
});
},
async getTree() { async getTree() {
const {data} = await treeList() const {data} = await treeList()
console.log(data) console.log(data)
@ -392,7 +408,7 @@ export default {
.btnC { .btnC {
position: absolute; position: absolute;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translate(-50%,50%);
} }
} }
} }

@ -4,10 +4,7 @@
<BoardTopNav nowMenu="1"></BoardTopNav> <BoardTopNav nowMenu="1"></BoardTopNav>
<Chart ref="chart1" class="chart1"></Chart> <Chart ref="chart1" class="chart1"></Chart>
<div class="chart1Right"> <div class="chart1Right">
<p style="color: #2ff;">电流互感器</p> <p v-for="(i,k) in chart1Data.slice(0,4)" :key="k" :style="'color:'+ chart1Color[k]">{{ i.name }}</p>
<p style="color: #f22;">电压互感器</p>
<p style="color: #f2f;">变压器</p>
<p style="color: #1f1;">电容电抗器</p>
</div> </div>
<div class="chart1Table"> <div class="chart1Table">
<div style="background-color: #094170"> <div style="background-color: #094170">
@ -128,7 +125,8 @@
{{ item.location }} {{ item.location }}
</div> </div>
<div class="scrollTable" style="width: 25%"> <div class="scrollTable" style="width: 25%">
<el-button size="mini" type="primary">操作</el-button> <el-button v-if="item.status === '0'" size="mini" type="primary" @click="dispose"></el-button>
<span v-else></span>
</div> </div>
</div> </div>
</div> </div>
@ -301,12 +299,12 @@ export default {
series: [ series: [
{ {
type: "bar", type: "bar",
data: data.map((e, i) => { data: data.slice(0, 4).map((e, i) => {
return { return {
value: parseFloat(e.percentage), value: parseFloat(e.percentage),
name: e.sceneName, name: e.sceneName,
itemStyle: { itemStyle: {
color: this.chart1Color[this.chart1Color.length % i] color: this.chart1Color[i]
} }
} }
}), }),
@ -335,7 +333,7 @@ export default {
dataset: { dataset: {
source: [ source: [
["group", "占比"], ["group", "占比"],
...data.map(e => [e.deviceModeName, parseFloat(e.percentage)]) ...data.slice(0, 7).map(e => [e.deviceModeName, parseFloat(e.percentage)])
], ],
} }
} }
@ -352,25 +350,25 @@ export default {
const data = await allNums() const data = await allNums()
this.centerNum = data this.centerNum = data
}, },
async setTable3(){ async setTable3() {
const {rows:data} = await getAlarmInfos() const {rows: data} = await getAlarmInfos()
this.table1Data = data.map((e,i) => { this.table1Data = data.map((e, i) => {
return { return {
no: i, no: i+1,
type: '高温警告', type: '高温警告',
location: e.monitorUnitName, location: e.monitorUnitName,
status:e.handleStatus
} }
}) })
}, },
async setDeviceOperations(){ async setDeviceOperations() {
const {data:data} = await getDeviceOperations() const {data: data} = await getDeviceOperations()
console.log(data) console.log(data)
let x = Object.keys(data) let x = Object.keys(data)
let y = Object.values(data) let y = Object.values(data)
this.inTransitNum = y.reduce((a,b)=> { this.inTransitNum = y.reduce((a, b) => {
return a + b return a + b
},0) }, 0)
let option3 = { let option3 = {
...this.chart3Option, ...this.chart3Option,
@ -426,6 +424,23 @@ export default {
} }
this.$refs.chart3.setData(option3) this.$refs.chart3.setData(option3)
}, },
dispose() {
this.$confirm('该问题已处理?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '已处理!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
}
} }
} }
; ;

Loading…
Cancel
Save