|
|
@@ -113,8 +113,8 @@
|
|
|
<div class="list_div">
|
|
|
<span class="list_div_tlt">实际处理人:</span>
|
|
|
<span class="list_div_val">{{
|
|
|
- taskObj.actual_operator == ""
|
|
|
- ? "无"
|
|
|
+ taskObj.actual_operator == ''
|
|
|
+ ? '无'
|
|
|
: taskObj.actual_operator
|
|
|
}}</span>
|
|
|
</div>
|
|
|
@@ -142,7 +142,7 @@
|
|
|
</div>
|
|
|
<ul class="list_report_ul">
|
|
|
<li class="list_report_li">
|
|
|
- {{ taskObj.report_msg || "暂无任务汇报" }}
|
|
|
+ {{ taskObj.report_msg || '暂无任务汇报' }}
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -220,12 +220,12 @@
|
|
|
style="color: #409eff; cursor: pointer"
|
|
|
>查看</span
|
|
|
>
|
|
|
- <span v-else>{{ scope.row.report_status || "无" }}</span>
|
|
|
+ <span v-else>{{ scope.row.report_status || '无' }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="report_time" label="录入时间">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.report_time || "无" }}</span>
|
|
|
+ <span>{{ scope.row.report_time || '无' }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -314,7 +314,7 @@
|
|
|
v-for="(item, index) in insectList"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <div>{{ item.pest_name + ":" }}</div>
|
|
|
+ <div>{{ item.pest_name + ':' }}</div>
|
|
|
<div style="margin: 0 0 0 20px">{{ item.pest_number }}</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
@@ -323,7 +323,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import DOMIN from "../../util/server";
|
|
|
+import DOMIN from '../../util/server';
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
|
components: {},
|
|
|
@@ -339,15 +339,15 @@ export default {
|
|
|
// 任务填报信息
|
|
|
tableData: [],
|
|
|
dialogVisible: false, // 弹框
|
|
|
- titleData: "", // 弹框标题
|
|
|
+ titleData: '', // 弹框标题
|
|
|
insectList: [], //害虫列表
|
|
|
|
|
|
// 任务汇报
|
|
|
reportList: [
|
|
|
- "1、今天做了检测完成任务了没有",
|
|
|
- "2、途中发生了什么事情",
|
|
|
- "3、对这次任务有什么总结",
|
|
|
- "4、我对这次任务有哪些建议",
|
|
|
+ '1、今天做了检测完成任务了没有',
|
|
|
+ '2、途中发生了什么事情',
|
|
|
+ '3、对这次任务有什么总结',
|
|
|
+ '4、我对这次任务有哪些建议',
|
|
|
],
|
|
|
//二期
|
|
|
taskindex: 0,
|
|
|
@@ -386,17 +386,17 @@ export default {
|
|
|
map: this.map,
|
|
|
path: this.lineArr[i],
|
|
|
isOutline: true,
|
|
|
- outlineColor: "#ED7119",
|
|
|
+ outlineColor: '#ED7119',
|
|
|
borderWeight: 10,
|
|
|
- strokeColor: "#3AD00C",
|
|
|
+ strokeColor: '#3AD00C',
|
|
|
strokeOpacity: 0.6,
|
|
|
strokeWeight: 6,
|
|
|
// 折线样式还支持 'dashed'
|
|
|
- strokeStyle: "solid",
|
|
|
+ strokeStyle: 'solid',
|
|
|
// strokeStyle是dashed时有效
|
|
|
strokeDasharray: [10, 5],
|
|
|
- lineJoin: "round",
|
|
|
- lineCap: "round",
|
|
|
+ lineJoin: 'round',
|
|
|
+ lineCap: 'round',
|
|
|
zIndex: 50,
|
|
|
});
|
|
|
this.polyline2.push(polyline2);
|
|
|
@@ -405,7 +405,7 @@ export default {
|
|
|
for (var i = 0; i < this.polyline2.length; i++) {
|
|
|
this.map.remove(this.polyline2[i]);
|
|
|
}
|
|
|
- this.polyline2 = []
|
|
|
+ this.polyline2 = [];
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
@@ -425,8 +425,8 @@ export default {
|
|
|
// 详情界面数据
|
|
|
detailsData() {
|
|
|
this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/api_gateway?method=control_center.task.task_info",
|
|
|
+ method: 'POST',
|
|
|
+ url: '/api/api_gateway?method=control_center.task.task_info',
|
|
|
data: this.qs.stringify({
|
|
|
task_id: this.$route.query.id,
|
|
|
}),
|
|
|
@@ -436,15 +436,20 @@ export default {
|
|
|
var data = res.data.data;
|
|
|
// data.img_list = JSON.parse(data.img_list);
|
|
|
this.taskObj = data;
|
|
|
- this.taskObj.supervisor_imglist = JSON.parse(
|
|
|
- this.taskObj.supervisor_imglist
|
|
|
- );
|
|
|
+ if (this.taskObj.supervisor_imglist == '') {
|
|
|
+ this.taskObj.supervisor_imglist = [];
|
|
|
+ } else {
|
|
|
+ this.taskObj.supervisor_imglist = JSON.parse(
|
|
|
+ this.taskObj.supervisor_imglist
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
this.activities = [];
|
|
|
for (var i = 0; i < this.taskObj.clock_in_list.length; i++) {
|
|
|
var obj = {
|
|
|
content: this.taskObj.clock_in_list[i].address,
|
|
|
timestamp: this.taskObj.clock_in_list[i].create_time,
|
|
|
- color: "#409eff",
|
|
|
+ color: '#409eff',
|
|
|
text: this.taskObj.clock_in_list[i].message,
|
|
|
arrlist: [],
|
|
|
};
|
|
|
@@ -476,7 +481,7 @@ export default {
|
|
|
|
|
|
// 查看
|
|
|
examine(data) {
|
|
|
- this.titleData = "设备编号:" + data.trap_number;
|
|
|
+ this.titleData = '设备编号:' + data.trap_number;
|
|
|
this.insectList = data.pest_list;
|
|
|
this.dialogVisible = true;
|
|
|
},
|
|
|
@@ -484,22 +489,22 @@ export default {
|
|
|
this.taskindex = index;
|
|
|
},
|
|
|
initmap() {
|
|
|
- var map = new AMap.Map(document.getElementById("mapContainer2"), {
|
|
|
+ var map = new AMap.Map(document.getElementById('mapContainer2'), {
|
|
|
center: [114.052758, 22.545817],
|
|
|
resizeEnable: true,
|
|
|
zoom: 10,
|
|
|
- lang: "en",
|
|
|
- mapStyle: "amap://styles/fresh",
|
|
|
+ lang: 'en',
|
|
|
+ mapStyle: 'amap://styles/fresh',
|
|
|
layers: [],
|
|
|
});
|
|
|
- AMap.plugin(["AMap.ToolBar", "AMap.Geocoder"], () => {
|
|
|
+ AMap.plugin(['AMap.ToolBar', 'AMap.Geocoder'], () => {
|
|
|
map.addControl(new AMap.ToolBar());
|
|
|
this.geocoder = new AMap.Geocoder({
|
|
|
- city: "全国",
|
|
|
+ city: '全国',
|
|
|
radius: 1000,
|
|
|
});
|
|
|
});
|
|
|
- AMap.plugin("AMap.MoveAnimation", function () {});
|
|
|
+ AMap.plugin('AMap.MoveAnimation', function () {});
|
|
|
this.map = map;
|
|
|
for (var i = 0; i < this.lineArr.length; i++) {
|
|
|
this.inittrack(this.lineArr[i]);
|
|
|
@@ -520,7 +525,7 @@ export default {
|
|
|
// 图标尺寸
|
|
|
size: new AMap.Size(44, 42),
|
|
|
// 图标的取图地址
|
|
|
- image: "../../../static/images/warning/person1.png",
|
|
|
+ image: '../../../static/images/warning/person1.png',
|
|
|
// 图标所用图片大小
|
|
|
imageSize: new AMap.Size(44, 42),
|
|
|
});
|
|
|
@@ -539,7 +544,7 @@ export default {
|
|
|
// 图标尺寸
|
|
|
size: new AMap.Size(18, 22),
|
|
|
// 图标的取图地址
|
|
|
- image: "../../../static/images/warning/" + index + ".png",
|
|
|
+ image: '../../../static/images/warning/' + index + '.png',
|
|
|
// 图标所用图片大小
|
|
|
imageSize: new AMap.Size(18, 22),
|
|
|
});
|
|
|
@@ -547,7 +552,7 @@ export default {
|
|
|
position: data,
|
|
|
offset: new AMap.Pixel(-10, -10),
|
|
|
icon: pos_icon, // 添加 Icon 图标 URL
|
|
|
- title: "设备标点",
|
|
|
+ title: '设备标点',
|
|
|
});
|
|
|
this.map.add(marker);
|
|
|
},
|
|
|
@@ -559,17 +564,17 @@ export default {
|
|
|
map: this.map,
|
|
|
path: arrlist,
|
|
|
isOutline: true,
|
|
|
- outlineColor: "#ED7119",
|
|
|
+ outlineColor: '#ED7119',
|
|
|
borderWeight: 10,
|
|
|
- strokeColor: "#3AD00C",
|
|
|
+ strokeColor: '#3AD00C',
|
|
|
strokeOpacity: 0.6,
|
|
|
strokeWeight: 6,
|
|
|
// 折线样式还支持 'dashed'
|
|
|
- strokeStyle: "solid",
|
|
|
+ strokeStyle: 'solid',
|
|
|
// strokeStyle是dashed时有效
|
|
|
strokeDasharray: [10, 5],
|
|
|
- lineJoin: "round",
|
|
|
- lineCap: "round",
|
|
|
+ lineJoin: 'round',
|
|
|
+ lineCap: 'round',
|
|
|
zIndex: 50,
|
|
|
});
|
|
|
this.polyline2.push(polyline2);
|
|
|
@@ -578,7 +583,7 @@ export default {
|
|
|
map: this.map,
|
|
|
path: arrlist,
|
|
|
showDir: true,
|
|
|
- strokeColor: "#3AD00C", //线颜色
|
|
|
+ strokeColor: '#3AD00C', //线颜色
|
|
|
strokeOpacity: 1, //线透明度
|
|
|
strokeWeight: 6, //线宽
|
|
|
zIndex: 51,
|
|
|
@@ -586,7 +591,7 @@ export default {
|
|
|
});
|
|
|
var passedPolyline = new AMap.Polyline({
|
|
|
map: this.map,
|
|
|
- strokeColor: "red", //线颜色
|
|
|
+ strokeColor: 'red', //线颜色
|
|
|
strokeWeight: 6, //线宽
|
|
|
});
|
|
|
this.map.setFitView();
|
|
|
@@ -610,7 +615,7 @@ export default {
|
|
|
// JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
|
|
|
autoRotation: false,
|
|
|
});
|
|
|
- this.trackmarker.on("movealong", (e) => {
|
|
|
+ this.trackmarker.on('movealong', (e) => {
|
|
|
index++;
|
|
|
if (index == this.lineArr.length || index > this.lineArr.length) {
|
|
|
this.btndisabled = false;
|