riku
2025-04-21 30748ea70f14c675743c7ea54e5c162d4a5e2839
src/views/overlay-clue/report/components/QuestionDetail.vue
@@ -112,8 +112,18 @@
const props = defineProps({
  clueId: Number,
  clueData: {
    type: Object,
    default: () => {
      return {};
    }
  },
  show: Boolean,
  question: Object
  question: Object,
  create: {
    type: Boolean,
    default: true
  }
});
const emit = defineEmits(['update:show', 'onSubmit', 'onClose']);
@@ -222,7 +232,7 @@
function submit() {
  const coor = formObj.value.coordinate.split(',');
  const q = {
    cId: parseInt(props.clueId),
    cid: parseInt(props.clueData.cid),
    cqName: formObj.value.cqName,
    cqDescription: formObj.value.cqDescription,
    cqStreet: formObj.value.cqStreet,
@@ -236,7 +246,7 @@
      files.push(f.raw);
    });
  }
  return uploadQuestion(q, files);
  return props.create ? uploadQuestion(q, files) : updateQuestion(q, );
}
function cancel() {
@@ -272,6 +282,10 @@
    });
}
function updateQuestion(question, newFiles, deleteFiles) {
}
function parseFormObj(question) {
  question.coordinate =
    question.cqLongitude + ',' + question.cqLatitude;
@@ -299,17 +313,7 @@
    }
  }
);
// watch(
//   () => props.question,
//   (val) => {
//     fileList.value = [];
//     if (val) {
//       formObj.value = parseFormObj(val);
//     } else {
//       formObj.value = {};
//     }
//   }
// );
watch(dialogShow, (val) => {
  emit('update:show', val);
});