|
@@ -3,91 +3,126 @@
|
|
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
<el-breadcrumb-item>孢子仪</el-breadcrumb-item>
|
|
<el-breadcrumb-item>孢子仪</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
</el-breadcrumb>
|
|
|
- <search-bar @fun="getDisplayType" @fun2="getIDName" @fun3="getIsOnline"></search-bar>
|
|
|
|
|
- <template v-if="displayType==1">
|
|
|
|
|
- <el-row :gutter="10">
|
|
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6" v-for="item in equipList" :key="item.id">
|
|
|
|
|
- <el-card class="box-card">
|
|
|
|
|
- <equip-item :is_online="item.device_status">
|
|
|
|
|
- <span
|
|
|
|
|
- slot="set"
|
|
|
|
|
- v-show="userType==1"
|
|
|
|
|
- class="superOperate el-icon-setting"
|
|
|
|
|
- @click="equipOperation(item.device_id,item.d_id)"
|
|
|
|
|
- ></span>
|
|
|
|
|
- <span slot="title">孢子仪</span>
|
|
|
|
|
- <div slot="content" class="content">
|
|
|
|
|
- <p>
|
|
|
|
|
- <i class="iconfont icon-yonghu"></i>
|
|
|
|
|
- 设备ID:{{item.device_id.slice(-8)}}
|
|
|
|
|
- </p>
|
|
|
|
|
- <p>
|
|
|
|
|
- <i class="iconfont icon-biaoqian"></i>
|
|
|
|
|
- 设备名称:{{item.device_name==""?"无":item.device_name}}
|
|
|
|
|
- </p>
|
|
|
|
|
- <p>
|
|
|
|
|
- <i class="iconfont icon-diannao"></i>在线状态:
|
|
|
|
|
- <span
|
|
|
|
|
- :class="{red:item.device_status==0,green:item.device_status==1}"
|
|
|
|
|
- >{{item.device_status==0?"离线":"在线"}}</span>
|
|
|
|
|
- </p>
|
|
|
|
|
- <p>
|
|
|
|
|
- <i class="iconfont icon-shijian"></i>
|
|
|
|
|
- 最新上报时间 : {{item.status_time*1000 | formatTime}}
|
|
|
|
|
- </p>
|
|
|
|
|
- <p>
|
|
|
|
|
- <i class="iconfont icon-dizhi"></i>载玻片、培养液更换时间
|
|
|
|
|
- <span @click="setTime(item.d_id)" class="el-icon-edit"></span>
|
|
|
|
|
- </p>
|
|
|
|
|
- <p class="btns">
|
|
|
|
|
- <i class="iconfont icon-yemiancaozuo"></i>
|
|
|
|
|
- <el-button size="mini" type="info" @click="viewImage(item.device_id,item.d_id)">查看图片</el-button>
|
|
|
|
|
- <el-button size="mini" type="warning" @click="equipSet(item.d_id)">设备控制</el-button>
|
|
|
|
|
- <el-button size="mini" type="success" @click="simSet(item.d_id)">SIM卡</el-button>
|
|
|
|
|
- <el-button size="mini" type="danger" @click="dataDetail(item.device_id,item.d_id)">数据详情</el-button>
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </equip-item>
|
|
|
|
|
- </el-card>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template v-if="displayType==2">
|
|
|
|
|
- <el-card class="box-card">
|
|
|
|
|
- <el-table :data="equipList" stripe style="width: 100%">
|
|
|
|
|
- <el-table-column prop="device_id" label="设备ID" width="180">
|
|
|
|
|
- <template slot-scope="scope">{{scope.row.device_id.slice(-8)}}</template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="device_name" label="设备名称" width="180">
|
|
|
|
|
- <template slot-scope="scope">{{scope.row.device_name==""?"无":scope.row.device_name}}</template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="device_status" label="在线状态">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <p style="color:#17bb89" v-if="scope.row.device_status==1">在线</p>
|
|
|
|
|
- <p style="color:#eb6765" v-if="scope.row.device_status==0">离线</p>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="address" label="位置">
|
|
|
|
|
- <template slot-scope="scope">{{scope.row.address==""?"无":scope.row.address}}</template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="status_time" label="最新上报时间">
|
|
|
|
|
- <template slot-scope="scope">{{scope.row.status_time*1000 | formatTime}}</template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column label="操作" width="400">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-button size="mini" type="info" @click="viewImage(scope.row.device_id,scope.row.d_id)">查看图片</el-button>
|
|
|
|
|
- <el-button size="mini" type="warning" @click="equipSet(scope.row.d_id)">设备控制</el-button>
|
|
|
|
|
- <el-button size="mini" type="success" @click="simSet(scope.row.d_id)">SIM卡</el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="danger"
|
|
|
|
|
- @click="dataDetail(scope.row.device_id,scope.row.d_id)"
|
|
|
|
|
- >数据详情</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-card>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <div class="check-btns">
|
|
|
|
|
+ <div class="type-check">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ :type="displayType == '1'?'primary':'default'"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ @click="checkType(1)"
|
|
|
|
|
+ >图表</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ :type="displayType == '2'?'primary':'default'"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ @click="checkType(2)"
|
|
|
|
|
+ >列表</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="search-box">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入内容"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ v-model="searchVal"
|
|
|
|
|
+ suffix-icon="el-icon-search"
|
|
|
|
|
+ class="input-with-select"
|
|
|
|
|
+ @change="searchEquipList()"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="selectItem"
|
|
|
|
|
+ class="select02"
|
|
|
|
|
+ slot="prepend"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ @change="selClear()">
|
|
|
|
|
+ <el-option label="设备ID" value="1"></el-option>
|
|
|
|
|
+ <el-option label="设备名" value="2"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-loading="tableLoading">
|
|
|
|
|
+ <template v-if="displayType==1">
|
|
|
|
|
+ <el-row :gutter="10">
|
|
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6" v-for="item in equipList" :key="item.id">
|
|
|
|
|
+ <el-card class="box-card">
|
|
|
|
|
+ <equip-item :is_online="item.device_status">
|
|
|
|
|
+ <span slot="title">孢子仪</span>
|
|
|
|
|
+ <div slot="content" class="content">
|
|
|
|
|
+ <p>
|
|
|
|
|
+ <i class="iconfont icon-yonghu"></i>
|
|
|
|
|
+ 设备ID:{{item.device_id.slice(-8)}}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p>
|
|
|
|
|
+ <i class="iconfont icon-biaoqian"></i>
|
|
|
|
|
+ 设备名称:{{item.device_name==""?"无":item.device_name}}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p>
|
|
|
|
|
+ <i class="iconfont icon-diannao"></i>在线状态:
|
|
|
|
|
+ <span
|
|
|
|
|
+ :class="{red:item.device_status==0,green:item.device_status==1}"
|
|
|
|
|
+ >{{item.device_status==0?"离线":"在线"}}</span>
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p>
|
|
|
|
|
+ <i class="iconfont icon-shijian"></i>
|
|
|
|
|
+ 最新上报时间 : {{item.status_time }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p>
|
|
|
|
|
+ <i class="iconfont icon-dizhi"></i>载玻片、培养液更换时间
|
|
|
|
|
+ <span @click="setTime(item.device_id)" class="el-icon-edit"></span>
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p class="btns">
|
|
|
|
|
+ <i class="iconfont icon-yemiancaozuo"></i>
|
|
|
|
|
+ <el-button size="mini" type="info" @click="viewImage(item.device_id,item.d_id)">查看图片</el-button>
|
|
|
|
|
+ <el-button size="mini" type="success" @click="equipSet(item.device_id)">设备控制</el-button>
|
|
|
|
|
+ <el-button size="mini" type="warning" @click="dataDetail(item.device_id,item.device_name)">数据详情</el-button>
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </equip-item>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="displayType==2">
|
|
|
|
|
+ <el-card class="box-card">
|
|
|
|
|
+ <el-table :data="equipList" stripe style="width: 100%">
|
|
|
|
|
+ <el-table-column prop="device_id" label="设备ID" width="180">
|
|
|
|
|
+ <template slot-scope="scope">{{scope.row.device_id.slice(-8)}}</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="device_name" label="设备名称" width="180">
|
|
|
|
|
+ <template slot-scope="scope">{{scope.row.device_name==""?"无":scope.row.device_name}}</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="device_status" label="在线状态">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <p style="color:#17bb89" v-if="scope.row.device_status==1">在线</p>
|
|
|
|
|
+ <p style="color:#eb6765" v-if="scope.row.device_status==0">离线</p>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="status_time" label="最新上报时间">
|
|
|
|
|
+ <template slot-scope="scope">{{scope.row.status_time }}</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="操作" width="400">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-button size="mini" type="info" @click="viewImage(scope.row.device_id,scope.row.d_id)">查看图片</el-button>
|
|
|
|
|
+ <el-button size="mini" type="success" @click="equipSet(scope.row.device_id)">设备控制</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ @click="dataDetail(scope.row.device_id,scope.row.device_name)"
|
|
|
|
|
+ >数据详情</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 暂无数据 -->
|
|
|
|
|
+ <div class="expertDiagnosis_referral_units_not" v-if="equipList.length<=0 && displayType==1">
|
|
|
|
|
+ <img
|
|
|
|
|
+ src="@/assets/images/zanwu.png"
|
|
|
|
|
+ alt
|
|
|
|
|
+ class="expertDiagnosis_referral_units_notImg"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
<el-pagination
|
|
<el-pagination
|
|
|
background
|
|
background
|
|
|
:page-size="8"
|
|
:page-size="8"
|
|
@@ -121,18 +156,18 @@
|
|
|
<el-form ref="equipContrlRef" :model="setFrom" label-width="160px">
|
|
<el-form ref="equipContrlRef" :model="setFrom" label-width="160px">
|
|
|
<el-form-item label="载玻片滴液时间: " prop="drop_time">
|
|
<el-form-item label="载玻片滴液时间: " prop="drop_time">
|
|
|
<el-select v-model="setFrom.drop_time">
|
|
<el-select v-model="setFrom.drop_time">
|
|
|
- <el-option label="1" value="1"></el-option>
|
|
|
|
|
- <el-option label="2" value="2"></el-option>
|
|
|
|
|
- <el-option label="3" value="3"></el-option>
|
|
|
|
|
- <el-option label="4" value="4"></el-option>
|
|
|
|
|
- <el-option label="5" value="5"></el-option>
|
|
|
|
|
|
|
+ <el-option label="1" :value="1"></el-option>
|
|
|
|
|
+ <el-option label="2" :value="2"></el-option>
|
|
|
|
|
+ <el-option label="3" :value="3"></el-option>
|
|
|
|
|
+ <el-option label="4" :value="4"></el-option>
|
|
|
|
|
+ <el-option label="5" :value="5"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="图片上传分辨率: " prop="imgres">
|
|
<el-form-item label="图片上传分辨率: " prop="imgres">
|
|
|
<el-select v-model="setFrom.imgres">
|
|
<el-select v-model="setFrom.imgres">
|
|
|
- <el-option label="高" value="0"></el-option>
|
|
|
|
|
- <el-option label="中" value="1"></el-option>
|
|
|
|
|
- <el-option label="低" value="2"></el-option>
|
|
|
|
|
|
|
+ <el-option label="高" :value="0"></el-option>
|
|
|
|
|
+ <el-option label="中" :value="1"></el-option>
|
|
|
|
|
+ <el-option label="低" :value="2"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="孢子培养时间(h): " prop="cul_time">
|
|
<el-form-item label="孢子培养时间(h): " prop="cul_time">
|
|
@@ -366,6 +401,7 @@ import EquipItem from '@/components/EquipItem'
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ tableLoading : false,
|
|
|
displayType: '1', //图表和表格切换
|
|
displayType: '1', //图表和表格切换
|
|
|
d_id: '',
|
|
d_id: '',
|
|
|
itemId: '', //当前点开的弹框设备ID
|
|
itemId: '', //当前点开的弹框设备ID
|
|
@@ -376,7 +412,6 @@ export default {
|
|
|
role: '',
|
|
role: '',
|
|
|
queryInfo: {
|
|
queryInfo: {
|
|
|
page: 1,
|
|
page: 1,
|
|
|
- is_online: '', //筛选在线状态
|
|
|
|
|
f_id: '',
|
|
f_id: '',
|
|
|
ename: ''
|
|
ename: ''
|
|
|
},
|
|
},
|
|
@@ -437,6 +472,24 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ checkType(i){
|
|
|
|
|
+ this.displayType=i;
|
|
|
|
|
+ },
|
|
|
|
|
+ // 搜索组合数据
|
|
|
|
|
+ searchEquipList() {
|
|
|
|
|
+ if (this.selectItem == 1) {
|
|
|
|
|
+ this.queryInfo.f_id = this.searchVal;
|
|
|
|
|
+ } else if (this.selectItem == 2) {
|
|
|
|
|
+ this.queryInfo.ename = this.searchVal;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.getEquipList()
|
|
|
|
|
+ },
|
|
|
|
|
+ selClear() {
|
|
|
|
|
+ this.searchVal = "";
|
|
|
|
|
+ this.queryInfo.f_id = "";
|
|
|
|
|
+ this.queryInfo.ename = "";
|
|
|
|
|
+ this.getEquipList()
|
|
|
|
|
+ },
|
|
|
getIsOnline(data) {
|
|
getIsOnline(data) {
|
|
|
this.queryInfo.is_online = data
|
|
this.queryInfo.is_online = data
|
|
|
this.queryInfo.page = 1
|
|
this.queryInfo.page = 1
|
|
@@ -453,26 +506,40 @@ export default {
|
|
|
},
|
|
},
|
|
|
//获取设备列表
|
|
//获取设备列表
|
|
|
getEquipList() {
|
|
getEquipList() {
|
|
|
|
|
+ this.tableLoading = true;
|
|
|
this.$axios({
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
- url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
|
|
|
|
|
|
|
+ url: '/api/equipmanage_bzy',
|
|
|
data: this.qs.stringify({
|
|
data: this.qs.stringify({
|
|
|
- device_type_id: 7,
|
|
|
|
|
- page_size: 8,
|
|
|
|
|
- device_id: this.queryInfo.f_id,
|
|
|
|
|
- device_name: this.queryInfo.ename,
|
|
|
|
|
|
|
+ req: 'filter',
|
|
|
|
|
+ ename: this.queryInfo.ename,
|
|
|
page: this.queryInfo.page,
|
|
page: this.queryInfo.page,
|
|
|
- device_status: this.queryInfo.is_online
|
|
|
|
|
|
|
+ f_id:this.queryInfo.f_id,
|
|
|
})
|
|
})
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
- if (res.data.message == '') {
|
|
|
|
|
- this.equipList = res.data.data.data
|
|
|
|
|
- this.totalNum = res.data.data.counts
|
|
|
|
|
|
|
+ this.tableLoading = false;
|
|
|
|
|
+ this.totalNum = res.data.nums
|
|
|
|
|
+ if (this.totalNum > 0) {
|
|
|
|
|
+ var dat = res.data.dat;
|
|
|
|
|
+ var arr = [];
|
|
|
|
|
+ for(var i = 0;i<dat.length;i++){
|
|
|
|
|
+ var bzy_status = eval('('+dat[i].bzy_status+')');
|
|
|
|
|
+ arr.push({
|
|
|
|
|
+ device_id: bzy_status.imei,
|
|
|
|
|
+ device_name: dat[i].equip_name,
|
|
|
|
|
+ device_status: parseInt(dat[i].is_online),
|
|
|
|
|
+ status_time: dat[i].upl_time
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ this.equipList = arr
|
|
|
// this.role=res.data.role
|
|
// this.role=res.data.role
|
|
|
} else {
|
|
} else {
|
|
|
- // this.$message.error('获取数据失败!')
|
|
|
|
|
|
|
+ this.equipList = []
|
|
|
}
|
|
}
|
|
|
console.log(res)
|
|
console.log(res)
|
|
|
|
|
+ },error =>{
|
|
|
|
|
+ this.dataloading = false
|
|
|
|
|
+ this.$message.error('获取失败')
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
//载玻片、培养液更换时间配置
|
|
//载玻片、培养液更换时间配置
|
|
@@ -480,16 +547,17 @@ export default {
|
|
|
this.d_id = d_id
|
|
this.d_id = d_id
|
|
|
this.$axios({
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
- url: '/api/api_gateway?method=device.device_manage.get_spore_time',
|
|
|
|
|
|
|
+ url: '/api/equipmanage_bzy_detail',
|
|
|
data: this.qs.stringify({
|
|
data: this.qs.stringify({
|
|
|
- device_type_id: 7,
|
|
|
|
|
- d_id
|
|
|
|
|
|
|
+ id:d_id
|
|
|
})
|
|
})
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
- if (res.data.message == '') {
|
|
|
|
|
- let data = res.data.data
|
|
|
|
|
- let glass_slide_time = data.glass_slide_time * 1000
|
|
|
|
|
- let cultivate_time = data.cultivate_time * 1000
|
|
|
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
|
+ let data = res.data
|
|
|
|
|
+ var glass = data.glass.split('#')
|
|
|
|
|
+ var liquid = data.liquid.split('#')
|
|
|
|
|
+ let glass_slide_time = new Date(glass[glass.length-1]).getTime()
|
|
|
|
|
+ let cultivate_time = new Date(liquid[liquid.length-1]).getTime()
|
|
|
this.time.time01 = glass_slide_time ? glass_slide_time : ''
|
|
this.time.time01 = glass_slide_time ? glass_slide_time : ''
|
|
|
this.time.time02 = cultivate_time ? cultivate_time : ''
|
|
this.time.time02 = cultivate_time ? cultivate_time : ''
|
|
|
}
|
|
}
|
|
@@ -498,21 +566,34 @@ export default {
|
|
|
},
|
|
},
|
|
|
//载玻片、培养液更换时间配置提交
|
|
//载玻片、培养液更换时间配置提交
|
|
|
setTimeSubm() {
|
|
setTimeSubm() {
|
|
|
- let glass_slide_time = parseInt(
|
|
|
|
|
- new Date(this.time.time01).getTime() / 1000
|
|
|
|
|
- )
|
|
|
|
|
- let cultivate_time = parseInt(new Date(this.time.time02).getTime() / 1000)
|
|
|
|
|
|
|
+ let glass_slide_time = this.time.time01
|
|
|
|
|
+ let cultivate_time = this.time.time02
|
|
|
this.$axios({
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
- url: '/api/api_gateway?method=device.device_manage.updata_spore_time',
|
|
|
|
|
|
|
+ url: '/api/bzy_mqtt',
|
|
|
data: this.qs.stringify({
|
|
data: this.qs.stringify({
|
|
|
- device_type_id: 7,
|
|
|
|
|
- d_id: this.d_id,
|
|
|
|
|
- glass_slide_time,
|
|
|
|
|
- cultivate_time
|
|
|
|
|
|
|
+ req: 'glass',
|
|
|
|
|
+ id: this.d_id,
|
|
|
|
|
+ glass: glass_slide_time,
|
|
|
})
|
|
})
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
- if (res.data.message == '') {
|
|
|
|
|
|
|
+ if (res.data == '') {
|
|
|
|
|
+ this.$message.success('修改成功!')
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(res.data.message)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.setTimeDialogVisible = false
|
|
|
|
|
+ })
|
|
|
|
|
+ this.$axios({
|
|
|
|
|
+ method: 'POST',
|
|
|
|
|
+ url: '/api/bzy_mqtt',
|
|
|
|
|
+ data: this.qs.stringify({
|
|
|
|
|
+ req: 'liquid',
|
|
|
|
|
+ id: this.d_id,
|
|
|
|
|
+ liquid:cultivate_time
|
|
|
|
|
+ })
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.data == '') {
|
|
|
this.$message.success('修改成功!')
|
|
this.$message.success('修改成功!')
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.error(res.data.message)
|
|
this.$message.error(res.data.message)
|
|
@@ -523,70 +604,77 @@ export default {
|
|
|
equipSetSubm() {
|
|
equipSetSubm() {
|
|
|
this.setFrom.coll_time = []
|
|
this.setFrom.coll_time = []
|
|
|
if (this.coll_time.time01 && this.coll_time.time02) {
|
|
if (this.coll_time.time01 && this.coll_time.time02) {
|
|
|
|
|
+ var time01 = this.coll_time.time01.slice(0,2)
|
|
|
this.setFrom.coll_time.push(
|
|
this.setFrom.coll_time.push(
|
|
|
- `${this.coll_time.time01}-${this.coll_time.time02}`
|
|
|
|
|
|
|
+ `${this.coll_time.time01.split(':')[0]}-${this.coll_time.time02.split(':')[0]}`
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
if (this.coll_time.time03 && this.coll_time.time04) {
|
|
if (this.coll_time.time03 && this.coll_time.time04) {
|
|
|
this.setFrom.coll_time.push(
|
|
this.setFrom.coll_time.push(
|
|
|
- `${this.coll_time.time03}-${this.coll_time.time04}`
|
|
|
|
|
|
|
+ `${this.coll_time.time03.split(':')[0]}-${this.coll_time.time04.split(':')[0]}`
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
if (this.coll_time.time05 && this.coll_time.time06) {
|
|
if (this.coll_time.time05 && this.coll_time.time06) {
|
|
|
this.setFrom.coll_time.push(
|
|
this.setFrom.coll_time.push(
|
|
|
- `${this.coll_time.time05}-${this.coll_time.time06}`
|
|
|
|
|
|
|
+ `${this.coll_time.time05.split(':')[0]}-${this.coll_time.time06.split(':')[0]}`
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log(this.setFrom.coll_time)
|
|
|
|
|
+ var colltime = JSON.stringify(this.setFrom.coll_time)
|
|
|
this.$axios({
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
- url: '/api/api_gateway?method=forecast.send_control.device_control',
|
|
|
|
|
|
|
+ url: '/api/bzy_mqtt',
|
|
|
data: this.qs.stringify({
|
|
data: this.qs.stringify({
|
|
|
- device_type_id: 7,
|
|
|
|
|
- d_id: this.d_id,
|
|
|
|
|
- config: JSON.stringify(this.setFrom)
|
|
|
|
|
|
|
+ req: 'set',
|
|
|
|
|
+ id: this.itemId,
|
|
|
|
|
+ wind: this.setFrom.wind_sw,
|
|
|
|
|
+ drop: this.setFrom.drop_time,
|
|
|
|
|
+ culTime: this.setFrom.cul_time,
|
|
|
|
|
+ stemp: this.setFrom.set_stemp,
|
|
|
|
|
+ takt: this.setFrom.datt,
|
|
|
|
|
+ colltime: colltime,
|
|
|
})
|
|
})
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
- if (res.data.data) {
|
|
|
|
|
|
|
+ if (res.data == 0) {
|
|
|
this.$message.success('设备控制修改成功')
|
|
this.$message.success('设备控制修改成功')
|
|
|
|
|
+ this.setDialogVisible = false
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.error('设备控制修改失败')
|
|
this.$message.error('设备控制修改失败')
|
|
|
}
|
|
}
|
|
|
- this.setDialogVisible = false
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
//数据详情
|
|
//数据详情
|
|
|
- dataDetail(e_id, d_id) {
|
|
|
|
|
|
|
+ dataDetail(e_id, name) {
|
|
|
this.itemId = e_id
|
|
this.itemId = e_id
|
|
|
- this.$router.push(`/index/dataDetail/${e_id}/${d_id}`)
|
|
|
|
|
|
|
+ this.$router.push({path:'/index/dataDetail/' + e_id,query: {name:name} })
|
|
|
},
|
|
},
|
|
|
viewImage(id,d_id) {
|
|
viewImage(id,d_id) {
|
|
|
this.itemId = id
|
|
this.itemId = id
|
|
|
- this.$router.push({path:'/index/bzyPhotos/' + id,query: {d_id:d_id} })
|
|
|
|
|
|
|
+ this.$router.push({path:'/index/bzyPhotos/' + id,query: {d_id:id} })
|
|
|
},
|
|
},
|
|
|
equipSet(d_id) {
|
|
equipSet(d_id) {
|
|
|
- this.d_id = d_id
|
|
|
|
|
|
|
+ this.itemId = d_id
|
|
|
this.$axios({
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
- url: '/api/api_gateway?method=forecast.send_control.device_control_info',
|
|
|
|
|
- data: this.qs.stringify({ d_id, get_type: 1 })
|
|
|
|
|
|
|
+ url: '/api/equipmanage_bzy_detail',
|
|
|
|
|
+ data: this.qs.stringify({ id:d_id })
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
- if (Object.keys(res.data.data).length > 0) {
|
|
|
|
|
- let data = res.data.data
|
|
|
|
|
- this.setFrom = data
|
|
|
|
|
- let { coll_time } = this.setFrom
|
|
|
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
|
+ var bzy_status = eval('('+res.data.bzy_status+')');
|
|
|
|
|
+ this.setFrom = bzy_status
|
|
|
|
|
+ let coll_time = this.setFrom.coll_time
|
|
|
for (let i in coll_time) {
|
|
for (let i in coll_time) {
|
|
|
if (i == 0) {
|
|
if (i == 0) {
|
|
|
- this.coll_time.time01 = coll_time[i].split('-')[0]
|
|
|
|
|
- this.coll_time.time02 = coll_time[i].split('-')[1]
|
|
|
|
|
|
|
+ this.coll_time.time01 = coll_time[i].split('-')[0]+':00'
|
|
|
|
|
+ this.coll_time.time02 = coll_time[i].split('-')[1]+':00'
|
|
|
} else if (i == 1) {
|
|
} else if (i == 1) {
|
|
|
- this.coll_time.time03 = coll_time[i].split('-')[0]
|
|
|
|
|
- this.coll_time.time04 = coll_time[i].split('-')[1]
|
|
|
|
|
|
|
+ this.coll_time.time03 = coll_time[i].split('-')[0]+':00'
|
|
|
|
|
+ this.coll_time.time04 = coll_time[i].split('-')[1]+':00'
|
|
|
} else if (i == 2) {
|
|
} else if (i == 2) {
|
|
|
- this.coll_time.time05 = coll_time[i].split('-')[0]
|
|
|
|
|
- this.coll_time.time06 = coll_time[i].split('-')[1]
|
|
|
|
|
|
|
+ this.coll_time.time05 = coll_time[i].split('-')[0]+':00'
|
|
|
|
|
+ this.coll_time.time06 = coll_time[i].split('-')[1]+':00'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- console.log(this.coll_time)
|
|
|
|
|
}
|
|
}
|
|
|
this.setDialogVisible = true
|
|
this.setDialogVisible = true
|
|
|
})
|
|
})
|
|
@@ -760,4 +848,32 @@ export default {
|
|
|
.green {
|
|
.green {
|
|
|
color: rgb(23, 187, 137);
|
|
color: rgb(23, 187, 137);
|
|
|
}
|
|
}
|
|
|
|
|
+.check-btns{
|
|
|
|
|
+ display:flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ margin-bottom:20px;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ .search-box{
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ .el-input {
|
|
|
|
|
+ width: 400px;
|
|
|
|
|
+ vertical-align: middle;
|
|
|
|
|
+ }
|
|
|
|
|
+ .select01 {
|
|
|
|
|
+ width: 200px;
|
|
|
|
|
+ vertical-align: middle;
|
|
|
|
|
+ }
|
|
|
|
|
+ /deep/.select02 {
|
|
|
|
|
+ width: 86px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .input-with-select{
|
|
|
|
|
+ width: 260px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 暂无数据
|
|
|
|
|
+.expertDiagnosis_referral_units_not {
|
|
|
|
|
+ width: 272px;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|