feat:更新列表
This commit is contained in:
@ -1,33 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="titleBox">
|
<div class="titleBox">
|
||||||
<PageTitle title="积分列表">
|
<PageTitle title="在线用户监控">
|
||||||
<!-- <el-button type="primary" @click="addEdit('add', '')">
|
|
||||||
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
|
|
||||||
<span style="vertical-align: middle">新增</span>
|
|
||||||
</el-button> -->
|
|
||||||
</PageTitle>
|
</PageTitle>
|
||||||
</div>
|
</div>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<div ref="searchBox">
|
<!-- <div ref="searchBox">
|
||||||
<!-- <Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search> -->
|
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
|
||||||
</div>
|
</div> -->
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="tabBox">
|
<div class="tabBox">
|
||||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
||||||
|
<template #sex="{ row }">
|
||||||
|
<dict-tag :options="D_BZ_XB" :value="row.sex" :tag="false" />
|
||||||
|
</template>
|
||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
<template #controls="{ row }">
|
<template #controls="{ row }">
|
||||||
<el-link type="primary" @click="addEdit('edit', row)">详情</el-link>
|
<el-link type="primary" @click="addEdit('edit', row)">详情</el-link>
|
||||||
</template>
|
</template>
|
||||||
</MyTable>
|
</MyTable>
|
||||||
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
<!-- <Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
||||||
...pageData.pageConfiger,
|
...pageData.pageConfiger,
|
||||||
total: pageData.total
|
total: pageData.total
|
||||||
}"></Pages>
|
}"></Pages> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- 编辑详情 -->
|
<!-- 编辑详情 -->
|
||||||
<!-- <EditAddForm v-if="show" ref="detailDiloag" :dic="{ JQLB,JQLX,JQXL,JQZL,D_BZ_JQLY,D_BZ_JQFL,JQLB_DP,D_BZ_JQBQ,D_GS_SSYJ }"
|
<!-- <EditAddForm v-if="show" ref="detailDiloag" :dic="{ JQLB,JQLX,JQXL,JQZL,D_BZ_JQLY,D_BZ_JQFL,JQLB_DP,D_BZ_JQBQ,D_GS_SSYJ }"
|
||||||
@ -46,30 +42,28 @@ import { socketCurrentUser } from "@/api/dataWatch/onlineUser.js"
|
|||||||
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
||||||
// import { jflylxTypes } from "./dict.js"
|
// import { jflylxTypes } from "./dict.js"
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
// const { D_GS_JFLX, } = proxy.$dict("D_GS_JFLX",); //获取字典数据
|
const { D_BZ_XB, } = proxy.$dict("D_BZ_XB",); //获取字典数据
|
||||||
|
|
||||||
const detailDiloag = ref();
|
const detailDiloag = ref();
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
const jflxArr = [{ label: '优秀信息员', value: '01' }, { label: '优秀研判员', value: '02' }] // jflx
|
const userTypeArr = [
|
||||||
|
{ label: '系统用户', value: '00' },
|
||||||
|
{ label: '注册用户', value: '01' }
|
||||||
|
]
|
||||||
const searchConfiger = ref([
|
const searchConfiger = ref([
|
||||||
{
|
{
|
||||||
label: "姓名",
|
label: "用户昵称",
|
||||||
prop: "xm",
|
prop: "userName",
|
||||||
placeholder: "请输入姓名",
|
placeholder: "请输入用户昵称",
|
||||||
showType: "input"
|
showType: "input"
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// label: "身份证号",
|
|
||||||
// prop: "sfzh",
|
|
||||||
// placeholder: "请输入身份证号",
|
|
||||||
// showType: "input"
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
label: "积分类型",
|
label: "用户类型",
|
||||||
prop: "jflx",
|
prop: "userType",
|
||||||
placeholder: "请选择积分类型",
|
placeholder: "请选择用户类型",
|
||||||
showType: "select",
|
showType: "select",
|
||||||
options: jflxArr
|
options: userTypeArr
|
||||||
},
|
},
|
||||||
|
|
||||||
]);
|
]);
|
||||||
@ -90,15 +84,15 @@ const pageData = reactive({
|
|||||||
}, //分页
|
}, //分页
|
||||||
controlsWidth: 160, //操作栏宽度
|
controlsWidth: 160, //操作栏宽度
|
||||||
tableColumn: [
|
tableColumn: [
|
||||||
{ label: "姓名", prop: "xm" },
|
{ label: "用户昵称", prop: "userName" },
|
||||||
// { label: "身份证号", prop: "sfzh" },
|
{ label: "登录账号", prop: "loginName" },
|
||||||
{ label: "积分类型", prop: "jflx", showSolt: true },
|
{ label: "用户类型", prop: "userType_cname" },
|
||||||
{ label: "积分来源类型", prop: "jflylx", showSolt: true },
|
{ label: "性别", prop: "sex", showSolt: true },
|
||||||
{ label: "积分", prop: "jf" },
|
{ label: "移动电话", prop: "mobile" },
|
||||||
{ label: "积分获得时间", prop: "hdsj" },
|
{ label: "邮箱", prop: "email" },
|
||||||
{ label: "所属部门", prop: "ssbm" },
|
{ label: "管理部门", prop: "managerOrgName" },
|
||||||
{ label: "所属市公安局", prop: "sssgaj" },
|
{ label: "岗位名称", prop: "positionName" },
|
||||||
{ label: "所属县公安局", prop: "ssxgaj" },
|
{ label: "行业号码", prop: "inDustRialId" },
|
||||||
{ label: "备注", prop: "bz", showOverflowTooltip: true },
|
{ label: "备注", prop: "bz", showOverflowTooltip: true },
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@ -123,18 +117,26 @@ const changeSize = (val) => {
|
|||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getUserTypeName = (val) => {
|
||||||
|
const userTypeObj = userTypeArr.find(item => item.value === val)
|
||||||
|
return userTypeObj ? userTypeObj.label : ''
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
pageData.tableConfiger.loading = true;
|
pageData.tableConfiger.loading = true;
|
||||||
const params = {
|
const params = {
|
||||||
pageCurrent: pageData.pageConfiger.pageCurrent,
|
|
||||||
pageSize: pageData.pageConfiger.pageSize,
|
|
||||||
...listQuery.value
|
...listQuery.value
|
||||||
}
|
}
|
||||||
|
|
||||||
socketCurrentUser(params).then(res => {
|
socketCurrentUser(params).then(res => {
|
||||||
console.log(res);
|
// socketCurrentUser 返回的是数组格式,不是分页对象
|
||||||
pageData.tableData = res.records || [];
|
pageData.tableData = Array.isArray(res) ? res : [];
|
||||||
pageData.total = res.total;
|
pageData.tableData = pageData.tableData.map(item => {
|
||||||
|
item.userType_cname = getUserTypeName(item.userType);
|
||||||
|
return item;
|
||||||
|
})
|
||||||
|
pageData.total = Array.isArray(res) ? res.length : 0;
|
||||||
|
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
pageData.tableConfiger.loading = false;
|
pageData.tableConfiger.loading = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user