|
|
|
@ -2,11 +2,23 @@
|
|
|
|
|
<div class="deviceInformation">
|
|
|
|
|
<div class="deviceBox">
|
|
|
|
|
<div class="deviceBtnGroup">
|
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click.native.stop="handleAdddevice()" >新增</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
@click.native.stop="handleAdddevice()"
|
|
|
|
|
>新增</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="deviceTable">
|
|
|
|
|
<el-table ref="multipleTable" :data="deviceTableData" tooltip-effect="dark" style="width: 100%"
|
|
|
|
|
height="calc(100% - 40px)" @selection-change="handleSelectionChange" @row-click="handleRowClick">
|
|
|
|
|
<el-table
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
:data="deviceTableData"
|
|
|
|
|
tooltip-effect="dark"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
height="calc(100% - 40px)"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
@row-click="handleRowClick"
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-table-column type="index" width="55"> </el-table-column>
|
|
|
|
|
<el-table-column type="selection" width="55"> </el-table-column> -->
|
|
|
|
|
<el-table-column label="单位" show-overflow-tooltip>
|
|
|
|
@ -15,40 +27,76 @@
|
|
|
|
|
<el-table-column label="时间表类型" show-overflow-tooltip>
|
|
|
|
|
<template>时间表类型</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="startTime" label="开始时间" show-overflow-tooltip ></el-table-column>
|
|
|
|
|
<el-table-column prop="endTime" label="结束时间" show-overflow-tooltip ></el-table-column>
|
|
|
|
|
<el-table-column prop="span" label="间隔(分)" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column prop="remark" label="备注" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="startTime"
|
|
|
|
|
label="开始时间"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="endTime"
|
|
|
|
|
label="结束时间"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="span"
|
|
|
|
|
label="间隔(分)"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="remark"
|
|
|
|
|
label="备注"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column fixed="right" label="操作" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button @click.native.stop="handleResive(scope.row)" type="text" >修改</el-button>
|
|
|
|
|
<el-button type="text" class="deleteText" @click.native.stop="handleDelete(scope.row)">删除</el-button>
|
|
|
|
|
<el-button type="text" @click.native.stop="handleSet(scope.row)">设置</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
@click.native.stop="handleResive(scope.row)"
|
|
|
|
|
type="text"
|
|
|
|
|
>修改</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
class="deleteText"
|
|
|
|
|
@click.native.stop="handleDelete(scope.row)"
|
|
|
|
|
>删除</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="text" @click.native.stop="handleSet(scope.row)"
|
|
|
|
|
>设置</el-button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<div class="pageNation">
|
|
|
|
|
<el-pagination @current-change="handleCurrentChange" :current-page="page" :page-size="pageSize"
|
|
|
|
|
layout=" prev, pager, next, jumper,total" :total="total" background >
|
|
|
|
|
<el-pagination
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
:current-page="page"
|
|
|
|
|
:page-size="pageSize"
|
|
|
|
|
layout=" prev, pager, next, jumper,total"
|
|
|
|
|
:total="total"
|
|
|
|
|
background
|
|
|
|
|
>
|
|
|
|
|
</el-pagination>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 新增时间表 -->
|
|
|
|
|
<adddeviceDialog :title="title" ref="adddeviceDialogref" ></adddeviceDialog>
|
|
|
|
|
<adddeviceDialog :title="title" ref="adddeviceDialogref"></adddeviceDialog>
|
|
|
|
|
<!-- 设置时间表 -->
|
|
|
|
|
<setdevice ref="setdeviceDialogref" ></setdevice>
|
|
|
|
|
<setdevice ref="setdeviceDialogref"></setdevice>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { getScheduleRulelListJoggle,deleteScheduleRulel } from "@/utils/api/index";
|
|
|
|
|
import {
|
|
|
|
|
getScheduleRulelListJoggle,
|
|
|
|
|
deleteScheduleRulel,
|
|
|
|
|
} from "@/utils/api/index";
|
|
|
|
|
import adddeviceDialog from "./components/adddeviceDialog.vue";
|
|
|
|
|
import setdevice from './components/setdevice.vue';
|
|
|
|
|
import setdevice from "./components/setdevice.vue";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
adddeviceDialog,
|
|
|
|
|
setdevice
|
|
|
|
|
setdevice,
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -68,11 +116,11 @@ export default {
|
|
|
|
|
deviceList() {
|
|
|
|
|
getScheduleRulelListJoggle({
|
|
|
|
|
pageindex: this.page,
|
|
|
|
|
pagesize: this.pageSize
|
|
|
|
|
pagesize: this.pageSize,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.deviceTableData = res.data.list;
|
|
|
|
|
this.total = res.data.total
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
@ -88,26 +136,26 @@ export default {
|
|
|
|
|
// 新建
|
|
|
|
|
handleAdddevice() {
|
|
|
|
|
this.title = "新增";
|
|
|
|
|
this.$refs.adddeviceDialogref.display()
|
|
|
|
|
this.$refs.adddeviceDialogref.getdataform(null)
|
|
|
|
|
this.$refs.adddeviceDialogref.display();
|
|
|
|
|
this.$refs.adddeviceDialogref.getdataform(null);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//修改
|
|
|
|
|
handleResive(data) {
|
|
|
|
|
this.title = "修改";
|
|
|
|
|
this.$refs.adddeviceDialogref.display()
|
|
|
|
|
this.$refs.adddeviceDialogref.getdataform(data)
|
|
|
|
|
this.$refs.adddeviceDialogref.display();
|
|
|
|
|
this.$refs.adddeviceDialogref.getdataform(data);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//设置
|
|
|
|
|
handleSet(data){
|
|
|
|
|
this.$refs.setdeviceDialogref.display()
|
|
|
|
|
this.$refs.setdeviceDialogref.getdataform(data)
|
|
|
|
|
handleSet(data) {
|
|
|
|
|
this.$refs.setdeviceDialogref.display();
|
|
|
|
|
this.$refs.setdeviceDialogref.getdataform(data);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//删除数据
|
|
|
|
|
handleDelete(data) {
|
|
|
|
|
let deleteArr=[]
|
|
|
|
|
let deleteArr = [];
|
|
|
|
|
deleteArr.push({
|
|
|
|
|
id: data.id,
|
|
|
|
|
});
|
|
|
|
@ -131,7 +179,7 @@ export default {
|
|
|
|
|
this.page = val;
|
|
|
|
|
this.deviceList();
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less">
|
|
|
|
@ -154,8 +202,8 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deviceTable {
|
|
|
|
|
padding: 16px 8px 0 8px;
|
|
|
|
|
height: calc(100% - 80px);
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
height: calc(100% - 48px);
|
|
|
|
|
//background: #fcc;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|