修改接口的状态,增加"设计中","开发中", 删除"未开始"

This commit is contained in:
2024-03-01 20:31:34 +08:00
parent 076c21dc36
commit 5cc1c349cd
6 changed files with 40 additions and 14 deletions

View File

@@ -1078,8 +1078,10 @@ class InterfaceEditForm extends Component {
label='状态'> label='状态'>
{getFieldDecorator('status', { initialValue: this.state.status })( {getFieldDecorator('status', { initialValue: this.state.status })(
<Select> <Select>
<Option value='designing'>设计中</Option>
<Option value='coding'>开发中</Option>
<Option value='done'>已完成</Option> <Option value='done'>已完成</Option>
<Option value='undone'>未完成</Option> {/*<Option value='undone'>未完成</Option>*/}
</Select>, </Select>,
)} )}
</FormItem> </FormItem>
@@ -1542,4 +1544,4 @@ export default Form.create({
onValuesChange() { onValuesChange() {
EditFormContext.props.changeEditStatus(true) EditFormContext.props.changeEditStatus(true)
} }
})(InterfaceEditForm) })(InterfaceEditForm)

View File

@@ -281,12 +281,21 @@ class InterfaceList extends Component {
className="select" className="select"
onChange={this.changeInterfaceStatus} onChange={this.changeInterfaceStatus}
> >
{/*<Option value={key + '-undone'}>*/}
{/* <span className="tag-status undone">未完成</span>*/}
{/*</Option>*/}
<Option value={key + '-designing'}>
<span className="tag-status designing">设计中</span>
</Option>
<Option value={key + '-coding'}>
<span className="tag-status coding">开发中</span>
</Option>
<Option value={key + '-done'}> <Option value={key + '-done'}>
<span className="tag-status done">已完成</span> <span className="tag-status done">已完成</span>
</Option> </Option>
<Option value={key + '-undone'}>
<span className="tag-status undone">未完成</span>
</Option>
</Select> </Select>
); );
}, },
@@ -295,9 +304,17 @@ class InterfaceList extends Component {
text: '已完成', text: '已完成',
value: 'done' value: 'done'
}, },
// {
// text: '未完成',
// value: 'undone'
// },
{ {
text: '未完成', text: '设计中',
value: 'undone' value: 'designing'
},
{
text: '开发中',
value: 'coding'
} }
], ],
onFilter: (value, record) => record.status.indexOf(value) === 0 onFilter: (value, record) => record.status.indexOf(value) === 0

View File

@@ -378,7 +378,8 @@ class View extends Component {
} }
] ]
let status = { let status = {
undone: '未完成', designing: '设计中',
coding: '开发中',
done: '已完成' done: '已完成'
} }
@@ -627,4 +628,4 @@ class View extends Component {
} }
} }
export default View export default View

View File

@@ -1 +1 @@
module.exports = {"notifier" : {module: require('yapi-plugin-notifier/client.js'),options: {"host":"http://localhost:3000"}},"interface-oauth2-token" : {module: require('yapi-plugin-interface-oauth2-token/client.js'),options: null},"add-user" : {module: require('yapi-plugin-add-user/client.js'),options: null},"pl-auto-test" : {module: require('yapi-plugin-pl-auto-test/client.js'),options: {"host":"http://localhost:3000"}},"api-watch" : {module: require('yapi-plugin-api-watch/client.js'),options: null},"import-swagger-customize" : {module: require('yapi-plugin-import-swagger-customize/client.js'),options: null},"export-schema" : {module: require('yapi-plugin-export-schema/client.js'),options: null},"import-postman" : {module: require('exts/yapi-plugin-import-postman/client.js'),options: null},"import-har" : {module: require('exts/yapi-plugin-import-har/client.js'),options: null},"advanced-mock" : {module: require('exts/yapi-plugin-advanced-mock/client.js'),options: null},"import-swagger" : {module: require('exts/yapi-plugin-import-swagger/client.js'),options: null},"statistics" : {module: require('exts/yapi-plugin-statistics/client.js'),options: null},"export-data" : {module: require('exts/yapi-plugin-export-data/client.js'),options: null},"gen-services" : {module: require('exts/yapi-plugin-gen-services/client.js'),options: null},"export-swagger2-data" : {module: require('exts/yapi-plugin-export-swagger2-data/client.js'),options: null},"import-yapi-json" : {module: require('exts/yapi-plugin-import-yapi-json/client.js'),options: null},"wiki" : {module: require('exts/yapi-plugin-wiki/client.js'),options: null},"swagger-auto-sync" : {module: require('exts/yapi-plugin-swagger-auto-sync/client.js'),options: null}} module.exports = {"import-postman" : {module: require('exts/yapi-plugin-import-postman/client.js'),options: null},"import-har" : {module: require('exts/yapi-plugin-import-har/client.js'),options: null},"advanced-mock" : {module: require('exts/yapi-plugin-advanced-mock/client.js'),options: null},"import-swagger" : {module: require('exts/yapi-plugin-import-swagger/client.js'),options: null},"statistics" : {module: require('exts/yapi-plugin-statistics/client.js'),options: null},"export-data" : {module: require('exts/yapi-plugin-export-data/client.js'),options: null},"gen-services" : {module: require('exts/yapi-plugin-gen-services/client.js'),options: null},"export-swagger2-data" : {module: require('exts/yapi-plugin-export-swagger2-data/client.js'),options: null},"import-yapi-json" : {module: require('exts/yapi-plugin-import-yapi-json/client.js'),options: null},"wiki" : {module: require('exts/yapi-plugin-wiki/client.js'),options: null},"swagger-auto-sync" : {module: require('exts/yapi-plugin-swagger-auto-sync/client.js'),options: null}}

View File

@@ -27,7 +27,7 @@ html {
/* 外层轨道 */ /* 外层轨道 */
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
-webkit-box-shadow: inset006pxrgba(255,0,0,0.3); -webkit-box-shadow: inset006pxrgba(255,0,0,0.3);
// background-color: // background-color:
background: rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.1);
} }
/* 滚动条滑块 */ /* 滚动条滑块 */
@@ -158,6 +158,12 @@ em {
&.undone::before { &.undone::before {
background-color: #ff561b; background-color: #ff561b;
} }
&.designing::before {
background-color: #d3adf7;
}
&.coding::before {
background-color: #4096ff;
}
} }
@@ -228,4 +234,4 @@ em {
&:hover { &:hover {
color: #2395f1; color: #2395f1;
} }
} }

View File

@@ -15,7 +15,7 @@ class interfaceModel extends baseModel {
project_id: { type: Number, required: true }, project_id: { type: Number, required: true },
catid: { type: Number, required: true }, catid: { type: Number, required: true },
edit_uid: { type: Number, default: 0 }, edit_uid: { type: Number, default: 0 },
status: { type: String, enum: ['undone', 'done'], default: 'undone' }, status: { type: String, enum: ['designing','coding', 'done'], default: 'designing' },
desc: String, desc: String,
markdown: String, markdown: String,
add_time: Number, add_time: Number,
@@ -357,4 +357,4 @@ class interfaceModel extends baseModel {
} }
} }
module.exports = interfaceModel module.exports = interfaceModel