fix: 修复数据统计兼容展示处理和nps题型问题

This commit is contained in:
sudoooooo 2024-04-03 21:43:12 +08:00
parent a39f3ed3b1
commit 0b3a8b57dd
9 changed files with 23 additions and 31 deletions

View File

@ -27,10 +27,6 @@
"minNum": "",
"maxNum": "",
"star": 5,
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"placeholderDesc": "",
"addressType": 3,
"isAuto": false,
@ -84,10 +80,6 @@
"importData": "",
"cOption": "",
"cOptions": [],
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"star": 5,
"exclude": false,
"addressType": 3,

View File

@ -51,7 +51,6 @@
"extraOptions": [],
"importKey": "single",
"importData": "",
"npsMin": 0,
"addressType": 3,
"isAuto": false,
"urlKey": "",
@ -95,7 +94,6 @@
"importData": "",
"cOption": "",
"cOptions": [],
"npsMin": 0,
"star": 5,
"addressType": 3,
"isAuto": false,

View File

@ -27,10 +27,6 @@
"minNum": "",
"maxNum": "",
"star": 5,
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"exclude": false,
"relTypes": {
"textarea": "多行文本框",
@ -107,10 +103,6 @@
"placeholderDesc": ""
}
],
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"star": 5,
"exclude": false,
"addressType": 3,

View File

@ -28,10 +28,6 @@
"minNum": "",
"maxNum": "",
"star": 5,
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"exclude": false,
"relTypes": {
"textarea": "多行文本框",
@ -87,10 +83,6 @@
"hash": "115020"
}
],
"nps": {
"leftText": "极不满意",
"rightText": "极满意"
},
"star": 5,
"addressType": 3,
"textRange": {

View File

@ -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(/&nbsp;/g, '');

View File

@ -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]) }}
</span>
<el-popover
:ref="scope.$index + scope.column.property"
placement="top-start"
trigger="hover"
width="300"
:content="cleanRichText(scope.row[scope.column.property]) || '未知'"
:content="getContent(scope.row[scope.column.property])"
>
</el-popover>
</template>
@ -69,6 +69,11 @@ export default {
methods: {
cleanRichText,
getContent(value) {
const content = cleanRichText(value)
return content === 0 ? 0 : (content || '未知')
}
},
};
</script>

View File

@ -12,6 +12,7 @@
:value="indexValue"
iconClass="number"
@change="confirmNps"
:class="npsClass"
/>
<QuestionWithRule
v-if="isShowInput"
@ -63,6 +64,8 @@ const props = defineProps({
});
const emit = defineEmits(['change']);
const npsClass = !props.readonly ? 'radio-nps-hover' : '';
const rating = computed({
get() {
return props.value;
@ -134,7 +137,12 @@ const onMoreDataChange = (data) => {
}
}
}
::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;

View File

@ -68,12 +68,14 @@ const meta = {
type: 'Input',
key: 'minMsg',
direction: 'horizon',
placeholder: '极不满意',
},
{
label: '最大值文案',
type: 'Input',
key: 'maxMsg',
direction: 'horizon',
placeholder: '十分满意',
},
],
},

View File

@ -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: {