nili
6 months ago
10 changed files with 197 additions and 131 deletions
@ -1 +1 @@ |
|||
!function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"ant-design-pro","b":"webpack","f":[["51.a2ea1b3b.async.js",51],["63.86ff1d28.async.js",63],["134.6fc81d91.async.js",134],["169.57647c7d.async.js",169],["p__Welcome.61596037.async.js",185],["p__MoneyManagement.27e1a086.async.js",190],["247.3fe8fb10.async.js",247],["t__plugin-layout__Layout.6cae69f5.chunk.css",301],["t__plugin-layout__Layout.4594a64b.async.js",301],["p__User__Login__index.9d3ab92e.async.js",366],["p__DeviceOwnerApp.ec53e5c4.async.js",371],["390.41467286.async.js",390],["393.38316f72.async.js",393],["397.fb5f72c1.async.js",397],["427.f16a2970.async.js",427],["p__SuperAdmin.aaa0f8d9.async.js",455],["531.3d4ec55a.async.js",531],["539.49b7b156.async.js",539],["p__AdvRecordListV2.52c0941e.async.js",542],["p__Bind.b6ee068f.async.js",557],["559.016bfdbb.async.js",559],["p__404.0c100574.async.js",571],["635.20e45f05.async.js",635],["p__App__AppManagement.a12680df.async.js",731],["804.139cd916.async.js",804],["p__AdminManagement.4b0ea38b.async.js",816],["841.614ef4c0.async.js",841],["p__AdvRecordList.8e5ef22c.async.js",857],["p__UserManagement.2c68b70b.async.js",903],["905.6e225d1b.async.js",905],["930.fca7adbf.async.js",930]],"r":{"/*":[21,29],"/":[2,7,8,20,22,29],"/welcome":[2,3,4,12,20,30,7,8,22,29],"/super":[0,1,2,3,6,14,15,30,7,8,20,22,29],"/adminList":[0,3,14,24,25,2,7,8,20,22,29],"/bind":[2,3,12,13,19,20,30,7,8,22,29],"/appList":[0,1,2,3,6,13,14,16,17,23,24,29,30,7,8,20,22],"/advList/:code":[0,1,2,3,14,16,17,20,24,26,27,29,30,7,8,22],"/advListV2/:code":[0,1,2,3,14,16,17,18,20,24,26,29,30,7,8,22],"/user/:code":[0,1,2,3,14,16,17,24,28,29,30,7,8,20,22],"/money/:code":[0,1,2,3,5,14,16,17,24,29,30,7,8,20,22],"/app/:code":[0,1,2,3,10,14,16,17,20,24,26,29,30,7,8,22],"/user/login":[1,2,3,9,14,16,24]}},{publicPath:"/"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}(); |
|||
!function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"ant-design-pro","b":"webpack","f":[["51.a2ea1b3b.async.js",51],["63.86ff1d28.async.js",63],["134.6fc81d91.async.js",134],["169.57647c7d.async.js",169],["p__Welcome.61596037.async.js",185],["p__MoneyManagement.27e1a086.async.js",190],["247.3fe8fb10.async.js",247],["t__plugin-layout__Layout.6cae69f5.chunk.css",301],["t__plugin-layout__Layout.4594a64b.async.js",301],["p__User__Login__index.9d3ab92e.async.js",366],["p__DeviceOwnerApp.ec53e5c4.async.js",371],["390.41467286.async.js",390],["393.38316f72.async.js",393],["397.fb5f72c1.async.js",397],["427.f16a2970.async.js",427],["p__SuperAdmin.aaa0f8d9.async.js",455],["531.3d4ec55a.async.js",531],["539.49b7b156.async.js",539],["p__AdvRecordListV2.52c0941e.async.js",542],["p__Bind.b6ee068f.async.js",557],["559.016bfdbb.async.js",559],["p__404.0c100574.async.js",571],["635.20e45f05.async.js",635],["p__App__AppManagement.a12680df.async.js",731],["804.139cd916.async.js",804],["p__AdminManagement.badd5c65.async.js",816],["841.614ef4c0.async.js",841],["p__AdvRecordList.8e5ef22c.async.js",857],["p__UserManagement.2c68b70b.async.js",903],["905.6e225d1b.async.js",905],["930.fca7adbf.async.js",930]],"r":{"/*":[21,29],"/":[2,7,8,20,22,29],"/welcome":[2,3,4,12,20,30,7,8,22,29],"/super":[0,1,2,3,6,14,15,30,7,8,20,22,29],"/adminList":[0,3,14,24,25,2,7,8,20,22,29],"/bind":[2,3,12,13,19,20,30,7,8,22,29],"/appList":[0,1,2,3,6,13,14,16,17,23,24,29,30,7,8,20,22],"/advList/:code":[0,1,2,3,14,16,17,20,24,26,27,29,30,7,8,22],"/advListV2/:code":[0,1,2,3,14,16,17,18,20,24,26,29,30,7,8,22],"/user/:code":[0,1,2,3,14,16,17,24,28,29,30,7,8,20,22],"/money/:code":[0,1,2,3,5,14,16,17,24,29,30,7,8,20,22],"/app/:code":[0,1,2,3,10,14,16,17,20,24,26,29,30,7,8,22],"/user/login":[1,2,3,9,14,16,24]}},{publicPath:"/"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}(); |
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
@ -1,45 +0,0 @@ |
|||
import { HeartTwoTone, SmileTwoTone } from '@ant-design/icons'; |
|||
import { PageContainer } from '@ant-design/pro-components'; |
|||
import { useIntl } from '@umijs/max'; |
|||
import { Alert, Card, Typography } from 'antd'; |
|||
import React from 'react'; |
|||
|
|||
const Admin: React.FC = () => { |
|||
const intl = useIntl(); |
|||
return ( |
|||
<PageContainer |
|||
content={intl.formatMessage({ |
|||
id: 'pages.admin.subPage.title', |
|||
defaultMessage: 'This page can only be viewed by admin', |
|||
})} |
|||
> |
|||
<Card> |
|||
<Alert |
|||
message={intl.formatMessage({ |
|||
id: 'pages.welcome.alertMessage', |
|||
defaultMessage: 'Faster and stronger heavy-duty components have been released.', |
|||
})} |
|||
type="success" |
|||
showIcon |
|||
banner |
|||
style={{ |
|||
margin: -12, |
|||
marginBottom: 48, |
|||
}} |
|||
/> |
|||
<Typography.Title level={2} style={{ textAlign: 'center' }}> |
|||
<SmileTwoTone /> Ant Design Pro <HeartTwoTone twoToneColor="#eb2f96" /> You |
|||
</Typography.Title> |
|||
</Card> |
|||
<p style={{ textAlign: 'center', marginTop: 24 }}> |
|||
Want to add more pages? Please refer to{' '} |
|||
<a href="https://pro.ant.design/docs/block-cn" target="_blank" rel="noopener noreferrer"> |
|||
use block |
|||
</a> |
|||
。 |
|||
</p> |
|||
</PageContainer> |
|||
); |
|||
}; |
|||
|
|||
export default Admin; |
@ -0,0 +1,49 @@ |
|||
import { Col, Form, Modal, Row, Switch } from 'antd'; |
|||
import React from 'react'; |
|||
|
|||
import { changeAdminHide } from '../../services/matrix/admin'; |
|||
|
|||
export type AdminHideFormProps = { |
|||
onSubmit: () => void; |
|||
data: API.MatrixAdminBo[]; |
|||
}; |
|||
|
|||
const AdminHideForm: React.FC<AdminHideFormProps> = (props) => { |
|||
const [form] = Form.useForm(); |
|||
|
|||
const handleOk = () => { |
|||
props.onSubmit(); |
|||
}; |
|||
|
|||
console.log(props.data); |
|||
|
|||
return ( |
|||
<Modal title="批量编辑" visible footer={[]} onCancel={handleOk}> |
|||
<Row gutter={20}> |
|||
<Col span={10}> |
|||
<p style={{ textAlign: 'right' }}>账号</p> |
|||
</Col> |
|||
<Col>隐藏</Col> |
|||
</Row> |
|||
<Form labelWrap labelCol={{ span: 10 }} form={form}> |
|||
{props.data.map((x) => ( |
|||
<> |
|||
<Form.Item key={x.id} label={x.name} name={x.name}> |
|||
<Switch |
|||
key={x.id} |
|||
defaultValue={x.hide !== 0} |
|||
onChange={(val) => { |
|||
if (x.id) { |
|||
changeAdminHide({ adminId: x.id, hide: val ? 1 : 0 }); |
|||
} |
|||
}} |
|||
/> |
|||
</Form.Item> |
|||
</> |
|||
))} |
|||
</Form> |
|||
</Modal> |
|||
); |
|||
}; |
|||
|
|||
export default AdminHideForm; |
Loading…
Reference in new issue