diff --git a/.env b/.env index ad74e4a..62a032e 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ VITE_PORT = 3100 # 网站标题 -VITE_GLOB_APP_TITLE = 汾西面源污染在线监测平台 +VITE_GLOB_APP_TITLE = 面源污染在线监测平台 VITE_GLOB_APP_ZY = 123123 diff --git a/src/hooks/system/useListPage.ts b/src/hooks/system/useListPage.ts index a8c6152..ee5c23f 100644 --- a/src/hooks/system/useListPage.ts +++ b/src/hooks/system/useListPage.ts @@ -97,7 +97,6 @@ export function useListPage(options: ListPageOptions) { if (selectedRowKeys.value && selectedRowKeys.value.length > 0) { paramsForm['selections'] = selectedRowKeys.value.join(','); } - console.log() return handleExportXls(title as string, realUrl, filterObj(paramsForm)); //update-end---author:wangshuai ---date:20220411 for:导出新增自定义参数-------------- } else { diff --git a/src/locales/lang/zh-CN/sys.ts b/src/locales/lang/zh-CN/sys.ts index 4affd2b..2ff5ae9 100644 --- a/src/locales/lang/zh-CN/sys.ts +++ b/src/locales/lang/zh-CN/sys.ts @@ -67,8 +67,8 @@ export default { signUpFormTitle: '注册', forgetFormTitle: '重置密码', - signInTitle: '汾西面源污染在线监测平台', - signInDesc: '汾西面源污染在线监测平台', + signInTitle: '面源污染在线监测平台', + signInDesc: '面源污染在线监测平台', policy: '隐私政策', scanSign: `扫码后,即可完成登录`, scanSuccess: `扫码成功,登录中`, diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index fe9c1e4..8560452 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -235,7 +235,7 @@ function createAxios(opt?: Partial) { // authentication schemes,e.g: Bearer // authenticationScheme: 'Bearer', authenticationScheme: '', - timeout: 10 * 1000, + timeout: 30000, // 基础接口地址 // baseURL: globSetting.apiUrl, headers: { 'Content-Type': ContentTypeEnum.JSON }, diff --git a/src/views/appmana/alert/SurvAlertRecord.data.ts b/src/views/appmana/alert/SurvAlertRecord.data.ts index 4746cf6..492118d 100644 --- a/src/views/appmana/alert/SurvAlertRecord.data.ts +++ b/src/views/appmana/alert/SurvAlertRecord.data.ts @@ -2,51 +2,171 @@ import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; +import {optionsListApi} from "/@/api/demo/select"; +import {getStationList} from "/@/views/appmana/station/SurvStationInfo.api"; +import {getDeviceList} from "/@/views/appmana/deploy/SurvDeviceDeploy.api"; //列表数据 export const columns: BasicColumn[] = [ { title: '预警时间', - align: "center", + align: 'center', dataIndex: 'alertTime' }, { - title: '监测项', - align: "center", + title: '指标', + align: 'center', dataIndex: 'itemName' }, { - title: '预警内容', - align: "center", - dataIndex: 'alertContent' + title: '阈值', + align: 'center', + dataIndex: 'normalValue' }, { - title: '预警所属单位', - align: "center", - dataIndex: 'corpId' + title: '监测值', + align: 'center', + dataIndex: 'survValue' }, { - title: '触发预警站点', - align: "center", - dataIndex: 'stationName' + title: '单位', + align: 'center', + dataIndex: 'survUnit' }, { - title: '触发预警设备编号', - align: "center", - dataIndex: 'deployCode' + title: '站点位置', + align: 'center', + dataIndex: 'fullDeviceName' }, + { + title: '严重程度', + align: 'center', + dataIndex: 'readStatus', + customRender: ({text}) => { + const color = (text === 'low' ? 'blue' : text == 'high' ? 'red' : 'gray'); + const txt = (text === 'low' ? '低' : text == 'high' ? '高' : ''); + return render.renderTag(txt, color); + } + }, + // { + // title: '预警内容', + // align: 'center', + // dataIndex: 'alertContent' + // }, + // { + // title: '预警所属单位', + // align: 'center', + // dataIndex: 'corpId' + // }, + // { + // title: '触发预警站点', + // align: 'center', + // dataIndex: 'stationName' + // }, + // { + // title: '触发预警设备编号', + // align: 'center', + // dataIndex: 'deployCode' + // }, - { - title: '推送状态', - align: "center", - dataIndex: 'pushStatus', - customRender: ({ text }) => { - return render.renderDict(text, 'surv_push_status'); - }, - }, + // { + // title: '推送状态', + // align: 'center', + // dataIndex: 'pushStatus', + // customRender: ({ text }) => { + // return render.renderDict(text, 'surv_push_status'); + // }, + // }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ + { + field: 'stationCdoe', + component: 'ApiSelect', + label: '选择监测站', + componentProps: { + // more details see /src/components/Form/src/components/ApiSelect.vue + api: getStationList, + params: { + id: 1, + }, + resultField: 'list', + // use name as label + labelField: 'stationName', + // use id as value + valueField: 'stationCode', + // not request untill to select + immediate: false, + onChange: (e) => { + console.log('selected:', e); + }, + // atfer request callback + onOptionsChange: (options) => { + console.log('get options', options.length, options); + }, + }, + colProps: { + span: 8, + }, + }, + { + field: 'deployId', + component: 'ApiSelect', + label: '选择设备', + componentProps: { + // more details see /src/components/Form/src/components/ApiSelect.vue + api: getDeviceList, + params: { + id: 1, + deployTypes: ["soil"] + }, + resultField: 'list', + // use name as label + labelField: 'deployDes', + // use id as value + valueField: 'id', + // not request untill to select + immediate: false, + onChange: (e) => { + console.log('selected:', e); + }, + // atfer request callback + onOptionsChange: (options) => { + console.log('get options', options.length, options); + }, + }, + colProps: { + span: 8, + }, + }, + { + field: 'alertTime', + label: '预警日期', + component: 'RangePicker', + colProps: { span: 8 }, + componentProps: { + picker: 'date', + valueFormat: 'YYYY-MM-DD', + }, + }, + { + field: 'readStatus', + label: '预警级别', + component: 'Select', + colProps: { span: 8 }, + componentProps: { + options: [ + { + label: '高', + value: 'high', + }, + { + label: '低 ', + value: 'low', + }, + ], + }, + }, ]; //表单数据 diff --git a/src/views/appmana/alert/SurvAlertRecordList.vue b/src/views/appmana/alert/SurvAlertRecordList.vue index 7515fb3..89a36a4 100644 --- a/src/views/appmana/alert/SurvAlertRecordList.vue +++ b/src/views/appmana/alert/SurvAlertRecordList.vue @@ -1,33 +1,5 @@