修改看板

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

@ -41,14 +41,15 @@
</el-form-item>
</el-form>
<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="title">{{ i.deviceName }}</div>
<div class="switch">
<el-switch
v-model="data1"
v-model="i.deviceType==='1'"
active-color="#1165a1"
inactive-color="#1facf4">
inactive-color="#1facf4"
@change="switchChange(k)">
</el-switch>
</div>
</div>
@ -68,12 +69,9 @@
</div>
</div>
<div class="btn">
<div class="btnC" style="bottom: 55%">
<div class="btnC" style="top: 50%">
<el-button type="primary">详细信息</el-button>
</div>
<div class="btnC" style="top: 55%">
<el-button type="primary">关联关系</el-button>
</div>
</div>
</div>
@ -106,7 +104,7 @@ export default {
treeData: [],
controlList: [],
acquisitionList: [],
MonitorInfo:{}
MonitorInfo: {}
}
},
mounted() {
@ -116,6 +114,24 @@ export default {
this.setMonitorById()
},
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() {
const {data} = await treeList()
console.log(data)
@ -392,7 +408,7 @@ export default {
.btnC {
position: absolute;
left: 50%;
transform: translateX(-50%);
transform: translate(-50%,50%);
}
}
}

@ -4,10 +4,7 @@
<BoardTopNav nowMenu="1"></BoardTopNav>
<Chart ref="chart1" class="chart1"></Chart>
<div class="chart1Right">
<p style="color: #2ff;">电流互感器</p>
<p style="color: #f22;">电压互感器</p>
<p style="color: #f2f;">变压器</p>
<p style="color: #1f1;">电容电抗器</p>
<p v-for="(i,k) in chart1Data.slice(0,4)" :key="k" :style="'color:'+ chart1Color[k]">{{ i.name }}</p>
</div>
<div class="chart1Table">
<div style="background-color: #094170">
@ -128,7 +125,8 @@
{{ item.location }}
</div>
<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>
@ -301,12 +299,12 @@ export default {
series: [
{
type: "bar",
data: data.map((e, i) => {
data: data.slice(0, 4).map((e, i) => {
return {
value: parseFloat(e.percentage),
name: e.sceneName,
itemStyle: {
color: this.chart1Color[this.chart1Color.length % i]
color: this.chart1Color[i]
}
}
}),
@ -335,7 +333,7 @@ export default {
dataset: {
source: [
["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()
this.centerNum = data
},
async setTable3(){
const {rows:data} = await getAlarmInfos()
this.table1Data = data.map((e,i) => {
async setTable3() {
const {rows: data} = await getAlarmInfos()
this.table1Data = data.map((e, i) => {
return {
no: i,
no: i+1,
type: '高温警告',
location: e.monitorUnitName,
status:e.handleStatus
}
})
},
async setDeviceOperations(){
const {data:data} = await getDeviceOperations()
async setDeviceOperations() {
const {data: data} = await getDeviceOperations()
console.log(data)
let x = Object.keys(data)
let y = Object.values(data)
this.inTransitNum = y.reduce((a,b)=> {
this.inTransitNum = y.reduce((a, b) => {
return a + b
},0)
}, 0)
let option3 = {
...this.chart3Option,
@ -426,6 +424,23 @@ export default {
}
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