diff --git a/src/views/DataAnalyse/components/diagram/newBtnList.vue b/src/views/DataAnalyse/components/diagram/newBtnList.vue index 4831aed8..cb269b80 100644 --- a/src/views/DataAnalyse/components/diagram/newBtnList.vue +++ b/src/views/DataAnalyse/components/diagram/newBtnList.vue @@ -58,7 +58,15 @@ - 同步数据 + + {{ other_send_status ? "更新数据" : "同步数据" }} + @@ -86,7 +94,9 @@ const props = defineProps({ type: Array, default: () => [] }, - selectedSns: {} + selectedSns: {}, + template_type: {}, + other_send_status: {}, }) const store = useStore() const { selectedSns } = toRefs(props) @@ -256,10 +266,13 @@ async function syncData() { syncDataLoading.value = true; try { await syncProductTest(sn.value); - message.success('同步成功!'); - // message.success('同步成功,您还需在产品测试模块导入该问卷哦~'); + if (props.other_send_status) { + return message.success("同步成功,您还需在产品测试模块导入该问卷哦~"); + } + message.success("同步成功!"); + emit("update:other_send_status", 1); } catch (error) { - console.error('同步数据错误', error) + console.error("同步数据错误", error); } syncDataLoading.value = false; } diff --git a/src/views/DataAnalyse/particulars/list.vue b/src/views/DataAnalyse/particulars/list.vue index eddcf916..efdfe4e4 100644 --- a/src/views/DataAnalyse/particulars/list.vue +++ b/src/views/DataAnalyse/particulars/list.vue @@ -19,7 +19,23 @@ - +
@@ -188,6 +204,8 @@ const selectedSns = computed(() => { }) const answer_columns = ref([]) +const template_type = ref([]) +const other_send_status = ref([]) const isFilted = ref(false) // function onSearch(payload) { @@ -292,6 +310,9 @@ const getSurveysHead = async () => { columns.value = res.columns // 筛选条件 questions.value = res?.filters?.answer_questions + // 同步数据 + template_type.value = res.template_type; + other_send_status.value = res.other_send_status; console.log('传', questions.value) } catch (error) { console.error(error)