问卷icon修改
This commit is contained in:
@@ -24,7 +24,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="survey_con_label flex">
|
<div class="survey_con_label flex">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<img src="../../../../assets/img/publish/baoming.png" alt="" />
|
<img
|
||||||
|
:src="setImg(survey.scene_code_info)"
|
||||||
|
alt="Content Icon"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
/>
|
||||||
{{ survey.scene_name }} |
|
{{ survey.scene_name }} |
|
||||||
</div>
|
</div>
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
@@ -60,6 +64,14 @@ import { getSurveysPage } from '@/api/home/index.js';
|
|||||||
import editPng from '@/assets/img/publish/edit.png';
|
import editPng from '@/assets/img/publish/edit.png';
|
||||||
import publishPng from '@/assets/img/publish/publish.png';
|
import publishPng from '@/assets/img/publish/publish.png';
|
||||||
import endPng from '@/assets/img/publish/end.png';
|
import endPng from '@/assets/img/publish/end.png';
|
||||||
|
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 survey = ref({
|
const survey = ref({
|
||||||
project_name: ''
|
project_name: ''
|
||||||
@@ -89,7 +101,22 @@ const fetchSurveys = async () => {
|
|||||||
// Toast()
|
// Toast()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchSurveys();
|
fetchSurveys();
|
||||||
|
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;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -31,7 +31,11 @@
|
|||||||
<el-space spacer="|">
|
<el-space spacer="|">
|
||||||
<!--报名签到-->
|
<!--报名签到-->
|
||||||
<div class="flex align-center">
|
<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>
|
<el-text size="small">{{ item.scene_name }}</el-text>
|
||||||
</div>
|
</div>
|
||||||
<!-- 问卷来源 -->
|
<!-- 问卷来源 -->
|
||||||
@@ -113,6 +117,14 @@ import { finish } from '@/api/survey/index.js';
|
|||||||
import { showDialog, showConfirmDialog, showFailToast, showSuccessToast, showToast } from 'vant';
|
import { showDialog, showConfirmDialog, showFailToast, showSuccessToast, showToast } from 'vant';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import NewSurvey from '@/views/Home/components/NewSurvey/index.vue';
|
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 router = useRouter();
|
||||||
const survey = ref([]);
|
const survey = ref([]);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
@@ -279,6 +291,20 @@ const saveTemplate = async (item) => {
|
|||||||
showFailToast(res.data);
|
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(() => {
|
onMounted(() => {
|
||||||
// fetchSurveys();
|
// fetchSurveys();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user