style(css): 优化导航栏样式和内容编辑组件
- 添加 sticky 导航栏样式,设置背景色和文字颜色 - 优化 contenteditable 组件样式,设置内容区域高度 - 更新字体图标样式,添加新图标 -调整列表样式,优化表格和代码高亮显示
This commit is contained in:
@@ -32,6 +32,22 @@ a,
|
|||||||
background: linear-gradient(to bottom, $theme-color 200px, #f2f2f2 300px);
|
background: linear-gradient(to bottom, $theme-color 200px, #f2f2f2 300px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar-header {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #70b937;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
& .van-nav-bar__content {
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
& .van-nav-bar__title {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
a:hover {
|
a:hover {
|
||||||
background-color: hsla(160deg, 100%, 37%, 0.2);
|
background-color: hsla(160deg, 100%, 37%, 0.2);
|
||||||
|
|||||||
BIN
src/assets/img/create-right-back.png
Normal file
BIN
src/assets/img/create-right-back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
@@ -1,8 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex contenteditable align-center space-between" :class="className">
|
<div class="flex contenteditable align-center space-between" :class="className">
|
||||||
<p
|
<p
|
||||||
:id="'editor' + id" ref="editor" :contenteditable="active" class="van-field contenteditable-content"
|
:id="'editor' + id"
|
||||||
@focus="onFocus" v-html="modelValue"
|
ref="editor"
|
||||||
|
:contenteditable="active"
|
||||||
|
class="van-field contenteditable-content"
|
||||||
|
@focus="onFocus"
|
||||||
|
v-html="modelValue"
|
||||||
></p>
|
></p>
|
||||||
<div class="right-icon ml10">
|
<div class="right-icon ml10">
|
||||||
<slot name="right-icon"></slot>
|
<slot name="right-icon"></slot>
|
||||||
@@ -218,6 +222,7 @@ const insertImageAtCaret = (html) => {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.contenteditable-content {
|
.contenteditable-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-icon {
|
.right-icon {
|
||||||
@@ -243,7 +248,7 @@ const insertImageAtCaret = (html) => {
|
|||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
button+button {
|
button + button {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: mobilefont; /* Project id 4841764 */
|
font-family: mobilefont; /* Project id 4841764 */
|
||||||
src:
|
src:
|
||||||
url('iconfont.woff2?t=1742025232194') format('woff2'),
|
url('iconfont.woff2?t=1742191207096') format('woff2'),
|
||||||
url('iconfont.woff?t=1742025232194') format('woff'),
|
url('iconfont.woff?t=1742191207096') format('woff'),
|
||||||
url('iconfont.ttf?t=1742025232194') format('truetype');
|
url('iconfont.ttf?t=1742191207096') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont {
|
.mobilefont {
|
||||||
@@ -14,6 +14,30 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mobilefont-left-long::before {
|
||||||
|
content: '\e601';
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobilefont-rubber::before {
|
||||||
|
content: '\ea15';
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobilefont-huabi::before {
|
||||||
|
content: '\e61f';
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobilefont-chexiao::before {
|
||||||
|
content: '\e6e2';
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobilefont-shangchuan::before {
|
||||||
|
content: '\e613';
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobilefont-qingkong::before {
|
||||||
|
content: '\e6dc';
|
||||||
|
}
|
||||||
|
|
||||||
.mobilefont-jiacu::before {
|
.mobilefont-jiacu::before {
|
||||||
content: '\e71d';
|
content: '\e71d';
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,76 @@
|
|||||||
"css_prefix_text": "mobilefont-",
|
"css_prefix_text": "mobilefont-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "36915584",
|
||||||
|
"name": "left-long",
|
||||||
|
"font_class": "left-long",
|
||||||
|
"unicode": "e601",
|
||||||
|
"unicode_decimal": 58881
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "18171135",
|
||||||
|
"name": "橡皮,擦除,橡皮擦",
|
||||||
|
"font_class": "rubber",
|
||||||
|
"unicode": "ea15",
|
||||||
|
"unicode_decimal": 59925
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "10398166",
|
||||||
|
"name": "画笔",
|
||||||
|
"font_class": "huabi",
|
||||||
|
"unicode": "e61f",
|
||||||
|
"unicode_decimal": 58911
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "4890374",
|
||||||
|
"name": "撤销",
|
||||||
|
"font_class": "chexiao",
|
||||||
|
"unicode": "e6e2",
|
||||||
|
"unicode_decimal": 59106
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "10885297",
|
||||||
|
"name": "上传",
|
||||||
|
"font_class": "shangchuan",
|
||||||
|
"unicode": "e613",
|
||||||
|
"unicode_decimal": 58899
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "9520037",
|
||||||
|
"name": "清空",
|
||||||
|
"font_class": "qingkong",
|
||||||
|
"unicode": "e6dc",
|
||||||
|
"unicode_decimal": 59100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "7192343",
|
||||||
|
"name": "blod",
|
||||||
|
"font_class": "jiacu",
|
||||||
|
"unicode": "e71d",
|
||||||
|
"unicode_decimal": 59165
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "7192349",
|
||||||
|
"name": "qingxie",
|
||||||
|
"font_class": "qingxie",
|
||||||
|
"unicode": "e71e",
|
||||||
|
"unicode_decimal": 59166
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "7192354",
|
||||||
|
"name": "undline",
|
||||||
|
"font_class": "xiahuaxian",
|
||||||
|
"unicode": "e720",
|
||||||
|
"unicode_decimal": 59168
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "7193682",
|
||||||
|
"name": "image",
|
||||||
|
"font_class": "tupian",
|
||||||
|
"unicode": "e730",
|
||||||
|
"unicode_decimal": 59184
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "6135228",
|
"icon_id": "6135228",
|
||||||
"name": "del",
|
"name": "del",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,7 +19,7 @@ import appBridge from '@/assets/js/appBridge';
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
function goBack () {
|
function goBack() {
|
||||||
if (window.history.length > 1 && route.meta.title !== '伊调研') {
|
if (window.history.length > 1 && route.meta.title !== '伊调研') {
|
||||||
router.go(-1);
|
router.go(-1);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -43,13 +43,13 @@ function showModal(options) {
|
|||||||
* @param {*} data
|
* @param {*} data
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const canPlanetPublishPSM = function (data) {
|
const canPlanetPublishPSM = function(data) {
|
||||||
let isFb = true;
|
let isFb = true;
|
||||||
let message = '';
|
let message = '';
|
||||||
let title = '题目设置未完成';
|
let title = '题目设置未完成';
|
||||||
const incompleteQuestionList = [];
|
const incompleteQuestionList = [];
|
||||||
data.questions &&
|
data.questions
|
||||||
data.questions.forEach((s) => {
|
&& data.questions.forEach((s) => {
|
||||||
if (s.question_type === 101 && s.config.price_gradient.length <= 0) {
|
if (s.question_type === 101 && s.config.price_gradient.length <= 0) {
|
||||||
isFb = false;
|
isFb = false;
|
||||||
message = 'psm题目未完成设置,请设置价格区间后投放';
|
message = 'psm题目未完成设置,请设置价格区间后投放';
|
||||||
@@ -73,15 +73,15 @@ const canPlanetPublishPSM = function (data) {
|
|||||||
* @param {*} data
|
* @param {*} data
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const canPlanetPublishMxdAndHotArea = function (data) {
|
const canPlanetPublishMxdAndHotArea = function(data) {
|
||||||
let isFb = true;
|
let isFb = true;
|
||||||
let message = '';
|
let message = '';
|
||||||
const qSteams = [];
|
const qSteams = [];
|
||||||
const incompleteQuestionList = [];
|
const incompleteQuestionList = [];
|
||||||
let type = 0;
|
let type = 0;
|
||||||
let title = '题目设置未完成';
|
let title = '题目设置未完成';
|
||||||
data.questions &&
|
data.questions
|
||||||
data.questions.forEach((s) => {
|
&& data.questions.forEach((s) => {
|
||||||
if (s.question_type === 105 && s.config.design_version <= 0) {
|
if (s.question_type === 105 && s.config.design_version <= 0) {
|
||||||
isFb = false;
|
isFb = false;
|
||||||
message = 'maxdiff题目未完成设置,请生成设计后投放';
|
message = 'maxdiff题目未完成设置,请生成设计后投放';
|
||||||
@@ -120,14 +120,14 @@ const canPlanetPublishMxdAndHotArea = function (data) {
|
|||||||
* @param {*} data
|
* @param {*} data
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const canPlanetPublish3D = function (data) {
|
const canPlanetPublish3D = function(data) {
|
||||||
{
|
{
|
||||||
let canFB = true;
|
let canFB = true;
|
||||||
let message = '';
|
let message = '';
|
||||||
const qSteams = [];
|
const qSteams = [];
|
||||||
let title = '';
|
let title = '';
|
||||||
data.questions &&
|
data.questions
|
||||||
data.questions.forEach((s) => {
|
&& data.questions.forEach((s) => {
|
||||||
if (QUESTION_TYPE.contains(s.question_type)) {
|
if (QUESTION_TYPE.contains(s.question_type)) {
|
||||||
try {
|
try {
|
||||||
if (s.config.is_three_dimensions && !s.config.scene) {
|
if (s.config.is_three_dimensions && !s.config.scene) {
|
||||||
@@ -157,15 +157,15 @@ const canPlanetPublish3D = function (data) {
|
|||||||
let message = '';
|
let message = '';
|
||||||
const qSteams = [];
|
const qSteams = [];
|
||||||
let title = '';
|
let title = '';
|
||||||
data.questions &&
|
data.questions
|
||||||
data.questions.forEach((s) => {
|
&& data.questions.forEach((s) => {
|
||||||
if (QUESTION_TYPE.contains(s.question_type)) {
|
if (QUESTION_TYPE.contains(s.question_type)) {
|
||||||
try {
|
try {
|
||||||
if (s.config.is_three_dimensions && s.config.is_binding_goods) {
|
if (s.config.is_three_dimensions && s.config.is_binding_goods) {
|
||||||
const wares = [];
|
const wares = [];
|
||||||
const _sceneInformation = s.config.scene_information;
|
const _sceneInformation = s.config.scene_information;
|
||||||
const sceneInformation =
|
const sceneInformation
|
||||||
typeof _sceneInformation === 'string'
|
= typeof _sceneInformation === 'string'
|
||||||
? JSON.parse(_sceneInformation)
|
? JSON.parse(_sceneInformation)
|
||||||
: _sceneInformation;
|
: _sceneInformation;
|
||||||
sceneInformation.shelves.forEach((shelf) => {
|
sceneInformation.shelves.forEach((shelf) => {
|
||||||
@@ -215,14 +215,14 @@ const canPlanetPublish3D = function (data) {
|
|||||||
* @param {*} data
|
* @param {*} data
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const canPlanetPublishImage = function (data) {
|
const canPlanetPublishImage = function(data) {
|
||||||
{
|
{
|
||||||
let canFB = true;
|
let canFB = true;
|
||||||
let message = '';
|
let message = '';
|
||||||
const qSteams = [];
|
const qSteams = [];
|
||||||
let title = '';
|
let title = '';
|
||||||
data.questions &&
|
data.questions
|
||||||
data.questions.forEach((s) => {
|
&& data.questions.forEach((s) => {
|
||||||
if (s.question_type === 13) {
|
if (s.question_type === 13) {
|
||||||
try {
|
try {
|
||||||
if (s.options.length <= 0 || s.options.some((y) => y.length <= 0)) {
|
if (s.options.length <= 0 || s.options.some((y) => y.length <= 0)) {
|
||||||
@@ -317,8 +317,8 @@ function canPublishRandom(data, publishType) {
|
|||||||
if (!isValidated) {
|
if (!isValidated) {
|
||||||
errors.push({
|
errors.push({
|
||||||
message:
|
message:
|
||||||
field.message ||
|
field.message
|
||||||
`请填写"${random.title}"中第${index + 1}组"随机题组"的"${field.name}"`
|
|| `请填写"${random.title}"中第${index + 1}组"随机题组"的"${field.name}"`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -350,7 +350,7 @@ function combineQuesAndPage(quesList, pages, pagesStr) {
|
|||||||
newPages.forEach((x, index) => {
|
newPages.forEach((x, index) => {
|
||||||
if (x === 'empty') {
|
if (x === 'empty') {
|
||||||
copyList.splice(index, 0, pagesStr[startIndex]);
|
copyList.splice(index, 0, pagesStr[startIndex]);
|
||||||
startIndex++;
|
startIndex += 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return copyList;
|
return copyList;
|
||||||
@@ -397,11 +397,11 @@ function isLoopingLogicValid(data, publishType) {
|
|||||||
if (
|
if (
|
||||||
(data?.cycle_pages || []).every((i) => {
|
(data?.cycle_pages || []).every((i) => {
|
||||||
return (
|
return (
|
||||||
i.question_index &&
|
i.question_index
|
||||||
i.relation_type !== undefined &&
|
&& i.relation_type !== undefined
|
||||||
i.relation_type !== null &&
|
&& i.relation_type !== null
|
||||||
i.first_page &&
|
&& i.first_page
|
||||||
i.last_page
|
&& i.last_page
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
@@ -425,7 +425,7 @@ function isLoopingLogicValid(data, publishType) {
|
|||||||
* @param sn
|
* @param sn
|
||||||
* @param publishType undefined投放;null投放;0投放;1预览;2投放;3测试
|
* @param publishType undefined投放;null投放;0投放;1预览;2投放;3测试
|
||||||
*/
|
*/
|
||||||
export const canPlanetPublish = async function (sn, publishType) {
|
export const canPlanetPublish = async function(sn, publishType) {
|
||||||
const parsedPublishType = !publishType ? 2 : publishType;
|
const parsedPublishType = !publishType ? 2 : publishType;
|
||||||
const num = window.location.href.indexOf('code=');
|
const num = window.location.href.indexOf('code=');
|
||||||
let code;
|
let code;
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ const chooseItem = () => {
|
|||||||
& .choose-question-context {
|
& .choose-question-context {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border-radius: 8px;
|
border-radius: 16px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
& .title {
|
& .title {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import { getSurveysPage } from '@/api/home/index.js';
|
|||||||
const survey = ref({
|
const survey = ref({
|
||||||
project_name: ''
|
project_name: ''
|
||||||
});
|
});
|
||||||
const fetchSurveys = async () => {
|
const fetchSurveys = async() => {
|
||||||
const params = {
|
const params = {
|
||||||
page: 1,
|
page: 1,
|
||||||
per_page: 10,
|
per_page: 10,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const marketList = ref([]);
|
|||||||
const active = ref(null);
|
const active = ref(null);
|
||||||
const marketInfo = ref([]);
|
const marketInfo = ref([]);
|
||||||
|
|
||||||
const getTableList = async () => {
|
const getTableList = async() => {
|
||||||
const res = await getListScene();
|
const res = await getListScene();
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
res.data.data.forEach((item) => {
|
res.data.data.forEach((item) => {
|
||||||
@@ -31,7 +31,7 @@ const getTableList = async () => {
|
|||||||
getMarketInfo(marketList.value[0]);
|
getMarketInfo(marketList.value[0]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const getMarketInfo = async (item) => {
|
const getMarketInfo = async(item) => {
|
||||||
const data = marketList.value.filter((market, index) => item === index)[0];
|
const data = marketList.value.filter((market, index) => item === index)[0];
|
||||||
if (data) {
|
if (data) {
|
||||||
const params = {
|
const params = {
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<van-nav-bar :title="surveyTitle" left-text="" left-arrow @click-left="$router.go(-1)">
|
<van-nav-bar
|
||||||
|
class="navbar-header"
|
||||||
|
:title="surveyTitle"
|
||||||
|
left-text=""
|
||||||
|
left-arrow
|
||||||
|
@click-left="$router.go(-1)"
|
||||||
|
>
|
||||||
<template #left>
|
<template #left>
|
||||||
<van-icon name="arrow-left" size="18" style="color: #fff" />
|
<van-icon name="left-long" class-prefix="mobilefont" size="18" style="color: #fff" />
|
||||||
</template>
|
</template>
|
||||||
</van-nav-bar>
|
</van-nav-bar>
|
||||||
|
|
||||||
@@ -34,7 +40,9 @@
|
|||||||
|
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </van-cell-group>-->
|
<!-- </van-cell-group>-->
|
||||||
<div class="title-right">图标</div>
|
<div class="title-right">
|
||||||
|
<div class="right-icon"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ques">
|
<div class="ques">
|
||||||
@@ -549,37 +557,49 @@ onMounted(async() => {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import '@/assets/css/theme';
|
@import '@/assets/css/theme';
|
||||||
|
|
||||||
::v-deep .van-nav-bar {
|
|
||||||
background-color: #70b937;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
& .van-nav-bar__content {
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
& .van-nav-bar__title {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
& .question-title {
|
& .question-title {
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
|
|
||||||
& .title-left {
|
& .title-left {
|
||||||
|
max-height: 200px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
::v-deep .content-title {
|
::v-deep .content-title {
|
||||||
|
overflow: auto;
|
||||||
|
width: 230px;
|
||||||
|
height: 30px;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .introduction {
|
||||||
|
overflow: auto;
|
||||||
|
width: 230px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& .title-right {
|
& .title-right {
|
||||||
margin-right: 50px;
|
position: relative;
|
||||||
margin-left: 20px;
|
flex: 1;
|
||||||
|
width: 65px; /* 根据实际图片大小调整 */
|
||||||
|
height: 50px;
|
||||||
|
margin-right: 40px;
|
||||||
|
margin-left: 30px;
|
||||||
|
padding-top: 30px;
|
||||||
|
|
||||||
|
& .right-icon {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -70px;
|
||||||
|
left: -10px;
|
||||||
|
width: 65px; /* 根据实际图片大小调整 */
|
||||||
|
height: 140px; /* 根据实际图片大小调整 */
|
||||||
|
background: url('@/assets/img/create-right-back.png') no-repeat center center;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -600,10 +620,6 @@ onMounted(async() => {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
|
||||||
//font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .van-popup--bottom.van-popup--round {
|
::v-deep .van-popup--bottom.van-popup--round {
|
||||||
@@ -673,8 +689,6 @@ onMounted(async() => {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: rgba(240, 248, 235, 1);
|
background: rgba(240, 248, 235, 1);
|
||||||
color: $theme-color;
|
color: $theme-color;
|
||||||
|
|
||||||
//opacity: 0.1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -683,7 +697,7 @@ onMounted(async() => {
|
|||||||
height: 250px;
|
height: 250px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border-radius: 8px;
|
border-radius: 16px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="scrollbar" class="container">
|
<div ref="scrollbar" class="container">
|
||||||
<van-nav-bar title="预览" left-arrow />
|
<van-nav-bar title="预览" left-arrow>
|
||||||
|
<template #left>
|
||||||
|
<van-icon name="left-long" class-prefix="mobilefont" size="18" style="color: #fff" />
|
||||||
|
</template>
|
||||||
|
</van-nav-bar>
|
||||||
<!-- <van-nav-bar :title="getDomString(questionsData?.survey?.title)" left-arrow />-->
|
<!-- <van-nav-bar :title="getDomString(questionsData?.survey?.title)" left-arrow />-->
|
||||||
|
|
||||||
<!-- 进度条 -->
|
<!-- 进度条 -->
|
||||||
@@ -20,7 +24,9 @@
|
|||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div
|
<div
|
||||||
v-if="styleInfo.logo_status && styleInfo.logo_url" class="example-logo" :style="[
|
v-if="styleInfo.logo_status && styleInfo.logo_url"
|
||||||
|
class="example-logo"
|
||||||
|
:style="[
|
||||||
{
|
{
|
||||||
'justify-content':
|
'justify-content':
|
||||||
styleInfo.logo_site === 1
|
styleInfo.logo_site === 1
|
||||||
@@ -41,29 +47,53 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 问题 -->
|
<!-- 问题 -->
|
||||||
<!-- eslint-disable-next-line -->
|
<!-- eslint-disable-next-line -->
|
||||||
<div class="questions" :style="`min-height: ${styleInfo.head_img_status ? 'calc(100% - 240px)' : '100%'};${styleInfo.background_status
|
<div
|
||||||
? `background-color: ${styleInfo.background_color};background-image: url(${styleInfo.background_url})`
|
class="questions"
|
||||||
: ''
|
:style="`min-height: ${styleInfo.head_img_status ? 'calc(100% - 240px)' : '100%'};${
|
||||||
}`"
|
styleInfo.background_status
|
||||||
|
? `background-color: ${styleInfo.background_color};background-image: url(${styleInfo.background_url})`
|
||||||
|
: ''
|
||||||
|
}`"
|
||||||
>
|
>
|
||||||
<!-- 提前终止和正常完成 -->
|
<!-- 提前终止和正常完成 -->
|
||||||
<q-last
|
<q-last
|
||||||
v-if="page === pages.length + 1" :code="questionsData.action?.code" :action="questionsData.action"
|
v-if="page === pages.length + 1"
|
||||||
:survey="questionsData.survey" :isAnswer="isAnswer" :isTemplate="isTemplate"
|
:code="questionsData.action?.code"
|
||||||
|
:action="questionsData.action"
|
||||||
|
:survey="questionsData.survey"
|
||||||
|
:isAnswer="isAnswer"
|
||||||
|
:isTemplate="isTemplate"
|
||||||
/>
|
/>
|
||||||
<!-- 问卷名和描述 -->
|
<!-- 问卷名和描述 -->
|
||||||
<q-first
|
<q-first
|
||||||
v-else-if="page === 0" isMobile :title="questionsData?.survey?.title"
|
v-else-if="page === 0"
|
||||||
:desc="questionsData?.survey?.introduction" :questions="questionsData?.questions" :isAnswer="isAnswer"
|
isMobile
|
||||||
:showTitle="styleInfo.is_title" :showDesc="styleInfo.is_introduce" :label="questionsData?.survey?.title"
|
:title="questionsData?.survey?.title"
|
||||||
|
:desc="questionsData?.survey?.introduction"
|
||||||
|
:questions="questionsData?.questions"
|
||||||
|
:isAnswer="isAnswer"
|
||||||
|
:showTitle="styleInfo.is_title"
|
||||||
|
:showDesc="styleInfo.is_introduce"
|
||||||
|
:label="questionsData?.survey?.title"
|
||||||
/>
|
/>
|
||||||
<!-- 题-mobile -->
|
<!-- 题-mobile -->
|
||||||
<question
|
<question
|
||||||
v-for="question in questions" v-else :id="'questionIndex' + question.question_index"
|
v-for="question in questions"
|
||||||
:key="question.question_index" class="question" :tip="question.tip" :stem="question.stem"
|
v-else
|
||||||
:title="question.title" :error="question.error" :warning="question.warning" :questions="questionsData.questions"
|
:id="'questionIndex' + question.question_index"
|
||||||
:questionType="question.question_type" :questionIndex="question.question_index"
|
:key="question.question_index"
|
||||||
:showTitle="styleInfo.is_question_number && true" isMobile :isAnswer="isAnswer"
|
class="question"
|
||||||
|
:tip="question.tip"
|
||||||
|
:stem="question.stem"
|
||||||
|
:title="question.title"
|
||||||
|
:error="question.error"
|
||||||
|
:warning="question.warning"
|
||||||
|
:questions="questionsData.questions"
|
||||||
|
:questionType="question.question_type"
|
||||||
|
:questionIndex="question.question_index"
|
||||||
|
:showTitle="styleInfo.is_question_number && true"
|
||||||
|
isMobile
|
||||||
|
:isAnswer="isAnswer"
|
||||||
>
|
>
|
||||||
<!-- <q-radio-->
|
<!-- <q-radio-->
|
||||||
<!-- v-if="question.question_type === 1"-->
|
<!-- v-if="question.question_type === 1"-->
|
||||||
@@ -81,10 +111,18 @@
|
|||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- 单选题 -->
|
<!-- 单选题 -->
|
||||||
<preview-choice
|
<preview-choice
|
||||||
v-if="question.question_type === 1" v-model:answer="question.answer"
|
v-if="question.question_type === 1"
|
||||||
v-model:answerIndex="question.answerIndex" :list="question.list" :config="question.config"
|
v-model:answer="question.answer"
|
||||||
:hideOptions="question.hideOptions" :stem="question.stem" :answerSn="questionsData.answer.sn"
|
v-model:answerIndex="question.answerIndex"
|
||||||
:answerSurveySn="questionsData.answer.survey_sn" :question="question" @previous="previous" @next="next"
|
:list="question.list"
|
||||||
|
:config="question.config"
|
||||||
|
:hideOptions="question.hideOptions"
|
||||||
|
:stem="question.stem"
|
||||||
|
:answerSn="questionsData.answer.sn"
|
||||||
|
:answerSurveySn="questionsData.answer.survey_sn"
|
||||||
|
:question="question"
|
||||||
|
@previous="previous"
|
||||||
|
@next="next"
|
||||||
@change-answer="onRelation($event, question)"
|
@change-answer="onRelation($event, question)"
|
||||||
/>
|
/>
|
||||||
<!-- <!– 多选题 –>-->
|
<!-- <!– 多选题 –>-->
|
||||||
@@ -115,9 +153,16 @@
|
|||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- 填空题 -->
|
<!-- 填空题 -->
|
||||||
<preview-completion
|
<preview-completion
|
||||||
v-else-if="question.question_type === 4" :config="question.config" :answer="question.answer"
|
v-else-if="question.question_type === 4"
|
||||||
:stem="question.stem" :answerSn="questionsData.answer.sn" :answerSurveySn="questionsData.answer.survey_sn"
|
:config="question.config"
|
||||||
:question="question" @previous="previous" @next="next" @change-answer="onRelation($event, question)"
|
:answer="question.answer"
|
||||||
|
:stem="question.stem"
|
||||||
|
:answerSn="questionsData.answer.sn"
|
||||||
|
:answerSurveySn="questionsData.answer.survey_sn"
|
||||||
|
:question="question"
|
||||||
|
@previous="previous"
|
||||||
|
@next="next"
|
||||||
|
@change-answer="onRelation($event, question)"
|
||||||
/>
|
/>
|
||||||
<!-- <!– 打分题 –>-->
|
<!-- <!– 打分题 –>-->
|
||||||
<!-- <q-rate-->
|
<!-- <q-rate-->
|
||||||
@@ -152,21 +197,38 @@
|
|||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- 矩阵填空题 -->
|
<!-- 矩阵填空题 -->
|
||||||
<preview-matrix-text
|
<preview-matrix-text
|
||||||
v-else-if="question.question_type === 8" v-model:answer="question.answer"
|
v-else-if="question.question_type === 8"
|
||||||
:list="question.list" :config="question.config" :stem="question.stem" :question="question"
|
v-model:answer="question.answer"
|
||||||
@previous="previous" @next="next" @change-answer="onRelation($event, question)"
|
:list="question.list"
|
||||||
|
:config="question.config"
|
||||||
|
:stem="question.stem"
|
||||||
|
:question="question"
|
||||||
|
@previous="previous"
|
||||||
|
@next="next"
|
||||||
|
@change-answer="onRelation($event, question)"
|
||||||
/>
|
/>
|
||||||
<!-- 矩阵单选题 -->
|
<!-- 矩阵单选题 -->
|
||||||
<preview-matrix-radio
|
<preview-matrix-radio
|
||||||
v-else-if="question.question_type === 9" v-model:answer="question.answer"
|
v-else-if="question.question_type === 9"
|
||||||
:list="question.list" :config="question.config" :stem="question.stem" :answerSn="questionsData.answer.sn"
|
v-model:answer="question.answer"
|
||||||
:answerSurveySn="questionsData.answer.survey_sn" :question="question"
|
:list="question.list"
|
||||||
@change-answer="onRelation($event, question)" @previous="previous" @next="next"
|
:config="question.config"
|
||||||
|
:stem="question.stem"
|
||||||
|
:answerSn="questionsData.answer.sn"
|
||||||
|
:answerSurveySn="questionsData.answer.survey_sn"
|
||||||
|
:question="question"
|
||||||
|
@change-answer="onRelation($event, question)"
|
||||||
|
@previous="previous"
|
||||||
|
@next="next"
|
||||||
/>
|
/>
|
||||||
<!-- 矩阵多选题 -->
|
<!-- 矩阵多选题 -->
|
||||||
<preview-matrix-checkbox
|
<preview-matrix-checkbox
|
||||||
v-else-if="question.question_type === 10" v-model:answer="question.answer"
|
v-else-if="question.question_type === 10"
|
||||||
:list="question.list" :config="question.config" :question="question" isMobile
|
v-model:answer="question.answer"
|
||||||
|
:list="question.list"
|
||||||
|
:config="question.config"
|
||||||
|
:question="question"
|
||||||
|
isMobile
|
||||||
@change-answer="onRelation($event, question)"
|
@change-answer="onRelation($event, question)"
|
||||||
/>
|
/>
|
||||||
<!-- <!– 矩阵打分题 –>-->
|
<!-- <!– 矩阵打分题 –>-->
|
||||||
@@ -237,8 +299,12 @@
|
|||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- 文件上传题 -->
|
<!-- 文件上传题 -->
|
||||||
<preview-file-upload
|
<preview-file-upload
|
||||||
v-else-if="question.question_type === 18" v-model:answer="question.answer"
|
v-else-if="question.question_type === 18"
|
||||||
:config="question.config" :question="question" isMobile :questionIndex="question.question_index"
|
v-model:answer="question.answer"
|
||||||
|
:config="question.config"
|
||||||
|
:question="question"
|
||||||
|
isMobile
|
||||||
|
:questionIndex="question.question_index"
|
||||||
@change-answer="onRelation($event, question)"
|
@change-answer="onRelation($event, question)"
|
||||||
/>
|
/>
|
||||||
<!-- <!– 地理位置题 –>-->
|
<!-- <!– 地理位置题 –>-->
|
||||||
@@ -400,31 +466,60 @@
|
|||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- <!– 高级题型-NPS –>-->
|
<!-- <!– 高级题型-NPS –>-->
|
||||||
<preview-n-p-s
|
<preview-n-p-s
|
||||||
v-else-if="question.question_type === 106" v-model:answer="question.answer" :isPreview="true"
|
v-else-if="question.question_type === 106"
|
||||||
:title="question.title" :stem="question.stem" :list="question.list" :config="question.config"
|
v-model:answer="question.answer"
|
||||||
:isAnswer="isAnswer" :questionIndex="question.question_index" :label="question.title" :loading="loading"
|
:isPreview="true"
|
||||||
:isTemplate="isTemplate" :showTitle="styleInfo.is_question_number" :question="question" @previous="previous"
|
:title="question.title"
|
||||||
@next="next" @change-answer="onRelation($event, question)"
|
:stem="question.stem"
|
||||||
|
:list="question.list"
|
||||||
|
:config="question.config"
|
||||||
|
:isAnswer="isAnswer"
|
||||||
|
:questionIndex="question.question_index"
|
||||||
|
:label="question.title"
|
||||||
|
:loading="loading"
|
||||||
|
:isTemplate="isTemplate"
|
||||||
|
:showTitle="styleInfo.is_question_number"
|
||||||
|
:question="question"
|
||||||
|
@previous="previous"
|
||||||
|
@next="next"
|
||||||
|
@change-answer="onRelation($event, question)"
|
||||||
/>
|
/>
|
||||||
</question>
|
</question>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<!-- eslint-disable max-len -->
|
<!-- eslint-disable max-len -->
|
||||||
<div v-show="showPage" class="footer-page">
|
<div v-show="showPage" class="footer-page">
|
||||||
<pfe-pagination
|
<pfe-pagination
|
||||||
class="pagination" :page="page" :pages="pages.length + 1" :min="styleInfo.is_home ? 0 : 1"
|
class="pagination"
|
||||||
:loading="loading" :showPrevious="styleInfo.is_up_button" :showStart="styleInfo.is_start_button"
|
:page="page"
|
||||||
:startText="styleInfo.start_button_text" :showSubmit="styleInfo.is_submit_button" :submitText="localPageTimer.is_show && localPageTimer.short_time
|
:pages="pages.length + 1"
|
||||||
? `${localPageTimer.short_time}S`
|
:min="styleInfo.is_home ? 0 : 1"
|
||||||
: styleInfo.submit_button_text
|
:loading="loading"
|
||||||
" :buttonTextColor="styleInfo.button_text_color" :buttonColor="styleInfo.button_color" :nextText="localPageTimer.is_show && localPageTimer.short_time
|
:showPrevious="styleInfo.is_up_button"
|
||||||
? `${localPageTimer.short_time}S`
|
:showStart="styleInfo.is_start_button"
|
||||||
: ''
|
:startText="styleInfo.start_button_text"
|
||||||
" :nextDisabled="localPageTimer.short_time" isMobile @previous="previous" @next="next"
|
:showSubmit="styleInfo.is_submit_button"
|
||||||
|
:submitText="
|
||||||
|
localPageTimer.is_show && localPageTimer.short_time
|
||||||
|
? `${localPageTimer.short_time}S`
|
||||||
|
: styleInfo.submit_button_text
|
||||||
|
"
|
||||||
|
:buttonTextColor="styleInfo.button_text_color"
|
||||||
|
:buttonColor="styleInfo.button_color"
|
||||||
|
:nextText="
|
||||||
|
localPageTimer.is_show && localPageTimer.short_time
|
||||||
|
? `${localPageTimer.short_time}S`
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
:nextDisabled="localPageTimer.short_time"
|
||||||
|
isMobile
|
||||||
|
@previous="previous"
|
||||||
|
@next="next"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- eslint-enable max-len -->
|
<!-- eslint-enable max-len -->
|
||||||
<LangTranslate
|
<LangTranslate
|
||||||
v-if="isAnswer && styleInfo.is_yip" translate-key="PoweredByDigitalTechnologyCenterYIP"
|
v-if="isAnswer && styleInfo.is_yip"
|
||||||
|
translate-key="PoweredByDigitalTechnologyCenterYIP"
|
||||||
class="footer"
|
class="footer"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,8 +24,13 @@
|
|||||||
<div v-if="status === 0 || status === 2" class="pulish-container">
|
<div v-if="status === 0 || status === 2" class="pulish-container">
|
||||||
<img class="not-publish-icon" src="@/assets/img/publish/not_pulish.png" alt="" />
|
<img class="not-publish-icon" src="@/assets/img/publish/not_pulish.png" alt="" />
|
||||||
<div class="text">点击"启用"按钮后,问卷才可以开始回收数据</div>
|
<div class="text">点击"启用"按钮后,问卷才可以开始回收数据</div>
|
||||||
<van-button type="primary" style="margin-top: 20px" class="publish-btn" color="#70b936"
|
<van-button
|
||||||
@click="openPublishModal">
|
type="primary"
|
||||||
|
style="margin-top: 20px"
|
||||||
|
class="publish-btn"
|
||||||
|
color="#70b936"
|
||||||
|
@click="openPublishModal"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<i class="mobilefont icon-fabu3" style="margin-right: 6px"></i>
|
<i class="mobilefont icon-fabu3" style="margin-right: 6px"></i>
|
||||||
</template>
|
</template>
|
||||||
@@ -103,7 +108,7 @@ const operateBtn = (item: OperateItem) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 复制链接
|
// 复制链接
|
||||||
function copyLink () {
|
function copyLink() {
|
||||||
const input = document.createElement('input');
|
const input = document.createElement('input');
|
||||||
input.value = publishInfo.value.url;
|
input.value = publishInfo.value.url;
|
||||||
document.body.appendChild(input);
|
document.body.appendChild(input);
|
||||||
@@ -113,7 +118,7 @@ function copyLink () {
|
|||||||
showToast('复制成功');
|
showToast('复制成功');
|
||||||
}
|
}
|
||||||
// 分享链接
|
// 分享链接
|
||||||
function shareLink () {
|
function shareLink() {
|
||||||
const params = {
|
const params = {
|
||||||
type: 'shareToWx',
|
type: 'shareToWx',
|
||||||
title: publishInfo.value.download_url.title,
|
title: publishInfo.value.download_url.title,
|
||||||
@@ -123,12 +128,12 @@ function shareLink () {
|
|||||||
scene: 0 // 朋友圈1 微信好友0
|
scene: 0 // 朋友圈1 微信好友0
|
||||||
};
|
};
|
||||||
console.log('shareUrl', publishInfo.value.url);
|
console.log('shareUrl', publishInfo.value.url);
|
||||||
appBridge.shareToWeChat(params, () => {
|
// eslint-disable-next-line
|
||||||
});
|
appBridge.shareToWeChat(params, () => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载二维码
|
// 下载二维码
|
||||||
function downLoadImg () {
|
function downLoadImg() {
|
||||||
const { title, url } = publishInfo.value.download_url;
|
const { title, url } = publishInfo.value.download_url;
|
||||||
if (utils.getSessionStorage('xToken')) {
|
if (utils.getSessionStorage('xToken')) {
|
||||||
appBridge.save2Album(url, () => {
|
appBridge.save2Album(url, () => {
|
||||||
@@ -143,7 +148,7 @@ function downLoadImg () {
|
|||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function openPublishModal () {
|
async function openPublishModal() {
|
||||||
const res = await canPlanetPublish(route.query.sn as string, publishType.value);
|
const res = await canPlanetPublish(route.query.sn as string, publishType.value);
|
||||||
if (res) {
|
if (res) {
|
||||||
await publishSurvey({
|
await publishSurvey({
|
||||||
@@ -159,7 +164,7 @@ async function openPublishModal () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCode () {
|
function getCode() {
|
||||||
getQrcode(sn)
|
getQrcode(sn)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
@@ -170,7 +175,7 @@ function getCode () {
|
|||||||
showFailToast(error.data?.message || error.message || '服务器错误');
|
showFailToast(error.data?.message || error.message || '服务器错误');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function fetchInfo () {
|
function fetchInfo() {
|
||||||
getSurveyInfo(sn)
|
getSurveyInfo(sn)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
status.value = Number(res.data.data.status);
|
status.value = Number(res.data.data.status);
|
||||||
@@ -201,11 +206,12 @@ onMounted(async () => {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.container {
|
.container {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: linear-gradient(to bottom, #70B937 5.33333rem, #F2F2F2 8rem);
|
background: linear-gradient(to bottom, #70b937 5.3rem, #f2f2f2 8rem);
|
||||||
|
|
||||||
button {
|
button {
|
||||||
padding: 3px 20px;
|
padding: 3px 20px;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
/* background-color: #f2f2f2; */
|
/* background-color: #f2f2f2; */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -226,21 +232,19 @@ onMounted(async () => {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
line-height: 20px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tip {
|
.tip {
|
||||||
margin: 18px 24px;
|
margin: 18px 24px;
|
||||||
font-size: 12px;
|
|
||||||
color: #7f7f7f;
|
color: #7f7f7f;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.operation {
|
.operation {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|||||||
Reference in New Issue
Block a user