Commit 43591946 authored by 刘殿昕's avatar 刘殿昕

优化云资源详情,个人档案+按钮置灰

parent 22cafe81
......@@ -416,7 +416,7 @@ export default {
})
.then(response => {
if (response.data.success == 1) {
let data = response.data.data;
let data = response.data.data || [];
for (let i = 0; i < data.length; i++) {
this.approval_arr1[i].result = data[i].apply_type_name;
this.approval_arr1[i].arr[0].info = data[i].created;
......
......@@ -57,12 +57,12 @@
<p>当前用户类型:</p>
<el-input v-model="user_data.userTypeName" :disabled="true"></el-input>
<el-button
v-if="user_data.userType == 3 && couldUp"
v-if="user_data.userType == 3 && user_data.userType == 0"
class="option_btn"
@click="upLevel"
@click="showUpLevel"
>升级为开发者</el-button>
<el-button
v-else-if="user_data.userType == 3 && !couldUp"
v-else-if="user_data.userType == 3 && user_data.userType == 1"
type="info"
class="option_btn_gray_dis"
disabled
......@@ -171,6 +171,18 @@
<el-button class="registe" @click="submitChangePwd">修改</el-button>
</div>
</el-dialog>
<el-dialog
title="升级为开发者"
:visible.sync="upLevelDia"
width="440px"
:modal-append-to-body="false"
>
<div class="change_psw">是否升级为开发者?</div>
<div class="dia_btn_footer">
<el-button class="previous" @click="cancelUpLevel">取消</el-button>
<el-button class="registe" @click="submitUpLevel">升级</el-button>
</div>
</el-dialog>
</block-radius>
</div>
</template>
......@@ -251,7 +263,7 @@ export default {
newIpWhite: "",
newIpBlack: "",
diaPassWord: false,
couldUp: true
upLevelDia: false
};
},
mounted() {
......@@ -269,7 +281,7 @@ export default {
}
});
},
getUserInfo(id) {
getUserInfo() {
this.$api.user.getUserDetail({ id: this.userId }).then(response => {
if (response.data.success == 1) {
let data = response.data.data;
......@@ -288,6 +300,7 @@ export default {
: this.user_data.userType == 3
? "普通用户"
: "普通用户开发者";
this.user_data.is_apply = data.is_apply;
this.imgList = [];
this.imgList.push(data.picture_path);
this.formBusiness.businessSystemName = data.system_name;
......@@ -380,6 +393,26 @@ export default {
}
});
},
cancelUpLevel() {
this.upLevelDia = false;
},
submitUpLevel() {
this.upLevelDia = false;
this.$api.authority.updateLevel().then(response => {
if (response.data.success == 1) {
this.$message({
message: "申请升级开发者成功",
type: "success"
});
this.getUserInfo();
} else {
this.$message({
message: "申请升级开发者失败",
type: "error"
});
}
});
},
resetKey() {
this.$confirm("此操作将重置您的密钥, 是否继续?", "提示", {
confirmButtonText: "确定",
......@@ -413,22 +446,8 @@ export default {
});
});
},
upLevel() {
this.$api.authority.updateLevel().then(response => {
if (response.data.success == 1) {
this.$message({
message: "申请升级开发者成功",
type: "success"
});
this.couldUp = false;
this.getUserInfo();
} else {
this.$message({
message: "申请升级开发者失败",
type: "error"
});
}
});
showUpLevel() {
this.upLevelDia = true;
},
copyKey() {
const input = document.createElement("input");
......
......@@ -16,7 +16,11 @@
<BlockRadius class="in_cloud_block">
<div class="cloud_block_head">
<div class="head_left">
<el-image class="head_left_img" :src="url" fit="fill"></el-image>
<el-image
class="head_left_img"
:src="require('@/assets/imgs/img_yunziyuan.png')"
fit="fill"
></el-image>
</div>
<div class="head_right">
<div class="head_right_name">{{ cloudData.workplace }}</div>
......@@ -398,23 +402,23 @@ export default {
appListHeaders: [
{
label: "应用名称",
prop: "app_name",
prop: "deploy_name",
align: "center",
type: "href"
},
{
label: "应用类型",
prop: "app_name",
prop: "type_name",
align: "center"
},
{
label: "应用版本号",
prop: "app_name",
prop: "app_version",
align: "center"
},
{
label: "应用部署时间",
prop: "app_name",
prop: "created",
align: "center"
}
],
......@@ -745,6 +749,7 @@ export default {
width: 144px;
height: 144px;
border-radius: 8px;
border: 4px #f4f7fc solid;
}
.head_right {
width: calc(100% - 160px);
......
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