diff --git a/server/src/modules/survey/template/surveyTemplate/survey/normal.json b/server/src/modules/survey/template/surveyTemplate/survey/normal.json index 34ec56d1..3808e775 100644 --- a/server/src/modules/survey/template/surveyTemplate/survey/normal.json +++ b/server/src/modules/survey/template/surveyTemplate/survey/normal.json @@ -16,10 +16,6 @@ "minNum": "", "maxNum": "", "star": 5, - "nps": { - "leftText": "极不满意", - "rightText": "极满意" - }, "placeholderDesc": "", "urlKey": "", "textRange": { @@ -71,10 +67,6 @@ "importData": "", "cOption": "", "cOptions": [], - "nps": { - "leftText": "极不满意", - "rightText": "极满意" - }, "star": 5, "exclude": false, "textRange": { diff --git a/server/src/modules/survey/template/surveyTemplate/survey/nps.json b/server/src/modules/survey/template/surveyTemplate/survey/nps.json index 86bac01e..8901c69b 100644 --- a/server/src/modules/survey/template/surveyTemplate/survey/nps.json +++ b/server/src/modules/survey/template/surveyTemplate/survey/nps.json @@ -19,7 +19,8 @@ "extraOptions": [], "importKey": "single", "importData": "", - "npsMin": 0, + "addressType": 3, + "isAuto": false, "urlKey": "", "hasRely": true, "relyList": [], @@ -60,7 +61,6 @@ "importData": "", "cOption": "", "cOptions": [], - "npsMin": 0, "star": 5, "urlKey": "", "defaultProps": { diff --git a/server/src/modules/survey/template/surveyTemplate/survey/register.json b/server/src/modules/survey/template/surveyTemplate/survey/register.json index 9145e4b3..5f2fd5be 100644 --- a/server/src/modules/survey/template/surveyTemplate/survey/register.json +++ b/server/src/modules/survey/template/surveyTemplate/survey/register.json @@ -16,10 +16,6 @@ "minNum": "", "maxNum": "", "star": 5, - "nps": { - "leftText": "极不满意", - "rightText": "极满意" - }, "exclude": false, "placeholderDesc": "", "textRange": { @@ -86,10 +82,6 @@ "placeholderDesc": "" } ], - "nps": { - "leftText": "极不满意", - "rightText": "极满意" - }, "star": 5, "exclude": false, "urlKey": "", diff --git a/server/src/modules/survey/template/surveyTemplate/survey/vote.json b/server/src/modules/survey/template/surveyTemplate/survey/vote.json index 40ca93b3..9ae7d7fe 100644 --- a/server/src/modules/survey/template/surveyTemplate/survey/vote.json +++ b/server/src/modules/survey/template/surveyTemplate/survey/vote.json @@ -17,10 +17,6 @@ "minNum": "", "maxNum": "", "star": 5, - "nps": { - "leftText": "极不满意", - "rightText": "极满意" - }, "exclude": false, "placeholderDesc": "", "urlKey": "", @@ -70,10 +66,6 @@ "hash": "115020" } ], - "nps": { - "leftText": "极不满意", - "rightText": "极满意" - }, "star": 5, "textRange": { "min": { diff --git a/web/src/common/xss.js b/web/src/common/xss.js index f0c03ea1..79154118 100644 --- a/web/src/common/xss.js +++ b/web/src/common/xss.js @@ -29,7 +29,7 @@ const isVideo = (html) => { export const cleanRichText = (text) => { if (!text) { - return ''; + return text === 0 ? 0 : ''; } const html = transformHtmlTag(text); const content = html.replace(/<[^<>]+>/g, '').replace(/ /g, ''); diff --git a/web/src/management/pages/analysis/components/table.vue b/web/src/management/pages/analysis/components/table.vue index dd44b1d5..21950f0a 100644 --- a/web/src/management/pages/analysis/components/table.vue +++ b/web/src/management/pages/analysis/components/table.vue @@ -39,14 +39,14 @@ class="table-row-cell" v-popover="scope.$index + scope.column.property" > - {{ cleanRichText(scope.row[scope.column.property]) || '未知' }} + {{ getContent(scope.row[scope.column.property]) }} @@ -69,6 +69,11 @@ export default { methods: { cleanRichText, + getContent(value) { + const content = cleanRichText(value) + + return content === 0 ? 0 : (content || '未知') + } }, }; diff --git a/web/src/materials/questions/widgets/NpsModule/index.vue b/web/src/materials/questions/widgets/NpsModule/index.vue index fa4f0748..9d819533 100644 --- a/web/src/materials/questions/widgets/NpsModule/index.vue +++ b/web/src/materials/questions/widgets/NpsModule/index.vue @@ -12,6 +12,7 @@ :value="indexValue" iconClass="number" @change="confirmNps" + :class="npsClass" /> { } } } - ::v-deep .star-wrapper-main { + @media (max-width: 930px) { + ::v-deep .question-block { + padding: 0; + } + } + ::v-deep .radio-nps-hover { .star-item { &:hover { background-color: $primary-color; diff --git a/web/src/materials/questions/widgets/NpsModule/meta.js b/web/src/materials/questions/widgets/NpsModule/meta.js index df34b950..42c620fd 100644 --- a/web/src/materials/questions/widgets/NpsModule/meta.js +++ b/web/src/materials/questions/widgets/NpsModule/meta.js @@ -68,12 +68,14 @@ const meta = { type: 'Input', key: 'minMsg', direction: 'horizon', + placeholder: '极不满意', }, { label: '最大值文案', type: 'Input', key: 'maxMsg', direction: 'horizon', + placeholder: '十分满意', }, ], }, diff --git a/web/src/materials/setters/widgets/Select.vue b/web/src/materials/setters/widgets/Select.vue index 0520c6bd..70a646da 100644 --- a/web/src/materials/setters/widgets/Select.vue +++ b/web/src/materials/setters/widgets/Select.vue @@ -27,7 +27,10 @@ export default { name: 'Select', data() { return { - validValue: this.formConfig.value || '', + validValue: + !this.formConfig.value && this.formConfig.value != 0 + ? '' + : this.formConfig.value, }; }, props: {