pull/163/head
parent
376808563f
commit
c87d0560ac
|
@ -12,6 +12,10 @@
|
|||
<img src="../../assets/manageImg/manage-btn-icon1.png" alt="">
|
||||
控制器
|
||||
</div>
|
||||
<div class="manage-btn" @click="active = 2" :class="active == 2 ? 'active' : ''">
|
||||
<img src="../../assets/manageImg/manage-btn-icon1.png" alt="">
|
||||
智能控制器
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-view" v-if="active == 0">
|
||||
<el-table :data="tableData" :row-class-name="tableRowClassName" height="620" style="width: 100%">
|
||||
|
@ -40,7 +44,8 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="table-view" v-else>
|
||||
|
||||
<div class="table-view" v-else-if="active==1">
|
||||
<el-table :data="tableData1" :row-class-name="tableRowClassName" height="620" style="width: 100%">
|
||||
<!-- <el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
|
@ -64,7 +69,30 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="table-view" v-else-if="active==2">
|
||||
<el-table :data="tableData2" :row-class-name="tableRowClassName" height="620" style="width: 100%">
|
||||
<!-- <el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
<div>{{scope.$index+1 }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="deviceId" label="设备code码">
|
||||
</el-table-column>
|
||||
<el-table-column prop="deviceTypeName" label="设备名称">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div class="table-flex">
|
||||
<div class="table-operate blue" @click="openModel1(scope.row, scope.$index)">
|
||||
<img src="../../assets/manageImg/table-edit.png" alt="">编辑
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-dialog title="提示" top="10vh" :visible.sync="addModel" width="700px" class="vrcode-model manage-model"
|
||||
:append-to-body="true">
|
||||
<div class="vrcode-model-title">
|
||||
|
@ -283,6 +311,7 @@ export default {
|
|||
active: 0,
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
addModel: false,
|
||||
addModel1: false,
|
||||
changeName: false,
|
||||
|
@ -298,12 +327,15 @@ export default {
|
|||
this.api.selUserbyid(user.userid).then(res => {
|
||||
this.tableData = []
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
if (res.data.code == 200) {
|
||||
res.data.data.devices.forEach((el, index) => {
|
||||
if (el.deviceName == 10) {
|
||||
this.tableData1.push(el)
|
||||
} else if (el.deviceName == 1) {
|
||||
this.tableData.push(el)
|
||||
} else if (el.deviceName == 20) {
|
||||
this.tableData2.push(el)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -154,7 +154,10 @@ export default {
|
|||
},
|
||||
|
||||
deviceType:'',
|
||||
deviceSel: [{ label: '控制器', value: 10, }, { label: '施肥机', value: 1, }, { label: '气象站', value:30, }],
|
||||
deviceSel: [{ label: '控制器', value: 10, },
|
||||
{ label: '施肥机', value: 1, },
|
||||
{ label: '气象站', value:30, },
|
||||
{ label: '智能灌溉控制器', value:20, }],
|
||||
}
|
||||
},
|
||||
mounted() { this.dataInit() },
|
||||
|
|
|
@ -225,7 +225,10 @@ export default {
|
|||
typeSelList: [{ label: '管理员', value: 1, }, { label: '用户', value: 2, }],
|
||||
|
||||
deviceType:'',
|
||||
deviceSel: [{ label: '控制器', value: 10, }, { label: '施肥机', value: 1, }, { label: '气象站', value:30, }],
|
||||
deviceSel: [{ label: '控制器', value: 10, },
|
||||
{ label: '施肥机', value: 1, },
|
||||
{ label: '气象站', value:30, },
|
||||
{ label: '智能灌溉控制器', value:20, }],
|
||||
}
|
||||
},
|
||||
mounted() { this.dataInit() },
|
||||
|
|
|
@ -99,7 +99,7 @@ export default {
|
|||
this.tableData = res.data.data.equipments
|
||||
this.typeSelList=[]
|
||||
res.data.data.devices.forEach((el,index)=>{
|
||||
if(el.deviceName==10){
|
||||
if(el.deviceName!=30){
|
||||
this.typeSelList.push(el)
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue