From 7f2bc78a5101017c4470577003e4cf99c0ca7648 Mon Sep 17 00:00:00 2001 From: zhangyanpeng <bob.zhang@highdatas.com> Date: 星期四, 23 一月 2020 14:49:23 +0800 Subject: [PATCH] 首页 --- src/views/Overview.vue | 83 +++++++++++++++++++++++++++++++++-------- 1 files changed, 66 insertions(+), 17 deletions(-) diff --git a/src/views/Overview.vue b/src/views/Overview.vue index aaf0fd9..960d40e 100644 --- a/src/views/Overview.vue +++ b/src/views/Overview.vue @@ -2,7 +2,7 @@ <div class="class_overview"> <div style="float: left; width: 100%; height: 50px;"> <span>璇烽�夋嫨椤圭洰锛�</span> - <el-select v-model="value" placeholder="璇烽�夋嫨" size="small"> + <el-select @change="selectChange_" filterable v-model="value" placeholder="璇烽�夋嫨" size="small"> <el-option v-for="item in options" :key="item.value" @@ -11,7 +11,6 @@ </el-option> </el-select> - <el-button type="primary" style="float: right;" @click="addProject">鏂板缓椤圭洰</el-button> </div> <div style="float: left; margin-left: 1%; width: 69%; height: 80vh; "> @@ -36,23 +35,27 @@ </div> </div> </div> - <div class="z_shadow" style="float: right; margin-right: 1%; width: 28%; height: 70vh; border: 1px solid #e4eef9;"></div> + <div class="z_shadow" style="float: right; margin-right: 1%; padding: 10px; box-sizing: border-box; width: 28%; height: 70vh; border: 1px solid #e4eef9; overflow: auto;"> + <h3 style="margin: 0px;">椤圭洰姒傝</h3> + <div v-for="(type_itm, k_) in task_itm" :key="k_"> + <h3>{{k_+1}}銆亄{type_itm.name}} <span style="font-size: 12px; color: #409EFF;">{{type_itm.state}} </span></h3> + <div> + <span>{{type_itm.desp}}</span> + </div> + </div> + </div> - <el-dialog @close="Cancel" width="70%" top="50px" :visible.sync="dialog_1" append-to-body> - <newProject @closeNewProject="closeNewProject"></newProject> - </el-dialog> + </div> </template> <script> - import newProject from '../components/popup/newProject.vue' + export default { - components: { - newProject - }, + data() { return { options: [ @@ -77,9 +80,24 @@ dialog_1: false, fileLevel: 0, fileList: [], + + task_itm: [ + {'id': "111_1", 'name': "绔嬮鏈嶅姟", desp: "鎻忚堪鐪嬪埌闈欏畨瀵�", 'state': "杩涜涓�"}, // + {'id': "111_2", 'name': "鏂规寮�鍙戞湇鍔�", desp: "鎻忚堪鐪嬪埌闈欏畨瀵�", 'state': "杩涜涓�"}, + {'id': "111_2", 'name': "鏂规寮�鍙戞湇鍔�", desp: "鎻忚堪鐪嬪埌闈欏畨瀵�", 'state': "杩涜涓�"}, + {'id': "111_2", 'name': "鏂规寮�鍙戞湇鍔�", desp: "鎻忚堪鐪嬪埌闈欏畨瀵�", 'state': "杩涜涓�"}, + {'id': "111_2", 'name': "鏂规寮�鍙戞湇鍔�", desp: "鎻忚堪鐪嬪埌闈欏畨瀵�", 'state': "杩涜涓�"}, + {'id': "111_2", 'name': "鏂规寮�鍙戞湇鍔�", desp: "鎻忚堪鐪嬪埌闈欏畨瀵�", 'state': "杩涜涓�"}, + {'id': "111_2", 'name': "鏂规寮�鍙戞湇鍔�", desp: "鎻忚堪鐪嬪埌闈欏畨瀵�", 'state': "杩涜涓�"}, + {'id': "111_2", 'name': "鏂规寮�鍙戞湇鍔�", desp: "鎻忚堪鐪嬪埌闈欏畨瀵�", 'state': "杩涜涓�"}, + {'id': "111_2", 'name': "鏂规寮�鍙戞湇鍔�", desp: "鎻忚堪鐪嬪埌闈欏畨瀵�", 'state': "杩涜涓�"}, + + ] } }, mounted() { + this.initSelect(); + let fileList1 = [ {name: "鏂囦欢鍚嶇О1", type: "isfile", path: ""}, {name: "鏂囦欢鍚嶇О2", type: "isfile", path: ""}, @@ -89,6 +107,26 @@ }, methods: { + initSelect() { + var me = this; + this.$axios.get("/api/scheme/all") + .then(data_ => { + console.log(data_); + if(data_.data.success){ + me.options = []; + var datas = data_.data.data; + datas.forEach(function(one){ + var item = { + value:one.id, + label:one.name + } + me.options.push(item); + }); + } + }).catch(error => { + console.log(error); + }) + }, file_click(file) { if (file.type == 'isfiles') { let fileList2 = [ @@ -114,16 +152,27 @@ ]; this.fileList = fileList2; }, - addProject() { - this.dialog_1 = true; - - }, + Cancel() { }, - closeNewProject() { - this.dialog_1 = false - }, + selectChange_(val) { + let url = "/api/scheme/getSchemeInfo/" + this.value; + this.$axios.get(url,{ + + }).then(data_ => { + console.log(data_); + // 鍥� + // 璁板綍 + // 浜哄憳 + // 璇︽儏 + //鐩綍 + }).catch(error =>{ + console.log(error); + }) + + } + } } -- Gitblit v1.8.0