Merge branch 'master' of http://118.178.224.202:3000/ewide/ewide_core
This commit is contained in:
@@ -202,7 +202,7 @@ namespace Ewide.Core
|
|||||||
.Select(u => u.Permission).ToListAsync();
|
.Select(u => u.Permission).ToListAsync();
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
#else
|
#else
|
||||||
await _sysCacheService.SetPermission(userId, permissions); // 缓存结果
|
await _sysCacheService.SetPermission(UserId, permissions); // 缓存结果
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return permissions;
|
return permissions;
|
||||||
|
|||||||
1
web-react/.env
Normal file
1
web-react/.env
Normal file
@@ -0,0 +1 @@
|
|||||||
|
GENERATE_SOURCEMAP=false
|
||||||
@@ -29,7 +29,7 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
webpack: {
|
webpack: {
|
||||||
plugins: [
|
plugins: [
|
||||||
//new MonacoWebpackPlugin()
|
new MonacoWebpackPlugin()
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
@@ -4,3 +4,8 @@
|
|||||||
body {
|
body {
|
||||||
line-height: 1.42857143;
|
line-height: 1.42857143;
|
||||||
}
|
}
|
||||||
|
#root {
|
||||||
|
transition: @animation-duration-slow opacity;
|
||||||
|
|
||||||
|
opacity: 1 !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,3 +2,13 @@
|
|||||||
.ant-card {
|
.ant-card {
|
||||||
margin-bottom: @padding-md;
|
margin-bottom: @padding-md;
|
||||||
}
|
}
|
||||||
|
.ant-card-grid-hoverable {
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 1px 0 0 0 #303030,
|
||||||
|
0 1px 0 0 #303030,
|
||||||
|
1px 1px 0 0 #303030,
|
||||||
|
1px 0 0 0 #303030 inset,
|
||||||
|
0 1px 0 0 #303030 inset,
|
||||||
|
@card-shadow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -75,6 +75,9 @@
|
|||||||
.ant-table-sticky-scroll {
|
.ant-table-sticky-scroll {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.ant-table-expanded-row>td {
|
||||||
|
border-right: @border-width-base @border-style-base @table-border-color !important;
|
||||||
|
}
|
||||||
.yo-table {
|
.yo-table {
|
||||||
.ant-table {
|
.ant-table {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
@@ -196,11 +199,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ant-table-tbody {
|
.ant-table-tbody {
|
||||||
>.ant-table-expanded-row-level-1>td {
|
>.ant-table-expanded-row>td {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
border-right: none !important;
|
border-right: none !important;
|
||||||
.ant-table-wrapper {
|
.ant-table-wrapper {
|
||||||
|
margin-bottom: -1px;
|
||||||
|
|
||||||
border: none;
|
border: none;
|
||||||
.ant-table {
|
.ant-table {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
@@ -215,20 +220,17 @@
|
|||||||
padding-left: @padding-md;
|
padding-left: @padding-md;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ant-table-expanded-row-level-1>td {
|
.ant-table-tbody {
|
||||||
padding: @padding-sm @padding-xs @padding-sm @padding-xl;
|
>tr {
|
||||||
|
&:last-child {
|
||||||
border-right: @border-width-base @border-style-base @table-border-color !important;
|
>td {
|
||||||
.ant-card {
|
border-bottom: @border-width-base @border-style-base @table-border-color;
|
||||||
max-width: fit-content;
|
}
|
||||||
margin-bottom: 0;
|
&:hover {
|
||||||
|
>td {
|
||||||
background: none;
|
border-bottom-color: lighten(@primary-color, 30%);
|
||||||
.ant-card-grid {
|
}
|
||||||
width: 300px;
|
}
|
||||||
padding: @padding-xs @padding-sm;
|
|
||||||
|
|
||||||
background-color: @card-background;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -237,4 +239,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ant-card {
|
||||||
|
max-width: fit-content;
|
||||||
|
margin: @padding-sm @padding-xs @padding-sm @padding-xl;
|
||||||
|
|
||||||
|
background: none;
|
||||||
|
.ant-card-grid {
|
||||||
|
width: 300px;
|
||||||
|
height: 90px;
|
||||||
|
padding: @padding-xs @padding-sm;
|
||||||
|
|
||||||
|
background-color: @card-background;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -688,3 +688,10 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.yo-popover-infinite-scroll {
|
||||||
|
.ant-popover-inner-content {
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
max-height: 300px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
a.link-gray {
|
a.link-gray {
|
||||||
color: fade(@black, 50%);
|
color: fade(@white, 50%);
|
||||||
&:hover {
|
&:hover {
|
||||||
color: @link-hover-color;
|
color: @link-hover-color;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,3 +4,8 @@
|
|||||||
body {
|
body {
|
||||||
line-height: 1.42857143;
|
line-height: 1.42857143;
|
||||||
}
|
}
|
||||||
|
#root {
|
||||||
|
transition: @animation-duration-slow opacity;
|
||||||
|
|
||||||
|
opacity: 1 !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -75,6 +75,9 @@
|
|||||||
.ant-table-sticky-scroll {
|
.ant-table-sticky-scroll {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.ant-table-expanded-row>td {
|
||||||
|
border-right: @border-width-base @border-style-base @table-border-color !important;
|
||||||
|
}
|
||||||
.yo-table {
|
.yo-table {
|
||||||
.ant-table {
|
.ant-table {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
@@ -196,11 +199,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ant-table-tbody {
|
.ant-table-tbody {
|
||||||
>.ant-table-expanded-row-level-1>td {
|
>.ant-table-expanded-row>td {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
border-right: none !important;
|
border-right: none !important;
|
||||||
.ant-table-wrapper {
|
.ant-table-wrapper {
|
||||||
|
margin-bottom: -1px;
|
||||||
|
|
||||||
border: none;
|
border: none;
|
||||||
.ant-table {
|
.ant-table {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
@@ -215,20 +220,17 @@
|
|||||||
padding-left: @padding-md;
|
padding-left: @padding-md;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ant-table-expanded-row-level-1>td {
|
.ant-table-tbody {
|
||||||
padding: @padding-sm @padding-xs @padding-sm @padding-xl;
|
>tr {
|
||||||
|
&:last-child {
|
||||||
border-right: @border-width-base @border-style-base @table-border-color !important;
|
>td {
|
||||||
.ant-card {
|
border-bottom: @border-width-base @border-style-base @table-border-color;
|
||||||
max-width: fit-content;
|
}
|
||||||
margin-bottom: 0;
|
&:hover {
|
||||||
|
>td {
|
||||||
background: none;
|
border-bottom-color: lighten(@primary-color, 30%);
|
||||||
.ant-card-grid {
|
}
|
||||||
width: 300px;
|
}
|
||||||
padding: @padding-xs @padding-sm;
|
|
||||||
|
|
||||||
background-color: @card-background;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -237,4 +239,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ant-card {
|
||||||
|
max-width: fit-content;
|
||||||
|
margin: @padding-sm @padding-xs @padding-sm @padding-xl;
|
||||||
|
|
||||||
|
background: none;
|
||||||
|
.ant-card-grid {
|
||||||
|
width: 300px;
|
||||||
|
height: 90px;
|
||||||
|
padding: @padding-xs @padding-sm;
|
||||||
|
|
||||||
|
background-color: @card-background;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -682,3 +682,10 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.yo-popover-infinite-scroll {
|
||||||
|
.ant-popover-inner-content {
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
max-height: 300px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,34 +14,41 @@ const SETTING = JSON.parse(window.localStorage.getItem(SETTING_KEY)) || {
|
|||||||
theme: 'default'
|
theme: 'default'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let imp
|
||||||
|
|
||||||
if (SETTING.theme === 'dark') {
|
if (SETTING.theme === 'dark') {
|
||||||
require('./assets/style/dark/index.less')
|
imp = import('./assets/style/dark/index.less')
|
||||||
} else {
|
} else {
|
||||||
require('./assets/style/default/index.less')
|
imp = import('./assets/style/default/index.less')
|
||||||
}
|
}
|
||||||
|
|
||||||
moment.locale('zh-cn')
|
moment.locale('zh-cn')
|
||||||
|
|
||||||
//<React.StrictMode></React.StrictMode>
|
//<React.StrictMode></React.StrictMode>
|
||||||
|
|
||||||
ReactDOM.render(
|
const root = document.getElementById('root')
|
||||||
<ConfigProvider
|
root.style.opacity = 0
|
||||||
locale={zhCN}
|
|
||||||
renderEmpty={
|
|
||||||
() => (
|
|
||||||
<div className="text-center pt-md">
|
|
||||||
<AntIcon className="h3 mb-md" type="smile" />
|
|
||||||
<p>暂无数据</p>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Router />
|
|
||||||
</ConfigProvider>,
|
|
||||||
document.getElementById('root')
|
|
||||||
);
|
|
||||||
|
|
||||||
// If you want to start measuring performance in your app, pass a function
|
imp.then(() => {
|
||||||
// to log results (for example: reportWebVitals(console.log))
|
ReactDOM.render(
|
||||||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
<ConfigProvider
|
||||||
reportWebVitals();
|
locale={zhCN}
|
||||||
|
renderEmpty={
|
||||||
|
() => (
|
||||||
|
<div className="text-center pt-md">
|
||||||
|
<AntIcon className="h3 mb-md" type="smile" />
|
||||||
|
<p>暂无数据</p>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Router />
|
||||||
|
</ConfigProvider>,
|
||||||
|
root
|
||||||
|
);
|
||||||
|
|
||||||
|
// If you want to start measuring performance in your app, pass a function
|
||||||
|
// to log results (for example: reportWebVitals(console.log))
|
||||||
|
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
||||||
|
reportWebVitals();
|
||||||
|
})
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import { Form, Button, Input, Descriptions, message as Message, Modal, Spin, Tabs } from 'antd'
|
import { Form, Button, Input, Descriptions, message as Message, Modal, Spin, Tabs } from 'antd'
|
||||||
import { merge, isEqual } from 'lodash'
|
import { merge, isEqual, pickBy } from 'lodash'
|
||||||
import { AntIcon, ComponentDynamic, Container } from 'components'
|
import { AntIcon, ComponentDynamic, Container } from 'components'
|
||||||
import { api } from 'common/api'
|
import { api } from 'common/api'
|
||||||
|
|
||||||
@@ -90,6 +90,10 @@ export default class index extends Component {
|
|||||||
const { taskId } = this.props.param
|
const { taskId } = this.props.param
|
||||||
if (taskId) {
|
if (taskId) {
|
||||||
api.houseInfoGetByTaskId({ taskId }).then(({ data }) => {
|
api.houseInfoGetByTaskId({ taskId }).then(({ data }) => {
|
||||||
|
// 删除空节点
|
||||||
|
for (const key in data) {
|
||||||
|
data[key] = pickBy(data[key], p => p !== null && p !== undefined)
|
||||||
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
taskStatus: data.patrolInfo.status,
|
taskStatus: data.patrolInfo.status,
|
||||||
record: data,
|
record: data,
|
||||||
@@ -168,7 +172,6 @@ export default class index extends Component {
|
|||||||
this.formData.patrolInfo.id = this.props.param.taskId
|
this.formData.patrolInfo.id = this.props.param.taskId
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(this.formData)
|
|
||||||
this.setState({ saving: true })
|
this.setState({ saving: true })
|
||||||
|
|
||||||
if (action) {
|
if (action) {
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ import { Form, message as Message, Spin } from 'antd'
|
|||||||
import { AntIcon } from 'components'
|
import { AntIcon } from 'components'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import MonacoEditor from 'react-monaco-editor'
|
import MonacoEditor from 'react-monaco-editor'
|
||||||
|
import store from 'store'
|
||||||
|
|
||||||
|
const { getState } = store
|
||||||
|
|
||||||
const initialValues = {}
|
const initialValues = {}
|
||||||
|
|
||||||
@@ -10,6 +13,7 @@ export default class form extends Component {
|
|||||||
state = {
|
state = {
|
||||||
// 加载状态
|
// 加载状态
|
||||||
loading: true,
|
loading: true,
|
||||||
|
...getState('layout'),
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单实例
|
// 表单实例
|
||||||
@@ -83,6 +87,8 @@ export default class form extends Component {
|
|||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { theme } = this.state
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form initialValues={initialValues} ref={this.form} className="yo-form">
|
<Form initialValues={initialValues} ref={this.form} className="yo-form">
|
||||||
<Spin spinning={this.state.loading} indicator={<AntIcon type="loading" />}>
|
<Spin spinning={this.state.loading} indicator={<AntIcon type="loading" />}>
|
||||||
@@ -90,7 +96,7 @@ export default class form extends Component {
|
|||||||
<MonacoEditor
|
<MonacoEditor
|
||||||
height={300}
|
height={300}
|
||||||
language="json"
|
language="json"
|
||||||
theme="vs-dark"
|
theme={theme === 'dark' ? 'vs-dark' : 'default'}
|
||||||
options={{
|
options={{
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import { Badge, Divider, List, Menu, Modal, Popover, Row, Spin } from 'antd'
|
import { Badge, Button, Divider, List, Menu, Modal, Popover, Row, Spin } from 'antd'
|
||||||
import { AntIcon, Image } from 'components'
|
import { AntIcon, Image } from 'components'
|
||||||
import { api } from 'common/api'
|
import { api } from 'common/api'
|
||||||
import InfiniteScroll from 'react-infinite-scroller'
|
import InfiniteScroll from 'react-infinite-scroller'
|
||||||
@@ -69,7 +69,7 @@ export default class notice extends Component {
|
|||||||
loadMore={pageIndex => this.onInfiniteOnLoad(pageIndex)}
|
loadMore={pageIndex => this.onInfiniteOnLoad(pageIndex)}
|
||||||
hasMore={!loading && hasMore}
|
hasMore={!loading && hasMore}
|
||||||
useWindow={false}
|
useWindow={false}
|
||||||
threshold={100}
|
threshold={50}
|
||||||
>
|
>
|
||||||
<List
|
<List
|
||||||
itemLayout="vertical"
|
itemLayout="vertical"
|
||||||
@@ -79,14 +79,15 @@ export default class notice extends Component {
|
|||||||
<List.Item.Meta
|
<List.Item.Meta
|
||||||
avatar={<Image id={item.avatar} type="avatar" />}
|
avatar={<Image id={item.avatar} type="avatar" />}
|
||||||
title={
|
title={
|
||||||
<a
|
<>
|
||||||
className="ellipsis"
|
<a onClick={() => this.onOpenDetail(item.id)}>
|
||||||
onClick={() => this.onOpenDetail(item.id)}
|
{item.title}
|
||||||
>
|
</a>
|
||||||
{item.title}
|
<small className="text-normal ml-xs">
|
||||||
</a>
|
{moment(item.createdTime || item.publicTime).fromNow()}
|
||||||
|
</small>
|
||||||
|
</>
|
||||||
}
|
}
|
||||||
description={moment(item.createdTime || item.publicTime).fromNow()}
|
|
||||||
/>
|
/>
|
||||||
<div className="ellipsis-3 text-gray">{item.content}</div>
|
<div className="ellipsis-3 text-gray">{item.content}</div>
|
||||||
</List.Item>
|
</List.Item>
|
||||||
@@ -98,6 +99,11 @@ export default class notice extends Component {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</List>
|
</List>
|
||||||
|
{!hasMore && (
|
||||||
|
<Button type="text" block>
|
||||||
|
查看全部
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -110,8 +116,9 @@ export default class notice extends Component {
|
|||||||
arrowPointAtCenter={true}
|
arrowPointAtCenter={true}
|
||||||
placement="bottomRight"
|
placement="bottomRight"
|
||||||
content={this.renderList()}
|
content={this.renderList()}
|
||||||
overlayInnerStyle={{ width: 300, maxHeight: 300, overflowY: 'auto' }}
|
overlayInnerStyle={{ width: 300 }}
|
||||||
overlayStyle={{ zIndex: 999 }}
|
overlayStyle={{ zIndex: 999 }}
|
||||||
|
overlayClassName="yo-popover-infinite-scroll"
|
||||||
>
|
>
|
||||||
<span className="header-action">
|
<span className="header-action">
|
||||||
<Badge count={count}>
|
<Badge count={count}>
|
||||||
|
|||||||
Reference in New Issue
Block a user