refactor(多个组件): 优化多个组件的样式和功能
- 修改 QuestionBefore 组件中 is_option_group 的默认值为 0- 调整 RateCharacter组件中 rate_item 的样式 - 优化 LastSurvey 组件中 survey_remark 的样式,添加文本溢出处理 - 更新 Survey Index组件中的问卷描述显示方式,支持 HTML 内容 - 统一 fetchSurveys 等异步函数的格式
This commit is contained in:
@@ -434,7 +434,7 @@ const addLogicItem = (logIndex, item) => {
|
|||||||
option_index: '',
|
option_index: '',
|
||||||
relation_question_index: 0,
|
relation_question_index: 0,
|
||||||
type: 0,
|
type: 0,
|
||||||
is_option_group: '',
|
is_option_group: 0,
|
||||||
group_index: null
|
group_index: null
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -105,11 +105,12 @@ ul {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.rate_item {
|
.rate_item {
|
||||||
padding: 5px 10px;
|
//padding: 1px 3px;
|
||||||
|
min-width: 20px;
|
||||||
//width: 20px;
|
//width: 20px;
|
||||||
//height: 20px;
|
//height: 20px;
|
||||||
|
|
||||||
//margin: 0 5px 0 0;
|
margin: 0 5px 0 0;
|
||||||
border: 1px solid #979797;
|
border: 1px solid #979797;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
||||||
|
|||||||
@@ -178,11 +178,16 @@ fetchSurveys();
|
|||||||
}
|
}
|
||||||
|
|
||||||
.survey_remark {
|
.survey_remark {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0 10px 1px;
|
margin: 0 10px 1px;
|
||||||
padding: 8px;
|
//padding: 8px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: #f6f7f8;
|
//background: #f6f7f8;
|
||||||
color: #828282;
|
color: #828282;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
|||||||
@@ -59,10 +59,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--问卷描述-->
|
<!--问卷描述-->
|
||||||
<div v-if="item.remarks" class="survey_item_info_desc">
|
<div v-if="item.introduction">
|
||||||
<el-text>
|
<div v-html="item.introduction" class="survey_item_info_desc"></div>
|
||||||
{{ item.remarks }}
|
|
||||||
</el-text>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- action 功能位置 -->
|
<!-- action 功能位置 -->
|
||||||
@@ -141,7 +139,7 @@ const onLoad = () => {
|
|||||||
fetchSurveys();
|
fetchSurveys();
|
||||||
}, 500);
|
}, 500);
|
||||||
};
|
};
|
||||||
const fetchSurveys = async() => {
|
const fetchSurveys = async () => {
|
||||||
const params = {
|
const params = {
|
||||||
page: form.value.page,
|
page: form.value.page,
|
||||||
per_page: form.value.pageSize,
|
per_page: form.value.pageSize,
|
||||||
@@ -179,7 +177,7 @@ const deleteItem = (item) => {
|
|||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
confirmButtonColor: '#03B03C'
|
confirmButtonColor: '#03B03C'
|
||||||
})
|
})
|
||||||
.then(async() => {
|
.then(async () => {
|
||||||
const res = await deleteSurveys(item.sn);
|
const res = await deleteSurveys(item.sn);
|
||||||
if (res.data.message) {
|
if (res.data.message) {
|
||||||
showToast(res.data.message);
|
showToast(res.data.message);
|
||||||
@@ -203,7 +201,7 @@ const copyItem = (item) => {
|
|||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
confirmButtonColor: '#03B03C'
|
confirmButtonColor: '#03B03C'
|
||||||
})
|
})
|
||||||
.then(async() => {
|
.then(async () => {
|
||||||
const res = await copySurveys(item.sn);
|
const res = await copySurveys(item.sn);
|
||||||
if (res.data.code === 200 || res.data.code === 201) {
|
if (res.data.code === 200 || res.data.code === 201) {
|
||||||
showSuccessToast('复制成功');
|
showSuccessToast('复制成功');
|
||||||
@@ -262,7 +260,7 @@ const editItem = (item) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 保存为模板
|
// 保存为模板
|
||||||
const saveTemplate = async(item) => {
|
const saveTemplate = async (item) => {
|
||||||
const data = JSON.parse(JSON.stringify(item));
|
const data = JSON.parse(JSON.stringify(item));
|
||||||
const res = await saveTemplates(item.sn, data);
|
const res = await saveTemplates(item.sn, data);
|
||||||
if (res.data.code === 200 || res.data.code === 201) {
|
if (res.data.code === 200 || res.data.code === 201) {
|
||||||
@@ -363,10 +361,24 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.survey_item_info_desc {
|
.survey_item_info_desc {
|
||||||
margin: 0 7px 0 0;
|
//padding: 7px 9px 6px;
|
||||||
padding: 7px 9px 6px;
|
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background-color: rgba(246, 247, 248, 0.5);
|
//background-color: rgba(246, 247, 248, 0.5);
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0 10px 10px 10px;
|
||||||
|
//padding: 8px;
|
||||||
|
//border-radius: 8px;
|
||||||
|
//background: #f6f7f8;
|
||||||
|
color: #828282;
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
.el-text {
|
.el-text {
|
||||||
width: 323px;
|
width: 323px;
|
||||||
|
|||||||
Reference in New Issue
Block a user