作者 王勇

航班号与航班日期,不能同时为空

@@ -31,9 +31,9 @@ @@ -31,9 +31,9 @@
31 <!-- 显示区域 --> 31 <!-- 显示区域 -->
32 <el-row :gutter="24" style="margin-top: 30px"> 32 <el-row :gutter="24" style="margin-top: 30px">
33 <el-col :span="11" style="margin-top: 10px"> 33 <el-col :span="11" style="margin-top: 10px">
34 -<!-- <el-progress :text-inside="true" :stroke-width="15" :percentage="proportion"-->  
35 -<!-- :color="customColors"-->  
36 -<!-- style="width: 455px"></el-progress>--> 34 + <!-- <el-progress :text-inside="true" :stroke-width="15" :percentage="proportion"-->
  35 + <!-- :color="customColors"-->
  36 + <!-- style="width: 455px"></el-progress>-->
37 <el-input v-model="message" type="textarea" 37 <el-input v-model="message" type="textarea"
38 :autosize="{ minRows: 6, maxRows: 10}" 38 :autosize="{ minRows: 6, maxRows: 10}"
39 style="width: 455px;height: 400px" 39 style="width: 455px;height: 400px"
@@ -121,13 +121,19 @@ @@ -121,13 +121,19 @@
121 /** 121 /**
122 * 获取出港信息列表 122 * 获取出港信息列表
123 */ 123 */
124 - getExitInfoList(onfulfilled) { 124 + getExitInfoList() {
125 let _this = this; 125 let _this = this;
  126 + if (_this.queryInfo.flightNo === '') {
  127 + if (_this.queryInfo.flightDate === '' || _this.queryInfo.flightDate === null) {
  128 + return _this.$message.warning('航班号与航班日期,不能同时为空');
  129 + }
  130 + }
126 _this.$message.success('开始获取统计数据'); 131 _this.$message.success('开始获取统计数据');
127 getExitDataAnalysis(_this.queryInfo).catch(error => { 132 getExitDataAnalysis(_this.queryInfo).catch(error => {
128 // _this.$message.info("即将结束!请您稍候"); 133 // _this.$message.info("即将结束!请您稍候");
129 }); 134 });
130 - }, 135 + }
  136 + ,
131 /** 137 /**
132 * 下载excel 138 * 下载excel
133 */ 139 */
@@ -153,7 +159,8 @@ @@ -153,7 +159,8 @@
153 this.$message.error(error.toString()); 159 this.$message.error(error.toString());
154 }); 160 });
155 161
156 - }, 162 + }
  163 + ,
157 down() { 164 down() {
158 // 创建a标签 165 // 创建a标签
159 const link = document.createElement('a'); 166 const link = document.createElement('a');
@@ -165,7 +172,8 @@ @@ -165,7 +172,8 @@
165 document.body.appendChild(link); 172 document.body.appendChild(link);
166 // 自执行点击事件 173 // 自执行点击事件
167 link.click() 174 link.click()
168 - }, 175 + }
  176 + ,
169 /** 177 /**
170 * 生成excel 178 * 生成excel
171 */ 179 */
@@ -181,7 +189,8 @@ @@ -181,7 +189,8 @@
181 }).catch(error => { 189 }).catch(error => {
182 this.$message.error(error.toString()); 190 this.$message.error(error.toString());
183 }); 191 });
184 - }, 192 + }
  193 + ,
185 socket_onmessage: function (e) { 194 socket_onmessage: function (e) {
186 console.log("从websocket接收到新的消息-->>" + e.data); 195 console.log("从websocket接收到新的消息-->>" + e.data);
187 //this.message = this.message + e.data + "\n"; 196 //this.message = this.message + e.data + "\n";
@@ -202,16 +211,19 @@ @@ -202,16 +211,19 @@
202 this.socketResponse.socketTotalNum !== 0 && this.socketResponse.socketCurrentNum !== 0) { 211 this.socketResponse.socketTotalNum !== 0 && this.socketResponse.socketCurrentNum !== 0) {
203 this.generateExcel(); 212 this.generateExcel();
204 } 213 }
205 - }, 214 + }
  215 + ,
206 socket_onopen: function (e) { 216 socket_onopen: function (e) {
207 console.log("websocket->>链接已链接"); 217 console.log("websocket->>链接已链接");
208 - }, 218 + }
  219 + ,
209 /** 220 /**
210 * 重写日期函数格式化日期 221 * 重写日期函数格式化日期
211 */ 222 */
212 dataFormat(time) { 223 dataFormat(time) {
213 return `${time.getFullYear()}-${time.getMonth() + 1 >= 10 ? (time.getMonth() + 1) : '0' + (time.getMonth() + 1)}-${time.getDate() >= 10 ? time.getDate() : '0' + time.getDate()} ${time.getHours() >= 10 ? time.getHours() : '0' + time.getHours()}:${time.getMinutes() >= 10 ? time.getMinutes() : '0' + time.getMinutes()}:${time.getSeconds() >= 10 ? time.getSeconds() : '0' + time.getSeconds()}`; 224 return `${time.getFullYear()}-${time.getMonth() + 1 >= 10 ? (time.getMonth() + 1) : '0' + (time.getMonth() + 1)}-${time.getDate() >= 10 ? time.getDate() : '0' + time.getDate()} ${time.getHours() >= 10 ? time.getHours() : '0' + time.getHours()}:${time.getMinutes() >= 10 ? time.getMinutes() : '0' + time.getMinutes()}:${time.getSeconds() >= 10 ? time.getSeconds() : '0' + time.getSeconds()}`;
214 - }, 225 + }
  226 + ,
215 /** 227 /**
216 * 将小数转换成百分比 228 * 将小数转换成百分比
217 * @param point 229 * @param point