Commit 2a193e6a authored by 张俊's avatar 张俊

Merge branch 'zj' into dev

parents 91536314 9b7131f0
......@@ -161,5 +161,7 @@ export default {
</script>
<style scoped>
.dashboard {
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
......@@ -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
......
......@@ -4,7 +4,7 @@
<div class="preson">
<div class="person_text">
<img src="@/assets/imgs/img_head.png" alt />
<span>你好,{{ person }}最近登录{{ login_time }}</span>
<span>你好,{{ person }}{{login_time?'最近登录 ':''}}{{ login_time }}</span>
</div>
<div class="person_menu">
管理功能&nbsp;&nbsp;&nbsp;
......@@ -89,7 +89,21 @@
></el-option>
</el-select>
</p>
<div :id="health" class="health" style="width:calc(100% - 40px)"></div>
<!-- 仪表盘 -->
<div class="health" style="width:calc(100% - 40px)">
<div style="width:25%;float:left;height:180px;">
<dash-board></dash-board>
</div>
<div style="width:25%;float:left;height:180px;">
<dash-board></dash-board>
</div>
<div style="width:25%;float:left;height:180px;">
<dash-board></dash-board>
</div>
<div style="width:25%;float:left;height:180px;">
<dash-board></dash-board>
</div>
</div>
</div>
</div>
</div>
......@@ -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")
......
......@@ -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);
......
......@@ -87,7 +87,7 @@
<el-form-item>
<el-button type="primary" @click="onSubmit('form')" class="right">保存</el-button>
<el-button class="right">取消</el-button>
<el-button class="right" @click="back_page()">取消</el-button>
</el-form-item>
</el-form>
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment