|
|
@@ -21,95 +21,31 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- is-horizontal-resize
|
|
|
- :default-sort="{prop: 'date', order: 'descending'}"
|
|
|
- v-loading="loading"
|
|
|
- element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
- class=""
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- stripe
|
|
|
- ref="multipleTable"
|
|
|
- @row-click="handle"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- type="selection"
|
|
|
- width="55">
|
|
|
+ <el-table :data="tableData" is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
|
|
|
+ v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.8)" class=""
|
|
|
+ @selection-change="handleSelectionChange" stripe ref="multipleTable" @row-click="handle">
|
|
|
+ <el-table-column type="selection" width="55">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- type="index"
|
|
|
- label="序号"
|
|
|
- width="60"
|
|
|
- sortable
|
|
|
- >
|
|
|
+ <el-table-column type="index" label="序号" width="60" sortable>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="Name"
|
|
|
- label="区域名称"
|
|
|
- >
|
|
|
+ <el-table-column prop="Name" label="区域名称">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="Description"
|
|
|
- label="描述"
|
|
|
- >
|
|
|
+ <el-table-column prop="Description" label="描述">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="X"
|
|
|
- label="长/m"
|
|
|
- sortable
|
|
|
- >
|
|
|
+ <el-table-column prop="X" label="长/m" sortable>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="Y"
|
|
|
- label="宽/m"
|
|
|
- sortable
|
|
|
- >
|
|
|
+ <el-table-column prop="Y" label="宽/m" sortable>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="CreateTime"
|
|
|
- label="添加时间"
|
|
|
- :formatter="filterTime"
|
|
|
- sortable
|
|
|
- >
|
|
|
+ <el-table-column prop="CreateTime" label="添加时间" :formatter="filterTime" sortable>
|
|
|
</el-table-column>
|
|
|
- <!--<el-table-column-->
|
|
|
- <!--prop="Status"-->
|
|
|
- <!--label="状态"-->
|
|
|
- <!-->-->
|
|
|
- <!--</el-table-column>-->
|
|
|
-
|
|
|
- <!--<el-table-column-->
|
|
|
- <!--prop="address"-->
|
|
|
- <!--label="操作记录"-->
|
|
|
- <!--width="220"-->
|
|
|
- <!-->-->
|
|
|
- <!--<template slot-scope="scope">-->
|
|
|
- <!--<!–<el-button class="" type="text" @click="goPhoneRecord(scope.row)">手机信号记录</el-button>–>-->
|
|
|
- <!--<!–<el-button class="" type="primary" size="small" @click="goWifiRecord(scope.row)">监测记录</el-button>–>-->
|
|
|
- <!--<!–<el-button v-if="scope.row.Status == 1" class="yellow" type="text" @click="pauseRow(scope.row)">禁用–>-->
|
|
|
- <!--<!–</el-button>–>-->
|
|
|
- <!--<!–<el-button v-if="scope.row.Status == 0" class="green" type="text" @click="runRow(scope.row)">启用–>-->
|
|
|
- <!--<!–</el-button>–>-->
|
|
|
- <!--</template>-->
|
|
|
- <!--</el-table-column>-->
|
|
|
</el-table>
|
|
|
<br>
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- :total="pageination.total"
|
|
|
- :page-size="pageination.pageItem"
|
|
|
- @current-change="pageChange"
|
|
|
- ></el-pagination>
|
|
|
+ <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
|
|
|
+ @current-change="pageChange"></el-pagination>
|
|
|
|
|
|
<!--<el-button class="down_btn" type="primary" @click="goPoster(scope.row)">下载驱动器todo</el-button>-->
|
|
|
- <dialog_referrer_list
|
|
|
- :show="dialog_state"
|
|
|
- :title="dialog_title"
|
|
|
- :large="true"
|
|
|
- @dialog_cancel="dialog_cancel"
|
|
|
- @dialog_ok="dialog_ok"
|
|
|
- >
|
|
|
+ <dialog_referrer_list :show="dialog_state" :title="dialog_title" :large="true" @dialog_cancel="dialog_cancel"
|
|
|
+ @dialog_ok="dialog_ok">
|
|
|
<div class="dialogContent">
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="24">
|
|
|
@@ -159,6 +95,7 @@
|
|
|
RegionListDetail,
|
|
|
RegionDelete,
|
|
|
RegionAdd,
|
|
|
+ RegionEdit,
|
|
|
} from '../api/getApiRes.js'
|
|
|
|
|
|
let qs = require('qs');
|
|
|
@@ -179,7 +116,7 @@
|
|
|
},
|
|
|
tabIndex: 0,
|
|
|
tabs: [
|
|
|
- {name: '监控区域管理', url: 'equip'},
|
|
|
+ { name: '监控区域管理', url: 'equip' },
|
|
|
],
|
|
|
// panel 配置项目
|
|
|
panel: {
|
|
|
@@ -194,9 +131,9 @@
|
|
|
regionidOptions: [],
|
|
|
regionidOptions2: [],
|
|
|
options: [
|
|
|
- {value: 99, label: '全部'},
|
|
|
- {value: 1, label: '进行中'},
|
|
|
- {value: 2, label: '已完成'},
|
|
|
+ { value: 99, label: '全部' },
|
|
|
+ { value: 1, label: '进行中' },
|
|
|
+ { value: 2, label: '已完成' },
|
|
|
],
|
|
|
time1: globalBt3(2),
|
|
|
},
|
|
|
@@ -277,7 +214,7 @@
|
|
|
return false
|
|
|
}
|
|
|
that.panel.regionidOptions = json.Rs;
|
|
|
- that.panel.regionidOptions.unshift({Id: 0, Name: "全部", DisplayName: "全部"});
|
|
|
+ that.panel.regionidOptions.unshift({ Id: 0, Name: "全部", DisplayName: "全部" });
|
|
|
} else {
|
|
|
that.$message.error(json.Memo + ',错误代码:' + json.Code);
|
|
|
}
|
|
|
@@ -334,7 +271,7 @@
|
|
|
},
|
|
|
// 跳转tab页面
|
|
|
goTab(url) {
|
|
|
- this.$router.push({path: url});
|
|
|
+ this.$router.push({ path: url });
|
|
|
},
|
|
|
// 查询按钮
|
|
|
query() {
|
|
|
@@ -477,7 +414,13 @@
|
|
|
|
|
|
// 读取本条记录
|
|
|
let row = this.multipleSelection[0];
|
|
|
+ console.log(row);
|
|
|
+
|
|
|
this.dialog.eqId = row.Id;
|
|
|
+ this.dialog.name = row.Name;
|
|
|
+ this.dialog.x = row.X;
|
|
|
+ this.dialog.y = row.Y;
|
|
|
+ this.dialog.description = row.Description;
|
|
|
this.dialog.mac = row.Mac;
|
|
|
this.dialog.regionId = row.RegionId;
|
|
|
this.dialog.tagname = row.TagName;
|
|
|
@@ -495,7 +438,7 @@
|
|
|
// 重载地区列表
|
|
|
this.getGeFullRegionSelect();
|
|
|
|
|
|
- that.dialog.points = [{x: row.X, y: row.Y}];
|
|
|
+ that.dialog.points = [{ x: row.X, y: row.Y }];
|
|
|
|
|
|
// let param = {
|
|
|
// token: localStorage.token,
|
|
|
@@ -535,11 +478,11 @@
|
|
|
this.$router.push({
|
|
|
path: '/phoneSign',
|
|
|
query:
|
|
|
- {
|
|
|
- detectorid: row.Id,
|
|
|
- comId: 1,
|
|
|
- regionId: row.RegionId,
|
|
|
- }
|
|
|
+ {
|
|
|
+ detectorid: row.Id,
|
|
|
+ comId: 1,
|
|
|
+ regionId: row.RegionId,
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
// 探测记录
|
|
|
@@ -547,11 +490,11 @@
|
|
|
this.$router.push({
|
|
|
path: '/wifiSign',
|
|
|
query:
|
|
|
- {
|
|
|
- detectorid: row.Id,
|
|
|
- comId: 1,
|
|
|
- regionId: row.RegionId,
|
|
|
- }
|
|
|
+ {
|
|
|
+ detectorid: row.Id,
|
|
|
+ comId: 1,
|
|
|
+ regionId: row.RegionId,
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
dialog_cancel() {
|
|
|
@@ -614,44 +557,42 @@
|
|
|
confirmEditEquip() {
|
|
|
let that = this;
|
|
|
// checkVal
|
|
|
- if (!that.dialog.tagname) {
|
|
|
- this.$message.error('错了哦,标签名不能为空');
|
|
|
+ // checkVal
|
|
|
+ if (!that.dialog.name) {
|
|
|
+ this.$message.error('错了哦,区域名称不能为空');
|
|
|
return false
|
|
|
}
|
|
|
- if (that.dialog.tagname.length > 20) {
|
|
|
- this.$message.error('错了哦,标签名不能超过20个字符');
|
|
|
+ if (that.dialog.name.length > 8) {
|
|
|
+ this.$message.error('错了哦,标签名不能超过8个字符');
|
|
|
return false
|
|
|
}
|
|
|
- this.selectRegionLabel(that.dialog.regionId);
|
|
|
+ if (that.dialog.memo) {
|
|
|
+ if (that.dialog.memo.length > 20) {
|
|
|
+ this.$message.error('错了哦,描述不能超过20个字符');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // this.selectRegionLabel(that.dialog.regionId);
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
id: that.dialog.eqId,
|
|
|
mac: that.dialog.mac,
|
|
|
comId: 1,
|
|
|
regionId: that.dialog.regionId,
|
|
|
- name: that.dialog.tagname,
|
|
|
- HardwareVersion: that.dialog.HardwareVersion,
|
|
|
- FirmwareVersion: that.dialog.FirmwareVersion,
|
|
|
- FirmwareScanM4Version: that.dialog.FirmwareScanM4Version,
|
|
|
- FirmwareScanM0Version: that.dialog.FirmwareScanM0Version,
|
|
|
- location: that.dialog.location,
|
|
|
- purchasesrc: that.dialog.purchasesrc,
|
|
|
- x: that.dialog.points[0].x,
|
|
|
- y: that.dialog.points[0].y,
|
|
|
- coords_memo: that.dialog.coords_memo,
|
|
|
- memo: that.dialog.memo,
|
|
|
- coordsType: 1,//坐标状态 0:禁用, 1:启用, 9:删除,没有就传0
|
|
|
- coordsID: that.dialog.CoordsId,
|
|
|
+ name: that.dialog.name,
|
|
|
+ description: that.dialog.description,
|
|
|
+ x: that.dialog.x,
|
|
|
+ y: that.dialog.y,
|
|
|
status: that.dialog.status,
|
|
|
};
|
|
|
|
|
|
let postdata = qs.stringify(param);
|
|
|
- DetectorEdit(postdata).then(res => {
|
|
|
+ RegionEdit(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
that.$message({
|
|
|
showClose: true,
|
|
|
- message: '监控区域添加成功!',
|
|
|
+ message: '监控区域修改成功!',
|
|
|
type: 'success'
|
|
|
});
|
|
|
// 重载列表
|
|
|
@@ -740,24 +681,24 @@
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- // 添加探测器位置的点坐标
|
|
|
- addPoint(e) {
|
|
|
- let x = e.offsetX;
|
|
|
- let y = e.offsetY;
|
|
|
- this.dialog.points = [{x: x, y: y}];
|
|
|
- },
|
|
|
+ // // 添加探测器位置的点坐标
|
|
|
+ // addPoint(e) {
|
|
|
+ // let x = e.offsetX;
|
|
|
+ // let y = e.offsetY;
|
|
|
+ // this.dialog.points = [{ x: x, y: y }];
|
|
|
+ // },
|
|
|
// 获取位置的文字内容
|
|
|
- selectRegionLabel(id) {
|
|
|
- let that = this;
|
|
|
- let selectedWorkName = {};
|
|
|
- // selectedWorkName = that.dialog.regionIdRoomOptions.filter(item => {
|
|
|
- selectedWorkName = that.dialog.regionlevelOneIdOptions.filter(item => {
|
|
|
- if (item.Id === id) {
|
|
|
- console.log(item.Name);
|
|
|
- that.dialog.location = item.Name;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ // selectRegionLabel(id) {
|
|
|
+ // let that = this;
|
|
|
+ // let selectedWorkName = {};
|
|
|
+ // // selectedWorkName = that.dialog.regionIdRoomOptions.filter(item => {
|
|
|
+ // selectedWorkName = that.dialog.regionlevelOneIdOptions.filter(item => {
|
|
|
+ // if (item.Id === id) {
|
|
|
+ // console.log(item.Name);
|
|
|
+ // that.dialog.location = item.Name;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // },
|
|
|
filterTime(val, row, column) {
|
|
|
return nonTfmtDate(column, 10);
|
|
|
}
|
|
|
@@ -876,4 +817,4 @@
|
|
|
.yellow {
|
|
|
color: #fd0;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|