xjl
徐景良 2 years ago
parent 47f1827500
commit b656067110

@ -9,7 +9,6 @@
<TableAction
:actions="[
{
// icon: 'ant-design:ellipsis-outlined',
label: '详情',
onClick: viewDetail.bind(null, record),
},
@ -18,7 +17,6 @@
</template>
</template>
</BasicTable>
<BasicModal
v-bind="$attrs"
@register="registerModal"
@ -29,156 +27,69 @@
:showOkBtn="false"
:draggable="false"
>
<!-- <CaseView :caseId="caseId"></CaseView> -->
<CaseView :caseId="caseId"></CaseView>
</BasicModal>
</div>
</template>
<script lang="ts" setup>
import { reactive,ref } from 'vue';
import { CaseView } from '@/views/demo/monitor/index';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { getRoleListByPage,getReportList, deleteRole } from '@/api/demo/system';
import { reactive, ref } from 'vue';
import { BasicTable, useTable, TableAction, BasicColumn } from '@/components/Table';
import { getCaseInfoList } from '@/api/monitor/index';
import { useMessage } from '@/hooks/web/useMessage';
import { useModal } from '@/components/Modal';
import { PermissionBtn } from '@/components/PermissionBtn/index';
import { columns, searchFormSchema } from './report.data';
defineOptions({ name: 'RoleManagement' });
import { searchFormSchema, columns } from './report.data';
import { BasicModal, useModal } from '@/components/Modal';
import { CaseView } from '@/views/demo/monitor/index';
const { createConfirm, createMessage } = useMessage();
const searchInfo = reactive<Recordable>({});
const [registerTable, { reload, getSelectRows, clearSelectedRowKeys }] = useTable({
//
title: '报告打印',
//
api: getReportList,
// BasicColumn[]
title: '案件列表',
api: getCaseInfoList,
columns,
rowKey: 'id',
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
// 使
useSearchForm: true,
//
showTableSetting: true,
//
bordered: true,
//
showIndexColumn: false,
//
rowSelection: {
//
// type: 'checkbox',
type: 'radio',
type: 'checkbox',
},
//
handleSearchInfoFn(info) {
return info;
},
actionColumn: {
width: 80,
title: '查看账号',
title: '操作',
dataIndex: 'action',
// slots: { customRender: 'action' },
fixed: undefined,
},
});
const [registerModal, { openModal, setModalProps }] = useModal();
function handleCreate() {
openRoleModal(true, {
isUpdate: false,
});
}
function handleExport(){
createMessage.success("下载成功!");
}
const caseId = ref('');
function viewDetail(record) {
console.log(record);
caseId.value = record.id;
alert(caseId.value)
openModal();
}
function handleEdit() {
let rows = getSelectRows();
if (rows.length == 0) {
return createMessage.warn('请勾选一个角色进行编辑');
}
const record = rows[0];
openRoleModal(true, {
record,
isUpdate: true,
});
}
async function handleDelete() {
let rows = getSelectRows();
if (rows.length == 0) {
return createMessage.warn('请勾选一个角色进行删除');
}
const query = [rows[0].id];
createConfirm({
iconType: 'info',
title: '删除',
content: '确定要删除当前角色吗',
onOk: async () => {
const data = await deleteRole(query);
if (data) {
handleSuccess();
return createMessage.success('删除成功');
} else {
return createMessage.error('删除失败');
}
},
});
}
function handleSuccess() {
clearSelectedRowKeys();
reload();
}
function onBtnClicked(domId) {
switch (domId) {
case 'btnAdd':
handleCreate();
break;
case 'btnEdit':
handleEdit();
break;
case 'btnDelete':
handleDelete();
break;
case 'btnModules':
let rows = getSelectRows();
if (rows.length == 0) {
return createMessage.warn('请勾选一个角色进行编辑');
}
const record = rows[0];
openModulesModal(true, {
record,
});
break;
case 'btnExport':
handleExport();
break;
default:
break;
}
}
function viewDetail(record) {
console.log(record);
caseId.value = record.id;
openModal();
}
</script>
<style lang="less" scoped>
// ::v-deep .ant-row .ant-col{
// margin-right: 2px;
// }
// ::v-deep .ant-row .ant-col.ant-col-2 {
// margin-right: 10px;
// }
</style>

