|
|
@@ -117,11 +117,20 @@ class Schema extends Component {
|
|
|
:
|
|
|
<div className={'schema'}>
|
|
|
<span className={'schema-name'}>{this.state.schemaName}</span>
|
|
|
- <Icon style={{marginLeft: 15}} type="edit" theme="twoTone"
|
|
|
- onClick={() => {
|
|
|
- this.setState({editSchemaName: this.state.schemaName})
|
|
|
- }
|
|
|
- }/>
|
|
|
+ {
|
|
|
+ userID === 'ioobot' ?
|
|
|
+ ''
|
|
|
+ :
|
|
|
+ <Icon style={{marginLeft: 15}}
|
|
|
+ type="edit"
|
|
|
+ theme="twoTone"
|
|
|
+ onClick={
|
|
|
+ () => {
|
|
|
+ this.setState({editSchemaName: this.state.schemaName})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ />
|
|
|
+ }
|
|
|
</div>
|
|
|
}
|
|
|
|
|
|
@@ -132,15 +141,21 @@ class Schema extends Component {
|
|
|
<Col span={10}><span
|
|
|
className={'schema-table-title'}>Remark</span></Col>
|
|
|
<Col span={2} offset={2}>
|
|
|
- <span
|
|
|
- className={'schema-table-title'}
|
|
|
- onClick={() => {
|
|
|
- this.setState({
|
|
|
- currentTable: 'add'
|
|
|
- })
|
|
|
- }}>
|
|
|
- <Icon type="plus"/>
|
|
|
- </span>
|
|
|
+ {
|
|
|
+ userID === 'ioobot' ?
|
|
|
+ ''
|
|
|
+ :
|
|
|
+ <span
|
|
|
+ className={'schema-table-title'}
|
|
|
+ onClick={() => {
|
|
|
+ this.setState({
|
|
|
+ currentTable: 'add'
|
|
|
+ })
|
|
|
+ }}>
|
|
|
+ <Icon type="plus"/>
|
|
|
+ </span>
|
|
|
+ }
|
|
|
+
|
|
|
</Col>
|
|
|
</Row>
|
|
|
</div>
|
|
|
@@ -155,25 +170,30 @@ class Schema extends Component {
|
|
|
span={10}
|
|
|
onClick={() => this.switchTable(table.name)}
|
|
|
>
|
|
|
- <span
|
|
|
- className={'schema-table-content name'}>{table.name}</span>
|
|
|
+ <span className={'schema-table-content name'}>{table.name}</span>
|
|
|
</Col>
|
|
|
<Col span={10}>
|
|
|
- <span
|
|
|
- className={'schema-table-content'}>{table.remark}</span>
|
|
|
+ <span className={'schema-table-content'}>{table.remark}</span>
|
|
|
</Col>
|
|
|
<Col span={2} offset={2}>
|
|
|
- <span className={'schema-table-content'}>
|
|
|
- <DeleteTableButton
|
|
|
- currentTable={table.name}
|
|
|
- currentTableIndex={data.findIndex(obj => obj.name === table.name)}
|
|
|
- schemaID={this.state.schemaID}
|
|
|
- userID={userID}
|
|
|
- showTablePagination={this.showTablePagination}
|
|
|
- page={this.state.page}
|
|
|
- pageSize={this.state.pageSize}
|
|
|
- />
|
|
|
- </span>
|
|
|
+
|
|
|
+ <span className={'schema-table-content'}>
|
|
|
+ {
|
|
|
+ userID === 'ioobot'?
|
|
|
+ ''
|
|
|
+ :
|
|
|
+ <DeleteTableButton
|
|
|
+ currentTable={table.name}
|
|
|
+ currentTableIndex={data.findIndex(obj => obj.name === table.name)}
|
|
|
+ schemaID={this.state.schemaID}
|
|
|
+ userID={userID}
|
|
|
+ showTablePagination={this.showTablePagination}
|
|
|
+ page={this.state.page}
|
|
|
+ pageSize={this.state.pageSize}
|
|
|
+ />
|
|
|
+ }
|
|
|
+
|
|
|
+ </span>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
</div>
|
|
|
@@ -197,12 +217,17 @@ class Schema extends Component {
|
|
|
</Col>
|
|
|
<Col span={2} offset={2}>
|
|
|
<span className={'schema-table-content'}>
|
|
|
- <DeleteTableButton
|
|
|
- currentTable={table.name}
|
|
|
- currentTableIndex={data.findIndex(obj => obj.name === table.name)}
|
|
|
- schemaID={this.state.schemaID}
|
|
|
- userID={userID}
|
|
|
- />
|
|
|
+ {
|
|
|
+ userID === 'ioobot'?
|
|
|
+ ''
|
|
|
+ :
|
|
|
+ <DeleteTableButton
|
|
|
+ currentTable={table.name}
|
|
|
+ currentTableIndex={data.findIndex(obj => obj.name === table.name)}
|
|
|
+ schemaID={this.state.schemaID}
|
|
|
+ userID={userID}
|
|
|
+ />
|
|
|
+ }
|
|
|
</span>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
@@ -215,12 +240,24 @@ class Schema extends Component {
|
|
|
<div className={'schema-bottom'}>
|
|
|
<Row>
|
|
|
<Col span={4}>
|
|
|
- <div className={'delete-schema'}>
|
|
|
- <DeleteSchemaButton
|
|
|
- userID={userID}
|
|
|
- schemaName={this.state.schemaName}
|
|
|
- />
|
|
|
- </div>
|
|
|
+ {
|
|
|
+ userID === 'ioobot'?
|
|
|
+ <div className={'delete-schema'}>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ onClick={()=>{
|
|
|
+ console.log('我还没做');
|
|
|
+ }}
|
|
|
+ >copy</Button>
|
|
|
+ </div>
|
|
|
+ :
|
|
|
+ <div className={'delete-schema'}>
|
|
|
+ <DeleteSchemaButton
|
|
|
+ userID={userID}
|
|
|
+ schemaName={this.state.schemaName}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ }
|
|
|
</Col>
|
|
|
<Col span={4} offset={16}>
|
|
|
<div className={'pagination'}>
|
|
|
@@ -451,8 +488,7 @@ class DeleteTableButton extends Component {
|
|
|
class ModifySchemaNameInput extends Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
- this.state = {
|
|
|
- }
|
|
|
+ this.state = {}
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
@@ -483,9 +519,9 @@ class ModifySchemaNameInput extends Component {
|
|
|
});
|
|
|
this.props.history.push({
|
|
|
pathname: `/graphql-service/my-create/${value}`,
|
|
|
- state:{
|
|
|
- schemaName:value,
|
|
|
- schemaID:this.props.schemaID,
|
|
|
+ state: {
|
|
|
+ schemaName: value,
|
|
|
+ schemaID: this.props.schemaID,
|
|
|
}
|
|
|
});
|
|
|
this.props.clearEditSchemaName();
|