Parcourir la source

feat:修改评分返回异常的问题

AmandaG il y a 11 mois
Parent
commit
25a442e84d
1 fichiers modifiés avec 21 ajouts et 15 suppressions
  1. 21 15
      src/views/Dashboard/src/components/ScoringSystem.vue

+ 21 - 15
src/views/Dashboard/src/components/ScoringSystem.vue

@@ -21,6 +21,7 @@ const buttonDisabled = ref(true)
 const isshowDetails = ref(true)
 const isShowScoring = ref(true)
 const SubmitText = ref()
+const isPrevious = ref(false)
 interface AvaterItem {
   src: string
   src1: string
@@ -142,21 +143,25 @@ smileAspects.value = [
   }
 ]
 const closeDialog = () => {
-  isShowAngry.value = false
-  innerVisible.value = false
-  dialogVisible.value = false
-  isShowHappy.value = false
-  isShowSmile.value = false
-  isshowDetails_submit.value = false
-  isshowDetails.value = true
-  smilecheckbox.value = {}
-  checkboxGroup1.value = []
-  checkboxGroup2.value = []
-  smileAspects.value.forEach((item: any) => {
-    item.radio = ''
-  })
-  buttonDisabled.value = true
-  inputdetails.value = ''
+  if (!isPrevious.value) {
+    isShowAngry.value = false
+    innerVisible.value = false
+    dialogVisible.value = false
+    isShowHappy.value = false
+    isShowSmile.value = false
+    isshowDetails_submit.value = false
+    isshowDetails.value = true
+    smilecheckbox.value = {}
+    checkboxGroup1.value = []
+    checkboxGroup2.value = []
+    smileAspects.value.forEach((item: any) => {
+      item.radio = ''
+    })
+    buttonDisabled.value = true
+    inputdetails.value = ''
+  } else {
+    isPrevious.value = false
+  }
 }
 const mouseenter = (item: any) => {
   item.src = item.itemsrc
@@ -197,6 +202,7 @@ const OpenScoring = (item: any) => {
   }
 }
 const previous = () => {
+  isPrevious.value = true
   dialogVisible.value = true
   innerVisible.value = false
   isShowAngry.value = false