diff --git a/src/components/infoList.vue b/src/components/infoList.vue
index 95d66412b0a8ebd3554d7f7295dce78ae1e88b77..9d9f3918ada1f31dc26232dafde43ecc4d7d8143 100644
--- a/src/components/infoList.vue
+++ b/src/components/infoList.vue
@@ -12,7 +12,7 @@
下载文件
diff --git a/src/pages/user/order/order_detail.vue b/src/pages/user/order/order_detail.vue
index fdfd177ec4e0bbd7a7b2af00cb9134a658f0634c..246b2aef01f7ceedbc59bf3d7a5c0b9cf4d3ae8f 100644
--- a/src/pages/user/order/order_detail.vue
+++ b/src/pages/user/order/order_detail.vue
@@ -80,7 +80,7 @@
@click="nextApply"
>再次申请
取消申请
@@ -121,7 +121,7 @@
- {{ orderDetail.namespace }}(云资源申请)
+ {{ orderDetail.namespace }}({{ orderDetail.workplace }})
@@ -382,7 +382,10 @@ export default {
.then(response => {
if (response.data.success == 1) {
this.orderDetail = response.data.data;
- this.data = JSON.parse(this.orderDetail.res_fields);
+ if (this.orderDetail.res_fields != "") {
+ this.data = JSON.parse(this.orderDetail.res_fields);
+ }
+ console.log(this.data);
this.getOrderUser();
this.getOrderApproval();
} else {
@@ -407,7 +410,10 @@ export default {
},
getOrderApproval() {
this.$api.user
- .getOrderApproval({ apply_id: this.orderDetail.apply_id })
+ .getOrderApproval({
+ apply_id: this.orderDetail.apply_id,
+ kind: this.orderDetail.order_type
+ })
.then(response => {
if (response.data.success == 1) {
let data = response.data.data;
diff --git a/src/pages/workbench/fwgl/cloud-detail.vue b/src/pages/workbench/fwgl/cloud-detail.vue
index 5c89e234cff76b218a9d2e0fd19f825bc1a8cb22..3c8e2348f8dea60c437882b5e3ca2602f714006e 100644
--- a/src/pages/workbench/fwgl/cloud-detail.vue
+++ b/src/pages/workbench/fwgl/cloud-detail.vue
@@ -243,7 +243,7 @@
提交资源申请
{
- if (response.data.success == 1) {
- this.$message({
- message: "分配成功",
- type: "success"
- });
- this.$router.push(this.getUrl());
- } else {
- this.$message({
- message: "分配失败",
- type: "error"
- });
- }
- });
+ this.$refs.allotConfirm.getDetail(this.apply_id);
},
refuse() {
let query = {
@@ -615,17 +564,17 @@ export default {
})
.then(response => {
if (response.data.success == 1) {
- this.$message({
- message: "该资源已删除",
- type: "success"
- });
- this.$router.push(this.getUrl());
- } else {
- this.$message({
- message: "资源删除失败",
- type: "error"
- });
- }
+ this.$message({
+ message: "该资源已删除",
+ type: "success"
+ });
+ this.$router.push(this.getUrl());
+ } else {
+ this.$message({
+ message: "资源删除失败",
+ type: "error"
+ });
+ }
});
},
getCurrentUser() {
@@ -638,55 +587,66 @@ export default {
}
});
},
- submit() {
- this.$refs.allotConfirm.getDetail(this.apply_id);
- },
clickTab() {},
// 根据列表参数来判断显示什么
setListWithRole() {
+ console.log(this.now_user + ".." + this.apply_type);
if (this.now_user == 0) {
// 普通用户
- if (this.apply_type == 0) {
- // 申请类型0
+ if (this.use_uid == "") {
+ // 没分配
let index = this.list_arr.findIndex(
item => item.title == "资源使用情况:"
);
this.list_arr.splice(index);
- this.tabShow = false;
+ }
+ if (this.apply_type == 0) {
+ // 申请类型0
+ this.list_arr.splice(2, 1);
} else if (this.apply_type != 0) {
// 申请类型1
- this.tabShow = false;
}
+ this.tabShow = false;
+ this.activeName = "0";
} else if (this.now_user == 1) {
// 组织
- if (this.apply_type == 0) {
- // 申请类型
+ if (this.use_uid == "") {
+ // 没分配
let index = this.list_arr.findIndex(
item => item.title == "资源使用情况:"
);
this.list_arr.splice(index);
+ }
+ if (this.apply_type == 0) {
+ // 申请类型0
+ this.list_arr.splice(2, 1);
} else if (this.apply_type != 0) {
}
if (this.apploy_msg.first_level == 0) {
- // 没分配
+ // 没审批
this.tabShow = false;
} else if (this.apploy_msg.first_level != 0) {
- // 分配
+ // 组织审批了
this.tabShow = true;
}
+ this.activeName = "0";
} else if (this.now_user == 2) {
// 超管
- if (this.apply_type == 0) {
+ if (this.use_uid == "") {
+ // 没分配
let index = this.list_arr.findIndex(
item => item.title == "资源使用情况:"
);
this.list_arr.splice(index);
- this.tabShow = false;
+ }
+ if (this.apply_type == 0) {
+ // 申请类型0
+ this.list_arr.splice(2, 1);
} else if (this.apply_type != 0) {
- this.tabShow = false;
}
+ this.tabShow = false;
+ this.activeName = "0";
}
- this.activeName = "0";
},
getCloudDetail() {
let query = {
@@ -696,65 +656,72 @@ export default {
};
this.$api.workbench.getCloudDetail(query).then(response => {
let data = response.data.data;
- console.log(data);
- this.list_arr[3].info = helper.downloadFileFormat(
- data.apply_file ? data.apply_file : ""
- ); // application file name
- this.list_arr[3].url = data.apply_file; // application file url
- this.list_arr[6].info = data.bgn_time; // get time
- this.list_arr[7].info = data.time_remaining; // remaining days
- this.list_arr[8].info = data.end_time; // maturity time
- this.list_arr_my[0].info = data.first_level_time; // submit application time
- this.list_arr_my[1].info = data.second_level_time; // super get time
- this.super_status = data.second_leve; // super status
- this.desc = data.workplacedesc; // workplace description
- let count = data.cloud_resource_count; // resource usage
- if (count) {
- this.data1.total = count.cpu_total;
- this.data1.remaining = count.cpu_total - count.cpu_use;
- this.data1.data = Math.round((count.cpu_total / count.cpu_use) * 100);
- this.data2.total = count.memory_total;
- this.data2.remaining = count.memory_total - count.memory_use;
- this.data2.data = Math.round(
- (count.memory_total / count.memory_use) * 100
- );
- this.data3.total = count.disk_total;
- this.data3.remaining = count.disk_total - count.disk_use;
- this.data3.data = Math.round(
- (count.disk_total / count.disk_use) * 100
- );
- this.data4.total = count.containers_total;
- this.data4.remaining = count.containers_total - count.containers_use;
- this.data4.data = Math.round(
- (count.containers_total / count.containers_use) * 100
- );
+ if (data) {
+ this.list_arr[3].info = helper.downloadFileFormat(
+ data.apply_file ? data.apply_file : ""
+ ); // application file name
+ this.list_arr[3].url = data.apply_file; // application file url
+ this.list_arr[6].info = data.bgn_time; // get time
+ this.list_arr[7].info = data.time_remaining; // remaining days
+ this.list_arr[8].info = data.end_time; // maturity time
+ this.list_arr_my[0].info = data.first_level_time; // submit application time
+ this.list_arr_my[1].info = data.second_level_time; // super get time
+ this.super_status = data.second_leve; // super status
+ this.desc = data.workplacedesc; // workplace description
+ let count = data.cloud_resource_count; // resource usage
+ if (count) {
+ this.data1.total = count.cpu_total;
+ this.data1.remaining = count.cpu_total - count.cpu_use;
+ this.data1.data = Math.round(
+ (count.cpu_total / count.cpu_use) * 100
+ );
+ this.data2.total = count.memory_total;
+ this.data2.remaining = count.memory_total - count.memory_use;
+ this.data2.data = Math.round(
+ (count.memory_total / count.memory_use) * 100
+ );
+ this.data3.total = count.disk_total;
+ this.data3.remaining = count.disk_total - count.disk_use;
+ this.data3.data = Math.round(
+ (count.disk_total / count.disk_use) * 100
+ );
+ this.data4.total = count.containers_total;
+ this.data4.remaining =
+ count.containers_total - count.containers_use;
+ this.data4.data = Math.round(
+ (count.containers_total / count.containers_use) * 100
+ );
+ }
+ this.cloudDteail.containers = data.containers;
+ this.cloudDteail.cpu = data.cpu;
+ this.cloudDteail.disk = data.disk;
+ this.cloudDteail.memory = data.memory;
+ this.cloudDteail.apply_duration_time = data.apply_duration_time;
+ this.cloudDteail.one_cpu_max = data.one_cpu_max;
+ this.cloudDteail.one_cpu_min = data.one_cpu_min;
+ this.cloudDteail.one_memory_max = data.one_memory_max;
+ this.cloudDteail.one_memory_min = data.one_memory_min;
+ this.cloudDetailNew.adjust_containers = data.adjust_containers;
+ this.cloudDetailNew.adjust_cpu = data.adjust_cpu;
+ this.cloudDetailNew.adjust_disk = data.adjust_disk;
+ this.cloudDetailNew.adjust_memory = data.adjust_memory;
+ this.cloudDteail.adjust_duration_time = data.adjust_duration_time;
+ this.cloudDteail.adjust_one_cpu_max = data.adjust_one_cpu_max;
+ this.cloudDteail.adjust_one_cpu_min = data.adjust_one_cpu_min;
+ this.cloudDteail.adjust_one_memory_max = data.adjust_one_memory_max;
+ this.cloudDteail.adjust_one_memory_min = data.adjust_one_memory_min;
+ this.apploy_msg.first_level = data.first_level;
+ this.apploy_msg.second_level = data.second_level;
+ this.cloudData.namespace = data.namespace;
+ this.cloudData.workplace = data.workplace;
+ this.cloudData.user_name = data.user_name;
+ this.cloudData.phone = data.phone;
+ this.cloudData.apply_time = data.apply_time;
+ this.cloudData.system_name = data.system_name;
+ }
+ if (this.use_uid != "") {
+ this.getCloudApplication();
}
- this.cloudDteail.containers = data.containers;
- this.cloudDteail.cpu = data.cpu;
- this.cloudDteail.disk = data.disk;
- this.cloudDteail.memory = data.memory;
- this.cloudDteail.apply_duration_time = data.apply_duration_time;
- this.cloudDteail.one_cpu_max = data.one_cpu_max;
- this.cloudDteail.one_cpu_min = data.one_cpu_min;
- this.cloudDteail.one_memory_max = data.one_memory_max;
- this.cloudDteail.one_memory_min = data.one_memory_min;
- this.cloudDetailNew.adjust_containers = data.adjust_containers;
- this.cloudDetailNew.adjust_cpu = data.adjust_cpu;
- this.cloudDetailNew.adjust_disk = data.adjust_disk;
- this.cloudDetailNew.adjust_memory = data.adjust_memory;
- this.cloudDteail.adjust_duration_time = data.adjust_duration_time;
- this.cloudDteail.adjust_one_cpu_max = data.adjust_one_cpu_max;
- this.cloudDteail.adjust_one_cpu_min = data.adjust_one_cpu_min;
- this.cloudDteail.adjust_one_memory_max = data.adjust_one_memory_max;
- this.cloudDteail.adjust_one_memory_min = data.adjust_one_memory_min;
- this.apploy_msg.first_level = data.first_level;
- this.apploy_msg.second_level = data.second_level;
- this.cloudData.namespace = data.namespace;
- this.cloudData.workplace = data.workplace;
- this.cloudData.user_name = data.user_name;
- this.cloudData.phone = data.phone;
- this.cloudData.apply_time = data.apply_time;
- this.cloudData.system_name = data.system_name;
this.setListWithRole();
});
}
diff --git a/src/pages/workbench/fwgl/fwglList.vue b/src/pages/workbench/fwgl/fwglList.vue
index 6d347a6678228975142e9c5a1f5177308b1ffcb3..4c5438f7cdddf8638af287184111d4b672fdaa44 100644
--- a/src/pages/workbench/fwgl/fwglList.vue
+++ b/src/pages/workbench/fwgl/fwglList.vue
@@ -1205,39 +1205,42 @@ export default {
if (this.type == 2) {
const cloud = data.data.cloud_resource_count;
- if (this.level == 1) {
+ if (this.level != 2) {
this.listTotal = data.total;
this.listData = data.data.cloud_apply_list;
- this.cloud_zuzhi = {
- count_zy: cloud.count_zy,
- dashboard_list: [
- {
- name: "CPU使用量",
- value: cloud.cpu_use,
- total: cloud.cpu_total,
- unit: "(核)",
- },
- {
- name: "内存使用量",
- value: cloud.memory_use,
- total: cloud.memory_total,
- unit: "(GB)",
- },
- /* {
+
+ if (this.level == 1) {
+ this.cloud_zuzhi = {
+ count_zy: cloud.count_zy,
+ dashboard_list: [
+ {
+ name: "CPU使用量",
+ value: cloud.cpu_use,
+ total: cloud.cpu_total,
+ unit: "(核)",
+ },
+ {
+ name: "内存使用量",
+ value: cloud.memory_use,
+ total: cloud.memory_total,
+ unit: "(GB)",
+ },
+ /* {
name: "数据盘使用量",
value: cloud.disk_use,
total: cloud.disk_total,
unit: "(GB)",
}, */
- {
- name: "容器组使用量",
- value: cloud.containers_use,
- total: cloud.containers_total,
- unit: "(个)",
- },
- ],
- };
- } else if (this.level == 2) {
+ {
+ name: "容器组使用量",
+ value: cloud.containers_use,
+ total: cloud.containers_total,
+ unit: "(个)",
+ },
+ ],
+ };
+ }
+ } else {
this.cloud_admin = {
dashboard_list: [
{
diff --git a/src/pages/workbench/yygl/yyglList.vue b/src/pages/workbench/yygl/yyglList.vue
index 5436acc8751a348d2fe479a46c78490c85caf0f0..3c81979aad54ed557707c5e6197c91e723ead85f 100644
--- a/src/pages/workbench/yygl/yyglList.vue
+++ b/src/pages/workbench/yygl/yyglList.vue
@@ -450,7 +450,7 @@ export default {
align: "center",
},
{
- label: "部署区域",
+ label: "工作区域",
prop: "namespace",
align: "center",
},
@@ -757,7 +757,7 @@ export default {
align: "center",
},
{
- label: "部署区域",
+ label: "工作区域",
prop: "namespace",
align: "center",
},
diff --git a/src/request/api/user.js b/src/request/api/user.js
index c052065c5a7976fa0be5b0ce83beabb5b2eb6e80..5d96bd2d08fafbf3cb9a21dbfa1c764bf8059e7f 100644
--- a/src/request/api/user.js
+++ b/src/request/api/user.js
@@ -32,7 +32,7 @@ const user = {
return axios.get(`/apaas/serviceapp/v3/order/applyInfo?order_id=${params.order_id}`);
},
getOrderApproval(params) {
- return axios.get(`/apaas/serviceapp/v3/order/approval?apply_id=${params.apply_id}`);
+ return axios.get(`/apaas/serviceapp/v3/order/approval?apply_id=${params.apply_id}&kind=${params.kind}`);
},
cancelOrder(params) {
return axios.get(`/order/cancel?order_id=${params.order_id}`);