|
@@ -11,7 +11,7 @@
|
|
|
<div class="firstsearch">
|
|
<div class="firstsearch">
|
|
|
<span class="biaoti">设备ID或名称</span>
|
|
<span class="biaoti">设备ID或名称</span>
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="queryInfo.f_id"
|
|
|
|
|
|
|
+ v-model="queryInfo.fId"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
placeholder="请输入设备ID或名称"
|
|
placeholder="请输入设备ID或名称"
|
|
|
></el-input>
|
|
></el-input>
|
|
@@ -56,16 +56,16 @@
|
|
|
width="250"
|
|
width="250"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">{{
|
|
<template slot-scope="scope">{{
|
|
|
- scope.row.device_name == "" ? "无" : scope.row.device_name
|
|
|
|
|
|
|
+ scope.row.deviceName == "" ? "无" : scope.row.deviceName
|
|
|
}}</template>
|
|
}}</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="imei" label="设备ID" width="180">
|
|
|
|
|
- <template slot-scope="scope">{{ scope.row.imei }}</template>
|
|
|
|
|
|
|
+ <el-table-column prop="deviceAddr" label="设备ID" width="180">
|
|
|
|
|
+ <template slot-scope="scope">{{ scope.row.deviceAddr }}</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="is_online" label="在线状态">
|
|
|
|
|
|
|
+ <el-table-column prop="isOnline" label="在线状态">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <p style="color: #17bb89" v-if="scope.row.is_online == 1">在线</p>
|
|
|
|
|
- <p style="color: #eb6765" v-if="scope.row.is_online == 0">离线</p>
|
|
|
|
|
|
|
+ <p style="color: #17bb89" v-if="scope.row.isOnline == 1">在线</p>
|
|
|
|
|
+ <p style="color: #eb6765" v-if="scope.row.isOnline == 0">离线</p>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="address" label="位置" width="280">
|
|
<el-table-column prop="address" label="位置" width="280">
|
|
@@ -78,20 +78,20 @@
|
|
|
(scope.row.uptime * 1000) | formatTime
|
|
(scope.row.uptime * 1000) | formatTime
|
|
|
}}</template>
|
|
}}</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="250">
|
|
|
|
|
|
|
+ <el-table-column label="操作" width="180">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span
|
|
<span
|
|
|
style="color: #4f71ff; margin-right: 15px; cursor: pointer"
|
|
style="color: #4f71ff; margin-right: 15px; cursor: pointer"
|
|
|
- @click="viewImage(scope.row.imei, scope.row.d_id)"
|
|
|
|
|
|
|
+ @click="viewImage(scope.row.deviceAddr, scope.row.d_id)"
|
|
|
>查看图片</span
|
|
>查看图片</span
|
|
|
>
|
|
>
|
|
|
- <span
|
|
|
|
|
|
|
+ <!--<span
|
|
|
style="color: #4f71ff; margin-right: 15px; cursor: pointer"
|
|
style="color: #4f71ff; margin-right: 15px; cursor: pointer"
|
|
|
@click="
|
|
@click="
|
|
|
- equipSet(scope.row.d_id, scope.row.imei, scope.row.device_name)
|
|
|
|
|
|
|
+ equipSet(scope.row.d_id, scope.row.deviceAddr, scope.row.deviceName)
|
|
|
"
|
|
"
|
|
|
>设备控制</span
|
|
>设备控制</span
|
|
|
- >
|
|
|
|
|
|
|
+ >-->
|
|
|
<span
|
|
<span
|
|
|
style="color: #4f71ff; margin-right: 15px; cursor: pointer"
|
|
style="color: #4f71ff; margin-right: 15px; cursor: pointer"
|
|
|
@click="dataDetail(scope.row)"
|
|
@click="dataDetail(scope.row)"
|
|
@@ -140,7 +140,7 @@
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="载玻片滴液时间(s): " prop="drop_time">
|
|
|
|
|
|
|
+ <!--<el-form-item label="载玻片滴液时间(s): " prop="drop_time">
|
|
|
<el-select v-model="setFrom.drop_time">
|
|
<el-select v-model="setFrom.drop_time">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in 30"
|
|
v-for="item in 30"
|
|
@@ -149,12 +149,12 @@
|
|
|
:value="item"
|
|
:value="item"
|
|
|
></el-option>
|
|
></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="孢子培养时间(h): " prop="cul_time">
|
|
|
|
|
|
|
+ </el-form-item>-->
|
|
|
|
|
+ <el-form-item label="工作时长(h): " prop="cul_time">
|
|
|
<div class="sliderParent">
|
|
<div class="sliderParent">
|
|
|
<div class="block">
|
|
<div class="block">
|
|
|
<el-slider
|
|
<el-slider
|
|
|
- v-model="setFrom.cul_time"
|
|
|
|
|
|
|
+ v-model="setFrom.workhour"
|
|
|
show-input
|
|
show-input
|
|
|
:min="1"
|
|
:min="1"
|
|
|
:max="24"
|
|
:max="24"
|
|
@@ -162,23 +162,23 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="保温仓设定温度(℃): " prop="set_temp">
|
|
|
|
|
|
|
+ <el-form-item label="采样时长(h): " prop="set_temp">
|
|
|
<div class="sliderParent">
|
|
<div class="sliderParent">
|
|
|
<div class="block">
|
|
<div class="block">
|
|
|
<el-slider
|
|
<el-slider
|
|
|
- v-model="setFrom.set_temp"
|
|
|
|
|
|
|
+ v-model="setFrom.samplinghour"
|
|
|
show-input
|
|
show-input
|
|
|
- :min="10"
|
|
|
|
|
- :max="40"
|
|
|
|
|
|
|
+ :min="1"
|
|
|
|
|
+ :max="24"
|
|
|
></el-slider>
|
|
></el-slider>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="数据上传时间间隔(min): " prop="datt">
|
|
|
|
|
|
|
+ <el-form-item label="工作间隔(min): " prop="datt">
|
|
|
<div class="sliderParent">
|
|
<div class="sliderParent">
|
|
|
<div class="block">
|
|
<div class="block">
|
|
|
<el-slider
|
|
<el-slider
|
|
|
- v-model="setFrom.datt"
|
|
|
|
|
|
|
+ v-model="setFrom.workintervalminute"
|
|
|
show-input
|
|
show-input
|
|
|
:min="10"
|
|
:min="10"
|
|
|
:max="60"
|
|
:max="60"
|
|
@@ -186,7 +186,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="采集开启和关闭时间: ">
|
|
|
|
|
|
|
+ <!--<el-form-item label="采集开启和关闭时间: ">
|
|
|
<div class="timeSet">
|
|
<div class="timeSet">
|
|
|
<el-time-select
|
|
<el-time-select
|
|
|
size="mini"
|
|
size="mini"
|
|
@@ -261,7 +261,7 @@
|
|
|
}"
|
|
}"
|
|
|
></el-time-select>
|
|
></el-time-select>
|
|
|
</div>
|
|
</div>
|
|
|
- </el-form-item>
|
|
|
|
|
|
|
+ </el-form-item>-->
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button size="mini" @click="setDialogVisible = false"
|
|
<el-button size="mini" @click="setDialogVisible = false"
|
|
@@ -305,7 +305,7 @@ export default {
|
|
|
page_size: "10",
|
|
page_size: "10",
|
|
|
page: "1",
|
|
page: "1",
|
|
|
is_online: "",
|
|
is_online: "",
|
|
|
- f_id: "",
|
|
|
|
|
|
|
+ fId: "",
|
|
|
pagekey:1
|
|
pagekey:1
|
|
|
},
|
|
},
|
|
|
options: [
|
|
options: [
|
|
@@ -329,6 +329,7 @@ export default {
|
|
|
equipInfo: {},
|
|
equipInfo: {},
|
|
|
totalNum: 0,
|
|
totalNum: 0,
|
|
|
setFrom: {
|
|
setFrom: {
|
|
|
|
|
+ deviceName: "",
|
|
|
drop_time: "1", //载玻片滴液时间
|
|
drop_time: "1", //载玻片滴液时间
|
|
|
imgres: "0", //图片上传分辨率
|
|
imgres: "0", //图片上传分辨率
|
|
|
cul_time: 0, //孢子培养时间
|
|
cul_time: 0, //孢子培养时间
|
|
@@ -353,7 +354,7 @@ export default {
|
|
|
//方法集合
|
|
//方法集合
|
|
|
methods: {
|
|
methods: {
|
|
|
//获取设备列表
|
|
//获取设备列表
|
|
|
- getEquipList() {
|
|
|
|
|
|
|
+ /*getEquipList() {
|
|
|
this.$axios({
|
|
this.$axios({
|
|
|
method: "POST",
|
|
method: "POST",
|
|
|
url: "/api/api_gateway?method=forecast.worm_lamp.lamp_list",
|
|
url: "/api/api_gateway?method=forecast.worm_lamp.lamp_list",
|
|
@@ -399,6 +400,47 @@ export default {
|
|
|
// "末页";
|
|
// "末页";
|
|
|
// });
|
|
// });
|
|
|
});
|
|
});
|
|
|
|
|
+ },*/
|
|
|
|
|
+ getEquipList() {
|
|
|
|
|
+ this.$axios({
|
|
|
|
|
+ method: "POST",
|
|
|
|
|
+ url: "/baoziyi/page",
|
|
|
|
|
+ data: this.qs.stringify({
|
|
|
|
|
+ fId: this.queryInfo.fId,
|
|
|
|
|
+ isOnline: this.queryInfo.is_online,
|
|
|
|
|
+ limit: this.queryInfo.page_size,
|
|
|
|
|
+ page: this.queryInfo.page
|
|
|
|
|
+ }),
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.data.code == 0) {
|
|
|
|
|
+ // 列表数据
|
|
|
|
|
+ this.equipList = res.data.data.list;
|
|
|
|
|
+ // insectVal
|
|
|
|
|
+ for (var i = 0; i < this.equipList.length; i++) {
|
|
|
|
|
+ if (this.equipList[i].disable == 0) {
|
|
|
|
|
+ // 禁用
|
|
|
|
|
+ this.equipList[i].insectVal = "禁用";
|
|
|
|
|
+ } else if (this.equipList[i].disable == 1) {
|
|
|
|
|
+ // 识别
|
|
|
|
|
+ this.equipList[i].insectVal = "识别";
|
|
|
|
|
+ } else if (this.equipList[i].disable == 2) {
|
|
|
|
|
+ // 计数
|
|
|
|
|
+ this.equipList[i].insectVal = "计数";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 数据数量
|
|
|
|
|
+ this.equipList.insectVal = this.totalNum = res.data.data.total;
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ var data = res.data.data.list;
|
|
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
|
|
+ if (data[i].disable == "2") {
|
|
|
|
|
+ console.log(data[i].deviceAddr + "这是计数");
|
|
|
|
|
+ } else if (data[i].disable == "1") {
|
|
|
|
|
+ console.log(data[i].deviceAddr + "这是带识别的");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
handleSizeChange(e) {
|
|
handleSizeChange(e) {
|
|
|
this.queryInfo.page_size = e;
|
|
this.queryInfo.page_size = e;
|
|
@@ -457,12 +499,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.$axios({
|
|
this.$axios({
|
|
|
method: "POST",
|
|
method: "POST",
|
|
|
- url: "/api/api_gateway?method=forecast.send_control.device_control",
|
|
|
|
|
|
|
+ url: "/baoziyi/updateautomode",
|
|
|
data: this.qs.stringify({
|
|
data: this.qs.stringify({
|
|
|
- device_type_id: 7,
|
|
|
|
|
- d_id: this.d_id,
|
|
|
|
|
- config: JSON.stringify(this.setFrom),
|
|
|
|
|
- device_name:this.equipInfo.device_name
|
|
|
|
|
|
|
+ workhour: this.setFrom.workhour,
|
|
|
|
|
+ samplinghour: this.setFrom.samplinghour,
|
|
|
|
|
+ workintervalminute: this.setFrom.workintervalminute,
|
|
|
|
|
+ deviceAddr: this.equipInfo.device_id
|
|
|
}),
|
|
}),
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
if (res.data.message == "") {
|
|
if (res.data.message == "") {
|
|
@@ -483,22 +525,28 @@ export default {
|
|
|
this.equipInfo = { device_id, device_name };
|
|
this.equipInfo = { device_id, device_name };
|
|
|
this.$axios({
|
|
this.$axios({
|
|
|
method: "POST",
|
|
method: "POST",
|
|
|
- url: "/api/api_gateway?method=forecast.send_control.device_control_info",
|
|
|
|
|
|
|
+ url: "/baoziyi/deviceconfig",
|
|
|
data: this.qs.stringify({ d_id, cmd: "paramconf" }),
|
|
data: this.qs.stringify({ d_id, cmd: "paramconf" }),
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
if (res.data.data && Object.keys(res.data.data).length > 0) {
|
|
if (res.data.data && Object.keys(res.data.data).length > 0) {
|
|
|
let data = res.data.data;
|
|
let data = res.data.data;
|
|
|
|
|
+ console.log(222,data)
|
|
|
// this.setFrom = data;
|
|
// this.setFrom = data;
|
|
|
var obj = {};
|
|
var obj = {};
|
|
|
- obj["cold_sw"] = parseInt(data.cold_sw);
|
|
|
|
|
- obj["cul_time"] = parseInt(data.cul_time);
|
|
|
|
|
- obj["drop_time"] = parseInt(data.drop_time);
|
|
|
|
|
|
|
+ /*obj["workhour"] = parseInt(data.workhour);
|
|
|
|
|
+ obj["samplinghour"] = parseInt(data.samplinghour);
|
|
|
|
|
+ obj["workintervalminute"] = parseInt(data.workintervalminute);
|
|
|
obj["on_off"] = parseInt(data.on_off);
|
|
obj["on_off"] = parseInt(data.on_off);
|
|
|
obj["set_temp"] = parseInt(data.set_temp);
|
|
obj["set_temp"] = parseInt(data.set_temp);
|
|
|
obj["datt"] = parseInt(data.datt);
|
|
obj["datt"] = parseInt(data.datt);
|
|
|
obj["coll_time"] = data.coll_time;
|
|
obj["coll_time"] = data.coll_time;
|
|
|
- obj["admin"] = data.admin;
|
|
|
|
|
- this.setFrom = obj;
|
|
|
|
|
|
|
+ obj["admin"] = data.admin;*/
|
|
|
|
|
+ this.setFrom.deviceAddr = this.equipInfo.device_id;
|
|
|
|
|
+ this.setFrom.deviceName = this.equipInfo.device_name;
|
|
|
|
|
+ this.setFrom.workhour = parseInt(data.workhour);
|
|
|
|
|
+ this.setFrom.samplinghour = parseInt(data.samplinghour);
|
|
|
|
|
+ this.setFrom.workintervalminute = parseInt(data.workintervalminute);
|
|
|
|
|
+ console.log(123,this.setFrom)
|
|
|
|
|
|
|
|
let { coll_time } = this.setFrom;
|
|
let { coll_time } = this.setFrom;
|
|
|
for (let i in coll_time) {
|
|
for (let i in coll_time) {
|
|
@@ -550,12 +598,13 @@ export default {
|
|
|
// 数据详情
|
|
// 数据详情
|
|
|
//数据详情
|
|
//数据详情
|
|
|
dataDetail(data) {
|
|
dataDetail(data) {
|
|
|
- this.itemId = data.device_id;
|
|
|
|
|
|
|
+ this.itemId = data.deviceAddr;
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
path: `/index/dataDetail/${data.imei}/${data.d_id}`,
|
|
path: `/index/dataDetail/${data.imei}/${data.d_id}`,
|
|
|
query: {
|
|
query: {
|
|
|
|
|
+ deviceAddr: data.deviceAddr,
|
|
|
address: data.address,
|
|
address: data.address,
|
|
|
- name: data.device_name,
|
|
|
|
|
|
|
+ name: data.deviceName,
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -688,4 +737,4 @@ export default {
|
|
|
/deep/.el-slider__bar {
|
|
/deep/.el-slider__bar {
|
|
|
background-color: #4f71ff !important;
|
|
background-color: #4f71ff !important;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|