diff --git a/src/i18n/language-zh.js b/src/assets/i18n/language-zh.js similarity index 100% rename from src/i18n/language-zh.js rename to src/assets/i18n/language-zh.js diff --git a/src/components/deployment-info.vue b/src/components/deployment-info.vue index 343fcb85a320382a15733468f8c0c8baab482976..89a05ae9721a6c583d7ceef5e6e60bcb16f75a61 100644 --- a/src/components/deployment-info.vue +++ b/src/components/deployment-info.vue @@ -24,10 +24,12 @@
-

+
+

+ + +

+
@@ -84,7 +86,6 @@ export default { return; } - console.log(state); this.selectedState = state; }, }, @@ -134,10 +135,30 @@ export default { .state_detail { height: 500px; flex-grow: 1; + padding: 25px 40px; border-radius: 7px; background-color: #f8f9fd; overflow: hidden; } +.state_message { + height: 100%; + overflow: auto; +} +.state_message > p { + white-space: nowrap; + padding: 10px 0; +} +.state_message > p > span { + display: inline-block; + vertical-align: middle; + font-size: 14px; + line-height: 22px; + color: #242c43; +} +.state_message > p > span:first-child { + width: 65px; + color: #8890a7; +} .icon_and_text > * { display: inline-block; vertical-align: middle; diff --git a/src/components/infoList.vue b/src/components/infoList.vue index 1339c712297eb98be5eac44fcbcc7a17f093d71a..95d66412b0a8ebd3554d7f7295dce78ae1e88b77 100644 --- a/src/components/infoList.vue +++ b/src/components/infoList.vue @@ -6,39 +6,42 @@ {{ item.title }}

- 访问地址: {{ item.info }} + + 访问地址: + {{ item.info }} + - 下载文件 + 下载文件

- + diff --git a/src/components/menu-copy.vue b/src/components/menu-copy.vue deleted file mode 100644 index e9a2454b1aae6c094bb50cce5f25d95b353e4a1f..0000000000000000000000000000000000000000 --- a/src/components/menu-copy.vue +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/components/menu-permission.vue b/src/components/menu-permission.vue index c7b42db044247e9a872506b627c37864189c88ee..101fa03b6661317f51d7a9ad2a4e47e8fa9ae738 100644 --- a/src/components/menu-permission.vue +++ b/src/components/menu-permission.vue @@ -121,7 +121,7 @@ export default { return; } - console.log("menu permission init."); + // console.log("menu permission init."); let permissionsList = this.deepClone(this.list); let permissions = this.permissions; @@ -190,21 +190,38 @@ export default { this.uppermissions(); }, initPermissionsList() { - this.permissionsList.forEach((item) => { - this.traverse(item, (item) => { - let selected = item.selected; + const getSelectedState = (item) => { + let selected = item.selected; + let child = item.Child || []; - if (item.selected !== 0) { - let allSelcted = true; + if (child.length > 0 && selected !== 0) { + let selectedLength1 = 0; + let selectedLength2 = 0; - item.Child && - item.Child.forEach((v) => { - allSelcted = v.selected === 0 && allSelcted; - }); + child.forEach((v) => { + let v_selected = getSelectedState(v); - this.$set(item, "selected", allSelcted ? 1 : 2); + if (v_selected === 1) { + selectedLength1++; + } else if (v_selected === 2) { + selectedLength2++; + } + }); + + if (selectedLength1 === child.length) { + selected = 1; + } else if (selectedLength1 + selectedLength2 > 0) { + selected = 2; } - }); + + item.selected = selected; + } + + return selected; + }; + + this.permissionsList.forEach((item) => { + getSelectedState(item); }); // this.$emit("change-list", this.permissionsList); diff --git a/src/components/menu.vue b/src/components/menu.vue index dcb5821026adde2bc40fed009a3d8ff5755efa2f..1da649c10548c9181783ef66dc708717d2c7acff 100644 --- a/src/components/menu.vue +++ b/src/components/menu.vue @@ -78,18 +78,18 @@ v-for="(item, index) in menu_arr" :key="index + 200" class="menu_box user_hover" - @click="navAction(index, item.path)" + @click="navAction(index, item.visit_url)" :style="{ color: now_menu == index ? '#fff' : '' }" > - {{ item.name }} -
+ {{ item.menu_name }} +
{{ v.name }}
+ >{{ v.menu_name }}
-
+
@@ -100,70 +100,13 @@ export default { data() { return { - menu_arr: [ - { - name: "工作台", - path: "/workplace", - children: [ - { - name: "服务注册", - path: "/fwzc/fwcs" - }, - { - name: "服务管理", - path: "/fwgl/" - }, - { - name: "应用管理", - path: "/yygl/" - } - ] - }, - { - name: "技术支持", - path: "/xxx" - }, - { - name: "服务超市", - path: "/services_shop", - children: [ - { - name: "数据服务", - path: "/shop/data_service_list/5" - }, - { - name: "时空服务", - path: "/shop/space_time_service_list/6" - }, - { - name: "视频服务", - path: "/shop/video_service_list/7" - }, - { - name: "感知服务", - path: "/shop/perception_service_list/10" - }, - { - name: "综合应用", - path: "/shop/comprehensive_app_list/11" - }, - { - name: "云资源服务", - path: "/shop/cloud" - }, - { - name: "应用商店", - path: "/shop/app_store_list/12" - } - ] - } - ], + menu_arr: [], now_menu: 2, user_arr: [ { name: "个人档案", path: "/user/user_info" }, { name: "消息通知", path: "/user/message" }, - { name: "收银中心", path: "/authority" }, - { name: "关于BD-aPaaS", path: "/data_analysis" }, + { name: "收银中心", path: "" }, + { name: "关于BD-aPaaS", path: "" }, { name: "退出登录", path: "logout" } ], shopping_list: [], @@ -171,7 +114,7 @@ export default { }; }, mounted() { - this.getMenuIndex(); + this.getNowMenu(); this.getList(); }, computed: { @@ -218,14 +161,14 @@ export default { window.sessionStorage.setItem("menuIndex", index); }, gotoChildPage(v, parent) { - if (v.path) { - if (v.path == "/fwgl/" || v.path == "/yygl/") { - this.$router.push(v.path + this.$store.getters.level); + if (v.visit_url) { + if (v.visit_url == "/fwgl/" || v.visit_url == "/yygl/") { + this.$router.push(v.visit_url + this.$store.getters.level); } else if (parent == 2) { - this.$router.push(v.path); - this.$store.commit("serviceShopMenuAct", v.path); + this.$router.push(v.visit_url); + this.$store.commit("serviceShopMenuAct", v.visit_url); } else { - this.$router.push(v.path); + this.$router.push(v.visit_url); } this.now_menu = parent; window.sessionStorage.setItem("menuIndex", parent); @@ -249,6 +192,14 @@ export default { let index = window.sessionStorage.getItem("menuIndex"); console.log(index); this.now_menu = index ? index : 2; + }, + getNowMenu() { + this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => { + if (response.data.success == 1) { + this.menu_arr = response.data.data[0].Child; + this.getMenuIndex(); + } + }); } } }; diff --git a/src/components/order-list/order-list-cell.vue b/src/components/order-list/order-list-cell.vue index f294eccf12d655625afd47f6758a0a0319a94399..6dc35770f3d766fc07bff93a31847ad4202fd963 100644 --- a/src/components/order-list/order-list-cell.vue +++ b/src/components/order-list/order-list-cell.vue @@ -23,18 +23,25 @@ -
+
规格:日访问次数:{{ cellItem.spec_svc_count }}次,日访问量:{{ cellItem.spec_svc_pv }}
申请方式:{{ cellItem.duration_unit == 1 ? $t('lang.byMonth') : $t('lang.byYear') }}
+
+
规格:{{ cellItem.spec_app == 0 ? "申请获取应用镜像部署权限" : "申请获取应用镜像开发权限" }}
+
+
+
规格:CPU 2核,内存 4GB,容器组 8个;数据盘 3块,每块数据盘容量 2GB
+
单个容器组:CPU最高 4核,默认 2核;内存最高 8 GB,默认 4GB
+
待审核
审核中
审核通过
审核未通过
diff --git a/src/components/service-tabs/service-tab-detail.vue b/src/components/service-tabs/service-tab-detail.vue index 3607c0c789ee9e1e5cdf5d124a27fd89c5423f14..3f51a69a7868e84949d52e2484c8358b23ca444d 100644 --- a/src/components/service-tabs/service-tab-detail.vue +++ b/src/components/service-tabs/service-tab-detail.vue @@ -8,7 +8,6 @@

    -
  • +
  • - {{ item.label }} + {{ item.menu_name }}
@@ -20,57 +22,7 @@ export default { data() { return { actives: "", - menuList: [ - { - id: 0, - label: "数据服务", - router: "/shop/data_service_list/5", - active: "tool_ic_shujufw_sel", - default: "tool_ic_shujufw" - }, - { - id: 1, - label: "时空服务", - router: "/shop/space_time_service_list/6", - active: "tool_ic_shikongfw_sel", - default: "tool_ic_shikongfw" - }, - { - id: 2, - label: "视频服务", - router: "/shop/video_service_list/7", - active: "tool_ic_shipinfw_sel", - default: "tool_ic_shipinfw" - }, - { - id: 3, - label: "感知服务", - router: "/shop/perception_service_list/10", - active: "tool_ic_ganzhifw_sel", - default: "tool_ic_ganzhifw" - }, - { - id: 4, - label: "综合服务", - router: "/shop/comprehensive_app_list/11", - active: "tool_ic_zongheyyfw_sel", - default: "tool_ic_zongheyyfw" - }, - { - id: 5, - label: "云资源服务", - router: "/shop/cloud", - active: "tool_ic_yunziyuanfw_sel", - default: "tool_ic_yunziyuanfw" - }, - { - id: 6, - label: "应用商店", - router: "/shop/app_store_list/12", - active: "tool_ic_yingyongsd_sel", - default: "tool_ic_yingyongsd" - } - ] + menuList: [] }; }, computed: { @@ -84,6 +36,7 @@ export default { } }, mounted() { + this.getShopMenu(); this.$store.commit("serviceShopMenuAct", this.$route.path); this.actives = this.$store.state.serviceShopMenu; }, @@ -94,6 +47,60 @@ export default { getActiveMenu(val) { this.actives = val; this.$router.push(val); + }, + getShopMenu() { + this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => { + if (response.data.success == 1) { + let arr = response.data.data[0].Child; + let shopArr = []; + arr.forEach(item => { + if (item.visit_url == "/services_shop") { + shopArr = item.Child; + } + }); + shopArr.forEach(item => { + let uri = item.visit_url.substring(6); + if (uri.indexOf("/") != -1) { + uri = uri.substring(0, uri.indexOf("/")); + } + switch (uri) { + case "data_service_list": + item.active = "tool_ic_shujufw_sel"; + item.default = "tool_ic_shujufw"; + break; + case "space_time_service_list": + item.active = "tool_ic_shikongfw_sel"; + item.default = "tool_ic_shikongfw"; + break; + case "video_service_list": + item.active = "tool_ic_shipinfw_sel"; + item.default = "tool_ic_shipinfw"; + break; + case "perception_service_list": + item.active = "tool_ic_ganzhifw_sel"; + item.default = "tool_ic_ganzhifw"; + break; + case "comprehensive_app_list": + item.active = "tool_ic_zongheyyfw_sel"; + item.default = "tool_ic_zongheyyfw"; + break; + case "cloud": + item.active = "tool_ic_yunziyuanfw_sel"; + item.default = "tool_ic_yunziyuanfw"; + break; + case "app_store_list": + item.active = "tool_ic_yingyongsd_sel"; + item.default = "tool_ic_yingyongsd"; + break; + default: + item.active = "1"; + item.default = "1"; + break; + } + }); + this.menuList = shopArr; + } + }); } } }; diff --git a/src/components/table/table-input.vue b/src/components/table/table-input.vue index 8f5e2d818ccf088f2efcb576ad39af0d59b62a3f..4b8955809573cd8aae31ec7240f2c346e7e22b56 100644 --- a/src/components/table/table-input.vue +++ b/src/components/table/table-input.vue @@ -58,7 +58,7 @@ import helper from "@/services/helper"; export default { props: { item: { - type: [String,Number], + type: [String, Number], default: "" }, header: { @@ -95,7 +95,8 @@ export default { anotherData: { directory: "file" }, - inputTextUp: "" + inputTextUp: "", + helper: helper }), mounted() { this.inputText = this.item; @@ -118,7 +119,7 @@ export default { url: response.data, name: response.data }); - this.inputTextUp = file.name; + this.inputTextUp = helper.downloadFileFormat(file.name); this.$emit("changeUpFile", { rowId: this.rowId, header: this.header, diff --git a/src/main.js b/src/main.js index 718b1ef6a1989a6bbbbc696db83c984dee798a05..e6a32bf7bb04bcd18b9ec3490e0973d5f3d5ccc3 100644 --- a/src/main.js +++ b/src/main.js @@ -44,7 +44,7 @@ Vue.use(VueI18n) const i18n = new VueI18n({ locale: 'zh', messages: { - 'zh': require('@/i18n/language-zh') + 'zh': require('@/assets/i18n/language-zh') } }) diff --git a/src/pages/authority/menu/menus.vue b/src/pages/authority/menu/menus.vue index 9fb067ba4457d757224424a8299be2946a0a7cfe..71f23d30c1cfc5b2d700e9a109c9521c8ea2b8f3 100644 --- a/src/pages/authority/menu/menus.vue +++ b/src/pages/authority/menu/menus.vue @@ -149,8 +149,8 @@ export default { { required: true, message: "请填写菜单访问地址", trigger: "blur" }, { min: 0, - max: 30, - message: "访问地址长度不超过30个字", + max: 50, + message: "访问地址长度不超过50个字", trigger: "blur" } ], diff --git a/src/pages/authority/user/userRoles.vue b/src/pages/authority/user/userRoles.vue index 1176ec914b7d3837cd6efd727e28c42c3b5a8cea..dba6085edc659a8c86b81718c8340ba77249f83e 100644 --- a/src/pages/authority/user/userRoles.vue +++ b/src/pages/authority/user/userRoles.vue @@ -16,18 +16,20 @@
- - + + + + - - - @@ -48,13 +50,14 @@ export default { components: { apassList }, data: () => ({ roleTotal: 0, - roleData: [], + roleList: [], showDialog: false, + userRoles: null, roles: null, }), computed: { roleIds() { - return this.roleData.map((item) => item.role_id); + return this.roleList.map((item) => item.role_id); }, }, methods: { @@ -63,13 +66,13 @@ export default { if (this.roles === null) { this.getUserRoles(() => { - this.getRoles(filters); + this.getRoleList(filters); }); } else { - this.getRoles(filters); + this.getRoleList(filters); } }, - getRoles(filters) { + getRoleList(filters) { this.$http .get(`/apaas/backmgt/role/list`, { params: { @@ -84,20 +87,22 @@ export default { }); this.roleTotal = data.total; - this.roleData = data.data; + this.roleList = data.data; }) .catch((error) => { console.log(error); }); }, - getUserRoles(callback) { + getUserRoles(cb) { this.$http .get(`/apaas/backmgt/user/roles/${this.$route.params.id}`) .then(({ data }) => { - this.roles = data.data.map((item) => item.role_id); - // console.log(this.roles); + let userRoles = data.data.map((item) => item.role_id); - typeof callback === "function" && callback(); + this.userRoles = userRoles; + this.roles = userRoles; + + typeof cb === "function" && cb(); }) .catch((error) => { console.log(error); @@ -109,7 +114,7 @@ export default { return this.roleIds.indexOf(item) === -1; }) .concat( - this.roleData + this.roleList .filter((item) => { return item.selected; }) @@ -121,18 +126,51 @@ export default { // console.log(this.roles); }, setUserRoles() { - if (this.roles.length > 0) { - this.$http - .post(`/apaas/backmgt/user/addRole`, { + let add = []; + let remove = []; + let requests = []; + + this.roles.forEach((item) => { + if (this.userRoles.indexOf(item) === -1) { + add.push(item); + } + }); + + this.userRoles.forEach((item) => { + if (this.roles.indexOf(item) === -1) { + remove.push(item); + } + }); + + if (add.length > 0) { + requests.push( + this.$http.post(`/apaas/backmgt/user/addRole`, { user_id: this.$route.params.id, - role_id: this.roles, + role_id: add, }) + ); + } + + if (remove.length > 0) { + requests.push( + this.$http.post(`/apaas/backmgt/role/userDel`, { + user_id: this.$route.params.id, + role_id: remove, + }) + ); + } + + if (requests.length > 0) { + Promise.all(requests) .then(({ data }) => { this.$message({ message: `分配角色成功.`, type: "success", }); - this.$router.push("/authority/users"); + + setTimeout(() => { + this.$router.push("/authority/users"); + }, 200); }) .catch((error) => { this.$message({ @@ -142,7 +180,7 @@ export default { }); } else { this.$message({ - message: "用户角色不能为空!", + message: "您没有进行任何修改.", type: "warning", }); } diff --git a/src/pages/service_shop/shop_list.vue b/src/pages/service_shop/shop_list.vue index 707ec260e311730e62c989336b54732810a14e65..09d71530046575d5872fd4f01060a808c227332e 100644 --- a/src/pages/service_shop/shop_list.vue +++ b/src/pages/service_shop/shop_list.vue @@ -32,7 +32,6 @@ export default { getVal(val) { let uri = val.substring(6); uri = uri.substring(0, uri.indexOf("/")); - console.log(uri); switch (uri) { case "data_service_list": this.name = "数据服务"; diff --git a/src/pages/service_shop/yysdDetail.vue b/src/pages/service_shop/yysdDetail.vue index eb59cc6993ab45d217fab71bc532a4aea1227736..c9776e6d6165bba8e9abafb61c91e4b2d87b4e63 100644 --- a/src/pages/service_shop/yysdDetail.vue +++ b/src/pages/service_shop/yysdDetail.vue @@ -58,21 +58,44 @@ export default { console.log(error); }); - this.$http - .get(`/apaas/hubApi/market/readme/${this.id}`) - .then(({ data }) => { - this.detailData = [ + let detailData = [ + { + name: "获取流程", + type: "step", + value: ["应用申请", "信息填写", "审核确认", "应用获取"], + }, + ]; + Promise.all([ + this.$http.get(`/apaas/hubApi/market/app/detail/${this.id}`), + this.$http.get(`/apaas/hubApi/market/values/${this.id}`), + ]) + .then((response) => { + let data1 = response[0].data.data; + let data2 = response[1].data.data; + + detailData.push( { - name: "获取流程", - type: "step", - value: ["应用申请", "信息填写", "审核确认", "应用获取"], + name: "应用简介", + type: "text", + value: data1.yyjj, }, { - name: "富文本", - type: "rich-text", - value: data.data, + name: "功能简介", + type: "text", + value: data1.gnjj, }, - ]; + { + name: "应用场景", + type: "text", + value: data1.cjsl, + }, + { + name: "应用参数", + type: "rich-text", + value: data2, + } + ); + this.detailData = detailData; }) .catch(function(error) { console.log(error); diff --git a/src/pages/user/order/order_detail.vue b/src/pages/user/order/order_detail.vue index 469a6dfd16f064e25ee89ac69129bf2201afde5c..b7c0de29cf2009c2f36d799b8caa352f8c8a502c 100644 --- a/src/pages/user/order/order_detail.vue +++ b/src/pages/user/order/order_detail.vue @@ -89,7 +89,7 @@
{{ orderDetail.order_type == 1 ? "服务" : "应用"}}信息
- +
@@ -105,8 +105,28 @@
+ + +
+
+ {{ orderDetail.name }} +
+
+
{{ orderDetail.sector }}
+
{{ orderDetail.src_organization }}
+
+
+
+ + +
+
+ {{ orderDetail.name }} +
+
+
-
+
规格: {{orderDetail.duration_unit == 1 ? "按月" : "按年"}}
+
+
+ 规格: + 申请获取应用镜像部署权限 +
+
+
+
+ 类型: + 申请新的工作区域 +
+
@@ -131,10 +163,64 @@
-
应用场景:
-
{{ orderDetail.scene }}
-
申请内容:
- +
+
应用简介:
+
{{ orderDetail.scene }}
+
+
+
功能简介:
+
{{ orderDetail.scene }}
+
+
+
应用场景:
+
{{ orderDetail.scene }}
+
+
+
工作区域描述:
+
{{ orderDetail.scene }}
+
+
+ 申请规格: +
+
+ CPU: + 2核 +
+
+ 内存: + 4GB +
+
+ 容器组: + 2核 +
+
+ 数据盘: + 2核 +
+
+ 单个容器组规格: +
+
+ CPU: +

+ 最高 2核 + 默认 2核 +

+
+
+ CPU: +

+ 最高 2核 + 默认 2核 +

+
+
+
+
+
申请内容:
+ +
申请人信息
@@ -512,6 +598,19 @@ export default { -webkit-box-orient: vertical; font-size: 16px; } +.detail_service_name_cloud { + width: 100%; + line-height: 24px; + margin-top: 50px; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + line-clamp: 2; + -webkit-box-orient: vertical; + font-size: 16px; +} .detail_service_msg_other { position: absolute; bottom: 2px; @@ -598,6 +697,42 @@ export default { background-color: #e1e4fb; color: #626de9; } +.params_block { + background-color: #f8f9fd; + border-radius: 8px; + margin: 10px 0; + padding: 20px; + font-size: 14px; + line-height: 22px; +} +.params_block_title { + padding-left: 10px; + color: #242c43; +} +.params_block_item { + padding: 10px 0 0 0; +} +.params_block_item_in { + display: flex; + justify-content: space-between; + margin-bottom: 5px; +} +.params_block_item_title { + color: #8890a7; + width: 120px; + text-align: right; +} +.params_block_item_val { + color: #242c43; + width: calc(100% - 130px); +} +.val_has_2 { + margin-right: 20px; +} +.margin_top_20 { + display: block; + margin-top: 20px; +}