问卷icon修改

This commit is contained in:
du.meimei
2025-03-21 14:44:22 +08:00
parent 33feb02991
commit 4bc6eadf60
2 changed files with 55 additions and 2 deletions

View File

@@ -31,7 +31,11 @@
<el-space spacer="|">
<!--报名签到-->
<div class="flex align-center">
<img src="../../assets/img/publish/baoming.png" alt="" />
<img
:src="setImg(item.scene_code_info)"
alt="Content Icon"
style="width: 15px; height: 15px"
/>
<el-text size="small">{{ item.scene_name }}</el-text>
</div>
<!-- 问卷来源 -->
@@ -113,6 +117,14 @@ import { finish } from '@/api/survey/index.js';
import { showDialog, showConfirmDialog, showFailToast, showSuccessToast, showToast } from 'vant';
import { useRouter } from 'vue-router';
import NewSurvey from '@/views/Home/components/NewSurvey/index.vue';
import png11 from '@/assets/img/home/11.png';
import png13 from '@/assets/img/home/13.png';
import png14 from '@/assets/img/home/14.png';
import png15 from '@/assets/img/home/15.png';
import png16 from '@/assets/img/home/16.png';
import png17 from '@/assets/img/home/17.png';
import png18 from '@/assets/img/home/18.png';
import png31 from '@/assets/img/home/31.png';
const router = useRouter();
const survey = ref([]);
const total = ref(0);
@@ -279,6 +291,20 @@ const saveTemplate = async (item) => {
showFailToast(res.data);
}
};
const setImg = (code) => {
const imageMap = {
11: png11,
13: png13,
14: png14,
15: png15,
16: png16,
17: png17,
18: png18,
31: png31
};
// 默认返回 png11 如果 code 不存在
return imageMap[code] || png11;
};
onMounted(() => {
// fetchSurveys();
});