Commit 4ae59482 authored by 张俊's avatar 张俊

Merge branch 'dev' of cloud.wodcloud.com:apaas/apaas-v3-ui into dev

parents 399607ff a798437c
...@@ -541,6 +541,11 @@ width: 620px!important; ...@@ -541,6 +541,11 @@ width: 620px!important;
background-color: #e1e4fb; background-color: #e1e4fb;
border-color: #e1e4fb; border-color: #e1e4fb;
} }
.apass_button .el-button--danger {
color: #fff;
background-color: #e15260;
border-color: #e15260;
}
.apass_button .el-button.is-disabled, .apass_button .el-button.is-disabled,
.apass_button .el-button.is-disabled:focus, .apass_button .el-button.is-disabled:focus,
.apass_button .el-button.is-disabled:hover { .apass_button .el-button.is-disabled:hover {
......
...@@ -24,14 +24,15 @@ ...@@ -24,14 +24,15 @@
</div> </div>
<div slot="footer" class="dialog_action apass_button" v-else> <div slot="footer" class="dialog_action apass_button" v-else>
<el-button <el-button
type="defalut" v-if="!cancelHide"
:type="cancelType"
size="mini" size="mini"
v-text="cancelText || '取消'" v-text="cancelText || '取消'"
@click="hide" @click="dialogCancel"
> >
</el-button> </el-button>
<el-button <el-button
type="primary" :type="sunbmitType"
size="mini" size="mini"
v-text="sunbmitText || '确定'" v-text="sunbmitText || '确定'"
:disabled="submitDisable" :disabled="submitDisable"
...@@ -63,16 +64,32 @@ export default { ...@@ -63,16 +64,32 @@ export default {
type: String, type: String,
default: () => "", default: () => "",
}, },
cancelType: {
type: String,
default: () => "defalut",
},
cancelHide: {
type: Boolean,
default: () => false,
},
cancel: {
type: Function,
default: () => null,
},
sunbmitText: { sunbmitText: {
type: String, type: String,
default: () => "", default: () => "",
}, },
sunbmitType: {
type: String,
default: () => "primary",
},
submitDisable: { submitDisable: {
type: Boolean, type: Boolean,
default: () => false, default: () => false,
}, },
submit: { submit: {
type: [Function,String], type: Function,
default: () => null, default: () => null,
}, },
}, },
...@@ -86,12 +103,18 @@ export default { ...@@ -86,12 +103,18 @@ export default {
hide() { hide() {
this.showDialog = false; this.showDialog = false;
}, },
dialogCancel() {
if (typeof this.cancel === "function") {
this.cancel();
}
this.$emit("cancel");
this.hide();
},
dialogSubmit() { dialogSubmit() {
if (typeof this.submit === "function") { if (typeof this.submit === "function") {
this.submit(); this.submit();
} else {
this.$emit("submit");
} }
this.$emit("submit");
this.hide(); this.hide();
}, },
}, },
......
...@@ -101,18 +101,24 @@ export default { ...@@ -101,18 +101,24 @@ export default {
roundCap: true, roundCap: true,
itemStyle: { itemStyle: {
normal: { normal: {
color: color: new graphic.LinearGradient(0, 0, 1, 0, [
self.dangerousValue == "high" { offset: 0, color: "#fff" },
? self.data.data >= 80 {
? "#e15260" offset: 1,
: "#515fe7" color:
: self.data.data > 75 self.dangerousValue == "high"
? "#00cfc6" ? self.data.data >= 80
: self.data.data > 50 ? "#e15260"
? "#54cefd" : "#515fe7"
: self.data.data > 25 : self.data.data > 75
? "#54cefd" ? "#00cfc6"
: "#25bdb1" : self.data.data > 50
? "#54cefd"
: self.data.data > 25
? "#54cefd"
: "#25bdb1"
}
])
} }
}, },
barGap: "-100%" barGap: "-100%"
......
...@@ -7,18 +7,31 @@ ...@@ -7,18 +7,31 @@
</div> </div>
<el-row class="cell_row"> <el-row class="cell_row">
<el-col :span="10" class="cell_msg"> <el-col :span="10" class="cell_msg">
<img :src="cellItem.cover" class="cell_msg_img" /> <img v-if="cellItem.order_type != 3" :src="cellItem.cover" class="cell_msg_img" />
<img v-else :src="require('@/assets/imgs/img_yunziyuan.png')" class="cell_msg_img" />
<div class="cell_msg_right"> <div class="cell_msg_right">
<div class="cell_name"> <div v-if="cellItem.order_type != 3" class="cell_name">
<span>{{ cellItem.name }}</span> <span>{{ cellItem.name }}</span>
<span v-if="cellItem.mapService" class="tags map_service">mapService</span> <span v-if="cellItem.mapService" class="tags map_service">mapService</span>
<span v-if="cellItem.openness == 1" class="tags shared">共享</span> <span v-if="cellItem.openness == 1" class="tags shared">共享</span>
<span v-else-if="cellItem.openness == 2" class="tags restricted">受限</span> <span v-else-if="cellItem.openness == 2" class="tags restricted">受限</span>
<span v-else-if="cellItem.openness == 3" class="tags sensitive">敏感</span> <span v-else-if="cellItem.openness == 3" class="tags sensitive">敏感</span>
</div> </div>
<div v-else class="cell_name">
<span>云资源申请</span>
</div>
<div class="cell_msg_other"> <div class="cell_msg_other">
<div class="cell_type">{{ cellItem.sector }}</div> <div
<div class="cell_creator">{{ cellItem.src_organization }}</div> class="cell_type"
>{{ cellItem.order_type != 3 ? cellItem.sector : cellItem.namespace }}</div>
<div
v-if="cellItem.order_type != 3"
class="cell_creator"
>{{ cellItem.src_organization }}</div>
<div
v-else
class="cell_creator"
>{{ cellItem.apply_type == 0 ? "申请新的工作区域" : "升级现有工作区域" }}</div>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -33,8 +46,13 @@ ...@@ -33,8 +46,13 @@
<div>规格:{{ cellItem.spec_app == 0 ? "申请获取应用镜像部署权限" : "申请获取应用镜像开发权限" }}</div> <div>规格:{{ cellItem.spec_app == 0 ? "申请获取应用镜像部署权限" : "申请获取应用镜像开发权限" }}</div>
</div> </div>
<div v-else-if="cellItem.order_type == 3"> <div v-else-if="cellItem.order_type == 3">
<div>规格:CPU 2核,内存 4GB,容器组 8个;数据盘 3块,每块数据盘容量 2GB</div> <div>
<div class="cell_specification_type">单个容器组:CPU最高 4核,默认 2核;内存最高 8 GB,默认 4GB</div> 规格:CPU {{ cellItem.cpu }}核,内存 {{ cellItem.memory }}GB,容器组 {{ cellItem.containers }}个;
<span v-if="cellItem.disk_num != 0">{{ cellItem.disk_num }}数据盘 {{ cellItem.disk_num }}块,每块数据盘容量 {{ cellItem.disk_cap }}GB</span>
</div>
<div
class="cell_specification_type"
>单个容器组:CPU最高 {{ cellItem.one_cpu_max }}核,默认 {{ cellItem.one_cpu_min }}核;内存最高 {{ cellItem.one_memory_max }}GB,默认 {{ cellItem.one_memory_min }}GB</div>
</div> </div>
</el-col> </el-col>
<el-col :span="4" class="approval_status"> <el-col :span="4" class="approval_status">
...@@ -93,7 +111,7 @@ ...@@ -93,7 +111,7 @@
class="cell_option_btn" class="cell_option_btn"
@click="viewDetail(cellItem.order_id)" @click="viewDetail(cellItem.order_id)"
>查看详情</el-button> >查看详情</el-button>
<div class="cell_option_spec" @click="nextApply">再次申请</div> <div v-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1" class="cell_option_spec" @click="nextApply">再次申请</div>
</div> </div>
</el-col> </el-col>
<el-collapse-transition> <el-collapse-transition>
...@@ -220,6 +238,10 @@ export default { ...@@ -220,6 +238,10 @@ export default {
duration: this.cellItem.duration, duration: this.cellItem.duration,
duration_unit: this.cellItem.duration_unit duration_unit: this.cellItem.duration_unit
}; };
this.$router.push({
path: "/shop/shop_car_apply",
query: query
});
} else if (this.cellItem.order_type == 2) { } else if (this.cellItem.order_type == 2) {
query = { query = {
app_id: parseFloat(this.cellItem.app_id), app_id: parseFloat(this.cellItem.app_id),
...@@ -227,11 +249,15 @@ export default { ...@@ -227,11 +249,15 @@ export default {
duration: this.cellItem.duration, duration: this.cellItem.duration,
duration_unit: this.cellItem.duration_unit duration_unit: this.cellItem.duration_unit
}; };
this.$router.push({
path: "/shop/shop_car_apply",
query: query
});
} else if (this.cellItem.order_type == 2) {
this.$router.push({
path: "/shop/shop_cloud"
});
} }
this.$router.push({
path: "/shop/shop_car_apply",
query: query
});
}, },
getMessage() { getMessage() {
if (this.cellItem.order_type == 1) { if (this.cellItem.order_type == 1) {
...@@ -310,6 +336,7 @@ export default { ...@@ -310,6 +336,7 @@ export default {
width: 118px; width: 118px;
height: 118px; height: 118px;
border-radius: 8px; border-radius: 8px;
border: 3px #f4f7fc solid;
} }
.cell_msg_right { .cell_msg_right {
width: calc(100% - 140px); width: calc(100% - 140px);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<span class="com_cell_item_title">服务类型:</span> <span class="com_cell_item_title">服务类型:</span>
<span <span
class="com_cell_data" class="com_cell_data"
>{{ cellData.data_service_type1_name }}&nbsp;&nbsp;{{ cellData.data_service_type2_str }}&nbsp;&nbsp;{{ cellData.data_service_type3_str }}</span> >{{ cellData.data_service_type1_name }}&nbsp;&nbsp;{{ cellData.data_service_type2_name }}&nbsp;&nbsp;{{ cellData.data_service_type3_name }}</span>
</div> </div>
<div class="com_cell_item"> <div class="com_cell_item">
<span class="com_cell_item_title">更新时间:</span> <span class="com_cell_item_title">更新时间:</span>
...@@ -89,6 +89,7 @@ export default { ...@@ -89,6 +89,7 @@ export default {
height: 166px; height: 166px;
border-radius: 12px; border-radius: 12px;
overflow: hidden; overflow: hidden;
border: 4px #f4f7fc solid;
} }
.com_cell_img { .com_cell_img {
width: 100%; width: 100%;
...@@ -100,12 +101,13 @@ export default { ...@@ -100,12 +101,13 @@ export default {
} }
.com_cell_msg_title { .com_cell_msg_title {
color: #0d1847; color: #0d1847;
font-size: 22px; font-size: 18px;
line-height: 30px;
font-weight: 700; font-weight: 700;
margin-bottom: 6px; margin-bottom: 6px;
} }
.com_cell_item { .com_cell_item {
font-size: 16px; font-size: 14px;
line-height: 26px; line-height: 26px;
margin-top: 1px; margin-top: 1px;
color: #8890a7; color: #8890a7;
...@@ -124,12 +126,12 @@ export default { ...@@ -124,12 +126,12 @@ export default {
white-space: nowrap; white-space: nowrap;
} }
.com_cell_right { .com_cell_right {
width: 250px; width: 300px;
padding: 25px 0 0 50px; padding: 25px 0 0 50px;
} }
.com_cell_right_text { .com_cell_right_text {
font-size: 14px; font-size: 16px;
margin-top: 15px; margin-top: 25px;
} }
.com_cell_right_time_tit { .com_cell_right_time_tit {
color: #8890a7; color: #8890a7;
...@@ -140,10 +142,10 @@ export default { ...@@ -140,10 +142,10 @@ export default {
.com_cell_right_btn { .com_cell_right_btn {
background-color: #0f2683; background-color: #0f2683;
color: #f8f9fd; color: #f8f9fd;
width: 160px; width: 220px;
height: 40px; height: 40px;
border-radius: 20px; border-radius: 20px;
margin-top: 35px; margin-top: 25px;
} }
.tags { .tags {
display: inline-block; display: inline-block;
...@@ -181,10 +183,10 @@ export default { ...@@ -181,10 +183,10 @@ export default {
.com_cell_right .el-rate__text { .com_cell_right .el-rate__text {
display: inline-block; display: inline-block;
margin-left: 10px; margin-left: 10px;
font-size: 22px; font-size: 32px;
font-weight: 700; font-weight: 700;
} }
.com_cell_right .el-rate__icon { .com_cell_right .el-rate__icon {
font-size: 20px; font-size: 28px;
} }
</style> </style>
\ No newline at end of file
...@@ -223,7 +223,11 @@ export default { ...@@ -223,7 +223,11 @@ export default {
time_app: null, time_app: null,
times: null times: null
}), }),
mounted() {}, mounted() {
window.onresize = () => {
this.judgeHeight();
};
},
watch: { watch: {
urlFilter: { urlFilter: {
handler(val) { handler(val) {
...@@ -335,7 +339,7 @@ export default { ...@@ -335,7 +339,7 @@ export default {
this.time_app = setInterval(() => { this.time_app = setInterval(() => {
if (this.refresh_app_1 && this.refresh_app_2 && this.refresh_app_3) { if (this.refresh_app_1 && this.refresh_app_2 && this.refresh_app_3) {
this.judgeHeight(); this.judgeHeight();
clearInterval(this.time_app) clearInterval(this.time_app);
} }
}, 50); }, 50);
} else { } else {
...@@ -377,7 +381,7 @@ export default { ...@@ -377,7 +381,7 @@ export default {
} }
} }
} }
this.$set((this.filterLists = list)); this.filterLists = [...list];
}, },
clickOpen(index) { clickOpen(index) {
let list = this.openList; let list = this.openList;
......
...@@ -104,30 +104,42 @@ ...@@ -104,30 +104,42 @@
<div class="input_right"></div> <div class="input_right"></div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="22">
<el-form-item class="form_item">
<div class="form_item_title">数据盘(可选):</div>
<el-select v-model="formNew.store_type" placeholder="请选择数据盘类型">
<el-option
v-for="item in options_store_type"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="form_item input_has_right"> <el-form-item class="form_item input_has_right">
<div class="form_item_title">数据盘(可选):</div>
<el-input-number <el-input-number
v-model="formNew.dataDisk" v-model="formNew.dataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
placeholder="请选择数量" placeholder="请选择增加数据盘的数量"
></el-input-number> ></el-input-number>
<div class="input_right"></div> <div class="input_right"></div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="form_item input_has_right"> <el-form-item class="form_item input_has_right">
<div class="form_item_title">每块数据盘容量:</div>
<el-input-number <el-input-number
v-model="formNew.perDataDisk" v-model="formNew.perDataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
placeholder="请选择容量" placeholder="请选择每块数据盘的容量"
></el-input-number> ></el-input-number>
<div class="input_right">GB</div> <div class="input_right">GB</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<div class="form_title">单个容器组规格</div> <div class="form_title">单个容器组规格</div>
</el-col> </el-col>
...@@ -330,24 +342,37 @@ ...@@ -330,24 +342,37 @@
></table-um> ></table-um>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="22">
<el-form-item class="form_item">
<div class="form_item_title">增加数据盘:</div>
<el-select v-model="formOld.store_type" placeholder="请选择数据盘类型">
<el-option
v-for="item in options_store_type"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="form_item input_has_right"> <el-form-item class="form_item input_has_right">
<div class="form_item_title">增加数据盘:</div>
<el-input-number <el-input-number
v-model="formOld.dataDisk" v-model="formOld.dataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
placeholder="请选择增加数据盘的数量"
></el-input-number> ></el-input-number>
<div class="input_right"></div> <div class="input_right"></div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="form_item input_has_right"> <el-form-item class="form_item input_has_right">
<div class="form_item_title">每块数据盘容量:</div>
<el-input-number <el-input-number
v-model="formOld.perDataDisk" v-model="formOld.perDataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
placeholder="请选择每块数据盘的容量"
></el-input-number> ></el-input-number>
<div class="input_right">GB</div> <div class="input_right">GB</div>
</el-form-item> </el-form-item>
...@@ -562,12 +587,16 @@ ...@@ -562,12 +587,16 @@
<span class="dia_block_item_title">容器组:</span> <span class="dia_block_item_title">容器组:</span>
<span class="dia_block_item_val">{{ diaForm.containerGroup }}</span> <span class="dia_block_item_val">{{ diaForm.containerGroup }}</span>
</div> </div>
<div class="dia_block_item_in"> <div class="dia_block_item_in" v-if="diaForm.dataDisk != 0">
<span class="dia_block_item_title">数据盘:</span> <span class="dia_block_item_title">数据盘:</span>
<span <span
class="dia_block_item_val" class="dia_block_item_val"
>{{ diaForm.dataDisk }}块,每块{{ diaForm.perDataDisk }}GB</span> >{{ diaForm.dataDisk }}块,每块{{ diaForm.perDataDisk }}GB</span>
</div> </div>
<div class="dia_block_item_in" v-if="diaForm.dataDisk != 0">
<span class="dia_block_item_title">数据盘类型:</span>
<span class="dia_block_item_val">{{ diaForm.store_type }}</span>
</div>
</div> </div>
<span class="dia_item_all_title">单个容器组规格:</span> <span class="dia_item_all_title">单个容器组规格:</span>
<div class="dia_block_item"> <div class="dia_block_item">
...@@ -753,7 +782,8 @@ export default { ...@@ -753,7 +782,8 @@ export default {
appDuration: undefined, appDuration: undefined,
durType: 1, durType: 1,
apply_file: "", apply_file: "",
apply_file_name: "" apply_file_name: "",
store_type: "nfs-client"
}, },
ruleNew: { ruleNew: {
namespace: [ namespace: [
...@@ -803,6 +833,10 @@ export default { ...@@ -803,6 +833,10 @@ export default {
{ value: "16", label: "16" }, { value: "16", label: "16" },
{ value: "32", label: "32" } { value: "32", label: "32" }
], ],
options_store_type: [
{ value: "nfs-client", label: "nfs-client" },
{ value: "rook-ceph-block", label: "rook-ceph-block" }
],
formShow: false, formShow: false,
specArr: [ specArr: [
{ title: "CPU", val: "4", src: "ic_CPU" }, { title: "CPU", val: "4", src: "ic_CPU" },
...@@ -834,23 +868,10 @@ export default { ...@@ -834,23 +868,10 @@ export default {
appDuration: undefined, appDuration: undefined,
durType: 1, durType: 1,
apply_file: "", apply_file: "",
apply_file_name: "" apply_file_name: "",
}, store_type: "nfs-client"
paramsOld: {
cpu: "",
memory: "",
containerGroup: undefined,
dataDisk: undefined,
perDataDisk: undefined,
perCPUs: undefined,
perCPU: undefined,
perRAMs: undefined,
perRAM: undefined,
appDuration: undefined,
durType: 1,
apply_file: "",
apply_file_name: ""
}, },
paramsOld: {},
ruleOld: { ruleOld: {
namespace: [ namespace: [
{ required: true, message: "请输入工作区域名称", trigger: "blur" } { required: true, message: "请输入工作区域名称", trigger: "blur" }
...@@ -944,7 +965,8 @@ export default { ...@@ -944,7 +965,8 @@ export default {
this.formOld.perCPU = paramsOld.one_cpu_min; this.formOld.perCPU = paramsOld.one_cpu_min;
this.formOld.perRAMs = paramsOld.one_memory_max; this.formOld.perRAMs = paramsOld.one_memory_max;
this.formOld.perRAM = paramsOld.one_memory_min; this.formOld.perRAM = paramsOld.one_memory_min;
this.dataDiskList = paramsOld.disk_list; this.formOld.store_type = paramsOld.store_type;
this.dataDiskList = paramsOld.disk_list || [];
this.formShow = true; this.formShow = true;
} else { } else {
this.formShow = false; this.formShow = false;
...@@ -999,7 +1021,14 @@ export default { ...@@ -999,7 +1021,14 @@ export default {
one_cpu_max: this.formNew.perCPUs, one_cpu_max: this.formNew.perCPUs,
one_memory_min: this.formNew.perRAM, one_memory_min: this.formNew.perRAM,
one_memory_max: this.formNew.perRAMs one_memory_max: this.formNew.perRAMs
} },
disks: [
{
disk_num: this.formNew.dataDisk,
disk_cap: this.formNew.perDataDisk,
store_type: this.formNew.store_type
}
]
}; };
this.$api.serviceShop.applicationCloud(query).then(response => { this.$api.serviceShop.applicationCloud(query).then(response => {
console.log(response); console.log(response);
...@@ -1016,13 +1045,18 @@ export default { ...@@ -1016,13 +1045,18 @@ export default {
apply_connect_mobile: this.form.phone, apply_connect_mobile: this.form.phone,
memory: Number(this.formOld.memory), memory: Number(this.formOld.memory),
containers: this.formOld.containerGroup, containers: this.formOld.containerGroup,
disk_num: this.formOld.dataDisk,
disk_cap: this.formOld.perDataDisk,
one_cpu_min: this.formOld.perCPU, one_cpu_min: this.formOld.perCPU,
one_cpu_max: this.formOld.perCPUs, one_cpu_max: this.formOld.perCPUs,
one_memory_min: this.formOld.perRAM, one_memory_min: this.formOld.perRAM,
one_memory_max: this.formOld.perRAMs one_memory_max: this.formOld.perRAMs
} },
disks: [
{
disk_num: this.formOld.dataDisk,
disk_cap: this.formOld.perDataDisk,
store_type: this.formOld.store_type
}
]
}; };
this.$api.serviceShop.updateCloud(query).then(response => { this.$api.serviceShop.updateCloud(query).then(response => {
console.log(response); console.log(response);
......
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
20 - // 距左侧标题的边距 20 - // 距左侧标题的边距
110; // 折叠按钮的宽度 110; // 折叠按钮的宽度
this.filterLength = Math.floor(width / 110); this.filterLength = Math.floor(width / 150);
// console.log("每行最多可容纳" + this.filterLength + "个filter"); // console.log("每行最多可容纳" + this.filterLength + "个filter");
}); });
} }
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
.ces_filter_data > li > a { .ces_filter_data > li > a {
display: block; display: block;
height: 30px; height: 30px;
width: 90px; width: 130px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 12px; border-radius: 12px;
text-align: center; text-align: center;
......
...@@ -10,22 +10,22 @@ ...@@ -10,22 +10,22 @@
<div class="detail_head_cell detail_head_status border_right"> <div class="detail_head_cell detail_head_status border_right">
<p class="detail_head_cell_title">申请状态</p> <p class="detail_head_cell_title">申请状态</p>
<p <p
class="detail_head_cell_val blue" class="detail_head_cell_val text_yellow"
v-if="orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1" v-if="orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1"
>待审核</p> >待审核</p>
<p <p
class="detail_head_cell_val blue" class="detail_head_cell_val text_yellow"
v-if="orderDetail.approval_first_level == 1&& orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1" v-if="orderDetail.approval_first_level == 1&& orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1"
>审核中</p> >审核中</p>
<p <p
class="detail_head_cell_val blue" class="detail_head_cell_val text_blue"
v-if="orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1" v-if="orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1"
>审核通过</p> >审核通过</p>
<p <p
class="detail_head_cell_val blue" class="detail_head_cell_val text_red"
v-if="orderDetail.approval_first_level == -1 && orderDetail.pay_status != -1" v-if="orderDetail.approval_first_level == -1 && orderDetail.pay_status != -1"
>审核未通过</p> >审核未通过</p>
<p class="detail_head_cell_val blue" v-if="orderDetail.pay_status == -1">订单已取消</p> <p class="detail_head_cell_val text_blackblue" v-if="orderDetail.pay_status == -1">订单已取消</p>
</div> </div>
<div class="detail_head_cell detail_head_no border_right"> <div class="detail_head_cell detail_head_no border_right">
<p class="detail_head_cell_title">订单编号</p> <p class="detail_head_cell_title">订单编号</p>
...@@ -118,10 +118,10 @@ ...@@ -118,10 +118,10 @@
</div> </div>
</el-col> </el-col>
<el-col :span="10" v-else-if="orderDetail.order_type == 3" class="detail_service_msg"> <el-col :span="10" v-else-if="orderDetail.order_type == 3" class="detail_service_msg">
<img :src="orderDetail.cover" class="detail_service_msg_img" /> <img :src="require('@/assets/imgs/img_yunziyuan.png')" class="detail_service_msg_img" />
<div class="detail_service_msg_right"> <div class="detail_service_msg_right">
<div class="detail_service_name_cloud"> <div class="detail_service_name_cloud">
<span>{{ orderDetail.name }}</span> <span>{{ orderDetail.namespace }}(云资源申请)</span>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -195,7 +195,9 @@ ...@@ -195,7 +195,9 @@
</div> </div>
<div class="params_block_item_in"> <div class="params_block_item_in">
<span class="params_block_item_title">数据盘:</span> <span class="params_block_item_title">数据盘:</span>
<span class="params_block_item_val">{{ orderDetail.disk_num}}块,每块{{orderDetail.disk_cap }}GB</span> <span
class="params_block_item_val"
>{{ orderDetail.disk_num}}块,每块{{orderDetail.disk_cap }}GB</span>
</div> </div>
</div> </div>
<span class="params_block_title margin_top_20">单个容器组规格:</span> <span class="params_block_title margin_top_20">单个容器组规格:</span>
...@@ -222,7 +224,7 @@ ...@@ -222,7 +224,7 @@
</div> </div>
<div class="detail_title">申请人信息</div> <div class="detail_title">申请人信息</div>
<info-list @download="download" :list_arr="list_arr" class="detail_s_val"></info-list> <info-list @download="download" :list_arr="list_arr" class="detail_s_val"></info-list>
<process-card :data="approval_arr1" class="detail_s_val"></process-card> <process-card v-if="orderDetail.order_type != 3" :data="approval_arr1" class="detail_s_val"></process-card>
</block-radius> </block-radius>
</div> </div>
</template> </template>
...@@ -506,9 +508,18 @@ export default { ...@@ -506,9 +508,18 @@ export default {
line-height: 28px; line-height: 28px;
color: #242c43; color: #242c43;
} }
.blue { .text_blue {
color: #515fe7; color: #515fe7;
} }
.text_yellow {
color: #ef9433;
}
.text_blackblue {
color: #242c43;
}
.text_red {
color: #e15260;
}
.btn_group { .btn_group {
position: absolute; position: absolute;
right: 20px; right: 20px;
...@@ -579,6 +590,7 @@ export default { ...@@ -579,6 +590,7 @@ export default {
width: 118px; width: 118px;
height: 118px; height: 118px;
border-radius: 8px; border-radius: 8px;
border: 3px #f4f7fc solid;
} }
.detail_service_msg_right { .detail_service_msg_right {
width: calc(100% - 140px); width: calc(100% - 140px);
......
...@@ -288,6 +288,7 @@ export default { ...@@ -288,6 +288,7 @@ export default {
: this.user_data.userType == 3 : this.user_data.userType == 3
? "普通用户" ? "普通用户"
: "普通用户开发者"; : "普通用户开发者";
this.imgList = [];
this.imgList.push(data.picture_path); this.imgList.push(data.picture_path);
this.formBusiness.businessSystemName = data.system_name; this.formBusiness.businessSystemName = data.system_name;
this.formBusiness.domainName = data.domain_name; this.formBusiness.domainName = data.domain_name;
......
...@@ -7,163 +7,14 @@ ...@@ -7,163 +7,14 @@
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<app-build-steps :active-step="step"> <app-build-steps :active-step="step">
<app-build-step
title="上传应用镜像"
:step="0"
:active-icon="require('@/assets/imgs/progress_ic_jingxiang.png')"
>
<el-form
ref="step1_form"
class="step_form"
label-position="top"
:model="image_info"
:rules="image_rules"
>
<el-form-item label="镜像名称:" prop="image_name">
<el-input
v-model="image_info.image_name"
placeholder="请输入镜像名称"
></el-input>
</el-form-item>
<el-form-item label="版本号:" prop="tag">
<el-input
v-model="image_info.tag"
placeholder="请输入版本号"
></el-input>
</el-form-item>
<el-form-item
label="上传镜像包:"
prop="file"
ref="step1_upload_item"
>
<el-upload
ref="step1_upload"
:auto-upload="false"
:data="{
image_name: image_info.image_name,
tag: image_info.tag,
}"
:limit="1"
:on-change="imageUploadChange"
:on-remove="imageUploadRemove"
:on-success="imageUploadSuccess"
:on-error="imageUploadError"
action="/apaas/hubApi/image/upload"
name="file"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将镜像文件拖到此处,或<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
<div class="apass_button upload_action">
<el-button
type="primary"
@click="submitImage('step1_form')"
:loading="step1UplaodLoading"
>
确认
</el-button>
</div>
<div class="form_line"></div>
<el-form-item label="上传镜像列表:">
<div
v-if="image_datas"
class="image_list_container"
v-infinite-scroll="loadImageList"
>
<apass-table
:header="image_headers"
:data="image_datas"
:padding-left="60"
></apass-table>
<p style="text-align: center" v-if="image_loading">加载中...</p>
<p
style="text-align: center"
v-if="image_noMore && image_datas.length > 0"
>
没有更多了
</p>
</div>
</el-form-item>
</el-form>
<div class="apass_button step_action">
<el-button type="primary" @click="goToStep1">
下一步
</el-button>
</div>
<image-detail ref="imageDetail"></image-detail>
</app-build-step>
<app-build-step
title="上传部署文件"
:step="1"
:active-icon="require('@/assets/imgs/progress_ic_bushudata.png')"
>
<el-form
ref="step2_form"
class="step_form"
label-position="top"
:model="deploy_info"
:rules="deploy_rules"
>
<el-form-item
label="上传部署文件:"
prop="file"
ref="step2_upload_item"
>
<div class="description_info">
<i class="el-icon-warning-outline"></i>
<p
v-html="
`1.必须包含以下文件:Chart.yaml,README.md,step.yaml,values.yaml,logo.png,templates/NOTES.txt;<br />
2.上述文件必须按照上述名称进行命名;<br />
3.step.yaml文件为values.yaml中的可配置参数,templates/NOTES.txt文件为应用的部署信息;<br />
4.templates/NOTES.txt主要用于用户部署后的访问,可以按照如下示例进行编写:<br />
&ensp;&ensp;this is a postgresql.<br />
&ensp;&ensp;author : Tom<br />
&ensp;&ensp;内部地址: {{ .Release.Name }}.{{ .Release.Namespace }}:5432<br />
5.请将文件夹压缩为“.zip”、“.tgz”、“.tar.gz”格式,如:名称为redis-ha的文件夹压缩为redis-ha.zip。<br />`
"
></p>
</div>
<el-upload
ref="step2_upload"
:auto-upload="false"
:limit="1"
:data="app_info"
action="/apaas/hubApi/market/app"
:on-change="deployUploadChange"
:on-remove="deployUploadRemove"
:on-success="deployUploadSuccess"
:on-error="deployUploadError"
name="file"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将部署文件拖到此处,或<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
</el-form>
<div class="apass_button step_action" style="margin-top: 120px;">
<el-button type="primary" plain @click="preStep">
上一步
</el-button>
<el-button type="primary" @click="goToStep2('step2_form')">
下一步
</el-button>
</div>
</app-build-step>
<app-build-step <app-build-step
title="应用基础信息填写" title="应用基础信息填写"
:step="2" :step="0"
:active-icon="require('@/assets/imgs/progress_ic_xinxitx.png')" :active-icon="require('@/assets/imgs/progress_ic_xinxitx.png')"
:done="done"
> >
<el-form <el-form
ref="step3_form" ref="app_info_form"
class="step_form" class="step_form"
label-position="top" label-position="top"
:model="app_info" :model="app_info"
...@@ -249,23 +100,171 @@ ...@@ -249,23 +100,171 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="apass_button step_action"> <div class="apass_button step_action">
<el-button type="primary" @click="step1Action">
下一步
</el-button>
</div>
</app-build-step>
<app-build-step
title="上传部署文件"
:step="1"
:active-icon="require('@/assets/imgs/progress_ic_bushudata.png')"
>
<el-form
ref="deploy_info_form"
class="step_form"
label-position="top"
:model="deploy_info"
:rules="deploy_rules"
>
<el-form-item
label="上传部署文件:"
prop="file"
ref="step2_upload_item"
>
<div class="description_info">
<i class="el-icon-warning-outline"></i>
<p
v-html="
`1.必须包含以下文件:Chart.yaml,README.md,step.yaml,values.yaml,logo.png,templates/NOTES.txt;<br />
2.上述文件必须按照上述名称进行命名;<br />
3.step.yaml文件为values.yaml中的可配置参数,templates/NOTES.txt文件为应用的部署信息;<br />
4.templates/NOTES.txt主要用于用户部署后的访问,可以按照如下示例进行编写:<br />
&ensp;&ensp;this is a postgresql.<br />
&ensp;&ensp;author : Tom<br />
&ensp;&ensp;内部地址: {{ .Release.Name }}.{{ .Release.Namespace }}:5432<br />
5.请将文件夹压缩为“.zip”、“.tgz”、“.tar.gz”格式,如:名称为redis-ha的文件夹压缩为redis-ha.zip。<br />`
"
></p>
</div>
<el-upload
ref="step2_upload"
:auto-upload="false"
:limit="1"
:data="app_info"
action="/apaas/hubApi/market/app"
:on-change="deployUploadChange"
:on-remove="deployUploadRemove"
:on-success="deployUploadSuccess"
:on-error="deployUploadError"
name="file"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将部署文件拖到此处,或<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
</el-form>
<div class="apass_button step_action" style="margin-top: 120px;">
<el-button <el-button
type="primary" type="primary"
:loading="step2Loading"
plain plain
:loading="submitLoading" @click="step = 0"
@click="preStep"
> >
上一步 上一步
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
:loading="submitLoading" :loading="step2Loading"
@click="sunbmitAction('step3_form')" @click="step2Action"
> >
提交 创建应用
</el-button> </el-button>
</div> </div>
</app-build-step> </app-build-step>
<app-build-step
title="上传应用镜像"
:step="2"
:active-icon="require('@/assets/imgs/progress_ic_jingxiang.png')"
>
<el-form
ref="image_info_form"
class="step_form"
label-position="top"
:model="image_info"
:rules="image_rules"
>
<el-form-item label="镜像名称:" prop="image_name">
<el-input
v-model="image_info.image_name"
placeholder="请输入镜像名称"
></el-input>
</el-form-item>
<el-form-item label="版本号:" prop="tag">
<el-input
v-model="image_info.tag"
placeholder="请输入版本号"
></el-input>
</el-form-item>
<el-form-item
label="上传镜像包:"
prop="file"
ref="step1_upload_item"
>
<el-upload
ref="step1_upload"
:auto-upload="false"
:data="{
app_id: app_id,
image_name: image_info.image_name,
tag: image_info.tag,
}"
:limit="1"
:on-change="imageUploadChange"
:on-remove="imageUploadRemove"
:on-success="imageUploadSuccess"
:on-error="imageUploadError"
action="/apaas/hubApi/image/upload"
name="file"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将镜像文件拖到此处,或<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
<div class="apass_button upload_action">
<el-button
type="primary"
@click="addImage"
:loading="addImageLoading"
>
确认
</el-button>
</div>
<div class="form_line"></div>
<el-form-item label="上传镜像列表:">
<div
v-if="image_datas"
class="image_list_container"
v-infinite-scroll="loadImageList"
>
<apass-table
:header="image_headers"
:data="image_datas"
:padding-left="60"
></apass-table>
<p style="text-align: center" v-if="image_loading">
加载中...
</p>
<p style="text-align: center" v-else-if="image_noMore">
没有更多了
</p>
</div>
</el-form-item>
</el-form>
<div class="apass_button step_action">
<el-button type="primary" @click="stepsDone">
完成
</el-button>
</div>
<image-detail ref="imageDetail"></image-detail>
</app-build-step>
</app-build-steps> </app-build-steps>
<apass-dialog <apass-dialog
...@@ -275,52 +274,36 @@ ...@@ -275,52 +274,36 @@
:submit="dialogInfo.submit" :submit="dialogInfo.submit"
></apass-dialog> ></apass-dialog>
</div> </div>
</template> </template>
<script> <script>
import appBuildSteps from "@/components/app-build-steps/app-build-steps"; import appBuildSteps from "@/components/app-build-steps/app-build-steps";
import appBuildStep from "@/components/app-build-steps/app-build-step"; import appBuildStep from "@/components/app-build-steps/app-build-step";
import apassTable from "@/components/apass-table"; import apassTable from "@/components/apass-table";
import uploadFile from "@/components/general/upload_file"; import uploadFile from "@/components/general/upload_file";
import apassDialog from "@/components/apass-dialog"; import apassDialog from "@/components/apass-dialog";
import imageDetail from "@/components/image-detail"; import imageDetail from "@/components/image-detail";
export default { export default {
components: { components: {
appBuildSteps, appBuildSteps,
appBuildStep, appBuildStep,
apassTable, apassTable,
uploadFile, uploadFile,
apassDialog, apassDialog,
imageDetail, imageDetail,
}, },
data: () => ({ data: () => ({
step: 0, dialogInfo: {
image_info: { title: "",
image_name: "", msg: "",
tag: "", submit: null,
file: "",
},
image_rules: {
image_name: [
{ required: true, message: "请输入镜像名称", trigger: "blur" },
],
tag: [{ required: true, message: "请输入版本号", trigger: "blur" }],
file: [{ required: true, message: "请选择镜像文件", trigger: "change" }],
},
step1UplaodLoading: false,
image_headers: [],
image_datas: [],
image_total: 0,
image_loading: false,
image_noMore: false,
image_page: 0,
deploy_info: {
file: "",
},
deploy_rules: {
file: [{ required: true, message: "请选择部署文件", trigger: "change" }],
}, },
step: 0,
ywlys: [],
types: [],
orgs: [],
logo: [],
app_info: { app_info: {
name: "", // 应用名称 name: "", // 应用名称
version: "", // 应用版本 version: "", // 应用版本
...@@ -350,31 +333,149 @@ export default { ...@@ -350,31 +333,149 @@ export default {
{ required: true, message: "请选择应用场景示例", trigger: "change" }, { required: true, message: "请选择应用场景示例", trigger: "change" },
], ],
}, },
ywlys: [], deploy_info: {
types: [], file: "",
orgs: [], },
logo: [], deploy_rules: {
submitLoading: false, file: [{ required: true, message: "请选择部署文件", trigger: "change" }],
dialogInfo: { },
title: "", step2Loading: false,
msg: "", app_id: "",
submit: null, image_info: {
image_name: "",
tag: "",
file: "",
},
image_rules: {
image_name: [
{ required: true, message: "请输入镜像名称", trigger: "blur" },
],
tag: [{ required: true, message: "请输入版本号", trigger: "blur" }],
file: [{ required: true, message: "请选择镜像文件", trigger: "change" }],
}, },
addImageLoading: false,
image_headers: [],
image_datas: [],
image_total: 0,
image_loading: false,
image_noMore: false,
image_page: 0,
done: false,
}), }),
methods: { methods: {
preStep() { getYwlys() {
this.step--; this.$http
.get("/apaas/hubApi/market/businessAreas")
.then((response) => {
this.ywlys = response.data.data;
})
.catch((error) => {
console.log(error);
});
},
getTypes() {
this.$http
.get("/apaas/hubApi/market/appTypes")
.then((response) => {
this.types = response.data.data;
})
.catch((error) => {
console.log(error);
});
},
getOrgs() {
this.$http
.get("/apaas/hubApi/market/departments")
.then((response) => {
this.orgs = response.data.data;
})
.catch((error) => {
console.log(error);
});
},
getNewList(file) {
this.app_info.logo = file.url;
},
step1Action() {
this.$refs.app_info_form.validate((valid) => {
if (valid) {
this.step = 1;
} else {
return false;
}
});
},
getFileType(fileName) {
const startIndex = fileName.lastIndexOf(".");
if (startIndex != -1) {
return fileName
.substring(startIndex + 1, fileName.length)
.toLowerCase();
} else {
return "";
}
},
deployUploadChange(file) {
const filtType = this.getFileType(file.name);
if (filtType === "zip" || filtType === "gz" || filtType === "tgz") {
this.deploy_info.file = file;
this.$refs.step2_upload_item.clearValidate();
} else {
this.$message.error("部署文件格式错误!");
this.deploy_info.file = "";
this.$refs.step2_upload.clearFiles();
}
},
deployUploadRemove() {
this.deploy_info.file = "";
},
deployUploadSuccess(response) {
if (response.success == 1) {
this.$message({
message: `提交成功`,
type: "success",
});
this.step2Loading = false;
this.step = 2;
this.app_id = response.data;
this.image_datas = [];
this.image_page = 1;
this.initImageList();
} else {
this.$message({
message: response.errMsg || `提交失败`,
type: "warning",
});
this.step2Loading = false;
}
},
deployUploadError() {
this.$message({
message: `提交失败`,
type: "warning",
});
this.step2Loading = false;
}, },
nextStep() { step2Action() {
this.step++; this.$refs.deploy_info_form.validate((valid) => {
if (valid) {
this.step2Loading = true;
this.$refs.step2_upload.submit();
} else {
return false;
}
});
}, },
initImageList() { initImageList() {
this.image_loading = true;
this.$http this.$http
.get("/apaas/hubApi/image/imageUpList", { .get("/apaas/hubApi/image/imageUpList", {
params: { params: {
page: this.image_page, page: this.image_page,
size: 10, size: 10,
app_id: this.app_id,
}, },
}) })
.then(({ data }) => { .then(({ data }) => {
...@@ -391,8 +492,9 @@ export default { ...@@ -391,8 +492,9 @@ export default {
loadImageList() { loadImageList() {
if (this.image_datas.length < this.image_total) { if (this.image_datas.length < this.image_total) {
this.image_page++; this.image_page++;
this.image_loading = true;
this.initImageList(); this.initImageList();
} else { } else if (this.image_total > 0) {
this.image_noMore = true; this.image_noMore = true;
} }
}, },
...@@ -416,7 +518,7 @@ export default { ...@@ -416,7 +518,7 @@ export default {
this.image_info.tag = ""; this.image_info.tag = "";
this.image_info.file = ""; this.image_info.file = "";
this.$refs.step1_upload.clearFiles(); this.$refs.step1_upload.clearFiles();
this.step1UplaodLoading = false; this.addImageLoading = false;
this.image_datas = []; this.image_datas = [];
this.image_page = 1; this.image_page = 1;
this.initImageList(); this.initImageList();
...@@ -425,7 +527,7 @@ export default { ...@@ -425,7 +527,7 @@ export default {
message: response.errMsg || `上传镜像失败`, message: response.errMsg || `上传镜像失败`,
type: "warning", type: "warning",
}); });
this.step1UplaodLoading = false; this.addImageLoading = false;
} }
}, },
imageUploadError() { imageUploadError() {
...@@ -433,22 +535,22 @@ export default { ...@@ -433,22 +535,22 @@ export default {
message: `上传镜像失败`, message: `上传镜像失败`,
type: "warning", type: "warning",
}); });
this.step1UplaodLoading = false; this.addImageLoading = false;
}, },
imageUploadRemove() { imageUploadRemove() {
this.image_info.file = ""; this.image_info.file = "";
}, },
submitImage(formName) { addImage() {
this.$refs[formName].validate((valid) => { this.$refs.image_info_form.validate((valid) => {
if (valid) { if (valid) {
this.step1UplaodLoading = true; this.addImageLoading = true;
this.$refs.step1_upload.submit(); this.$refs.step1_upload.submit();
} else { } else {
return false; return false;
} }
}); });
}, },
deleteItem(item) { deleteImage(item) {
this.dialogInfo.title = ""; this.dialogInfo.title = "";
this.dialogInfo.msg = "是否删除该镜像?"; this.dialogInfo.msg = "是否删除该镜像?";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
...@@ -480,122 +582,19 @@ export default { ...@@ -480,122 +582,19 @@ export default {
}; };
this.$refs.dialog.show(); this.$refs.dialog.show();
}, },
goToStep1() {
// if (this.image_total > 0) {
this.nextStep();
/* } else {
this.$message({
message: `您尚未上传任何镜像`,
type: "warning",
});
} */
},
goToStep2(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.nextStep();
} else {
return false;
}
});
},
getNewList(file) {
this.app_info.logo = file.url;
},
getYwlys() {
this.$http
.get("/apaas/hubApi/market/businessAreas")
.then((response) => {
this.ywlys = response.data.data;
})
.catch((error) => {
console.log(error);
});
},
getTypes() {
this.$http
.get("/apaas/hubApi/market/appTypes")
.then((response) => {
this.types = response.data.data;
})
.catch((error) => {
console.log(error);
});
},
getOrgs() {
this.$http
.get("/apaas/hubApi/market/departments")
.then((response) => {
this.orgs = response.data.data;
})
.catch((error) => {
console.log(error);
});
},
deployUploadChange(file) {
const filtType = this.getFileType(file.name);
if (filtType === "zip" || filtType === "gz" || filtType === "tgz") {
this.deploy_info.file = file;
this.$refs.step2_upload_item.clearValidate();
} else {
this.$message.error("部署文件格式错误!");
this.deploy_info.file = "";
this.$refs.step2_upload.clearFiles();
}
},
deployUploadRemove() {
this.deploy_info.file = "";
},
deployUploadSuccess(response) {
if (response.success == 1) {
this.$message({
message: `提交成功`,
type: "success",
});
this.submitLoading = false;
this.$router.push("/yygl/2/0");
} else {
this.$message({
message: response.errMsg || `提交失败`,
type: "warning",
});
this.submitLoading = false;
}
},
deployUploadError() {
this.$message({
message: `提交失败`,
type: "warning",
});
this.submitLoading = false;
},
sunbmitAction(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.submitLoading = true;
this.$refs.step2_upload.submit();
} else {
return false;
}
});
},
getFileType(fileName) {
const startIndex = fileName.lastIndexOf(".");
if (startIndex != -1) {
return fileName
.substring(startIndex + 1, fileName.length)
.toLowerCase();
} else {
return "";
}
},
showImageDetail(item) { showImageDetail(item) {
this.$refs.imageDetail.showDialog(item); this.$refs.imageDetail.showDialog(item);
}, },
stepsDone() {
this.done = true;
this.$router.push(`/yygl/${this.$store.getters.level}/0`);
}, // TODO: 增加成功的状态页
}, },
mounted() { mounted() {
this.getYwlys();
this.getTypes();
this.getOrgs();
this.image_headers = [ this.image_headers = [
{ {
label: "镜像名称", label: "镜像名称",
...@@ -617,17 +616,11 @@ export default { ...@@ -617,17 +616,11 @@ export default {
{ {
label: "删除", label: "删除",
class: "warn", class: "warn",
callback: this.deleteItem, callback: this.deleteImage,
}, },
], ],
}, },
]; ];
this.image_datas = [];
this.image_page = 1;
this.initImageList();
this.getYwlys();
this.getTypes();
this.getOrgs();
}, },
}; };
</script> </script>
......
...@@ -24,8 +24,11 @@ ...@@ -24,8 +24,11 @@
<apass-dialog <apass-dialog
ref="dialog" ref="dialog"
:title="dialogInfo.title"
:msg="dialogInfo.msg" :msg="dialogInfo.msg"
:cancel-text="dialogInfo.cancelText"
:cancel-type="dialogInfo.cancelType"
:cancel="dialogInfo.cancel"
:sunbmit-text="dialogInfo.sunbmitText"
:submit="dialogInfo.submit" :submit="dialogInfo.submit"
></apass-dialog> ></apass-dialog>
</div> </div>
...@@ -49,8 +52,11 @@ export default { ...@@ -49,8 +52,11 @@ export default {
listData: [], listData: [],
listTotal: 0, listTotal: 0,
dialogInfo: { dialogInfo: {
title: "",
msg: "", msg: "",
cancelText: "",
cancelType: "",
cancel: null,
sunbmitText: "",
submit: null, submit: null,
}, },
}), }),
...@@ -84,10 +90,28 @@ export default { ...@@ -84,10 +90,28 @@ export default {
console.log("detailAction"); console.log("detailAction");
}, },
approveAction(item) { approveAction(item) {
console.log("approveAction"); this.dialogInfo.msg = "该工作区域的申请通过还是拒绝?";
this.dialogInfo.cancelText = "拒绝";
this.dialogInfo.cancelType = "danger";
this.dialogInfo.cancel = () => {
console.log("approveAction - false");
};
this.dialogInfo.sunbmitText = "通过";
this.dialogInfo.submit = () => {
console.log("approveAction - true");
};
this.showDialog();
}, },
deleteAction(item) { deleteAction(item) {
console.log("deleteAction"); this.dialogInfo.msg = "确认要删除这条申请记录吗?";
this.dialogInfo.cancelText = "";
this.dialogInfo.cancelType = "";
this.dialogInfo.cancel = null;
this.dialogInfo.sunbmitText = "";
this.dialogInfo.submit = () => {
console.log("deleteAction");
};
this.showDialog();
}, },
}, },
created() { created() {
......
<template> <template>
<!--
apply_id
user_id
apply_type
use_uid
id
-->
<div> <div>
<el-breadcrumb separator="/" class="bread_crumb1 bread_left"> <el-breadcrumb separator="/" class="bread_crumb1 bread_left">
<el-breadcrumb-item <el-breadcrumb-item
...@@ -21,17 +28,11 @@ ...@@ -21,17 +28,11 @@
<span class="head_right_msg_item">{{ cloudData.phone }}</span> <span class="head_right_msg_item">{{ cloudData.phone }}</span>
资源申请状态: 资源申请状态:
<span <span
v-if="apply_type == 0 && approve_state == 0 || apply_type != 0 && approve_update_state == 0" v-if="apply_type == 0"
class="head_right_msg_item apply_wait" class="head_right_msg_item apply_wait"
>待审批</span> >待审批</span>
<span <span v-if="apply_type == 1" class="head_right_msg_item apply_success">审批通过</span>
v-if="apply_type == 0 && approve_state == 1 || apply_type != 0 && approve_update_state == 1" <span v-if="apply_type == -1" class="head_right_msg_item apply_refuse">审批未通过</span>
class="head_right_msg_item apply_success"
>审批通过</span>
<span
v-if="apply_type == 0 && approve_state == -1 || apply_type != 0 && approve_update_state == -1"
class="head_right_msg_item apply_refuse"
>审批未通过</span>
</p> </p>
<p class="head_right_msg_p"> <p class="head_right_msg_p">
业务系统名: 业务系统名:
...@@ -66,7 +67,13 @@ ...@@ -66,7 +67,13 @@
<div class="params_block_item_in"> <div class="params_block_item_in">
<span class="params_block_item_title">数据盘:</span> <span class="params_block_item_title">数据盘:</span>
<div class="params_block_item_val"> <div class="params_block_item_val">
<div>{{ cloudDteail.disk}}</div> <div>{{ cloudDteail.disk }}</div>
</div>
</div>
<div class="params_block_item_in">
<span class="params_block_item_title">数据盘类型:</span>
<div class="params_block_item_val">
<div>{{ cloudDteail.store_type }}</div>
</div> </div>
</div> </div>
<div class="params_block_item_in"> <div class="params_block_item_in">
...@@ -113,6 +120,12 @@ ...@@ -113,6 +120,12 @@
<div>{{ cloudDetailNew.adjust_disk}}</div> <div>{{ cloudDetailNew.adjust_disk}}</div>
</div> </div>
</div> </div>
<div class="params_block_item_in">
<span class="params_block_item_title">数据盘类型:</span>
<div class="params_block_item_val">
<div>{{ cloudDetailNew.store_type }}</div>
</div>
</div>
<div class="params_block_item_in"> <div class="params_block_item_in">
<span class="params_block_item_title">续期时长:</span> <span class="params_block_item_title">续期时长:</span>
<span class="params_block_item_val">{{ cloudDetailNew.adjust_duration_time }}</span> <span class="params_block_item_val">{{ cloudDetailNew.adjust_duration_time }}</span>
...@@ -223,11 +236,36 @@ ...@@ -223,11 +236,36 @@
</div> </div>
</InfoList> </InfoList>
</div> </div>
<div class="btn_footer"> <div
<el-button class="submit" @click="submit">提交资源申请</el-button> class="btn_footer"
<el-button class="adjustment" @click="adjustment">资源调整</el-button> v-if="now_user != 0 || (now_user == 0 && apploy_msg.second_level != 0)"
<el-button class="adjustment" @click="distribution">分配</el-button> >
<el-button class="refuse" @click="refuse">拒绝</el-button> <el-button
v-if="now_user == 1 && apploy_msg.first_level == 0"
class="submit"
@click="submit"
>提交资源申请</el-button>
<el-button
v-if="now_user == 0 && apploy_msg.second_level != 0"
class="adjustment"
@click="adjustment"
>资源调整</el-button>
<el-button
class="adjustment"
v-if="now_user == 1 && apploy_msg.second_level == 1 && use_uid == ''"
@click="distribution"
>分配</el-button>
<el-button
v-if="now_user == 2 && apploy_msg.second_level == 0 || now_user == 1 && apploy_msg.first_level == 0"
class="refuse"
@click="refuse"
>拒绝</el-button>
<el-button
v-if="now_user == 2 && apploy_msg.second_level == 0"
class="adjustment"
@click="pass"
>通过</el-button>
<el-button v-if="now_user == 2 && use_uid != ''" class="refuse" @click="deleteItem">删除</el-button>
</div> </div>
</BlockRadius> </BlockRadius>
<AllotInfoConfirm ref="allotConfirm"></AllotInfoConfirm> <AllotInfoConfirm ref="allotConfirm"></AllotInfoConfirm>
...@@ -443,7 +481,14 @@ export default { ...@@ -443,7 +481,14 @@ export default {
}, },
apply_type: 0, apply_type: 0,
approve_state: 1, approve_state: 1,
approve_update_state: 1 approve_update_state: 1,
apploy_msg: {
first_level: null,
second_level: null
},
use_uid: "",
could_delete: false,
apply_id: ""
}; };
}, },
watch: {}, watch: {},
...@@ -485,8 +530,9 @@ export default { ...@@ -485,8 +530,9 @@ export default {
} }
}); });
}, },
submit() {},
refuse() {}, refuse() {},
pass() {},
deleteItem() {},
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
...@@ -497,21 +543,52 @@ export default { ...@@ -497,21 +543,52 @@ export default {
} }
}); });
}, },
submit(item) { submit() {
this.$refs.allotConfirm.getDetail(item.apply_id); this.$refs.allotConfirm.getDetail(this.apply_id);
}, },
clickTab() {}, clickTab() {},
setListWithRole() { setListWithRole() {
console.log(this.now_user);
if (this.now_user == 0) { if (this.now_user == 0) {
let index = this.list_arr.findIndex( // 普通用户
item => item.title == "资源使用情况:" if (this.apply_type == 0) {
); // 申请类型0
this.list_arr.splice(index); let index = this.list_arr.findIndex(
this.tabShow = false; item => item.title == "资源使用情况:"
);
this.list_arr.splice(index);
this.tabShow = false;
} else if (this.apply_type != 0) {
// 申请类型1
this.tabShow = false;
}
} else if (this.now_user == 1) { } else if (this.now_user == 1) {
this.tabShow = true; // 组织
if (this.apply_type == 0) {
// 申请类型
let index = this.list_arr.findIndex(
item => item.title == "资源使用情况:"
);
this.list_arr.splice(index);
} 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;
}
} else if (this.now_user == 2) { } else if (this.now_user == 2) {
// 超管
if (this.apply_type == 0) {
let index = this.list_arr.findIndex(
item => item.title == "资源使用情况:"
);
this.list_arr.splice(index);
this.tabShow = false;
} else if (this.apply_type != 0) {
this.tabShow = false;
}
} }
this.activeName = "0"; this.activeName = "0";
}, },
...@@ -524,7 +601,9 @@ export default { ...@@ -524,7 +601,9 @@ export default {
this.$api.workbench.getCloudDetail(query).then(response => { this.$api.workbench.getCloudDetail(query).then(response => {
let data = response.data.data; let data = response.data.data;
console.log(data); console.log(data);
this.list_arr[3].info = helper.downloadFileFormat(data.apply_file); // application file name 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[3].url = data.apply_file; // application file url
this.list_arr[6].info = data.bgn_time; // get time this.list_arr[6].info = data.bgn_time; // get time
this.list_arr[7].info = data.time_remaining; // remaining days this.list_arr[7].info = data.time_remaining; // remaining days
...@@ -573,13 +652,15 @@ export default { ...@@ -573,13 +652,15 @@ export default {
this.cloudDteail.adjust_one_cpu_min = data.adjust_one_cpu_min; 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_max = data.adjust_one_memory_max;
this.cloudDteail.adjust_one_memory_min = data.adjust_one_memory_min; 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.setListWithRole(); this.setListWithRole();
}); });
} }
} }
}; };
</script> </script>
<style> <style scoped>
.in_cloud_block { .in_cloud_block {
margin: 0 20px; margin: 0 20px;
} }
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
ref="dialog" ref="dialog"
:title="dialogInfo.title" :title="dialogInfo.title"
:msg="dialogInfo.msg" :msg="dialogInfo.msg"
:cancel-hide="dialogInfo.cancelHide"
:submit="dialogInfo.submit" :submit="dialogInfo.submit"
></apass-dialog> ></apass-dialog>
</div> </div>
...@@ -78,8 +79,8 @@ export default { ...@@ -78,8 +79,8 @@ export default {
listTotal: 0, listTotal: 0,
dashboardList: [], dashboardList: [],
dialogInfo: { dialogInfo: {
title: "",
msg: "", msg: "",
cancelHide: false,
submit: null, submit: null,
}, },
}), }),
...@@ -320,7 +321,30 @@ export default { ...@@ -320,7 +321,30 @@ export default {
console.log("detailAction"); console.log("detailAction");
}, },
stateAction(item) { stateAction(item) {
console.log("stateAction"); this.dialogInfo.msg = "您确认要禁用该工作区域吗?";
this.dialogInfo.cancelHide = false;
this.dialogInfo.submit = () => {
console.log("deleteAction");
setTimeout(() => {
this.dialogInfo.msg = `该工作区域已被禁用,普通用户与组织管理员依旧能查看该工作区域,但无法做任何操作。`;
this.dialogInfo.cancelHide = true;
this.dialogInfo.submit = null;
this.showDialog();
}, 500);
};
this.showDialog();
},
deleteAction(item) {
this.dialogInfo.msg = `
您确认要移除该工作区域吗?</br>
<span style='color: #e15260;'>移除操作无法撤销</span>,您还要继续吗?
`;
this.dialogInfo.cancelHide = false;
this.dialogInfo.submit = () => {
console.log("deleteAction");
};
this.showDialog();
}, },
}, },
created() { created() {
...@@ -403,7 +427,7 @@ export default { ...@@ -403,7 +427,7 @@ export default {
label: "操作", label: "操作",
type: "buttons", type: "buttons",
align: "center", align: "center",
width: 80, width: 160,
actionList: [ actionList: [
{ {
getLabel(item) { getLabel(item) {
...@@ -411,6 +435,11 @@ export default { ...@@ -411,6 +435,11 @@ export default {
}, },
callback: this.stateAction, callback: this.stateAction,
}, },
{
label: "移除",
class: "warn",
callback: this.deleteAction,
},
], ],
}, },
]; ];
......
...@@ -73,7 +73,6 @@ ...@@ -73,7 +73,6 @@
title="下载日志文件" title="下载日志文件"
sunbmitText="保存" sunbmitText="保存"
:submitDisable="download_flag" :submitDisable="download_flag"
submit="file"
@submit="save_file" @submit="save_file"
> >
<template slot="content"> <template slot="content">
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:list-padding-left="35" :list-padding-left="35"
@list-action="initDatas" @list-action="initDatas"
> >
<el-breadcrumb separator="/"> <el-breadcrumb separator="/" slot="breadcrumb">
<el-breadcrumb-item>我的应用</el-breadcrumb-item> <el-breadcrumb-item>我的应用</el-breadcrumb-item>
<el-breadcrumb-item>{{ pathName }}</el-breadcrumb-item> <el-breadcrumb-item>{{ pathName }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
</template> </template>
<script> <script>
import helper from "@/services/helper.js";
import appList from "@/components/app-list/app-list"; import appList from "@/components/app-list/app-list";
import apassList from "@/components/apass-list"; import apassList from "@/components/apass-list";
import apassDialog from "@/components/apass-dialog"; import apassDialog from "@/components/apass-dialog";
...@@ -45,7 +46,7 @@ export default { ...@@ -45,7 +46,7 @@ export default {
components: { components: {
appList, appList,
apassList, apassList,
apassDialog apassDialog,
}, },
data: () => ({ data: () => ({
level: 0, // 用户等级 level: 0, // 用户等级
...@@ -62,15 +63,15 @@ export default { ...@@ -62,15 +63,15 @@ export default {
submit: null, submit: null,
cancelText: "", cancelText: "",
sunbmitText: "", sunbmitText: "",
submit: null submit: null,
}, },
otherFilter1: [], otherFilter1: [],
otherFilter2: [], otherFilter2: [],
tempFliter: null tempFliter: null,
}), }),
computed: { computed: {
...mapState({ ...mapState({
yyglNav: "yyglNav" yyglNav: "yyglNav",
}), }),
pathName() { pathName() {
return this.yyglNav[this.level][this.type]; return this.yyglNav[this.level][this.type];
...@@ -91,7 +92,7 @@ export default { ...@@ -91,7 +92,7 @@ export default {
} }
return url; return url;
} },
}, },
methods: { methods: {
initHeader() { initHeader() {
...@@ -110,18 +111,18 @@ export default { ...@@ -110,18 +111,18 @@ export default {
data: [ data: [
{ {
name: "平台应用", name: "平台应用",
value: 2 value: 2,
}, },
{ {
name: "开发者应用", name: "开发者应用",
value: 1 value: 1,
}, },
{ {
name: "未上架", name: "未上架",
value: 0 value: 0,
} },
] ],
} },
]; ];
this.otherFilter2 = [ this.otherFilter2 = [
{ {
...@@ -130,13 +131,13 @@ export default { ...@@ -130,13 +131,13 @@ export default {
data: [ data: [
{ {
name: "支持开发", name: "支持开发",
value: 1 value: 1,
}, },
{ {
name: "不支持开发", name: "不支持开发",
value: 0 value: 0,
} },
] ],
}, },
{ {
name: "应用来源", name: "应用来源",
...@@ -144,14 +145,14 @@ export default { ...@@ -144,14 +145,14 @@ export default {
data: [ data: [
{ {
name: "创建的应用", name: "创建的应用",
value: 0 value: 0,
}, },
{ {
name: "申请的应用", name: "申请的应用",
value: 1 value: 1,
} },
] ],
} },
]; ];
} }
// 普通用户 --- 我部署的应用 card列表形式 // 普通用户 --- 我部署的应用 card列表形式
...@@ -165,14 +166,14 @@ export default { ...@@ -165,14 +166,14 @@ export default {
data: [ data: [
{ {
name: "应用商店", name: "应用商店",
value: 0 value: 0,
}, },
{ {
name: "开发者应用", name: "开发者应用",
value: 1 value: 1,
} },
] ],
} },
]; ];
this.otherFilter2 = [ this.otherFilter2 = [
{ {
...@@ -181,14 +182,14 @@ export default { ...@@ -181,14 +182,14 @@ export default {
data: [ data: [
{ {
name: "支持开发", name: "支持开发",
value: 1 value: 1,
}, },
{ {
name: "不支持开发", name: "不支持开发",
value: 0 value: 0,
} },
] ],
} },
]; ];
} }
// 普通用户 --- 申请的应用 // 普通用户 --- 申请的应用
...@@ -199,47 +200,46 @@ export default { ...@@ -199,47 +200,46 @@ export default {
label: "应用名称", label: "应用名称",
prop: "app_name", prop: "app_name",
type: "button", type: "button",
callback: this.detailItem callback: this.detailItem,
}, },
{ {
label: "应用版本", label: "应用版本",
prop: "version", prop: "version",
align: "center" align: "center",
}, },
{ {
label: "应用类型", label: "应用类型",
prop: "type_name", prop: "type_name",
align: "center" align: "center",
}, },
{ {
label: "业务领域", label: "业务领域",
prop: "ywly_name", prop: "ywly_name",
align: "center" align: "center",
}, },
{ {
label: "在线区域", label: "在线区域",
prop: "online_state_name", prop: "online_state_name",
align: "center" align: "center",
}, },
{ {
label: "申请类型", label: "申请类型",
prop: "apply_type_name", prop: "apply_type_name",
align: "center" align: "center",
}, },
{ {
label: "申请时间", label: "申请时间",
prop: "time",
getText(item) { getText(item) {
let time = item.time || ""; let time = item.time || "";
return time.substring(0, 10); return helper.dateStringTransform(date);
}, },
align: "center" align: "center",
}, },
{ {
label: "申请状态", label: "申请状态",
prop: "apply_status", prop: "apply_status",
align: "center" align: "center",
} },
]; ];
this.otherFilter1 = [ this.otherFilter1 = [
{ {
...@@ -248,14 +248,14 @@ export default { ...@@ -248,14 +248,14 @@ export default {
data: [ data: [
{ {
name: "平台应用", name: "平台应用",
value: 2 value: 2,
}, },
{ {
name: "开发者应用", name: "开发者应用",
value: 1 value: 1,
} },
] ],
} },
]; ];
this.otherFilter2 = [ this.otherFilter2 = [
{ {
...@@ -264,13 +264,13 @@ export default { ...@@ -264,13 +264,13 @@ export default {
data: [ data: [
{ {
name: "申请部署", name: "申请部署",
value: 0 value: 0,
}, },
{ {
name: "申请开发", name: "申请开发",
value: 1 value: 1,
} },
] ],
}, },
{ {
name: "申请状态", name: "申请状态",
...@@ -278,18 +278,18 @@ export default { ...@@ -278,18 +278,18 @@ export default {
data: [ data: [
{ {
name: "审批中", name: "审批中",
value: 1 value: 1,
}, },
{ {
name: "审批通过", name: "审批通过",
value: 2 value: 2,
}, },
{ {
name: "审批未通过", name: "审批未通过",
value: 0 value: 0,
} },
] ],
} },
]; ];
} }
...@@ -301,36 +301,35 @@ export default { ...@@ -301,36 +301,35 @@ export default {
label: "应用名称", label: "应用名称",
prop: "app_name", prop: "app_name",
type: "button", type: "button",
callback: this.detailItem callback: this.detailItem,
}, },
{ {
label: "应用版本", label: "应用版本",
prop: "version", prop: "version",
align: "center" align: "center",
}, },
{ {
label: "应用类型", label: "应用类型",
prop: "type_name", prop: "type_name",
align: "center" align: "center",
}, },
{ {
label: "业务领域", label: "业务领域",
prop: "ywly_name", prop: "ywly_name",
align: "center" align: "center",
}, },
{ {
label: "在线状态", label: "在线状态",
prop: "online_state", prop: "online_state_name",
align: "center" align: "center",
}, },
{ {
label: "创建时间", label: "创建时间",
prop: "create_date",
getText(item) { getText(item) {
let time = item.create_date || ""; let date = item.create_date || "";
return time.substring(0, 10); return helper.dateStringTransform(date);
}, },
align: "center" align: "center",
}, },
{ {
label: "操作", label: "操作",
...@@ -353,10 +352,10 @@ export default { ...@@ -353,10 +352,10 @@ export default {
item.up_deploy_status == 0 || item.up_deploy_status == 0 ||
item.up_deploy_status == 2 item.up_deploy_status == 2
); );
} },
} },
] ],
} },
]; ];
this.otherFilter1 = [ this.otherFilter1 = [
{ {
...@@ -365,18 +364,18 @@ export default { ...@@ -365,18 +364,18 @@ export default {
data: [ data: [
{ {
name: "平台应用", name: "平台应用",
value: 2 value: 2,
}, },
{ {
name: "开发者应用", name: "开发者应用",
value: 1 value: 1,
}, },
{ {
name: "未上架", name: "未上架",
value: 0 value: 0,
} },
] ],
} },
]; ];
this.otherFilter2 = [ this.otherFilter2 = [
{ {
...@@ -385,13 +384,13 @@ export default { ...@@ -385,13 +384,13 @@ export default {
data: [ data: [
{ {
name: "支持开发", name: "支持开发",
value: 1 value: 1,
}, },
{ {
name: "不支持开发", name: "不支持开发",
value: 0 value: 0,
} },
] ],
}, },
{ {
name: "应用来源", name: "应用来源",
...@@ -399,14 +398,14 @@ export default { ...@@ -399,14 +398,14 @@ export default {
data: [ data: [
{ {
name: "创建的应用", name: "创建的应用",
value: 0 value: 0,
}, },
{ {
name: "申请的应用", name: "申请的应用",
value: 1 value: 1,
} },
] ],
} },
]; ];
} }
// 组织管理员 --- 部署的应用 // 组织管理员 --- 部署的应用
...@@ -417,38 +416,41 @@ export default { ...@@ -417,38 +416,41 @@ export default {
label: "应用名称", label: "应用名称",
prop: "deploy_name", prop: "deploy_name",
type: "button", type: "button",
callback: this.detailItemDeploy callback: this.detailItemDeploy,
}, },
{ {
label: "应用版本", label: "应用版本",
prop: "app_version", prop: "app_version",
align: "center" align: "center",
}, },
{ {
label: "应用类型", label: "应用类型",
prop: "type_name", prop: "type_name",
align: "center" align: "center",
}, },
{ {
label: "业务领域", label: "业务领域",
prop: "business_area_name", prop: "business_area_name",
align: "center" align: "center",
}, },
{ {
label: "上架区域", label: "上架区域",
prop: "upload_area", prop: "upload_area",
align: "center" align: "center",
}, },
{ {
label: "部署时间", label: "部署时间",
prop: "created", getText(item) {
align: "center" let date = item.created || "";
return helper.dateStringTransform(date);
},
align: "center",
}, },
{ {
label: "部署区域", label: "部署区域",
prop: "namespace", prop: "namespace",
align: "center" align: "center",
} },
]; ];
this.otherFilter1 = [ this.otherFilter1 = [
{ {
...@@ -457,18 +459,18 @@ export default { ...@@ -457,18 +459,18 @@ export default {
data: [ data: [
{ {
name: "平台应用", name: "平台应用",
value: 2 value: 2,
}, },
{ {
name: "开发者应用", name: "开发者应用",
value: 1 value: 1,
}, },
{ {
name: "未上架", name: "未上架",
value: 0 value: 0,
} },
] ],
} },
]; ];
this.otherFilter2 = [ this.otherFilter2 = [
{ {
...@@ -477,14 +479,14 @@ export default { ...@@ -477,14 +479,14 @@ export default {
data: [ data: [
{ {
name: "支持开发", name: "支持开发",
value: 1 value: 1,
}, },
{ {
name: "不支持开发", name: "不支持开发",
value: 0 value: 0,
} },
] ],
} },
]; ];
} }
// 组织管理员 --- 应用审批管理 // 组织管理员 --- 应用审批管理
...@@ -493,42 +495,45 @@ export default { ...@@ -493,42 +495,45 @@ export default {
this.listHeader = [ this.listHeader = [
{ {
label: "应用名称", label: "应用名称",
prop: "app_name" prop: "app_name",
}, },
{ {
label: "应用版本", label: "应用版本",
prop: "version", prop: "version",
align: "center" align: "center",
}, },
{ {
label: "应用类型", label: "应用类型",
prop: "type_name", prop: "type_name",
align: "center" align: "center",
}, },
{ {
label: "业务领域", label: "业务领域",
prop: "ywly_name", prop: "ywly_name",
align: "center" align: "center",
}, },
{ {
label: "在线区域", label: "在线区域",
prop: "online_state_name", prop: "online_state_name",
align: "center" align: "center",
}, },
{ {
label: "申请类型", label: "申请类型",
prop: "apply_type_name", prop: "apply_type_name",
align: "center" align: "center",
}, },
{ {
label: "审批时间", label: "审批时间",
prop: "time", getText(item) {
align: "center" let date = item.time || "";
return helper.dateStringTransform(date);
},
align: "center",
}, },
{ {
label: "申请状态", label: "申请状态",
prop: "apply_status", prop: "apply_status",
align: "center" align: "center",
}, },
{ {
label: "操作", label: "操作",
...@@ -540,10 +545,10 @@ export default { ...@@ -540,10 +545,10 @@ export default {
getLabel(item) { getLabel(item) {
return item.apply_status === "已审批" ? "详情" : "审批"; return item.apply_status === "已审批" ? "详情" : "审批";
}, },
callback: this.detailItem callback: this.detailItem,
} },
] ],
} },
]; ];
this.otherFilter1 = [ this.otherFilter1 = [
{ {
...@@ -552,14 +557,14 @@ export default { ...@@ -552,14 +557,14 @@ export default {
data: [ data: [
{ {
name: "应用商店", name: "应用商店",
value: 2 value: 2,
}, },
{ {
name: "开发者应用", name: "开发者应用",
value: 1 value: 1,
} },
] ],
} },
]; ];
this.otherFilter2 = [ this.otherFilter2 = [
{ {
...@@ -568,32 +573,28 @@ export default { ...@@ -568,32 +573,28 @@ export default {
data: [ data: [
{ {
name: "申请部署", name: "申请部署",
value: 0 value: 0,
}, },
{ {
name: "申请开发", name: "申请开发",
value: 1 value: 1,
} },
] ],
}, },
{ {
name: "申请状态", name: "申请状态",
prop: "apply_state", prop: "apply_state",
data: [ data: [
{ {
name: "审批中", name: "待审批",
value: 1 value: 0,
}, },
{ {
name: "审批通过", name: "已审批",
value: 2 value: 1,
}, },
{ ],
name: "审批未通过", },
value: 0
}
]
}
]; ];
} }
...@@ -605,32 +606,32 @@ export default { ...@@ -605,32 +606,32 @@ export default {
label: "应用名称", label: "应用名称",
prop: "app_name", prop: "app_name",
type: "button", type: "button",
callback: this.detailItem callback: this.detailItem,
}, },
{ {
label: "应用版本", label: "应用版本",
prop: "version", prop: "version",
align: "center" align: "center",
}, },
{ {
label: "应用类型", label: "应用类型",
prop: "type_name", prop: "type_name",
align: "center" align: "center",
}, },
{ {
label: "业务领域", label: "业务领域",
prop: "ywly_name", prop: "ywly_name",
align: "center" align: "center",
}, },
{ {
label: "在线状态", label: "在线状态",
prop: "online_state", prop: "online_state_name",
align: "center" align: "center",
}, },
{ {
label: "所属组织", label: "所属组织",
prop: "org_name", prop: "org_name",
align: "center" align: "center",
}, },
{ {
label: "操作", label: "操作",
...@@ -640,7 +641,7 @@ export default { ...@@ -640,7 +641,7 @@ export default {
actionList: [ actionList: [
{ {
label: "编辑", label: "编辑",
callback: _self.editItem callback: _self.editItem,
}, },
{ {
getLabel(item) { getLabel(item) {
...@@ -657,7 +658,7 @@ export default { ...@@ -657,7 +658,7 @@ export default {
} else { } else {
return item.up_platform_status != 2; return item.up_platform_status != 2;
} }
} },
}, },
{ {
label: "删除", label: "删除",
...@@ -665,10 +666,10 @@ export default { ...@@ -665,10 +666,10 @@ export default {
callback: _self.deleteItem, callback: _self.deleteItem,
disabledRule(item) { disabledRule(item) {
return item.online_state != 2; return item.online_state != 2;
} },
} },
] ],
} },
]; ];
this.otherFilter1 = [ this.otherFilter1 = [
{ {
...@@ -677,18 +678,18 @@ export default { ...@@ -677,18 +678,18 @@ export default {
data: [ data: [
{ {
name: "平台应用", name: "平台应用",
value: 2 value: 2,
}, },
{ {
name: "开发者应用", name: "开发者应用",
value: 1 value: 1,
}, },
{ {
name: "未上架", name: "未上架",
value: 0 value: 0,
} },
] ],
} },
]; ];
this.otherFilter2 = [ this.otherFilter2 = [
{ {
...@@ -697,14 +698,14 @@ export default { ...@@ -697,14 +698,14 @@ export default {
data: [ data: [
{ {
name: "支持开发", name: "支持开发",
value: 1 value: 1,
}, },
{ {
name: "不支持开发", name: "不支持开发",
value: 0 value: 0,
} },
] ],
} },
]; ];
} }
// 超级管理员 --- 应用部署管理 // 超级管理员 --- 应用部署管理
...@@ -715,43 +716,46 @@ export default { ...@@ -715,43 +716,46 @@ export default {
label: "应用名称", label: "应用名称",
prop: "deploy_name", prop: "deploy_name",
type: "button", type: "button",
callback: this.detailItemDeploy callback: this.detailItemDeploy,
}, },
{ {
label: "应用版本", label: "应用版本",
prop: "app_version", prop: "app_version",
align: "center" align: "center",
}, },
{ {
label: "应用类型", label: "应用类型",
prop: "type_name", prop: "type_name",
align: "center" align: "center",
}, },
{ {
label: "业务领域", label: "业务领域",
prop: "business_area_name", prop: "business_area_name",
align: "center" align: "center",
}, },
{ {
label: "上架区域", label: "上架区域",
prop: "upload_area", prop: "upload_area",
align: "center" align: "center",
}, },
{ {
label: "所属组织", label: "所属组织",
prop: "org_name", prop: "org_name",
align: "center" align: "center",
}, },
{ {
label: "部署时间", label: "部署时间",
prop: "created", getText(item) {
align: "center" let date = item.created || "";
return helper.dateStringTransform(date);
},
align: "center",
}, },
{ {
label: "部署区域", label: "部署区域",
prop: "namespace", prop: "namespace",
align: "center" align: "center",
} },
]; ];
this.otherFilter1 = [ this.otherFilter1 = [
{ {
...@@ -760,18 +764,18 @@ export default { ...@@ -760,18 +764,18 @@ export default {
data: [ data: [
{ {
name: "平台应用", name: "平台应用",
value: 2 value: 2,
}, },
{ {
name: "开发者应用", name: "开发者应用",
value: 1 value: 1,
}, },
{ {
name: "未上架", name: "未上架",
value: 0 value: 0,
} },
] ],
} },
]; ];
this.otherFilter2 = [ this.otherFilter2 = [
{ {
...@@ -780,14 +784,14 @@ export default { ...@@ -780,14 +784,14 @@ export default {
data: [ data: [
{ {
name: "支持开发", name: "支持开发",
value: 1 value: 1,
}, },
{ {
name: "不支持开发", name: "不支持开发",
value: 0 value: 0,
} },
] ],
} },
]; ];
} }
// 超级管理员 --- 应用审批管理 // 超级管理员 --- 应用审批管理
...@@ -796,42 +800,45 @@ export default { ...@@ -796,42 +800,45 @@ export default {
this.listHeader = [ this.listHeader = [
{ {
label: "应用名称", label: "应用名称",
prop: "app_name" prop: "app_name",
}, },
{ {
label: "应用版本", label: "应用版本",
prop: "version", prop: "version",
align: "center" align: "center",
}, },
{ {
label: "应用类型", label: "应用类型",
prop: "type_name", prop: "type_name",
align: "center" align: "center",
}, },
{ {
label: "业务领域", label: "业务领域",
prop: "ywly_name", prop: "ywly_name",
align: "center" align: "center",
}, },
{ {
label: "在线区域", label: "在线区域",
prop: "online_state_name", prop: "online_state_name",
align: "center" align: "center",
}, },
{ {
label: "申请类型", label: "申请类型",
prop: "apply_type_name", prop: "apply_type_name",
align: "center" align: "center",
}, },
{ {
label: "审批时间", label: "审批时间",
prop: "time", getText(item) {
align: "center" let date = item.time || "";
return helper.dateStringTransform(date);
},
align: "center",
}, },
{ {
label: "申请状态", label: "申请状态",
prop: "apply_status", prop: "apply_status",
align: "center" align: "center",
}, },
{ {
label: "操作", label: "操作",
...@@ -843,10 +850,10 @@ export default { ...@@ -843,10 +850,10 @@ export default {
getLabel(item) { getLabel(item) {
return item.apply_status === "已审批" ? "详情" : "审批"; return item.apply_status === "已审批" ? "详情" : "审批";
}, },
callback: this.detailItem callback: this.detailItem,
} },
] ],
} },
]; ];
this.otherFilter1 = [ this.otherFilter1 = [
{ {
...@@ -855,14 +862,14 @@ export default { ...@@ -855,14 +862,14 @@ export default {
data: [ data: [
{ {
name: "应用商店", name: "应用商店",
value: 2 value: 2,
}, },
{ {
name: "开发者应用", name: "开发者应用",
value: 1 value: 1,
} },
] ],
} },
]; ];
this.otherFilter2 = [ this.otherFilter2 = [
{ {
...@@ -871,32 +878,28 @@ export default { ...@@ -871,32 +878,28 @@ export default {
data: [ data: [
{ {
name: "申请部署", name: "申请部署",
value: 0 value: 0,
}, },
{ {
name: "申请开发", name: "申请开发",
value: 1 value: 1,
} },
] ],
}, },
{ {
name: "申请状态", name: "申请状态",
prop: "apply_state", prop: "apply_state",
data: [ data: [
{ {
name: "审批中", name: "待审批",
value: 1 value: 0,
}, },
{ {
name: "审批通过", name: "已审批",
value: 2 value: 1,
}, },
{ ],
name: "审批未通过", },
value: 0
}
]
}
]; ];
} }
...@@ -914,39 +917,66 @@ export default { ...@@ -914,39 +917,66 @@ export default {
callback(response) { callback(response) {
let datas = []; let datas = [];
datas = response.body.data.map(v => ({ datas = (response.body.data || []).map((v) => ({
name: v.name, name: v.name,
value: v.id value: v.id,
})); }));
return { return {
name: "应用类型", name: "应用类型",
prop: "appTypes", prop: "appTypes",
data: datas data: datas,
}; };
} },
}, },
{ {
path: "/apaas/hubApi/market/businessAreas", path: "/apaas/hubApi/market/businessAreas",
callback(response) { callback(response) {
let datas = []; let datas = [];
datas = response.body.data.map(v => ({ datas = (response.body.data || []).map((v) => ({
name: v.name, name: v.name,
value: v.id value: v.id,
})); }));
return { return {
name: "业务领域", name: "业务领域",
prop: "businessArea", prop: "businessArea",
data: datas data: datas,
}; };
} },
} },
]; ];
Promise.all(urls.map(url => this.$http.get(url.path))) if (type == 1) {
.then(responses => { urls.push({
path: "/apaas/hubApi/market/namespaces",
callback(response) {
let datas = [];
datas = [
{
name: "全部",
value: "",
},
].concat(
(response.body.data || []).map((v) => ({
name: v.text,
value: v.value,
}))
);
return {
name: "工作区域",
prop: "namespaces",
data: datas,
};
},
});
}
Promise.all(urls.map((url) => this.$http.get(url.path)))
.then((responses) => {
let filterList = responses.map((response, index) => { let filterList = responses.map((response, index) => {
return urls[index].callback(response); return urls[index].callback(response);
}); });
...@@ -954,10 +984,10 @@ export default { ...@@ -954,10 +984,10 @@ export default {
this.filterList = [ this.filterList = [
...this.otherFilter1, ...this.otherFilter1,
...filterList, ...filterList,
...this.otherFilter2 ...this.otherFilter2,
]; ];
}) })
.catch(error => { .catch((error) => {
console.log(error); console.log(error);
}); });
}, },
...@@ -965,59 +995,66 @@ export default { ...@@ -965,59 +995,66 @@ export default {
let listUrl = [ let listUrl = [
"/apaas/hubApi/market/list", "/apaas/hubApi/market/list",
"/apaas/hubApi/market/deployList", "/apaas/hubApi/market/deployList",
"/apaas/hubApi/market/applyList" "/apaas/hubApi/market/applyList",
]; ];
let params = {}; let params = {};
if (filter.online_state) { if (filter.online_state) {
params.online_state = filter.online_state params.online_state = filter.online_state
.map(item => { .map((item) => {
return item.value; return item.value;
}) })
.join(","); .join(",");
} // 在线状态 / 部署来源 / 在线区域 } // 在线状态 / 部署来源 / 在线区域
if (filter.appTypes) { if (filter.appTypes) {
params.appTypes = filter.appTypes params.appTypes = filter.appTypes
.map(item => { .map((item) => {
return item.value; return item.value;
}) })
.join(","); .join(",");
} // 应用类型 } // 应用类型
if (filter.businessArea) { if (filter.businessArea) {
params.businessArea = filter.businessArea params.businessArea = filter.businessArea
.map(item => { .map((item) => {
return item.value; return item.value;
}) })
.join(","); .join(",");
} // 业务领域 } // 业务领域
if (filter.developable) { if (filter.developable) {
params.developable = filter.developable params.developable = filter.developable
.map(item => { .map((item) => {
return item.value; return item.value;
}) })
.join(","); .join(",");
} // 是否支持开发 } // 是否支持开发
if (filter.appSource) { if (filter.appSource) {
params.appSource = filter.appSource params.appSource = filter.appSource
.map(item => { .map((item) => {
return item.value; return item.value;
}) })
.join(","); .join(",");
} // 应用来源 } // 应用来源
if (filter.apply_type) { if (filter.apply_type) {
params.apply_type = filter.apply_type params.apply_type = filter.apply_type
.map(item => { .map((item) => {
return item.value; return item.value;
}) })
.join(","); .join(",");
} // 申请类型 } // 申请类型
if (filter.apply_state) { if (filter.apply_state) {
params.status = filter.apply_state params.status = filter.apply_state
.map(item => { .map((item) => {
return item.value; return item.value;
}) })
.join(","); .join(",");
} // 申请状态 } // 申请状态
if (filter.namespaces) {
params.namespaces = filter.namespaces
.map((item) => {
return item.value;
})
.join(",");
} // 工作区域
this.tempFliter = filter; this.tempFliter = filter;
...@@ -1027,14 +1064,14 @@ export default { ...@@ -1027,14 +1064,14 @@ export default {
...params, ...params,
search: filter.keyword, search: filter.keyword,
page: filter.page, page: filter.page,
limit: filter.size limit: filter.size,
} },
}) })
.then(({ data }) => { .then(({ data }) => {
this.listTotal = data.total; this.listTotal = data.total;
this.listData = data.data || []; this.listData = data.data || [];
}) })
.catch(error => { .catch((error) => {
console.log(error); console.log(error);
}); });
}, },
...@@ -1055,20 +1092,20 @@ export default { ...@@ -1055,20 +1092,20 @@ export default {
if (data.success) { if (data.success) {
this.$message({ this.$message({
message: `删除${item.app_name}成功.`, message: `删除${item.app_name}成功.`,
type: "success" type: "success",
}); });
this.initDatas(this.tempFliter); this.initDatas(this.tempFliter);
} else { } else {
this.$message({ this.$message({
message: `删除${item.app_name}失败.`, message: `删除${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
} }
}) })
.catch(error => { .catch((error) => {
this.$message({ this.$message({
message: `删除${item.app_name}失败.`, message: `删除${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
}); });
}; };
...@@ -1082,7 +1119,7 @@ export default { ...@@ -1082,7 +1119,7 @@ export default {
if (item.up_deploy_status === 3) { if (item.up_deploy_status === 3) {
this.$message({ this.$message({
message: `${item.app_name}正在申请下架中.`, message: `${item.app_name}正在申请下架中.`,
type: "warning" type: "warning",
}); });
} else { } else {
this.$http this.$http
...@@ -1091,20 +1128,20 @@ export default { ...@@ -1091,20 +1128,20 @@ export default {
if (data.success) { if (data.success) {
this.$message({ this.$message({
message: `申请下架${item.app_name}成功.`, message: `申请下架${item.app_name}成功.`,
type: "success" type: "success",
}); });
this.initDatas(this.tempFliter); this.initDatas(this.tempFliter);
} else { } else {
this.$message({ this.$message({
message: `申请下架${item.app_name}失败.`, message: `申请下架${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
} }
}) })
.catch(error => { .catch((error) => {
this.$message({ this.$message({
message: `申请下架${item.app_name}失败.`, message: `申请下架${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
}); });
} }
...@@ -1120,27 +1157,27 @@ export default { ...@@ -1120,27 +1157,27 @@ export default {
this.$http this.$http
.delete(`/apaas/hubApi/market/deploy/${item.deploy_name}`, { .delete(`/apaas/hubApi/market/deploy/${item.deploy_name}`, {
params: { params: {
deployId: item.deploy_id deployId: item.deploy_id,
} },
}) })
.then(({ data }) => { .then(({ data }) => {
if (data.success) { if (data.success) {
this.$message({ this.$message({
message: `删除${item.deploy_name}成功.`, message: `删除${item.deploy_name}成功.`,
type: "success" type: "success",
}); });
this.initDatas(this.tempFliter); this.initDatas(this.tempFliter);
} else { } else {
this.$message({ this.$message({
message: `删除${item.deploy_name}失败.`, message: `删除${item.deploy_name}失败.`,
type: "warning" type: "warning",
}); });
} }
}) })
.catch(error => { .catch((error) => {
this.$message({ this.$message({
message: `删除${item.deploy_name}失败.`, message: `删除${item.deploy_name}失败.`,
type: "warning" type: "warning",
}); });
}); });
}; };
...@@ -1169,7 +1206,9 @@ export default { ...@@ -1169,7 +1206,9 @@ export default {
); );
}, },
detailItemDeploy(item) { detailItemDeploy(item) {
this.$router.push(`${this.detailsUrl}${item.deploy_id}?app_id=${item.app_id}`); this.$router.push(
`${this.detailsUrl}${item.deploy_id}?app_id=${item.app_id}`
);
}, },
soldUpItem(item) { soldUpItem(item) {
this.dialogInfo.title = "提示"; this.dialogInfo.title = "提示";
...@@ -1181,20 +1220,20 @@ export default { ...@@ -1181,20 +1220,20 @@ export default {
if (data.success) { if (data.success) {
this.$message({ this.$message({
message: `上架${item.app_name}成功.`, message: `上架${item.app_name}成功.`,
type: "success" type: "success",
}); });
this.initDatas(this.tempFliter); this.initDatas(this.tempFliter);
} else { } else {
this.$message({ this.$message({
message: `上架${item.app_name}失败.`, message: `上架${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
} }
}) })
.catch(error => { .catch((error) => {
this.$message({ this.$message({
message: `上架${item.app_name}失败.`, message: `上架${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
}); });
}; };
...@@ -1210,20 +1249,20 @@ export default { ...@@ -1210,20 +1249,20 @@ export default {
if (data.success) { if (data.success) {
this.$message({ this.$message({
message: `下架${item.app_name}成功.`, message: `下架${item.app_name}成功.`,
type: "success" type: "success",
}); });
this.initDatas(this.tempFliter); this.initDatas(this.tempFliter);
} else { } else {
this.$message({ this.$message({
message: `下架${item.app_name}失败.`, message: `下架${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
} }
}) })
.catch(error => { .catch((error) => {
this.$message({ this.$message({
message: `下架${item.app_name}失败.`, message: `下架${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
}); });
}; };
...@@ -1242,20 +1281,20 @@ export default { ...@@ -1242,20 +1281,20 @@ export default {
if (data.success) { if (data.success) {
this.$message({ this.$message({
message: `上线${item.app_name}成功.`, message: `上线${item.app_name}成功.`,
type: "success" type: "success",
}); });
this.initDatas(this.tempFliter); this.initDatas(this.tempFliter);
} else { } else {
this.$message({ this.$message({
message: `上线${item.app_name}失败.`, message: `上线${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
} }
}) })
.catch(error => { .catch((error) => {
this.$message({ this.$message({
message: `上线${item.app_name}失败.`, message: `上线${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
}); });
}; };
...@@ -1271,20 +1310,20 @@ export default { ...@@ -1271,20 +1310,20 @@ export default {
if (data.success) { if (data.success) {
this.$message({ this.$message({
message: `下线${item.app_name}成功.`, message: `下线${item.app_name}成功.`,
type: "success" type: "success",
}); });
this.initDatas(this.tempFliter); this.initDatas(this.tempFliter);
} else { } else {
this.$message({ this.$message({
message: `下线${item.app_name}失败.`, message: `下线${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
} }
}) })
.catch(error => { .catch((error) => {
this.$message({ this.$message({
message: `下线${item.app_name}失败.`, message: `下线${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
}); });
}; };
...@@ -1302,24 +1341,24 @@ export default { ...@@ -1302,24 +1341,24 @@ export default {
if (data.success) { if (data.success) {
this.$message({ this.$message({
message: `删除${item.app_name}成功.`, message: `删除${item.app_name}成功.`,
type: "success" type: "success",
}); });
this.initDatas(this.tempFliter); this.initDatas(this.tempFliter);
} else { } else {
this.$message({ this.$message({
message: `删除${item.app_name}失败.`, message: `删除${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
} }
}) })
.catch(error => { .catch((error) => {
this.$message({ this.$message({
message: `删除${item.app_name}失败.`, message: `删除${item.app_name}失败.`,
type: "warning" type: "warning",
}); });
}); });
}; };
} },
}, },
created() { created() {
this.level = parseInt(this.$route.params.level); this.level = parseInt(this.$route.params.level);
...@@ -1342,7 +1381,7 @@ export default { ...@@ -1342,7 +1381,7 @@ export default {
console.log(data.errMsg); console.log(data.errMsg);
} }
}); });
} },
}; };
</script> </script>
......
...@@ -34,7 +34,7 @@ const workbench = { ...@@ -34,7 +34,7 @@ const workbench = {
}, },
// cloud resource approval // cloud resource approval
setCloudApproval(params) { setCloudApproval(params) {
return axios.put(`/apaas/service/v3/resource/apply/approve?apply_id=${params.applyId}&apply_state=${params.applyState}&apply_type=${params.applyType}&cloud_id=${params.applyCloudId}`, params) return axios.put(`/apaas/service/v3/resource/apply/approve?apply_id=${params.applyId}&apply_state=${params.applyState}&apply_type=${params.applyType}&cloud_id=${params.applyCloudId}&namespace=${params.namespace}`, params)
}, },
// cloud resource allocation // cloud resource allocation
setCloudAllocation(params) { setCloudAllocation(params) {
...@@ -48,6 +48,10 @@ const workbench = { ...@@ -48,6 +48,10 @@ const workbench = {
disabledCloud(params) { disabledCloud(params) {
return axios.put(`/apaas/service/v3/resource/apply/disable?id=${params.id}&type=${params.type}`) return axios.put(`/apaas/service/v3/resource/apply/disable?id=${params.id}&type=${params.type}`)
}, },
// get cloud's application
getCloudApplication(params) {
return axios.get(`/apaas/hubApi/market/deployList?page=1&limit=10000&namespaces=${params.namespace}`)
},
} }
export default workbench; export default workbench;
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