线索关闭画面
parent
e5ff3dedde
commit
86670fa991
@ -0,0 +1,228 @@
|
||||
import { BasicColumn, FormSchema } from '@/components/Table';
|
||||
// import { getChildrenTree } from '@/api/demo/system';
|
||||
|
||||
const getYearList = () => {
|
||||
const num = 10;
|
||||
const currentYear = new Date().getFullYear();
|
||||
// 存储年份数据的数组
|
||||
const list: any = [];
|
||||
// 获取当前年份
|
||||
// year.value = Number(`${currentYear}`);
|
||||
list.push({
|
||||
value: Number(`${currentYear}`),
|
||||
label: Number(`${currentYear}`),
|
||||
});
|
||||
// 获取后面几年的数据
|
||||
for (let i = 1; i <= num; i++) {
|
||||
list.push({
|
||||
value: Number(`${currentYear - i}`),
|
||||
label: Number(`${currentYear - i}`),
|
||||
});
|
||||
}
|
||||
return list;
|
||||
};
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '线索编号',
|
||||
dataIndex: 'case_no',
|
||||
width:180,
|
||||
},
|
||||
{
|
||||
title: '线索描述',
|
||||
dataIndex: 'case_description',
|
||||
width:230,
|
||||
},
|
||||
{
|
||||
title: '区县',
|
||||
dataIndex: 'countyname',
|
||||
},
|
||||
{
|
||||
title: '乡镇',
|
||||
dataIndex: 'streetname',
|
||||
},
|
||||
{
|
||||
title: '社区',
|
||||
dataIndex: 'communityname',
|
||||
},
|
||||
{
|
||||
title: '线索面积',
|
||||
dataIndex: 'area',
|
||||
},
|
||||
{
|
||||
title: '农用地面积',
|
||||
dataIndex: 'nongyongdi_area',
|
||||
},
|
||||
{
|
||||
title: '耕地面积',
|
||||
dataIndex: 'gengdi_area',
|
||||
},
|
||||
{
|
||||
title: '永农面积',
|
||||
dataIndex: 'yongjiujibennongtian_area',
|
||||
},
|
||||
{
|
||||
title: '重点区域面积',
|
||||
dataIndex: 'zhongdianquyu_area',
|
||||
},
|
||||
{
|
||||
title: '生态保护红线面积',
|
||||
dataIndex: 'shengtaibaohuhongxian_area',
|
||||
},
|
||||
{
|
||||
title: '国土空间规划面积',
|
||||
dataIndex: 'guotukongjianguihua_area',
|
||||
},
|
||||
];
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
// {
|
||||
// field: 'year',
|
||||
// component: 'Select',
|
||||
// colProps: { span: 4 },
|
||||
// label: '年份',
|
||||
// componentProps: {
|
||||
// options: getYearList(),
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// field: 'tubanlaiyuan',
|
||||
// label: '线索来源',
|
||||
// component: 'Select',
|
||||
// colProps: { span: 4 },
|
||||
// componentProps: {
|
||||
// options: [
|
||||
// {
|
||||
// label: '全域巡查',
|
||||
// value: '全域巡查',
|
||||
// },
|
||||
// {
|
||||
// label: '卫片下发',
|
||||
// value: '卫片下发',
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// field: 'picihao',
|
||||
// label: '批次',
|
||||
// component: 'Select',
|
||||
// colProps: { span: 4 },
|
||||
// componentProps: {
|
||||
// options: [],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// field: 'typename',
|
||||
// label: '线索类型',
|
||||
// component: 'Select',
|
||||
// colProps: { span: 4 },
|
||||
// componentProps: {
|
||||
// options: [
|
||||
// { label: '农用地', value: '农用地' },
|
||||
// { label: '建设用地', value: '建设用地' },
|
||||
// { label: '推堆土', value: '推堆土' },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// field: 'isBuildName',
|
||||
// label: '标注类型',
|
||||
// component: 'Select',
|
||||
// colProps: { span: 4 },
|
||||
// componentProps: {
|
||||
// options: [
|
||||
// { label: '在建', value: '在建' },
|
||||
// { label: '已建成', value: '已建成' },
|
||||
// { label: '持续变化', value: '持续变化' },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// field: 'isIllegal',
|
||||
// label: '判定结果',
|
||||
// component: 'Select',
|
||||
// colProps: { span: 4 },
|
||||
// componentProps: {
|
||||
// options: [
|
||||
// { label: '合法', value: 0 },
|
||||
// { label: '违法', value: 1 },
|
||||
// { label: '其他', value: 2 },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// field: 'nowStatus',
|
||||
// label: '当前状态',
|
||||
// component: 'Select',
|
||||
// componentProps: {
|
||||
// options: [
|
||||
// { label: '待接收', value: '待接收' },
|
||||
// { label: '待填报', value: '待填报' },
|
||||
// { label: '待整改', value: '待整改' },
|
||||
// { label: '市级审核', value: '市级审核' },
|
||||
// { label: '县级审核', value: '县级审核' },
|
||||
// { label: '已归档', value: '已归档' },
|
||||
// ],
|
||||
// },
|
||||
// colProps: { span: 4 },
|
||||
// },
|
||||
// {
|
||||
// field: 'measureName',
|
||||
// label: '整改措施',
|
||||
// component: 'Select',
|
||||
// colProps: { span: 4 },
|
||||
// componentProps: {
|
||||
// options: [
|
||||
// { label: '拆除复耕', value: '0' },
|
||||
// { label: '补办手续', value: '1' },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// field: 'countyid',
|
||||
// label: '区县',
|
||||
// component: 'ApiSelect',
|
||||
// colProps: { span: 4 },
|
||||
// componentProps: ({ tableAction, formModel }) => {
|
||||
// return {
|
||||
// api: getChildrenTree,
|
||||
// params: { parentId: 371300 },
|
||||
// // 接口参数
|
||||
// resultField: 'result',
|
||||
// labelField: 'name',
|
||||
// valueField: 'id',
|
||||
// onChange: () => {
|
||||
// formModel.streetid = '';
|
||||
// },
|
||||
// };
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// field: 'streetid',
|
||||
// label: '乡镇',
|
||||
// component: 'ApiSelect',
|
||||
// colProps: { span: 4 },
|
||||
// componentProps: ({ formModel }) => {
|
||||
// return {
|
||||
// api: formModel.countyid && getChildrenTree,
|
||||
// params: { parentId: formModel.countyid },
|
||||
// // 接口参数
|
||||
// resultField: 'result',
|
||||
// labelField: 'name',
|
||||
// valueField: 'id',
|
||||
// };
|
||||
// },
|
||||
// },
|
||||
{
|
||||
field: 'key',
|
||||
label: '线索编号',
|
||||
component: 'Input',
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
field: 'originalcaseno',
|
||||
label: '标识号',
|
||||
component: 'Input',
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<PageWrapper dense contentFullHeight fixedHeight>
|
||||
<div class="table-box">
|
||||
<BasicTable @register="registerTable">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
label: '操作',
|
||||
onClick: () => {
|
||||
getCaseDetail(record)
|
||||
},
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
<a-modal
|
||||
width="70%"
|
||||
v-model:open="infoModal"
|
||||
title="线索详情"
|
||||
:destroyOnClose="true"
|
||||
:okText="'关闭'"
|
||||
:okType="'danger'"
|
||||
@ok="submit"
|
||||
@cancel="closeInfoModal">
|
||||
<InfoModal :infoData="infoData" :infoResult="infoResult" v-model:shppath="shppath"/>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { onMounted, ref, h } from 'vue';
|
||||
import { LoadCaseInfoListForUpdate,LoadCaseInfoById,UpdateCaseInfo,LoadCaseHistoryInfoList } from '@/api/demo/system';
|
||||
import { BasicTable,useTable,TableAction } from '@/components/Table';
|
||||
import { columns, searchFormSchema } from './caseclose.data';
|
||||
import InfoModal from './InfoModal/index.vue'
|
||||
import { message, Modal } from 'ant-design-vue'
|
||||
import { CloseSingleCaseInfo } from '@/api/demo/system'
|
||||
|
||||
const infoModal = ref(false)
|
||||
const historyModal = ref(false)
|
||||
const historyCaseId = ref()
|
||||
const infoData = ref({})
|
||||
const infoResult = ref({})
|
||||
const shppath = ref()
|
||||
const closeCaseRemark = ref('')
|
||||
const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPagination, setLoading }] =
|
||||
useTable({
|
||||
title: '线索汇总',
|
||||
api: LoadCaseInfoListForUpdate,
|
||||
columns,
|
||||
rowKey: 'id',
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
// 使用搜索表单
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
bordered: true,
|
||||
actionColumn: {
|
||||
width: 100,
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
fixed: 'right',
|
||||
},
|
||||
});
|
||||
const getCaseDetail = (record) => {
|
||||
LoadCaseInfoById({id: record.id}).then(res => {
|
||||
// console.log(res)
|
||||
// infoResult.value = {}
|
||||
infoData.value = res
|
||||
infoModal.value = true
|
||||
})
|
||||
}
|
||||
const getHistoryList = (record) => {
|
||||
// LoadCaseHistoryInfoList({key:record.id}).then(res => {
|
||||
historyCaseId.value = record.id
|
||||
historyModal.value = true
|
||||
|
||||
// console.log(res)
|
||||
// })
|
||||
|
||||
}
|
||||
const submit = () => {
|
||||
Modal.confirm({
|
||||
title: '请输入关闭原因',
|
||||
content: h('input',{
|
||||
class: 'reSubmitInput',
|
||||
onChange: (e) => closeCaseRemark.value = e.target.value
|
||||
}),
|
||||
onOk: async () => {
|
||||
if(closeCaseRemark.value.trim().length <=0){
|
||||
message.warning('关闭原因不能为空')
|
||||
return Promise.reject()
|
||||
}
|
||||
try{
|
||||
const result = await CloseSingleCaseInfo({id:infoData.value.id , closereason: closeCaseRemark.value})
|
||||
if(result){
|
||||
message.success('关闭线索成功');
|
||||
reload()
|
||||
closeInfoModal()
|
||||
}
|
||||
closeCaseRemark.value = ''
|
||||
} catch (error){
|
||||
closeCaseRemark.value = ''
|
||||
}
|
||||
},
|
||||
onCancel() {
|
||||
closeCaseRemark.value = ''
|
||||
},
|
||||
})
|
||||
|
||||
// UpdateCaseInfo(infoResult.value,shppath.value).then(res => {
|
||||
// console.log(res)
|
||||
// message.success('修改成功')
|
||||
// closeInfoModal()
|
||||
// reload()
|
||||
// })
|
||||
}
|
||||
const closeInfoModal = () => {
|
||||
infoModal.value = false
|
||||
infoResult.value = {}
|
||||
shppath.value = ''
|
||||
}
|
||||
const closeHistoryModal = () => {
|
||||
historyModal.value = false
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.reSubmitInput{
|
||||
border: 1px solid;
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
border-radius: 5px;
|
||||
padding: 0px 10px;
|
||||
border-color: #000;
|
||||
transition: 0.2s;
|
||||
&:focus{
|
||||
border-color: #6db8ff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue