Commit ff135eb5 authored by 张超's avatar 张超 🎱

15

parent 3ec924ad
......@@ -15,26 +15,35 @@
</div>
<p v-else></p>
<el-divider></el-divider>
<el-button type="primary" size="small">增加权限</el-button>
<el-button type="primary" size="small" @click="addDivShow = true">增加权限</el-button>
</el-card>
<el-card shadow="hover" v-show="addDivShow">
<p>请先勾选后,点击添加按钮</p>
<el-checkbox-group v-model="checkList">
<el-checkbox label="张超"></el-checkbox>
<el-checkbox label="复选框 B"></el-checkbox>
<el-checkbox label="复选框 C"></el-checkbox>
<el-checkbox label="禁用" disabled></el-checkbox>
<el-checkbox label="选中且禁用" disabled></el-checkbox>
<el-checkbox
v-for="item in devPersons"
:key="'dev-' + item"
:label="item"
:disabled="operators.includes(item)"
></el-checkbox>
</el-checkbox-group>
<el-button type="primary" size="small" @click="onAdd">添加</el-button>
</el-card>
</div>
</template>
<script>
import { mapState, mapGetters, mapMutations } from "vuex";
import {playWaiting} from "../../../../utils";
export default {
name: "AuthManagerEditor",
data() {
return {
authList: ["张超", "姜西西", "王竹君"],
checkList: ["张超"]
checkList: ["张超"],
devPersons: [],
addDivShow: false
};
},
computed: {
......@@ -44,9 +53,13 @@ export default {
}),
},
mounted() {
// getDevPersons
this._getDevPersons()
},
methods: {
async _getDevPersons() {
this.devPersons = await this.getDevPersons();
},
// edit() {
// this.operators = clonePureObj(this.operators).split(",");
// },
......@@ -54,6 +67,8 @@ export default {
// this.modifyEnv(this.editData);
},
onAdd() {
this.checkList = [];
this.addDivShow = false;
// this.editData.push({
// name: "",
// value: "",
......@@ -62,7 +77,7 @@ export default {
deleteAuth(tag) {
this.$confirm(
this.$t("Are you sure to delete this user auth") + tag,
this.$t("Alert"),
// this.$t("Alert"),
{
confirmButtonText: this.$t("Confirm"),
cancelButtonText: this.$t("Cancel"),
......
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