From 84326b11401f217cd483d13bc72cec4ffd5da7ce Mon Sep 17 00:00:00 2001 From: bob <bob.zhang@highdatas.com> Date: 星期三, 25 十一月 2020 10:02:22 +0800 Subject: [PATCH] 2020-11-13 --- src/views/calendarTask.vue | 55 ++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 38 insertions(+), 17 deletions(-) diff --git a/src/views/calendarTask.vue b/src/views/calendarTask.vue index 7683f38..021f775 100644 --- a/src/views/calendarTask.vue +++ b/src/views/calendarTask.vue @@ -21,7 +21,7 @@ </div> </div> - <el-dialog @close="Cancel" width="40%" top="10%" :visible.sync="dialog_1" v-if="dialog_1"> + <el-dialog width="40%" top="10%" :visible.sync="dialog_1" v-if="dialog_1"> <div slot="title" class="dialog-title" style="text-align: left;"> <span> 浠诲姟澶勭悊 </span> </div> @@ -37,7 +37,6 @@ ref="upload" :on-success="upSuccess" :on-error="upError" - > <el-button size="medium" type="text">閫夋嫨鏂囦欢</el-button> <div slot="tip" class="el-upload__tip">鏂囦欢涓嶈秴杩�50M</div> @@ -49,13 +48,14 @@ type="textarea" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" + @change="setDesc" v-model="desc_task"> </el-input> </div> <!-- 澶勭悊瀹屾垚 --> <div slot="footer" class="dialog-footer"> - <el-button v-if="handleTaskType.mustAttach" @click="submitUpload">鐐瑰嚮涓婁紶</el-button> + <!-- <el-button v-if="handleTaskType.mustAttach" @click="submitUpload">鐐瑰嚮涓婁紶</el-button> --> <el-button @click="Cancel">鍙� 娑�</el-button> <el-button type="primary" @click="doHandleTask">澶勭悊瀹屾垚</el-button> </div> @@ -73,6 +73,8 @@ }, data(){ return{ + isZ: true, + me_date: null, datedef:[ {'date': "2020-01-01", 'task': 3}, {'date': "2020-01-11", 'task': 2}, @@ -95,11 +97,13 @@ //鑾峰彇褰撴湀鏁版嵁 let nowDate = new Date(); + this.me_date = nowDate; var imoment = this.$moment(nowDate); let iformat = imoment.format('YYYY-MM'); let systemDate = iformat + '-01 00:00:00'; this.getDatedef(systemDate); - this.userId = localStorage.getItem('userId'); + //this.userId = localStorage.getItem('userId'); + this.userId = this.$cookies.get('userId'); }, methods: { @@ -132,6 +136,12 @@ this.dialog_1 = true; }, + setDesc(val) { + this.upData = {//璁剧疆瑕佷紶鐨勫弬鏁� + desp: val + }; + }, + doHandleTask() { //姝d鐨勬槑缁嗕换鍔″畬鎴� let id = this.handleTaskType.id; @@ -139,9 +149,6 @@ this.$message('璇峰~鍐欐弿杩�'); return } - this.upData = {//璁剧疆瑕佷紶鐨勫弬鏁� - desp: this.desc_task - }; if(this.handleTaskType.mustAttach) { this.$refs.upload.submit();//寮�濮嬩笂浼� @@ -154,7 +161,7 @@ params }) .then(data_ => { - console.log(data_); + // console.log(data_); if(data_.data.success) { this.$message('澶勭悊鎴愬姛'); me.Cancel(); @@ -162,15 +169,15 @@ this.$message({message:'澶勭悊浠诲姟澶辫触', type: 'warning'}); } }).catch(error => { - console.log(error); + // console.log(error); }); } - if (this.dialog_1) { + /* if (this.dialog_1) { this.Cancel(); - } + } */ }, submitUpload() { @@ -185,6 +192,7 @@ upSuccess(response, file, fileList) { this.$message('涓婁紶鎴愬姛'); + this.Cancel(); }, upError(err, file, fileList) { @@ -192,10 +200,21 @@ }, Cancel() { + this.isZ = false; + this.isZ = true; this.dialog_1 = false; + + // let header_height = this.$refs.calendar_div.getElementsByClassName('z_calendar_table')[0].offsetHeight; + // this.$refs.calendar_div.getElementsByClassName('z_right')[0].style['height'] = header_height + "px"; + this.DayDataTree = []; + var imoment = this.$moment(this.me_date); + let iformat = imoment.format('YYYY-MM'); + let systemDate = iformat + '-01 00:00:00'; + this.getDatedef(systemDate); }, dateChange(date_) { + this.me_date = date_; var imoment = this.$moment(date_); let iformat = imoment.format('YYYY-MM'); let systemDate = iformat + '-01 00:00:00'; @@ -227,7 +246,8 @@ params }) .then(data_ => { - console.log(data_); + // console.log(data_); + window.console.log(data_); let datas= data_.data.data; datas = datas.map(el => { var imoment = this.$moment(el.date); @@ -238,7 +258,7 @@ }) this.datedef = datas; }).catch(error => { - console.log(error); + // console.log(error); }); }, @@ -252,7 +272,8 @@ params }) .then(data_ => { - console.log(data_); + // console.log(data_); + window.console.log(data_); // let DayDatas = [ // {'id': "111", 'name': "娴嬭瘯1椤圭洰", 'desc': "姝ら」鐩富瑕侀拡瀵规彁楂樻晥鐜囧拰閿�鍞噺"}, //杩斿洖鐨勬暟缁勫瓧娈� // {'id': "111_1", 'name': "绔嬮鏈嶅姟", 'mustAttach': true, 'parentId': "111"}, // @@ -287,10 +308,10 @@ } this.DayDataTree = result; }).catch(error => { - console.log(error); + // console.log(error); }) - - } + + }, } } -- Gitblit v1.8.0