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

15

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