Compare commits

...

13 Commits

  1. 2
      .env
  2. 1
      package.json
  3. 13
      src/api/common/index.ts
  4. 7
      src/components/registerGlobComp.ts
  5. 2
      src/locales/lang/zh-CN/sys.json
  6. 4
      src/store/modules/permission.ts
  7. 6
      src/views/auth/login/Login.vue
  8. 119
      src/views/checkManage/order/addModal.vue
  9. 32
      src/views/checkManage/order/api.ts
  10. 31
      src/views/checkManage/order/data.ts
  11. 53
      src/views/checkManage/order/index.vue
  12. 163
      src/views/checkManage/plan/addModal.vue
  13. 28
      src/views/checkManage/plan/api.ts
  14. 43
      src/views/checkManage/plan/data.ts
  15. 53
      src/views/checkManage/plan/index.vue
  16. 27
      src/views/ioManage/register/api.ts
  17. 53
      src/views/ioManage/register/data.ts
  18. 69
      src/views/ioManage/register/index.vue
  19. 209
      src/views/onlineAnalysis/arguments/addModal.vue
  20. 28
      src/views/onlineAnalysis/arguments/api.ts
  21. 39
      src/views/onlineAnalysis/arguments/data.ts
  22. 53
      src/views/onlineAnalysis/arguments/index.vue
  23. 218
      src/views/onlineAnalysis/io/addModal.vue
  24. 28
      src/views/onlineAnalysis/io/api.ts
  25. 52
      src/views/onlineAnalysis/io/data.ts
  26. 53
      src/views/onlineAnalysis/io/index.vue
  27. 27
      src/views/onlineAnalysis/net/api.ts
  28. 70
      src/views/onlineAnalysis/net/data.ts
  29. 69
      src/views/onlineAnalysis/net/index.vue
  30. 234
      src/views/onlineAnalysis/zero/addModal.vue
  31. 28
      src/views/onlineAnalysis/zero/api.ts
  32. 59
      src/views/onlineAnalysis/zero/data.ts
  33. 53
      src/views/onlineAnalysis/zero/index.vue
  34. 135
      src/views/situation/index.vue
  35. 32
      src/views/station/device/api.ts
  36. 70
      src/views/station/device/data.ts
  37. 74
      src/views/station/device/index.vue
  38. 179
      src/views/station/info/addModal.vue
  39. 28
      src/views/station/info/api.ts
  40. 70
      src/views/station/info/data.ts
  41. 122
      src/views/station/info/detailDrawer.vue
  42. 74
      src/views/station/info/index.vue
  43. 169
      src/views/station/test/addModal.vue
  44. 36
      src/views/station/test/api.ts
  45. 48
      src/views/station/test/data.ts
  46. 88
      src/views/station/test/index.vue
  47. 28
      src/views/stationCheck/checkOrder/api.ts
  48. 53
      src/views/stationCheck/checkOrder/data.ts
  49. 103
      src/views/stationCheck/checkOrder/detailDrawer.vue
  50. 75
      src/views/stationCheck/checkOrder/index.vue
  51. 187
      src/views/stationCheck/particulate/addModal.vue
  52. 28
      src/views/stationCheck/particulate/api.ts
  53. 47
      src/views/stationCheck/particulate/data.ts
  54. 62
      src/views/stationCheck/particulate/index.vue
  55. 173
      src/views/stationCheck/standby/addModal.vue
  56. 28
      src/views/stationCheck/standby/api.ts
  57. 35
      src/views/stationCheck/standby/data.ts
  58. 53
      src/views/stationCheck/standby/index.vue
  59. 2
      vite.config.ts

2
.env

@ -1,2 +1,2 @@
# spa-title
VITE_GLOB_APP_TITLE = Plus Admin
VITE_GLOB_APP_TITLE = '国研空气质量监控系统运维监理及考核平台'

1
package.json

@ -68,6 +68,7 @@
}
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@ant-design/icons-vue": "7.0.1",
"@iconify/iconify": "3.1.1",
"@logicflow/core": "1.2.26",

13
src/api/common/index.ts

@ -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 });
}

7
src/components/registerGlobComp.ts

@ -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);
}

2
src/locales/lang/zh-CN/sys.json

@ -65,7 +65,7 @@
"qrSignInFormTitle": "二维码登录",
"signUpFormTitle": "注册",
"forgetFormTitle": "重置密码",
"signInTitle": "开箱即用的中后台管理系统",
"signInTitle": "国研空气质量监控系统运维监理及考核平台",
"signInDesc": "输入您的个人详细信息开始使用!",
"policy": "我同意xxx隐私政策",
"scanSign": "扫码后点击\"确认\",即可完成登录",

4
src/store/modules/permission.ts

