提交 4b0a5f81 作者: 温凯

feat(ai): 新增AI配置获取功能并优化AI识别列表展示

上级 688cbd12
import axios from "axios"; import axios from "axios";
import request from "../request";
// const gddaiapi = 'https://hawk.mmcuav.cn/gddaiapi'; // const gddaiapi = 'https://hawk.mmcuav.cn/gddaiapi';
export default class AI_API { export default class AI_API {
// 获取当前的ai配置
static getAiconfig(data) {
return request({
url: `/admin-api/system/ai-config/getconfig`,
method: "post",
data,
});
}
// 人脸 // 人脸
static face(data){ static face(data) {
// return axios.post("http://api.user.mmcuav.cn/aidemo/facedetect", data); // 百度的ai return axios.post(
return axios.post("https://hawk.mmcuav.cn/faceaiapi/detect/imageface", data); "https://hawk.mmcuav.cn/faceaiapi/detect/imageface",
data
);
} }
// 车牌 // 车牌
static plate(data) { static plate(data) {
return axios.post("/gddaiapi/api/inflet/v1/tasks/e01d1d01-52e2-4883-a5de-0ae268764db0/predict", data); // 共达地 return axios.post(
// return axios.post("https://hawk.mmcuav.cn/plateaiapi/detect/image", data); // 自研 "/gddaiapi/api/inflet/v1/tasks/e01d1d01-52e2-4883-a5de-0ae268764db0/predict",
data
); // 共达地
} }
// 人流 // 人流
static crowd(data){ static crowd(data) {
return axios.post("/gddaiapi/api/inflet/v1/tasks/18493235-4dd0-4f54-ab55-c1856ca7e3a5/predict", data); return axios.post(
"/gddaiapi/api/inflet/v1/tasks/18493235-4dd0-4f54-ab55-c1856ca7e3a5/predict",
data
);
} }
// 烟雾 // 烟雾
static smoke(data){ static smoke(data) {
return axios.post("/gddaiapi/api/inflet/v1/tasks/fca2eb65-8b99-4109-9f9e-a9f7fd06ac1f/predict", data); return axios.post(
"/gddaiapi/api/inflet/v1/tasks/fca2eb65-8b99-4109-9f9e-a9f7fd06ac1f/predict",
data
);
} }
// 漏油识别 // 漏油识别
static oilLeak(data){ static oilLeak(data) {
return axios.post("https://hawk.mmcuav.cn/oilaiapi/detect/image", data); return axios.post("https://hawk.mmcuav.cn/oilaiapi/detect/image", data);
} }
// 裸土识别 // 裸土识别
static bareSoil(data){ static bareSoil(data) {
return axios.post("/gddaiapi/api/inflet/v1/tasks/05a9d657-8339-4575-bced-04b60b74c690/predict", data); return axios.post(
"/gddaiapi/api/inflet/v1/tasks/05a9d657-8339-4575-bced-04b60b74c690/predict",
data
);
}
// 其余ai
static kbtAi(data) {
return axios.post("https://hawk.mmcuav.cn/detect/image", data);
} }
} }
\ No newline at end of file
...@@ -30,7 +30,6 @@ $axios.interceptors.request.use( ...@@ -30,7 +30,6 @@ $axios.interceptors.request.use(
config.headers["terminal"] = 2; // 1 为管理后台 2 为前端项目 config.headers["terminal"] = 2; // 1 为管理后台 2 为前端项目
config.headers["p-id"] = projectId; config.headers["p-id"] = projectId;
console.log(config, store.state, "token信息验证"); console.log(config, store.state, "token信息验证");
return config; return config;
}, },
(error) => { (error) => {
...@@ -75,7 +74,7 @@ $axios.interceptors.response.use( ...@@ -75,7 +74,7 @@ $axios.interceptors.response.use(
isRefreshToken = false; isRefreshToken = false;
if (data.code === 0) { if (data.code === 0) {
const token = data.token; const token = data.token;
console.log("store", store);
window.$mmc_stl.app.$store.commit( window.$mmc_stl.app.$store.commit(
"MMCFlightControlCenter/setState", "MMCFlightControlCenter/setState",
{ {
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
> >
<el-option <el-option
v-for="item in aiTypeList" v-for="item in aiTypeList"
:key="item.id" :key="item.typeId"
:label="item.value" :label="item.title"
:value="item.id" :value="item.typeId"
></el-option> ></el-option>
</el-select> </el-select>
<el-checkbox <el-checkbox
...@@ -262,39 +262,118 @@ export default { ...@@ -262,39 +262,118 @@ export default {
isIndeterminate: false, isIndeterminate: false,
selectAll: false, //全选 selectAll: false, //全选
viewLibTab: 0, // 视图库tab索引, 0: 视图, 1: 机载 viewLibTab: 0, // 视图库tab索引, 0: 视图, 1: 机载
aiType: 0, // 图片类型 aiType: 1, // 图片类型
aiTypeList: [ aiTypeList: [
// 普通图片或ai图片选项
{ {
id: 0, typeId: 1,
value: "全部", title: "人车识别",
}, },
{ {
id: 1, typeId: 2,
value: "人脸识别", title: "烟火识别",
}, },
{ {
id: 8, typeId: 4,
// id: 2, title: "行人识别",
value: "车牌识别",
}, },
{ {
id: 3, typeId: 5,
value: "人流识别", title: "机动车识别",
}, },
{ {
id: 4, typeId: 6,
value: "烟雾识别", title: "两轮车识别",
}, },
{ {
id: 5, typeId: 7,
value: "漏油识别", title: "三轮车识别",
}, },
{ {
id: 6, typeId: 8,
value: "裸土识别", title: "挖掘机识别",
}, },
], //视图库类型 {
typeId: 9,
title: "车牌识别",
},
{
typeId: 10,
title: "人脸识别",
},
{
typeId: 11,
title: "口罩识别",
},
{
typeId: 14,
title: "烟雾识别",
},
{
typeId: 15,
title: "火焰识别",
},
{
typeId: 17,
title: "占道经营",
},
{
typeId: 22,
title: "船舶识别",
},
{
typeId: 23,
title: "漏油识别",
},
{
typeId: 24,
title: "头盔识别",
},
{
typeId: 25,
title: "管线识别",
},
{
typeId: 26,
title: "路面裂缝",
},
{
typeId: 27,
title: "顶棚违建",
},
{
typeId: 28,
title: "门牌广告",
},
{
typeId: 29,
title: "井盖识别",
},
{
typeId: 30,
title: "搅拌车识别",
},
{
typeId: 31,
title: "油罐车识别",
},
{
typeId: 32,
title: "渣土车识别",
},
{
typeId: 33,
title: "排气口识别",
},
{
typeId: 34,
title: "人流识别",
},
{
title: "裸土识别",
typeId: 35,
},
],
//视图库类型
fileType: "图片", //视图文件类型 0:图片;1:视频 fileType: "图片", //视图文件类型 0:图片;1:视频
photoList: [], //资源列表对应的对象 photoList: [], //资源列表对应的对象
photoListDate: null, //某日期的所有资源 photoListDate: null, //某日期的所有资源
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论