|
|
@@ -6,7 +6,7 @@
|
|
|
</el-breadcrumb>
|
|
|
<div class="search-box">
|
|
|
<div class="filter-box">
|
|
|
- <el-select
|
|
|
+ <!-- <el-select
|
|
|
style="margin: 0 4px 0 0"
|
|
|
size="small"
|
|
|
v-model="queryInfo.device_type_id"
|
|
|
@@ -22,7 +22,7 @@
|
|
|
<el-option label="孢子仪" value="7"></el-option>
|
|
|
<el-option label="性诱设备" value="8"></el-option>
|
|
|
<el-option label="糖醋测报" value="9"></el-option>
|
|
|
- </el-select>
|
|
|
+ </el-select> -->
|
|
|
<el-input
|
|
|
style="cursor: pointer"
|
|
|
size="small"
|
|
|
@@ -49,9 +49,7 @@
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
@click="photoshow(scope.$index)"
|
|
|
- :class="[
|
|
|
- dataList[scope.$index].errorimg.length > 3 ? 'photoseebtn' : '',
|
|
|
- ]"
|
|
|
+ :class="[dataList[scope.$index].errorimg.length > 3 ? 'photoseebtn' : '']"
|
|
|
>故障图片</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
@@ -97,129 +95,126 @@ export default {
|
|
|
return {
|
|
|
// 动态表头
|
|
|
tableHeadTxt: [
|
|
|
- ["设备id", "device_id"],
|
|
|
- ["设备类型", "device_type"],
|
|
|
- ["位置", "addr"],
|
|
|
- ["联系人", "user"],
|
|
|
- ["联系电话", "userphone"],
|
|
|
- ["故障原因", "errordesc"],
|
|
|
- ["上报时间", "uptime"],
|
|
|
+ ['设备id', 'device_id'],
|
|
|
+ ['设备类型', 'device_type'],
|
|
|
+ ['位置', 'addr'],
|
|
|
+ ['联系人', 'user'],
|
|
|
+ ['联系电话', 'userphone'],
|
|
|
+ ['故障原因', 'errordesc'],
|
|
|
+ ['上报时间', 'uptime']
|
|
|
],
|
|
|
dataList: [],
|
|
|
totalNum: 0,
|
|
|
page: 1,
|
|
|
queryInfo: {
|
|
|
- device_type_id: "",
|
|
|
- f_id: "",
|
|
|
+ device_type_id: '',
|
|
|
+ f_id: ''
|
|
|
},
|
|
|
imageListtstatus: false,
|
|
|
imageListtData: [],
|
|
|
videodialogVisible: false,
|
|
|
- videosrc: "",
|
|
|
- };
|
|
|
+ videosrc: ''
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getList();
|
|
|
+ this.getList()
|
|
|
},
|
|
|
beforeMount() {},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/api_gateway?method=after_sale.after_sale_manage.aftersale_info",
|
|
|
+ method: 'POST',
|
|
|
+ url: '/api/api_gateway?method=after_sale.after_sale_manage.aftersale_info',
|
|
|
data: this.qs.stringify({
|
|
|
device_type_id: this.queryInfo.device_type_id,
|
|
|
f_id: this.queryInfo.f_id,
|
|
|
- page: this.page,
|
|
|
- }),
|
|
|
+ page: this.page
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
- if (res.data.message == "") {
|
|
|
- this.dataList = [];
|
|
|
+ if (res.data.message == '') {
|
|
|
+ this.dataList = []
|
|
|
res.data.data.data.forEach((item) => {
|
|
|
- item.device_type = this.equipType(item.device_type);
|
|
|
- item.addr = item.addr || "--";
|
|
|
- item.errorimg = item.errorimg || "";
|
|
|
+ item.device_type = this.equipType(item.device_type)
|
|
|
+ item.addr = item.addr || '--'
|
|
|
+ item.errorimg = item.errorimg || ''
|
|
|
item.uptime = new Date(parseInt(item.uptime) * 1000)
|
|
|
.toLocaleString()
|
|
|
- .replace(/:\d{1,2}$/, " ");
|
|
|
- this.dataList.push(item);
|
|
|
- });
|
|
|
+ .replace(/:\d{1,2}$/, ' ')
|
|
|
+ this.dataList.push(item)
|
|
|
+ })
|
|
|
// this.dataList = res.data.data.data
|
|
|
- this.totalNum = res.data.data.counts;
|
|
|
+ this.totalNum = res.data.data.counts
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
changePage(val) {
|
|
|
- this.page = val;
|
|
|
- this.getList();
|
|
|
+ this.page = val
|
|
|
+ this.getList()
|
|
|
},
|
|
|
equipType(value) {
|
|
|
switch (value) {
|
|
|
- case "2":
|
|
|
- return "杀虫灯";
|
|
|
- break;
|
|
|
- case "3":
|
|
|
- return "虫情测报";
|
|
|
- break;
|
|
|
- case "7":
|
|
|
- return "孢子仪";
|
|
|
- break;
|
|
|
- case "6":
|
|
|
- return "监控";
|
|
|
- break;
|
|
|
- case "4":
|
|
|
- return "性诱设备";
|
|
|
- break;
|
|
|
- case "5":
|
|
|
- return "环境监测";
|
|
|
- break;
|
|
|
- case "9":
|
|
|
- return "糖醋测报";
|
|
|
- break;
|
|
|
+ case '2':
|
|
|
+ return '杀虫灯'
|
|
|
+ break
|
|
|
+ case '3':
|
|
|
+ return '虫情测报'
|
|
|
+ break
|
|
|
+ case '7':
|
|
|
+ return '孢子仪'
|
|
|
+ break
|
|
|
+ case '6':
|
|
|
+ return '监控'
|
|
|
+ break
|
|
|
+ case '4':
|
|
|
+ return '性诱设备'
|
|
|
+ break
|
|
|
+ case '5':
|
|
|
+ return '环境监测'
|
|
|
+ break
|
|
|
+ case '9':
|
|
|
+ return '糖醋测报'
|
|
|
+ break
|
|
|
default:
|
|
|
- return "--";
|
|
|
+ return '--'
|
|
|
}
|
|
|
},
|
|
|
searchChange() {
|
|
|
- this.getList();
|
|
|
+ this.getList()
|
|
|
},
|
|
|
photoshow(index) {
|
|
|
- if (
|
|
|
- this.dataList[index].errorimg &&
|
|
|
- this.dataList[index].errorimg.length > 2
|
|
|
- ) {
|
|
|
- this.imageListtData = JSON.parse(this.dataList[index].errorimg);
|
|
|
- this.$viewer.show();
|
|
|
+ if (this.dataList[index].errorimg && this.dataList[index].errorimg.length > 2) {
|
|
|
+ this.imageListtData = JSON.parse(this.dataList[index].errorimg)
|
|
|
+ this.$viewer.show()
|
|
|
} else {
|
|
|
this.$message({
|
|
|
- type: "error",
|
|
|
- message: "暂无图片",
|
|
|
- });
|
|
|
+ type: 'error',
|
|
|
+ message: '暂无图片'
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
videoshow(index) {
|
|
|
if (this.dataList[index].errorvideo) {
|
|
|
- this.videodialogVisible = true;
|
|
|
- this.videosrc = this.dataList[index].errorvideo;
|
|
|
+ this.videodialogVisible = true
|
|
|
+ this.videosrc = this.dataList[index].errorvideo
|
|
|
} else {
|
|
|
this.$message({
|
|
|
- type: "error",
|
|
|
- message: "暂无视频",
|
|
|
- });
|
|
|
+ type: 'error',
|
|
|
+ message: '暂无视频'
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
inited(viewer) {
|
|
|
- this.$viewer = viewer;
|
|
|
+ this.$viewer = viewer
|
|
|
},
|
|
|
videohandleClose() {
|
|
|
- this.videodialogVisible = false;
|
|
|
- this.videosrc = "";
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
+ this.videodialogVisible = false
|
|
|
+ this.videosrc = ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
-<style lang='less' scoped>
|
|
|
+<style lang="less" scoped>
|
|
|
.search-box {
|
|
|
margin-bottom: 20px;
|
|
|
.el-input {
|
|
|
@@ -257,4 +252,4 @@ export default {
|
|
|
/deep/.el-table .cell {
|
|
|
text-align: center;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|