|
@@ -51,6 +51,7 @@
|
|
|
<div class="pagination">
|
|
|
<el-pagination :current-page.sync="queryParams.current" :page-size="queryParams.size" :total="total" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
|
|
|
</div>
|
|
|
+ <!-- 新增、编辑租户弹框 -->
|
|
|
<el-dialog :title="title" :visible.sync="visible" width="500px" :before-close="close">
|
|
|
<el-form v-if="visible" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="110px" label-position="left">
|
|
|
|
|
@@ -97,7 +98,7 @@
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="类型" prop="type">
|
|
|
<!-- <el-input v-model="ruleForm.type" placeholder="请输入类型"></el-input> -->
|
|
|
- <el-select v-model="ruleForm.type" filterable placeholder="请选择类型" style="width: 100%" @change="getType">
|
|
|
+ <el-select v-model="ruleForm.type" :filterable="true" placeholder="请选择类型" style="width: 100%" @change="getType">
|
|
|
<el-option v-for="item in dictionaries.TENANT_TYPE" :key="item.id" :value="item.dictChildValue" :label="item.dictChildLabel"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -137,6 +138,25 @@
|
|
|
</el-row>
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="24">
|
|
|
+ <el-form-item label="会员类别" prop="tenantVipType">
|
|
|
+ <el-col style="padding-left: 0px;padding-right: 0px;">
|
|
|
+ <el-select v-model="ruleForm.tenantVipType" placeholder="请选择会员类别" :filterable="true" style="width: 260px; margin-right: 20px;">
|
|
|
+ <el-option v-for="item in memberTypes"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.tenantVipName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-tooltip content="点击查看当前选择的会员类别及功能权限" placement="top">
|
|
|
+ <!-- <el-link type="primary" @click="memberTypeBtn">会员类别</el-link> -->
|
|
|
+ <el-button @click="memberTypeBtn">查看</el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <!-- <el-row :gutter="24">
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="功能权限" prop="function">
|
|
|
<el-cascader
|
|
|
ref="FunctionCascader"
|
|
@@ -148,10 +168,9 @@
|
|
|
clearable
|
|
|
@change="downloadChange"
|
|
|
style="width:100%"></el-cascader>
|
|
|
- <!-- <el-input v-model="ruleForm.function" placeholder="请输入功能权限"></el-input> -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
<el-form-item label="是否启用" prop="state">
|
|
|
<el-switch
|
|
|
:active-value="1"
|
|
@@ -213,12 +232,35 @@
|
|
|
</el-form>
|
|
|
|
|
|
</el-dialog>
|
|
|
+ <!-- 会员类别管理弹窗 -->
|
|
|
+ <el-dialog title="会员类别查看" :visible.sync="memberVisible" :before-close="closeMember" append-to-body width="1000px">
|
|
|
+ <!-- <MemberType></MemberType> -->
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="memberTableData"
|
|
|
+ border
|
|
|
+ header-row-class-name="custom-table-header"
|
|
|
+ >
|
|
|
+ <el-table-column prop="tenantVipName" label="会员类型/名称" sortable align="center" width="200px"></el-table-column>
|
|
|
+ <el-table-column label="功能权限" align="center" show-overflow-tooltip min-width="300px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-for="item in scope.row.functionIdPathNameDescriptions" :key="item.functionId">{{ item.functionName }} </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="closeMember">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitMember">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+// import MemberType from "@/views/memberType/index.vue"
|
|
|
export default {
|
|
|
components: {
|
|
|
+ // MemberType,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -234,6 +276,10 @@ export default {
|
|
|
btnLoading: false,
|
|
|
total: 0,
|
|
|
tableData: [],
|
|
|
+ memberTypes: [],
|
|
|
+ memberVisible: false,
|
|
|
+ MemberLoading: false,
|
|
|
+ memberTableData: [],
|
|
|
title: '',
|
|
|
queryParams: {
|
|
|
size: 10,
|
|
@@ -259,23 +305,22 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getList()
|
|
|
- this.getFunction()
|
|
|
+ // this.getFunction()
|
|
|
+ this.getListMemberType()
|
|
|
// this.translate()
|
|
|
- // console.log(this.select)
|
|
|
},
|
|
|
created(){
|
|
|
// this.select = this.$store.state.admin.dictionaries
|
|
|
},
|
|
|
computed: {
|
|
|
dictionaries() {
|
|
|
- // console.log(this.$store.state.admin.dictionaries)
|
|
|
return this.$store.state.admin.dictionaries
|
|
|
},
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
getType(val){
|
|
|
- this.getFunction(val)
|
|
|
+ // this.getFunction(val)
|
|
|
},
|
|
|
//根据条件查询
|
|
|
getList2(){
|
|
@@ -295,11 +340,10 @@ export default {
|
|
|
this.visible = true
|
|
|
this.pswdshow = false
|
|
|
this.authority = []
|
|
|
- this.getFunction(row.type)
|
|
|
+ // this.getFunction(row.type)
|
|
|
this.ruleForm = { ...row }
|
|
|
},
|
|
|
handleDetails(row) {
|
|
|
- // console.log(row)
|
|
|
this.title = '租户详情'
|
|
|
this.showvisible = true
|
|
|
this.ruleForm.apply = row
|
|
@@ -324,10 +368,36 @@ export default {
|
|
|
this.loading = false
|
|
|
});
|
|
|
},
|
|
|
+ // 请求会员类别权限
|
|
|
+ getListMemberType() {
|
|
|
+ this.$api.queryTenantVipType({}).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.memberTypes = res.data.list
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //会员类别按钮
|
|
|
+ memberTypeBtn() {
|
|
|
+ this.memberTypes.forEach(item => {
|
|
|
+ if (item.id==this.ruleForm.tenantVipType) {
|
|
|
+ this.memberTableData.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.memberVisible=true
|
|
|
+
|
|
|
+ },
|
|
|
+ // 会员类别弹窗确定
|
|
|
+ submitMember() {
|
|
|
+ this.closeMember()
|
|
|
+ },
|
|
|
+ // 会员类别弹窗取消
|
|
|
+ closeMember() {
|
|
|
+ this.memberVisible = false
|
|
|
+ this.memberTableData=[]
|
|
|
+ },
|
|
|
// getCheckedNodes(){
|
|
|
// var List = this.$refs.FunctionCascader.getCheckedNodes()
|
|
|
// List.forEach(item => {
|
|
|
- // console.log(item)
|
|
|
// });
|
|
|
|
|
|
// },
|
|
@@ -350,20 +420,20 @@ export default {
|
|
|
this.findAllNode(item)
|
|
|
})
|
|
|
this.functions = [...this.saveNodeTmp]
|
|
|
+
|
|
|
},
|
|
|
|
|
|
- getFunction(val) {
|
|
|
- this.$api.getAllFunctionList({type:val}).then(response => {
|
|
|
- // console.log(response.data)
|
|
|
- this.authority = []
|
|
|
- this.authority = response.data
|
|
|
- // this.tableData = response.data
|
|
|
- // this.total=response.pageColumn.total
|
|
|
- // this.loading = false
|
|
|
- }).catch(error => {
|
|
|
- this.loading = true
|
|
|
- })
|
|
|
- },
|
|
|
+ // getFunction(val) {
|
|
|
+ // this.$api.getAllFunctionList({type:val}).then(response => {
|
|
|
+ // this.authority = []
|
|
|
+ // this.authority = response.data
|
|
|
+ // // this.tableData = response.data
|
|
|
+ // // this.total=response.pageColumn.total
|
|
|
+ // // this.loading = false
|
|
|
+ // }).catch(error => {
|
|
|
+ // this.loading = true
|
|
|
+ // })
|
|
|
+ // },
|
|
|
handleCurrentChange(val) {
|
|
|
this.queryParams.current = val;
|
|
|
this.getList();
|
|
@@ -371,14 +441,14 @@ export default {
|
|
|
submit() {
|
|
|
this.$refs.ruleForm.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.ruleForm.function = this.functions
|
|
|
- this.ruleForm.functions=[]
|
|
|
- if(this.ruleForm.hasOwnProperty('function')){
|
|
|
- for(var i =0;i<this.ruleForm.function.length;i++){
|
|
|
- var a =this.ruleForm.function[i].join(',')
|
|
|
- this.ruleForm.functions.push(a)
|
|
|
- }
|
|
|
- }
|
|
|
+ // this.ruleForm.function = this.functions
|
|
|
+ // this.ruleForm.functions=[]
|
|
|
+ // if(this.ruleForm.hasOwnProperty('function')){
|
|
|
+ // for(var i =0;i<this.ruleForm.function.length;i++){
|
|
|
+ // var a =this.ruleForm.function[i].join(',')
|
|
|
+ // this.ruleForm.functions.push(a)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
this.btnLoading = true
|
|
|
if (this.ruleForm.id) {
|
|
@@ -401,7 +471,6 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
- console.log('error submit!!');
|
|
|
return false;
|
|
|
}
|
|
|
});
|