@ -257,9 +257,9 @@ export const usePermissionStore = defineStore({
// 后台路由到菜单结构
// 这里是本地路由 需要在这里添加 或者直接在route/routes/index里添加
const customRoutes = [dashboard, about];
const customRoutes = [dashboard];
// 根据顺序排序 即 仪表盘 后台路由 关于
const backMenuList = transformRouteToMenu([dashboard, ...routeList, about]);
const backMenuList = transformRouteToMenu([dashboard, ...routeList]);
this.setBackMenuList(backMenuList);
// remove meta.ignoreRoute item

6
src/views/auth/login/Login.vue

@ -16,7 +16,7 @@
<div class="container relative h-full py-2 mx-auto sm:px-10">
<div class="flex h-full">
<div class="hidden min-h-full pl-4 mr-4 xl:flex xl:flex-col xl:w-6/12">
<AppLogo class="-enter-x" />
<!-- <AppLogo class="-enter-x" /> -->
<div class="my-auto">
<img
:alt="title"
@ -26,9 +26,9 @@
<div class="mt-10 font-medium text-white -enter-x">
<span class="inline-block mt-4 text-3xl"> {{ t('sys.login.signInTitle') }}</span>
</div>
<div class="mt-5 font-normal text-white dark:text-gray-500 -enter-x">
<!-- <div class="mt-5 font-normal text-white dark:text-gray-500 -enter-x">
{{ t('sys.login.signInDesc') }}
</div>
</div> -->
</div>
</div>
<div class="flex w-full h-full py-5 xl:h-auto xl:py-0 xl:my-0 xl:w-6/12">

119
src/views/checkManage/order/addModal.vue

@ -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>

32
src/views/checkManage/order/api.ts

@ -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 });
}

31
src/views/checkManage/order/data.ts

@ -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',
},
];

53
src/views/checkManage/order/index.vue

@ -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>

163
src/views/checkManage/plan/addModal.vue

@ -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>

28
src/views/checkManage/plan/api.ts

@ -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(',')}` });
}

43
src/views/checkManage/plan/data.ts

@ -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',
},
];

53
src/views/checkManage/plan/index.vue

@ -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>

27
src/views/ioManage/register/api.ts

@ -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(',')}` });
}

53
src/views/ioManage/register/data.ts

@ -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',
},
];

69
src/views/ioManage/register/index.vue

@ -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>

209
src/views/onlineAnalysis/arguments/addModal.vue

@ -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>

28
src/views/onlineAnalysis/arguments/api.ts

@ -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(',')}` });
}

39
src/views/onlineAnalysis/arguments/data.ts

@ -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',
},
];

53
src/views/onlineAnalysis/arguments/index.vue

@ -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>

218
src/views/onlineAnalysis/io/addModal.vue

@ -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>

28
src/views/onlineAnalysis/io/api.ts

@ -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(',')}` });
}

52
src/views/onlineAnalysis/io/data.ts

@ -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',
},
];

53
src/views/onlineAnalysis/io/index.vue

@ -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>

27
src/views/onlineAnalysis/net/api.ts

@ -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(',')}` });
}

70
src/views/onlineAnalysis/net/data.ts

@ -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',
},
];

69
src/views/onlineAnalysis/net/index.vue

@ -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>

234
src/views/onlineAnalysis/zero/addModal.vue

@ -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>

28
src/views/onlineAnalysis/zero/api.ts

@ -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(',')}` });
}

59
src/views/onlineAnalysis/zero/data.ts

@ -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',
},
];

53
src/views/onlineAnalysis/zero/index.vue

@ -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>

135
src/views/situation/index.vue

@ -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>

32
src/views/station/device/api.ts

@ -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 });
}

70
src/views/station/device/data.ts

@ -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',
},
];

74
src/views/station/device/index.vue

@ -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>

179
src/views/station/info/addModal.vue

@ -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>

28
src/views/station/info/api.ts

@ -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(',')}` });
}

70
src/views/station/info/data.ts

@ -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',
},
];

122
src/views/station/info/detailDrawer.vue

@ -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>

74
src/views/station/info/index.vue

@ -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>

169
src/views/station/test/addModal.vue

@ -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>

36
src/views/station/test/api.ts

@ -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(',')}` });
}

48
src/views/station/test/data.ts

@ -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',
},
];

88
src/views/station/test/index.vue

@ -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>

28
src/views/stationCheck/checkOrder/api.ts

@ -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(',')}` });
}

53
src/views/stationCheck/checkOrder/data.ts

@ -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',
},
];

103
src/views/stationCheck/checkOrder/detailDrawer.vue

@ -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>

75
src/views/stationCheck/checkOrder/index.vue

@ -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>

187
src/views/stationCheck/particulate/addModal.vue

@ -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>

28
src/views/stationCheck/particulate/api.ts

@ -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(',')}` });
}

47
src/views/stationCheck/particulate/data.ts

@ -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',
},
];

62
src/views/stationCheck/particulate/index.vue

@ -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>

173
src/views/stationCheck/standby/addModal.vue

@ -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>

28
src/views/stationCheck/standby/api.ts

@ -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(',')}` });
}

35
src/views/stationCheck/standby/data.ts

@ -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',
},
];

53
src/views/stationCheck/standby/index.vue

@ -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>

2
vite.config.ts

@ -17,7 +17,7 @@ export default defineApplicationConfig({
server: {
proxy: {
'/basic-api': {
target: 'http://localhost:8080',
target: 'http://10.1.21.250:8084',
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),

Loading…
Cancel
Save