Compare commits
13 Commits
master
...
aqm-ops-su
Author | SHA1 | Date |
---|---|---|
|
4858252c07 | 4 days ago |
|
46b74e22f8 | 5 days ago |
|
2a68228aa1 | 1 week ago |
|
453885c828 | 1 week ago |
|
e1e7e7b4b5 | 1 week ago |
|
78ff829ef6 | 1 week ago |
|
a84966c654 | 1 week ago |
|
835e152d92 | 2 weeks ago |
|
1fcc378756 | 2 weeks ago |
|
6aab9ca707 | 2 weeks ago |
|
e8a8fdd84e | 3 weeks ago |
|
d02e873457 | 3 weeks ago |
|
d22e10ce41 | 3 weeks ago |
59 changed files with 3914 additions and 11 deletions
@ -1,2 +1,2 @@ |
|||||
# spa-title |
# spa-title |
||||
VITE_GLOB_APP_TITLE = Plus Admin |
VITE_GLOB_APP_TITLE = '国研空气质量监控系统运维监理及考核平台' |
||||
|
@ -0,0 +1,13 @@ |
|||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
getHangzhouRegions = '/air/stationInfo/getHangzhouRegions', |
||||
|
getStationList = '/air/stationInfo/getStationList', |
||||
|
} |
||||
|
|
||||
|
export function getStationList() { |
||||
|
return defHttp.get({ url: Api.getStationList }); |
||||
|
} |
||||
|
export function getHangzhouRegions() { |
||||
|
return defHttp.get({ url: Api.getHangzhouRegions }); |
||||
|
} |
@ -1,8 +1,9 @@ |
|||||
import type { App } from 'vue'; |
import type { App } from 'vue'; |
||||
import { Button } from './Button'; |
// import { Button } from './Button';
|
||||
import { Input, Layout } from 'ant-design-vue'; |
// import { Input, Layout } from 'ant-design-vue';
|
||||
import VXETable from 'vxe-table'; |
import VXETable from 'vxe-table'; |
||||
|
import Antd from 'ant-design-vue'; |
||||
|
|
||||
export function registerGlobComp(app: App) { |
export function registerGlobComp(app: App) { |
||||
app.use(Input).use(Button).use(Layout).use(VXETable); |
app.use(Antd).use(VXETable); |
||||
} |
} |
||||
|
@ -0,0 +1,119 @@ |
|||||
|
<template> |
||||
|
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> |
||||
|
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules"> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="所属计划" name="planId"> |
||||
|
<a-select v-model:value="form.planId" :options="planOptions" placeholder="请选择" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监理人员" name="monitorPerson"> |
||||
|
<a-select v-model:value="form.monitorPerson" :options="monitorPersonOptions" placeholder="请选择" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-form> |
||||
|
</a-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { message } from 'ant-design-vue'; |
||||
|
import { getInfo, add, update,getPlans } from './api'; |
||||
|
import { getStationList } from '@/api/common/index'; |
||||
|
export default { |
||||
|
setup(props, { emit }) { |
||||
|
const title = ref('新增'); |
||||
|
const visible = ref(false); |
||||
|
const form = reactive({ |
||||
|
planId: null, |
||||
|
monitorPerson: null, |
||||
|
}); |
||||
|
//下拉框 |
||||
|
const planOptions = ref([]) |
||||
|
const monitorPersonOptions = ref([ |
||||
|
{ |
||||
|
value:'吴昊' |
||||
|
}, |
||||
|
{ |
||||
|
value:'梁涛' |
||||
|
} |
||||
|
]); |
||||
|
const showModal = async (type, id, projectId) => { |
||||
|
visible.value = true; |
||||
|
const res = await getPlans() |
||||
|
planOptions.value = res |
||||
|
if (type == 1) { |
||||
|
title.value = '新增'; |
||||
|
} else if (type == 2) { |
||||
|
title.value = '编辑'; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in form) { |
||||
|
form[i] = data[i]; |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
const handleOk = () => { |
||||
|
formRef.value.validate().then((valid) => { |
||||
|
if (valid) { |
||||
|
if (title.value == '新增') { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
delete params.id; |
||||
|
add(params).then((_) => { |
||||
|
message.success('新增成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} else { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
update(params).then((_) => { |
||||
|
message.success('编辑成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
const closeModal = () => { |
||||
|
formRef.value.resetFields(); |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const formRef = ref(); |
||||
|
const rules = { |
||||
|
planId: [{ required: true, message: '请选择' }], |
||||
|
monitorPerson: [{ required: true, message: '请选择' }], |
||||
|
}; |
||||
|
return { |
||||
|
visible, |
||||
|
title, |
||||
|
form, |
||||
|
showModal, |
||||
|
handleOk, |
||||
|
planOptions, |
||||
|
monitorPersonOptions, |
||||
|
closeModal, |
||||
|
formRef, |
||||
|
rules, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-modal-body { |
||||
|
max-width: 600px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,32 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/orderInfo', |
||||
|
list = '/air/orderInfo/list', |
||||
|
getPlans='/air/planInfo/getPlans' |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
export function getPlans() { |
||||
|
return defHttp.get({ url: Api.getPlans }); |
||||
|
} |
||||
|
|
@ -0,0 +1,31 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = []; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '工单编号', |
||||
|
dataIndex: 'orderNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '工作日期', |
||||
|
dataIndex: 'workDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '子站名称', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '子站状态', |
||||
|
dataIndex: 'status', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理类型', |
||||
|
dataIndex: 'monitorType', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理人员', |
||||
|
dataIndex: 'monitorPerson', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,53 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #toolbar> |
||||
|
<a-button type="primary" @click="showModal(1)">新增</a-button> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<addModal ref="addModalRef" @success="reload()"/> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import addModal from './addModal.vue'; |
||||
|
import { ref } from 'vue'; |
||||
|
defineOptions({ name: 'order' }); |
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '核查工单管理', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'order', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
// actionColumn: { |
||||
|
// width: 300, |
||||
|
// title: '操作', |
||||
|
// key: 'action', |
||||
|
// fixed: 'right', |
||||
|
// }, |
||||
|
}); |
||||
|
//新增编辑弹窗 |
||||
|
//详情,跳转 |
||||
|
const addModalRef = ref(); |
||||
|
const showModal = (type: any) => { |
||||
|
addModalRef.value.showModal(type); |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,163 @@ |
|||||
|
<template> |
||||
|
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> |
||||
|
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules"> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="制定日期" name="createDate"> |
||||
|
<a-date-picker v-model:value="form.createDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="计划日期" name="planDate"> |
||||
|
<a-date-picker v-model:value="form.planDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="站点名称" name="station"> |
||||
|
<a-select v-model:value="form.station" :options="stationOptions" placeholder="请选择" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="计划类型" name="monitorType"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorType" |
||||
|
:options="monitorTypeOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="运维人员" name="ioPerson"> |
||||
|
<a-select |
||||
|
v-model:value="form.ioPerson" |
||||
|
:options="ioPersonOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-form> |
||||
|
</a-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { message } from 'ant-design-vue'; |
||||
|
import { getInfo, add, update } from './api'; |
||||
|
import { getStationList } from '@/api/common/index'; |
||||
|
export default { |
||||
|
setup(props, { emit }) { |
||||
|
const title = ref('新增'); |
||||
|
const visible = ref(false); |
||||
|
const form = reactive({ |
||||
|
createDate: '', |
||||
|
planDate: '', |
||||
|
station: null, |
||||
|
monitorType: null, |
||||
|
ioPerson: null, |
||||
|
}); |
||||
|
//下拉框 |
||||
|
const monitorTypeOptions = [ |
||||
|
{ |
||||
|
value: '月度巡检', |
||||
|
}, |
||||
|
{ |
||||
|
value: '半年度巡检', |
||||
|
}, |
||||
|
]; |
||||
|
const ioPersonOptions = [ |
||||
|
{ |
||||
|
value: '李华', |
||||
|
}, |
||||
|
{ |
||||
|
value: '李明', |
||||
|
}, |
||||
|
]; |
||||
|
const stationOptions = ref([]); |
||||
|
const showModal = async (type, id, projectId) => { |
||||
|
visible.value = true; |
||||
|
const res = await getStationList(); |
||||
|
stationOptions.value = res; |
||||
|
if (type == 1) { |
||||
|
title.value = '新增'; |
||||
|
} else if (type == 2) { |
||||
|
title.value = '编辑'; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in form) { |
||||
|
form[i] = data[i]; |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
const handleOk = () => { |
||||
|
formRef.value.validate().then((valid) => { |
||||
|
if (valid) { |
||||
|
if (title.value == '新增') { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
delete params.id; |
||||
|
add(params).then((_) => { |
||||
|
message.success('新增成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} else { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
update(params).then((_) => { |
||||
|
message.success('编辑成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
const closeModal = () => { |
||||
|
formRef.value.resetFields(); |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const formRef = ref(); |
||||
|
const rules = { |
||||
|
createDate: [{ required: true, message: '请选择' }], |
||||
|
planDate: [{ required: true, message: '请选择' }], |
||||
|
station: [{ required: true, message: '请选择' }], |
||||
|
monitorType: [{ required: true, message: '请选择' }], |
||||
|
ioPerson: [{ required: true, message: '请选择' }], |
||||
|
}; |
||||
|
return { |
||||
|
visible, |
||||
|
title, |
||||
|
form, |
||||
|
showModal, |
||||
|
handleOk, |
||||
|
monitorTypeOptions, |
||||
|
stationOptions, |
||||
|
ioPersonOptions, |
||||
|
closeModal, |
||||
|
formRef, |
||||
|
rules, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-modal-body { |
||||
|
max-width: 600px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,28 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/planInfo', |
||||
|
list = '/air/planInfo/list', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
|
@ -0,0 +1,43 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = []; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '计划号', |
||||
|
dataIndex: 'planNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '计划日期', |
||||
|
dataIndex: 'planDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '子站名称', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '子站状态', |
||||
|
dataIndex: 'status', |
||||
|
}, |
||||
|
{ |
||||
|
title: '所属区域', |
||||
|
dataIndex: 'area', |
||||
|
}, |
||||
|
{ |
||||
|
title: '运维公司', |
||||
|
dataIndex: 'ioCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '运维人员', |
||||
|
dataIndex: 'ioPerson', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理类型', |
||||
|
dataIndex: 'monitorType', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理公司', |
||||
|
dataIndex: 'monitorCompany', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,53 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #toolbar> |
||||
|
<a-button type="primary" @click="showModal(1)">新增</a-button> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<addModal ref="addModalRef" @success="reload()"/> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import addModal from './addModal.vue'; |
||||
|
import { ref } from 'vue'; |
||||
|
defineOptions({ name: 'plan' }); |
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '核查计划管理', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'plan', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
// actionColumn: { |
||||
|
// width: 300, |
||||
|
// title: '操作', |
||||
|
// key: 'action', |
||||
|
// fixed: 'right', |
||||
|
// }, |
||||
|
}); |
||||
|
//新增编辑弹窗 |
||||
|
//详情,跳转 |
||||
|
const addModalRef = ref(); |
||||
|
const showModal = (type: any) => { |
||||
|
addModalRef.value.showModal(type); |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,27 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/checkInfo', |
||||
|
list = '/air/checkInfo/list', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = [ |
||||
|
{ |
||||
|
field: 'area', |
||||
|
label: '所在区域', |
||||
|
component: 'Select', |
||||
|
componentProps: { |
||||
|
options: [], |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
field: '[startDate, endDate]', |
||||
|
label: '签到时间', |
||||
|
component: 'RangePicker', |
||||
|
componentProps: { |
||||
|
format: 'YYYY-MM-DD', |
||||
|
valueFormat: 'YYYY-MM-DD', |
||||
|
}, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '站点名称', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '所属区域', |
||||
|
dataIndex: 'area', |
||||
|
}, |
||||
|
{ |
||||
|
title: '人员性质', |
||||
|
dataIndex: 'attribute', |
||||
|
}, |
||||
|
{ |
||||
|
title: '人员姓名', |
||||
|
dataIndex: 'person', |
||||
|
}, |
||||
|
{ |
||||
|
title: '所属公司', |
||||
|
dataIndex: 'company', |
||||
|
}, |
||||
|
{ |
||||
|
title: '签到时间', |
||||
|
dataIndex: 'registerTime', |
||||
|
}, |
||||
|
{ |
||||
|
title: '签到类型', |
||||
|
dataIndex: 'registerType', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,69 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #bodyCell="{ column, record }"> |
||||
|
<template v-if="column && record && column.key === 'action'"> |
||||
|
<a-popconfirm |
||||
|
title="确定要删除吗?" |
||||
|
ok-text="是" |
||||
|
cancel-text="否" |
||||
|
@confirm="handleDelete(record.id)" |
||||
|
> |
||||
|
<a-button type="link">删除</a-button> |
||||
|
</a-popconfirm> |
||||
|
</template> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import {getHangzhouRegions} from '@/api/common/index' |
||||
|
defineOptions({ name: 'register' }); |
||||
|
|
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '签到管理', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'register', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
// actionColumn: { |
||||
|
// width: 300, |
||||
|
// title: '操作', |
||||
|
// key: 'action', |
||||
|
// fixed: 'right', |
||||
|
// }, |
||||
|
}); |
||||
|
//新增编辑删除 |
||||
|
const handleDelete = async (id: any) => { |
||||
|
await removeByIds([id]); |
||||
|
reload(); |
||||
|
}; |
||||
|
|
||||
|
//详情,跳转 |
||||
|
//下拉框 |
||||
|
const getHangzhouOptions =async()=>{ |
||||
|
const res = await getHangzhouRegions() |
||||
|
formSchemas[0].componentProps.options = res |
||||
|
} |
||||
|
getHangzhouOptions() |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,209 @@ |
|||||
|
<template> |
||||
|
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> |
||||
|
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules"> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="站点名称" name="station"> |
||||
|
<a-select v-model:value="form.station" :options="stationOptions" placeholder="请选择" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监测项目" name="monitorProject"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorProject" |
||||
|
:options="monitorProjectOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="参数名称" name="arguments"> |
||||
|
<a-input v-model:value="form.arguments" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="发现时间" name="foundDate"> |
||||
|
<a-date-picker v-model:value="form.foundDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监理人员" name="monitorPerson"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorPerson" |
||||
|
:options="monitorPersonOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="所属公司" name="ioCompany"> |
||||
|
<a-select |
||||
|
v-model:value="form.ioCompany" |
||||
|
:options="ioCompanyOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监理公司" name="monitorCompany"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorCompany" |
||||
|
:options="monitorCompanyOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="备注" name="remark"> |
||||
|
<a-textarea v-model:value="form.remark" :rows="4" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-form> |
||||
|
</a-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { message } from 'ant-design-vue'; |
||||
|
import { getInfo, add, update } from './api'; |
||||
|
import { getStationList } from '@/api/common/index'; |
||||
|
export default { |
||||
|
setup(props, { emit }) { |
||||
|
const title = ref('新增'); |
||||
|
const visible = ref(false); |
||||
|
const form = reactive({ |
||||
|
station: null, |
||||
|
monitorProject: null, |
||||
|
arguments: '', |
||||
|
foundDate: '', |
||||
|
monitorPerson: null, |
||||
|
ioCompany: null, |
||||
|
monitorCompany: null, |
||||
|
remark: '', |
||||
|
id: null, |
||||
|
}); |
||||
|
//下拉框 |
||||
|
const ioCompanyOptions = [ |
||||
|
{ |
||||
|
value: '杭州聚光', |
||||
|
}, |
||||
|
]; |
||||
|
const monitorProjectOptions = [ |
||||
|
{ |
||||
|
value: 'PM2.5', |
||||
|
}, |
||||
|
{ |
||||
|
value: 'O3', |
||||
|
}, |
||||
|
]; |
||||
|
const monitorCompanyOptions = [ |
||||
|
{ |
||||
|
value: '宁波国研信息科技有限公司', |
||||
|
}, |
||||
|
]; |
||||
|
const stationOptions = ref([]); |
||||
|
const monitorPersonOptions = ref([ |
||||
|
{ |
||||
|
value:'吴昊' |
||||
|
}, |
||||
|
{ |
||||
|
value:'梁涛' |
||||
|
} |
||||
|
]); |
||||
|
const showModal = async (type, id, projectId) => { |
||||
|
visible.value = true; |
||||
|
const res = await getStationList(); |
||||
|
stationOptions.value = res; |
||||
|
if (type == 1) { |
||||
|
title.value = '新增'; |
||||
|
} else if (type == 2) { |
||||
|
title.value = '编辑'; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in form) { |
||||
|
form[i] = data[i]; |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
const handleOk = () => { |
||||
|
formRef.value.validate().then((valid) => { |
||||
|
if (valid) { |
||||
|
if (title.value == '新增') { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
delete params.id; |
||||
|
add(params).then((_) => { |
||||
|
message.success('新增成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} else { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
update(params).then((_) => { |
||||
|
message.success('编辑成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
const closeModal = () => { |
||||
|
formRef.value.resetFields(); |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const formRef = ref(); |
||||
|
const rules = { |
||||
|
station: [{ required: true, message: '请选择' }], |
||||
|
monitorProject: [{ required: true, message: '请选择' }], |
||||
|
arguments: [{ required: true, message: '请输入' }], |
||||
|
foundDate: [{ required: true, message: '请选择' }], |
||||
|
monitorCompany: [{ required: true, message: '请选择' }], |
||||
|
ioCompany: [{ required: true, message: '请选择' }], |
||||
|
}; |
||||
|
return { |
||||
|
visible, |
||||
|
title, |
||||
|
form, |
||||
|
showModal, |
||||
|
handleOk, |
||||
|
stationOptions, |
||||
|
monitorProjectOptions, |
||||
|
monitorCompanyOptions, |
||||
|
ioCompanyOptions, |
||||
|
monitorPersonOptions, |
||||
|
closeModal, |
||||
|
formRef, |
||||
|
rules, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-modal-body { |
||||
|
max-width: 600px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,28 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/paramChange', |
||||
|
list = '/air/paramChange/list', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
|
@ -0,0 +1,39 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = []; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '站点', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监测项目', |
||||
|
dataIndex: 'monitorProject', |
||||
|
}, |
||||
|
{ |
||||
|
title: '参数名称', |
||||
|
dataIndex: 'arguments', |
||||
|
}, |
||||
|
{ |
||||
|
title: '发现时间', |
||||
|
dataIndex: 'foundDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理人员', |
||||
|
dataIndex: 'monitorPerson', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理单位', |
||||
|
dataIndex: 'monitorCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '运维单位', |
||||
|
dataIndex: 'ioCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '备注', |
||||
|
dataIndex: 'remark', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,53 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #toolbar> |
||||
|
<a-button type="primary" @click="showModal(1)">新增</a-button> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<addModal ref="addModalRef" @success="reload()"/> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import addModal from './addModal.vue'; |
||||
|
import { ref } from 'vue'; |
||||
|
defineOptions({ name: 'arguments' }); |
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '站点参数变更分析', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'arguments', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
// actionColumn: { |
||||
|
// width: 300, |
||||
|
// title: '操作', |
||||
|
// key: 'action', |
||||
|
// fixed: 'right', |
||||
|
// }, |
||||
|
}); |
||||
|
//新增编辑弹窗 |
||||
|
//详情,跳转 |
||||
|
const addModalRef = ref(); |
||||
|
const showModal = (type: any) => { |
||||
|
addModalRef.value.showModal(type); |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,218 @@ |
|||||
|
<template> |
||||
|
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> |
||||
|
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules"> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="站点名称" name="station"> |
||||
|
<a-select v-model:value="form.station" :options="stationOptions" placeholder="请选择" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监测项目" name="monitorProject"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorProject" |
||||
|
:options="monitorProjectOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="故障开始时间" name="faultStartDate"> |
||||
|
<a-date-picker v-model:value="form.faultStartDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="运维响应时间" name="ioResponseDate"> |
||||
|
<a-date-picker v-model:value="form.ioResponseDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="故障结束时间" name="faultEndDate"> |
||||
|
<a-date-picker v-model:value="form.faultEndDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监理人员" name="monitorPerson"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorPerson" |
||||
|
:options="monitorPersonOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="所属公司" name="ioCompany"> |
||||
|
<a-select |
||||
|
v-model:value="form.ioCompany" |
||||
|
:options="ioCompanyOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监理公司" name="monitorCompany"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorCompany" |
||||
|
:options="monitorCompanyOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="备注" name="remark"> |
||||
|
<a-textarea v-model:value="form.remark" :rows="4" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-form> |
||||
|
</a-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { message } from 'ant-design-vue'; |
||||
|
import { getInfo, add, update } from './api'; |
||||
|
import { getStationList } from '@/api/common/index'; |
||||
|
export default { |
||||
|
setup(props, { emit }) { |
||||
|
const title = ref('新增'); |
||||
|
const visible = ref(false); |
||||
|
const form = reactive({ |
||||
|
station: null, |
||||
|
monitorProject: null, |
||||
|
faultStartDate: '', |
||||
|
ioResponseDate: '', |
||||
|
faultEndDate: '', |
||||
|
monitorPerson:null, |
||||
|
ioCompany: null, |
||||
|
monitorCompany: null, |
||||
|
remark:'', |
||||
|
id: null, |
||||
|
}); |
||||
|
//下拉框 |
||||
|
const ioCompanyOptions = [ |
||||
|
{ |
||||
|
value: '杭州聚光', |
||||
|
}, |
||||
|
]; |
||||
|
const monitorProjectOptions = [ |
||||
|
{ |
||||
|
value: 'PM2.5', |
||||
|
}, |
||||
|
{ |
||||
|
value: 'O3', |
||||
|
}, |
||||
|
]; |
||||
|
const monitorCompanyOptions = [ |
||||
|
{ |
||||
|
value: '宁波国研信息科技有限公司', |
||||
|
}, |
||||
|
]; |
||||
|
const stationOptions = ref([]); |
||||
|
const monitorPersonOptions = ref([ |
||||
|
{ |
||||
|
value:'吴昊' |
||||
|
}, |
||||
|
{ |
||||
|
value:'梁涛' |
||||
|
} |
||||
|
]); |
||||
|
const showModal = async (type, id, projectId) => { |
||||
|
visible.value = true; |
||||
|
const res = await getStationList(); |
||||
|
stationOptions.value = res; |
||||
|
if (type == 1) { |
||||
|
title.value = '新增'; |
||||
|
} else if (type == 2) { |
||||
|
title.value = '编辑'; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in form) { |
||||
|
form[i] = data[i]; |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
const handleOk = () => { |
||||
|
formRef.value.validate().then((valid) => { |
||||
|
if (valid) { |
||||
|
if (title.value == '新增') { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
delete params.id; |
||||
|
add(params).then((_) => { |
||||
|
message.success('新增成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} else { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
update(params).then((_) => { |
||||
|
message.success('编辑成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
const closeModal = () => { |
||||
|
formRef.value.resetFields(); |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const formRef = ref(); |
||||
|
const rules = { |
||||
|
station: [{ required: true, message: '请选择' }], |
||||
|
monitorProject: [{ required: true, message: '请选择' }], |
||||
|
faultStartDate: [{ required: true, message: '请选择' }], |
||||
|
ioResponseDate: [{ required: true, message: '请选择' }], |
||||
|
faultEndDate: [{ required: true, message: '请选择' }], |
||||
|
ioCompany: [{ required: true, message: '请选择' }], |
||||
|
monitorCompany: [{ required: true, message: '请选择' }], |
||||
|
}; |
||||
|
return { |
||||
|
visible, |
||||
|
title, |
||||
|
form, |
||||
|
showModal, |
||||
|
handleOk, |
||||
|
stationOptions, |
||||
|
monitorProjectOptions, |
||||
|
monitorCompanyOptions, |
||||
|
ioCompanyOptions, |
||||
|
monitorPersonOptions, |
||||
|
closeModal, |
||||
|
formRef, |
||||
|
rules, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-modal-body { |
||||
|
max-width: 600px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,28 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/stationFaultInfo', |
||||
|
list = '/air/stationFaultInfo/list', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
|
@ -0,0 +1,52 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = []; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '站点', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监测项目', |
||||
|
dataIndex: 'monitorProject', |
||||
|
}, |
||||
|
{ |
||||
|
title: '故障开始时间', |
||||
|
dataIndex: 'faultStartDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '故障结束时间', |
||||
|
dataIndex: 'faultEndDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '运维响应时间', |
||||
|
dataIndex: 'ioResponseDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '响应时间跨度', |
||||
|
dataIndex: 'responseDuration', |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
title: '故障时间跨度', |
||||
|
dataIndex: 'faultDuration', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理人员', |
||||
|
dataIndex: 'monitorPerson', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理单位', |
||||
|
dataIndex: 'monitorCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '运维单位', |
||||
|
dataIndex: 'ioCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '备注', |
||||
|
dataIndex: 'remark', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,53 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #toolbar> |
||||
|
<a-button type="primary" @click="showModal(1)">新增</a-button> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<addModal ref="addModalRef" @success="reload()"/> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import addModal from './addModal.vue'; |
||||
|
import { ref } from 'vue'; |
||||
|
defineOptions({ name: 'io' }); |
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '站点运维故障分析', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'io', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
// actionColumn: { |
||||
|
// width: 300, |
||||
|
// title: '操作', |
||||
|
// key: 'action', |
||||
|
// fixed: 'right', |
||||
|
// }, |
||||
|
}); |
||||
|
//新增编辑弹窗 |
||||
|
//详情,跳转 |
||||
|
const addModalRef = ref(); |
||||
|
const showModal = (type: any) => { |
||||
|
addModalRef.value.showModal(type); |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,27 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/webSiteNetDataAnalysis', |
||||
|
list = '/air/webSiteNetDataAnalysis/list', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
@ -0,0 +1,70 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = [ |
||||
|
{ |
||||
|
field: 'area', |
||||
|
label: '所在区域', |
||||
|
component: 'Select', |
||||
|
componentProps: { |
||||
|
options: [], |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
field: 'monitorCompany', |
||||
|
label: '监理公司', |
||||
|
component: 'Select', |
||||
|
componentProps: { |
||||
|
options: [ |
||||
|
{ |
||||
|
value: '宁波国研信息科技有限公司', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '站点', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '所属区域', |
||||
|
dataIndex: 'area', |
||||
|
}, |
||||
|
{ |
||||
|
title: '状态', |
||||
|
dataIndex: 'status', |
||||
|
}, |
||||
|
{ |
||||
|
title: '运维单位', |
||||
|
dataIndex: 'ioCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '最新数据时间', |
||||
|
dataIndex: 'lastTime', |
||||
|
}, |
||||
|
{ |
||||
|
title: '本月应收数据', |
||||
|
dataIndex: 'planIncome', |
||||
|
}, |
||||
|
{ |
||||
|
title: '本月实收数据', |
||||
|
dataIndex: 'actualIncome', |
||||
|
}, |
||||
|
{ |
||||
|
title: '数据完整率', |
||||
|
dataIndex: 'completionRate', |
||||
|
customRender({ record }) { |
||||
|
if (record.actualIncome) { |
||||
|
return (record.actualIncome*100/ record.planIncome).toFixed(2); |
||||
|
} |
||||
|
return null; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理单位', |
||||
|
dataIndex: 'monitorCompany', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,69 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #bodyCell="{ column, record }"> |
||||
|
<template v-if="column && record && column.key === 'action'"> |
||||
|
<a-popconfirm |
||||
|
title="确定要删除吗?" |
||||
|
ok-text="是" |
||||
|
cancel-text="否" |
||||
|
@confirm="handleDelete(record.id)" |
||||
|
> |
||||
|
<a-button type="link">删除</a-button> |
||||
|
</a-popconfirm> |
||||
|
</template> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import {getHangzhouRegions} from '@/api/common/index' |
||||
|
defineOptions({ name: 'net' }); |
||||
|
|
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '站点联网数据分析', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'net', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
// actionColumn: { |
||||
|
// width: 300, |
||||
|
// title: '操作', |
||||
|
// key: 'action', |
||||
|
// fixed: 'right', |
||||
|
// }, |
||||
|
}); |
||||
|
//新增编辑删除 |
||||
|
const handleDelete = async (id: any) => { |
||||
|
await removeByIds([id]); |
||||
|
reload(); |
||||
|
}; |
||||
|
|
||||
|
//详情,跳转 |
||||
|
//下拉框 |
||||
|
const getHangzhouOptions =async()=>{ |
||||
|
const res = await getHangzhouRegions() |
||||
|
formSchemas[0].componentProps.options = res |
||||
|
} |
||||
|
getHangzhouOptions() |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,234 @@ |
|||||
|
<template> |
||||
|
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> |
||||
|
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules"> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="站点名称" name="station"> |
||||
|
<a-select v-model:value="form.station" :options="stationOptions" placeholder="请选择" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监测项目" name="monitorProject"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorProject" |
||||
|
:options="monitorProjectOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="上次校零校准时间" name="toZeroDate"> |
||||
|
<a-date-picker v-model:value="form.toZeroDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="核查开始时间" name="checkStartDate"> |
||||
|
<a-date-picker v-model:value="form.checkStartDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="核查结束时间" name="checkEndDate"> |
||||
|
<a-date-picker v-model:value="form.checkEndDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="实际校零校准次数" name="actualTimes"> |
||||
|
<a-input v-model:value="form.actualTimes" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="应校零校准次数" name="planTimes"> |
||||
|
<a-input v-model:value="form.planTimes" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监理人员" name="monitorPerson"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorPerson" |
||||
|
:options="monitorPersonOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="所属公司" name="ioCompany"> |
||||
|
<a-select |
||||
|
v-model:value="form.ioCompany" |
||||
|
:options="ioCompanyOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监理公司" name="monitorCompany"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorCompany" |
||||
|
:options="monitorCompanyOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="备注" name="remark"> |
||||
|
<a-textarea v-model:value="form.remark" :rows="4" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-form> |
||||
|
</a-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { message } from 'ant-design-vue'; |
||||
|
import { getInfo, add, update } from './api'; |
||||
|
import { getStationList } from '@/api/common/index'; |
||||
|
export default { |
||||
|
setup(props, { emit }) { |
||||
|
const title = ref('新增'); |
||||
|
const visible = ref(false); |
||||
|
const form = reactive({ |
||||
|
station: null, |
||||
|
monitorProject: null, |
||||
|
toZeroDate: '', |
||||
|
checkStartDate: '', |
||||
|
checkEndDate: '', |
||||
|
actualTimes:null, |
||||
|
planTimes:null, |
||||
|
monitorPerson:null, |
||||
|
ioCompany: null, |
||||
|
monitorCompany: null, |
||||
|
remark:'', |
||||
|
id: null, |
||||
|
}); |
||||
|
//下拉框 |
||||
|
const ioCompanyOptions = [ |
||||
|
{ |
||||
|
value: '杭州聚光', |
||||
|
}, |
||||
|
]; |
||||
|
const monitorProjectOptions = [ |
||||
|
{ |
||||
|
value: 'PM2.5', |
||||
|
}, |
||||
|
{ |
||||
|
value: 'O3', |
||||
|
}, |
||||
|
]; |
||||
|
const monitorCompanyOptions = [ |
||||
|
{ |
||||
|
value: '宁波国研信息科技有限公司', |
||||
|
}, |
||||
|
]; |
||||
|
const stationOptions = ref([]); |
||||
|
const monitorPersonOptions = ref([ |
||||
|
{ |
||||
|
value:'吴昊' |
||||
|
}, |
||||
|
{ |
||||
|
value:'梁涛' |
||||
|
} |
||||
|
]); |
||||
|
const showModal = async (type, id, projectId) => { |
||||
|
visible.value = true; |
||||
|
const res = await getStationList(); |
||||
|
stationOptions.value = res; |
||||
|
if (type == 1) { |
||||
|
title.value = '新增'; |
||||
|
} else if (type == 2) { |
||||
|
title.value = '编辑'; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in form) { |
||||
|
form[i] = data[i]; |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
const handleOk = () => { |
||||
|
formRef.value.validate().then((valid) => { |
||||
|
if (valid) { |
||||
|
if (title.value == '新增') { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
delete params.id; |
||||
|
add(params).then((_) => { |
||||
|
message.success('新增成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} else { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
update(params).then((_) => { |
||||
|
message.success('编辑成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
const closeModal = () => { |
||||
|
formRef.value.resetFields(); |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const formRef = ref(); |
||||
|
const rules = { |
||||
|
station: [{ required: true, message: '请选择' }], |
||||
|
monitorProject: [{ required: true, message: '请选择' }], |
||||
|
toZeroDate: [{ required: true, message: '请选择' }], |
||||
|
checkStartDate: [{ required: true, message: '请选择' }], |
||||
|
checkEndDate: [{ required: true, message: '请选择' }], |
||||
|
planTimes: [{ required: true, message: '请输入' }], |
||||
|
actualTimes: [{ required: true, message: '请输入' }], |
||||
|
}; |
||||
|
return { |
||||
|
visible, |
||||
|
title, |
||||
|
form, |
||||
|
showModal, |
||||
|
handleOk, |
||||
|
stationOptions, |
||||
|
monitorProjectOptions, |
||||
|
monitorCompanyOptions, |
||||
|
ioCompanyOptions, |
||||
|
monitorPersonOptions, |
||||
|
closeModal, |
||||
|
formRef, |
||||
|
rules, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-modal-body { |
||||
|
max-width: 600px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,28 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/zeroAdjustmentAnalysis', |
||||
|
list = '/air/zeroAdjustmentAnalysis/list', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
|
@ -0,0 +1,59 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = []; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '站点', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '所属区域', |
||||
|
dataIndex: 'area', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监测项目', |
||||
|
dataIndex: 'monitorProject', |
||||
|
}, |
||||
|
{ |
||||
|
title: '上次校零校准时间', |
||||
|
dataIndex: 'toZeroDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '时间跨度', |
||||
|
dataIndex: 'duration', |
||||
|
}, |
||||
|
{ |
||||
|
title: '核查开始日期', |
||||
|
dataIndex: 'checkStartDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '核查结束日期', |
||||
|
dataIndex: 'checkEndDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '实际校零校准次数', |
||||
|
dataIndex: 'actualTimes', |
||||
|
}, |
||||
|
{ |
||||
|
title: '应校零校准次数', |
||||
|
dataIndex: 'planTimes', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理人员', |
||||
|
dataIndex: 'monitorPerson', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理单位', |
||||
|
dataIndex: 'monitorCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '环保知情人', |
||||
|
dataIndex: 'insider', |
||||
|
}, |
||||
|
{ |
||||
|
title: '备注', |
||||
|
dataIndex: 'remark', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,53 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #toolbar> |
||||
|
<a-button type="primary" @click="showModal(1)">新增</a-button> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<addModal ref="addModalRef" @success="reload()"/> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import addModal from './addModal.vue'; |
||||
|
import { ref } from 'vue'; |
||||
|
defineOptions({ name: 'zero' }); |
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '站点校零校准分析', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'zero', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
// actionColumn: { |
||||
|
// width: 300, |
||||
|
// title: '操作', |
||||
|
// key: 'action', |
||||
|
// fixed: 'right', |
||||
|
// }, |
||||
|
}); |
||||
|
//新增编辑弹窗 |
||||
|
//详情,跳转 |
||||
|
const addModalRef = ref(); |
||||
|
const showModal = (type: any) => { |
||||
|
addModalRef.value.showModal(type); |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,135 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<div id="amapContainer" style="width: 100vw; height: 100vh"> </div> |
||||
|
<a-modal title="站点详情" :open="visible" @cancel="onClose" width="600px"> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">站点名称:</span>{{ detail.station }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">站点地址:</span>{{ detail.address }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">站点经度:</span>{{ detail.longitude }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">站点纬度:</span>{{ detail.latitude }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">运维人员:</span>{{ detail.ioPerson }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">运维公司:</span>{{ detail.ioCompany }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">当前状态:</span>{{ detail.status }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div style="margin-left: -3%"> |
||||
|
<a-button type="link" @click="showDrawer(detail.id)">基本信息</a-button> |
||||
|
</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div style="margin-left: -3%"> |
||||
|
<a-button type="link" @click="handleCheck(detail.id)">核站信息</a-button> |
||||
|
</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-modal> |
||||
|
<detailDrawer ref="detailDrawerRef" /> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { onMounted, reactive, ref } from 'vue'; |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import AMapLoader from '@amap/amap-jsapi-loader'; |
||||
|
import { useGo } from '@/hooks/web/usePage'; |
||||
|
import detailDrawer from '@/views/station/info/detailDrawer.vue'; |
||||
|
import { PageEnum } from '@/enums/pageEnum'; |
||||
|
import { list } from '@/views/station/info/api'; |
||||
|
const points = ref<any>([]) |
||||
|
const getList = async() =>{ |
||||
|
const {rows} = await list({pageNum:1,pageSize:1000}) |
||||
|
console.log(rows) |
||||
|
points.value = rows |
||||
|
} |
||||
|
getList() |
||||
|
const detail = reactive({ |
||||
|
station: '', |
||||
|
address: '', |
||||
|
longitude: '', |
||||
|
latitude: '', |
||||
|
ioCompany: '', |
||||
|
ioPerson: '', |
||||
|
status: '', |
||||
|
id:null, |
||||
|
}); |
||||
|
const visible = ref(false); |
||||
|
const onClose = () => { |
||||
|
visible.value = false; |
||||
|
for (let i in detail) { |
||||
|
detail[i] = ''; |
||||
|
} |
||||
|
}; |
||||
|
//详情,跳转 |
||||
|
const detailDrawerRef = ref(); |
||||
|
const showDrawer = (id: any) => { |
||||
|
detailDrawerRef.value.showDrawer(id); |
||||
|
}; |
||||
|
const go = useGo(); |
||||
|
const handleCheck = (id: any) => { |
||||
|
onClose() |
||||
|
go({ path: '/stationCheck/checkOrder' as PageEnum, query: { stationId:id } }); |
||||
|
}; |
||||
|
onMounted(() => { |
||||
|
AMapLoader.load({ |
||||
|
key: '786a2e7cc6d4be5ba1d6174a0aa10f2b', |
||||
|
version: '2.0', |
||||
|
plugins: [], // 如果需要插件,请在这里添加 |
||||
|
}) |
||||
|
.then((AMap) => { |
||||
|
const map = new AMap.Map('amapContainer', { |
||||
|
zoom: 10, // 初始化地图层级 |
||||
|
center: [119.0426, 29.6000], // 初始化地图中心点坐标 |
||||
|
}); |
||||
|
|
||||
|
// 添加标记点 |
||||
|
points.value.forEach((point) => { |
||||
|
const marker = new AMap.Marker({ |
||||
|
position: new AMap.LngLat(point.longitude, point.latitude), |
||||
|
title: point.station, |
||||
|
}); |
||||
|
|
||||
|
marker.on('click', () => { |
||||
|
for (let i in detail) { |
||||
|
detail[i] = point[i]; |
||||
|
} |
||||
|
visible.value = true; |
||||
|
}); |
||||
|
|
||||
|
map.add(marker); |
||||
|
}); |
||||
|
}) |
||||
|
.catch((e) => { |
||||
|
console.error(e); // 错误处理 |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,32 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/deviceInfo', |
||||
|
list = '/air/deviceInfo/list', |
||||
|
getDeviceStationList = '/air/deviceInfo/getStationList', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
|
||||
|
export function getDeviceStationList() { |
||||
|
return defHttp.get({ url: Api.getDeviceStationList }); |
||||
|
} |
@ -0,0 +1,70 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = [ |
||||
|
{ |
||||
|
field: 'area', |
||||
|
label: '所在区域', |
||||
|
component: 'Select', |
||||
|
componentProps: { |
||||
|
options: [], |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
field: 'station', |
||||
|
label: '站点', |
||||
|
component: 'Select', |
||||
|
componentProps: { |
||||
|
options: [], |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
field: 'monitorCompany', |
||||
|
label: '监理公司', |
||||
|
component: 'Select', |
||||
|
componentProps: { |
||||
|
options: [{ |
||||
|
value:'宁波国研信息科技有限公司' |
||||
|
}], |
||||
|
}, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '站点', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '所属区域', |
||||
|
dataIndex: 'area', |
||||
|
}, |
||||
|
{ |
||||
|
title: '设备名称', |
||||
|
dataIndex: 'device', |
||||
|
}, |
||||
|
{ |
||||
|
title: '设备型号', |
||||
|
dataIndex: 'model', |
||||
|
}, |
||||
|
{ |
||||
|
title: '生产厂家', |
||||
|
dataIndex: 'manufacturer', |
||||
|
}, |
||||
|
{ |
||||
|
title: '生产日期', |
||||
|
dataIndex: 'manufactureDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '序列号', |
||||
|
dataIndex: 'number', |
||||
|
}, |
||||
|
{ |
||||
|
title: '检测物', |
||||
|
dataIndex: 'testSubstance', |
||||
|
}, |
||||
|
{ |
||||
|
title: '状态', |
||||
|
dataIndex: 'status', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,74 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #bodyCell="{ column, record }"> |
||||
|
<template v-if="column && record && column.key === 'action'"> |
||||
|
<a-popconfirm |
||||
|
title="确定要删除吗?" |
||||
|
ok-text="是" |
||||
|
cancel-text="否" |
||||
|
@confirm="handleDelete(record.id)" |
||||
|
> |
||||
|
<a-button type="link">删除</a-button> |
||||
|
</a-popconfirm> |
||||
|
</template> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds,getDeviceStationList } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import {getHangzhouRegions} from '@/api/common/index' |
||||
|
defineOptions({ name: 'device' }); |
||||
|
|
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '设备管理', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'device', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
actionColumn: { |
||||
|
width: 300, |
||||
|
title: '操作', |
||||
|
key: 'action', |
||||
|
fixed: 'right', |
||||
|
}, |
||||
|
}); |
||||
|
//新增编辑删除 |
||||
|
const handleDelete = async (id: any) => { |
||||
|
await removeByIds([id]); |
||||
|
reload(); |
||||
|
}; |
||||
|
|
||||
|
//详情,跳转 |
||||
|
//下拉框 |
||||
|
const getStationOptions =async()=>{ |
||||
|
const res = await getDeviceStationList() |
||||
|
formSchemas[1].componentProps.options = res |
||||
|
} |
||||
|
const getHangzhouOptions =async()=>{ |
||||
|
const res = await getHangzhouRegions() |
||||
|
formSchemas[0].componentProps.options = res |
||||
|
} |
||||
|
getHangzhouOptions() |
||||
|
getStationOptions() |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,179 @@ |
|||||
|
<template> |
||||
|
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">所属项目:</span>{{ detail.projectName }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">所属合同:</span>{{ detail.contractName }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">编号:</span>{{ detail.id }}</div> |
||||
|
</a-col> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">报修人员:</span>{{ detail.repairer }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">状态:</span>{{ statusText(detail.status) }}</div> |
||||
|
</a-col> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">待处理人:</span>{{ detail.handler }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">报修时间:</span>{{ detail.repairTime }}</div> |
||||
|
</a-col> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">是否事故:</span>{{ detail.isAccident }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">故障大类:</span>{{ detail.faultCategory }}</div> |
||||
|
</a-col> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">故障小类:</span>{{ detail.faultSubcategory }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">所属机构:</span>{{ detail.organizationName }}</div> |
||||
|
</a-col> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">响应级别:</span>{{ detail.responseLevel }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">响应时限(小时):</span>{{ detail.responseTime }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">故障地址:</span>{{ detail.faultLocation }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">故障描述:</span>{{ detail.faultDescription }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { message } from 'ant-design-vue'; |
||||
|
import { getInfo, add, update } from './api'; |
||||
|
export default { |
||||
|
setup() { |
||||
|
const title = ref('新增'); |
||||
|
const visible = ref(false); |
||||
|
const form = reactive({ |
||||
|
name: '', |
||||
|
status: null, |
||||
|
remark: '', |
||||
|
unit: '', |
||||
|
price: '', |
||||
|
amount: '', |
||||
|
standards: '', |
||||
|
projectId: null, |
||||
|
id: null, |
||||
|
}); |
||||
|
//下拉框 |
||||
|
const statusOptions = [ |
||||
|
{ |
||||
|
value: 0, |
||||
|
label: '启用', |
||||
|
}, |
||||
|
{ |
||||
|
value: 1, |
||||
|
label: '禁用', |
||||
|
}, |
||||
|
]; |
||||
|
const showModal = async (type, id, projectId) => { |
||||
|
console.log(projectId); |
||||
|
visible.value = true; |
||||
|
if (type == 1) { |
||||
|
title.value = '新增'; |
||||
|
} else if (type == 2) { |
||||
|
title.value = '编辑'; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in form) { |
||||
|
form[i] = data[i]; |
||||
|
} |
||||
|
} |
||||
|
form.projectId = projectId; |
||||
|
}; |
||||
|
|
||||
|
const handleOk = () => { |
||||
|
formRef.value.validate().then((valid) => { |
||||
|
if (valid) { |
||||
|
if (title.value == '新增') { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
delete params.id; |
||||
|
add(params).then((_) => { |
||||
|
message.success('新增成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} else { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
update(params).then((_) => { |
||||
|
message.success('编辑成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
const closeModal = () => { |
||||
|
formRef.value.resetFields(); |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const formRef = ref(); |
||||
|
const rules = { |
||||
|
name: [{ required: true, message: '请输入' }], |
||||
|
status: [{ required: true, message: '请选择' }], |
||||
|
remark: [{ required: true, message: '请输入' }], |
||||
|
unit: [{ required: true, message: '请输入' }], |
||||
|
price: [{ required: true, message: '请输入' }], |
||||
|
amount: [{ required: true, message: '请输入' }], |
||||
|
standards: [{ required: true, message: '请输入' }], |
||||
|
}; |
||||
|
return { |
||||
|
visible, |
||||
|
title, |
||||
|
form, |
||||
|
showModal, |
||||
|
handleOk, |
||||
|
statusOptions, |
||||
|
closeModal, |
||||
|
formRef, |
||||
|
rules, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-modal-body { |
||||
|
max-width: 600px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,28 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/stationInfo', |
||||
|
list = '/air/stationInfo/list', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
|
@ -0,0 +1,70 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = [ |
||||
|
{ |
||||
|
field: 'area', |
||||
|
label: '所在区域', |
||||
|
component: 'Select', |
||||
|
componentProps: { |
||||
|
options: [], |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
field: 'status', |
||||
|
label: '当前状态', |
||||
|
component: 'Select', |
||||
|
componentProps: { |
||||
|
options: [ |
||||
|
{ |
||||
|
value: '正常', |
||||
|
}, |
||||
|
{ |
||||
|
value: '预警', |
||||
|
}, |
||||
|
{ |
||||
|
value: '报警', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '子站名称', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '所属区域', |
||||
|
dataIndex: 'area', |
||||
|
}, |
||||
|
{ |
||||
|
title: '地址', |
||||
|
dataIndex: 'address', |
||||
|
}, |
||||
|
{ |
||||
|
title: '经度', |
||||
|
dataIndex: 'longitude', |
||||
|
}, |
||||
|
{ |
||||
|
title: '纬度', |
||||
|
dataIndex: 'latitude', |
||||
|
}, |
||||
|
{ |
||||
|
title: '运维公司', |
||||
|
dataIndex: 'ioCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '运维人员', |
||||
|
dataIndex: 'ioPerson', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理公司', |
||||
|
dataIndex: 'monitorCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '状态', |
||||
|
dataIndex: 'status', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,122 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<!-- 抽屉组件 --> |
||||
|
<a-drawer |
||||
|
title="基本信息" |
||||
|
placement="right" |
||||
|
:closable="true" |
||||
|
:open="visible" |
||||
|
@close="onClose" |
||||
|
width="600px" |
||||
|
> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">所属区域:</span>{{ detail.area }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">站点地址:</span>{{ detail.address }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">站点经度:</span>{{ detail.longitude }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">站点纬度:</span>{{ detail.latitude }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
|
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">运维公司:</span>{{ detail.ioCompany }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">运维人员:</span>{{ detail.ioPerson }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">监理公司:</span>{{ detail.monitorCompany }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<div><span class="titleLabel">状态:</span>{{ detail.status }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-drawer> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { getInfo } from './api'; |
||||
|
|
||||
|
export default { |
||||
|
setup() { |
||||
|
//抽屉详情 |
||||
|
let detail = reactive({ |
||||
|
area: '', |
||||
|
address: '', |
||||
|
longitude: '', |
||||
|
latitude: '', |
||||
|
ioCompany: '', |
||||
|
ioPerson: '', |
||||
|
monitorCompany: '', |
||||
|
status: '', |
||||
|
}); |
||||
|
|
||||
|
// 打开抽屉的方法 |
||||
|
const visible = ref(false); |
||||
|
const showDrawer = async (id) => { |
||||
|
visible.value = true; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in detail) { |
||||
|
detail[i] = data[i]; |
||||
|
} |
||||
|
|
||||
|
console.log(detail); |
||||
|
}; |
||||
|
// 关闭抽屉的方法 |
||||
|
const onClose = () => { |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
|
||||
|
return { |
||||
|
visible, |
||||
|
showDrawer, |
||||
|
onClose, |
||||
|
detail, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-btn { |
||||
|
margin: 20px; |
||||
|
} |
||||
|
|
||||
|
/* .singerDetail{ |
||||
|
margin-bottom: 10px; |
||||
|
} */ |
||||
|
div { |
||||
|
margin-bottom: 10px; |
||||
|
} |
||||
|
|
||||
|
.timeText { |
||||
|
margin: 0 0 40px 20px; |
||||
|
color: red; |
||||
|
} |
||||
|
|
||||
|
.titleLabel { |
||||
|
color: gray; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,74 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #toolbar> |
||||
|
<!-- <a-button type="primary">导入</a-button> |
||||
|
<a-button type="primary">导出</a-button> --> |
||||
|
<a-button type="link" @click="handleCheck(1)">基本信息</a-button> |
||||
|
</template> |
||||
|
<template #bodyCell="{ column, record }"> |
||||
|
<template v-if="column && record && column.key === 'action'"> |
||||
|
<a-button type="link" @click="showDrawer(record.id)">基本信息</a-button> |
||||
|
<a-button type="link" @click="handleCheck(record.id)">核查情况</a-button> |
||||
|
</template> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<detailDrawer ref="detailDrawerRef" /> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import detailDrawer from './detailDrawer.vue'; |
||||
|
import { ref } from 'vue'; |
||||
|
import { useGo } from '@/hooks/web/usePage'; |
||||
|
import {getHangzhouRegions} from '@/api/common/index' |
||||
|
defineOptions({ name: 'info' }); |
||||
|
import { PageEnum } from '@/enums/pageEnum'; |
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '子站信息管理', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'info', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
actionColumn: { |
||||
|
width: 300, |
||||
|
title: '操作', |
||||
|
key: 'action', |
||||
|
fixed: 'right', |
||||
|
}, |
||||
|
}); |
||||
|
//新增编辑弹窗 |
||||
|
//详情,跳转 |
||||
|
const detailDrawerRef = ref(); |
||||
|
const showDrawer = (id: any) => { |
||||
|
detailDrawerRef.value.showDrawer(id); |
||||
|
}; |
||||
|
const go = useGo(); |
||||
|
const handleCheck = (id: any) => { |
||||
|
go({ path: '/stationCheck/checkOrder' as PageEnum, query: { stationId:id } }); |
||||
|
}; |
||||
|
//下拉框 |
||||
|
const getHangzhouOptions =async()=>{ |
||||
|
const res = await getHangzhouRegions() |
||||
|
formSchemas[0].componentProps.options = res |
||||
|
} |
||||
|
getHangzhouOptions() |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,169 @@ |
|||||
|
<template> |
||||
|
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> |
||||
|
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules"> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="名称" name="name"> |
||||
|
<a-input v-model:value="form.name" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="状态" name="status"> |
||||
|
<a-select v-model:value="form.status" :options="statusOptions" placeholder="请选择" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="规格" name="standards"> |
||||
|
<a-input v-model:value="form.standards" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="单价(元)" name="price"> |
||||
|
<a-input v-model:value="form.price" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="数量" name="amount"> |
||||
|
<a-input v-model:value="form.amount" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="单位" name="unit"> |
||||
|
<a-input v-model:value="form.unit" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="备注" name="remark"> |
||||
|
<a-textarea v-model:value="form.remark" :rows="4" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-form> |
||||
|
</a-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { message } from 'ant-design-vue'; |
||||
|
import { |
||||
|
getInfo, |
||||
|
add, |
||||
|
update, |
||||
|
} from './api'; |
||||
|
export default { |
||||
|
setup(props,{emit}) { |
||||
|
const title = ref('新增'); |
||||
|
const visible = ref(false); |
||||
|
const form = reactive({ |
||||
|
name: '', |
||||
|
status: null, |
||||
|
remark: '', |
||||
|
unit: '', |
||||
|
price: '', |
||||
|
amount: '', |
||||
|
standards: '', |
||||
|
projectId:null, |
||||
|
id:null |
||||
|
}); |
||||
|
//下拉框 |
||||
|
const statusOptions = [ |
||||
|
{ |
||||
|
value: 0, |
||||
|
label: '启用', |
||||
|
}, |
||||
|
{ |
||||
|
value: 1, |
||||
|
label: '禁用', |
||||
|
}, |
||||
|
]; |
||||
|
const showModal = async(type, id,projectId) => { |
||||
|
console.log(projectId) |
||||
|
visible.value = true; |
||||
|
if (type == 1) { |
||||
|
title.value = '新增'; |
||||
|
} else if (type == 2) { |
||||
|
title.value = '编辑'; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in form) { |
||||
|
form[i] = data[i]; |
||||
|
} |
||||
|
} |
||||
|
form.projectId = projectId |
||||
|
}; |
||||
|
|
||||
|
const handleOk = () => { |
||||
|
formRef.value.validate().then((valid) => { |
||||
|
if (valid) { |
||||
|
if (title.value == '新增') { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
delete params.id |
||||
|
add(params).then((_) => { |
||||
|
message.success('新增成功'); |
||||
|
emit('success') |
||||
|
closeModal() |
||||
|
}); |
||||
|
} else { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
update(params).then((_) => { |
||||
|
message.success('编辑成功'); |
||||
|
emit('success') |
||||
|
closeModal() |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
const closeModal = () => { |
||||
|
formRef.value.resetFields(); |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const formRef = ref() |
||||
|
const rules = { |
||||
|
name: [{ required: true, message: '请输入' }], |
||||
|
status: [{ required: true, message: '请选择' }], |
||||
|
remark: [{ required: true, message: '请输入' }], |
||||
|
unit: [{ required: true, message: '请输入' }], |
||||
|
price: [{ required: true, message: '请输入' }], |
||||
|
amount: [{ required: true, message: '请输入' }], |
||||
|
standards: [{ required: true, message: '请输入' }], |
||||
|
}; |
||||
|
return { |
||||
|
visible, |
||||
|
title, |
||||
|
form, |
||||
|
showModal, |
||||
|
handleOk, |
||||
|
statusOptions, |
||||
|
closeModal, |
||||
|
formRef, |
||||
|
rules |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-modal-body { |
||||
|
max-width: 600px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,36 @@ |
|||||
|
import { ID, IDS, commonExport } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/platform/matrialInfo', |
||||
|
list = '/platform/matrialInfo/list', |
||||
|
tree = '/platform/projectCategoryPoint/queryAll', |
||||
|
export = '/workflow/leave/export', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
export function tree() { |
||||
|
return defHttp.get({ url: Api.tree }); |
||||
|
} |
||||
|
export function exportExcel(data: any) { |
||||
|
return commonExport(Api.export, data); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
|
@ -0,0 +1,48 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = [ |
||||
|
{ |
||||
|
field: 'name', |
||||
|
label: '名称', |
||||
|
component: 'Input', |
||||
|
componentProps: { |
||||
|
placeholder: '请输入', |
||||
|
}, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '名称', |
||||
|
dataIndex: 'name', |
||||
|
}, |
||||
|
{ |
||||
|
title: '规格', |
||||
|
dataIndex: 'standards', |
||||
|
}, |
||||
|
{ |
||||
|
title: '单价(元)', |
||||
|
dataIndex: 'price', |
||||
|
}, |
||||
|
{ |
||||
|
title: '数量', |
||||
|
dataIndex: 'amount', |
||||
|
}, |
||||
|
{ |
||||
|
title: '单位', |
||||
|
dataIndex: 'unit', |
||||
|
}, |
||||
|
{ |
||||
|
title: '状态', |
||||
|
dataIndex: 'status', |
||||
|
}, |
||||
|
{ |
||||
|
title: '创建日期', |
||||
|
dataIndex: 'createTime', |
||||
|
}, |
||||
|
{ |
||||
|
title: '备注', |
||||
|
dataIndex: 'remark', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,88 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #toolbar> |
||||
|
<a-button type="primary" @click="showFaultModal">故障上报</a-button> |
||||
|
</template> |
||||
|
<template #bodyCell="{ column, record }"> |
||||
|
<template v-if="column && record && column.key === 'action'"> |
||||
|
<a-button type="link" @click="showSendModal(record.id)">派遣</a-button> |
||||
|
<a-button type="link" @click="showDrawer(record.id)">详情</a-button> |
||||
|
</template> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<faultModal ref="faultModalRef" @success="reload()"/> |
||||
|
<detailDrawer ref="detailDrawerRef" /> |
||||
|
<sendModal ref="sendModalRef" @success="reload()"/> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list,getProjectInfo} from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import faultModal from './faultModal.vue'; |
||||
|
import detailDrawer from './detailDrawer.vue'; |
||||
|
import sendModal from './sendModal.vue'; |
||||
|
import { ref,onActivated } from 'vue'; |
||||
|
|
||||
|
const [registerTable,{reload}] = useTable({ |
||||
|
title: '工单派遣', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'orderSend', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
columns: columns, |
||||
|
actionColumn: { |
||||
|
width: 200, |
||||
|
title: '操作', |
||||
|
key: 'action', |
||||
|
fixed: 'right', |
||||
|
}, |
||||
|
}); |
||||
|
//弹窗内容 |
||||
|
const faultModalRef = ref(); |
||||
|
const showFaultModal = () => { |
||||
|
faultModalRef.value.showModal(); |
||||
|
}; |
||||
|
const sendModalRef = ref() |
||||
|
const showSendModal = (id:any) => { |
||||
|
sendModalRef.value.showModal(id); |
||||
|
}; |
||||
|
//详情抽屉 |
||||
|
const detailDrawerRef = ref(); |
||||
|
const showDrawer = (id: any) => { |
||||
|
detailDrawerRef.value.showDrawer(id); |
||||
|
}; |
||||
|
const projectOptions = ref([]); |
||||
|
const getProjectOptions = async () => { |
||||
|
const res = await getProjectInfo(); |
||||
|
res.forEach((i: any) => { |
||||
|
i.value = i.projectName; |
||||
|
i.label = i.projectName; |
||||
|
}); |
||||
|
projectOptions.value = res; |
||||
|
formSchemas[0].componentProps.options = projectOptions.value; |
||||
|
}; |
||||
|
const getOptions = () => { |
||||
|
getProjectOptions(); |
||||
|
}; |
||||
|
getOptions(); |
||||
|
onActivated(()=>{ |
||||
|
reload() |
||||
|
}) |
||||
|
// 前往审批记录页面 |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,28 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/managementInfo', |
||||
|
list = '/air/managementInfo/list', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
|
@ -0,0 +1,53 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = [ |
||||
|
{ |
||||
|
field: 'area', |
||||
|
label: '所在区域', |
||||
|
component: 'Select', |
||||
|
componentProps: { |
||||
|
options: [], |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
field: '[startDate, endDate]', |
||||
|
label: '核查时间', |
||||
|
component: 'RangePicker', |
||||
|
componentProps: { |
||||
|
format: 'YYYY-MM-DD', |
||||
|
valueFormat: 'YYYY-MM-DD', |
||||
|
}, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '核查时间', |
||||
|
dataIndex: 'checkTime', |
||||
|
}, |
||||
|
{ |
||||
|
title: '子站名称', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '所属区域', |
||||
|
dataIndex: 'area', |
||||
|
}, |
||||
|
{ |
||||
|
title: '状态', |
||||
|
dataIndex: 'status', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理类型', |
||||
|
dataIndex: 'monitorType', |
||||
|
}, |
||||
|
{ |
||||
|
title: '核查人员', |
||||
|
dataIndex: 'checkPerson', |
||||
|
}, |
||||
|
{ |
||||
|
title: '核查得分', |
||||
|
dataIndex: 'checkScore', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,103 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<!-- 抽屉组件 --> |
||||
|
<a-drawer |
||||
|
title="详情" |
||||
|
placement="right" |
||||
|
:closable="true" |
||||
|
:open="visible" |
||||
|
@close="onClose" |
||||
|
width="600px" |
||||
|
> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">子站名称:</span>{{ detail.station }}</div> |
||||
|
</a-col> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">核查时间:</span>{{ detail.checkTime }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">运维公司:</span>{{ detail.ioCompany }}</div> |
||||
|
</a-col> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">核查人员:</span>{{ detail.checkPerson }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">所在区域:</span>{{ detail.area }}</div> |
||||
|
</a-col> |
||||
|
<a-col :span="12"> |
||||
|
<div><span class="titleLabel">核查得分:</span>{{ detail.checkScore }}</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-drawer> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { getInfo } from './api'; |
||||
|
|
||||
|
export default { |
||||
|
setup() { |
||||
|
//抽屉详情 |
||||
|
let detail = reactive({ |
||||
|
station: '', |
||||
|
checkTime: '', |
||||
|
ioCompany: '', |
||||
|
checkPerson: '', |
||||
|
area: '', |
||||
|
checkScore: '', |
||||
|
}); |
||||
|
|
||||
|
// 打开抽屉的方法 |
||||
|
const visible = ref(false); |
||||
|
const showDrawer = async (id) => { |
||||
|
visible.value = true; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in detail) { |
||||
|
detail[i] = data[i]; |
||||
|
} |
||||
|
|
||||
|
console.log(detail); |
||||
|
}; |
||||
|
// 关闭抽屉的方法 |
||||
|
const onClose = () => { |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
|
||||
|
return { |
||||
|
visible, |
||||
|
showDrawer, |
||||
|
onClose, |
||||
|
detail, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-btn { |
||||
|
margin: 20px; |
||||
|
} |
||||
|
|
||||
|
/* .singerDetail{ |
||||
|
margin-bottom: 10px; |
||||
|
} */ |
||||
|
div { |
||||
|
margin-bottom: 10px; |
||||
|
} |
||||
|
|
||||
|
.timeText { |
||||
|
margin: 0 0 40px 20px; |
||||
|
color: red; |
||||
|
} |
||||
|
|
||||
|
.titleLabel { |
||||
|
color: gray; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,75 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #toolbar> |
||||
|
<!-- <a-button type="primary">导入</a-button> |
||||
|
<a-button type="primary">导出</a-button> --> |
||||
|
<a-button type="link" @click="showDrawer(1)">详情</a-button> |
||||
|
</template> |
||||
|
<template #bodyCell="{ column, record }"> |
||||
|
<template v-if="column && record && column.key === 'action'"> |
||||
|
<a-button type="link" @click="showDrawer(record.id)">详情</a-button> |
||||
|
</template> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<detailDrawer ref="detailDrawerRef" /> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import detailDrawer from './detailDrawer.vue'; |
||||
|
import { ref } from 'vue'; |
||||
|
import { getHangzhouRegions } from '@/api/common/index'; |
||||
|
import { useRoute } from 'vue-router'; |
||||
|
defineOptions({ name: 'checkOrder' }); |
||||
|
const route = useRoute(); |
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '现场核查单管理', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'checkOrder', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
beforeFetch(params: any) { |
||||
|
if (route.query.stationId) { |
||||
|
params.stationId = route.query.stationId; |
||||
|
} |
||||
|
|
||||
|
return params; |
||||
|
}, |
||||
|
columns: columns, |
||||
|
actionColumn: { |
||||
|
width: 300, |
||||
|
title: '操作', |
||||
|
key: 'action', |
||||
|
fixed: 'right', |
||||
|
}, |
||||
|
}); |
||||
|
//新增编辑弹窗 |
||||
|
//详情,跳转 |
||||
|
const detailDrawerRef = ref(); |
||||
|
const showDrawer = (id: any) => { |
||||
|
detailDrawerRef.value.showDrawer(id); |
||||
|
}; |
||||
|
const getHangzhouOptions = async () => { |
||||
|
const res = await getHangzhouRegions(); |
||||
|
formSchemas[0].componentProps.options = res; |
||||
|
}; |
||||
|
getHangzhouOptions(); |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,187 @@ |
|||||
|
<template> |
||||
|
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> |
||||
|
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules"> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="站点名称" name="station"> |
||||
|
<a-select v-model:value="form.station" :options="stationOptions" placeholder="请选择" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监测项目" name="monitorProject"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorProject" |
||||
|
:options="monitorProjectOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="开始时间" name="startDate"> |
||||
|
<a-date-picker v-model:value="form.startDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="结束时间" name="endDate"> |
||||
|
<a-date-picker v-model:value="form.endDate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="自动监测数据(mg/m³)" name="autoMonitor"> |
||||
|
<a-input v-model:value="form.autoMonitor" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="手动监测数据(mg/m³)" name="handleMonitor"> |
||||
|
<a-input v-model:value="form.handleMonitor" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监理单位" name="monitorCompany"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorCompany" |
||||
|
:options="monitorCompanyOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="备注" name="remark"> |
||||
|
<a-textarea v-model:value="form.remark" :rows="4" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-form> |
||||
|
</a-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { message } from 'ant-design-vue'; |
||||
|
import { getInfo, add, update } from './api'; |
||||
|
import { getStationList } from '@/api/common/index'; |
||||
|
export default { |
||||
|
setup(props, { emit }) { |
||||
|
const title = ref('新增'); |
||||
|
const visible = ref(false); |
||||
|
const form = reactive({ |
||||
|
station: null, |
||||
|
monitorProject: null, |
||||
|
startDate: '', |
||||
|
endDate: '', |
||||
|
autoMonitor: '', |
||||
|
handleMonitor: '', |
||||
|
monitorCompany: null, |
||||
|
remark: '', |
||||
|
id: null, |
||||
|
}); |
||||
|
//下拉框 |
||||
|
const monitorProjectOptions = [ |
||||
|
{ |
||||
|
value: 'PM2.5', |
||||
|
}, |
||||
|
{ |
||||
|
value: 'PM10', |
||||
|
}, |
||||
|
]; |
||||
|
const monitorCompanyOptions = [ |
||||
|
{ |
||||
|
value: '宁波国研信息科技有限公司', |
||||
|
}, |
||||
|
]; |
||||
|
const stationOptions = ref([]); |
||||
|
const showModal = async (type, id, projectId) => { |
||||
|
visible.value = true; |
||||
|
const res = await getStationList(); |
||||
|
stationOptions.value = res; |
||||
|
if (type == 1) { |
||||
|
title.value = '新增'; |
||||
|
} else if (type == 2) { |
||||
|
title.value = '编辑'; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in form) { |
||||
|
form[i] = data[i]; |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
const handleOk = () => { |
||||
|
formRef.value.validate().then((valid) => { |
||||
|
if (valid) { |
||||
|
if (title.value == '新增') { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
delete params.id; |
||||
|
add(params).then((_) => { |
||||
|
message.success('新增成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} else { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
update(params).then((_) => { |
||||
|
message.success('编辑成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
const closeModal = () => { |
||||
|
formRef.value.resetFields(); |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const formRef = ref(); |
||||
|
const rules = { |
||||
|
station: [{ required: true, message: '请选择' }], |
||||
|
monitorProject: [{ required: true, message: '请选择' }], |
||||
|
startDate: [{ required: true, message: '请选择' }], |
||||
|
endDate: [{ required: true, message: '请选择' }], |
||||
|
monitorCompany: [{ required: true, message: '请选择' }], |
||||
|
autoMonitor: [{ required: true, message: '请输入' }], |
||||
|
handleMonitor: [{ required: true, message: '请输入' }], |
||||
|
}; |
||||
|
return { |
||||
|
visible, |
||||
|
title, |
||||
|
form, |
||||
|
showModal, |
||||
|
handleOk, |
||||
|
monitorProjectOptions, |
||||
|
monitorCompanyOptions, |
||||
|
stationOptions, |
||||
|
closeModal, |
||||
|
formRef, |
||||
|
rules, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-modal-body { |
||||
|
max-width: 600px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,28 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/dataManagementInfo', |
||||
|
list = '/air/dataManagementInfo/list', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
|
@ -0,0 +1,47 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = []; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '子站名称', |
||||
|
dataIndex: 'station', |
||||
|
}, |
||||
|
{ |
||||
|
title: '所属区域', |
||||
|
dataIndex: 'area', |
||||
|
}, |
||||
|
{ |
||||
|
title: '运维公司', |
||||
|
dataIndex: 'ioCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '开始时间', |
||||
|
dataIndex: 'startDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '结束时间', |
||||
|
dataIndex: 'endDate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监测项目', |
||||
|
dataIndex: 'monitorProject', |
||||
|
}, |
||||
|
{ |
||||
|
title: '自动监测(mg/m³)', |
||||
|
dataIndex: 'autoMonitor', |
||||
|
}, |
||||
|
{ |
||||
|
title: '手动监测(mg/m³)', |
||||
|
dataIndex: 'handleMonitor', |
||||
|
}, |
||||
|
{ |
||||
|
title: '相对误差', |
||||
|
dataIndex: 'difference', |
||||
|
}, |
||||
|
{ |
||||
|
title: '结论', |
||||
|
dataIndex: 'result', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,62 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #toolbar> |
||||
|
<a-button type="primary" @click="showModal(1)">新增</a-button> |
||||
|
</template> |
||||
|
<template #bodyCell="{ column, record }"> |
||||
|
<template v-if="column && record && column.key === 'result'"> |
||||
|
<div v-if="record.result == '不合格'" style="color: red">{{ record.result }}</div> |
||||
|
<div v-else>{{ record.result }}</div> |
||||
|
</template> |
||||
|
<template v-if="column && record && column.key === 'difference'"> |
||||
|
{{ record.difference?record.difference:0 }}% |
||||
|
</template> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<addModal ref="addModalRef" @success="reload()"/> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import addModal from './addModal.vue'; |
||||
|
import { ref } from 'vue'; |
||||
|
defineOptions({ name: 'particulate' }); |
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '颗粒物手工数据管理', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'particulate', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
// actionColumn: { |
||||
|
// width: 300, |
||||
|
// title: '操作', |
||||
|
// key: 'action', |
||||
|
// fixed: 'right', |
||||
|
// }, |
||||
|
}); |
||||
|
//新增编辑弹窗 |
||||
|
//详情,跳转 |
||||
|
const addModalRef = ref(); |
||||
|
const showModal = (type: any) => { |
||||
|
addModalRef.value.showModal(type); |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,173 @@ |
|||||
|
<template> |
||||
|
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> |
||||
|
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules"> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="品名" name="name"> |
||||
|
<a-input v-model:value="form.name" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="类型" name="type"> |
||||
|
<a-input v-model:value="form.type" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="型号" name="model"> |
||||
|
<a-input v-model:value="form.model" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="数量" name="amount"> |
||||
|
<a-input v-model:value="form.amount" placeholder="请输入" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="入库时期" name="indate"> |
||||
|
<a-date-picker v-model:value="form.indate" /> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="所属公司" name="ioCompany"> |
||||
|
<a-select |
||||
|
v-model:value="form.ioCompany" |
||||
|
:options="ioCompanyOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
<a-row :gutter="[16, 16]"> |
||||
|
<a-col :span="24"> |
||||
|
<a-form-item label="监理公司" name="monitorCompany"> |
||||
|
<a-select |
||||
|
v-model:value="form.monitorCompany" |
||||
|
:options="monitorCompanyOptions" |
||||
|
placeholder="请选择" |
||||
|
/> |
||||
|
</a-form-item> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</a-form> |
||||
|
</a-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { reactive, ref } from 'vue'; |
||||
|
import { message } from 'ant-design-vue'; |
||||
|
import { getInfo, add, update } from './api'; |
||||
|
import { getStationList } from '@/api/common/index'; |
||||
|
export default { |
||||
|
setup(props, { emit }) { |
||||
|
const title = ref('新增'); |
||||
|
const visible = ref(false); |
||||
|
const form = reactive({ |
||||
|
name: '', |
||||
|
type: '', |
||||
|
model: '', |
||||
|
amount: null, |
||||
|
indate: '', |
||||
|
ioCompany: '', |
||||
|
monitorCompany: null, |
||||
|
id: null, |
||||
|
}); |
||||
|
//下拉框 |
||||
|
const monitorCompanyOptions = [ |
||||
|
{ |
||||
|
value: '宁波国研信息科技有限公司', |
||||
|
}, |
||||
|
]; |
||||
|
const ioCompanyOptions = [ |
||||
|
{ |
||||
|
value: '杭州聚光', |
||||
|
}, |
||||
|
]; |
||||
|
const stationOptions = ref([]); |
||||
|
const showModal = async (type, id, projectId) => { |
||||
|
visible.value = true; |
||||
|
if (type == 1) { |
||||
|
title.value = '新增'; |
||||
|
} else if (type == 2) { |
||||
|
title.value = '编辑'; |
||||
|
const data = await getInfo(id); |
||||
|
for (let i in form) { |
||||
|
form[i] = data[i]; |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
const handleOk = () => { |
||||
|
formRef.value.validate().then((valid) => { |
||||
|
if (valid) { |
||||
|
if (title.value == '新增') { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
delete params.id; |
||||
|
add(params).then((_) => { |
||||
|
message.success('新增成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} else { |
||||
|
let params = {}; |
||||
|
for (let i in form) { |
||||
|
params[i] = form[i]; |
||||
|
} |
||||
|
update(params).then((_) => { |
||||
|
message.success('编辑成功'); |
||||
|
emit('success'); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
const closeModal = () => { |
||||
|
formRef.value.resetFields(); |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const formRef = ref(); |
||||
|
const rules = { |
||||
|
name: [{ required: true, message: '请输入' }], |
||||
|
type: [{ required: true, message: '请输入' }], |
||||
|
model: [{ required: true, message: '请输入' }], |
||||
|
amount: [{ required: true, message: '请输入' }], |
||||
|
indate: [{ required: true, message: '请选择' }], |
||||
|
monitorCompany: [{ required: true, message: '请选择' }], |
||||
|
ioCompany: [{ required: true, message: '请选择' }], |
||||
|
}; |
||||
|
return { |
||||
|
visible, |
||||
|
title, |
||||
|
form, |
||||
|
showModal, |
||||
|
handleOk, |
||||
|
monitorCompanyOptions, |
||||
|
ioCompanyOptions, |
||||
|
closeModal, |
||||
|
formRef, |
||||
|
rules, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/* 可选样式调整 */ |
||||
|
.ant-modal-body { |
||||
|
max-width: 600px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,28 @@ |
|||||
|
import { ID, IDS } from '@/api/base'; |
||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
enum Api { |
||||
|
root = '/air/partsInfo', |
||||
|
list = '/air/partsInfo/list', |
||||
|
} |
||||
|
|
||||
|
export function list(params: any) { |
||||
|
return defHttp.get({ url: Api.list, params }); |
||||
|
} |
||||
|
|
||||
|
export function getInfo(id: ID) { |
||||
|
return defHttp.get({ url: `${Api.root}/${id}` }); |
||||
|
} |
||||
|
|
||||
|
export function add(data: any) { |
||||
|
return defHttp.post({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function update(data: any) { |
||||
|
return defHttp.put({ url: Api.root, data }); |
||||
|
} |
||||
|
|
||||
|
export function removeByIds(ids: IDS) { |
||||
|
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); |
||||
|
} |
||||
|
|
@ -0,0 +1,35 @@ |
|||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
|
||||
|
export const formSchemas: FormSchema[] = []; |
||||
|
|
||||
|
export const columns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '品名', |
||||
|
dataIndex: 'name', |
||||
|
}, |
||||
|
{ |
||||
|
title: '类型', |
||||
|
dataIndex: 'type', |
||||
|
}, |
||||
|
{ |
||||
|
title: '型号', |
||||
|
dataIndex: 'model', |
||||
|
}, |
||||
|
{ |
||||
|
title: '数量', |
||||
|
dataIndex: 'amount', |
||||
|
}, |
||||
|
{ |
||||
|
title: '入库日期', |
||||
|
dataIndex: 'indate', |
||||
|
}, |
||||
|
{ |
||||
|
title: '运维公司', |
||||
|
dataIndex: 'ioCompany', |
||||
|
}, |
||||
|
{ |
||||
|
title: '监理公司', |
||||
|
dataIndex: 'monitorCompany', |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,53 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #toolbar> |
||||
|
<a-button type="primary" @click="showModal(1)">新增</a-button> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<addModal ref="addModalRef" @success="reload()"/> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { list, removeByIds } from './api'; |
||||
|
import { formSchemas, columns } from './data'; |
||||
|
import addModal from './addModal.vue'; |
||||
|
import { ref } from 'vue'; |
||||
|
defineOptions({ name: 'standby' }); |
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '备品备件列表', |
||||
|
api: list, |
||||
|
showIndexColumn: true, |
||||
|
rowKey: 'id', |
||||
|
useSearchForm: true, |
||||
|
formConfig: { |
||||
|
schemas: formSchemas, |
||||
|
name: 'standby', |
||||
|
baseColProps: { |
||||
|
xs: 24, |
||||
|
sm: 24, |
||||
|
md: 24, |
||||
|
lg: 6, |
||||
|
}, |
||||
|
}, |
||||
|
immediate: true, |
||||
|
columns: columns, |
||||
|
// actionColumn: { |
||||
|
// width: 300, |
||||
|
// title: '操作', |
||||
|
// key: 'action', |
||||
|
// fixed: 'right', |
||||
|
// }, |
||||
|
}); |
||||
|
//新增编辑弹窗 |
||||
|
//详情,跳转 |
||||
|
const addModalRef = ref(); |
||||
|
const showModal = (type: any) => { |
||||
|
addModalRef.value.showModal(type); |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
Loading…
Reference in new issue