change
This commit is contained in:
@@ -92,7 +92,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.vid}">
|
<!-- <tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.vid}"> -->
|
||||||
|
<tr v-for="(e, i) in dataList" :key="i">
|
||||||
<td @tap="toCheck(e)"><uni-icons :type="e.checked ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></td>
|
<td @tap="toCheck(e)"><uni-icons :type="e.checked ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></td>
|
||||||
<td>{{e.vehicle_code}}</td>
|
<td>{{e.vehicle_code}}</td>
|
||||||
<td>{{e.site_code}}</td>
|
<td>{{e.site_code}}</td>
|
||||||
@@ -103,7 +104,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" @tap="toDel()">删除选中行</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !checkedArr.length}" @tap="toDel()">删除选中行</button>
|
||||||
<button class="zd-col-11 button-primary" :class="{'button-info': !index || !dataList.length}" @tap="_zwConfirmIn">全部提交</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !index || !dataList.length}" @tap="_zwConfirmIn">全部提交</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -128,6 +129,7 @@
|
|||||||
val1: '',
|
val1: '',
|
||||||
val2: '',
|
val2: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
|
checkedArr: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
currentData: {},
|
currentData: {},
|
||||||
flag: false,
|
flag: false,
|
||||||
@@ -139,7 +141,7 @@
|
|||||||
this.id = options.id
|
this.id = options.id
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
// this._getFormDataList()
|
this._getFormDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange (e) {
|
handleChange (e) {
|
||||||
@@ -176,7 +178,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
toDel () {
|
toDel () {
|
||||||
this.dataList = this.dataList.filter(el => el.checked === true)
|
this.dataList = this.dataList.filter(el => el.checked === false)
|
||||||
},
|
},
|
||||||
async _getFormDataList () {
|
async _getFormDataList () {
|
||||||
try {
|
try {
|
||||||
@@ -193,12 +195,17 @@
|
|||||||
selectChange (e) {
|
selectChange (e) {
|
||||||
this.index = e
|
this.index = e
|
||||||
},
|
},
|
||||||
|
// toChek (e) {
|
||||||
|
// this.pkId = this.pkId === e.vid ? '' : e.vid
|
||||||
|
// this.pkObj = this.pkId === e.vid ? e : {}
|
||||||
|
// },
|
||||||
toCheck (e) {
|
toCheck (e) {
|
||||||
e.checked = !e.checked
|
e.checked = !e.checked
|
||||||
let arr = this.dataList.filter(el => el.checked === true)
|
this.checkedArr = this.dataList.filter(el => el.checked === true)
|
||||||
},
|
},
|
||||||
clearUp () {
|
clearUp () {
|
||||||
this.pkId = ''
|
this.dataList = []
|
||||||
|
this.checkedArr = []
|
||||||
},
|
},
|
||||||
async _zwConfirmIn () {
|
async _zwConfirmIn () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
@@ -228,3 +235,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.checked
|
||||||
|
background #ffffff
|
||||||
|
.slide_new table tr.checked td {
|
||||||
|
// background-color: transparent;
|
||||||
|
// color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user