Commit ce61be0a authored by WBY1026's avatar WBY1026

完善对空表的处理

parent 554b8492
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<div class="list"> <div class="list" v-show="haveInfo">
<el-table :data="mytableList" v-loading="loading" @cell-click="cellClick"> <el-table :data="mytableList" v-loading="loading" @cell-click="cellClick">
<el-table-column fixed label="用户" prop="ccc" width="100px"></el-table-column> <el-table-column fixed label="用户" prop="ccc" width="100px"></el-table-column>
<!-- 月 --> <!-- 月 -->
...@@ -109,8 +109,6 @@ ...@@ -109,8 +109,6 @@
<img src='./404.png' alt='暂无数据,稍后重试' /> <img src='./404.png' alt='暂无数据,稍后重试' />
</template> </template>
</el-table> </el-table>
</div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
...@@ -118,6 +116,17 @@ ...@@ -118,6 +116,17 @@
:total="totalPage"> :total="totalPage">
</el-pagination> </el-pagination>
</div>
<div v-show="!haveInfo" style=" width: 100%;height: 300px; display: flex;" >
<img style="margin: auto;" src='./404.png' alt='暂无数据,稍后重试' />
</div>
<!-- <button @click="test">2222</button> --> <!-- <button @click="test">2222</button> -->
<!-- 点击表单内容出现的表格 --> <!-- 点击表单内容出现的表格 -->
...@@ -230,6 +239,8 @@ export default { ...@@ -230,6 +239,8 @@ export default {
inputddd: '', inputddd: '',
inputdddd: '', inputdddd: '',
haveInfo: true,
// 弹窗控制 // 弹窗控制
dialogTableVisible: false, dialogTableVisible: false,
gridData: [], gridData: [],
...@@ -353,6 +364,8 @@ export default { ...@@ -353,6 +364,8 @@ export default {
this.totalPage = res.data this.totalPage = res.data
}) })
searchTableList(data).then(res => { searchTableList(data).then(res => {
if (res.data.length != 0) {
this.haveInfo = true
console.log(res); console.log(res);
this.mytableList = res.data this.mytableList = res.data
// 判断返回的数据,然后调用渲染方法 // 判断返回的数据,然后调用渲染方法
...@@ -364,6 +377,10 @@ export default { ...@@ -364,6 +377,10 @@ export default {
this.getDateType3() this.getDateType3()
} }
this.loading = false this.loading = false
} else {
this.haveInfo = false
}
}); });
}, },
...@@ -677,8 +694,7 @@ export default { ...@@ -677,8 +694,7 @@ export default {
this.clickKey = key this.clickKey = key
console.log('高亮赋值' + this.clickKey); console.log('高亮赋值' + this.clickKey);
if (value) {
this.dialogTempData = { this.dialogTempData = {
aaa: this.lockaaa, aaa: this.lockaaa,
bbb: this.lockbbb, bbb: this.lockbbb,
...@@ -718,6 +734,10 @@ export default { ...@@ -718,6 +734,10 @@ export default {
this.dialogTableVisible = true this.dialogTableVisible = true
}) })
}
}, },
// 高亮某一列 // 高亮某一列
......
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