Browse Source

修改设置页面

yangxiaokun 4 years ago
parent
commit
3e93a5c513
1 changed files with 16 additions and 37 deletions
  1. 16 37
      src/views/devices/set.vue

+ 16 - 37
src/views/devices/set.vue

@@ -35,7 +35,8 @@
 						<el-form-item label="定位频率:">
 							<el-input v-model="baseSet.gpsRate" size="small" class="input" />
 						</el-form-item>
-						<el-button type="primary" size="small" class="button">保存</el-button>
+						<el-button type="primary" size="small" class="button" @click="setGpsRate"
+							:disabled="submitFlag">保存</el-button>
 					</el-form>
 				</el-collapse-item>
 
@@ -69,16 +70,17 @@
 							<el-input v-model="baseSet.key1Name" size="small" class="input" />
 						</el-form-item>
 						<el-form-item label="手机号码:">
-							<el-input v-model="baseSet.key1Name" size="small" class="input" />
+							<el-input v-model="baseSet.key1Phone" size="small" class="input" />
 						</el-form-item>
 						<h3>按键2</h3>
 						<el-form-item label="姓名:">
 							<el-input v-model="baseSet.key2Name" size="small" class="input" />
 						</el-form-item>
 						<el-form-item label="手机号码:">
-							<el-input v-model="baseSet.key2Name" size="small" class="input" />
+							<el-input v-model="baseSet.key2Phone" size="small" class="input" />
 						</el-form-item>
-						<el-button type="primary" size="small" class="button">保存</el-button>
+						<el-button type="primary" size="small" class="button" @click="setSos" :disabled="submitFlag">保存
+						</el-button>
 					</el-form>
 				</el-collapse-item>
 
@@ -91,13 +93,13 @@
 							</el-select>
 						</el-form-item>
 						<el-form-item label="播报时间:" v-if="message.newsType==0">
-							<el-input :value="message.newsTime" size="small" class="input" />
+							<el-input v-model="message.newsTime" size="small" class="input" />
 						</el-form-item>
 						<el-form-item label="播报内容:">
 							<el-input type="textarea" v-model="message.news" style="width: 250px" />
 						</el-form-item>
-						<el-button type="primary" size="small" class="button">保存</el-button>
-
+						<el-button type="primary" size="small" class="button" @click="setNews" :disabled="submitFlag">保存
+						</el-button>
 					</el-form>
 				</el-collapse-item>
 			</el-collapse>
@@ -204,7 +206,7 @@
 			setGpsRate: function() {
 				const param = {
 					deviceId: this.device.clientId,
-					gpsRate: this.device.gpsRate
+					gpsRate: this.baseSet.gpsRate
 				}
 				this.postGeneral(this.Global.setGpsRate, param);
 			},
@@ -225,7 +227,7 @@
 			 */
 			setSos: function() {
 				const param = {
-					deviceId: this.device.clientId,
+					deviceId: "33f1b050b65b4f208704d9061199a359",
 					key0Name: this.baseSet.key0Name,
 					key0Phone: this.baseSet.key0Phone,
 					key1Name: this.baseSet.key1Name,
@@ -241,11 +243,12 @@
 			 */
 			setNews: function() {
 				const param = {
-					deviceId: this.device.clientId,
+					deviceId: "33f1b050b65b4f208704d9061199a359",
 					newsType: this.message.newsType,
 					newsTime: this.message.newsTime,
 					news: this.message.news,
 				}
+				console.log(param)
 				this.lock(1);
 				this.Post(this.Global.setNews, param).then(res => {
 					this.message = {};
@@ -290,7 +293,9 @@
 					that.logs.push(object);
 				}
 			},
-
+			/**
+			 * 格式化时间
+			 */
 			formatDate: function(date) {
 				const d = new Date(date)
 				const y = d.getFullYear() // 年份
@@ -344,19 +349,6 @@
 			}
 		}
 
-		.left::-webkit-scrollbar {
-			width: 7px;
-		}
-
-		.left::-webkit-scrollbar-thumb {
-			background: #cfcdd1;
-			border-radius: 10px;
-		}
-
-		.left::-webkit-scrollbar-track-piece {
-			background: transparent;
-		}
-
 		.right {
 			width: 49%;
 			float: right;
@@ -388,19 +380,6 @@
 					}
 				}
 			}
-
-			&__console::-webkit-scrollbar {
-				width: 7px;
-			}
-
-			&__console::-webkit-scrollbar-thumb {
-				background: #cfcdd1;
-				border-radius: 10px;
-			}
-
-			&__console::-webkit-scrollbar-track-piece {
-				background: transparent;
-			}
 		}
 	}
 </style>