|
@@ -10,6 +10,9 @@ import { useRouter, useRoute } from 'vue-router';
|
|
|
import { getScaleApi, saveScaleApi } from '@/api/plan';
|
|
|
import { userInfoStore } from '@/stores'
|
|
|
|
|
|
+// 加一个锁表示不能重复点击
|
|
|
+const isLock = ref<boolean>(false)
|
|
|
+
|
|
|
import { isHaveManage } from '@/utils/test'
|
|
|
const userInfo = userInfoStore()
|
|
|
const router = useRouter()
|
|
@@ -84,6 +87,10 @@ const nextTopic = () => {
|
|
|
|
|
|
}
|
|
|
const subScaleData = async () => {
|
|
|
+ if (isLock.value) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ isLock.value = true
|
|
|
if (scaleList.value[topicIndex.value - 1].isCheck == '') {
|
|
|
ElMessage({
|
|
|
message: '请选择当前题目',
|
|
@@ -110,6 +117,7 @@ const subScaleData = async () => {
|
|
|
userNo: userInfo.userInfo.userNo,
|
|
|
}
|
|
|
const res = await saveScaleApi(params)
|
|
|
+
|
|
|
ElMessage({
|
|
|
message: '提交完成',
|
|
|
type: "success",
|
|
@@ -117,6 +125,7 @@ const subScaleData = async () => {
|
|
|
// isCompleted.value = true
|
|
|
//跳转到缓冲中间件
|
|
|
setTimeout(() => {
|
|
|
+ isLock.value = false;
|
|
|
router.push({
|
|
|
name: 'scaleMid', params: {
|
|
|
planId: planId.value,
|