|
|
@@ -50,33 +50,45 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="Xmax"
|
|
|
+ prop="Description"
|
|
|
+ label="描述"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="X"
|
|
|
label="长/m"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="Ymax"
|
|
|
+ prop="Y"
|
|
|
label="宽/m"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="Memo"
|
|
|
- label="备注"
|
|
|
+ prop="CreateTime"
|
|
|
+ label="添加时间"
|
|
|
+ :formatter="filterTime"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<!--<el-table-column-->
|
|
|
- <!--prop="address"-->
|
|
|
- <!--label="操作记录"-->
|
|
|
- <!--width="220"-->
|
|
|
+ <!--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>-->
|
|
|
+ <!--<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>
|
|
|
@@ -117,7 +129,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<label>
|
|
|
- 备注
|
|
|
+ 描述
|
|
|
</label>
|
|
|
<el-input v-model="dialog.description" type="textarea"></el-input>
|
|
|
</el-col>
|
|
|
@@ -141,6 +153,9 @@
|
|
|
DetectorEdit,
|
|
|
GetDetectorCoords,
|
|
|
GeFullRegionSelect,
|
|
|
+ RegionListDetail,
|
|
|
+ RegionDelete,
|
|
|
+ RegionAdd,
|
|
|
} from '../api/getApiRes.js'
|
|
|
|
|
|
let qs = require('qs');
|
|
|
@@ -152,26 +167,11 @@
|
|
|
dialog_title: '',
|
|
|
dialog_type: '',//类型,1是添加,2是修改
|
|
|
dialog: {
|
|
|
- mac: '',
|
|
|
- comId: 1,
|
|
|
- regionlevelOneId: 0,
|
|
|
- regionId: 0,
|
|
|
- tagname: '',
|
|
|
- longitude: 0,
|
|
|
- latitude: 0,
|
|
|
- HardwareVersion: '',
|
|
|
- FirmwareVersion: '',
|
|
|
- FirmwareScanM4Version: '',
|
|
|
- FirmwareScanM0Version: '',
|
|
|
- purchasesrc: '',
|
|
|
- location: '',
|
|
|
- coords_memo: '',
|
|
|
- memo: '',
|
|
|
- plateImgSrc: '',
|
|
|
- regionlevelOneIdOptions: [],
|
|
|
- regionIdRoomOptions: [],
|
|
|
- points: [],
|
|
|
- CoordsId: 0,
|
|
|
+ name: '',
|
|
|
+ description: '',
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ pic: '',
|
|
|
status: 0,
|
|
|
},
|
|
|
tabIndex: 0,
|
|
|
@@ -217,11 +217,6 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- if (this.$route.query.RegionId) {
|
|
|
- this.panel.regionid = this.$route.query.RegionId;
|
|
|
- this.panel.tagname = this.$route.query.TagName;
|
|
|
- }
|
|
|
-
|
|
|
this.getTableQuery();
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -245,7 +240,7 @@
|
|
|
tableMax: 9999,//
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- RegionList(postdata).then(res => {
|
|
|
+ RegionListDetail(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
that.loading = false;
|
|
|
@@ -397,26 +392,16 @@
|
|
|
this.dialog_title = '添加监控区域';
|
|
|
this.dialog_type = 1;
|
|
|
|
|
|
- // 重载地区列表
|
|
|
- this.getGeFullRegionSelect();
|
|
|
+ // // 重载地区列表
|
|
|
+ // this.getGeFullRegionSelect();
|
|
|
|
|
|
// clear dialog
|
|
|
- this.dialog.mac = '';
|
|
|
- this.dialog.regionId = '';
|
|
|
- this.dialog.tagname = '';
|
|
|
- this.dialog.HardwareVersion = '';
|
|
|
- this.dialog.FirmwareVersion = '';
|
|
|
- this.dialog.FirmwareScanM4Version = '';
|
|
|
- this.dialog.FirmwareScanM0Version = '';
|
|
|
- this.dialog.location = '';
|
|
|
- this.dialog.purchasesrc = '';
|
|
|
- this.dialog.memo = '';
|
|
|
- this.dialog.coords_memo = '';
|
|
|
- this.dialog.points = [{}];
|
|
|
-
|
|
|
- // 加载默认的平面图
|
|
|
- // this.dialogGetGetChildRegionSelect(0, 1);
|
|
|
- this.dialoggetGeFullRegionSelect()
|
|
|
+ this.dialog.name = '';
|
|
|
+ this.dialog.x = 0;
|
|
|
+ this.dialog.y = 0;
|
|
|
+ this.dialog.description = "";
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
delList() {
|
|
|
let that = this;
|
|
|
@@ -433,8 +418,7 @@
|
|
|
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- detectorid: detectorid,
|
|
|
- status: 9,//0禁用1启用9删除
|
|
|
+ id: detectorid,
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
|
|
|
@@ -443,7 +427,7 @@
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- DetectorEditStatus(postdata).then(res => {
|
|
|
+ RegionDelete(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
that.$message({
|
|
|
@@ -582,46 +566,31 @@
|
|
|
confirmAddEquip() {
|
|
|
let that = this;
|
|
|
// checkVal
|
|
|
- if (!that.dialog.mac) {
|
|
|
- this.$message.error('错了哦,mac不能为空');
|
|
|
- return false
|
|
|
- }
|
|
|
- if (!checkMac(that.dialog.mac)) {
|
|
|
- this.$message.error('错了哦,mac格式不正确');
|
|
|
- return false
|
|
|
- }
|
|
|
- if (!that.dialog.regionId) {
|
|
|
- this.$message.error('错了哦,所属区域不能为空');
|
|
|
+ if (!that.dialog.name) {
|
|
|
+ this.$message.error('错了哦,区域名称不能为空');
|
|
|
return false
|
|
|
}
|
|
|
- if (!that.dialog.tagname) {
|
|
|
- this.$message.error('错了哦,标签名不能为空');
|
|
|
+ if (that.dialog.name.length > 8) {
|
|
|
+ this.$message.error('错了哦,标签名不能超过8个字符');
|
|
|
return false
|
|
|
}
|
|
|
- if (that.dialog.tagname.length > 20) {
|
|
|
- this.$message.error('错了哦,标签名不能超过20个字符');
|
|
|
- return false
|
|
|
+ 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,
|
|
|
- mac: that.dialog.mac,
|
|
|
- comId: 1,
|
|
|
+ name: that.dialog.name,
|
|
|
+ description: that.dialog.description,
|
|
|
+ x: that.dialog.x,
|
|
|
+ y: that.dialog.y,
|
|
|
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,
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- DetectorAdd(postdata).then(res => {
|
|
|
+ RegionAdd(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
that.$message({
|
|
|
@@ -642,19 +611,6 @@
|
|
|
confirmEditEquip() {
|
|
|
let that = this;
|
|
|
// checkVal
|
|
|
- if (!that.dialog.mac) {
|
|
|
- this.$message.error('错了哦,mac不能为空');
|
|
|
- return false
|
|
|
- }
|
|
|
- if (!checkMac(that.dialog.mac)) {
|
|
|
- this.$message.error('错了哦,mac格式不正确');
|
|
|
- return false
|
|
|
- }
|
|
|
-
|
|
|
- if (!that.dialog.regionId) {
|
|
|
- this.$message.error('错了哦,所属区域不能为空');
|
|
|
- return false
|
|
|
- }
|
|
|
if (!that.dialog.tagname) {
|
|
|
this.$message.error('错了哦,标签名不能为空');
|
|
|
return false
|