Skip to content

Commit a87e39e

Browse files
committed
Synchronize the latest frontend code to adapt dss1.1.0 and linkis1.1.1.
1 parent 1b2a041 commit a87e39e

File tree

22 files changed

+83
-70
lines changed

22 files changed

+83
-70
lines changed

webapp/.gitignore

Lines changed: 0 additions & 14 deletions
This file was deleted.

webapp/app/app.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ import createRoutes from './routes'
8989

9090
import 'default-passive-events'
9191

92+
import webankUtil from '@webank/we-utils';
93+
9294
const initialState = {}
9395
const store = configureStore(initialState, hashHistory)
9496
const MOUNT_NODE = document.getElementById('app')
@@ -107,6 +109,13 @@ const rootRoute = {
107109
}
108110
}
109111
}
112+
const { username } = JSON.parse(localStorage.getItem('baseInfo') || '{}');
113+
if(window.top === window.self && username) {
114+
webankUtil.createWatermark({
115+
content: username,
116+
fillStyle: 'rgba(184, 184, 184, 0.4)',
117+
})
118+
}
110119

111120
const render = (messages) => {
112121
ReactDOM.render(

webapp/app/assets/js/geo.js

100755100644
File mode changed.

webapp/app/containers/Display/components/LayerList.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,14 @@ export class LayerList extends React.Component <ILayerListProps, ILayerListState
233233
onClick={this.changeLayerStatus(layer.id)}
234234
className={`iconfont ${layersStatus[layer.id].selected ? 'icon-selected' : 'icon-unselected'}`}
235235
/>
236-
{
237-
layer.subType === 21 ?
238-
// 说明是标签,需要可以编辑
239-
<Input placeholder="标签名,不能有空格" defaultValue={name} maxLength={50} onBlur={this.saveTagName(layer)} onPressEnter={this.saveTagName(layer)} style={{marginLeft: '4px', paddingLeft: '4px'}} /> :
240-
<span title={name}>{name}</span>
241-
}
236+
<Tooltip title={name} placement="right">
237+
{
238+
layer.subType === 21 ?
239+
// 说明是标签,需要可以编辑
240+
<Input placeholder="标签名,不能有空格" defaultValue={name} maxLength={50} onBlur={this.saveTagName(layer)} onPressEnter={this.saveTagName(layer)} style={{marginLeft: '4px', paddingLeft: '4px'}} /> :
241+
<span>{name}</span>
242+
}
243+
</Tooltip>
242244
</li>
243245
)
244246
})

webapp/app/containers/Display/sagas.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,10 @@ export function* deleteDisplay (action: DisplayActionType) {
189189
const { id } = action.payload
190190
const { displayDeleted, deleteDisplayFail } = DisplayActions
191191
try {
192-
yield call(request, `${api.display}/${id}`, {
193-
method: 'delete'
192+
yield call(request, {
193+
method: 'post',
194+
url: `${api.display}/${id}`,
195+
data: {}
194196
})
195197
yield put(displayDeleted(id))
196198
} catch (err) {

webapp/app/containers/Portal/sagas.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ export function* deletePortal (action) {
7575
const { payload } = action
7676
try {
7777
yield call(request, {
78-
method: 'delete',
79-
url: `${api.portal}/${payload.id}`
78+
method: 'post',
79+
url: `${api.portal}/${payload.id}`,
80+
data: {}
8081
})
8182
yield put(portalDeleted(payload.id))
8283
} catch (err) {

webapp/app/containers/Projects/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ export class Projects extends React.PureComponent<IProjectsProps, IProjectsState
534534
const joinProjects = projectArr
535535
? projectArr.map((d: IProject) => {
536536
let CreateButton = void 0
537+
let CreateDelButton = void 0
537538
let belongWhichOrganization = void 0
538539
if (d.type && d.type === 'add') {
539540
return []
@@ -546,6 +547,8 @@ export class Projects extends React.PureComponent<IProjectsProps, IProjectsState
546547
belongWhichOrganization = organizations.find((org) => org.id === d.orgId)
547548
CreateButton = ComponentPermission(belongWhichOrganization, '')(Icon)
548549
}
550+
// 默认显示删除按钮
551+
CreateDelButton = ComponentPermission({ role: 1 }, '')(Icon)
549552
let StarPanel = void 0
550553
if (d && d.id) {
551554
StarPanel = <Star d={d} starUser={starUserList} unStar={this.starProject} userList={this.getStarProjectUserList}/>
@@ -617,7 +620,7 @@ export class Projects extends React.PureComponent<IProjectsProps, IProjectsState
617620
onConfirm={this.confirmDeleteProject('onCollect', d.id)}
618621
>
619622
<Tooltip title="删除">
620-
<CreateButton
623+
<CreateDelButton
621624
className={styles.delete}
622625
type="delete"
623626
onClick={this.stopPPG}

webapp/app/containers/Projects/sagas.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,9 @@ export function* getBaseInfo (action) {
105105
const { resolve } = action.payload
106106
// 这里比较特殊 是请求dss的接口 地址要换下
107107
let url = api.projects
108-
console.log('url: ', url);
109108
url = url.replace('rest_s', 'rest_j')
110-
url = url.replace('visualis', 'dss/framework/workspace')
111-
url = url.replace('projects', 'getBaseInfo')
109+
url = url.replace('visualis', 'dss/framework/admin/user')
110+
url = url.replace('projects', 'userInfo')
112111
try {
113112
const asyncData = yield call(request, url)
114113
yield put(getBaseInfoLoaded())
@@ -161,8 +160,9 @@ export function* deleteProject (action) {
161160
const { id, resolve } = action.payload
162161
try {
163162
yield call(request, {
164-
method: 'delete',
165-
url: `${api.projects}/${id}`
163+
method: 'post',
164+
url: `${api.projects}/${id}`,
165+
data: {}
166166
})
167167
yield put(projectDeleted(id))
168168
if (resolve) {

webapp/app/containers/View/components/SqlPreview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import pivotStyles from '../../Widget/components/Pivot/Pivot.less'
1010
import { IExecuteSqlResponse, ISqlColumn } from '../types'
1111
import { DEFAULT_SQL_PREVIEW_PAGE_SIZE, SQL_PREVIEW_PAGE_SIZE_OPTIONS } from '../constants'
1212
import { getTextWidth } from 'utils/util'
13-
import WaterMask from '../../Widget/components/WaterMask/index'
13+
//import WaterMask from '../../Widget/components/WaterMask/index'
1414

1515
export interface ISqlPreviewProps {
1616
loading: boolean
@@ -117,7 +117,7 @@ export class SqlPreview extends React.PureComponent<ISqlPreviewProps, ISqlPrevie
117117

118118
return (
119119
<div className={pivotStyles.wrapper} style={{overflowY: 'auto', maxHeight: '100%'}}>
120-
<WaterMask {...waterMaskProps} />
120+
{/* <WaterMask {...waterMaskProps} /> */}
121121
<Table
122122
ref={this.table}
123123
className={Styles.sqlPreview}

webapp/app/containers/View/sagas.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ export function* deleteView (action: ViewActionType) {
116116
const { viewDeleted, deleteViewFail } = ViewActions
117117
try {
118118
yield call<AxiosRequestConfig>(request, {
119-
method: 'delete',
120-
url: `${api.view}/${payload.id}`
119+
method: 'post',
120+
url: `${api.view}/${payload.id}`,
121+
data: {}
121122
})
122123
yield put(viewDeleted(payload.id))
123124
payload.resolve(payload.id)

0 commit comments

Comments
 (0)