Commit 948d11e9 authored by 王飞龙's avatar 王飞龙

bug修改

parent 39588ba5
...@@ -90,24 +90,24 @@ ...@@ -90,24 +90,24 @@
<el-button <el-button
v-hasPermi="['business:device:export']" v-hasPermi="['business:device:export']"
class="fourWordswhiteBtn" class="fourWordswhiteBtn"
@click="selectAll()" @click="checkAll()"
><svg-icon style="margin-right: 1px" icon-class="shuaixuan_icon_quanbu" /> ><svg-icon style="margin-right: 1px" icon-class="shuaixuan_icon_quanbu" />
选择全部 选择全部
</el-button> </el-button>
<el-button <el-button
v-hasPermi="['business:device:export']" v-hasPermi="['business:device:export']"
class="fourWordswhiteBtn" class="fourWordswhiteBtn"
@click="reverseSelect(deviceList)" @click="reverseSelection"
><svg-icon style="margin-right: 1px" icon-class="shuaixuan_icon_fanxiang" />反向选择 ><svg-icon style="margin-right: 1px" icon-class="shuaixuan_icon_fanxiang" />反向选择
</el-button> </el-button>
<!-- <el-button--> <!-- <el-button-->
<!-- v-hasPermi="['business:device:import']"--> <!-- v-hasPermi="['business:device:import']"-->
<!-- class="fourWordswhiteBtn"--> <!-- class="fourWordswhiteBtn"-->
<!-- @click="handleImport"--> <!-- @click="handleImport"-->
<!-- >--> <!-- >-->
<!-- <svg-icon style="margin-right: 1px" icon-class="shaixuan_icon_daoru" />--> <!-- <svg-icon style="margin-right: 1px" icon-class="shaixuan_icon_daoru" />-->
<!-- 批量导入--> <!-- 批量导入-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button <el-button
v-hasPermi="['business:device:export']" v-hasPermi="['business:device:export']"
class="fourWordswhiteBtn" class="fourWordswhiteBtn"
...@@ -130,9 +130,16 @@ ...@@ -130,9 +130,16 @@
</el-col> </el-col>
</el-row> </el-row>
<el-table ref="table" v-loading="loading" :data="deviceList" :header-cell-style="{ background:'#F4F4F4'}" :row-key="getRowKeys" @selection-change="handleSelectionChange"> <el-table
<el-table-column type="selection" width="47" align="center" :reserve-selection="true" /> ref="table"
<el-table-column align="left" label="序号" min-width="60" show-overflow-tooltip prop="index" > v-loading="loading"
:data="deviceList"
:header-cell-style="{ background:'#F4F4F4'}"
@select="selectChange"
@select-all="selectChange"
>
<el-table-column type="selection" width="47" align="center" />
<el-table-column align="left" label="序号" min-width="60" show-overflow-tooltip prop="index">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</template> </template>
...@@ -511,7 +518,7 @@ export default { ...@@ -511,7 +518,7 @@ export default {
this.serviceShow = false this.serviceShow = false
this.itemType = 3 this.itemType = 3
} }
this.getItemByType() // this.getItemByType()
}) })
}, },
// 显示两位数字 // 显示两位数字
...@@ -564,6 +571,8 @@ export default { ...@@ -564,6 +571,8 @@ export default {
this.deviceList = response.rows this.deviceList = response.rows
console.log('this.deviceList', this.deviceList) console.log('this.deviceList', this.deviceList)
this.idsForever = response.idList this.idsForever = response.idList
console.log('idlist', this.idsForever)
this.total = response.total this.total = response.total
this.loading = false this.loading = false
this.manualCheck() this.manualCheck()
...@@ -651,7 +660,7 @@ export default { ...@@ -651,7 +660,7 @@ export default {
// 在下一个dom触发 // 在下一个dom触发
this.$nextTick().then(() => { this.$nextTick().then(() => {
// 当前页结合数据的id只要在临时集合里,就使得复选框勾选 // 当前页结合数据的id只要在临时集合里,就使得复选框勾选
this.drugList.forEach(item => { this.deviceList.forEach(item => {
if (this.ids.includes(item.id)) { if (this.ids.includes(item.id)) {
this.$refs.table.toggleRowSelection(item, true) this.$refs.table.toggleRowSelection(item, true)
} else { } else {
...@@ -677,7 +686,7 @@ export default { ...@@ -677,7 +686,7 @@ export default {
selectChange(selection, row) { selectChange(selection, row) {
// 选中行是没有则将当前list里面的数据从ids里情况 // 选中行是没有则将当前list里面的数据从ids里情况
if (selection.length === 0) { if (selection.length === 0) {
const temp = this.drugList.map(item => { const temp = this.deviceList.map(item => {
return item.id return item.id
}) })
this.ids = this.ids.filter(item => { this.ids = this.ids.filter(item => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment