|
@@ -2,6 +2,8 @@
|
|
import { ref, reactive } from 'vue'
|
|
import { ref, reactive } from 'vue'
|
|
import { Search } from '@element-plus/icons-vue'
|
|
import { Search } from '@element-plus/icons-vue'
|
|
import {apiCustomerUser} from '@/api/customer'
|
|
import {apiCustomerUser} from '@/api/customer'
|
|
|
|
+import { apiMediaCommon } from '@/api/media'
|
|
|
|
+import ReadDialog from './components/ReadDialog.vue'
|
|
|
|
|
|
const tableColumns = [
|
|
const tableColumns = [
|
|
{
|
|
{
|
|
@@ -12,6 +14,10 @@ const tableColumns = [
|
|
label:'最近一次阅读时间',
|
|
label:'最近一次阅读时间',
|
|
key:'LastReadTime',
|
|
key:'LastReadTime',
|
|
sortable:true
|
|
sortable:true
|
|
|
|
+ },{
|
|
|
|
+ label:'开户状态',
|
|
|
|
+ key:'AccountStatus',
|
|
|
|
+ sortable:false,
|
|
},{
|
|
},{
|
|
label:'累计阅读次数',
|
|
label:'累计阅读次数',
|
|
key:'ReadCount',
|
|
key:'ReadCount',
|
|
@@ -31,7 +37,9 @@ const tableQuery = reactive({
|
|
sortParam:'',
|
|
sortParam:'',
|
|
sortType:''
|
|
sortType:''
|
|
})
|
|
})
|
|
|
|
+
|
|
const tableData = ref([])
|
|
const tableData = ref([])
|
|
|
|
+const show = ref(false)
|
|
function getTableData(){
|
|
function getTableData(){
|
|
apiCustomerUser.getTempCustomList({
|
|
apiCustomerUser.getTempCustomList({
|
|
Keyword:tableQuery.keyWord,
|
|
Keyword:tableQuery.keyWord,
|
|
@@ -47,6 +55,16 @@ function getTableData(){
|
|
})
|
|
})
|
|
}
|
|
}
|
|
getTableData()
|
|
getTableData()
|
|
|
|
+getLableList()
|
|
|
|
+const labelOptions = ref([])
|
|
|
|
+const userId = ref('')
|
|
|
|
+function getLableList(){
|
|
|
|
+ apiMediaCommon.getPermissionList().then(res=>{
|
|
|
|
+ if(res.Ret!==200) return
|
|
|
|
+ labelOptions.value = res.Data.List||[]
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
function handlePageChange(page){
|
|
function handlePageChange(page){
|
|
tableQuery.currentPage = page
|
|
tableQuery.currentPage = page
|
|
getTableData()
|
|
getTableData()
|
|
@@ -62,55 +80,75 @@ function handleSortChange({order,prop}){
|
|
tableQuery.sortType = order==='ascending'?1:0
|
|
tableQuery.sortType = order==='ascending'?1:0
|
|
getTableData()
|
|
getTableData()
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 查看用户详情
|
|
|
|
+function Details(row) {
|
|
|
|
+ if (row.ReadCount <= 0) return;
|
|
|
|
+ show.value = true;
|
|
|
|
+ userId.value = row.Id + '';
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
- <div class="temp-user-list-wrap">
|
|
|
|
- <div class="search-box">
|
|
|
|
- <el-input
|
|
|
|
- v-model="tableQuery.keyWord"
|
|
|
|
- :prefix-icon="Search" clearable
|
|
|
|
- style="width:400px"
|
|
|
|
- placeholder="请输入手机号"
|
|
|
|
- @input="handlePageChange(1)"
|
|
|
|
|
|
+ <el-card class="box-card">
|
|
|
|
+ <div class="temp-user-list-wrap">
|
|
|
|
+ <div class="search-box">
|
|
|
|
+ <el-button type="primary" style="margin-right: 20px;">导出表格</el-button>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="tableQuery.keyWord"
|
|
|
|
+ :prefix-icon="Search" clearable
|
|
|
|
+ style="width:400px"
|
|
|
|
+ placeholder="请输入手机号"
|
|
|
|
+ @input="handlePageChange(1)"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="table-box">
|
|
|
|
+ <el-table stripe border :data="tableData" @sort-change="handleSortChange">
|
|
|
|
+ <el-table-column
|
|
|
|
+ v-for="column in tableColumns" :key="column.key"
|
|
|
|
+ :prop="column.key" :label="column.label" :sortable="column.sortable">
|
|
|
|
+ <template #default="scope" v-if="column.key === 'AccountStatus'">
|
|
|
|
+ <el-tag :type="scope.row[column.key]=== 'Open' ?'success':'info'">{{scope.row[column.key]=== 'Open'?'已开户':'未开户' }}</el-tag>
|
|
|
|
+ </template>
|
|
|
|
+ <template #default="scope" v-else-if="column.key === 'ReadCount'">
|
|
|
|
+ <span class="ReadCount" @click="Details(scope.row)">
|
|
|
|
+ {{ scope.row[column.key] }}
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ <template #default="scope" v-else>
|
|
|
|
+ {{scope.row[column.key]}}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <el-pagination
|
|
|
|
+ background
|
|
|
|
+ layout="total,prev,pager,next,jumper"
|
|
|
|
+ :current-page="tableQuery.currentPage"
|
|
|
|
+ :page-size="tableQuery.pageSize"
|
|
|
|
+ :total="tableQuery.totals"
|
|
|
|
+ @current-change="handlePageChange"
|
|
|
|
+ style=" justify-content: flex-end; margin-top: 50px;"
|
|
/>
|
|
/>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div class="table-box">
|
|
|
|
- <el-table stripe border :data="tableData" @sort-change="handleSortChange">
|
|
|
|
- <el-table-column
|
|
|
|
- v-for="column in tableColumns" :key="column.key"
|
|
|
|
- :prop="column.key" :label="column.label" :sortable="column.sortable"/>
|
|
|
|
- </el-table>
|
|
|
|
- <el-pagination
|
|
|
|
- background
|
|
|
|
- layout="total,prev,pager,next,jumper"
|
|
|
|
- :current-page="tableQuery.currentPage"
|
|
|
|
- :page-size="tableQuery.pageSize"
|
|
|
|
- :total="tableQuery.totals"
|
|
|
|
- @current-change="handlePageChange"
|
|
|
|
- style=" justify-content: flex-end;border:1px solid #ebeef5;border-top: none;"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <ReadDialog :show="show" :labelOptions="labelOptions" :userId="userId"></ReadDialog>
|
|
|
|
+ </el-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.temp-user-list-wrap{
|
|
.temp-user-list-wrap{
|
|
- height: calc(100vh - 108px); //layout padding 30*2 headHeight 48
|
|
|
|
|
|
+ height: calc(100vh - 208px); //layout padding 30*2 headHeight 48
|
|
/* display: flex;
|
|
/* display: flex;
|
|
flex-direction: column; */
|
|
flex-direction: column; */
|
|
.search-box{
|
|
.search-box{
|
|
text-align: right;
|
|
text-align: right;
|
|
- margin-bottom: 20px;
|
|
|
|
|
|
+ margin: 20px 0 40px 0;
|
|
|
|
+ }
|
|
|
|
+ .table-box{
|
|
|
|
+ .ReadCount {
|
|
|
|
+ color: rgba(8, 108, 224, 1);
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- /* .table-box{
|
|
|
|
- flex: 1;
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- .el-table{
|
|
|
|
- flex:1;
|
|
|
|
- overflow-y: auto;
|
|
|
|
- }
|
|
|
|
- } */
|
|
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|