Commit 596786b9 authored by 胡占生's avatar 胡占生 🇨🇳

fix: 树型控件 筛选修复,算法管理报错修复

parent 66927085
......@@ -3,11 +3,11 @@
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" :style="{ height:'16px' }" />
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }}</h1>
<h1 v-else class="sidebar-title" :style="{ color: '#fff'}">{{ title }}</h1>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" :style="{ height:'25px' }" />
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }}</h1>
<h1 class="sidebar-title" :style="{ color: '#fff' }">{{ title }}</h1>
</router-link>
</transition>
</div>
......
......@@ -747,15 +747,14 @@ function getListCase() {
listCase({ algorithmId: ids.value,caseType:2}).then(response => {
imgVideoData.value = response.rows.map(item=>{
return item.caseFile
});
}).join(",");
});
}
//新增案例文件
function addCaseFile(){
console.log("🚀 ~ addCaseFile ~ imgVideoData.value:", imgVideoData.value)
if(proxy.isNotEmpty(imgVideoData.value)){
if(proxy.isNotEmpty(imgVideoData.value) && imgVideoData.value.length>0){
const params={
algorithmId:form.value.id,
list:[]
......
......@@ -53,7 +53,10 @@
<div style="background-color: #E6F3FF;display: grid;grid-template-columns: 1fr 2fr 2fr; gap: 16px;padding: 16px;min-height: 650px;">
<el-card style="position: relative;">
<div class="upload-box">
<div style="height: 130px;width: 100%; margin: 5px; overflow: hidden;cursor: pointer;"
<div class="img-box" v-if="imgVideoData.length==0">
<img src="@/assets/images/default/Image.png" width="100%" height="550px"/>
</div>
<div v-else style="height: 130px;width: 100%; margin: 5px; overflow: hidden;cursor: pointer;"
v-for="item in imgVideoData" :key="item.id"
@click="handBuiltImg(item.caseFile)"
>
......@@ -77,7 +80,7 @@
<el-card >
原始数据
<div class="img-box" v-if="nowImg.length==0">
<img src="@/assets/images/default.png" height="350px"/>
<img src="@/assets/images/default/Image-1.png" height="350px"/>
</div>
<div class="img-box" v-else>
<ImagePreview v-if="getFileType(nowImg)=='0'" :src="nowImg" height="100%"/>
......@@ -91,7 +94,7 @@
算法识别结果
<div class="img-box" v-if="outFilePath.length==0">
<div>{{ resultStr }}</div>
<img src="@/assets/images/default.png" height="350px"/>
<img src="@/assets/images/default/Image-1.png" height="350px"/>
</div>
<div class="img-box" v-else>
<ImagePreview v-if="getFileType(outFilePath)=='0'" :src="outFilePath" height="100%"/>
......@@ -109,34 +112,42 @@
<span>算法边界</span>
</div>
<div style="background-color: #E6F3FF;display: grid;grid-template-columns: 1fr 1fr; gap: 16px;padding: 16px;">
<el-card style="position: relative;">
<div class="text-boundary">
有效的拍摄方式:
<div v-for="(item,index) in effectiveList" :key="item.id" style="text-indent: 10px;">{{index+1}}、{{item.remark}}</div>
</div>
<el-card style="position: relative; padding: 20px;">
<div class="img-box" v-if="effectiveList.length==0">
<img src="@/assets/images/default.png" height="100%"/>
<img src="@/assets/images/default/Image-1.png" width="100%"/>
</div>
<div class="img-box gird-layout" v-else>
<div class="img-item" v-for="item in effectiveList" :key="item.id">
<ImagePreview style="height: 100%;" :src="item.caseFile"/>
<div v-else >
<div class="text-boundary">
有效的拍摄方式:
<div v-for="(item,index) in effectiveList" :key="item.id" style="text-indent: 10px;">{{index+1}}、{{item.remark}}</div>
</div>
<el-divider />
<div class="img-box gird-layout">
<div class="img-item" v-for="item in effectiveList" :key="item.id">
<ImagePreview style="height: 100%;" :src="item.caseFile"/>
</div>
</div>
</div>
<img class="top-tip" src="@/assets/images/success.png" alt="">
</el-card>
<el-card style="position: relative;">
<div class="text-boundary">
无效的拍摄方式:
<div v-for="(item,index) in invalidList" :key="item.id" style="text-indent: 10px;">{{index+1}}、{{item.remark}}</div>
</div>
<el-card style="position: relative;padding: 20px;">
<div class="img-box" v-if="invalidList.length==0">
<img src="@/assets/images/default.png" height="100%"/>
<img src="@/assets/images/default/Image-1.png" width="100%"/>
</div>
<div class="img-box gird-layout" v-else >
<div class="img-item" v-for="item in invalidList" :key="item.id">
<ImagePreview style="height: 100%;" :src="item.caseFile"/>
<div v-else >
<div class="text-boundary">
无效的拍摄方式:
<div v-for="(item,index) in invalidList" :key="item.id" style="text-indent: 10px;">{{index+1}}、{{item.remark}}</div>
</div>
<el-divider />
<div class="img-box gird-layout" >
<div class="img-item" v-for="item in invalidList" :key="item.id">
<ImagePreview style="height: 100%;" :src="item.caseFile"/>
</div>
</div>
</div>
<img class="top-tip" src="@/assets/images/close.png" alt="">
</el-card>
</div>
......@@ -206,14 +217,12 @@ function getDetials(){
invalidList.value = res.rows.filter(item => item.caseType === '1')
})
}
/** 查询案例文件列表 */
function getListCase() {
listCase({ algorithmId: roleId,caseType:2}).then(response => {
imgVideoData.value = response.rows
});
}
function getImgObj(obj){
nowImg.value = obj.fileName
handeUpload(obj)
......@@ -233,7 +242,6 @@ function judgeImgUrl(item){
function handBuiltImg(item){
nowImg.value = item
}
// 判断当前文件类型
function getFileType(fileName) {
const videoType =['mp4','avi','mov','wmv','flv','mkv','rmvb','3gp','mpg','mpeg','webm']
......@@ -300,7 +308,7 @@ getDetials()
position: absolute;
display: flex;
top: 30px;
right: 20px;
right: 35px;
}
.left-list{
min-height: 700px;
......@@ -376,6 +384,7 @@ getDetials()
text-align: left;
font-style: normal;
text-transform: none;
min-height: 180px;
}
.gird-layout{
display: grid;
......@@ -391,8 +400,8 @@ getDetials()
.top-tip{
position: absolute;
width: 35px;
top: 5px;
right: 5px;
top: 25px;
right: 21px;
}
</style>
......
......@@ -108,6 +108,7 @@ import { onMounted, reactive, ref, } from "vue";
const { proxy } = getCurrentInstance();
const algFormRef = ref(null);
const nowText = ref("视频预览");
const deptTreeRef = ref(null);
const deptName = ref("");
const deptOptions = ref(undefined);
const algorithmList = ref([
......@@ -200,20 +201,11 @@ onMounted(() => {
getVideos()
})
// function closeNow(){
// const routerArr=useTagsViewStore().visitedViews
// const nowPath=location.pathname
// return routerArr.filter(item=>{return item.path==nowPath })[0]
// }
// setTimeout(() => {
// nowText=closeNow()awdasa
// }, 500);
// function goTarget(url) {
// window.open(url, '__blank')
// }
watch(deptName, (val) => {
deptTreeRef.value.filter(val)
})
function handleNodeClick(row) {
}
function handAdd(row) {
......@@ -221,38 +213,13 @@ function handAdd(row) {
}
function handleSetSize(row) {
console.log(
"%c [ row ]-170",
"font-size:13px; background:pink; color:#bf2c9f;",
row
);
// reset();
// const postId = row.postId || ids.value;
// getPost(postId).then(response => {
// form.value = response.data;
// open.value = true;
// title.value = "修改岗位";
// });
}
function handleUpdate(row) {
// reset();
// const postId = row.postId || ids.value;
// getPost(postId).then(response => {
// form.value = response.data;
// open.value = true;
// title.value = "修改岗位";
// });
}
/** 删除按钮操作 */
function handleDelete(row) {
// const postIds = row.postId || ids.value;
// proxy.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function() {
// return delPost(postIds);
// }).then(() => {
// getList();
// proxy.$modal.msgSuccess("删除成功");
// }).catch(() => {});
}
</script>
......
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