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

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

parent 66927085
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
<transition name="sidebarLogoFade"> <transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" :style="{ height:'16px' }" /> <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>
<router-link v-else key="expand" class="sidebar-logo-link" to="/"> <router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" :style="{ height:'25px' }" /> <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> </router-link>
</transition> </transition>
</div> </div>
......
...@@ -747,15 +747,14 @@ function getListCase() { ...@@ -747,15 +747,14 @@ function getListCase() {
listCase({ algorithmId: ids.value,caseType:2}).then(response => { listCase({ algorithmId: ids.value,caseType:2}).then(response => {
imgVideoData.value = response.rows.map(item=>{ imgVideoData.value = response.rows.map(item=>{
return item.caseFile return item.caseFile
}); }).join(",");
}); });
} }
//新增案例文件 //新增案例文件
function addCaseFile(){ function addCaseFile(){
console.log("🚀 ~ addCaseFile ~ imgVideoData.value:", imgVideoData.value) if(proxy.isNotEmpty(imgVideoData.value) && imgVideoData.value.length>0){
if(proxy.isNotEmpty(imgVideoData.value)){
const params={ const params={
algorithmId:form.value.id, algorithmId:form.value.id,
list:[] list:[]
......
...@@ -53,7 +53,10 @@ ...@@ -53,7 +53,10 @@
<div style="background-color: #E6F3FF;display: grid;grid-template-columns: 1fr 2fr 2fr; gap: 16px;padding: 16px;min-height: 650px;"> <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;"> <el-card style="position: relative;">
<div class="upload-box"> <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" v-for="item in imgVideoData" :key="item.id"
@click="handBuiltImg(item.caseFile)" @click="handBuiltImg(item.caseFile)"
> >
...@@ -77,7 +80,7 @@ ...@@ -77,7 +80,7 @@
<el-card > <el-card >
原始数据 原始数据
<div class="img-box" v-if="nowImg.length==0"> <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>
<div class="img-box" v-else> <div class="img-box" v-else>
<ImagePreview v-if="getFileType(nowImg)=='0'" :src="nowImg" height="100%"/> <ImagePreview v-if="getFileType(nowImg)=='0'" :src="nowImg" height="100%"/>
...@@ -91,7 +94,7 @@ ...@@ -91,7 +94,7 @@
算法识别结果 算法识别结果
<div class="img-box" v-if="outFilePath.length==0"> <div class="img-box" v-if="outFilePath.length==0">
<div>{{ resultStr }}</div> <div>{{ resultStr }}</div>
<img src="@/assets/images/default.png" height="350px"/> <img src="@/assets/images/default/Image-1.png" height="350px"/>
</div> </div>
<div class="img-box" v-else> <div class="img-box" v-else>
<ImagePreview v-if="getFileType(outFilePath)=='0'" :src="outFilePath" height="100%"/> <ImagePreview v-if="getFileType(outFilePath)=='0'" :src="outFilePath" height="100%"/>
...@@ -109,34 +112,42 @@ ...@@ -109,34 +112,42 @@
<span>算法边界</span> <span>算法边界</span>
</div> </div>
<div style="background-color: #E6F3FF;display: grid;grid-template-columns: 1fr 1fr; gap: 16px;padding: 16px;"> <div style="background-color: #E6F3FF;display: grid;grid-template-columns: 1fr 1fr; gap: 16px;padding: 16px;">
<el-card style="position: relative;"> <el-card style="position: relative; padding: 20px;">
<div class="text-boundary">
有效的拍摄方式:
<div v-for="(item,index) in effectiveList" :key="item.id" style="text-indent: 10px;">{{index+1}}、{{item.remark}}</div>
</div>
<div class="img-box" v-if="effectiveList.length==0"> <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>
<div class="img-box gird-layout" v-else> <div v-else >
<div class="img-item" v-for="item in effectiveList" :key="item.id"> <div class="text-boundary">
<ImagePreview style="height: 100%;" :src="item.caseFile"/> 有效的拍摄方式:
<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>
</div> </div>
<img class="top-tip" src="@/assets/images/success.png" alt=""> <img class="top-tip" src="@/assets/images/success.png" alt="">
</el-card> </el-card>
<el-card style="position: relative;"> <el-card style="position: relative;padding: 20px;">
<div class="text-boundary">
无效的拍摄方式:
<div v-for="(item,index) in invalidList" :key="item.id" style="text-indent: 10px;">{{index+1}}、{{item.remark}}</div>
</div>
<div class="img-box" v-if="invalidList.length==0"> <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>
<div class="img-box gird-layout" v-else > <div v-else >
<div class="img-item" v-for="item in invalidList" :key="item.id"> <div class="text-boundary">
<ImagePreview style="height: 100%;" :src="item.caseFile"/> 无效的拍摄方式:
<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>
</div> </div>
<img class="top-tip" src="@/assets/images/close.png" alt=""> <img class="top-tip" src="@/assets/images/close.png" alt="">
</el-card> </el-card>
</div> </div>
...@@ -206,14 +217,12 @@ function getDetials(){ ...@@ -206,14 +217,12 @@ function getDetials(){
invalidList.value = res.rows.filter(item => item.caseType === '1') invalidList.value = res.rows.filter(item => item.caseType === '1')
}) })
} }
/** 查询案例文件列表 */ /** 查询案例文件列表 */
function getListCase() { function getListCase() {
listCase({ algorithmId: roleId,caseType:2}).then(response => { listCase({ algorithmId: roleId,caseType:2}).then(response => {
imgVideoData.value = response.rows imgVideoData.value = response.rows
}); });
} }
function getImgObj(obj){ function getImgObj(obj){
nowImg.value = obj.fileName nowImg.value = obj.fileName
handeUpload(obj) handeUpload(obj)
...@@ -233,7 +242,6 @@ function judgeImgUrl(item){ ...@@ -233,7 +242,6 @@ function judgeImgUrl(item){
function handBuiltImg(item){ function handBuiltImg(item){
nowImg.value = item nowImg.value = item
} }
// 判断当前文件类型 // 判断当前文件类型
function getFileType(fileName) { function getFileType(fileName) {
const videoType =['mp4','avi','mov','wmv','flv','mkv','rmvb','3gp','mpg','mpeg','webm'] const videoType =['mp4','avi','mov','wmv','flv','mkv','rmvb','3gp','mpg','mpeg','webm']
...@@ -300,7 +308,7 @@ getDetials() ...@@ -300,7 +308,7 @@ getDetials()
position: absolute; position: absolute;
display: flex; display: flex;
top: 30px; top: 30px;
right: 20px; right: 35px;
} }
.left-list{ .left-list{
min-height: 700px; min-height: 700px;
...@@ -376,6 +384,7 @@ getDetials() ...@@ -376,6 +384,7 @@ getDetials()
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
min-height: 180px;
} }
.gird-layout{ .gird-layout{
display: grid; display: grid;
...@@ -391,8 +400,8 @@ getDetials() ...@@ -391,8 +400,8 @@ getDetials()
.top-tip{ .top-tip{
position: absolute; position: absolute;
width: 35px; width: 35px;
top: 5px; top: 25px;
right: 5px; right: 21px;
} }
</style> </style>
......
...@@ -108,6 +108,7 @@ import { onMounted, reactive, ref, } from "vue"; ...@@ -108,6 +108,7 @@ import { onMounted, reactive, ref, } from "vue";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const algFormRef = ref(null); const algFormRef = ref(null);
const nowText = ref("视频预览"); const nowText = ref("视频预览");
const deptTreeRef = ref(null);
const deptName = ref(""); const deptName = ref("");
const deptOptions = ref(undefined); const deptOptions = ref(undefined);
const algorithmList = ref([ const algorithmList = ref([
...@@ -200,20 +201,11 @@ onMounted(() => { ...@@ -200,20 +201,11 @@ onMounted(() => {
getVideos() getVideos()
}) })
// function closeNow(){ watch(deptName, (val) => {
// const routerArr=useTagsViewStore().visitedViews deptTreeRef.value.filter(val)
// 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')
// }
function handleNodeClick(row) { function handleNodeClick(row) {
} }
function handAdd(row) { function handAdd(row) {
...@@ -221,38 +213,13 @@ function handAdd(row) { ...@@ -221,38 +213,13 @@ function handAdd(row) {
} }
function handleSetSize(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) { 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) { 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> </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