diff --git a/client/containers/Project/Interface/InterfaceCol/InterfaceColMenu.scss b/client/containers/Project/Interface/InterfaceCol/InterfaceColMenu.scss index 1c64dbdd..6e61aa87 100644 --- a/client/containers/Project/Interface/InterfaceCol/InterfaceColMenu.scss +++ b/client/containers/Project/Interface/InterfaceCol/InterfaceColMenu.scss @@ -8,6 +8,9 @@ .case-delete-icon{ display: none; } + i:before{ + line-height: 17px; + } } .menu-title:hover { .case-delete-icon { diff --git a/client/containers/Project/Interface/InterfaceList/Edit.scss b/client/containers/Project/Interface/InterfaceList/Edit.scss index 8de2769f..53000af9 100644 --- a/client/containers/Project/Interface/InterfaceList/Edit.scss +++ b/client/containers/Project/Interface/InterfaceList/Edit.scss @@ -11,4 +11,7 @@ margin-left: 5px; cursor: pointer } + .ant-select-selection__rendered{ + line-height: 34px; + } } \ No newline at end of file diff --git a/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js b/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js index 4a6bf061..40ad9d49 100644 --- a/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js +++ b/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js @@ -410,7 +410,7 @@ class InterfaceEditForm extends Component { {getFieldDecorator('path', { initialValue: this.state.path, rules: [{ - required: true, message: '清输入接口路径!' + required: true, message: '请输入接口路径!' }] })( diff --git a/client/containers/Project/Interface/InterfaceList/View.js b/client/containers/Project/Interface/InterfaceList/View.js index da50fe05..10b7b41b 100644 --- a/client/containers/Project/Interface/InterfaceList/View.js +++ b/client/containers/Project/Interface/InterfaceList/View.js @@ -43,6 +43,10 @@ class View extends Component { dataIndex: 'name', key: 'name' }, { + title: '参数类型', + dataIndex: 'type', + key: 'type' + },{ title: '是否必须', dataIndex: 'required', key: 'required' @@ -60,7 +64,8 @@ class View extends Component { key: i, name: item.name, value: item.desc, - required: item.required?"必须":"非必须" + required: item.required?"必须":"非必须", + type: item.type === "text"?"文本":"文件" }) }) } @@ -224,8 +229,14 @@ class View extends Component { done: "完成" } let statusColor = { - undone: "rgb(255, 85, 0)", - done: "#cfefdf" + undone: { + bac: "rgb(255, 85, 0)", + color: "white" + }, + done:{ + bac: "rgb(135, 208, 104)", + color: "white" + } } let methodColor = { post: { @@ -236,28 +247,29 @@ class View extends Component { bac: "#cfefdf", color: "#00a854" }, - input: { - bac: "#57cf27", - color: "#9c82a2" + put: { + bac: "#fff3cf", + color: "#ffbf00" }, delete: { - bac: "#57cf27", - color: "#57cf27" + bac: "#fcdbd9", + color: "#f04134" }, head: { - bac: "#d4d5f7", - color: "#0b47ef" + bac: "#fff3cf", + color: "#ffbf00" }, patch: { - bac: "#f9f4e1", - color: "#fac200" + bac: "#fff3cf", + color: "#ffbf00" }, options: { - bac: "#f7cdf5", - color: "#fa00f2" + bac: "#fff3cf", + color: "#ffbf00" } } methodColor = methodColor[this.props.curData.method?this.props.curData.method.toLowerCase():"get"]; + statusColor = statusColor[this.props.curData.status?this.props.curData.status.toLowerCase():"undone"] if(!methodColor) methodColor = "get"; let res =
@@ -266,7 +278,7 @@ class View extends Component {
请求方法: - {this.props.curData.method} + {this.props.curData.method}
接口路径: @@ -274,7 +286,7 @@ class View extends Component {
状态: - {status[this.props.curData.status]} + {status[this.props.curData.status]}
创建时间: diff --git a/server_dist/controllers/interface.js b/server_dist/controllers/interface.js index f127239e..23b05b91 100644 --- a/server_dist/controllers/interface.js +++ b/server_dist/controllers/interface.js @@ -110,7 +110,7 @@ var interfaceController = function (_baseController) { (0, _createClass3.default)(interfaceController, [{ key: 'add', value: function () { - var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) { var _this2 = this; var params, auth, checkRepeat, data, result; @@ -278,7 +278,7 @@ var interfaceController = function (_baseController) { }, { key: 'get', value: function () { - var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) { + var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) { var params, result; return _regenerator2.default.wrap(function _callee2$(_context2) { while (1) { @@ -340,7 +340,7 @@ var interfaceController = function (_baseController) { }, { key: 'list', value: function () { - var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) { + var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) { var project_id, result; return _regenerator2.default.wrap(function _callee3$(_context3) { while (1) { @@ -390,7 +390,7 @@ var interfaceController = function (_baseController) { }, { key: 'listByCat', value: function () { - var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) { + var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ctx) { var catid, result; return _regenerator2.default.wrap(function _callee4$(_context4) { while (1) { @@ -440,7 +440,7 @@ var interfaceController = function (_baseController) { }, { key: 'listByMenu', value: function () { - var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) { + var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) { var project_id, result, newResult, i, item, list, j; return _regenerator2.default.wrap(function _callee5$(_context5) { while (1) { @@ -545,7 +545,7 @@ var interfaceController = function (_baseController) { }, { key: 'up', value: function () { - var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) { + var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) { var _this3 = this; var params, id, interfaceData, auth, checkRepeat, data, result, username, cateid; @@ -751,7 +751,7 @@ var interfaceController = function (_baseController) { }, { key: 'del', value: function () { - var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) { + var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) { var _this4 = this; var id, data, auth, inter, result, username; @@ -848,7 +848,7 @@ var interfaceController = function (_baseController) { }, { key: 'solveConflict', value: function () { - var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) { + var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) { var _this5 = this; var id, result, userInst, userinfo, data; @@ -931,7 +931,7 @@ var interfaceController = function (_baseController) { }, { key: 'addCat', value: function () { - var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) { + var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) { var params, auth, result, username; return _regenerator2.default.wrap(function _callee9$(_context9) { while (1) { @@ -1026,7 +1026,7 @@ var interfaceController = function (_baseController) { }, { key: 'upCat', value: function () { - var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) { + var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) { var params, result, username, cate, auth; return _regenerator2.default.wrap(function _callee10$(_context10) { while (1) { @@ -1098,7 +1098,7 @@ var interfaceController = function (_baseController) { }, { key: 'delCat', value: function () { - var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) { + var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) { var id, catData, auth, username, result, r; return _regenerator2.default.wrap(function _callee11$(_context11) { while (1) {