Commit a09f2ae0 by 李长胜

修改表格

1 parent a274d219
......@@ -61,10 +61,15 @@
<!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> -->
<span class="statusText" :class="{ 'red-text': scope.scope.status === -1, 'green-text': scope.scope.status == 0 }">{{ statusText(scope.scope.status) }}</span>
</span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> -->
<!-- <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<auth-button :data="scope.scope"></auth-button>
<span @click="goDetail(scope.scope.oneId)" class="blue-text">详情</span>
</template>
</template> -->
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<!-- <span @click="goDetail(scope.scope.oneId)" class="blue-text">详情</span> -->
<el-button type="text" @click="goDetail(scope.scope.oneId)">详情</el-button>
</div>
</GLTable>
</div>
</div>
......@@ -75,7 +80,7 @@
import { getTableList, getDictionaryFun, syncCustomer } from '@/api/modules/clientManage'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'clientManage',
// name: 'clientManage',
// inject: ['reload'],
data() {
return {
......@@ -178,6 +183,7 @@ export default {
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data',
// tableOption: true,
tableOption:false,
tableColumns: [
{
label: '客户ID',
......@@ -230,17 +236,18 @@ export default {
label: '添加时间',
prop: 'addTime',
width: 188
},
{
label:'操作',
prop:'optionBtns',
width:'80px',
addHtml:'optionBtns',
fixed:'right'
}
],
tableOption: {
width: 80
// btnList: [
// {
// name: '详情',
// // pType: 'detail'
// }
// ]
}
// tableOption: {
// width: 80
// }
},
getListApi: getTableList,
sourceList: [],
......@@ -260,15 +267,6 @@ export default {
}
this.getDictionaryFun()
},
mounted() {
//没数据的时候要算高度
// setTimeout(() => {
// if (!this.$refs.clientManage.data.length) {
// this.$refs.clientManage.setTableHeightFun()
// }
// }, 400)
},
methods: {
followList(str) {
if (!str) {
......@@ -288,9 +286,10 @@ export default {
this.searchTable()
}
//接收到的数据为空
if (!this.$refs.clientManage.data.length) {
this.$refs.clientManage.setTableHeightFun()
}
// if (!this.$refs.clientManage.data.length) {
// this.$refs.clientManage.setTableHeightFun()
// }
this.$refs.clientManage.data.length ? (this.$refs.clientManage.tableHeightValues = '') : this.$refs.clientManage.setTableHeightFun()
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
......@@ -325,14 +324,6 @@ export default {
window.localStorage.setItem('sourceList', JSON.stringify(data))
}
this.$set(this.clientManageFormList[3], 'options', data)
// if (res.code == 0) {
// console.log('shuju', res)
// } else {
// this.$meesage({
// type: 'error',
// message: res.data.message
// })
// }
})
},
//来源 value值转为对应label
......@@ -368,12 +359,12 @@ export default {
},
//重置表格
resetTable() {
this.isReload = false
// this.isReload = false
// this.$nextTick(() => {
// this.isReload = true
// })
this.searchForm = {}
this.$nextTick(() => {
this.isReload = true
})
// this.$refs.clientManage.refreshTable()
this.$refs.clientManage.refreshTable()
// 点击之后强制页面刷新
// this.reload()
// this.$forceUpdate() // 没用
......@@ -434,6 +425,9 @@ export default {
// }
// .glsx-table {
// margin-top: 20px;
// /deep/ .el-table__fixed {
// height: 100% !important; //设置高优先,以覆盖内联样式
// }
// }
.entmicro {
......
......@@ -289,9 +289,10 @@ export default {
}
},
setTableFinishFun() {
if (!this.$refs.gueastGroup.data.length) {
this.$refs.gueastGroup.setTableHeightFun()
}
// if (!this.$refs.gueastGroup.data.length) {
// this.$refs.gueastGroup.setTableHeightFun()
// }
this.$refs.gueastGroup.data.length ? (this.$refs.gueastGroup.tableHeightValues = '') : this.$refs.gueastGroup.setTableHeightFun()
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!