From 9b7131f0e4962af2cb13586537d2d48ddb036f82 Mon Sep 17 00:00:00 2001 From: zhangjun1 Date: Tue, 23 Jun 2020 16:58:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=AB=8B=E5=8D=B3=E7=94=B3?= =?UTF-8?q?=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/e-charts/dashboard.vue | 2 + src/pages/service_shop/shop_car_apply.vue | 30 +++++++++++++-- src/pages/workbench/workPlace.vue | 46 +++++++++++------------ src/pages/workbench/yygl/app_detail.vue | 3 +- src/pages/workbench/yygl/app_edit.vue | 9 ++++- 5 files changed, 61 insertions(+), 29 deletions(-) diff --git a/src/components/e-charts/dashboard.vue b/src/components/e-charts/dashboard.vue index 0cb0f85..de3968d 100644 --- a/src/components/e-charts/dashboard.vue +++ b/src/components/e-charts/dashboard.vue @@ -161,5 +161,7 @@ export default { \ No newline at end of file diff --git a/src/pages/service_shop/shop_car_apply.vue b/src/pages/service_shop/shop_car_apply.vue index d814f3f..0dd4c57 100644 --- a/src/pages/service_shop/shop_car_apply.vue +++ b/src/pages/service_shop/shop_car_apply.vue @@ -114,7 +114,7 @@ export default { if(this.$route.query.service_id){ this.get_one_service(this.$route.query) }else if(this.$route.query.app_id){ - this.get_one_app() + this.get_one_app(this.$route.query) }else{ console.log(JSON.parse(window.sessionStorage.getItem('shoppingCart'))); var temp_arr=[] @@ -128,8 +128,32 @@ export default { }, methods: { - get_one_app(){ - + get_one_app(app_data){ + this.$http + .get(`/apaas/serviceapp/v3/shopcart/appinfo?app_id=${app_data.app_id}`) + .then(response => { + console.log(response); + let data = response.data.data + if(response.data.success&&data){ + //应用 + this.post_arr = [data] + this.post_arr[0].app_id = parseInt(pp_data.app_id) + this.post_arr[0].spec_id = parseInt(pp_data.spec_id) + this.post_arr[0].duration_method = parseInt(pp_data.duration_unit) + this.post_arr[0].duration = parseInt(pp_data.duration) + this.post_arr[0].id = '' + this.service_arr.push({}) + this.service_arr[0]['img'] = data.logo + this.service_arr[0]['title'] = data.app_name + this.service_arr[0]['type'] = data.type_name + this.service_arr[0]['auth'] = data.org_name + this.service_arr[0]['size'] = pp_data.spec_id==0?'部署':'开发' + this.service_arr[0]['applytype'] = '申请方式:'+pp_data.duration_unit==1?'月':'年' + this.service_arr[0]['num'] = pp_data.duration + this.service_arr[0]['isMg'] = false + this.service_arr[0]['isapp'] = true + } + }) }, get_one_service(service_data){ this.$http diff --git a/src/pages/workbench/workPlace.vue b/src/pages/workbench/workPlace.vue index 3079014..8b46d6a 100644 --- a/src/pages/workbench/workPlace.vue +++ b/src/pages/workbench/workPlace.vue @@ -4,7 +4,7 @@
- 你好,{{ person }}!最近登录{{ login_time }} + 你好,{{ person }}!{{login_time?'最近登录 ':''}}{{ login_time }}
管理功能    @@ -89,7 +89,21 @@ >

-
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
@@ -299,7 +313,8 @@ import uuidv1 from "uuid/v1"; import tableUm from "@/components/table/table-um"; import ListPagination from "@/components/comments-pagination"; import helper from "@/services/helper.js"; -import { getRole } from "@/utils/common"; +import dashBoard from '../../components/e-charts/dashboard' +import { formatDateTime_date } from "@/utils/common"; import { mapGetters,mapState } from 'vuex' var echarts = require("echarts"); export default { @@ -992,6 +1007,7 @@ export default { components: { tableUm, ListPagination, + dashBoard, }, computed: { ...mapGetters([ @@ -1000,7 +1016,7 @@ export default { ...mapState(['userInfo']), }, created() { - this.getUserData(); + }, mounted() { console.log(this.level); @@ -1105,6 +1121,7 @@ export default { this.getInfoData(); this.get_service_list() this.get_app_list() + this.getUserData(); if (this.now_user == 0||this.now_user == 4) { this.getHealth(); this.getoperatingdata(); @@ -1144,15 +1161,8 @@ export default { this.$router.push("/fwzc/fwcs"); }, getUserData() { - this.$http - .get("./static/workpalce.json") - .then((response) => { - console.log(response); - let data = response.data.data; - this.person = data.userdata.person; - this.login_time = data.userdata.login_time; - }) - .catch(function(response) {}); + this.person = this.userInfo.user_name; + this.login_time = this.userInfo.last_login; }, getoperatingdata() { this.$http @@ -1222,16 +1232,6 @@ export default { }) .catch(function(response) {}); }, - getAppData() { - this.$http - .get("./static/workpalce.json") - .then((response) => { - console.log(response); - let data = response.data.data; - this.app_arr = data.appdata; - }) - .catch(function(response) {}); - }, getInfoData() { this.$http .get("/apaas/service/v3/workplace/statistics/basic") diff --git a/src/pages/workbench/yygl/app_detail.vue b/src/pages/workbench/yygl/app_detail.vue index a2a94ba..451e9a1 100644 --- a/src/pages/workbench/yygl/app_detail.vue +++ b/src/pages/workbench/yygl/app_detail.vue @@ -273,12 +273,12 @@ export default { created() { if(this.userInfo){ this.now_user = this.level + this.getServiceInfo(); }else{ this.getCurrentUser() } this.asynLoad=false this.commentsUrl = `/apaas/hubApi/market/comments/${this.$route.params.id}` - this.getServiceInfo(); this.getServiceBaseInfo(); this.get_image_list() this.get_options() @@ -294,6 +294,7 @@ export default { console.log("--- user info ---"); this.$store.commit("userInfofun", data.data); this.now_user = this.level + this.getServiceInfo(); console.log(this.level); } else { console.log(data.errMsg); diff --git a/src/pages/workbench/yygl/app_edit.vue b/src/pages/workbench/yygl/app_edit.vue index 91c422f..5446537 100644 --- a/src/pages/workbench/yygl/app_edit.vue +++ b/src/pages/workbench/yygl/app_edit.vue @@ -87,7 +87,7 @@ 保存 - 取消 + 取消 @@ -169,7 +169,9 @@ export default { }, mounted() {}, methods: { - + back_page(){ + this.$router.back(-1) + }, getOriginArr(){ this.$http .get('/apaas/hubApi/market/departments') @@ -220,6 +222,7 @@ export default { example:data.cjsl, fileList:data.logo } + this.imgList = [data.logo] } }) .catch(function(response) {}); @@ -240,6 +243,7 @@ export default { formData.append('yyjj',this.form.appdesc) formData.append('gnjj',this.form.actiondesc) formData.append('cjsl',this.form.example) + formData.append('app_id',this.$route.params.id) this.$http .post('/apaas/hubApi/market/app',formData) .then(response => { @@ -249,6 +253,7 @@ export default { return } this.$message.success('操作成功') + this.back_page() }) .catch(function(response) { -- 2.26.0