From 5229a61ca5250e1bd24399258e05ada2e7c4253a Mon Sep 17 00:00:00 2001
From: 李林 <z1292839451@163.com>
Date: 星期四, 28 十二月 2023 11:26:01 +0800
Subject: [PATCH] 第三阶段

---
 src/components/view/data-reporting.vue |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/components/view/data-reporting.vue b/src/components/view/data-reporting.vue
index 5708237..e300894 100644
--- a/src/components/view/data-reporting.vue
+++ b/src/components/view/data-reporting.vue
@@ -47,7 +47,7 @@
 			<el-row class="title">
 				<el-col :span="12" style="padding-left: 20px;">鏁版嵁涓婃姤</el-col>
 				<el-col :span="12" style="text-align: right;padding-right: 8px;">
-					<el-button size="small" @click="">
+					<el-button size="small" @click="$refs.ValueTable.openDownDia()">
 						<i class="el-icon-download" style="color: #3A7BFA;"></i>
 						<span style="color: #3A7BFA;">瀵煎嚭</span>
 					</el-button>
@@ -72,6 +72,7 @@
 				<div class="search_input">
 					<el-select size="small" style="width: 100%;" placeholder="璇烽�夋嫨" v-model="componentData.entity.product">
 						<el-option :value="null" label="鍏ㄩ儴"></el-option>
+						<el-option v-for="(a, ai) in product" :key="ai" :label="a.product" :value="a.product"></el-option>
 					</el-select>
 				</div>
 			</div>
@@ -228,11 +229,14 @@
 				addDia: false,
 				upDia: false,
 				upLoad: false,
-				upData: {}
+				upData: {},
+				product: [],
 			}
 		},
 		mounted() {
 			this.entityCopy = this.HaveJson(this.componentData.entity)
+			this.selectProductEnumList()
+			this.getPower()
 		},
 		methods: {
 			refreshTable() {
@@ -265,6 +269,25 @@
 					this.upDia = false
 					this.refreshTable()
 				})
+			},
+			selectProductEnumList(){
+				this.$axios.get(this.$api.enums.selectProductEnumList).then(res=>{
+					this.product = res.data
+				})
+			},
+			// 鏉冮檺鍒嗛厤
+			getPower(){
+				let power = JSON.parse(sessionStorage.getItem('power'))
+				let up = false
+				for (var i = 0; i < power.length; i++) {
+					if(power[i].menuMethod=='upDataReporting'){
+						up = true
+						break
+					}
+				}
+				if(!up){
+					this.componentData.do = []
+				}
 			}
 		}
 	}

--
Gitblit v1.9.3