提交 e25797e8 编写于 作者: haochangdi's avatar haochangdi

优化代码

上级 c74ef975
......@@ -2,23 +2,23 @@
<div class="member-management" id="screenSet">
<el-row type="flex" justify="space-around" class="mm-nav" align="middle">
<el-col :span="20">
<el-button :type="orgbtn" round class="margin-l" @click="checkTab(1)">可访问本圈的机构({{orgTotal}})</el-button>
<el-button :type="plebtn" round class="margin-l" @click="checkTab(2)">可访问本圈的人员({{pleTotal}})</el-button>
<el-button :type="orgbtn" round class="margin-l" @click="checkTab(1)">可访问本圈的机构 ({{orgTotal}})</el-button>
<el-button :type="plebtn" round class="margin-l" @click="checkTab(2)">可访问本圈的人员 ({{pleTotal}})</el-button>
<span class="text inlin" @click="goBalck">黑名单</span>
</el-col>
<el-col :span="4" class="mm-r">
<span class="text" @click="goManger">设置管理员</span>
<span class="text" @click="goManger" v-if="role">设置管理员</span>
</el-col>
</el-row>
<div class="member-main">
<org
v-if="tab == 1"
v-show="tab == 1"
:circleId='circleId'
:roleType='roleType'
@setOrgTotal="setOrgTotal"
></org>
<renyaun
v-if="tab == 2"
v-show="tab == 2"
:circleId='circleId'
:roleType='roleType'
@setPleTotal="setPleTotal"
......@@ -51,14 +51,17 @@ export default {
orgbtn: 'primary',
plebtn: '',
orgTotal: 0,
pleTotal: 0
pleTotal: 0,
role: 0
}
},
components: {
org,
renyaun
},
created() {},
created() {
this.getRole()
},
// 挂载到Dom完成时
mounted: function() {
// commonUtil.resizeHeight();
......@@ -85,6 +88,9 @@ export default {
},
goBalck() {
this.$router.push(`/blacklist-manage?circleId=${this.circleId}&circleName=${this.circleName}`)
},
getRole() {
this.role = localStorage.getItem("highMainManager") || localStorage.getItem("mainManager") || (localStorage.getItem("storageIdType") == 1 ? 1 : 0)
}
}
}
......
<template>
<div class="organization-alert">
<div class="organization-left">
<div>已选:{{allSelect.length}}个机构</div>
<div>已选{{allSelect.length}}个机构</div>
<div class="hcd">
<div class="tag-list">
<el-tag
......@@ -465,7 +465,7 @@ export default {
let hashTable = {};
let newArr = [];
for(let i=0,l=arr.length;i<l;i++) {
if(!hashTable[arr[i].id]) {
if(!hashTable[arr[i].id] && arr[i].status != 2) {
hashTable[arr[i].id] = true;
newArr.push(arr[i]);
}
......@@ -523,6 +523,9 @@ export default {
display: table-caption;
overflow-y: scroll;
max-height: 500px;
&::-webkit-scrollbar{
width: 2px !important;
}
}
}
......
......@@ -169,12 +169,12 @@ export default {
},
created() {
vm = this;
},
mounted() {
this.initRange();
//Idtype:1,内部 2.外部
vm.idType = localStorage.getItem("storageIdType");
},
mounted() {
},
methods: {
initRange() {
this.getRegionOption();
......@@ -373,7 +373,7 @@ export default {
}
},
detel(item) {
this.detelMessage = `删除后 "${item.orgName}" 将无法访问本圈,确定删除吗?`
this.detelMessage = `删除后 "${item.orgName}" 将无法访问本圈,确定删除吗?`
this.deleteVisible = true
this.clickItem = item
},
......@@ -426,7 +426,7 @@ export default {
<style lang="scss" scoped>
.organization {
.add-organization {
margin-left: 40px;
margin-left: 36px;
line-height: 20px;
width: 120px;
cursor: pointer;
......
<template>
<div class="organization">
<el-row type="flex" class="row-bg" align="middle">
<el-row type="flex" class="row-bg">
<el-col class="add-organization">
<i class="el-icon-circle-plus-outline" @click="dialogMemberFn()"></i>
<i class="text" @click="dialogMemberFn()">添加人员</i>
</el-col>
<el-col class="organization-search">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline" >
<el-form-item label="机构">
<el-form-item label="机构:">
<el-input style="width:140px;" size="small" v-model="formOrganization.orgName" placeholder="请输入机构名称"></el-input>
</el-form-item>
<el-form-item label="姓名">
<el-form-item label="姓名:">
<el-input style="width:140px;" size="small" v-model="formOrganization.name" placeholder="请输入人员姓名"></el-input>
</el-form-item>
<el-form-item label="来源">
<el-form-item label="来源:">
<el-select size="small" v-model="formOrganization.source" placeholder="请选择来源">
<el-option v-for="(item, index) in sourceList" :key="index" :label="item.label" :value="item.value">
</el-option>
......@@ -178,11 +178,13 @@ export default {
},
created() {
vm = this;
},
mounted() {
this.initRange();
//Idtype:1,内部 2.外部
vm.idType = localStorage.getItem("storageIdType");
this.initRange();
},
mounted() {
},
methods: {
initRange() {
......@@ -253,7 +255,7 @@ export default {
this.getList();
},
detel(item) {
this.detelMessage = `删除后 "${item.name}" 将无法访问本圈, 确定删除么?`
this.detelMessage = `删除后 "${item.name}" 将无法访问本圈, 确定删除么?`
this.deleteVisible = true
this.clickItem = item
},
......@@ -298,7 +300,7 @@ export default {
<style lang="scss" scoped>
.organization {
.add-organization {
margin-left: 40px;
margin-left: 20px;
line-height: 20px;
width: 120px;
cursor: pointer;
......@@ -311,7 +313,7 @@ export default {
}
.organization-search {
flex: 1;
margin-right: 20px;
margin-right: 10px;
text-align: right;
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册