فهرست منبع

fix: 优化设为仿真按钮背景色

guolei 1 سال پیش
والد
کامیت
f2cd2cba18
1فایلهای تغییر یافته به همراه9 افزوده شده و 11 حذف شده
  1. 9 11
      src/views/workManagement/components/simulationTable.vue

+ 9 - 11
src/views/workManagement/components/simulationTable.vue

@@ -2,7 +2,7 @@
 	<div class="container">
 		<div class="table-operate">
 			<el-button class="btn" type="primary" @click="add">添加</el-button>
-			<el-button class="btn" type="info" @click="settingsSimulation">设为仿真视角</el-button>
+			<el-button class="btn btn-info" type="info" @click="settingsSimulation">设为仿真视角</el-button>
 		</div>
 		<el-table class="table-content" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%">
 			<el-table-column label="序号">
@@ -166,11 +166,13 @@
 			},
 			initCurrentIndex(){
 				this.currentIndex = null;
+				this.selectRow = null;
 				let length = this.tableData.length;
 				for(let index = 0; index < length; index ++){
 					let record = this.tableData[index];
 					if(record.isSimulationCar == 1){
 						this.currentIndex = this.getRowIndex(index);
+						this.selectRow = record;
 					}
 				}
 			},
@@ -274,15 +276,6 @@
 			settingsSimulationConfirm(row) {
 				// this.searchSimulation(row.id)
 			},
-			searchSimulation(id) {
-				let length = this.tableData.length;
-				for (let index = 0; index < length; index++) {
-					let record = this.tableData[index];
-					if(record.id == id){
-						this.currentIndex = this.getRowIndex(index);
-					}
-				}
-			},
 			saveAll(mapId) {
 				this.$axios({
 					method: "post",
@@ -372,7 +365,12 @@
 		height: 2.5rem;
 		margin: 1rem;
 	}
-
+	
+	.btn-info{
+		background-color: #909399 !important;
+		color: #ffffff !important;
+	}
+	
 	.table-content {
 		flex: auto;
 	}