Commit 1096394b62c0c84051cb0d046032527472fc16f9

Authored by yangzhi
1 parent e1644c39

超哥牛批

Showing 1 changed file with 16 additions and 3 deletions
src/views/user/userlist.vue
... ... @@ -115,7 +115,7 @@
115 115 <el-table-column prop="date" label="操作" width="180">
116 116 <template slot-scope="scope">
117 117 <el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)" circle>编辑</el-button>
118   - <el-button type="text" icon="el-icon-delete" circle>删除</el-button>
  118 + <el-button type="text" icon="el-icon-delete" circle @click="handleDelete(scope.row,scope.$index)">删除</el-button>
119 119 </template>
120 120 </el-table-column>
121 121 </el-table>
... ... @@ -151,7 +151,7 @@
151 151 </div>
152 152 </el-dialog>
153 153  
154   - <el-dialog title="测试历史记录" :visible.sync="dialogTableVisible" @close=" gridData =[]" height="400">
  154 + <el-dialog title="测试历史记录" :visible.sync="dialogTableVisible" @close=" gridData =[]" height="800" width="80%">
155 155 <el-table :data="gridData" height="400">
156 156 <el-table-column property="TestPaperTitle" label="试卷" sortable></el-table-column>
157 157 <el-table-column property="AnswerTime" label="测试时间" width="180" sortable>
... ... @@ -171,6 +171,11 @@
171 171 </template>
172 172 </el-table-column>
173 173 <el-table-column property="Achievement" label="成绩" sortable></el-table-column>
  174 + <el-table-column label="操作">
  175 + <template slot-scope="scope">
  176 + <el-button type="success" @click="handleWatchLive(scope.row)">观看直播</el-button>
  177 + </template>
  178 + </el-table-column>
174 179  
175 180 </el-table>
176 181  
... ... @@ -252,7 +257,7 @@
252 257 </template>
253 258  
254 259 <script>
255   - import { ImportUserByExcel, GetUserList, AddInvitationAnswerMultiple } from "@/api/user";
  260 + import { ImportUserByExcel, GetUserList, AddInvitationAnswerMultiple,UsersDelete } from "@/api/user";
256 261 import { GetUserClassList, UserClassCreate, UserClassUpdate, UserClassDelete } from "@/api/userclass";
257 262 import { GetHistoryList } from '@/api/HistoryAnswer'
258 263  
... ... @@ -324,6 +329,14 @@
324 329 this.loadTree();
325 330 },
326 331 methods: {
  332 + handleDelete(item,index){
  333 + this.userList.splice(index,1);
  334 + UsersDelete({ids:item.id});
  335 + },
  336 + handleWatchLive(item){
  337 + console.log('handleWatchLive',item);
  338 + this.$router.push(`/live?id=${item.StreamName}`)
  339 + },
327 340 submitForm() {
328 341 this.dialogClassIVIsible = false;
329 342 },
... ...