Commit a09f2ae0 by 李长胜

修改表格

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