添加列表查询及详情
This commit is contained in:
parent
b3544e58ab
commit
ddff38973d
|
@ -16,6 +16,9 @@ enum Api {
|
||||||
queryXqHyTdcsList = '/zh/blHousingestateInfo/queryXqHyTdcsList',
|
queryXqHyTdcsList = '/zh/blHousingestateInfo/queryXqHyTdcsList',
|
||||||
queryXqHyTdzlList = '/zh/blHousingestateInfo/queryXqHyTdzlList',
|
queryXqHyTdzlList = '/zh/blHousingestateInfo/queryXqHyTdzlList',
|
||||||
housingestateList = '/zh/hy/queryHousingestateList',
|
housingestateList = '/zh/hy/queryHousingestateList',
|
||||||
|
|
||||||
|
queryXzhyDetailList = '/zh/blHousingestateInfo/queryXzhyDetailList',
|
||||||
|
queryTdcsDetailList = '/zh/blHousingestateInfo/queryTdcsDetailList',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +26,8 @@ enum Api {
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const housingestateList = (params) => defHttp.get({ url: Api.housingestateList, params });
|
export const housingestateList = (params) => defHttp.get({ url: Api.housingestateList, params });
|
||||||
export const queryXqHyTdcsPageList = (params) => defHttp.get({ url: Api.queryXqHyTdcsPageList, params });
|
export const queryXzhyDetailList = (params) => defHttp.get({ url: Api.queryXzhyDetailList, params });
|
||||||
|
export const queryTdcsDetailList = (params) => defHttp.get({ url: Api.queryTdcsDetailList, params });
|
||||||
/**
|
/**
|
||||||
* 导出api
|
* 导出api
|
||||||
* @param params
|
* @param params
|
||||||
|
|
|
@ -114,3 +114,128 @@ export const tdzlColumns : BasicColumn[] =[
|
||||||
width: '150px',
|
width: '150px',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export const detailXzhyColumns : BasicColumn[] =[
|
||||||
|
{
|
||||||
|
title: '小区名称',
|
||||||
|
dataIndex: 'housingestateName',
|
||||||
|
key: 'housingestateName',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '设备地点',
|
||||||
|
dataIndex: 'content',
|
||||||
|
key: 'content',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '电话',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
key: 'phone',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '注册时间',
|
||||||
|
dataIndex: 'registerDate',
|
||||||
|
key: 'registerDate',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '投递次数',
|
||||||
|
dataIndex: 'deliveries',
|
||||||
|
key: 'deliveries',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '违规次数',
|
||||||
|
dataIndex: 'violations',
|
||||||
|
key: 'violations',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '注册时间',
|
||||||
|
dataIndex: 'deliveredAt',
|
||||||
|
key: 'deliveredAt',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '用户状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
key: 'status',
|
||||||
|
align: 'center',
|
||||||
|
customRender: function ({ text }) {
|
||||||
|
//0:拉黑 1:正常
|
||||||
|
if (text == '0') {
|
||||||
|
return '拉黑';
|
||||||
|
} else {
|
||||||
|
return '正常';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
export const detailTdcsColumns : BasicColumn[] =[
|
||||||
|
{
|
||||||
|
title: '小区名称',
|
||||||
|
dataIndex: 'housingestateName',
|
||||||
|
key: 'housingestateName',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '设备地点',
|
||||||
|
dataIndex: 'content',
|
||||||
|
key: 'content',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '电话',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
key: 'phone',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '投递时间',
|
||||||
|
dataIndex: 'addTime',
|
||||||
|
key: 'addTime',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '投递重量',
|
||||||
|
dataIndex: 'weight',
|
||||||
|
key: 'weight',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '投递状态',
|
||||||
|
dataIndex: 'invalid',
|
||||||
|
key: 'invalid',
|
||||||
|
align: 'center',
|
||||||
|
customRender: function ({ text }) {
|
||||||
|
//0正常 1违规 2部分违规 3待审核 4异常 5忽略
|
||||||
|
if(text == '0'){
|
||||||
|
return "正常"
|
||||||
|
}else if(text == '1'){
|
||||||
|
return "违规"
|
||||||
|
}else if(text == '2'){
|
||||||
|
return "部分违规"
|
||||||
|
}else if(text == '3'){
|
||||||
|
return "待审核"
|
||||||
|
}else if(text == '4'){
|
||||||
|
return "异常"
|
||||||
|
}else if(text == '5'){
|
||||||
|
return "忽略"
|
||||||
|
}else{
|
||||||
|
return "未知"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '原因',
|
||||||
|
dataIndex: 'cause',
|
||||||
|
key: 'cause',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
]
|
|
@ -40,20 +40,27 @@
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
<!-- 查看详情弹窗 -->
|
||||||
|
<a-modal v-model:visible="detailVisible" title="新增会员详情" width="80%" :footer="null">
|
||||||
|
<a-table :dataSource="detailData" :columns="detailXzhyColumns" rowKey="phone">
|
||||||
|
</a-table>
|
||||||
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {ref, unref, reactive, onMounted} from 'vue';
|
import {ref, unref, reactive, onMounted} from 'vue';
|
||||||
import Bar from '/@/components/chart/Bar.vue';
|
import Bar from '/@/components/chart/Bar.vue';
|
||||||
import { queryXqHyXzList,housingestateList } from './HousingestateInfo.api';
|
import { queryXqHyXzList,housingestateList,queryXzhyDetailList } from './HousingestateInfo.api';
|
||||||
import type { Dayjs } from 'dayjs';
|
import type { Dayjs } from 'dayjs';
|
||||||
import { xzrsColumns } from './HousingestateInfo.data';
|
import { xzrsColumns, detailXzhyColumns } from './HousingestateInfo.data';
|
||||||
const valueFormat = 'YYYY-MM-DD';
|
const valueFormat = 'YYYY-MM-DD';
|
||||||
const dataSource = ref([]);
|
const dataSource = ref([]);
|
||||||
const dateValue = ref();
|
const dateValue = ref();
|
||||||
const housingestates = ref();
|
const housingestates = ref();
|
||||||
const izList = ref(false)
|
const izList = ref(false)
|
||||||
|
const detailVisible = ref(false);
|
||||||
|
const detailData = ref([]);
|
||||||
|
|
||||||
const parmas = reactive<any>({
|
const parmas = reactive<any>({
|
||||||
beginTime: '',
|
beginTime: '',
|
||||||
|
@ -94,6 +101,20 @@ const izList = ref(false)
|
||||||
loadDate();
|
loadDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查看详情
|
||||||
|
const handleView = async (record) => {
|
||||||
|
console.log("🚀 ~ handleView ~ record:", record)
|
||||||
|
try {
|
||||||
|
const res = await queryXzhyDetailList({ housingestateId: record.housingestateId,beginTime:parmas.beginTime,endTime:parmas.endTime,pageSize: -1 });
|
||||||
|
detailData.value = res.records;
|
||||||
|
console.log("🚀 ~ handleView ~ res:", res)
|
||||||
|
detailVisible.value = true;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取详情失败:', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
async function loadDate() {
|
async function loadDate() {
|
||||||
if(izList.value){
|
if(izList.value){
|
||||||
parmas.pageSize=-1
|
parmas.pageSize=-1
|
||||||
|
@ -107,6 +128,7 @@ const izList = ref(false)
|
||||||
dataSource.value.push({
|
dataSource.value.push({
|
||||||
name: `${res[i].housingestateName}`,
|
name: `${res[i].housingestateName}`,
|
||||||
value: res[i].cn,
|
value: res[i].cn,
|
||||||
|
housingestateId: res[i].housingestateId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,20 +40,27 @@
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
<!-- 查看详情弹窗 -->
|
||||||
|
<a-modal v-model:visible="detailVisible" title="投递次数详情" width="80%" :footer="null">
|
||||||
|
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="phone">
|
||||||
|
</a-table>
|
||||||
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {ref, unref, reactive, onMounted} from 'vue';
|
import {ref, unref, reactive, onMounted} from 'vue';
|
||||||
import Bar from '/@/components/chart/Bar.vue';
|
import Bar from '/@/components/chart/Bar.vue';
|
||||||
import { queryXqHyTdcsList,housingestateList } from './HousingestateInfo.api';
|
import { queryXqHyTdcsList,housingestateList,queryTdcsDetailList } from './HousingestateInfo.api';
|
||||||
import { tdcsColumns } from './HousingestateInfo.data';
|
import { tdcsColumns,detailTdcsColumns } from './HousingestateInfo.data';
|
||||||
import type { Dayjs } from 'dayjs';
|
import type { Dayjs } from 'dayjs';
|
||||||
const valueFormat = 'YYYY-MM-DD';
|
const valueFormat = 'YYYY-MM-DD';
|
||||||
const dataSource = ref([]);
|
const dataSource = ref([]);
|
||||||
const dateValue = ref();
|
const dateValue = ref();
|
||||||
const housingestates = ref();
|
const housingestates = ref();
|
||||||
const izList = ref(false)
|
const izList = ref(false)
|
||||||
|
const detailVisible = ref(false);
|
||||||
|
const detailData = ref([]);
|
||||||
|
|
||||||
async function getHousingestates(){
|
async function getHousingestates(){
|
||||||
housingestates.value = await housingestateList(null);
|
housingestates.value = await housingestateList(null);
|
||||||
|
@ -65,6 +72,18 @@ const izList = ref(false)
|
||||||
type: '1',
|
type: '1',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 查看详情
|
||||||
|
const handleView = async (record) => {
|
||||||
|
console.log("🚀 ~ handleView ~ record:", record)
|
||||||
|
try {
|
||||||
|
const res = await queryTdcsDetailList({ housingestateId: record.housingestateId,beginTime:parmas.beginTime,endTime:parmas.endTime,pageSize: -1 });
|
||||||
|
detailData.value = res.records;
|
||||||
|
console.log("🚀 ~ handleView ~ res:", res)
|
||||||
|
detailVisible.value = true;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取详情失败:', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
function changeType (){
|
function changeType (){
|
||||||
parmas.endTime=getPreviousDate(0)+' 23:59:59';
|
parmas.endTime=getPreviousDate(0)+' 23:59:59';
|
||||||
if (parmas.type === '1') {
|
if (parmas.type === '1') {
|
||||||
|
@ -108,7 +127,8 @@ const izList = ref(false)
|
||||||
for (let i = 0; i < res.length; i++) {
|
for (let i = 0; i < res.length; i++) {
|
||||||
dataSource.value.push({
|
dataSource.value.push({
|
||||||
name: res[i].housingestateName,
|
name: res[i].housingestateName,
|
||||||
value: res[i].cn
|
value: res[i].cn,
|
||||||
|
housingestateId: res[i].housingestateId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,20 +40,27 @@
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
<!-- 查看详情弹窗 -->
|
||||||
|
<a-modal v-model:visible="detailVisible" title="投递次数详情" width="80%" :footer="null">
|
||||||
|
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="phone">
|
||||||
|
</a-table>
|
||||||
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {ref, unref, reactive, onMounted} from 'vue';
|
import {ref, unref, reactive, onMounted} from 'vue';
|
||||||
import Bar from '/@/components/chart/Bar.vue';
|
import Bar from '/@/components/chart/Bar.vue';
|
||||||
import { queryXqHyTdzlList,housingestateList } from './HousingestateInfo.api';
|
import { queryXqHyTdzlList,housingestateList,queryTdcsDetailList } from './HousingestateInfo.api';
|
||||||
import type { Dayjs } from 'dayjs';
|
import type { Dayjs } from 'dayjs';
|
||||||
import { xzrsColumns } from './HousingestateInfo.data';
|
import { xzrsColumns , detailTdcsColumns } from './HousingestateInfo.data';
|
||||||
const valueFormat = 'YYYY-MM-DD';
|
const valueFormat = 'YYYY-MM-DD';
|
||||||
const dataSource = ref([]);
|
const dataSource = ref([]);
|
||||||
const dateValue = ref();
|
const dateValue = ref();
|
||||||
const housingestates = ref();
|
const housingestates = ref();
|
||||||
const izList = ref(false)
|
const izList = ref(false)
|
||||||
|
const detailVisible = ref(false);
|
||||||
|
const detailData = ref([]);
|
||||||
|
|
||||||
async function getHousingestates(){
|
async function getHousingestates(){
|
||||||
housingestates.value = await housingestateList(null);
|
housingestates.value = await housingestateList(null);
|
||||||
|
@ -65,6 +72,18 @@ const izList = ref(false)
|
||||||
type: '0',
|
type: '0',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 查看详情
|
||||||
|
const handleView = async (record) => {
|
||||||
|
console.log("🚀 ~ handleView ~ record:", record)
|
||||||
|
try {
|
||||||
|
const res = await queryTdcsDetailList({ housingestateId: record.housingestateId,beginTime:parmas.beginTime,endTime:parmas.endTime,pageSize: -1 });
|
||||||
|
detailData.value = res.records;
|
||||||
|
console.log("🚀 ~ handleView ~ res:", res)
|
||||||
|
detailVisible.value = true;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取详情失败:', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
function changeType (){
|
function changeType (){
|
||||||
parmas.endTime=getPreviousDate(0)+' 23:59:59';
|
parmas.endTime=getPreviousDate(0)+' 23:59:59';
|
||||||
if (parmas.type === '0') {
|
if (parmas.type === '0') {
|
||||||
|
@ -108,6 +127,7 @@ const izList = ref(false)
|
||||||
dataSource.value.push({
|
dataSource.value.push({
|
||||||
name: `${res[i].housingestateName}`,
|
name: `${res[i].housingestateName}`,
|
||||||
value: res[i].weight,
|
value: res[i].weight,
|
||||||
|
housingestateId: res[i].housingestateId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue