|
|
@@ -14,13 +14,14 @@
|
|
|
ref="screenData"
|
|
|
>
|
|
|
<template slot="type-check">
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
:disabled="multipleSelection.length == 0 || multipleSelection.length > 3"
|
|
|
@click="addGrop"
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
>分组</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
+ <span></span>
|
|
|
</template>
|
|
|
<template slot="search-box">
|
|
|
<!-- <template v-if="role == 'admin'">
|
|
|
@@ -209,8 +210,17 @@
|
|
|
:header-cell-style="{ background: '#F2F3F5' }"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
- <el-table-column align="center" type="selection" width="55"> </el-table-column>
|
|
|
-
|
|
|
+ <!-- <el-table-column align="center" type="selection" width="55"> </el-table-column> -->
|
|
|
+ <el-table-column prop="address" label="组号">
|
|
|
+ <template slot-scope="scope"
|
|
|
+ >{{ scope.row.group_id || '无' }}
|
|
|
+ <i
|
|
|
+ class="el-icon-edit cursor"
|
|
|
+ style="color: #018b3f"
|
|
|
+ @click="editBz(scope.row)"
|
|
|
+ ></i>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="address" label="地区" width="200">
|
|
|
<template slot-scope="scope">{{ scope.row.address || '无' }}</template>
|
|
|
</el-table-column>
|
|
|
@@ -220,8 +230,15 @@
|
|
|
<el-table-column prop="device_id" label="终端ID" width="160">
|
|
|
<template slot-scope="scope">{{ scope.row.imei }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="device_code" label="设备编号" width="160">
|
|
|
- <template slot-scope="scope">{{ scope.row.device_code || '无' }}</template>
|
|
|
+ <el-table-column prop="device_code" label="诱捕器编号" width="50">
|
|
|
+ <template slot-scope="scope"
|
|
|
+ >{{ scope.row.serial_id || '无' }}
|
|
|
+ <i
|
|
|
+ class="el-icon-edit cursor"
|
|
|
+ style="color: #018b3f"
|
|
|
+ @click="editBh(scope.row)"
|
|
|
+ ></i>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="device_status" label="在线状态">
|
|
|
<template slot-scope="scope">
|
|
|
@@ -268,7 +285,7 @@
|
|
|
>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" fixed="right">
|
|
|
+ <el-table-column label="操作" width="150" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<!-- <el-button
|
|
|
v-if="scope.row.device_model == 2"
|
|
|
@@ -333,11 +350,13 @@
|
|
|
<img :src="$imghost + zanwu" alt class="expertDiagnosis_referral_units_notImg" />
|
|
|
</div>
|
|
|
<el-pagination
|
|
|
- :page-size="8"
|
|
|
+ :page-sizes="[6, 9, 12, 15, 18]"
|
|
|
+ :page-size="pageSize"
|
|
|
layout="total, sizes,jumper, next,pager , prev"
|
|
|
:total="totalNum"
|
|
|
:current-page="queryInfo.page"
|
|
|
@current-change="changePage"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
></el-pagination>
|
|
|
</div>
|
|
|
<!-- SIM卡对话框 -->
|
|
|
@@ -562,21 +581,22 @@
|
|
|
<el-button type="primary" @click="equipBtnControl('turn')" size="mini">卷黏虫带</el-button>
|
|
|
<el-button type="primary" @click="equipBtnControl('repower')" size="mini">重新上电</el-button>
|
|
|
</el-dialog>
|
|
|
- <!-- 添加诱芯-->
|
|
|
- <!-- <el-dialog
|
|
|
- title="添加诱芯"
|
|
|
- :visible.sync="setYxDialogVisible"
|
|
|
- width="320px"
|
|
|
+ <!-- 设置编号-->
|
|
|
+ <el-dialog
|
|
|
+ title="设置编号"
|
|
|
+ :visible.sync="setBhDialogVisible"
|
|
|
+ width="420px"
|
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
|
>
|
|
|
- <span>监测害虫名称:</span>
|
|
|
- <el-input class="facilityNum" v-model="yx.decoy"></el-input>
|
|
|
+ <span>设置诱捕器编号:</span>
|
|
|
+ <el-input class="facilityNum" v-model="serial_id"></el-input>
|
|
|
<div class="button_box">
|
|
|
- <el-button type="primary" size="small" @click="submitYx">确定</el-button>
|
|
|
- <el-button size="small" @click="setYxDialogVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="submitBh">确定</el-button>
|
|
|
+ <el-button size="small" @click="setBhDialogVisible = false">取消</el-button>
|
|
|
</div>
|
|
|
- </el-dialog> -->
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 添加诱芯-->
|
|
|
<el-dialog
|
|
|
title="设置诱芯"
|
|
|
:visible.sync="setYxDialogVisible"
|
|
|
@@ -648,13 +668,13 @@
|
|
|
:header-cell-style="{ background: '#F2F3F5' }"
|
|
|
>
|
|
|
<el-table-column prop="device_id" label="诱芯名称">
|
|
|
- <template slot-scope="scope">{{ scope.row.imei }}</template>
|
|
|
+ <template slot-scope="scope">{{ scope.row.name }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="device_id" label="开始时间">
|
|
|
- <template slot-scope="scope">{{ scope.row.imei }}</template>
|
|
|
+ <el-table-column prop="device_id" label="诱芯添加时间">
|
|
|
+ <template slot-scope="scope">{{ (scope.row.start * 1000) | formatTime }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="device_id" label="结束时间">
|
|
|
- <template slot-scope="scope">{{ scope.row.imei }}</template>
|
|
|
+ <el-table-column prop="device_id" label="诱芯到期时间">
|
|
|
+ <template slot-scope="scope">{{ (scope.row.end * 1000) | formatTime }}</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination
|
|
|
@@ -710,6 +730,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ pageSize: 6,
|
|
|
+ serial_id: '',
|
|
|
timeOptions: {
|
|
|
start: '0:00',
|
|
|
step: '1:00',
|
|
|
@@ -797,7 +819,9 @@ export default {
|
|
|
},
|
|
|
rules: {
|
|
|
name: [{ required: true, message: '请输入诱芯名称', trigger: 'blur' }]
|
|
|
- }
|
|
|
+ },
|
|
|
+ selectDevId: '',
|
|
|
+ setBhDialogVisible: false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -853,20 +877,21 @@ export default {
|
|
|
})
|
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
|
- url: '/api/api_gateway?method=message.views.message_record_delete',
|
|
|
+ url: '/api/api_gateway?method=lpsxy.one_tuo_three.xycb_group',
|
|
|
data: this.qs.stringify({
|
|
|
- ids: ids.join(','),
|
|
|
- name: this.groupName
|
|
|
+ device_id: this.selectDevId,
|
|
|
+ group_id: this.groupName
|
|
|
})
|
|
|
}).then((res) => {
|
|
|
// console.log(res.data.data);
|
|
|
- if (res.data.message == '') {
|
|
|
+ if (res.data.data == true) {
|
|
|
this.$message({
|
|
|
- message: '删除成功',
|
|
|
+ message: '修改成功',
|
|
|
type: 'success',
|
|
|
duration: 1500
|
|
|
})
|
|
|
- this.getwarinlistdatas()
|
|
|
+ this.groupDialogVisible = false
|
|
|
+ this.getEquipList()
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.data.message,
|
|
|
@@ -924,21 +949,17 @@ export default {
|
|
|
this.yxloading = true
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
|
- url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
|
|
|
+ url: '/api/api_gateway?method=lpsxy.one_tuo_three.xycb_phrodisiac_list',
|
|
|
data: this.qs.stringify({
|
|
|
- device_type_id: 4,
|
|
|
page_size: 8,
|
|
|
- device_id: this.queryInfo.f_id,
|
|
|
- device_name: this.queryInfo.ename,
|
|
|
+ device_id: this.selectDevId,
|
|
|
page: this.queryInfo.page,
|
|
|
- device_status: this.queryInfo.is_online,
|
|
|
- device_model: 1,
|
|
|
customer_uid: this.sale_user_uid // 销售用户id
|
|
|
})
|
|
|
}).then((res) => {
|
|
|
if (res.data.message == '') {
|
|
|
this.yxList = res.data.data.data
|
|
|
- this.yxtotalNum = res.data.data.counts
|
|
|
+ this.yxtotalNum = res.data.data.total
|
|
|
this.yxloading = false
|
|
|
}
|
|
|
})
|
|
|
@@ -948,6 +969,10 @@ export default {
|
|
|
this.queryInfo.page = val
|
|
|
this.getEquipList()
|
|
|
},
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.pageSize = val
|
|
|
+ this.getEquipList()
|
|
|
+ },
|
|
|
yxChangePage(val) {
|
|
|
this.yxpage = val
|
|
|
this.getYxList()
|
|
|
@@ -974,6 +999,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
yxRecord(row) {
|
|
|
+ this.selectDevId = row.imei
|
|
|
this.yxRecordVisible = true
|
|
|
this.getYxList()
|
|
|
},
|
|
|
@@ -1270,22 +1296,20 @@ export default {
|
|
|
}
|
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
|
- url: '/api/api_gateway?method=forecast.worm_lamp.set_decopy',
|
|
|
+ url: '/api/api_gateway?method=lpsxy.one_tuo_three.xycb_aphrodisiac_add',
|
|
|
data: this.qs.stringify({
|
|
|
- device_type_id: 4,
|
|
|
- device_id: this.device_id,
|
|
|
- decoy: this.baitdata.name,
|
|
|
- expire_time: time
|
|
|
+ device_id: this.selectDevId,
|
|
|
+ name: this.baitdata.name,
|
|
|
+ end: time
|
|
|
})
|
|
|
}).then((res) => {
|
|
|
this.dialogVisible = false
|
|
|
- if (res.data.message == '') {
|
|
|
- if (res.data.data.status) {
|
|
|
- this.setYxDialogVisible = false
|
|
|
- this.getYxList()
|
|
|
- } else {
|
|
|
- this.$message.warning(res.data.message)
|
|
|
- }
|
|
|
+ if (res.data.data == true) {
|
|
|
+ this.setYxDialogVisible = false
|
|
|
+ this.getYxList()
|
|
|
+ this.getEquipList()
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.data.message)
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
@@ -1293,6 +1317,33 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ editBh(row) {
|
|
|
+ this.selectDevId = row.imei
|
|
|
+ this.setBhDialogVisible = true
|
|
|
+ },
|
|
|
+ editBz(row) {
|
|
|
+ this.selectDevId = row.imei
|
|
|
+ this.groupDialogVisible = true
|
|
|
+ },
|
|
|
+ submitBh() {
|
|
|
+ this.$axios({
|
|
|
+ method: 'POST',
|
|
|
+ url: '/api/api_gateway?method=lpsxy.one_tuo_three.xycb_serial',
|
|
|
+ data: this.qs.stringify({
|
|
|
+ device_id: this.selectDevId,
|
|
|
+ serial_id: this.serial_id
|
|
|
+ })
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.data.message == '') {
|
|
|
+ if (res.data.data.status) {
|
|
|
+ this.setBhDialogVisible = false
|
|
|
+ this.getYxList()
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.data.message)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
@@ -1345,9 +1396,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.content {
|
|
|
- height: calc(100% - 116px);
|
|
|
+ height: calc(100% - 150px);
|
|
|
background: #fff;
|
|
|
position: relative;
|
|
|
+ border-radius: 4px;
|
|
|
}
|
|
|
.handAddForm {
|
|
|
/deep/.el-form-item {
|