|
@@ -732,29 +732,111 @@ export default {
|
|
|
},
|
|
},
|
|
|
//图片列表数据请求
|
|
//图片列表数据请求
|
|
|
imgListData() {
|
|
imgListData() {
|
|
|
|
|
+ var dat = {
|
|
|
|
|
+ "errorCode": 0,
|
|
|
|
|
+ "message": "",
|
|
|
|
|
+ "params": {
|
|
|
|
|
+ "device_id": "867435052201324",
|
|
|
|
|
+ "page_number": "8",
|
|
|
|
|
+ "ret": "list",
|
|
|
|
|
+ "page": "1"
|
|
|
|
|
+ },
|
|
|
|
|
+ "data": {
|
|
|
|
|
+ "disable": 1,
|
|
|
|
|
+ "data": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "addtime": 1615450821,
|
|
|
|
|
+ "addr": "../../../../static/images/data/worm1.jpg",
|
|
|
|
|
+ "describe": "",
|
|
|
|
|
+ "desc_kind": 4,
|
|
|
|
|
+ "device_id": "829",
|
|
|
|
|
+ "des_nums": 124,
|
|
|
|
|
+ "mark": null,
|
|
|
|
|
+ "id": 3322
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "addtime": 1615450809,
|
|
|
|
|
+ "addr": "../../../../static/images/data/worm2.jpg",
|
|
|
|
|
+ "describe": "",
|
|
|
|
|
+ "desc_kind": 4,
|
|
|
|
|
+ "device_id": "829",
|
|
|
|
|
+ "des_nums": 37,
|
|
|
|
|
+ "mark": null,
|
|
|
|
|
+ "id": 3321
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "addtime": 1615450799,
|
|
|
|
|
+ "addr": "../../../../static/images/data/pest3.jpg",
|
|
|
|
|
+ "describe": "",
|
|
|
|
|
+ "desc_kind": 3,
|
|
|
|
|
+ "device_id": "829",
|
|
|
|
|
+ "des_nums": 91,
|
|
|
|
|
+ "mark": null,
|
|
|
|
|
+ "id": 3320
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "addtime": 1615450787,
|
|
|
|
|
+ "addr": "../../../../static/images/data/pest4.jpg",
|
|
|
|
|
+ "describe": "",
|
|
|
|
|
+ "desc_kind": 2,
|
|
|
|
|
+ "device_id": "829",
|
|
|
|
|
+ "des_nums": 20,
|
|
|
|
|
+ "mark": null,
|
|
|
|
|
+ "id": 3319
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "addtime": 1615450778,
|
|
|
|
|
+ "addr": "../../../../static/images/data/pest5.jpg",
|
|
|
|
|
+ "describe": "",
|
|
|
|
|
+ "desc_kind": 4,
|
|
|
|
|
+ "device_id": "829",
|
|
|
|
|
+ "des_nums": 23,
|
|
|
|
|
+ "mark": null,
|
|
|
|
|
+ "id": 3318
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "addtime": 1615450766,
|
|
|
|
|
+ "addr": "../../../../static/images/data/pest6.jpg",
|
|
|
|
|
+ "describe": "",
|
|
|
|
|
+ "desc_kind": 8,
|
|
|
|
|
+ "device_id": "829",
|
|
|
|
|
+ "des_nums": 15,
|
|
|
|
|
+ "mark": null,
|
|
|
|
|
+ "id": 3317
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "addtime": 1615450756,
|
|
|
|
|
+ "addr": "../../../../static/images/data/pest1.jpg",
|
|
|
|
|
+ "describe": "",
|
|
|
|
|
+ "desc_kind": 1,
|
|
|
|
|
+ "device_id": "829",
|
|
|
|
|
+ "des_nums": 17,
|
|
|
|
|
+ "mark": null,
|
|
|
|
|
+ "id": 3316
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "addtime": 1615450746,
|
|
|
|
|
+ "addr": "../../../../static/images/data/pest2.jpg",
|
|
|
|
|
+ "describe": "",
|
|
|
|
|
+ "desc_kind": 6,
|
|
|
|
|
+ "device_id": "829",
|
|
|
|
|
+ "des_nums": 24,
|
|
|
|
|
+ "mark": null,
|
|
|
|
|
+ "id": 3315
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ "num": 10
|
|
|
|
|
+ },
|
|
|
|
|
+ "formError": {}
|
|
|
|
|
+ }
|
|
|
let that = this;
|
|
let that = this;
|
|
|
- let postData = that.qs.stringify({
|
|
|
|
|
- device_id: that.id,
|
|
|
|
|
- page_number: 8,
|
|
|
|
|
- page: that.page,
|
|
|
|
|
- ret: 'list',
|
|
|
|
|
- rets: that.radio1,
|
|
|
|
|
- time_begin: that.begin, //开始时间(时间戳)
|
|
|
|
|
- time_end: that.end, //结束时间(时间戳)
|
|
|
|
|
- });
|
|
|
|
|
- that
|
|
|
|
|
- .$axios({
|
|
|
|
|
- method: "post",
|
|
|
|
|
- url: "/api/api_gateway?method=forecast.forecast_system.equip_photo", //forecast.forecast_system.equip_photo
|
|
|
|
|
- data: postData,
|
|
|
|
|
- })
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- var nums = res.data.data.num;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ var nums = 33;
|
|
|
that.totalNum = nums;
|
|
that.totalNum = nums;
|
|
|
- this.discernState = res.data.data.disable;
|
|
|
|
|
|
|
+ this.discernState = dat.data.disable;
|
|
|
that.recognitionImage = [];
|
|
that.recognitionImage = [];
|
|
|
that.imgList = [];
|
|
that.imgList = [];
|
|
|
- var imgData = res.data.data.data;
|
|
|
|
|
|
|
+ var imgData = dat.data.data;
|
|
|
for (var i = 0; i < imgData.length; i++) {
|
|
for (var i = 0; i < imgData.length; i++) {
|
|
|
that.recognitionImage.push(imgData[i].addr);
|
|
that.recognitionImage.push(imgData[i].addr);
|
|
|
that.imgList.push(imgData[i].addr);
|
|
that.imgList.push(imgData[i].addr);
|
|
@@ -762,17 +844,12 @@ export default {
|
|
|
if (nums == 0) {
|
|
if (nums == 0) {
|
|
|
that.imgDataList = []
|
|
that.imgDataList = []
|
|
|
} else if (nums !== 0) {
|
|
} else if (nums !== 0) {
|
|
|
- let data = res.data.data.data;
|
|
|
|
|
|
|
+ let data = dat.data.data;
|
|
|
that.imgDataList = data.map((item) => {
|
|
that.imgDataList = data.map((item) => {
|
|
|
item.checked = false;
|
|
item.checked = false;
|
|
|
return item;
|
|
return item;
|
|
|
});
|
|
});
|
|
|
- // this.$message.success("请求最新图片成功!");
|
|
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
- .catch((err) => {
|
|
|
|
|
- console.log(err);
|
|
|
|
|
- });
|
|
|
|
|
},
|
|
},
|
|
|
//改变page
|
|
//改变page
|
|
|
changePage(val) {
|
|
changePage(val) {
|
|
@@ -934,39 +1011,48 @@ export default {
|
|
|
discernFunData(data) {
|
|
discernFunData(data) {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
that.againData = data;
|
|
that.againData = data;
|
|
|
- let postData = that.qs.stringify({
|
|
|
|
|
- img_id: data.id,
|
|
|
|
|
- ret: "see",
|
|
|
|
|
- });
|
|
|
|
|
- that
|
|
|
|
|
- .$axios({
|
|
|
|
|
- method: "post",
|
|
|
|
|
- url:
|
|
|
|
|
- "/api/api_gateway?method=forecast.forecast_system.equip_photo_discern",
|
|
|
|
|
- data: postData,
|
|
|
|
|
- })
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- that.loading = false;
|
|
|
|
|
- if (res.data.message == "") {
|
|
|
|
|
|
|
+ var dat = {
|
|
|
|
|
+ "errorCode": 0,
|
|
|
|
|
+ "message": "",
|
|
|
|
|
+ "params": {
|
|
|
|
|
+ "ret": "see",
|
|
|
|
|
+ "img_id": "3322",
|
|
|
|
|
+ "device_id": "867435052201324"
|
|
|
|
|
+ },
|
|
|
|
|
+ "data": {
|
|
|
|
|
+ "image": "../../../../static/images/data/worm11.jpg",
|
|
|
|
|
+ "result": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "number": "155",
|
|
|
|
|
+ "result_list": "负子蝽",
|
|
|
|
|
+ "nums": "2"
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "number": "64",
|
|
|
|
|
+ "result_list": "暗黑鳃金龟",
|
|
|
|
|
+ "nums": "2"
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "number": "71",
|
|
|
|
|
+ "result_list": "水龟虫",
|
|
|
|
|
+ "nums": "113"
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "number": "70",
|
|
|
|
|
+ "result_list": "铜绿丽金龟",
|
|
|
|
|
+ "nums": "7"
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ "formError": {}
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
//识别成功
|
|
//识别成功
|
|
|
- that.recognitionData = res.data.data.result; //数组数据
|
|
|
|
|
|
|
+ that.recognitionData = dat.data.result; //数组数据
|
|
|
this.recognitionImage = [];
|
|
this.recognitionImage = [];
|
|
|
- that.recognitionImage.push(res.data.data.image);
|
|
|
|
|
|
|
+ that.recognitionImage.push(dat.data.image);
|
|
|
this.discernShow = true;
|
|
this.discernShow = true;
|
|
|
- } else {
|
|
|
|
|
- //识别失败
|
|
|
|
|
- this.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: res.data.message,
|
|
|
|
|
- type: "warning",
|
|
|
|
|
- offset:100
|
|
|
|
|
- });
|
|
|
|
|
- this.discernShow = false;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch((err) => {
|
|
|
|
|
- console.log(err);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
//关闭识别弹框
|
|
//关闭识别弹框
|
|
|
closeDiscerRes(){
|
|
closeDiscerRes(){
|
|
@@ -1000,41 +1086,53 @@ export default {
|
|
|
this.saveTag();
|
|
this.saveTag();
|
|
|
},
|
|
},
|
|
|
imgTagSubm() {
|
|
imgTagSubm() {
|
|
|
- this.$axios({
|
|
|
|
|
- method: "post",
|
|
|
|
|
- url:
|
|
|
|
|
- "/api/api_gateway?method=forecast.forecast_system.cbdphoto_receive",
|
|
|
|
|
- data: this.qs.stringify({
|
|
|
|
|
- img_id: this.tagImgId,
|
|
|
|
|
- mark: JSON.stringify(this.setdata),
|
|
|
|
|
- }),
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- if (res.data.data) {
|
|
|
|
|
- this.$message.success("提交成功!");
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.warning(res.data.message);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
this.imgTagDataVisible = false;
|
|
this.imgTagDataVisible = false;
|
|
|
this.discernShow = false;
|
|
this.discernShow = false;
|
|
|
- this.imgListData();
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.$message.success("提交成功!");
|
|
|
},
|
|
},
|
|
|
//手动图片标注
|
|
//手动图片标注
|
|
|
imgTag(data) {
|
|
imgTag(data) {
|
|
|
if(data == 'result'){
|
|
if(data == 'result'){
|
|
|
var data = this.againData
|
|
var data = this.againData
|
|
|
}
|
|
}
|
|
|
- this.$axios({
|
|
|
|
|
- method: "post",
|
|
|
|
|
- url:
|
|
|
|
|
- "/api/api_gateway?method=forecast.forecast_system.equip_photo_discern",
|
|
|
|
|
- data: this.qs.stringify({
|
|
|
|
|
- img_id: data.id,
|
|
|
|
|
- ret: "see",
|
|
|
|
|
- }),
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- if (res.data.message == "") {
|
|
|
|
|
- this.currentImage = res.data.data.image;
|
|
|
|
|
|
|
+ var dat = {
|
|
|
|
|
+ "errorCode": 0,
|
|
|
|
|
+ "message": "",
|
|
|
|
|
+ "params": {
|
|
|
|
|
+ "ret": "see",
|
|
|
|
|
+ "img_id": "3322",
|
|
|
|
|
+ "device_id": "867435052201324"
|
|
|
|
|
+ },
|
|
|
|
|
+ "data": {
|
|
|
|
|
+ "image": "../../../../static/images/data/worm11.jpg",
|
|
|
|
|
+ "result": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "number": "155",
|
|
|
|
|
+ "result_list": "负子蝽",
|
|
|
|
|
+ "nums": "2"
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "number": "64",
|
|
|
|
|
+ "result_list": "暗黑鳃金龟",
|
|
|
|
|
+ "nums": "2"
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "number": "71",
|
|
|
|
|
+ "result_list": "水龟虫",
|
|
|
|
|
+ "nums": "113"
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "number": "70",
|
|
|
|
|
+ "result_list": "铜绿丽金龟",
|
|
|
|
|
+ "nums": "7"
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ "formError": {}
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+ this.currentImage = dat.data.image;
|
|
|
this.tagImgId = data.id;
|
|
this.tagImgId = data.id;
|
|
|
// this.mgMark = data.mark;
|
|
// this.mgMark = data.mark;
|
|
|
console.log(data);
|
|
console.log(data);
|
|
@@ -1043,10 +1141,7 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.renderData(JSON.parse(data.mark));
|
|
this.renderData(JSON.parse(data.mark));
|
|
|
});
|
|
});
|
|
|
- }else{
|
|
|
|
|
- this.$message.warning(res.data.message)
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
//打开页面加载标签
|
|
//打开页面加载标签
|
|
|
renderData(data) {
|
|
renderData(data) {
|