Commit d382a007 authored by 徐一鸣's avatar 徐一鸣

云资源管理列表优化

parent 0251e56c
...@@ -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();
}, },
}, },
......
...@@ -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() {
......
...@@ -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">
......
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