From 5346354c8b6685d4c111041a8c5a4d61dae13050 Mon Sep 17 00:00:00 2001
From: zhangyanpeng <bob.zhang@highdatas.com>
Date: 星期四, 28 五月 2020 10:31:46 +0800
Subject: [PATCH] 添加任务总揽菜单

---
 src/views/list.vue |   63 +++++++++++++++++++++----------
 1 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/src/views/list.vue b/src/views/list.vue
index 44937b2..6b3c9f1 100644
--- a/src/views/list.vue
+++ b/src/views/list.vue
@@ -3,7 +3,7 @@
 		<div align="left">
 
 			<div class="btn-line">
-				<el-button type="primary" @click="addProject">鏂板缓椤圭洰</el-button>
+				<!-- <el-button type="primary" @click="addProject">鏂板缓椤圭洰</el-button> -->
 				<el-button type="primary" v-if="editShow" @click="editProject">缂栬緫椤圭洰</el-button>
 				<el-button type="primary" @click="showDetail">鏌ョ湅璇︽儏</el-button>
 				<el-button type="primary" @click="download">瀵煎嚭timeline</el-button>
@@ -17,12 +17,14 @@
 					<el-input v-model="formInline.name" placeholder="椤圭洰鍚嶇О"></el-input>
 				</el-form-item>
 				
-				<el-form-item label="鐮旂┒鐩殑">
-					<el-select v-model="formInline.type" placeholder="鐮旂┒鐩殑">
-						<el-option label="骞查鎬х郴缁熻瘎浠�" value="骞查鎬х郴缁熻瘎浠�"></el-option>
-						<el-option label="璇婃柇鎬х郴缁熻瘎浠�" value="璇婃柇鎬х郴缁熻瘎浠�"></el-option>
-						<el-option label="棰勫悗鎬х郴缁熻瘎浠�" value="棰勫悗鎬х郴缁熻瘎浠�"></el-option>
-						<el-option label="鐩稿叧鎬х郴缁熻瘎浠�" value="鐩稿叧鎬х郴缁熻瘎浠�"></el-option>
+				<el-form-item label="鐮旂┒绫诲瀷鍒嗙被" label-width="100px">
+					<el-select v-model="formInline.type" placeholder="鐮旂┒绫诲瀷鍒嗙被">
+						<el-option
+							v-for="(item,k) in options_type"
+							:key="k"
+							:label="item"
+							:value="item"
+						></el-option>
 					</el-select>
 				</el-form-item>
 				
@@ -55,11 +57,11 @@
 				:header-cell-style="{'width': '100%', 'text-align': 'center'}" 
 				:row-class-name="tableRowClassName">
 				<el-table-column type="index" width="50"> </el-table-column>
+			<el-table-column prop="code" label="椤圭洰鍙�" width="130">
+			</el-table-column>
 			<el-table-column prop="name" label="椤圭洰鍚嶇О" width="120" show-overflow-tooltip>
 			</el-table-column>
 			<el-table-column prop="status" label="褰撳墠鐘舵��" width="100" align="center" :formatter="status_">
-			</el-table-column>
-			<el-table-column prop="reseachType" label="鐮旂┒绫诲瀷" width="130">
 			</el-table-column>
 			<el-table-column prop="totalCnt" label="鏈嶅姟椤圭洰鏁�" width="100" align="center">
 			</el-table-column>
@@ -71,12 +73,12 @@
 			</el-table-column>
 			<el-table-column prop="endTime" label="缁撴潫鏃堕棿" width="100" align="center" :formatter="dateFormat_" >
 			</el-table-column>
-			<el-table-column prop="desp" label="椤圭洰鎻忚堪" show-overflow-tooltip></el-table-column>
+			<el-table-column prop="desc" label="椤圭洰鎻忚堪" show-overflow-tooltip></el-table-column>
 			<el-table-column label="鎿嶄綔" align="center" width="300">
 			  <template v-slot="{row}">
 			    <el-row>
 			      <el-tooltip class="item" effect="dark" content="棰勮" placement="top">
-			        <el-button type="primary" icon=" el-icon-view" circle @click="viewHT(row)"></el-button>
+			        <el-button :disabled="!row.attachment" type="primary" icon=" el-icon-view" circle @click="viewHT(row)"></el-button>
 			      </el-tooltip>
 			      <el-tooltip class="item" effect="dark" content="涓婁紶鎶ヤ环鍚堝悓" placement="top">
 			        <el-button type="success" icon="el-icon-upload2" circle @click="uploadHT(row)"></el-button>
@@ -181,23 +183,38 @@
 				labelPosition: "left",
 				tableData: [],
 				userId:"",
-				assign:undefined,
-				formInline: {
-					user: '',
-					region: ''
-				},
+				assign:null,
+				formInline: {},
+				options_type:[
+					"Health technology assessment (HTA)",
+					"Clinical practice guideline (CPG)",
+					"Evidence mapping",
+					"Overview of review",
+					"Scoping review",
+					"Rapid review",
+					"Systematic review",
+					"Rapid review",
+					"Randomised controlled trial (RCT)",
+					"Other"
+				],
 			}
 		},
 		mounted() { //缁勪欢閰嶇疆鍚庯紝椤甸潰鏄剧ず鍓嶃�傜敤浜庡姞杞芥暟鎹�
-			this.getData();
 			//this.userId = localStorage.getItem('userId');
 			//this.assign = localStorage.getItem('assign');
 			
 			this.userId = this.$cookies.get('userId');
 			this.assign = this.$cookies.get('assign');
+			
+			this.getData();
 		},
 		methods: {
 			download() {
+				if (!this.selected) {
+					this.$message({message:'璇烽�夋嫨涓嬭浇鏉$洰', type: 'warning'});
+					return;
+				}
+				
 				if(!this.selected.id || this.selected.status == "edit"){
 					this.$message({message:'銆愭湭寮�濮嬨�戠姸鎬佷笉鑳戒笅杞�', type: 'warning'});
 					return;
@@ -315,14 +332,20 @@
 				let params =  {
 					pageSize: this.pagesize
 				};
-				if(this.assign) {
+				if(this.assign == "true") {
 					params.userId = this.userId;
 				}
-				if(query){
+				
+				if (query && query.name) {
 					params.name = query.name;
+				}
+				if (query && query.status) {
 					params.status = query.status;
+				}
+				if (query && query.type) {
 					params.type = query.type;
 				}
+				
 				this.$axios.get(url, {
 						params
 					})
@@ -385,7 +408,7 @@
 				}else {
 					this.rowData = {
 						id:this.selected.id,
-						desp:this.selected.desp,
+						desc:this.selected.desc,
 						name: this.selected.name,
 						beginDate: this.selected.beginDate,
 						endDate: this.selected.endDate,

--
Gitblit v1.8.0