From 66b82b93f6510b079061b04bc964ddc5579b6268 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Thu, 18 May 2023 16:21:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E6=9E=84=E7=89=A9&=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=E8=AE=A1=E5=88=92&=E7=94=A8=E6=88=B7=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/assets/images/show_map.svg | 6 + .../src/layout/containers/layout/index.less | 81 ++++++ .../organization/components/userModal.js | 63 ++--- .../patrolManage/components/planModal.js | 234 ++++++++++-------- .../components/projectAddModel.js | 66 ++--- 5 files changed, 288 insertions(+), 162 deletions(-) create mode 100644 web/client/assets/images/show_map.svg diff --git a/web/client/assets/images/show_map.svg b/web/client/assets/images/show_map.svg new file mode 100644 index 0000000..0f66a82 --- /dev/null +++ b/web/client/assets/images/show_map.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/web/client/src/layout/containers/layout/index.less b/web/client/src/layout/containers/layout/index.less index 5cfe74f..74d47e0 100644 --- a/web/client/src/layout/containers/layout/index.less +++ b/web/client/src/layout/containers/layout/index.less @@ -20,11 +20,92 @@ .ant-pagination-item { border-color: #fff; } + .ant-pagination-item-active { border-color: #EAF2FF; background: #EAF2FF; } + .ant-pagination-item-link { border-color: #fff !important; } +} + +.global-modal { + .ant-modal-footer { + text-align: center; + + .ant-btn { + margin: 0 19px !important; + border-radius: 3px; + } + + .ant-btn-primary { + background: #006BE3; + border-color: #006BE3; + } + + .ant-btn-primary:hover { + background: #1890ff; + border-color: #1890ff; + } + } + + .ant-form-item-control-input { + background-color: #F9F9F9; + border-radius: 3px; + } + + .ant-select-disabled, + .ant-input-disabled, + .ant-picker.ant-picker-disabled { + background-color: #e5e5e5 !important; + } + + .ant-input-group-addon { + border: none; + background-color: #006BE3; + + .ant-select-selection-item { + color: #fff; + } + + .ant-select-selection-item::after { + color: #fff; + } + } +} + +.global-modal-form { + .ant-modal-footer div { + justify-content: center !important; + + .ant-btn { + margin: 0 19px !important; + border-radius: 3px; + } + + .ant-btn-primary { + background: #006BE3; + border-color: #006BE3; + } + + .ant-btn-primary:hover { + background: #1890ff; + border-color: #1890ff; + } + } + + .ant-input-affix-wrapper { + border: none; + background-color: #F9F9F9; + + .ant-input { + background-color: #F9F9F9; + } + } + .ant-select-selector { + border: none !important; + background-color: #F9F9F9 !important; + } } \ No newline at end of file diff --git a/web/client/src/sections/organization/components/userModal.js b/web/client/src/sections/organization/components/userModal.js index d048aa8..0218cef 100644 --- a/web/client/src/sections/organization/components/userModal.js +++ b/web/client/src/sections/organization/components/userModal.js @@ -1,10 +1,10 @@ import React from 'react'; import { connect } from 'react-redux'; import { Spin, Card, Modal, TreeSelect, message } from 'antd'; -import ProForm, { ProFormText, ModalForm, ProFormSwitch, ProFormTreeSelect ,ProFormSelect} from '@ant-design/pro-form'; +import ProForm, { ProFormText, ModalForm, ProFormSwitch, ProFormTreeSelect, ProFormSelect } from '@ant-design/pro-form'; const UserModal = (props) => { - const { visible, modalType, depData, onVisibleChange, onConfirm, editData ,tableList} = props + const { visible, modalType, depData, onVisibleChange, onConfirm, editData, tableList } = props const reg_tel = /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/; const onFinish = (values) => { if (onConfirm) { @@ -20,6 +20,12 @@ const UserModal = (props) => { return ( { { { /> < ProFormText name={['contract', 'post']} - width="md" + colProps={{ md: 12, xl: 12 }} label="职位" // required placeholder="请输入职位" @@ -135,26 +142,26 @@ const UserModal = (props) => { }} expandedKeys={["title"]} /> */} - handleChange(val), - // }} - request={async () => { - console.log(tableList); - const opts = tableList?.map(i=>({label:i.name,value:i.id})) - return opts - }} - placeholder="请选择结构物" - rules={[{ required: true, message: '结构物不能为空' }]} - /> + handleChange(val), + // }} + request={async () => { + console.log(tableList); + const opts = tableList?.map(i => ({ label: i.name, value: i.id })) + return opts + }} + placeholder="请选择结构物" + rules={[{ required: true, message: '结构物不能为空' }]} + /> - { /> - {modalType == 'edit' ? null : { { min: 6, message: '请填写至少6位密码' }, ]} />} - - - u.id); const filterUsers = curRecord?.users?.filter(u => userListIds.includes(u.id)); const nextUserIds = filterUsers?.map(u => u.id); - form.setFieldsValue({ + form.setFieldsValue({ userIds: nextUserIds, userDept: [...new Set(filterUsers?.map(u => u.department?.name))].join() }); @@ -52,9 +53,10 @@ const PlanModal = ({ visible, onCreate, onCancel, dispatch, userLoading, userLis }, [structureList]) const selectAfter = ( - { - dispatch(positionList({ projectId })).then(res => { - if (res.success) { - setPoints(res.payload.data?.rows) - setPointOpt(res.payload.data?.rows[0]?.points?.map(p => ({ label: p.name, value: p.id }))) - } - }) - form.setFieldsValue({ userIds: [], userDept: [] }); - setUserOpt(userList?.filter(f => f.structure?.includes(projectId))?.map(u => ({ label: u.name, value: u.id }))) - }} /> - - - - - - - - - - - - { + dispatch(positionList({ projectId })).then(res => { + if (res.success) { + setPoints(res.payload.data?.rows) + setPointOpt(res.payload.data?.rows[0]?.points?.map(p => ({ label: p.name, value: p.id }))) + } + }) + form.setFieldsValue({ userIds: [], userDept: [] }); + setUserOpt(userList?.filter(f => f.structure?.includes(projectId))?.map(u => ({ label: u.name, value: u.id }))) + }} /> + + + + + +
+ + + +
+
+ + + + + + diff --git a/web/client/src/sections/projectRegime/components/projectAddModel.js b/web/client/src/sections/projectRegime/components/projectAddModel.js index 48795fd..65bcb2f 100644 --- a/web/client/src/sections/projectRegime/components/projectAddModel.js +++ b/web/client/src/sections/projectRegime/components/projectAddModel.js @@ -1,11 +1,11 @@ import React, { useState } from 'react'; -import { Button, Form, Input, Modal, Select, DatePicker, Icon } from 'antd'; -import { EnvironmentTwoTone } from '@ant-design/icons'; +import { Form, Input, Modal, Select, Row, Col } from 'antd'; +// import { EnvironmentTwoTone } from '@ant-design/icons'; const { TextArea } = Input; import { connect } from 'react-redux'; import Uploads from '$components/Uploads'; import { useEffect } from 'react'; -import moment from 'moment'; +// import moment from 'moment'; const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, firmList }) => { @@ -34,7 +34,7 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f map: map }); //构造地点查询类 - function select (e) { + function select(e) { if (e) { placeSearch.setCity(e.poi.adcode); placeSearch.search(e.poi.name, function (status, result) { @@ -56,8 +56,9 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f return ( { form.validateFields().then(v => { @@ -78,7 +79,7 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f style={{}} form={form} labelAlign='right' - labelCol={{ span: 6 }} wrapperCol={{ span: 18 }} + labelCol={{ span: 4 }} wrapperCol={{ span: 18 }} onFinish={r => { }} initialValues={{ @@ -90,24 +91,29 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f describe: modelData?.describe, }} > - - - - - + + + + - ~ - { const sjh = /^\d+$|^\d*\.\d+$/g; @@ -140,9 +146,9 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f } }]} > - + - { + { setShowBaiduMap(!showBaiduMap) }} />
@@ -161,7 +167,7 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f
-