1
This commit is contained in:
@@ -77,11 +77,20 @@ export default defineConfig({
|
||||
* @name layout 插件
|
||||
* @doc https://umijs.org/docs/max/layout-menu
|
||||
*/
|
||||
title: '云充电管理后台',
|
||||
title: '广东星动',
|
||||
layout: {
|
||||
locale: false,
|
||||
...defaultSettings,
|
||||
},
|
||||
define: {
|
||||
'process.env': {
|
||||
// API_URL: "https://iadminapi.zhongshuai2023.com",
|
||||
API_URL: "http://192.168.1.54:1002",
|
||||
WS_URL: "ws://lv.com",
|
||||
STATIC_URL: "http://lv.com",
|
||||
WEMAP_KEY: 'ZFDBZ-YUTWB-353UZ-NYKEY-JTVIZ-Q3F6X'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @name moment2dayjs 插件
|
||||
* @description 将项目中的 moment 替换为 dayjs
|
||||
|
||||
@@ -77,14 +77,14 @@ export default defineConfig({
|
||||
* @name layout 插件
|
||||
* @doc https://umijs.org/docs/max/layout-menu
|
||||
*/
|
||||
title: '云充电管理后台',
|
||||
title: '广东星动',
|
||||
layout: {
|
||||
locale: false,
|
||||
...defaultSettings,
|
||||
},
|
||||
define: {
|
||||
'process.env': {
|
||||
API_URL: "https://iadminapi.zhongshuai2023.com",
|
||||
API_URL: "http://guangdongapp.zhongshuai2023.com",
|
||||
// API_URL: "http://192.168.1.32:1002",
|
||||
WS_URL: "ws://lv.com",
|
||||
STATIC_URL: "http://lv.com",
|
||||
|
||||
@@ -15,7 +15,7 @@ const Settings: ProLayoutProps & {
|
||||
fixedHeader: false,
|
||||
fixSiderbar: true,
|
||||
colorWeak: false,
|
||||
title: '云充电管理后台',
|
||||
title: '广东星动管理后台',
|
||||
pwa: true,
|
||||
logo: false,
|
||||
iconfontUrl: '',
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6
dist/index.html
vendored
6
dist/index.html
vendored
@@ -2,12 +2,12 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>云充电管理后台</title>
|
||||
<link rel="stylesheet" href="/umi.77a65f21.css">
|
||||
<title>广东星动</title>
|
||||
<link rel="stylesheet" href="/umi.d4b01ce4.css">
|
||||
<script async="" src="/scripts/loading.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="/umi.3c917597.js"></script>
|
||||
<script src="/umi.5de21d31.js"></script>
|
||||
|
||||
</body></html>
|
||||
1
dist/src__pages__activity__513__index.c821c075.async.js
vendored
Normal file
1
dist/src__pages__activity__513__index.c821c075.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7579],{3891:function(){}}]);
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5351],{986:function(I,c,e){e.r(c),e.d(c,{default:function(){return C}});var h=e(90228),s=e.n(h),p=e(87999),v=e.n(p),g=e(7485);function y(o){return u.apply(this,arguments)}function u(){return u=v()(s()().mark(function o(d){return s()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,g.request)("/api/device/amount/page",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:d||{}}));case 1:case"end":return a.stop()}},o)})),u.apply(this,arguments)}var T=e(50959),x=e(16030),R=e(35384),l=e(11527),j=function(){var d=(0,T.useRef)(),f=[{title:"ID",dataIndex:"id",valueType:"text",search:!1},{title:"\u670D\u52A1\u8D39\u91D1\u989D",dataIndex:"amout",valueType:"text",search:!1},{title:"\u670D\u52A1\u8D39\u4EA7\u751F\u65E5\u671F",dataIndex:"incomeDay",valueType:"dateRange",render:function(n,r){return r==null?void 0:r.incomeDay},search:{transform:function(n){return{incomeDayBegin:n[0],incomeDayEnd:n[1]}}}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createTime",valueType:"text",search:!1}];return(0,l.jsx)(x._z,{children:(0,l.jsx)("div",{style:{width:"100%",float:"right"},children:(0,l.jsx)(R.Z,{actionRef:d,rowKey:"id",search:{labelWidth:120},request:function(){var a=v()(s()().mark(function n(r,D,L){var m,t;return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,y(r);case 2:return m=i.sent,t=m.data,i.abrupt("return",{data:(t==null?void 0:t.records)||[],total:t==null?void 0:t.total});case 5:case"end":return i.stop()}},n)}));return function(n,r,D){return a.apply(this,arguments)}}(),columns:f},"logList")})})},C=j}}]);
|
||||
1
dist/src__pages__facility__serviceCharge__index.a2516e77.async.js
vendored
Normal file
1
dist/src__pages__facility__serviceCharge__index.a2516e77.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5351],{80971:function(P,f,t){t.r(f);var y=t(90228),a=t.n(y),v=t(87999),i=t.n(v),s=t(19451),D=t(50959),l=t(16030),E=t(35384),u=t(11527),T=function(){var g=(0,D.useRef)(),c=[{title:"ID",dataIndex:"id",valueType:"text",search:!1},{title:"\u670D\u52A1\u8D39\u91D1\u989D",dataIndex:"amout",valueType:"text",search:!1},{title:"\u670D\u52A1\u8D39\u4EA7\u751F\u65E5\u671F",dataIndex:"incomeDay",valueType:"dateRange",render:function(_,n){return n==null?void 0:n.incomeDay},search:{transform:function(_){return{incomeDayBegin:_[0],incomeDayEnd:_[1]}}}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createTime",valueType:"text",search:!1}];return(0,u.jsx)(l._z,{children:(0,u.jsx)("div",{style:{width:"100%",float:"right"},children:(0,u.jsx)(E.Z,{actionRef:g,rowKey:"id",search:{labelWidth:120},request:function(){var m=i()(a()().mark(function _(n,r,p){var e,d;return a()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,s.ow)(n);case 2:return e=o.sent,d=e.data,o.abrupt("return",{data:(d==null?void 0:d.records)||[],total:d==null?void 0:d.total});case 5:case"end":return o.stop()}},_)}));return function(_,n,r){return m.apply(this,arguments)}}(),columns:c},"logList")})})};f.default=T},19451:function(P,f,t){t.d(f,{In:function(){return T},UG:function(){return g},ju:function(){return m},ow:function(){return D},s4:function(){return E}});var y=t(90228),a=t.n(y),v=t(87999),i=t.n(v),s=t(7485);function D(n){return l.apply(this,arguments)}function l(){return l=i()(a()().mark(function n(r){return a()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.request)("/api/device/amount/page",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:r||{}}));case 1:case"end":return e.stop()}},n)})),l.apply(this,arguments)}function E(n){return u.apply(this,arguments)}function u(){return u=i()(a()().mark(function n(r){return a()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.request)("/device/subsidy/config/findList",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:r||{}}));case 1:case"end":return e.stop()}},n)})),u.apply(this,arguments)}function T(n){return h.apply(this,arguments)}function h(){return h=i()(a()().mark(function n(r){return a()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.request)("/device/subsidy/config/update",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:r||{}}));case 1:case"end":return e.stop()}},n)})),h.apply(this,arguments)}function g(n){return c.apply(this,arguments)}function c(){return c=i()(a()().mark(function n(r){return a()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.request)("/device/subsidy/config/deleteBatchByIds",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:r||{}}));case 1:case"end":return e.stop()}},n)})),c.apply(this,arguments)}function m(n){return _.apply(this,arguments)}function _(){return _=i()(a()().mark(function n(r){return a()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.request)("/device/subsidy/config/add",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:r||{}}));case 1:case"end":return e.stop()}},n)})),_.apply(this,arguments)}}}]);
|
||||
1
dist/src__pages__facility__subsidy__edit.09be6cf7.async.js
vendored
Normal file
1
dist/src__pages__facility__subsidy__edit.09be6cf7.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[542],{35748:function(x,a,_){var o=_(35361),s=_(56929),i=_(50959),u=_(20734),m=_(11527),E=["fieldProps","min","proFieldProps","max"],D=function(t,P){var r=t.fieldProps,A=t.min,e=t.proFieldProps,h=t.max,c=(0,s.Z)(t,E);return(0,m.jsx)(u.Z,(0,o.Z)({valueType:"digit",fieldProps:(0,o.Z)({min:A,max:h},r),ref:P,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:e},c))},n=i.forwardRef(D);a.Z=n},39687:function(x,a,_){_.r(a);var o=_(90228),s=_.n(o),i=_(87999),u=_.n(i),m=_(48305),E=_.n(m),D=_(50959),n=_(49547),M=_(35748),t=_(50925),P=_(94675),r=_(3598),A=_(7485),e=_(11527),h=function(l){var C=t.Z.useForm(),F=E()(C,1),d=F[0],f=l.values;(0,D.useEffect)(function(){console.log(f,"values"),d.resetFields(),d.setFieldsValue(f)},[d,l]);var R=(0,A.useIntl)(),B=function(){d.submit()},b=function(){l.onCancel()},I=function(){var O=u()(s()().mark(function p(j){return s()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:l.onSubmit(j);case 1:case"end":return v.stop()}},p)}));return function(j){return O.apply(this,arguments)}}();return(0,e.jsx)(P.Z,{width:640,title:"\u8BBE\u5907\u8865\u8D34",open:l.open,forceRender:!0,destroyOnClose:!0,onOk:B,onCancel:b,children:(0,e.jsxs)(n.A,{form:d,submitter:!1,layout:"horizontal",onFinish:I,children:[(0,e.jsx)(M.Z,{name:"id",label:"ID",disabled:!0,hidden:!0}),(0,e.jsxs)(n.A.Group,{children:[(0,e.jsx)(n.A.Item,{label:"\u8BBE\u5907\u7C7B\u578B",name:"deviceType",children:(0,e.jsx)(r.Z,{addonAfter:"W",style:{width:150}})}),(0,e.jsx)(n.A.Item,{label:"\u8865\u8D34\u91D1\u989D",name:"amount",children:(0,e.jsx)(r.Z,{addonBefore:"\uFFE5",style:{width:150}})})]}),(0,e.jsxs)(n.A.Group,{children:[(0,e.jsx)(n.A.Item,{label:"\u4E0A\u4E0B\u6D6E\u52A8\u6BD4\u4F8B",name:"earingsFloat",children:(0,e.jsx)(r.Z,{addonAfter:"%",style:{width:150}})}),(0,e.jsx)(n.A.Item,{label:"\u57FA\u7840\u6536\u5165\u670D\u52A1\u8D39",name:"baseAmount",children:(0,e.jsx)(r.Z,{style:{width:150}})}),(0,e.jsx)(n.A.Item,{label:"\u4EA4\u4ED8\u65F6\u95F4",name:"deliverDate",children:(0,e.jsx)(r.Z,{addonAfter:"\u5929",style:{width:150}})})]})]})})};a.default=h}}]);
|
||||
1
dist/src__pages__facility__subsidy__index.264a8a21.async.js
vendored
Normal file
1
dist/src__pages__facility__subsidy__index.264a8a21.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
dist/src__pages__home__index.ba109281.async.js
vendored
Normal file
10
dist/src__pages__home__index.ba109281.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3342],{35748:function(R,a,_){var l=_(35361),d=_(56929),s=_(50959),i=_(20734),m=_(11527),u=["fieldProps","min","proFieldProps","max"],E=function(n,P){var D=n.fieldProps,O=n.min,M=n.proFieldProps,e=n.max,v=(0,d.Z)(n,u);return(0,m.jsx)(i.Z,(0,l.Z)({valueType:"digit",fieldProps:(0,l.Z)({min:O,max:e},D),ref:P,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:M},v))},o=s.forwardRef(E);a.Z=o},20859:function(R,a,_){_.r(a);var l=_(90228),d=_.n(l),s=_(87999),i=_.n(s),m=_(48305),u=_.n(m),E=_(50959),o=_(49547),c=_(35748),n=_(19014),P=_(50925),D=_(94675),O=_(3598),M=_(7485),e=_(11527),v=function(r){var j=P.Z.useForm(),F=u()(j,1),t=F[0],A=r.values;(0,E.useEffect)(function(){console.log(A,"values"),t.resetFields(),t.setFieldsValue(A)},[t,r]);var B=(0,M.useIntl)(),T=function(){t.submit()},I=function(){r.onCancel()},x=function(){var p=i()(d()().mark(function f(C){return d()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:r.onSubmit(C);case 1:case"end":return h.stop()}},f)}));return function(C){return p.apply(this,arguments)}}();return(0,e.jsx)(D.Z,{width:640,title:"\u8F6E\u64AD\u56FE",open:r.open,forceRender:!0,destroyOnClose:!0,onOk:T,onCancel:I,children:(0,e.jsxs)(o.A,{form:t,submitter:!1,layout:"horizontal",onFinish:x,children:[(0,e.jsx)(c.Z,{name:"id",label:"ID",disabled:!0,hidden:!0}),(0,e.jsx)(o.A.Group,{children:(0,e.jsx)(n.Z,{name:"name",label:"\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"})}),(0,e.jsx)(o.A.Group,{children:(0,e.jsx)(o.A.Item,{label:"\u6392\u5E8F",name:"sort",children:(0,e.jsx)(O.Z,{style:{width:200}})})})]})})};a.default=v}}]);
|
||||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3342],{35748:function(R,a,_){var l=_(35361),d=_(56929),s=_(50959),i=_(20734),m=_(11527),u=["fieldProps","min","proFieldProps","max"],E=function(n,P){var D=n.fieldProps,O=n.min,M=n.proFieldProps,e=n.max,v=(0,d.Z)(n,u);return(0,m.jsx)(i.Z,(0,l.Z)({valueType:"digit",fieldProps:(0,l.Z)({min:O,max:e},D),ref:P,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:M},v))},o=s.forwardRef(E);a.Z=o},20859:function(R,a,_){_.r(a);var l=_(90228),d=_.n(l),s=_(87999),i=_.n(s),m=_(48305),u=_.n(m),E=_(50959),o=_(49547),c=_(35748),n=_(19014),P=_(50925),D=_(94675),O=_(3598),M=_(7485),e=_(11527),v=function(r){var j=P.Z.useForm(),F=u()(j,1),t=F[0],A=r.values;(0,E.useEffect)(function(){console.log(A,"values"),t.resetFields(),t.setFieldsValue(A)},[t,r]);var B=(0,M.useIntl)(),T=function(){t.submit()},I=function(){r.onCancel()},x=function(){var p=i()(d()().mark(function f(C){return d()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:r.onSubmit(C);case 1:case"end":return h.stop()}},f)}));return function(C){return p.apply(this,arguments)}}();return(0,e.jsx)(D.Z,{width:640,title:"\u516C\u544A\u5206\u7C7B",open:r.open,forceRender:!0,destroyOnClose:!0,onOk:T,onCancel:I,children:(0,e.jsxs)(o.A,{form:t,submitter:!1,layout:"horizontal",onFinish:x,children:[(0,e.jsx)(c.Z,{name:"id",label:"ID",disabled:!0,hidden:!0}),(0,e.jsx)(o.A.Group,{children:(0,e.jsx)(n.Z,{name:"name",label:"\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"})}),(0,e.jsx)(o.A.Group,{children:(0,e.jsx)(o.A.Item,{label:"\u6392\u5E8F",name:"sort",children:(0,e.jsx)(O.Z,{style:{width:200}})})})]})})};a.default=v}}]);
|
||||
File diff suppressed because one or more lines are too long
1
dist/src__pages__note__cate__index.500e1c38.async.js
vendored
Normal file
1
dist/src__pages__note__cate__index.500e1c38.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
dist/src__pages__system__log__index.b12b333e.async.js
vendored
Normal file
1
dist/src__pages__system__log__index.b12b333e.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
dist/src__pages__user__login__index.99a413d5.async.js
vendored
Normal file
1
dist/src__pages__user__login__index.99a413d5.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
196
dist/umi.3c917597.js → dist/umi.5de21d31.js
vendored
196
dist/umi.3c917597.js → dist/umi.5de21d31.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -86,7 +86,7 @@ export default (props: any) => {
|
||||
"fixedHeader": false,
|
||||
"fixSiderbar": true,
|
||||
"colorWeak": false,
|
||||
"title": "云充电管理后台",
|
||||
"title": "广东星动管理后台",
|
||||
"pwa": true,
|
||||
"logo": false,
|
||||
"iconfontUrl": "",
|
||||
|
||||
@@ -214,6 +214,10 @@
|
||||
display: block
|
||||
}
|
||||
|
||||
.inline-block {
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -86,7 +86,7 @@ export default (props: any) => {
|
||||
"fixedHeader": false,
|
||||
"fixSiderbar": true,
|
||||
"colorWeak": false,
|
||||
"title": "云充电管理后台",
|
||||
"title": "广东星动管理后台",
|
||||
"pwa": true,
|
||||
"logo": false,
|
||||
"iconfontUrl": "",
|
||||
|
||||
@@ -8,12 +8,12 @@ const Footer: React.FC = () => {
|
||||
style={{
|
||||
background: 'none',
|
||||
}}
|
||||
copyright="Powered by Ant Desgin"
|
||||
copyright="中帅新能源"
|
||||
links={[
|
||||
{
|
||||
key: 'Ant Design Pro',
|
||||
title: '云充电管理后台',
|
||||
href: 'https://pro.ant.design',
|
||||
title: '中帅新能源提供技术支持',
|
||||
href: '',
|
||||
blankTarget: true,
|
||||
},
|
||||
// {
|
||||
|
||||
0
src/pages/activity/513/index.tsx
Normal file
0
src/pages/activity/513/index.tsx
Normal file
97
src/pages/facility/subsidy/edit.tsx
Normal file
97
src/pages/facility/subsidy/edit.tsx
Normal file
@@ -0,0 +1,97 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import {
|
||||
ProForm,
|
||||
ProFormDigit,
|
||||
ProFormText,
|
||||
ProFormSwitch,
|
||||
ProFormSelect
|
||||
} from '@ant-design/pro-components';
|
||||
import { Form, Modal, InputNumber } from 'antd';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import FilesManager from '@/components/FilesManage/index';
|
||||
const RoleForm: React.FC = (props: any) => {
|
||||
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const { values } = props;
|
||||
|
||||
useEffect(() => {
|
||||
console.log(values, 'values');
|
||||
|
||||
form.resetFields();
|
||||
form.setFieldsValue(values);
|
||||
}, [form, props]);
|
||||
|
||||
const intl = useIntl();
|
||||
const handleOk = () => {
|
||||
form.submit();
|
||||
};
|
||||
const handleCancel = () => {
|
||||
props.onCancel();
|
||||
};
|
||||
const handleFinish = async (values: any) => {
|
||||
props.onSubmit(values);
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
width={640}
|
||||
title={'设备补贴'}
|
||||
open={props.open}
|
||||
forceRender
|
||||
destroyOnClose
|
||||
onOk={handleOk}
|
||||
onCancel={handleCancel}
|
||||
>
|
||||
<ProForm
|
||||
form={form}
|
||||
submitter={false}
|
||||
layout="horizontal"
|
||||
onFinish={handleFinish}>
|
||||
<ProFormDigit
|
||||
name="id"
|
||||
label={'ID'}
|
||||
disabled
|
||||
hidden={true}
|
||||
/>
|
||||
|
||||
<ProForm.Group>
|
||||
<ProForm.Item
|
||||
label="设备类型"
|
||||
name={'deviceType'}
|
||||
>
|
||||
<InputNumber addonAfter="W" style={{ width: 150 }} />
|
||||
</ProForm.Item>
|
||||
<ProForm.Item
|
||||
label="补贴金额"
|
||||
name={'amount'}
|
||||
>
|
||||
<InputNumber addonBefore="¥" style={{ width: 150 }} />
|
||||
</ProForm.Item>
|
||||
</ProForm.Group>
|
||||
<ProForm.Group>
|
||||
<ProForm.Item
|
||||
label="上下浮动比例"
|
||||
name={'earingsFloat'}
|
||||
>
|
||||
<InputNumber addonAfter="%" style={{ width: 150 }} />
|
||||
</ProForm.Item>
|
||||
<ProForm.Item
|
||||
label="基础收入服务费"
|
||||
name={'baseAmount'}
|
||||
>
|
||||
<InputNumber style={{ width: 150 }} />
|
||||
</ProForm.Item>
|
||||
<ProForm.Item
|
||||
label="交付时间"
|
||||
name={'deliverDate'}
|
||||
>
|
||||
<InputNumber addonAfter="天" style={{ width: 150 }} />
|
||||
</ProForm.Item>
|
||||
</ProForm.Group>
|
||||
</ProForm>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default RoleForm;
|
||||
187
src/pages/facility/subsidy/index.tsx
Normal file
187
src/pages/facility/subsidy/index.tsx
Normal file
@@ -0,0 +1,187 @@
|
||||
import { findList, configUpdate, configAdd, configDeleteBatchByIds } from '@/services/facility/index';
|
||||
|
||||
|
||||
import React, { useRef, useEffect, useState } from 'react';
|
||||
import { useIntl, useAccess } from '@umijs/max';
|
||||
import { message, Tag, Select, Button, Modal } from 'antd';
|
||||
import { ActionType, PageContainer, ProTable } from '@ant-design/pro-components';
|
||||
import UpdateForm from './edit';
|
||||
|
||||
|
||||
|
||||
const LogTableList: React.FC = () => {
|
||||
const actionRef = useRef<ActionType>();
|
||||
const [modalVisible, setModalVisible] = useState<boolean>(false);
|
||||
const [currentRow, setCurrentRow] = useState();
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: 'ID',
|
||||
dataIndex: 'id',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '设备类型',
|
||||
dataIndex: 'deviceType',
|
||||
valueType: 'text',
|
||||
render: (_, record) => {
|
||||
return record?.deviceType + 'W'
|
||||
},
|
||||
// renderFormItem: (
|
||||
// _,
|
||||
// { type, defaultRender, formItemProps, fieldProps, ...rest },
|
||||
// form,
|
||||
// ) => {
|
||||
// const statusMap = [
|
||||
// { label: '7W', value: 7 },
|
||||
// { label: '20W', value: 20 },
|
||||
// { label: '30W', value: 30 },
|
||||
// ]
|
||||
// return <Select
|
||||
// {...fieldProps}
|
||||
// allowClear
|
||||
// style={{ width: "100%" }}
|
||||
// filterOption={false}
|
||||
// fieldNames={{
|
||||
// label: "label",
|
||||
// value: "value"
|
||||
// }}
|
||||
// options={statusMap}
|
||||
// />
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: '补贴金额',
|
||||
dataIndex: 'amount',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '上下浮动比例',
|
||||
dataIndex: 'earingsFloat',
|
||||
valueType: 'text',
|
||||
search: true,
|
||||
},
|
||||
{
|
||||
title: '基础收入服务费',
|
||||
dataIndex: 'baseAmount',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '交付时间',
|
||||
dataIndex: 'deliverDate',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'option',
|
||||
width: '220px',
|
||||
valueType: 'option',
|
||||
render: (_, record) => [
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
setModalVisible(true);
|
||||
setCurrentRow(record);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>,
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
danger
|
||||
// hidden={!access.hasPerms('admin:banner:update')}
|
||||
onClick={async () => {
|
||||
Modal.confirm({
|
||||
title: '删除',
|
||||
content: '确定删除该项吗?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: async () => {
|
||||
const success = await configDeleteBatchByIds([record.id]);
|
||||
if (success) {
|
||||
if (actionRef.current) {
|
||||
actionRef.current.reload();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>,
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<PageContainer>
|
||||
<div style={{ width: '100%', float: 'right' }}>
|
||||
<ProTable
|
||||
actionRef={actionRef}
|
||||
rowKey="id"
|
||||
key="logList"
|
||||
search={{
|
||||
labelWidth: 120,
|
||||
}}
|
||||
toolBarRender={() => [
|
||||
<Button
|
||||
type="primary"
|
||||
key="add"
|
||||
onClick={async () => {
|
||||
setCurrentRow(undefined);
|
||||
setModalVisible(true);
|
||||
}}
|
||||
>
|
||||
新建
|
||||
</Button>
|
||||
]}
|
||||
request={async (params, sorter, filter) => {
|
||||
let { data } = await findList(params)
|
||||
return {
|
||||
data: data || [],
|
||||
total: data.length,
|
||||
};
|
||||
}}
|
||||
columns={columns}
|
||||
/>
|
||||
</div>
|
||||
<UpdateForm
|
||||
onSubmit={async (values) => {
|
||||
let success = false;
|
||||
if (values.id) {
|
||||
success = await configUpdate({ ...values });
|
||||
} else {
|
||||
success = await configAdd({ ...values });
|
||||
}
|
||||
if (success) {
|
||||
setModalVisible(false);
|
||||
setCurrentRow(undefined);
|
||||
if (actionRef.current) {
|
||||
actionRef.current.reload();
|
||||
}
|
||||
}
|
||||
}}
|
||||
onCancel={() => {
|
||||
setModalVisible(false);
|
||||
setCurrentRow(undefined);
|
||||
}}
|
||||
open={modalVisible}
|
||||
values={currentRow || {}}
|
||||
/>
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
|
||||
export default LogTableList;
|
||||
123
src/pages/home/index.tsx
Normal file
123
src/pages/home/index.tsx
Normal file
@@ -0,0 +1,123 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
|
||||
import { PageContainer, ProTable } from '@ant-design/pro-components';
|
||||
import { Card, Col, Row, Statistic, Divider, Tag, Image } from 'antd';
|
||||
import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons';
|
||||
|
||||
export default () => {
|
||||
const [deviceData, setDeviceData] = useState([]);
|
||||
const [profit, setProfit] = useState([]);
|
||||
const [shop, setShop] = useState([]);
|
||||
const deviceConfig = {
|
||||
data: deviceData,
|
||||
xField: 'name',
|
||||
yField: 'value',
|
||||
seriesField: 'category',
|
||||
xAxis: {
|
||||
type: 'time',
|
||||
},
|
||||
yAxis: {
|
||||
label: {
|
||||
// 数值格式化为千分位
|
||||
formatter: (v) => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Divider>充电桩</Divider>
|
||||
<Row gutter={10}>
|
||||
<Col span={6}>
|
||||
<Card>
|
||||
<Statistic
|
||||
title="今日充电"
|
||||
value={profit?.device_count?.today}
|
||||
precision={2}
|
||||
prefix="¥"
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Card>
|
||||
<Statistic
|
||||
title="昨日充电"
|
||||
value={profit?.device_count?.yesterday}
|
||||
precision={2}
|
||||
prefix="¥"
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Card>
|
||||
<Statistic
|
||||
title="上周充电"
|
||||
value={profit?.device_count?.week}
|
||||
precision={2}
|
||||
prefix="¥"
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Card>
|
||||
<Statistic
|
||||
title="上月充电"
|
||||
value={profit?.device_count?.month}
|
||||
precision={2}
|
||||
prefix="¥"
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Divider>商城</Divider>
|
||||
<Row gutter={10}>
|
||||
<Col span={6}>
|
||||
<Card>
|
||||
<Statistic
|
||||
title="今天成交"
|
||||
value={profit?.shop_count?.today}
|
||||
precision={2}
|
||||
prefix="¥"
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Card>
|
||||
<Statistic
|
||||
title="昨天成交"
|
||||
value={profit?.shop_count?.yesterday}
|
||||
precision={2}
|
||||
prefix="¥"
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Card>
|
||||
<Statistic
|
||||
title="上周成交"
|
||||
value={profit?.shop_count?.week}
|
||||
precision={2}
|
||||
prefix="¥"
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Card>
|
||||
<Statistic
|
||||
title="上月成交"
|
||||
value={profit?.shop_count?.month}
|
||||
precision={2}
|
||||
prefix="¥"
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
{/* <Divider>商城(商品数量/金额)-折线图</Divider> */}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ const RoleForm: React.FC = (props: any) => {
|
||||
return (
|
||||
<Modal
|
||||
width={640}
|
||||
title={'轮播图'}
|
||||
title={'公告分类'}
|
||||
open={props.open}
|
||||
forceRender
|
||||
destroyOnClose
|
||||
|
||||
@@ -3,7 +3,7 @@ import { logPage } from '@/services/system/log';
|
||||
|
||||
import React, { useRef, useEffect } from 'react';
|
||||
import { useIntl, useAccess } from '@umijs/max';
|
||||
import { message, Tag } from 'antd';
|
||||
import { message, Tag, Select, Tooltip } from 'antd';
|
||||
import { ActionType, PageContainer, ProTable } from '@ant-design/pro-components';
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ const LogTableList: React.FC = () => {
|
||||
title: '标题',
|
||||
dataIndex: 'title',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
search: true,
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
@@ -31,27 +31,78 @@ const LogTableList: React.FC = () => {
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (_: any, record: any) => {
|
||||
let color = record.businessType == 1 ? 'volcano' : record.businessType == 2 ? 'orange' : 'red'
|
||||
return <Tag color={color}>{record.businessType}</Tag>
|
||||
}
|
||||
let color = record.businessType == 1 ? 'purple' : record.businessType == 2 ? 'blue' : record.businessType == 3 ? 'magenta' : 'red'
|
||||
let statusMap = [
|
||||
{ label: '其它', value: 0 },
|
||||
{ label: '新增', value: 1 },
|
||||
{ label: '修改', value: 2 },
|
||||
{ label: '删除', value: 3 },
|
||||
]
|
||||
return <Tag color={color}>{statusMap.find((val) => val.value == record.businessType)?.label}</Tag>
|
||||
},
|
||||
// (0其它 1新增 2修改 3删除)
|
||||
// renderFormItem: (
|
||||
// _,
|
||||
// { type, defaultRender, formItemProps, fieldProps, ...rest },
|
||||
// form,
|
||||
// ) => {
|
||||
// const statusMap = [
|
||||
// { label: '其它', value: 0 },
|
||||
// { label: '新增', value: 1 },
|
||||
// { label: '修改', value: 2 },
|
||||
// { label: '删除', value: 3 },
|
||||
// ]
|
||||
// return <Select
|
||||
// {...fieldProps}
|
||||
// allowClear
|
||||
// style={{ width: "100%" }}
|
||||
// filterOption={false}
|
||||
// fieldNames={{
|
||||
// label: "label",
|
||||
// value: "value"
|
||||
// }}
|
||||
// options={statusMap}
|
||||
// />
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: '方法',
|
||||
dataIndex: 'method',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
search: true,
|
||||
render: (data) => {
|
||||
return (
|
||||
<div className="ellipsis" style={{
|
||||
float: 'left',
|
||||
maxWidth: '100px',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow: 'ellipsis',
|
||||
}} title={data}>
|
||||
<Tooltip placement="topLeft" title={data}>{data}</Tooltip>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '请求方式',
|
||||
dataIndex: 'requestMethod',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
search: true,
|
||||
},
|
||||
{
|
||||
title: '操作类别',
|
||||
dataIndex: 'operatorType',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (_: any, record: any) => {
|
||||
let statusMap = [
|
||||
{ label: '其它', value: 0 },
|
||||
{ label: '后台用户', value: 1 },
|
||||
{ label: '手机端用户', value: 2 },
|
||||
]
|
||||
return statusMap.find((val) => val.value == record.operatorType)?.label
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作人员',
|
||||
@@ -64,6 +115,19 @@ const LogTableList: React.FC = () => {
|
||||
dataIndex: 'operUrl',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (data) => {
|
||||
return (
|
||||
<div className="ellipsis" style={{
|
||||
float: 'left',
|
||||
maxWidth: '100px',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow: 'ellipsis',
|
||||
}} title={data}>
|
||||
<Tooltip placement="topLeft" title={data}>{data}</Tooltip>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
@@ -71,36 +135,105 @@ const LogTableList: React.FC = () => {
|
||||
dataIndex: 'operIp',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (data) => {
|
||||
return (
|
||||
<div className="ellipsis" style={{
|
||||
float: 'left',
|
||||
maxWidth: '100px',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow: 'ellipsis',
|
||||
}} title={data}>
|
||||
<Tooltip placement="topLeft" title={data}>{data}</Tooltip>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作地点',
|
||||
dataIndex: 'operLocation',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (data) => {
|
||||
return (
|
||||
<div className="ellipsis" style={{
|
||||
float: 'left',
|
||||
maxWidth: '100px',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow: 'ellipsis',
|
||||
}} title={data}>
|
||||
<Tooltip placement="topLeft" title={data}>{data}</Tooltip>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '请求参数',
|
||||
dataIndex: 'operParam',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (data) => {
|
||||
return (
|
||||
<div className="ellipsis" style={{
|
||||
float: 'left',
|
||||
maxWidth: '100px',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow: 'ellipsis',
|
||||
}} title={data}>
|
||||
<Tooltip placement="topLeft" title={data}>{data}</Tooltip>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '返回参数',
|
||||
dataIndex: 'jsonResult',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (data) => {
|
||||
return (
|
||||
<div className="ellipsis" style={{
|
||||
float: 'left',
|
||||
maxWidth: '100px',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow: 'ellipsis',
|
||||
}} title={data}>
|
||||
<Tooltip placement="topLeft" title={data}>{data}</Tooltip>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (_: any, record: any) => {
|
||||
let color = record.status == 0 ? 'green' : 'red'
|
||||
return <Tag color={color}>{record.status == 0 ? '正常' : '异常'}</Tag>
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '错误消息',
|
||||
dataIndex: 'errorMsg',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (data) => {
|
||||
return (
|
||||
<div className="ellipsis" style={{
|
||||
float: 'left',
|
||||
maxWidth: '100px',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow: 'ellipsis',
|
||||
}} title={data}>
|
||||
<Tooltip placement="topLeft" title={data}>{data}</Tooltip>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作时间',
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
import { Footer } from '@/components';
|
||||
import { login } from '@/services/user/index';
|
||||
import { login, validateCode } from '@/services/user/index';
|
||||
import {
|
||||
AlipayCircleOutlined,
|
||||
LockOutlined,
|
||||
MobileOutlined,
|
||||
TaobaoCircleOutlined,
|
||||
UserOutlined,
|
||||
WeiboCircleOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import {
|
||||
LoginForm,
|
||||
ProFormCaptcha,
|
||||
ProFormCheckbox,
|
||||
ProFormText,
|
||||
} from '@ant-design/pro-components';
|
||||
import { FormattedMessage, Helmet, SelectLang, useIntl, useModel } from '@umijs/max';
|
||||
import { Alert, message, Tabs } from 'antd';
|
||||
import { FormattedMessage, Helmet, useIntl, useModel } from '@umijs/max';
|
||||
import { message, Row, Col, Image } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import React, { useState } from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { flushSync } from 'react-dom';
|
||||
import Settings from '../../../../config/defaultSettings';
|
||||
import "./index.css";
|
||||
@@ -58,48 +52,24 @@ const useStyles = createStyles(({ token }) => {
|
||||
};
|
||||
});
|
||||
|
||||
const ActionIcons = () => {
|
||||
const { styles } = useStyles();
|
||||
|
||||
return (
|
||||
<>
|
||||
<AlipayCircleOutlined key="AlipayCircleOutlined" className={styles.action} />
|
||||
<TaobaoCircleOutlined key="TaobaoCircleOutlined" className={styles.action} />
|
||||
<WeiboCircleOutlined key="WeiboCircleOutlined" className={styles.action} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const Lang = () => {
|
||||
const { styles } = useStyles();
|
||||
|
||||
return (
|
||||
<div className={styles.lang} data-lang>
|
||||
{SelectLang && <SelectLang />}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const LoginMessage: React.FC<{
|
||||
content: string;
|
||||
}> = ({ content }) => {
|
||||
return (
|
||||
<Alert
|
||||
style={{
|
||||
marginBottom: 24,
|
||||
}}
|
||||
message={content}
|
||||
type="error"
|
||||
showIcon
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const Login: React.FC = () => {
|
||||
const [userLoginState, setUserLoginState] = useState<API.LoginResult>({});
|
||||
const { initialState, setInitialState } = useModel('@@initialState');
|
||||
const { styles } = useStyles();
|
||||
const intl = useIntl();
|
||||
const [captchaCode, setCaptchaCode] = useState<string>('');
|
||||
const [uuid, setUuid] = useState<string>('');
|
||||
|
||||
const getCaptchaCode = async () => {
|
||||
const { data } = await validateCode();
|
||||
const imgdata = `data:image/png;base64,${data.img}`;
|
||||
setCaptchaCode(imgdata);
|
||||
setUuid(data.uuid);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const fetchUserInfo = async () => {
|
||||
const userInfo = await initialState?.fetchUserInfo?.();
|
||||
@@ -118,26 +88,26 @@ const Login: React.FC = () => {
|
||||
const handleSubmit = async (values: API.LoginParams) => {
|
||||
try {
|
||||
// 登录
|
||||
const msg = await login({ ...values });
|
||||
console.log(msg);
|
||||
|
||||
const msg = await login({ ...values, uuid });
|
||||
if (msg.success || msg.status == 'ok') {
|
||||
localStorage.setItem('token', msg.data?.token)
|
||||
const defaultLoginSuccessMessage = intl.formatMessage({
|
||||
id: 'pages.login.success',
|
||||
defaultMessage: '登录成功!',
|
||||
});
|
||||
const defaultLoginSuccessMessage = '登录成功!';
|
||||
message.success(defaultLoginSuccessMessage);
|
||||
await fetchUserInfo();
|
||||
const urlParams = new URL(window.location.href).searchParams;
|
||||
window.location.href = urlParams.get('redirect') || '/';
|
||||
return;
|
||||
}
|
||||
setUserLoginState(msg);
|
||||
} catch (error) {
|
||||
getCaptchaCode()
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
getCaptchaCode();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<Helmet>
|
||||
@@ -161,9 +131,9 @@ const Login: React.FC = () => {
|
||||
minWidth: 280,
|
||||
maxWidth: '75vw',
|
||||
}}
|
||||
logo={<img alt="logo" src="/logo.svg" />}
|
||||
title="云充电 管理后台"
|
||||
subTitle={'云充电 管理后台'}
|
||||
// logo={<img alt="logo" src="/logo.svg" />}
|
||||
title="广东星动 管理后台"
|
||||
subTitle={'广东星动 管理后台'}
|
||||
initialValues={{
|
||||
autoLogin: true,
|
||||
}}
|
||||
@@ -201,6 +171,38 @@ const Login: React.FC = () => {
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<Row>
|
||||
<Col flex={3}>
|
||||
<ProFormText
|
||||
style={{
|
||||
float: 'right',
|
||||
}}
|
||||
name="code"
|
||||
placeholder={'请输入验证码'}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入验证码',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Col>
|
||||
<Col flex={2}>
|
||||
<Image
|
||||
src={captchaCode}
|
||||
alt="验证码"
|
||||
style={{
|
||||
display: 'inline-block',
|
||||
verticalAlign: 'top',
|
||||
cursor: 'pointer',
|
||||
paddingLeft: '10px',
|
||||
width: '100px',
|
||||
}}
|
||||
preview={false}
|
||||
onClick={() => getCaptchaCode()}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</>
|
||||
</LoginForm>
|
||||
</div>
|
||||
|
||||
@@ -8,4 +8,47 @@ export async function deviceAmountPage(body) {
|
||||
},
|
||||
data: body || {},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function findList(body) {
|
||||
return request('/device/subsidy/config/findList', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: body || {},
|
||||
});
|
||||
}
|
||||
|
||||
export async function configUpdate(body) {
|
||||
return request('/device/subsidy/config/update', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: body || {},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export async function configDeleteBatchByIds(body) {
|
||||
return request('/device/subsidy/config/deleteBatchByIds', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: body || {},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export async function configAdd(body) {
|
||||
return request('/device/subsidy/config/add', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: body || {},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { request } from '@umijs/max';
|
||||
|
||||
// 查询菜单权限列表
|
||||
export async function logPage(body) {
|
||||
return request('/api/sys/oper/log/page', {
|
||||
return request('/sys/oper/log/page', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
|
||||
@@ -26,4 +26,12 @@ export async function currentUser(options?: {}) {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export async function validateCode(options?: {}) {
|
||||
return request('/sys/validate/code', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ interface Item {
|
||||
menuType?: string;
|
||||
disabledTooltip?: boolean;
|
||||
access?: any;
|
||||
orderNum?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +38,5 @@ export const childrenRemove = (data: Item[] | undefined): Item[] => {
|
||||
list.push(i);
|
||||
}
|
||||
});
|
||||
|
||||
return list; // 返回处理后的列表
|
||||
return list.sort((a, b) => (a.orderNum === 0 ? -1 : b.orderNum === 0 ? 1 : a.orderNum - b.orderNum));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user