Commit d433a898 authored by 胡占生's avatar 胡占生 🇨🇳

fix: 点位管理,增加绘图错误抛出,修复传参问题,算法管理增加 算法校验功能

parent 31dd16d6
...@@ -71,3 +71,11 @@ export function deleteFile(ids) { ...@@ -71,3 +71,11 @@ export function deleteFile(ids) {
method: 'delete' method: 'delete'
}) })
} }
// 算法校验
export function checkAlg(id) {
return request({
url: `/yunshou/aiAlgorithmConfig/check/${id}`,
method: 'post',
})
}
...@@ -153,4 +153,12 @@ export function listCase(query) { ...@@ -153,4 +153,12 @@ export function listCase(query) {
method: 'get', method: 'get',
params: query params: query
}) })
} }
\ No newline at end of file
// 算法校验
export function checkAlg(id) {
return request({
url: `/yunshou/aiAlgorithmConfig/check/${id}`,
method: 'post',
})
}
...@@ -100,8 +100,3 @@ function hasTitle(title){ ...@@ -100,8 +100,3 @@ function hasTitle(title){
} }
} }
</script> </script>
<style lang="scss" >
.el-popper.is-light{
background: #29d;
}
</style>
\ No newline at end of file
...@@ -33,12 +33,13 @@ ...@@ -33,12 +33,13 @@
<!-- <el-table-column label="MD5核对结果" align="center" prop="md5Result" /> --> <!-- <el-table-column label="MD5核对结果" align="center" prop="md5Result" /> -->
<el-table-column label="文件大小" align="center" prop="fileSize" /> <el-table-column label="文件大小" align="center" prop="fileSize" />
<el-table-column label="上传时间" align="center" prop="createTime" /> <el-table-column label="上传时间" align="center" prop="createTime" />
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" width="260" align="center" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<!-- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" <!-- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
>版本内容</el-button> --> >版本内容</el-button> -->
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button> <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
<el-button link type="primary" icon="Sort" @click="useNewFile(scope.row.id)">版本切换</el-button> <el-button link type="primary" icon="Sort" @click="useNewFile(scope.row.id)">版本切换</el-button>
<el-button link type="primary" icon="CircleCheck" @click="checkFile(scope.row.id)">算法校验</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -88,7 +89,7 @@ ...@@ -88,7 +89,7 @@
</template> </template>
<script setup> <script setup>
import { addFile, deleteFile, updateFile, listFile ,useCurrentFil} from "@/api/algorithmList/algorithmFile.js"; import { addFile, deleteFile, updateFile, listFile ,useCurrentFil,checkAlg} from "@/api/algorithmList/algorithmFile.js";
import FileAlgUpload from '@/components/FileAlgUpload' import FileAlgUpload from '@/components/FileAlgUpload'
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const emit = defineEmits(); const emit = defineEmits();
...@@ -177,6 +178,13 @@ function useNewFile(id) { ...@@ -177,6 +178,13 @@ function useNewFile(id) {
}); });
} }
/** 算法校验*/
function checkFile(id) {
checkAlg(id).then(response => {
proxy.$modal.msgSuccess("校验成功");
});
}
/** 提交按钮 */ /** 提交按钮 */
function submitForm() { function submitForm() {
proxy.$refs["algRef"].validate(valid => { proxy.$refs["algRef"].validate(valid => {
......
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
<el-table-column label="卡片文案" align="left" prop="cardCopywriting" :show-overflow-tooltip="true" /> <el-table-column label="卡片文案" align="left" prop="cardCopywriting" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<!-- <el-tooltip content="导入算法包" placement="top"> <!-- <el-tooltip content="导入算法包" placement="top">
<el-button link type="primary" icon="UploadFilled" @click="handleUpdate(scope.row)" ></el-button> <el-button link type="primary" icon="UploadFilled" @click="handleUpdate(scope.row)" ></el-button>
</el-tooltip> --> </el-tooltip> -->
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
type="primary" type="primary"
@click="beginDraw(scope.row)" @click="beginDraw(scope.row)"
v-hasPermi="['system:post:edit']" v-hasPermi="['system:post:edit']"
>绘制</el-button >{{graph[scope.row.id].length >0?'':'' }}绘制</el-button
> >
<el-button <el-button
link link
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
> >
<el-button @click="getNewPhoto" v-else>重新取图</el-button> <el-button @click="getNewPhoto" v-else>重新取图</el-button>
<el-button type="primary" @click="clearDraw">重绘标记</el-button> <el-button type="primary" @click="clearDraw">重绘标记</el-button>
<el-button type="primary" @click="++drawIndex">绘制下一个</el-button> <el-button type="primary" v-if="showNext" @click="++drawIndex">绘制下一个</el-button>
</div> </div>
<div class="right-draw-content"> <div class="right-draw-content">
<template v-if="algorithmManage.form.value.liveMap"> <template v-if="algorithmManage.form.value.liveMap">
...@@ -374,6 +374,7 @@ const rules = { ...@@ -374,6 +374,7 @@ const rules = {
], ],
}; };
const algLevelRef = ref(null); const algLevelRef = ref(null);
const showNext = ref(false);
const isEdit = false; const isEdit = false;
let aiAlgorithmLabel = useIndex( let aiAlgorithmLabel = useIndex(
...@@ -437,7 +438,6 @@ function submit() { ...@@ -437,7 +438,6 @@ function submit() {
algLevelRef.value.validate(async (valid) => { algLevelRef.value.validate(async (valid) => {
if (valid) { if (valid) {
let algorithms = []; let algorithms = [];
algorithmManage.form.value.runningState = "0";
if (algorithmManage.form.value.liveMap) { if (algorithmManage.form.value.liveMap) {
await toUpload(); //上传图片 await toUpload(); //上传图片
} }
...@@ -614,6 +614,7 @@ function getNewPhoto() { ...@@ -614,6 +614,7 @@ function getNewPhoto() {
} }
const draw = ref(); const draw = ref();
function beginDraw(e) { function beginDraw(e) {
showNext.value = true;
if (!algorithmManage.form.value.liveMap) { if (!algorithmManage.form.value.liveMap) {
// 添加弹窗 // 添加弹窗
ElMessage({ ElMessage({
...@@ -657,6 +658,13 @@ function clearDraw() { ...@@ -657,6 +658,13 @@ function clearDraw() {
} }
} }
function pointDraw(e) { function pointDraw(e) {
if (!draw.value) {
ElMessage({
message: "请点击绘制按钮",
type: "error",
});
return;
}
if (!graph[drawId.value]) { if (!graph[drawId.value]) {
graph[drawId.value] = []; graph[drawId.value] = [];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment