tasklist
This commit is contained in:
@@ -7,24 +7,24 @@
|
||||
<div class="con1 grid_wrapper">
|
||||
<table>
|
||||
<tr class="t-head">
|
||||
<th><div class="selbox"></div></th>
|
||||
<th>序号</th>
|
||||
<th>任务号</th>
|
||||
<!-- <th>出发起点</th> -->
|
||||
<th>目标站点</th>
|
||||
<th>任务状态</th>
|
||||
<th>生成时间</th>
|
||||
</tr>
|
||||
<tr v-for="(e,index) in dataList" :key="index">
|
||||
<tr v-for="(e,index) in dataList" :key="e.task_uuid" @click="toRadio(e, index)">
|
||||
<td><div class="selbox radio_uncheck" :class="{'radio_checked': pkId === e.task_uuid}"></div></td>
|
||||
<td>{{index+1}}</td>
|
||||
<td>{{e.task_num}}</td>
|
||||
<!-- <td>{{e.next_point}}</td> -->
|
||||
<td>{{e.target_point}}</td>
|
||||
<td><span class="icon" :class="{bgred: e.task_status_name ==='生成未执行', bgyellow: (e.task_status_name ==='执行中' || e.task_status_name ==='完成')}"></span>{{e.task_status_name}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="subbar">
|
||||
<button class="btn btn1" @click="toDel">任务取消</button>
|
||||
<button class="btn btn1" @click="toDel(selectIndex)">任务取消</button>
|
||||
<button class="btn btn2" @click="updateTask">任务提交</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,6 +39,7 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
pkId: '',
|
||||
selectIndex: '',
|
||||
dataList: []
|
||||
}
|
||||
},
|
||||
@@ -54,8 +55,15 @@ export default {
|
||||
this.toast(res.desc)
|
||||
}
|
||||
},
|
||||
toDel () {
|
||||
console.log(1)
|
||||
toRadio (e, index) {
|
||||
this.selectIndex = index
|
||||
this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
|
||||
},
|
||||
toDel (index) {
|
||||
if (this.pkId) {
|
||||
this.dataList.splice(index, 1)
|
||||
this.pkId = ''
|
||||
}
|
||||
},
|
||||
async updateTask () {
|
||||
let res = await updateTask(this.dataList)
|
||||
@@ -72,6 +80,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.selbox
|
||||
width 40px
|
||||
height 40px
|
||||
position relative
|
||||
.radio_uncheck
|
||||
background center / 100% 100% url(../../../images/new/icon-check1.png) no-repeat
|
||||
.radio_checked
|
||||
background center / 100% 100% url(../../../images/new/icon-check2.png) no-repeat
|
||||
.icon
|
||||
display inline-block
|
||||
width 43px
|
||||
|
||||
Reference in New Issue
Block a user