diff --git a/web/packages/apiServices/i18n/en.json b/web/packages/apiServices/i18n/en.json index ea3eceb9d..ea6c18c29 100644 --- a/web/packages/apiServices/i18n/en.json +++ b/web/packages/apiServices/i18n/en.json @@ -69,6 +69,7 @@ "applicant": "Applicant:", "status": "Status", "find": "Find", + "approve": "Submit Approval", "path": "API Path:", "submitter": "Submitter", "scriptsPath": "Scripts Path:" @@ -93,6 +94,8 @@ "reason": "Reason", "ip_whitelist": "Ip Whitelist", "apply_time": "Apply Time", + "applySource": "Apply Source", + "proxyExecuteUser": "Execute User", "caller": "Caller", "access": "Access", "version": "Version", @@ -133,6 +136,8 @@ "disable": "Stop", "normal": "Normal", "expired": "Expired", + "submited": "已提单", + "unsubmit": "未提单", "all": "All", "updateApiModal": { "modalTitle": "Update API", diff --git a/web/packages/apiServices/i18n/zh.json b/web/packages/apiServices/i18n/zh.json index 3ed8a18b8..96998a7b8 100644 --- a/web/packages/apiServices/i18n/zh.json +++ b/web/packages/apiServices/i18n/zh.json @@ -71,6 +71,7 @@ "path": "API路径:", "submitter": "提交人", "find": "查询", + "approve": "批量提交审批", "scriptsPath": "脚本路径:" }, "buttonText": { @@ -102,6 +103,8 @@ "reason": "申请原因", "ip_whitelist": "白名单IP", "apply_time": "申请起始时间", + "applySource": "审批单号", + "executeUser": "代理执行用户", "caller": "调用方", "access": "限流情况", "version": "版本号", @@ -133,6 +136,8 @@ "disable": "已禁用", "normal": "正常", "expired": "已过期", + "submited": "已提单", + "unsubmit": "未提单", "all": "全部", "updateApiModal": { "modalTitle": "数据服务API更新", diff --git a/web/packages/apiServices/module/apiServices/apiCard.vue b/web/packages/apiServices/module/apiServices/apiCard.vue index d8d90176f..d035bc2de 100644 --- a/web/packages/apiServices/module/apiServices/apiCard.vue +++ b/web/packages/apiServices/module/apiServices/apiCard.vue @@ -24,7 +24,8 @@ -
{{ desc }}
+
描述:{{ desc ? desc : '--' }}
+
当前运行中版本:{{title.versionVos && title.versionVos[0] && title.versionVos[0].version ? title.versionVos[0].version : '--'}} 有新版本
@@ -159,16 +160,42 @@ export default { } } .desc { - text-indent: 2em; - overflow: hidden; - text-overflow: ellipsis; + width: 100%; + // font-size: 0.65rem; + // margin: 8px 0; + // word-break: break-all; /* 单词内部也可断行 */ + // word-wrap: break-word; /* 允许单词内部断行,并自动溢出,即换行 */ + // text-indent: 2em; + + // 最多两行 多的在第二行最后显示... + // white-space: nowrap; + // overflow: hidden; + // text-overflow: ellipsis; + // display: -webkit-box; + // -webkit-line-clamp: 2; + // -webkit-box-orient: vertical; + display: -webkit-box; - // margin-bottom: 10px; - line-height: 1.5; - font-size: 0.8rem; - height: 2.4rem; - -webkit-line-clamp: 2; -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + text-overflow: ellipsis; + overflow: hidden; + margin-bottom: 4px; + margin-top: 4px; + height: 36px; + word-wrap: break-word; /* 在需要时断开字符 */ + word-break: break-all; /* 在需要时断开单词 */ + } + .version { + font-size: 0.65rem; + padding: 0px 0 8px 0; + height: 34px; + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + word-break: break-all; /* 单词内部也可断行 */ + word-wrap: break-word; /* 允许单词内部断行,并自动溢出,即换行 */ } .floor { text-align: center; diff --git a/web/packages/apiServices/module/apiServices/index.vue b/web/packages/apiServices/module/apiServices/index.vue index ba7baa685..5e4d08bf9 100644 --- a/web/packages/apiServices/module/apiServices/index.vue +++ b/web/packages/apiServices/module/apiServices/index.vue @@ -2,7 +2,10 @@

- + {{$t('message.apiServices.title')}}

@@ -24,6 +27,7 @@ +
@@ -411,6 +415,13 @@ export default { this.getTagList(); this.username = this.getUserName(); }, + mounted() { + // 切到非第一页,进入 管理页,再返回数据服务首页,要保留进管理页之前的分页 + if (sessionStorage.getItem('apiservicesCurrentPage') && sessionStorage.getItem('apiservicesCurrentPage') !== 'null' && sessionStorage.getItem('apiservicesCurrentPage') !== 'undefined') { + this.page.pageNow = Number(sessionStorage.getItem('apiservicesCurrentPage')); + sessionStorage.removeItem('apiservicesCurrentPage') + } + }, computed: { pageDatalist() {// 展示的数据 let list = this.apiData; @@ -504,6 +515,9 @@ export default { } }) }, + gotoSubmit() { + this.$router.push({ name: 'ServicesSubmit', query: { workspaceId: this.$route.query.workspaceId} }) + }, changeVisual(type) { this.visual = type; }, @@ -517,6 +531,7 @@ export default { commonAction(row, arg) { // 更多操作的id const id = arg[0]; if (id === 1) { // 跳到管理页 + sessionStorage.setItem('apiservicesCurrentPage', this.page.pageNow) this.$router.push({path: '/servicesMangement',query: {apiId: arg[0], workspaceId: this.$route.query.workspaceId, id: row.id, scriptPath: row.scriptPath }}) } else if(id === 2) { // 禁用、启用 // 发起请求 @@ -653,6 +668,7 @@ export default { height: $percent-all; display: flex; flex-direction: column; + overflow: auto; .title, .search-bar, .workspace-header-right, .page-bar { flex: none; } @@ -719,9 +735,9 @@ export default { display: flex; align-items: $align-center; justify-content: space-between; - // .tabs-content { - // flex: 1; - // } + .tabs-content { + max-width: calc(100% - 150px); + } .showAll { margin: 0 10px; color: $primary-color; diff --git a/web/packages/apiServices/module/servicesMangement/component/APIVersions.vue b/web/packages/apiServices/module/servicesMangement/component/APIVersions.vue index d6ae30a3e..8b51b3a0f 100644 --- a/web/packages/apiServices/module/servicesMangement/component/APIVersions.vue +++ b/web/packages/apiServices/module/servicesMangement/component/APIVersions.vue @@ -120,12 +120,14 @@ export default { key: "status", align: "center", render: (h, scope) => { + const colors = ['red','rgb(18, 150, 219)','#0F1222','#F29360'] + const list = [this.$t('message.apiServices.disable'),this.$t('message.apiServices.enable'),this.$t('message.apiServices.unsubmit'),this.$t('message.apiServices.submited')] return h( "span", { - style: { color: scope.row.status === 1 ? 'rgb(18, 150, 219)': 'red'} + style: { color: colors[scope.row.status]} }, - scope.row.status === 1 ? this.$t('message.apiServices.enable') : this.$t('message.apiServices.disable') + list[scope.row.status] ); } }, @@ -139,6 +141,11 @@ export default { key: "creator", align: "center" }, + { + title: this.$t('message.apiServices.apiTable.executeUser'), + key: "executeUser", + align: "center" + }, { title: this.$t('message.apiServices.apiTable.publishDateStr'), key: "createTime", diff --git a/web/packages/apiServices/module/servicesMangement/component/TokenAuthorization.vue b/web/packages/apiServices/module/servicesMangement/component/TokenAuthorization.vue index d12307ab8..e1f566fb0 100644 --- a/web/packages/apiServices/module/servicesMangement/component/TokenAuthorization.vue +++ b/web/packages/apiServices/module/servicesMangement/component/TokenAuthorization.vue @@ -16,6 +16,9 @@ + + + + + +
-
+
-
- - - - - - - - - -
- + - + - @@ -157,75 +143,46 @@ :model="updateApiData" :label-width="120" > - - + + + + + + + + + + + + + {{$t('message.scripts.apiPublish.updateApiModal.paramConfirm')}} + + +
- - -