tasklist
This commit is contained in:
@@ -7,24 +7,24 @@
|
|||||||
<div class="con1 grid_wrapper">
|
<div class="con1 grid_wrapper">
|
||||||
<table>
|
<table>
|
||||||
<tr class="t-head">
|
<tr class="t-head">
|
||||||
|
<th><div class="selbox"></div></th>
|
||||||
<th>序号</th>
|
<th>序号</th>
|
||||||
<th>任务号</th>
|
<th>任务号</th>
|
||||||
<!-- <th>出发起点</th> -->
|
|
||||||
<th>目标站点</th>
|
<th>目标站点</th>
|
||||||
<th>任务状态</th>
|
<th>任务状态</th>
|
||||||
<th>生成时间</th>
|
<th>生成时间</th>
|
||||||
</tr>
|
</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>{{index+1}}</td>
|
||||||
<td>{{e.task_num}}</td>
|
<td>{{e.task_num}}</td>
|
||||||
<!-- <td>{{e.next_point}}</td> -->
|
|
||||||
<td>{{e.target_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><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>
|
<td>{{e.create_time}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="subbar">
|
<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>
|
<button class="btn btn2" @click="updateTask">任务提交</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -39,6 +39,7 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
pkId: '',
|
pkId: '',
|
||||||
|
selectIndex: '',
|
||||||
dataList: []
|
dataList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -54,8 +55,15 @@ export default {
|
|||||||
this.toast(res.desc)
|
this.toast(res.desc)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toDel () {
|
toRadio (e, index) {
|
||||||
console.log(1)
|
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 () {
|
async updateTask () {
|
||||||
let res = await updateTask(this.dataList)
|
let res = await updateTask(this.dataList)
|
||||||
@@ -72,6 +80,14 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<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
|
.icon
|
||||||
display inline-block
|
display inline-block
|
||||||
width 43px
|
width 43px
|
||||||
|
|||||||
Reference in New Issue
Block a user