style: style lint
This commit is contained in:
@@ -4,7 +4,7 @@ import { onMounted } from 'vue';
|
|||||||
import appBridge from '@/assets/js/appBridge';
|
import appBridge from '@/assets/js/appBridge';
|
||||||
import utils from '@/assets/js/common';
|
import utils from '@/assets/js/common';
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async() => {
|
||||||
if (utils.getParameter('digitalYiliToken')) {
|
if (utils.getParameter('digitalYiliToken')) {
|
||||||
// 隐藏/显示 header
|
// 隐藏/显示 header
|
||||||
appBridge.setHeaderShown(false);
|
appBridge.setHeaderShown(false);
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ export default class CommonApi {
|
|||||||
};
|
};
|
||||||
/* eslint-disable no-useless-escape */
|
/* eslint-disable no-useless-escape */
|
||||||
const reg = /\\|\/|\?|\?|\*|"|“|”|'|‘|’|<|>|{|}|\[|\]|\【|\】|:|:|、|\^|\$|!|~|`|\s|\+/g;
|
const reg = /\\|\/|\?|\?|\*|"|“|”|'|‘|’|<|>|{|}|\[|\]|\【|\】|:|:|、|\^|\$|!|~|`|\s|\+/g;
|
||||||
name =
|
name
|
||||||
name ||
|
= name
|
||||||
getRandomFileName(file?.name?.replace(reg, '') ?? '' ?? `${new Date().getTime()}.png`);
|
|| getRandomFileName(file?.name?.replace(reg, '') ?? '' ?? `${new Date().getTime()}.png`);
|
||||||
const res = await CommonApi.getOssInfo();
|
const res = await CommonApi.getOssInfo();
|
||||||
/* eslint-enable no-useless-escape */
|
/* eslint-enable no-useless-escape */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
.van-nav-bar {
|
.van-nav-bar {
|
||||||
padding-top: calc(var(--status-bar-height) + 10px) !important;
|
padding-top: calc(var(--status-bar-height) + 10px) !important;
|
||||||
|
|
||||||
// height: calc(46px + var(--status-bar-height)) !important;
|
// height: calc(46px + var(--status-bar-height)) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-cell {
|
.van-cell {
|
||||||
padding: 8px !important;
|
padding: 8px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,8 +170,8 @@ const getMaxDateLimit = computed(() => {
|
|||||||
props.format
|
props.format
|
||||||
);
|
);
|
||||||
const tempStr = '0000-12-31 23:59:59';
|
const tempStr = '0000-12-31 23:59:59';
|
||||||
const result =
|
const result
|
||||||
props.maxDate.length !== 0 && thisMax.length > props.maxDate.length
|
= props.maxDate.length !== 0 && thisMax.length > props.maxDate.length
|
||||||
? thisMax.slice(0, props.maxDate.length) + tempStr.slice(props.maxDate.length)
|
? thisMax.slice(0, props.maxDate.length) + tempStr.slice(props.maxDate.length)
|
||||||
: thisMax;
|
: thisMax;
|
||||||
return result.slice(0, props.format.length);
|
return result.slice(0, props.format.length);
|
||||||
@@ -194,8 +194,8 @@ function onChange({ selectedValues, columnIndex }) {
|
|||||||
renderMinuteColumns,
|
renderMinuteColumns,
|
||||||
renderSecondColumns
|
renderSecondColumns
|
||||||
];
|
];
|
||||||
updateColumns[columnIndex] &&
|
updateColumns[columnIndex]
|
||||||
updateColumns[columnIndex](changeValue, getMinDateLimit.value, getMaxDateLimit.value, false);
|
&& updateColumns[columnIndex](changeValue, getMinDateLimit.value, getMaxDateLimit.value, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 渲染全部列
|
// 渲染全部列
|
||||||
|
|||||||
@@ -4,17 +4,17 @@
|
|||||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
||||||
src:
|
src:
|
||||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix')
|
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix')
|
||||||
format('embedded-opentype'),
|
format('embedded-opentype'),
|
||||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
||||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
||||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont')
|
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont')
|
||||||
format('svg');
|
format('svg');
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
font-family: 'iconfont logo';
|
|
||||||
font-size: 160px;
|
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
font-size: 160px;
|
||||||
|
font-family: 'iconfont logo';
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
@@ -29,8 +29,8 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
line-height: 42px;
|
|
||||||
color: #666;
|
color: #666;
|
||||||
|
line-height: 42px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tabs {
|
#tabs {
|
||||||
@@ -38,17 +38,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#tabs li {
|
#tabs li {
|
||||||
cursor: pointer;
|
|
||||||
width: 100px;
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 16px;
|
|
||||||
border-bottom: 2px solid transparent;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
margin-bottom: -1px;
|
margin-bottom: -1px;
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tabs .active {
|
#tabs .active {
|
||||||
@@ -62,25 +62,25 @@
|
|||||||
|
|
||||||
/* 页面布局 */
|
/* 页面布局 */
|
||||||
.main {
|
.main {
|
||||||
padding: 30px 100px;
|
|
||||||
width: 960px;
|
width: 960px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
padding: 30px 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main .logo {
|
.main .logo {
|
||||||
color: #333;
|
overflow: hidden;
|
||||||
text-align: left;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
line-height: 1;
|
|
||||||
height: 110px;
|
height: 110px;
|
||||||
margin-top: -50px;
|
margin-top: -50px;
|
||||||
overflow: hidden;
|
margin-bottom: 30px;
|
||||||
|
color: #333;
|
||||||
|
line-height: 1;
|
||||||
|
text-align: left;
|
||||||
*zoom: 1;
|
*zoom: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main .logo a {
|
.main .logo a {
|
||||||
font-size: 160px;
|
|
||||||
color: #333;
|
color: #333;
|
||||||
|
font-size: 160px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.helps {
|
.helps {
|
||||||
@@ -88,25 +88,25 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.helps pre {
|
.helps pre {
|
||||||
padding: 20px;
|
overflow: auto;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
|
padding: 20px;
|
||||||
border: solid 1px #e7e1cd;
|
border: solid 1px #e7e1cd;
|
||||||
background-color: #fffdef;
|
background-color: #fffdef;
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon_lists {
|
.icon_lists {
|
||||||
width: 100% !important;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
width: 100% !important;
|
||||||
*zoom: 1;
|
*zoom: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon_lists li {
|
.icon_lists li {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
text-align: center;
|
margin-bottom: 10px;
|
||||||
list-style: none !important;
|
list-style: none !important;
|
||||||
|
text-align: center;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,10 +117,10 @@
|
|||||||
.icon_lists .icon {
|
.icon_lists .icon {
|
||||||
display: block;
|
display: block;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
line-height: 100px;
|
|
||||||
font-size: 42px;
|
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
font-size: 42px;
|
||||||
|
line-height: 100px;
|
||||||
-webkit-transition:
|
-webkit-transition:
|
||||||
font-size 0.25s linear,
|
font-size 0.25s linear,
|
||||||
width 0.25s linear;
|
width 0.25s linear;
|
||||||
@@ -137,15 +137,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon_lists .svg-icon {
|
.icon_lists .svg-icon {
|
||||||
/* 通过设置 font-size 来改变图标大小 */
|
|
||||||
width: 1em;
|
|
||||||
/* 图标和文字相邻时,垂直对齐 */
|
/* 图标和文字相邻时,垂直对齐 */
|
||||||
vertical-align: -0.15em;
|
vertical-align: -0.15em;
|
||||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
|
||||||
fill: currentColor;
|
|
||||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||||
normalize.css 中也包含这行 */
|
normalize.css 中也包含这行 */
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
/* 通过设置 font-size 来改变图标大小 */
|
||||||
|
width: 1em;
|
||||||
|
|
||||||
|
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||||
|
fill: currentcolor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon_lists li .name,
|
.icon_lists li .name,
|
||||||
@@ -170,10 +173,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.markdown h1 {
|
.markdown h1 {
|
||||||
|
margin-bottom: 24px;
|
||||||
color: #404040;
|
color: #404040;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown h2,
|
.markdown h2,
|
||||||
@@ -181,10 +184,10 @@
|
|||||||
.markdown h4,
|
.markdown h4,
|
||||||
.markdown h5,
|
.markdown h5,
|
||||||
.markdown h6 {
|
.markdown h6 {
|
||||||
color: #404040;
|
|
||||||
margin: 1.6em 0 0.6em 0;
|
|
||||||
font-weight: 500;
|
|
||||||
clear: both;
|
clear: both;
|
||||||
|
margin: 1.6em 0 0.6em;
|
||||||
|
color: #404040;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown h1 {
|
.markdown h1 {
|
||||||
@@ -212,11 +215,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.markdown hr {
|
.markdown hr {
|
||||||
|
clear: both;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
|
margin: 16px 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: #e9e9e9;
|
background: #e9e9e9;
|
||||||
margin: 16px 0;
|
|
||||||
clear: both;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown p {
|
.markdown p {
|
||||||
@@ -259,8 +262,8 @@
|
|||||||
.markdown code {
|
.markdown code {
|
||||||
margin: 0 3px;
|
margin: 0 3px;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
background: #eee;
|
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
background: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown strong,
|
.markdown strong,
|
||||||
@@ -269,24 +272,24 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.markdown > table {
|
.markdown > table {
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0px;
|
|
||||||
empty-cells: show;
|
|
||||||
border: 1px solid #e9e9e9;
|
|
||||||
width: 95%;
|
width: 95%;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
border: 1px solid #e9e9e9;
|
||||||
|
border-spacing: 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
empty-cells: show;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown > table th {
|
.markdown > table th {
|
||||||
white-space: nowrap;
|
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown > table th,
|
.markdown > table th,
|
||||||
.markdown > table td {
|
.markdown > table td {
|
||||||
border: 1px solid #e9e9e9;
|
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
|
border: 1px solid #e9e9e9;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,11 +298,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.markdown blockquote {
|
.markdown blockquote {
|
||||||
font-size: 90%;
|
|
||||||
color: #999;
|
|
||||||
border-left: 4px solid #e9e9e9;
|
|
||||||
padding-left: 0.8em;
|
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
|
padding-left: 0.8em;
|
||||||
|
border-left: 4px solid #e9e9e9;
|
||||||
|
color: #999;
|
||||||
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown blockquote p {
|
.markdown blockquote p {
|
||||||
@@ -307,9 +310,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.markdown .anchor {
|
.markdown .anchor {
|
||||||
|
margin-left: 8px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.3s ease;
|
transition: opacity 0.3s ease;
|
||||||
margin-left: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown .waiting {
|
.markdown .waiting {
|
||||||
@@ -322,8 +325,8 @@
|
|||||||
.markdown h4:hover .anchor,
|
.markdown h4:hover .anchor,
|
||||||
.markdown h5:hover .anchor,
|
.markdown h5:hover .anchor,
|
||||||
.markdown h6:hover .anchor {
|
.markdown h6:hover .anchor {
|
||||||
opacity: 1;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown > br,
|
.markdown > br,
|
||||||
@@ -333,10 +336,10 @@
|
|||||||
|
|
||||||
.hljs {
|
.hljs {
|
||||||
display: block;
|
display: block;
|
||||||
background: white;
|
|
||||||
padding: 0.5em;
|
|
||||||
color: #333333;
|
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: white;
|
||||||
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs-comment,
|
.hljs-comment,
|
||||||
@@ -372,7 +375,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hljs-tag {
|
.hljs-tag {
|
||||||
color: #333333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs-title,
|
.hljs-title,
|
||||||
@@ -385,13 +388,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hljs-addition {
|
.hljs-addition {
|
||||||
color: #55a532;
|
|
||||||
background-color: #eaffea;
|
background-color: #eaffea;
|
||||||
|
color: #55a532;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs-deletion {
|
.hljs-deletion {
|
||||||
color: #bd2c00;
|
|
||||||
background-color: #ffecec;
|
background-color: #ffecec;
|
||||||
|
color: #bd2c00;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs-link {
|
.hljs-link {
|
||||||
@@ -399,8 +402,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 代码高亮 */
|
/* 代码高亮 */
|
||||||
|
|
||||||
/* PrismJS 1.15.0
|
/* PrismJS 1.15.0
|
||||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* prism.js default theme for JavaScript, CSS and HTML
|
* prism.js default theme for JavaScript, CSS and HTML
|
||||||
* Based on dabblet (http://dabblet.com)
|
* Based on dabblet (http://dabblet.com)
|
||||||
@@ -408,21 +413,19 @@ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javasc
|
|||||||
*/
|
*/
|
||||||
code[class*='language-'],
|
code[class*='language-'],
|
||||||
pre[class*='language-'] {
|
pre[class*='language-'] {
|
||||||
color: black;
|
|
||||||
background: none;
|
background: none;
|
||||||
text-shadow: 0 1px white;
|
color: black;
|
||||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||||
|
line-height: 1.5;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
text-shadow: 0 1px white;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
word-spacing: normal;
|
word-spacing: normal;
|
||||||
word-break: normal;
|
|
||||||
word-wrap: normal;
|
word-wrap: normal;
|
||||||
line-height: 1.5;
|
word-break: normal;
|
||||||
|
|
||||||
-moz-tab-size: 4;
|
-moz-tab-size: 4;
|
||||||
-o-tab-size: 4;
|
-o-tab-size: 4;
|
||||||
tab-size: 4;
|
tab-size: 4;
|
||||||
|
|
||||||
-webkit-hyphens: none;
|
-webkit-hyphens: none;
|
||||||
-moz-hyphens: none;
|
-moz-hyphens: none;
|
||||||
-ms-hyphens: none;
|
-ms-hyphens: none;
|
||||||
@@ -433,16 +436,16 @@ pre[class*='language-']::-moz-selection,
|
|||||||
pre[class*='language-'] ::-moz-selection,
|
pre[class*='language-'] ::-moz-selection,
|
||||||
code[class*='language-']::-moz-selection,
|
code[class*='language-']::-moz-selection,
|
||||||
code[class*='language-'] ::-moz-selection {
|
code[class*='language-'] ::-moz-selection {
|
||||||
text-shadow: none;
|
|
||||||
background: #b3d4fc;
|
background: #b3d4fc;
|
||||||
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre[class*='language-']::selection,
|
pre[class*='language-']::selection,
|
||||||
pre[class*='language-'] ::selection,
|
pre[class*='language-'] ::selection,
|
||||||
code[class*='language-']::selection,
|
code[class*='language-']::selection,
|
||||||
code[class*='language-'] ::selection {
|
code[class*='language-'] ::selection {
|
||||||
text-shadow: none;
|
|
||||||
background: #b3d4fc;
|
background: #b3d4fc;
|
||||||
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
@@ -454,9 +457,9 @@ code[class*='language-'] ::selection {
|
|||||||
|
|
||||||
/* Code blocks */
|
/* Code blocks */
|
||||||
pre[class*='language-'] {
|
pre[class*='language-'] {
|
||||||
padding: 1em;
|
|
||||||
margin: 0.5em 0;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
margin: 0.5em 0;
|
||||||
|
padding: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
:not(pre) > code[class*='language-'],
|
:not(pre) > code[class*='language-'],
|
||||||
@@ -510,8 +513,8 @@ pre[class*='language-'] {
|
|||||||
.token.url,
|
.token.url,
|
||||||
.language-css .token.string,
|
.language-css .token.string,
|
||||||
.style .token.string {
|
.style .token.string {
|
||||||
|
background: hsla(0deg, 0%, 100%, 0.5);
|
||||||
color: #9a6e3a;
|
color: #9a6e3a;
|
||||||
background: hsla(0, 0%, 100%, 0.5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.token.atrule,
|
.token.atrule,
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
|
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.main .logo {
|
.main .logo {
|
||||||
margin-top: 0;
|
|
||||||
height: auto;
|
height: auto;
|
||||||
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main .logo a {
|
.main .logo a {
|
||||||
@@ -34,10 +34,10 @@
|
|||||||
|
|
||||||
.main .logo .sub-title {
|
.main .logo .sub-title {
|
||||||
margin-left: 0.5em;
|
margin-left: 0.5em;
|
||||||
font-size: 22px;
|
|
||||||
color: #fff;
|
|
||||||
background: linear-gradient(-45deg, #3967ff, #b500fe);
|
background: linear-gradient(-45deg, #3967ff, #b500fe);
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 22px;
|
||||||
-webkit-text-fill-color: transparent;
|
-webkit-text-fill-color: transparent;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'mobilefont'; /* Project id 4841764 */
|
font-family: mobilefont; /* Project id 4841764 */
|
||||||
src:
|
src:
|
||||||
url('iconfont.woff2?t=1742102742566') format('woff2'),
|
url('iconfont.woff2?t=1742102742566') format('woff2'),
|
||||||
url('iconfont.woff?t=1742102742566') format('woff'),
|
url('iconfont.woff?t=1742102742566') format('woff'),
|
||||||
@@ -7,133 +7,133 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont {
|
.mobilefont {
|
||||||
font-family: 'mobilefont' !important;
|
|
||||||
font-size: 16px;
|
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: mobilefont !important;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-rubber:before {
|
.mobilefont-rubber::before {
|
||||||
content: '\ea15';
|
content: '\ea15';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-huabi:before {
|
.mobilefont-huabi::before {
|
||||||
content: '\e61f';
|
content: '\e61f';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-chexiao:before {
|
.mobilefont-chexiao::before {
|
||||||
content: '\e6e2';
|
content: '\e6e2';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-shangchuan:before {
|
.mobilefont-shangchuan::before {
|
||||||
content: '\e613';
|
content: '\e613';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-qingkong:before {
|
.mobilefont-qingkong::before {
|
||||||
content: '\e6dc';
|
content: '\e6dc';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-jiacu:before {
|
.mobilefont-jiacu::before {
|
||||||
content: '\e71d';
|
content: '\e71d';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-qingxie:before {
|
.mobilefont-qingxie::before {
|
||||||
content: '\e71e';
|
content: '\e71e';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-xiahuaxian:before {
|
.mobilefont-xiahuaxian::before {
|
||||||
content: '\e720';
|
content: '\e720';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-tupian:before {
|
.mobilefont-tupian::before {
|
||||||
content: '\e730';
|
content: '\e730';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-del1:before {
|
.mobilefont-del1::before {
|
||||||
content: '\e637';
|
content: '\e637';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-gengduo:before {
|
.mobilefont-gengduo::before {
|
||||||
content: '\e600';
|
content: '\e600';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-delete1:before {
|
.mobilefont-delete1::before {
|
||||||
content: '\e66d';
|
content: '\e66d';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-del:before {
|
.mobilefont-del::before {
|
||||||
content: '\e6f5';
|
content: '\e6f5';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-option:before {
|
.mobilefont-option::before {
|
||||||
content: '\e6ff';
|
content: '\e6ff';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-setting:before {
|
.mobilefont-setting::before {
|
||||||
content: '\e633';
|
content: '\e633';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-add:before {
|
.mobilefont-add::before {
|
||||||
content: '\e686';
|
content: '\e686';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-radiobox:before {
|
.mobilefont-radiobox::before {
|
||||||
content: '\e75b';
|
content: '\e75b';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-juzhendafen:before {
|
.mobilefont-juzhendafen::before {
|
||||||
content: '\e641';
|
content: '\e641';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-checkbox-checked:before {
|
.mobilefont-checkbox-checked::before {
|
||||||
content: '\e6c3';
|
content: '\e6c3';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-nps:before {
|
.mobilefont-nps::before {
|
||||||
content: '\e6b0';
|
content: '\e6b0';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-input:before {
|
.mobilefont-input::before {
|
||||||
content: '\e6fd';
|
content: '\e6fd';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-juzhentiankong:before {
|
.mobilefont-juzhentiankong::before {
|
||||||
content: '\e62e';
|
content: '\e62e';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-wenjianshangchuan:before {
|
.mobilefont-wenjianshangchuan::before {
|
||||||
content: '\e631';
|
content: '\e631';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-qianming:before {
|
.mobilefont-qianming::before {
|
||||||
content: '\e661';
|
content: '\e661';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-tuwen:before {
|
.mobilefont-tuwen::before {
|
||||||
content: '\e62c';
|
content: '\e62c';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-juzhenduoxuan:before {
|
.mobilefont-juzhenduoxuan::before {
|
||||||
content: '\e818';
|
content: '\e818';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-juzhendanxuan:before {
|
.mobilefont-juzhendanxuan::before {
|
||||||
content: '\13c7f';
|
content: '\13c7f';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-edit2:before {
|
.mobilefont-edit2::before {
|
||||||
content: '\e630';
|
content: '\e630';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-copy:before {
|
.mobilefont-copy::before {
|
||||||
content: '\e632';
|
content: '\e632';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-delete:before {
|
.mobilefont-delete::before {
|
||||||
content: '\e63f';
|
content: '\e63f';
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobilefont-sort:before {
|
.mobilefont-sort::before {
|
||||||
content: '\e6a0';
|
content: '\e6a0';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
export const surveyQuestion =
|
export const surveyQuestion
|
||||||
'https://yls-api-uat.dctest.digitalyili.com/api/console/surveys/RWNK9BYp/questions';
|
= 'https://yls-api-uat.dctest.digitalyili.com/api/console/surveys/RWNK9BYp/questions';
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ service.interceptors.request.use(
|
|||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
(response) => {
|
(response) => {
|
||||||
if (
|
if (
|
||||||
response.status === 200 ||
|
response.status === 200
|
||||||
response.status === 201 ||
|
|| response.status === 201
|
||||||
response.status === 202 ||
|
|| response.status === 202
|
||||||
response.status === 204
|
|| response.status === 204
|
||||||
) {
|
) {
|
||||||
if (response.config.method === 'put') {
|
if (response.config.method === 'put') {
|
||||||
// message.success('保存中...');
|
// message.success('保存中...');
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ service.interceptors.request.use(
|
|||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
(response) => {
|
(response) => {
|
||||||
if (
|
if (
|
||||||
response.status === 200 ||
|
response.status === 200
|
||||||
response.status === 201 ||
|
|| response.status === 201
|
||||||
response.status === 202 ||
|
|| response.status === 202
|
||||||
response.status === 204
|
|| response.status === 204
|
||||||
) {
|
) {
|
||||||
if (response.config.method === 'put') {
|
if (response.config.method === 'put') {
|
||||||
// message.success('保存中...');
|
// message.success('保存中...');
|
||||||
|
|||||||
@@ -52,8 +52,8 @@
|
|||||||
<martrix-question
|
<martrix-question
|
||||||
v-if="
|
v-if="
|
||||||
element.question_type === 8 ||
|
element.question_type === 8 ||
|
||||||
element.question_type === 9 ||
|
element.question_type === 9 ||
|
||||||
element.question_type === 10
|
element.question_type === 10
|
||||||
"
|
"
|
||||||
:element="computedElement(element)"
|
:element="computedElement(element)"
|
||||||
:index="index"
|
:index="index"
|
||||||
|
|||||||
@@ -134,23 +134,23 @@ const openOptionActionModel = (item, index) => {
|
|||||||
// 上下移动
|
// 上下移动
|
||||||
const optionMove = (action) => {
|
const optionMove = (action) => {
|
||||||
switch (action.action) {
|
switch (action.action) {
|
||||||
case 'up':
|
case 'up':
|
||||||
if (activeIndex.value === 0) {
|
if (activeIndex.value === 0) {
|
||||||
moveShow.value = false;
|
moveShow.value = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 向上移动
|
// 向上移动
|
||||||
element.value.splice(activeIndex.value - 1, 0, element.value.splice(activeIndex.value, 1)[0]);
|
element.value.splice(activeIndex.value - 1, 0, element.value.splice(activeIndex.value, 1)[0]);
|
||||||
activeIndex.value -= 1;
|
activeIndex.value -= 1;
|
||||||
break;
|
break;
|
||||||
case 'down':
|
case 'down':
|
||||||
if (activeIndex.value === element.value.length - 1) {
|
if (activeIndex.value === element.value.length - 1) {
|
||||||
moveShow.value = false;
|
moveShow.value = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
element.value.splice(activeIndex.value + 1, 0, element.value.splice(activeIndex.value, 1)[0]);
|
element.value.splice(activeIndex.value + 1, 0, element.value.splice(activeIndex.value, 1)[0]);
|
||||||
activeIndex.value += 1;
|
activeIndex.value += 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -260,8 +260,8 @@ const getSkipTypeText = (skipType) => {
|
|||||||
const ls = [];
|
const ls = [];
|
||||||
logics.map((item) => {
|
logics.map((item) => {
|
||||||
if (
|
if (
|
||||||
item.skip_type === skipType &&
|
item.skip_type === skipType
|
||||||
item.question_index === activeQuestion.value.question_index
|
&& item.question_index === activeQuestion.value.question_index
|
||||||
) {
|
) {
|
||||||
ls.push(item);
|
ls.push(item);
|
||||||
}
|
}
|
||||||
@@ -277,13 +277,13 @@ const getSkipTypeText = (skipType) => {
|
|||||||
|
|
||||||
const questionSetting = (type) => {
|
const questionSetting = (type) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'before':
|
case 'before':
|
||||||
questionBeforeShow.value = true;
|
questionBeforeShow.value = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'after':
|
case 'after':
|
||||||
questionBeforeShow.value = true;
|
questionBeforeShow.value = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
skipType.value = type === 'before' ? 1 : 0;
|
skipType.value = type === 'before' ? 1 : 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -108,9 +108,9 @@ function isSurplus() {
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
parseFloat(((localConfig.value.max - localConfig.value.min) * 1000).toFixed(4, 10)) %
|
parseFloat(((localConfig.value.max - localConfig.value.min) * 1000).toFixed(4, 10))
|
||||||
parseFloat((localConfig.value.score_interval * 1000).toFixed(4, 10)) ===
|
% parseFloat((localConfig.value.score_interval * 1000).toFixed(4, 10))
|
||||||
0
|
=== 0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<van-field v-model="element.stem" :label="element.stem" :required="element.config.is_required === 1" label-align="top"
|
<van-field
|
||||||
class="contenteditable-question-title base-select">
|
v-model="element.stem" :label="element.stem" :required="element.config.is_required === 1" label-align="top"
|
||||||
|
class="contenteditable-question-title base-select"
|
||||||
|
>
|
||||||
<template #left-icon>
|
<template #left-icon>
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -11,11 +13,15 @@
|
|||||||
<template #input>
|
<template #input>
|
||||||
<template v-for="(item, optionIndex) in element.options" :key="item.id">
|
<template v-for="(item, optionIndex) in element.options" :key="item.id">
|
||||||
<van-radio-group v-if="element.question_type === 1" v-model="choiceValue">
|
<van-radio-group v-if="element.question_type === 1" v-model="choiceValue">
|
||||||
<option-action :data="isPreview ? item.options : item" :active="active" :question="element"
|
<option-action
|
||||||
handle=".moverQues">
|
:data="isPreview ? item.options : item" :active="active" :question="element"
|
||||||
|
handle=".moverQues"
|
||||||
|
>
|
||||||
<template #item="{ element: it, index: itIndex }">
|
<template #item="{ element: it, index: itIndex }">
|
||||||
<van-radio :key="itIndex" :name="it.option_index" :label="it.label" :disabled="it.disabled"
|
<van-radio
|
||||||
icon-size="0.45rem">
|
:key="itIndex" :name="it.option_index" :label="it.label" :disabled="it.disabled"
|
||||||
|
icon-size="0.45rem"
|
||||||
|
>
|
||||||
<!-- 自定义文本 -->
|
<!-- 自定义文本 -->
|
||||||
<template #default>
|
<template #default>
|
||||||
<div class="flex align-center van-cell">
|
<div class="flex align-center van-cell">
|
||||||
@@ -37,11 +43,15 @@
|
|||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
|
|
||||||
<van-checkbox-group v-if="element.question_type === 2" v-model="value" shape="square">
|
<van-checkbox-group v-if="element.question_type === 2" v-model="value" shape="square">
|
||||||
<option-action v-model:data="element.options[optionIndex]" handle=".moverQues" :active="active"
|
<option-action
|
||||||
:question="element">
|
v-model:data="element.options[optionIndex]" handle=".moverQues" :active="active"
|
||||||
|
:question="element"
|
||||||
|
>
|
||||||
<template #item="{ element: it, index: itIndex }">
|
<template #item="{ element: it, index: itIndex }">
|
||||||
<van-checkbox :key="itIndex" :name="it.option_index" :label="it.label" :disabled="it.disabled"
|
<van-checkbox
|
||||||
icon-size="0.45rem">
|
:key="itIndex" :name="it.option_index" :label="it.label" :disabled="it.disabled"
|
||||||
|
icon-size="0.45rem"
|
||||||
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<div class="flex align-center van-cell">
|
<div class="flex align-center van-cell">
|
||||||
<contenteditable v-model="it.option" className="contenteditable-input" :active="active">
|
<contenteditable v-model="it.option" className="contenteditable-input" :active="active">
|
||||||
@@ -106,7 +116,6 @@ const emitValue = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.base-select {
|
.base-select {
|
||||||
|
|
||||||
& .van-checkbox-group,
|
& .van-checkbox-group,
|
||||||
.van-radio-group {
|
.van-radio-group {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -21,14 +21,14 @@ const { element } = toRefs(props);
|
|||||||
*/
|
*/
|
||||||
const tableInputTypeMapping = (/** regx?: any */) => {
|
const tableInputTypeMapping = (/** regx?: any */) => {
|
||||||
switch (element.value.question_type) {
|
switch (element.value.question_type) {
|
||||||
case 8:
|
case 8:
|
||||||
return 'text';
|
return 'text';
|
||||||
case 9:
|
case 9:
|
||||||
return 'radio';
|
return 'radio';
|
||||||
case 10:
|
case 10:
|
||||||
return 'checkbox';
|
return 'checkbox';
|
||||||
default:
|
default:
|
||||||
return 'radio';
|
return 'radio';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ const matrixAnswer = ref({
|
|||||||
*/
|
*/
|
||||||
const tableInputTypeMapping = (/** regx?: any */) => {
|
const tableInputTypeMapping = (/** regx?: any */) => {
|
||||||
switch (element.question_type) {
|
switch (element.question_type) {
|
||||||
case 8:
|
case 8:
|
||||||
return 'text';
|
return 'text';
|
||||||
case 9:
|
case 9:
|
||||||
return 'radio';
|
return 'radio';
|
||||||
case 10:
|
case 10:
|
||||||
return 'checkbox';
|
return 'checkbox';
|
||||||
default:
|
default:
|
||||||
return 'radio';
|
return 'radio';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -67,55 +67,55 @@ function handleColNameChange(rowOption: string, colOption: string, e: any) {
|
|||||||
|
|
||||||
// 不同的 question_type 的 matrix 问卷处理不同的结果
|
// 不同的 question_type 的 matrix 问卷处理不同的结果
|
||||||
switch (element.question_type) {
|
switch (element.question_type) {
|
||||||
case 8: {
|
case 8: {
|
||||||
// 获取输入框元素
|
// 获取输入框元素
|
||||||
const inputElement = e.target as HTMLInputElement;
|
const inputElement = e.target as HTMLInputElement;
|
||||||
// 如果没有获取到输入框元素,则直接返回
|
// 如果没有获取到输入框元素,则直接返回
|
||||||
if (!inputElement) return;
|
if (!inputElement) return;
|
||||||
// 将输入框的值保存到 rowRecord 对应位置
|
// 将输入框的值保存到 rowRecord 对应位置
|
||||||
rowRecord[col] = e!.target!.value;
|
rowRecord[col] = e!.target!.value;
|
||||||
// 清空 matrixAnswer 的 answer 属性
|
// 清空 matrixAnswer 的 answer 属性
|
||||||
matrixAnswer.value.answer = {};
|
matrixAnswer.value.answer = {};
|
||||||
// 遍历所有行选项
|
// 遍历所有行选项
|
||||||
element.options[0].forEach((_, rowIndex) => {
|
element.options[0].forEach((_, rowIndex) => {
|
||||||
// 获取当前行记录
|
// 获取当前行记录
|
||||||
const colOptions = rowRecord[rowIndex];
|
const colOptions = rowRecord[rowIndex];
|
||||||
// 如果当前行有记录,则更新 matrixAnswer 的 answer 属性
|
// 如果当前行有记录,则更新 matrixAnswer 的 answer 属性
|
||||||
if (colOptions) {
|
if (colOptions) {
|
||||||
matrixAnswer.value.answer[`R${rowIndex + 1}_C${col + 1}`] = colOptions;
|
matrixAnswer.value.answer[`R${rowIndex + 1}_C${col + 1}`] = colOptions;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 9:
|
case 9:
|
||||||
// 将选择的行索引加1后保存到 rowRecord 对应位置
|
// 将选择的行索引加1后保存到 rowRecord 对应位置
|
||||||
rowRecord[col] = row + 1;
|
rowRecord[col] = row + 1;
|
||||||
// 清空 matrixAnswer 的 answer 属性
|
// 清空 matrixAnswer 的 answer 属性
|
||||||
matrixAnswer.value.answer = {};
|
matrixAnswer.value.answer = {};
|
||||||
// 遍历 rowRecord,更新 matrixAnswer 的 answer 属性
|
// 遍历 rowRecord,更新 matrixAnswer 的 answer 属性
|
||||||
rowRecord.forEach((row, index) => {
|
rowRecord.forEach((row, index) => {
|
||||||
matrixAnswer.value.answer[`${index + 1}_${row}`] = 1;
|
matrixAnswer.value.answer[`${index + 1}_${row}`] = 1;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
// 将选择的行索引加1后添加到 rowRecord 对应位置的数组中
|
// 将选择的行索引加1后添加到 rowRecord 对应位置的数组中
|
||||||
rowRecord[col] = (rowRecord[col] || []).concat(row + 1);
|
rowRecord[col] = (rowRecord[col] || []).concat(row + 1);
|
||||||
// 清空 matrixAnswer 的 answer 属性
|
// 清空 matrixAnswer 的 answer 属性
|
||||||
matrixAnswer.value.answer = {};
|
matrixAnswer.value.answer = {};
|
||||||
// 遍历所有行选项
|
// 遍历所有行选项
|
||||||
element.options[0].forEach((rowOption, rowIndex) => {
|
element.options[0].forEach((rowOption, rowIndex) => {
|
||||||
// 获取当前行记录
|
// 获取当前行记录
|
||||||
const colOptions = rowRecord[rowIndex];
|
const colOptions = rowRecord[rowIndex];
|
||||||
// 如果当前行有记录,则更新 matrixAnswer 的 answer 属性
|
// 如果当前行有记录,则更新 matrixAnswer 的 answer 属性
|
||||||
if (colOptions) {
|
if (colOptions) {
|
||||||
colOptions.forEach((col: any) => {
|
colOptions.forEach((col: any) => {
|
||||||
matrixAnswer.value.answer[`R${rowIndex + 1}_C${col}`] = true;
|
matrixAnswer.value.answer[`R${rowIndex + 1}_C${col}`] = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -11,8 +11,7 @@
|
|||||||
class="iconfont active-icon"
|
class="iconfont active-icon"
|
||||||
:style="{ marginRight: isLastPage ? '0' : '16px' }"
|
:style="{ marginRight: isLastPage ? '0' : '16px' }"
|
||||||
@click="activePage"
|
@click="activePage"
|
||||||
></i
|
></i>
|
||||||
>
|
|
||||||
<template v-if="!isLastPage">
|
<template v-if="!isLastPage">
|
||||||
<i class="iconfont moverQues" style="margin-right: 16px"></i>
|
<i class="iconfont moverQues" style="margin-right: 16px"></i>
|
||||||
<i class="iconfont" @click="deleteHandle"></i>
|
<i class="iconfont" @click="deleteHandle"></i>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { onMounted, ref } from 'vue';
|
|||||||
const contentShow = ref(false);
|
const contentShow = ref(false);
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async() => {
|
||||||
contentShow.value = true;
|
contentShow.value = true;
|
||||||
// if (utils.getSessionStorage('xToken')) {
|
// if (utils.getSessionStorage('xToken')) {
|
||||||
// const appToken = utils.getParameter('digitalYiliToken');
|
// const appToken = utils.getParameter('digitalYiliToken');
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import { consoleSurveys } 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,
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
<div v-for="item in 10" :key="item" class="template">
|
<div v-for="item in 10" :key="item" class="template">
|
||||||
<img src="https://picsum.photos/131/128" width="110" height="100" alt="" />
|
<img src="https://picsum.photos/131/128" width="110" height="100" alt="" />
|
||||||
<span>报名/签到模板</span>
|
<span>报名/签到模板</span>
|
||||||
<span style="color: rgb(127, 127, 127)"
|
<span style="color: rgb(127, 127, 127)">报名签到 | 引用 {{ item }} 次 | 创建人: {{ '张三' }}</span>
|
||||||
>报名签到 | 引用 {{ item }} 次 | 创建人: {{ '张三' }}</span
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -227,8 +227,8 @@ export default defineComponent({
|
|||||||
.map((option) => {
|
.map((option) => {
|
||||||
return this.wares.find(
|
return this.wares.find(
|
||||||
(ware) =>
|
(ware) =>
|
||||||
ware.question_index === option.question_index &&
|
ware.question_index === option.question_index
|
||||||
ware.option_index === option.option_index
|
&& ware.option_index === option.option_index
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
wares = wares.filter((x) => x);
|
wares = wares.filter((x) => x);
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
debounce(func, wait) {
|
debounce(func, wait) {
|
||||||
let timeout;
|
let timeout;
|
||||||
return function (...args) {
|
return function(...args) {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
timeout = setTimeout(() => func.apply(this, args), wait);
|
timeout = setTimeout(() => func.apply(this, args), wait);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -102,37 +102,37 @@ export default defineComponent({
|
|||||||
const isEndUrl = computed(() => {
|
const isEndUrl = computed(() => {
|
||||||
const code = props.action ? props.action.code : props.code;
|
const code = props.action ? props.action.code : props.code;
|
||||||
return (
|
return (
|
||||||
(code === 20004 &&
|
(code === 20004
|
||||||
props.survey.screening_end_url_select &&
|
&& props.survey.screening_end_url_select
|
||||||
props.survey.screening_end_url) ||
|
&& props.survey.screening_end_url)
|
||||||
(code === 20011 && props.survey.success_end_url_select && props.survey.success_end_url) ||
|
|| (code === 20011 && props.survey.success_end_url_select && props.survey.success_end_url)
|
||||||
(code === 20016 && props.survey.quota_end_url_select && props.survey.quota_end_url)
|
|| (code === 20016 && props.survey.quota_end_url_select && props.survey.quota_end_url)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 跳转
|
// 跳转
|
||||||
function toEndUrl() {
|
function toEndUrl() {
|
||||||
switch (props.action.code) {
|
switch (props.action.code) {
|
||||||
case 20004: // 被甄别
|
case 20004: // 被甄别
|
||||||
if (props.survey.screening_end_url_select && props.survey.screening_end_url) {
|
if (props.survey.screening_end_url_select && props.survey.screening_end_url) {
|
||||||
const url = props.survey.screening_end_url;
|
const url = props.survey.screening_end_url;
|
||||||
toUrl(url);
|
toUrl(url);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 20011: // 成功
|
case 20011: // 成功
|
||||||
if (props.survey.success_end_url_select && props.survey.success_end_url) {
|
if (props.survey.success_end_url_select && props.survey.success_end_url) {
|
||||||
const url = props.survey.success_end_url;
|
const url = props.survey.success_end_url;
|
||||||
toUrl(url);
|
toUrl(url);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 20016: // 配额超限
|
case 20016: // 配额超限
|
||||||
if (props.survey.quota_end_url_select && props.survey.quota_end_url) {
|
if (props.survey.quota_end_url_select && props.survey.quota_end_url) {
|
||||||
const url = props.survey.quota_end_url;
|
const url = props.survey.quota_end_url;
|
||||||
toUrl(url);
|
toUrl(url);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -264,16 +264,16 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!compareArrayByField(options.value, newOptions, 'option_key') ||
|
!compareArrayByField(options.value, newOptions, 'option_key')
|
||||||
!compareArrayByField(options.value, newOptions, 'option')
|
|| !compareArrayByField(options.value, newOptions, 'option')
|
||||||
) {
|
) {
|
||||||
options.value = newOptions;
|
options.value = newOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清空值和答案
|
// 清空值和答案
|
||||||
if (
|
if (
|
||||||
value.value &&
|
value.value
|
||||||
options.value.findIndex((option) => option.option_key === value.value) === -1
|
&& options.value.findIndex((option) => option.option_key === value.value) === -1
|
||||||
) {
|
) {
|
||||||
// 清空值
|
// 清空值
|
||||||
value.value = '';
|
value.value = '';
|
||||||
@@ -291,8 +291,8 @@ export default defineComponent({
|
|||||||
() => options.value,
|
() => options.value,
|
||||||
(val, oldVal) => {
|
(val, oldVal) => {
|
||||||
if (
|
if (
|
||||||
compareArrayByField(val, oldVal || [], 'option_key') &&
|
compareArrayByField(val, oldVal || [], 'option_key')
|
||||||
compareArrayByField(val, oldVal || [], 'option')
|
&& compareArrayByField(val, oldVal || [], 'option')
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,8 +132,8 @@ export default defineComponent({
|
|||||||
const value = matchValue.replace('[%cite(', '').replace(')%]', '');
|
const value = matchValue.replace('[%cite(', '').replace(')%]', '');
|
||||||
let replacement = ''; // 替换文本
|
let replacement = ''; // 替换文本
|
||||||
// 查找引用问题
|
// 查找引用问题
|
||||||
const question =
|
const question
|
||||||
props.questions.find((question) => {
|
= props.questions.find((question) => {
|
||||||
// 矩阵题
|
// 矩阵题
|
||||||
if (question.question_type >= 8 && question.question_type <= 11) {
|
if (question.question_type >= 8 && question.question_type <= 11) {
|
||||||
return question.title === value.split('_R')[0].split('_C')[0];
|
return question.title === value.split('_R')[0].split('_C')[0];
|
||||||
@@ -143,8 +143,8 @@ export default defineComponent({
|
|||||||
return question.title === value.split('_A')[0];
|
return question.title === value.split('_A')[0];
|
||||||
}
|
}
|
||||||
return question.title === value;
|
return question.title === value;
|
||||||
}) ||
|
})
|
||||||
props.questions.find((question) => {
|
|| props.questions.find((question) => {
|
||||||
// 矩阵题
|
// 矩阵题
|
||||||
if (question.question_type >= 8 && question.question_type <= 11) {
|
if (question.question_type >= 8 && question.question_type <= 11) {
|
||||||
return question.title === (value + cycleIndexStr).split('_R')[0].split('_C')[0];
|
return question.title === (value + cycleIndexStr).split('_R')[0].split('_C')[0];
|
||||||
@@ -171,8 +171,8 @@ export default defineComponent({
|
|||||||
replacement = answer[option.option_key];
|
replacement = answer[option.option_key];
|
||||||
}
|
}
|
||||||
} else if (
|
} else if (
|
||||||
question.question_type === 2 &&
|
question.question_type === 2
|
||||||
Object.keys(answer).length >= question.config.min_select
|
&& Object.keys(answer).length >= question.config.min_select
|
||||||
) {
|
) {
|
||||||
// 查找引用选项(多选)
|
// 查找引用选项(多选)
|
||||||
options.forEach((option) => {
|
options.forEach((option) => {
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ export const language = {
|
|||||||
zh: '请点击查看图片'
|
zh: '请点击查看图片'
|
||||||
},
|
},
|
||||||
NoteCantViewAfterTimeLimit: {
|
NoteCantViewAfterTimeLimit: {
|
||||||
en: "Note: Can't view after time limit",
|
en: 'Note: Can\'t view after time limit',
|
||||||
zh: '注意:超过显示时间限制后将无法再次查看'
|
zh: '注意:超过显示时间限制后将无法再次查看'
|
||||||
},
|
},
|
||||||
DisplayTimeLimitExceeded: {
|
DisplayTimeLimitExceeded: {
|
||||||
|
|||||||
@@ -250,10 +250,10 @@ function quesHandle(answer, logChild) {
|
|||||||
const matrixRateHandle = () => {
|
const matrixRateHandle = () => {
|
||||||
// 如果配置的逻辑中参数为空,则代表没有配置逻辑匹配值,此时不做校验
|
// 如果配置的逻辑中参数为空,则代表没有配置逻辑匹配值,此时不做校验
|
||||||
if (
|
if (
|
||||||
logChild.cell_index === 0 ||
|
logChild.cell_index === 0
|
||||||
logChild.row_index === 0 ||
|
|| logChild.row_index === 0
|
||||||
!logChild.operator ||
|
|| !logChild.operator
|
||||||
!logChild.value
|
|| !logChild.value
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -265,10 +265,10 @@ function quesHandle(answer, logChild) {
|
|||||||
const matrixInputHandle = () => {
|
const matrixInputHandle = () => {
|
||||||
// 如果配置的逻辑中参数为空,则代表没有配置逻辑匹配值,此时不做校验
|
// 如果配置的逻辑中参数为空,则代表没有配置逻辑匹配值,此时不做校验
|
||||||
if (
|
if (
|
||||||
logChild.cell_index === 0 ||
|
logChild.cell_index === 0
|
||||||
logChild.row_index === 0 ||
|
|| logChild.row_index === 0
|
||||||
!logChild.operator ||
|
|| !logChild.operator
|
||||||
!logChild.value
|
|| !logChild.value
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -428,59 +428,59 @@ function getConditionStatus(logChild) {
|
|||||||
if (answer) {
|
if (answer) {
|
||||||
try {
|
try {
|
||||||
switch (logChild.question_type) {
|
switch (logChild.question_type) {
|
||||||
case 1:
|
case 1:
|
||||||
quesStatus = quesHandles.choiceHandle(config);
|
quesStatus = quesHandles.choiceHandle(config);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
quesStatus = quesHandles.choiceCheckBoxHandle(config);
|
quesStatus = quesHandles.choiceCheckBoxHandle(config);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
quesStatus = quesHandles.cascaderHandle();
|
quesStatus = quesHandles.cascaderHandle();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
quesStatus = quesHandles.inputHandle();
|
quesStatus = quesHandles.inputHandle();
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
quesStatus = quesHandles.rateHandle();
|
quesStatus = quesHandles.rateHandle();
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
quesStatus = quesHandles.dateTimeHandle();
|
quesStatus = quesHandles.dateTimeHandle();
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
quesStatus = quesHandles.matrixInputHandle();
|
quesStatus = quesHandles.matrixInputHandle();
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
quesStatus = quesHandles.matrixRadioHandle(config);
|
quesStatus = quesHandles.matrixRadioHandle(config);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
quesStatus = quesHandles.matrixCheckboxHandle(config);
|
quesStatus = quesHandles.matrixCheckboxHandle(config);
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
quesStatus = quesHandles.matrixRateHandle();
|
quesStatus = quesHandles.matrixRateHandle();
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
quesStatus = quesHandles.imgRadioHandle();
|
quesStatus = quesHandles.imgRadioHandle();
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
quesStatus = quesHandles.imgCheckBoxHandle();
|
quesStatus = quesHandles.imgCheckBoxHandle();
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
quesStatus = quesHandles.classifyHandle();
|
quesStatus = quesHandles.classifyHandle();
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
quesStatus = quesHandles.sortHandle();
|
quesStatus = quesHandles.sortHandle();
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 17:
|
||||||
quesStatus = quesHandles.constantSumHandle();
|
quesStatus = quesHandles.constantSumHandle();
|
||||||
break;
|
break;
|
||||||
case 23:
|
case 23:
|
||||||
quesStatus = quesHandles.agreementHandle();
|
quesStatus = quesHandles.agreementHandle();
|
||||||
break;
|
break;
|
||||||
case 101:
|
case 101:
|
||||||
quesStatus = quesHandles.psmHandle(config);
|
quesStatus = quesHandles.psmHandle(config);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// console.log(error);
|
// console.log(error);
|
||||||
@@ -519,10 +519,10 @@ function getlogicStatus(questionData) {
|
|||||||
// } else {
|
// } else {
|
||||||
// statusStr = statusStr + conditionStatus;
|
// statusStr = statusStr + conditionStatus;
|
||||||
// }
|
// }
|
||||||
statusStr =
|
statusStr
|
||||||
statusStr +
|
= statusStr
|
||||||
(logChild.logic === 'and' ? '&&' : logChild.logic === 'or' ? '||' : '') +
|
+ (logChild.logic === 'and' ? '&&' : logChild.logic === 'or' ? '||' : '')
|
||||||
conditionStatus;
|
+ conditionStatus;
|
||||||
});
|
});
|
||||||
// eslint-disable-next-line no-eval
|
// eslint-disable-next-line no-eval
|
||||||
logs.logicStatus = eval(statusStr);
|
logs.logicStatus = eval(statusStr);
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ export default function answerMock(questionsData, page) {
|
|||||||
} else if (logic.skip_type === 4) {
|
} else if (logic.skip_type === 4) {
|
||||||
// 只计算跳转后所在页面的隐藏逻辑,否则会出现只返回最后一道隐藏选项题目的情况,导致失效
|
// 只计算跳转后所在页面的隐藏逻辑,否则会出现只返回最后一道隐藏选项题目的情况,导致失效
|
||||||
const toPage = page + 1;
|
const toPage = page + 1;
|
||||||
const hasHiddenLogicQuizPage =
|
const hasHiddenLogicQuizPage
|
||||||
data.pages.findIndex((page) => page.includes(logic.question_index)) + 1;
|
= data.pages.findIndex((page) => page.includes(logic.question_index)) + 1;
|
||||||
if (hasHiddenLogicQuizPage === toPage) {
|
if (hasHiddenLogicQuizPage === toPage) {
|
||||||
// 选项隐藏逻辑
|
// 选项隐藏逻辑
|
||||||
updateOptionHidden(data.hide_options, logic);
|
updateOptionHidden(data.hide_options, logic);
|
||||||
|
|||||||
@@ -154,9 +154,9 @@ export default defineComponent({
|
|||||||
question.error = translatedText.value.ThisIsARequiredQuestion;
|
question.error = translatedText.value.ThisIsARequiredQuestion;
|
||||||
}
|
}
|
||||||
} else if (
|
} else if (
|
||||||
answer &&
|
answer
|
||||||
questionType === 1 &&
|
&& questionType === 1
|
||||||
Object.keys(answer).findIndex((value) => !answer[value]) !== -1
|
&& Object.keys(answer).findIndex((value) => !answer[value]) !== -1
|
||||||
) {
|
) {
|
||||||
// 单选题
|
// 单选题
|
||||||
isError = true;
|
isError = true;
|
||||||
@@ -302,9 +302,9 @@ export default defineComponent({
|
|||||||
} else if (answer && questionType === 12) {
|
} else if (answer && questionType === 12) {
|
||||||
question.error = '';
|
question.error = '';
|
||||||
} else if (
|
} else if (
|
||||||
answer &&
|
answer
|
||||||
questionType === 14 &&
|
&& questionType === 14
|
||||||
Object.keys(answer).length < config.min_select
|
&& Object.keys(answer).length < config.min_select
|
||||||
) {
|
) {
|
||||||
// 图片多选题
|
// 图片多选题
|
||||||
isError = true;
|
isError = true;
|
||||||
@@ -340,46 +340,46 @@ export default defineComponent({
|
|||||||
const { value } = answer;
|
const { value } = answer;
|
||||||
const newValue = value.replace(/\n|\r|\r\n/g, '');
|
const newValue = value.replace(/\n|\r|\r\n/g, '');
|
||||||
switch (config.text_type) {
|
switch (config.text_type) {
|
||||||
case 3: // 字母
|
case 3: // 字母
|
||||||
isError =
|
isError
|
||||||
config.include_mark === 1
|
= config.include_mark === 1
|
||||||
? !/^[a-zA-Z·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]]+$/.test(
|
? !/^[a-zA-Z·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]]+$/.test(
|
||||||
newValue
|
newValue
|
||||||
) || !newValue.length
|
) || !newValue.length
|
||||||
: !/^[a-zA-Z]+$/.test(newValue) || !newValue.length;
|
: !/^[a-zA-Z]+$/.test(newValue) || !newValue.length;
|
||||||
question.error = isError ? translatedText.value.PleaseEnterEnglishLetters : '';
|
question.error = isError ? translatedText.value.PleaseEnterEnglishLetters : '';
|
||||||
break;
|
break;
|
||||||
case 4: // 中文
|
case 4: // 中文
|
||||||
isError =
|
isError
|
||||||
config.include_mark === 1
|
= config.include_mark === 1
|
||||||
? !/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|[·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]])+$/.test(
|
? !/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|[·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]])+$/.test(
|
||||||
newValue
|
newValue
|
||||||
) || !newValue.length
|
) || !newValue.length
|
||||||
: !/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/.test(
|
: !/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/.test(
|
||||||
newValue
|
newValue
|
||||||
) || !newValue.length;
|
) || !newValue.length;
|
||||||
question.error = isError ? translatedText.value.PleaseEnterChineseWords : '';
|
question.error = isError ? translatedText.value.PleaseEnterChineseWords : '';
|
||||||
break;
|
break;
|
||||||
case 5: // 邮箱
|
case 5: // 邮箱
|
||||||
isError =
|
isError
|
||||||
!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(
|
= !/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(
|
||||||
value
|
value
|
||||||
);
|
);
|
||||||
question.error = isError ? translatedText.value.PleaseEnterACorrectEmail : '';
|
question.error = isError ? translatedText.value.PleaseEnterACorrectEmail : '';
|
||||||
break;
|
break;
|
||||||
case 6: // 手机号
|
case 6: // 手机号
|
||||||
isError = !/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(value);
|
isError = !/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(value);
|
||||||
question.error = isError ? translatedText.value.PleaseEnterACorrectPhone : '';
|
question.error = isError ? translatedText.value.PleaseEnterACorrectPhone : '';
|
||||||
break;
|
break;
|
||||||
case 7: // 身份证号
|
case 7: // 身份证号
|
||||||
isError =
|
isError
|
||||||
!/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\d|30|31)\d{3}[\dXx]$/.test(
|
= !/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\d|30|31)\d{3}[\dXx]$/.test(
|
||||||
value
|
value
|
||||||
);
|
);
|
||||||
question.error = isError ? translatedText.value.PleaseEnterACorrectID : '';
|
question.error = isError ? translatedText.value.PleaseEnterACorrectID : '';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!isError && value.length < config.min && ![1, 2].includes(config.text_type)) {
|
if (!isError && value.length < config.min && ![1, 2].includes(config.text_type)) {
|
||||||
isError = true;
|
isError = true;
|
||||||
@@ -391,54 +391,54 @@ export default defineComponent({
|
|||||||
Object.keys(answer).forEach((key) => {
|
Object.keys(answer).forEach((key) => {
|
||||||
const value = answer[key];
|
const value = answer[key];
|
||||||
switch (config.text_type) {
|
switch (config.text_type) {
|
||||||
case 3: // 字母
|
case 3: // 字母
|
||||||
if (
|
if (
|
||||||
!/^[a-zA-Z·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]]+$/.test(
|
!/^[a-zA-Z·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]]+$/.test(
|
||||||
value
|
value
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
question.error = translatedText.value.PleaseEnterEnglishLetters;
|
question.error = translatedText.value.PleaseEnterEnglishLetters;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4: // 中文
|
case 4: // 中文
|
||||||
if (
|
if (
|
||||||
!/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|[·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]])+$/.test(
|
!/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|[·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]])+$/.test(
|
||||||
value
|
value
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
question.error = translatedText.value.PleaseEnterChineseWords;
|
question.error = translatedText.value.PleaseEnterChineseWords;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5: // 邮箱
|
case 5: // 邮箱
|
||||||
if (
|
if (
|
||||||
!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(
|
!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(
|
||||||
value
|
value
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
question.error = translatedText.value.PleaseEnterACorrectEmail;
|
question.error = translatedText.value.PleaseEnterACorrectEmail;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6: // 手机号
|
case 6: // 手机号
|
||||||
if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(value)) {
|
if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(value)) {
|
||||||
question.error = translatedText.value.PleaseEnterACorrectPhone;
|
question.error = translatedText.value.PleaseEnterACorrectPhone;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7: // 身份证号
|
case 7: // 身份证号
|
||||||
if (
|
if (
|
||||||
!/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\d|30|31)\d{3}[\dXx]$/.test(
|
!/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\d|30|31)\d{3}[\dXx]$/.test(
|
||||||
value
|
value
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
question.error = translatedText.value.PleaseEnterACorrectID;
|
question.error = translatedText.value.PleaseEnterACorrectID;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
!question.error &&
|
!question.error
|
||||||
value.length < config.min &&
|
&& value.length < config.min
|
||||||
![1, 2].includes(config.text_type)
|
&& ![1, 2].includes(config.text_type)
|
||||||
) {
|
) {
|
||||||
question.error = translatedText.value.PleaseEnterMoreThanOneCharacters(config.min);
|
question.error = translatedText.value.PleaseEnterMoreThanOneCharacters(config.min);
|
||||||
}
|
}
|
||||||
@@ -814,8 +814,8 @@ export default defineComponent({
|
|||||||
const evt1 = {};
|
const evt1 = {};
|
||||||
|
|
||||||
if ([1].includes(question.question_type)) {
|
if ([1].includes(question.question_type)) {
|
||||||
evt1.value =
|
evt1.value
|
||||||
Object.keys(question.answer)
|
= Object.keys(question.answer)
|
||||||
.map((key) => (question.answer[key] ? key : undefined))
|
.map((key) => (question.answer[key] ? key : undefined))
|
||||||
.filter((i) => !!i)?.[0] || undefined;
|
.filter((i) => !!i)?.[0] || undefined;
|
||||||
evt1.options = question.list.flatMap((i) => i.options);
|
evt1.options = question.list.flatMap((i) => i.options);
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const successImg =
|
const successImg
|
||||||
'https://files.axshare.com/gsc/DR6075/c7/5a/53/c75a534148d349f1bb8e185629f784ac/images/%E9%A2%84%E8%A7%88/u123.png?pageId=18fb9d8a-b9b7-465f-9bd7-625b1b78f72e';
|
= 'https://files.axshare.com/gsc/DR6075/c7/5a/53/c75a534148d349f1bb8e185629f784ac/images/%E9%A2%84%E8%A7%88/u123.png?pageId=18fb9d8a-b9b7-465f-9bd7-625b1b78f72e';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user