32 changed files with 1645 additions and 103 deletions
@ -0,0 +1,13 @@ |
|||
import { defHttp } from '@/utils/http/axios'; |
|||
|
|||
enum Api { |
|||
getHangzhouRegions = '/air/stationInfo/getHangzhouRegions', |
|||
getStationList = '/air/deviceInfo/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 { Button } from './Button'; |
|||
import { Input, Layout } from 'ant-design-vue'; |
|||
// import { Button } from './Button';
|
|||
// import { Input, Layout } from 'ant-design-vue';
|
|||
import VXETable from 'vxe-table'; |
|||
import Antd from 'ant-design-vue'; |
|||
|
|||
export function registerGlobComp(app: App) { |
|||
app.use(Input).use(Button).use(Layout).use(VXETable); |
|||
app.use(Antd).use(VXETable); |
|||
} |
|||
|
@ -0,0 +1,110 @@ |
|||
<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="plan"> |
|||
<a-select v-model:value="form.plan" :options="planOptions" 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({ |
|||
plan: null, |
|||
ioPerson: null, |
|||
}); |
|||
//下拉框 |
|||
const planOptions = ref([]) |
|||
const ioPersonOptions = 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 = { |
|||
plan: [{ required: true, message: '请选择' }], |
|||
ioPerson: [{ required: true, message: '请选择' }], |
|||
}; |
|||
return { |
|||
visible, |
|||
title, |
|||
form, |
|||
showModal, |
|||
handleOk, |
|||
planOptions, |
|||
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/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,35 @@ |
|||
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: 'area', |
|||
}, |
|||
{ |
|||
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" /> |
|||
</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,141 @@ |
|||
<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="planType"> |
|||
<a-select |
|||
v-model:value="form.planType" |
|||
:options="planTypeOptions" |
|||
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, |
|||
planType: null, |
|||
}); |
|||
//下拉框 |
|||
const planTypeOptions = [ |
|||
{ |
|||
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: '请选择' }], |
|||
planType: [{ required: true, message: '请选择' }], |
|||
}; |
|||
return { |
|||
visible, |
|||
title, |
|||
form, |
|||
showModal, |
|||
handleOk, |
|||
planTypeOptions, |
|||
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/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,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" /> |
|||
</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,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: 'superviseType', |
|||
}, |
|||
{ |
|||
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,53 @@ |
|||
<template> |
|||
<PageWrapper dense> |
|||
<BasicTable @register="registerTable"> |
|||
<template #toolbar> |
|||
<a-button type="primary" @click="showModal(1)">新增</a-button> |
|||
</template> |
|||
</BasicTable> |
|||
<addModal ref="addModalRef" /> |
|||
</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="monitorCompanyOptions" |
|||
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="ioCompanyOptions" |
|||
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/lis', |
|||
} |
|||
|
|||
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" /> |
|||
</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