@ -15,9 +15,9 @@
</BasicTable>
</template>
<script lang="ts" setup>
import { reactive } from 'vue';
import { reactive,defineProps,watch } from 'vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { BasicTable, useTable, TableAction, FormSchema } from '@/components/Table';
import { getRoleListByPage,getReportList, deleteRole } from '@/api/demo/system';
import { useMessage } from '@/hooks/web/useMessage';
@ -26,6 +26,15 @@
import { columns,columnsDataPreview,searchFormSchema } from './record.data';
defineOptions({ name: 'RoleManagement' });
const props = defineProps<{
tablist:Object,
currentListQuery:Object
}>()
console.log("propspropsprops",props.tablist);
const { createConfirm, createMessage } = useMessage();
const [registerModal, { openModal: openRoleModal }] = useModal();
@ -47,7 +56,7 @@
schemas: searchFormSchema,
},
// 使
useSearchForm: false,
useSearchForm: true,
//
showTableSetting: false,
//
@ -123,6 +132,52 @@
createMessage.success("数据导出成功!")
}
watch(()=>props.currentListQuery,(newValue,oldValue)=>{
while (searchFormSchema.length > 0) {
searchFormSchema.pop();
}
console.log("EEEEEEE",props.currentListQuery);
for(let item in props.currentListQuery){
console.log('EEEEEEEEEEEE',item);
let obj:any = {
field: item,
label: item,
component: 'Input',
defaultValue:props.currentListQuery[item],
colProps: { span: 6 },
}
console.log("OBJ",obj);
searchFormSchema.push(obj);
}
reload();
useTable({
//
title: '',
//
api: getReportList,
// BasicColumn[]
columns,
rowKey: 'id',
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
// 使
useSearchForm: true,
//
showTableSetting: false,
//
bordered: true,
//
showIndexColumn: false,
handleSearchInfoFn(info) {
return info;
},
});
},{immediate:true,deep:true})
function handleSuccess() {
clearSelectedRowKeys();
reload();

@ -6,71 +6,118 @@
</template>
<template #bodyCell="{ column, record }">
<!-- 无人机发现数量 -->
<template v-if="column.key === 'allCount'">
<TableAction
:actions="[
{
label: record.allCount,
onClick: handlePreViewData.bind(null, record),
},
]"
/>
<a @click="handlePreViewData(column,record)">{{record.allCount}}</a>
</template>
<!-- 完成外业核查数量 -->
<template v-if="column.key === 'handleStatus'">
<TableAction
:actions="[
{
label: record.handleStatus,
onClick: handlePreViewData.bind(null, record),
},
]"
/>
<a @click="handlePreViewData(column,record)">{{record.handleStatus}}</a>
</template>
<!-- 24H内为核查 -->
<template v-if="column.key === 'notDealHour24'">
<TableAction
:actions="[
{
label: record.notDealHour24,
onClick: handlePreViewData.bind(null, record),
},
]"
/>
<a @click="handlePreViewData(column,record)">{{record.notDealHour24}}</a>
</template>
<!-- 无人机发现数量 -->
<template v-if="column.key === 'illegal1Count'">
<TableAction
:actions="[
{
label: record.illegal1Count,
onClick: handlePreViewData.bind(null, record),
},
]"
/>
<!-- 房屋翻新 -->
<template v-if="column.key === 'typeFanxinCount'">
<a @click="handlePreViewData(column,record)">{{record.typeFanxinCount}}</a>
</template>
</template>
<!-- 房屋加盖 -->
<template v-if="column.key === 'typeJiagaiCount'">
<a @click="handlePreViewData(column,record)">{{record.typeJiagaiCount}}</a>
</template>
<!-- 房屋翻建 -->
<template v-if="column.key === 'typeFanjianCount'">
<a @click="handlePreViewData(column,record)">{{record.typeFanjianCount}}</a>
</template>
<!-- 存量建设 -->
<template v-if="column.key === 'typeCunliangCount'">
<a @click="handlePreViewData(column,record)">{{record.typeCunliangCount}}</a>
</template>
<!-- 推土 -->
<template v-if="column.key === 'typeTuituCount'">
<a @click="handlePreViewData(column,record)">{{record.typeTuituCount}}</a>
</template>
<!-- 其他 -->
<template v-if="column.key === 'typeOtherCount'">
<a @click="handlePreViewData(column,record)">{{record.typeOtherCount}}</a>
</template>
<!-- 合法 -->
<template v-if="column.key === 'illegal0Count'">
<a @click="handlePreViewData(column,record)">{{record.illegal0Count}}</a>
</template>
<!-- 违法 -->
<template v-if="column.key === 'illegal1Count'">
<a @click="handlePreViewData(column,record)">{{record.illegal1Count}}</a>
</template>
<!-- 伪变化 -->
<template v-if="column.key === 'illegal2Count'">
<a @click="handlePreViewData(column,record)">{{record.illegal2Count}}</a>
</template>
<!-- 外业核实后确定违法数量 -->
<template v-if="column.key === 'illegal1Count1'">
<a @click="handlePreViewData(column,record)">{{record.illegal1Count}}</a>
</template>
<!-- 违法面积 -->
<!-- <template v-if="column.key === 'illegalHandleAreaList'">
<a @click="handlePreViewData(column,record)">{{record.illegalHandleAreaList}}</a>
</template> -->
<!-- 整改销号数 -->
<template v-if="column.key === 'illegalHandle2Status'">
<a @click="handlePreViewData(column,record)">{{record.illegalHandle2Status}}</a>
</template>
<!-- 销号面积 -->
<!-- <template v-if="column.key === 'illegalHandle2AreaList'">
<a @click="handlePreViewData(column,record)">{{record.illegalHandle2AreaList}}</a>
</template> -->
<!-- 尚未整改宗数 -->
<template v-if="column.key === 'illegalHandle01Status'">
<a @click="handlePreViewData(column,record)">{{record.illegalHandle01Status}}</a>
</template>
<!-- 尚未整改面积 -->
<!-- <template v-if="column.key === 'illegalHandle01AreaList'">
<a @click="handlePreViewData(column,record)">{{record.illegalHandle01AreaList}}</a>
</template> -->
<!-- 3日内未整改完成 -->
<template v-if="column.key === 'notComplete3'">
<a @click="handlePreViewData(column,record)">{{record.notComplete3}}</a>
</template>
<!-- 7日内未整改完成 -->
<template v-if="column.key === 'notComplete7'">
<a @click="handlePreViewData(column,record)">{{record.notComplete7}}</a>
</template>
<!-- 30日内未整改完成 -->
<template v-if="column.key === 'notComplete30'">
<a @click="handlePreViewData(column,record)">{{record.notComplete30}}</a>
</template>
<!-- 30日以上未整改完成 -->
<template v-if="column.key === 'notComplete30More'">
<a @click="handlePreViewData(column,record)">{{record.notComplete30More}}</a>
</template>
</template>
</BasicTable>
<div class="data-preview-container" v-if="showRecordList">
<a-tabs hide-add type="editable-card" @edit="onEdit">
<a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title" :closable="pane.closable">
{{ pane.content }}
<a-tabs hide-add type="editable-card" @edit="onEdit" @change="handleTabChange">
<a-tab-pane v-for="(pane,index) in tablist" :key="index.toString()" :tab="pane.streetname+'-'+pane.label" :closable="pane.closable">
</a-tab-pane>
</a-tabs>
<RecordList></RecordList>
<RecordList :tablist="tablist" :currentListQuery="currentListQuery"></RecordList>
<div class="data-preview-container-option">
<div @click="handleCloseRecordList()">
<MinusOutlined />
@ -183,10 +230,141 @@
record,
});
}
function onEdit(targetKey: string){
tablist.splice(parseInt(targetKey),1);
if(tablist.length==0){
showRecordList.value = false;
}
}
let currentListQuery = reactive<searchListSchema>({});
function handleTabChange(e){
currentListQuery = reactive<searchListSchema>(tablist[e].listQuery)
}
// function remvoeTab(){
// }
const tablist = reactive<{streetname:string;label:string;listQuery:searchListSchema}[]>([])
//
interface searchListSchema{
is_intact?:number;
streetid?:string;
identification_start_time?:string;
identification_end_time?:string;
page?:number;
limit?:number;
is_deal?:number;
is_not_deal_hour24?:number;
is_drawback?:number;
typeid?:number;
is_illegal?:number;
is_complete?:number;
handle_status_id?:number;
out_time_flag?:number;
}
// const searchForm = reactive<searchListSchema>({
// })
function handlePreViewData(column,record:Recordable){
const searchForm = reactive<searchListSchema>({
streetid:record.streetid,
identification_start_time:"",
identification_end_time:"",
is_intact:1,
page:1,
limit:10,
})
switch(column.dataIndex){
case 'allCount':
break;
case 'handleStatus':
searchForm.is_deal = 1;
break;
case 'notDealHour24':
searchForm.is_not_deal_hour24 = 1;
searchForm.is_drawback = 0;
break;
case 'notDealHour24':
searchForm.is_not_deal_hour24 = 1;
searchForm.is_drawback = 0;
break;
case 'typeFanxinCount':
searchForm.typeid = record.typeid
case 'typeJiagaiCount':
searchForm.typeid = record.typeid
case 'typeFanjianCount':
searchForm.typeid = record.typeid
case 'typeCunliangCount':
searchForm.typeid = record.typeid
case 'typeTuituCount':
searchForm.typeid = record.typeid
case 'illegal0Count':
searchForm.is_illegal = 0;
searchForm.is_deal = 1;
break;
case 'illegal1Count':
searchForm.is_illegal = 1;
searchForm.is_deal = 1;
break;
case 'illegal2Count':
searchForm.is_illegal = 2;
searchForm.is_deal = 1;
break;
case 'illegal1Count1':
searchForm.is_illegal = 1;
searchForm.is_deal = 1;
break;
case 'illegalHandle2Status':
searchForm.handle_status_id = 1;
searchForm.is_deal = 1;
break;
case 'illegalHandle01Status':
searchForm.is_illegal = 1;
searchForm.is_deal = 1;
searchForm.is_complete = 0;
break;
case 'notComplete3':
searchForm.is_illegal = 1;
searchForm.is_complete = 0;
searchForm.out_time_flag = 1;
break;
case 'notComplete7':
searchForm.is_illegal = 1;
searchForm.is_complete = 0;
searchForm.out_time_flag = 2;
break;
case 'notComplete30':
searchForm.is_illegal = 1;
searchForm.is_complete = 0;
searchForm.out_time_flag = 4;
break;
case 'notComplete30More':
searchForm.is_illegal = 1;
searchForm.is_complete = 0;
searchForm.out_time_flag = 5;
break;
}
let tabItem = {
streetname:record.streetname,
label:column.title,
listQuery:searchForm,
}
function handlePreViewData(record:Recordable){
showRecordList.value = true;
console.log(record)
tablist.push(tabItem)
// console.log("TabList",tablist);
showRecordList.value = true;
}
function handleEdit() {

@ -31,6 +31,7 @@ export const columnsDataPreview: BasicColumn[] = [
]
},{
title: '下发疑似图斑类型',
dataIndex: '',
children:[
{
title: '房屋翻新',
@ -60,6 +61,7 @@ export const columnsDataPreview: BasicColumn[] = [
]
},{
title: '图斑判定',
dataIndex:"1",
children:[
{
title: '合法',
@ -77,11 +79,11 @@ export const columnsDataPreview: BasicColumn[] = [
]
},{
title: '新增违法图斑整改情况',
dataIndex: 'handle_status_name',
dataIndex: '2',
children:[
{
title: '外业核实后确定违法数',
dataIndex: 'beginTime',
dataIndex: 'illegal1Count1',
width: 120,
},{
title: '违法面积',
@ -89,19 +91,19 @@ export const columnsDataPreview: BasicColumn[] = [
width: 120,
},{
title: '整改销号数',
dataIndex: 'beginTime',
dataIndex: 'illegalHandle2Status',
width: 120,
},{
title: '销号面积',
dataIndex: 'beginTime',
dataIndex: 'illegalHandle2AreaList',
width: 120,
},{
title: '尚未整改宗数',
dataIndex: 'beginTime',
dataIndex: 'illegalHandle01Status',
width: 120,
},{
title: '未整改面积',
dataIndex: 'beginTime',
dataIndex: 'illegalHandle01AreaList',
width: 120,
}
]
@ -136,7 +138,8 @@ export const columnsDataPreview: BasicColumn[] = [
width: 120,
}
]
},{
},
{
title: '备注',
dataIndex: 'mask',
}
@ -166,6 +169,7 @@ export const columns: BasicColumn[] = [
]
},{
title: '下发疑似图斑类型',
dataIndex: '',
children:[
{
title: '房屋翻新',
@ -195,6 +199,7 @@ export const columns: BasicColumn[] = [
]
},{
title: '图斑判定',
dataIndex:"1",
children:[
{
title: '合法',
@ -212,11 +217,11 @@ export const columns: BasicColumn[] = [
]
},{
title: '新增违法图斑整改情况',
dataIndex: 'handle_status_name',
dataIndex: '2',
children:[
{
title: '外业核实后确定违法数',
dataIndex: 'beginTime',
dataIndex: 'illegal1Count1',
width: 120,
},{
title: '违法面积',
@ -224,19 +229,19 @@ export const columns: BasicColumn[] = [
width: 120,
},{
title: '整改销号数',
dataIndex: 'beginTime',
dataIndex: 'illegalHandle2Status',
width: 120,
},{
title: '销号面积',
dataIndex: 'beginTime',
dataIndex: 'illegalHandle2AreaList',
width: 120,
},{
title: '尚未整改宗数',
dataIndex: 'beginTime',
dataIndex: 'illegalHandle01Status',
width: 120,
},{
title: '未整改面积',
dataIndex: 'beginTime',
dataIndex: 'illegalHandle01AreaList',
width: 120,
}
]
@ -271,10 +276,10 @@ export const columns: BasicColumn[] = [
width: 120,
}
]
},{
},
{
title: '备注',
dataIndex: 'createusername',
width: 200,
dataIndex: 'mask',
}
];

Loading…
Cancel
Save