From ae52f9a7cca3ebe8803f720e5891a696714347db Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 04 十一月 2025 13:04:16 +0800
Subject: [PATCH] 基础数据产品-整改清单中,新增按照任意时段和区县进行统计的功能

---
 src/views/fysp/data-product/components/ProdDownload.vue |   41 ++++++++++++++++++++++++++++++++++++++---
 1 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/src/views/fysp/data-product/components/ProdDownload.vue b/src/views/fysp/data-product/components/ProdDownload.vue
index 8c073f1..c7552a1 100644
--- a/src/views/fysp/data-product/components/ProdDownload.vue
+++ b/src/views/fysp/data-product/components/ProdDownload.vue
@@ -15,8 +15,14 @@
       </el-form-item>
       <el-form-item label="浜у搧褰㈠紡">
         <el-radio-group v-model="downloadType">
-          <el-radio value="1"> Excel琛ㄥ崟 </el-radio>
-          <el-radio value="2" :disabled="true"> Word鏂囨。 </el-radio>
+          <el-radio
+            v-for="item in _downloadTypeOptions"
+            :key="item.value"
+            :value="item.value"
+            :disabled="item.disabled"
+          >
+            {{ item.label }}
+          </el-radio>
         </el-radio-group>
       </el-form-item>
     </el-form>
@@ -48,11 +54,33 @@
   loading: {
     type: Boolean,
     default: false
+  },
+  downloadTypeOptions: {
+    type: Array,
+    default: () => [
+      {
+        value: '1',
+        label: 'Excel琛ㄥ崟'
+      },
+      {
+        value: '2',
+        label: 'Word鏂囨。'
+      }
+    ]
+  },
+  // 涓嬭浇绫诲瀷鏄惁鏈夋晥
+  downloadTypeValid: {
+    type: Array,
+    default: () => ['1']
+  },
+  defaultDownloadType: {
+    type: String,
+    default: '1'
   }
 });
 const emit = defineEmits(['submit']);
 
-const downloadType = ref('1');
+const downloadType = ref(props.defaultDownloadType);
 const opts = computed(() => {
   if (props.queryOpt instanceof Array && props.queryOpt.length > 0) {
     return props.queryOpt[0];
@@ -61,6 +89,13 @@
   }
 });
 
+const _downloadTypeOptions = computed(() => {
+  return props.downloadTypeOptions.map((item) => ({
+    ...item,
+    disabled: !props.downloadTypeValid.includes(item.value)
+  }));
+});
+
 const submit = () => {
   emit('submit', {
     downloadType: downloadType.value

--
Gitblit v1.9.3