提交 16830ad4 编写于 作者: alex.zhang's avatar alex.zhang

fix conflict

<template> <template>
<div class="member-management screenSet" id="screenSet"> <div class="member-management" id="screenSet">
<el-row type="flex" justify="space-around" class="mm-nav" align="middle"> <el-row type="flex" justify="space-around" class="mm-nav" align="middle">
<el-col :span="20"> <el-col :span="20">
<el-button :type="orgbtn" round class="margin-l" @click="checkTab(1)">可访问本圈的机构({{orgTotal}})</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> <el-button :type="plebtn" round class="margin-l" @click="checkTab(2)">可访问本圈的人员({{pleTotal}})</el-button>
<el-link href="https://element.eleme.io" target="_blank" class="black">黑名单</el-link> <span class="text inlin" @click="goBalck">黑名单</span>
</el-col> </el-col>
<el-col :span="4" class="mm-r"> <el-col :span="4" class="mm-r">
<el-link href="https://element.eleme.io" target="_blank" >设置管理员</el-link> <span class="text" @click="goManger">设置管理员</span>
</el-col> </el-col>
</el-row> </el-row>
<div class="member-main"> <div class="member-main">
<org <org
v-show="tab == 1" v-if="tab == 1"
:circleId='circleId' :circleId='circleId'
:roleType='roleType' :roleType='roleType'
@setOrgTotal="setOrgTotal" @setOrgTotal="setOrgTotal"
></org> ></org>
<renyaun <renyaun
v-show="tab == 2" v-if="tab == 2"
:circleId='circleId' :circleId='circleId'
:roleType='roleType' :roleType='roleType'
@setPleTotal="setPleTotal" @setPleTotal="setPleTotal"
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
</template> </template>
<script> <script>
import * as commonUtil from "../utils/utils"; import * as commonUtil from "@/utils/utils";
import org from '@/components/yqrange/member-management/org' import org from '@/components/yqrange/member-management/org'
import renyaun from '@/components/yqrange/member-management/renyaun' import renyaun from '@/components/yqrange/member-management/renyuan'
export default { export default {
props: { props: {
circleId: { circleId: {
...@@ -41,6 +41,9 @@ export default { ...@@ -41,6 +41,9 @@ export default {
type: Number | String, type: Number | String,
default: 1 default: 1
}, },
circleName: {
type: String
}
}, },
data() { data() {
return { return {
...@@ -58,7 +61,7 @@ export default { ...@@ -58,7 +61,7 @@ export default {
created() {}, created() {},
// 挂载到Dom完成时 // 挂载到Dom完成时
mounted: function() { mounted: function() {
commonUtil.resizeHeight(); // commonUtil.resizeHeight();
}, },
methods: { methods: {
checkTab(v) { checkTab(v) {
...@@ -76,6 +79,12 @@ export default { ...@@ -76,6 +79,12 @@ export default {
}, },
setPleTotal(n) { setPleTotal(n) {
this.pleTotal = n this.pleTotal = n
},
goManger() {
this.$router.push(`/admin-manage?circleId=${this.circleId}&circleName=${this.circleName}`)
},
goBalck() {
this.$router.push(`/blacklist-manage?circleId=${this.circleId}&circleName=${this.circleName}`)
} }
} }
} }
...@@ -96,6 +105,15 @@ export default { ...@@ -96,6 +105,15 @@ export default {
text-align: right; text-align: right;
padding-right: 20px; padding-right: 20px;
} }
.inlin {
margin-left: 10px;
}
.text {
color: #606266;
font-size: 14px;
cursor: pointer;
padding: 10px;
}
} }
.member-main { .member-main {
margin-top: 20px; margin-top: 20px;
......
<template>
<div class="organization-alert">
<div class="organization-left">
<div>已选:{{allSelect.length}}个人员</div>
<div class="hcd">
<div class="tag-list">
<el-tag
:key="item.id"
v-for="item in allSelect"
closable
:disable-transitions="false"
style="marginTop:10px;"
@close="handleClose(item)">
{{item.name.length > 12 ? item.name.slice(0,12)+'...' : item.name}}
</el-tag>
</div>
</div>
<el-row justify="space-around" type="flex" class="btn-left">
<el-button type="primary" size="small" @click="addFn">确定添加</el-button>
<el-button size="small" @click="canclefn">取消</el-button>
</el-row>
</div>
<div class="organization-right">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline" >
<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-input style="width:140px;" size="small" v-model="formOrganization.peopleName" placeholder="请输入人员名称"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="searchOrganization()">搜索</el-button>
</el-form-item>
<el-form-item>
<el-button size="small" @click="resetOrgOrPerson()">取消搜索</el-button>
</el-form-item>
</el-form>
<el-table class="rim" ref="multipleOrganization" :data="tableOrganization" tooltip-effect="dark" @select-all="selectAllOrganization" @select="selectOrganization" >
<el-table-column type="selection" :selectable="selectableTableList" ></el-table-column>
<el-table-column prop="name" label="人员名称" align="center"></el-table-column>
<el-table-column prop="department" label="所属科室" align="center"></el-table-column>
<el-table-column prop="hospital" label="所属医院" align="center"></el-table-column>
<el-table-column prop="provinceName" label="所属省份" align="center"></el-table-column>
<el-table-column prop="cityName" label="所属城市" align="center"></el-table-column>
<el-table-column prop="countyName" label="所属区县" align="center"></el-table-column>
<el-table-column prop="townName" label="所属街道" align="center"></el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../../assets/image/no-content1.png">
<p>没有机构信息</p>
</div>
</div>
</el-table>
<div class="pagination">
<el-pagination background @size-change="handleSizeOrganization" @current-change="handleCurrentOrganization"
:current-page="formOrganization.pageNum" :page-sizes="[10, 20, 40]" :page-size="formOrganization.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="totalOrganization"></el-pagination>
</div>
</div>
</div>
</template>
<script>
import { openLoading, closeLoading } from "@/utils/utils";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import * as operationData from "@/utils/operation";
import { getCircleProvincesReq } from '@/utils/yqrange/rangeApi';
import { moPeopleOption, moRelAddSearch, moPeopleSave, clearPeopleCacheOrg} from '@/utils/yqrange/memberApi';
let vm = null;
export default {
props: {
circleId: {
type: Number | String,
default: 1
},
roleType: {
type: Number | String,
default: 1
},
},
data() {
return {
props: {
lazy: true,
lazyLoad(node, resolve) {
const { level } = node;
if (node.level == 1) {
let req = {
provinceId: node.data.value
};
vm.GET("basic-data/position/cities", req).then(res => {
let newData = vm.setMoreOption(res.data.cityList, "cities");
resolve(newData);
});
} else if (node.level == 2) {
let req = {
cityId: node.data.value
};
vm.GET("basic-data/position/counties", req).then(res => {
let newData = vm.setMoreOption(res.data.countyList, "counties");
resolve(newData);
});
} else if (node.level == 3) {
let req = {
countyId: node.data.value
};
vm.GET("basic-data/position/towns", req).then(res => {
let newData = vm.setMoreOption(res.data.townList, "towns");
resolve(newData);
});
}
}
},
administrativeValue: "",
tableOrganization: new Array(),
currentOrganization: 1,
totalOrganization: 10,
pageSizeOrganization: 2,
selectionList:[],
formOrganization: {
name: "",//机构名称
peopleName:"",//人员名称
administrativeId: "",
administrativeIdList: [],
level: "",
chechAll: true,
pageNum: 1,
pageSize: 10
},
allSelect: []
}
},
created() {
vm = this;
},
async mounted() {
this.clear()
this.initRange();
//Idtype:1,内部 2.外部
vm.idType = localStorage.getItem("storageIdType");
},
methods: {
clear() {
clearPeopleCacheOrg(this.circleId)
.then(()=>{
})
.catch((err=>{console.log(err)}))
},
// 多级地区
setMoreOption(data, type) {
let option = [];
for (let i = 0; i < data.length; i++) {
let obj = data[i];
if (type == "cities") {
obj.label = data[i].cityName;
obj.value = data[i].cityId;
} else if (type == "counties") {
obj.label = data[i].countyName;
obj.value = data[i].countyId;
} else if (type == "towns") {
obj.label = data[i].townName;
obj.value = data[i].townId;
obj.leaf = true;
}
option.push(obj);
}
return option;
},
initRange() {
vm.getOrganization();
this.formOrganization.pageNum = 1;
this.formOrganization.name = "";
this.formOrganization.level = "";
},
//查询所有的人员列表
getOrganization() {
let req = {
circleId: this.circleId,
name: this.formOrganization.peopleName,
orgName: this.formOrganization.name,
pageNo: this.formOrganization.pageNum,
pageSize: this.formOrganization.pageSize,
};
openLoading(vm);
moRelAddSearch(req).then(res => {
closeLoading(this);
if (res.code == "000000") {
this.tableOrganization = res.data.peoplesDtoList;
this.totalOrganization = res.data.total;
vm.initOrganizationStatus();
} else {
this.$message(res.message);
}
}).catch(err => {
this.$message.error('请求失败');
});
},
// 获取机构列表的机构状态(是否被选中)
initOrganizationStatus() {
let tableStatus = this.tableOrganization;
tableStatus.forEach(row => {
if (row.status == 1 || row.status == 2) {
this.$nextTick(function () {
this.$refs.multipleOrganization.toggleRowSelection(row);
this.selectionList.push(row);
});
}
});
},
//选择搜索机构方式
searchOrganization() {
this.formOrganization.pageNum = 1;
let searchForm = this.formOrganization;
this.getOrganization();
},
//重置机构、人员查询
resetOrgOrPerson() {
vm.formOrganization.name = "";
vm.formOrganization.peopleName = "";
vm.formOrganization.pageNum = 1;
vm.searchOrganization();
},
// 更改每页显示的数据数量
handleSizeOrganization(val) {
console.log(`每页 ${val} 条`);
this.formOrganization.pageSize = val;
this.searchOrganization();
},
// 更改当前页数
handleCurrentOrganization(val) {
//console.log(`当前页: ${val}`);
this.formOrganization.pageNum = val;
this.getOrganization();
},
//人员table中勾选一页
selectAllOrganization(selection) {
this.selectionList = selection;
let setList = [];
let selectList = [];
for (let i = 0; i < vm.tableOrganization.length; i++) {
if (vm.tableOrganization[i].status != 2) {
setList.push(vm.tableOrganization[i].id);
}
}
for (let j = 0; j < selection.length; j++) {
selectList.push(selection[j].id);
}
let intersect = operationData.getIntersect(setList, selectList);
let typeStatus = 0;
if (intersect.length > 0) {
typeStatus = 1;
}
// let = this.$refs.multipleTable.selection
console.log(selection, setList, selectList);
if (setList.length > 0) {
let req = {
ids: setList,
circleId: this.circleId,
type: typeStatus
};
openLoading(vm);
moPeopleOption(req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
this.checkToList(req.type,vm.tableOrganization)
} else {
this.$message(res.message);
}
}).catch(err => {
this.$message.error('请求失败');
});
}
},
//机构人员中勾选一个
selectOrganization(selection, row) {
this.selectionList = selection;
let flag = false;
for (let i = 0; i < selection.length; i++) {
if (selection[i].id == row.id) {
flag = true;
}
}
let req = {
ids: [row.id],
circleId: this.circleId,
type: flag === false ? 0 : 1
};
openLoading(vm);
moPeopleOption(req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
this.checkToList(req.type,row)
} else {
this.$message(res.message);
}
}).catch(err => {
this.$message.error('请求失败');
});
},
selectableTableList(row, index) {
// if (this.status4Flag == 1) {
if (row.status == 2) {
return false;
}
return true;
// }
// return true;
},
// 通过check改变展示的已选中的数据列表
checkToList(type,item) {
if (type) {
if (Array.isArray(item)) {
this.allSelect = this.unique([...this.allSelect,...item])
} else {
this.allSelect.push(item)
}
} else {
if (Array.isArray(item)) {
for(var i = this.allSelect.length -1; i >= 0 ; i--){
for(let j = item.length -1; j >= 0; j--) {
if (this.allSelect[i] && item[j] && this.allSelect[i].id == item[j].id) {
this.allSelect.splice(i,1)
}
}
}
} else {
for(let i = this.allSelect.length-1; i >=0; i--) {
if (this.allSelect[i].id == item.id) {
this.allSelect.splice(i,1)
}
}
}
}
},
// 去重
unique(arr) {
let hashTable = {};
let newArr = [];
for(let i=0,l=arr.length;i<l;i++) {
if(!hashTable[arr[i].id]) {
hashTable[arr[i].id] = true;
newArr.push(arr[i]);
}
}
return newArr;
},
//删除已选中的tag
handleClose(item) {
this.selectOrganization([],item)
this.$refs.multipleOrganization.toggleRowSelection(item);
},
// 确定添加
addFn() {
if (!(this.allSelect&& this.allSelect.length)) {
this.$message.error('已选列表为空');
return
}
let params = {
circleId: this.circleId
}
moPeopleSave(params)
.then(() => {
this.$emit('addPeople')
})
.catch(() => {
this.$message.error('保存失败,请重试');
})
},
// 取消
canclefn() {
this.$emit('handleClose')
}
}
}
</script>
<style lang="scss" scoped>
.organization-alert {
display: flex;
background: #fff;
width: 100%;
padding: 10px;
.organization-left {
width: 20%;
border-right: 1px solid #ddd;
margin-right: 20px;
display: flex;
flex-direction: column;
.hcd {
flex: 1;
overflow: hidden;
.tag-list {
margin-top: 20px;
margin-bottom: 40px;
display: table-caption;
overflow-y: scroll;
max-height: 500px;
}
}
.btn-left {
height: 40px;
margin-bottom: 20px;
}
}
.organization-right {
flex: 1;
.add-organization {
margin-left: 40px;
line-height: 20px;
cursor: pointer;
i {
font-size: 18px;
margin-right: 2px;
}
}
.organization-search {
margin-right: 20px;
text-align: right;
}
}
}
</style>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<el-button size="small" type="primary" @click="searchOrganization()">搜索</el-button> <el-button size="small" type="primary" @click="searchOrganization()">搜索</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="small" type="primary" @click="resetOrgOrPerson()">重置</el-button> <el-button size="small" @click="resetOrgOrPerson()">取消搜索</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table class="rim" ref="multipleOrganization" :data="tableOrganization" tooltip-effect="dark" @select-all="selectAllOrganization" @select="selectOrganization" > <el-table class="rim" ref="multipleOrganization" :data="tableOrganization" tooltip-effect="dark" @select-all="selectAllOrganization" @select="selectOrganization" >
......
<template> <template>
<div class="organization"> <div class="organization">
<el-row type="flex" class="row-bg" align="middle"> <el-row type="flex" class="row-bg">
<el-col :span="6" class="add-organization" > <el-col class="add-organization" >
<i class="el-icon-circle-plus-outline" @click="dialogOrgFn()"></i> <i class="el-icon-circle-plus-outline" @click="dialogOrgFn()"></i>
<i class="text" @click="dialogOrgFn()">添加机构</i> <i class="text" @click="dialogOrgFn()">添加机构</i>
</el-col> </el-col>
<el-col :span="18" class="organization-search"> <el-col class="organization-search">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline" > <el-form :inline="true" :model="formOrganization" class="demo-form-inline" >
<el-form-item label> <el-form-item label>
<el-cascader size="small" ref="cascaderRegion" :options="optionsRegion" :props="props" <el-cascader size="small" ref="cascaderRegion" :options="optionsRegion" :props="props"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<el-button size="small" type="primary" @click="searchOrganization()">搜索</el-button> <el-button size="small" type="primary" @click="searchOrganization()">搜索</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="small" type="primary" @click="resetOrgOrPerson()">重置</el-button> <el-button size="small" @click="resetOrgOrPerson()">取消搜索</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -65,12 +65,28 @@ ...@@ -65,12 +65,28 @@
top="5vh" top="5vh"
:before-close="handleClose"> :before-close="handleClose">
<check-org <check-org
v-if="dialogOrg"
:circleId='circleId' :circleId='circleId'
:roleType='roleType' :roleType='roleType'
@addOrg="addOrg" @addOrg="addOrg"
@handleClose="handleClose"> @handleClose="handleClose">
</check-org> </check-org>
</el-dialog> </el-dialog>
<!-- 删除 弹窗 -->
<el-dialog
title="确认删除"
:show-close="false"
:visible.sync="deleteVisible"
:close-on-click-modal="false"
width="600px"
center
>
<p style="text-align: center;">{{detelMessage}}</p>
<span slot="footer" class="dialog-footer">
<el-button @click="confirmDelete">删 除</el-button>
<el-button type="primary" @click="hideDeleteFrom">取 消</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -142,7 +158,10 @@ export default { ...@@ -142,7 +158,10 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
}, },
dialogOrg: false dialogOrg: false,
deleteVisible: false,
detelMessage: '',
clickItem: null
} }
}, },
components: { components: {
...@@ -354,33 +373,33 @@ export default { ...@@ -354,33 +373,33 @@ export default {
} }
}, },
detel(item) { detel(item) {
this.$confirm(`删除后${item.orgName}将无法访问本圈, 确定删除么?`, '提示', { this.detelMessage = `删除后 "${item.orgName}" 将无法访问本圈,确定删除吗?`
confirmButtonText: '确定', this.deleteVisible = true
cancelButtonText: '取消', this.clickItem = item
type: 'warning' },
}).then(() => { confirmDelete() {
let params = { let params = {
circleId: this.circleId, circleId: this.circleId,
orgIds: [item.id] orgIds: [this.clickItem.id]
} }
morDeleteOrg(params).then((res) => { morDeleteOrg(params).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.$message({
type: 'success',
message: '删除成功!'
});
this.searchOrganization()
}
}).catch(() => {
this.$message.error('删除失败,请稍后重试');
})
}).catch((err) => {
this.$message({ this.$message({
type: 'info', type: 'success',
message: '已取消删除' message: '删除成功!'
}); });
}); this.deleteVisible = false
this.searchOrganization()
}
}).catch(() => {
this.deleteVisible = false
this.$message.error('删除失败,请稍后重试');
})
},
hideDeleteFrom() {
this.deleteVisible = false
this.detelMessage = ''
this.clickItem = null
}, },
setOrgTotal() { setOrgTotal() {
vm.$emit('setOrgTotal',vm.totalOrganization) vm.$emit('setOrgTotal',vm.totalOrganization)
...@@ -409,7 +428,9 @@ export default { ...@@ -409,7 +428,9 @@ export default {
.add-organization { .add-organization {
margin-left: 40px; margin-left: 40px;
line-height: 20px; line-height: 20px;
width: 120px;
cursor: pointer; cursor: pointer;
padding-top: 10px;
i { i {
font-size: 18px; font-size: 18px;
margin-right: 2px; margin-right: 2px;
...@@ -419,6 +440,7 @@ export default { ...@@ -419,6 +440,7 @@ export default {
.organization-search { .organization-search {
margin-right: 20px; margin-right: 20px;
text-align: right; text-align: right;
flex: 1;
} }
} }
</style> </style>
<template> <template>
<div class="organization"> <div class="organization">
<el-row type="flex" class="row-bg" align="middle"> <el-row type="flex" class="row-bg" align="middle">
<el-col :span="4" class="add-organization"> <el-col class="add-organization">
<i class="el-icon-circle-plus-outline"></i> <i class="el-icon-circle-plus-outline" @click="dialogMemberFn()"></i>
<i class="text">添加人员</i> <i class="text" @click="dialogMemberFn()">添加人员</i>
</el-col> </el-col>
<el-col :span="20" class="organization-search"> <el-col class="organization-search">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline" > <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-input style="width:140px;" size="small" v-model="formOrganization.orgName" placeholder="请输入机构名称"></el-input>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<el-button size="small" type="primary" @click="getList()">搜索</el-button> <el-button size="small" type="primary" @click="getList()">搜索</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="small" type="primary" @click="reset()">重置</el-button> <el-button size="small" @click="reset()">取消搜索</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
align="center" align="center"
width="140"> width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="detel(scope.row)" type="text" size="small" style="color:red">删除</el-button> <el-button @click="detel(scope.row)" type="text" size="small" style="color:red" v-if="scope.row.source != 1">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<div slot="empty"> <div slot="empty">
...@@ -59,6 +59,35 @@ ...@@ -59,6 +59,35 @@
:current-page="formOrganization.pageNum" :page-sizes="[10, 20, 40]" :page-size="formOrganization.pageSize" :current-page="formOrganization.pageNum" :page-sizes="[10, 20, 40]" :page-size="formOrganization.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="totalPeople"></el-pagination> layout="total, sizes, prev, pager, next, jumper" :total="totalPeople"></el-pagination>
</div> </div>
<el-dialog
title="添加人员"
:visible.sync="dialogOrg"
width="80%"
top="5vh"
:before-close="handleClose">
<add-member
v-if="dialogOrg"
:circleId='circleId'
:roleType='roleType'
@addPeople="addPeople"
@handleClose="handleClose">
</add-member>
</el-dialog>
<!-- 删除 弹窗 -->
<el-dialog
title="确认删除"
:show-close="false"
:visible.sync="deleteVisible"
:close-on-click-modal="false"
width="600px"
center
>
<p style="text-align: center;">{{detelMessage}}</p>
<span slot="footer" class="dialog-footer">
<el-button @click="confirmDelete">删 除</el-button>
<el-button type="primary" @click="hideDeleteFrom">取 消</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -67,8 +96,12 @@ import * as operationData from "@/utils/operation"; ...@@ -67,8 +96,12 @@ import * as operationData from "@/utils/operation";
import { openLoading, closeLoading } from "@/utils/utils"; import { openLoading, closeLoading } from "@/utils/utils";
import { doUpload, getFilePath } from "@/utils/qiniu-util"; import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { mpRelSearch, mprDeleteOrg } from '@/utils/yqrange/memberApi'; import { mpRelSearch, mprDeleteOrg } from '@/utils/yqrange/memberApi';
import addMember from './addMember.vue'
let vm = null; let vm = null;
export default { export default {
components: {
addMember
},
props: { props: {
circleId: { circleId: {
type: Number | String, type: Number | String,
...@@ -137,7 +170,10 @@ export default { ...@@ -137,7 +170,10 @@ export default {
source: 0, source: 0,
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
} },
dialogOrg:false,
deleteVisible: false,
detelMessage: ''
} }
}, },
created() { created() {
...@@ -217,34 +253,43 @@ export default { ...@@ -217,34 +253,43 @@ export default {
this.getList(); this.getList();
}, },
detel(item) { detel(item) {
this.$confirm(`删除后${item.name}将无法访问本圈, 确定删除么?`, '提示', { this.detelMessage = `删除后 "${item.name}" 将无法访问本圈, 确定删除么?`
confirmButtonText: '确定', this.deleteVisible = true
cancelButtonText: '取消', this.clickItem = item
type: 'warning' },
}).then(() => { confirmDelete() {
let params = { let params = {
circleId: this.circleId, circleId: this.circleId,
docIds: [item.id] docIds: [this.clickItem.id]
} }
mprDeleteOrg(params).then((res) => { mprDeleteOrg(params).then((res) => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.getList()
}).catch(() => {
this.$message.error('删除失败,请稍后重试');
})
}).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'success',
message: '已取消删除' message: '删除成功!'
}); });
}); this.deleteVisible = false
this.getList()
}).catch(() => {
this.$message.error('删除失败,请稍后重试');
})
},
hideDeleteFrom() {
this.deleteVisible = false
this.detelMessage = ''
this.clickItem = null
}, },
setPleTotal() { setPleTotal() {
this.$emit('setPleTotal',this.totalPeople) this.$emit('setPleTotal',this.totalPeople)
},
dialogMemberFn() {
this.dialogOrg = true
},
handleClose() {
this.dialogOrg = false
},
addPeople() {
this.dialogOrg = false
this.initRange()
} }
} }
} }
...@@ -255,7 +300,9 @@ export default { ...@@ -255,7 +300,9 @@ export default {
.add-organization { .add-organization {
margin-left: 40px; margin-left: 40px;
line-height: 20px; line-height: 20px;
width: 120px;
cursor: pointer; cursor: pointer;
padding-top: 10px;
i { i {
font-size: 18px; font-size: 18px;
margin-right: 2px; margin-right: 2px;
...@@ -263,6 +310,7 @@ export default { ...@@ -263,6 +310,7 @@ export default {
} }
.organization-search { .organization-search {
flex: 1;
margin-right: 20px; margin-right: 20px;
text-align: right; text-align: right;
} }
......
...@@ -488,7 +488,7 @@ const vueFilter = { ...@@ -488,7 +488,7 @@ const vueFilter = {
if (value == 0) { if (value == 0) {
return '暂存' return '暂存'
}else if (value == 10) { }else if (value == 10) {
return '待发布' return '未上线'
}else if (value == 20) { }else if (value == 20) {
return '' return ''
}else if (value == 30) { }else if (value == 30) {
......
...@@ -4,7 +4,33 @@ let headers = { ...@@ -4,7 +4,33 @@ let headers = {
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
token: localStorage.getItem('storageToken'), token: localStorage.getItem('storageToken'),
}; };
export const moRelAddSearch = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/memberSelect/people/add/search`),
method: 'post',
data: params,
description: '添加人员白名单-查询圈子to添加人员列表',
})
};
export const moPeopleOption = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/memberSelect/people/option`),
method: 'post',
data: params,
description: '添加白名单人员- 勾选操作',
})
};
export const moPeopleSave = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/memberSelect/people/save`),
method: 'post',
data: params,
description: '添加白名单人员- 保存',
})
};
export const moRelSearch = (params) => { export const moRelSearch = (params) => {
return fetch({ return fetch({
headers, headers,
...@@ -14,7 +40,14 @@ export const moRelSearch = (params) => { ...@@ -14,7 +40,14 @@ export const moRelSearch = (params) => {
description: '查询机构-圈子已选机构列表', description: '查询机构-圈子已选机构列表',
}) })
}; };
export const clearPeopleCacheOrg = (circleId) => {
return fetch({
headers,
url: getBaseUrl(`circle/memberSelect/people/option/clearCache/${circleId}`),
method: 'get',
description: '添加白名单人员- 勾选操作清除缓存',
})
};
export const morDeleteOrg = (params) => { export const morDeleteOrg = (params) => {
return fetch({ return fetch({
headers, headers,
......
<template> <template>
<div class="item-shield"> <div class="item-shield">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbSecond"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird" :jumPathThird="jumPathThird" :jumPathFouth="jumPathFouth"></bread-crumb>
<div class="component-content screenSet" id="screenSet"> <div class="component-content screenSet" id="screenSet">
<div class="header-title">设置管理员</div> <div class="header-title">设置管理员</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px"> <el-row :gutter="30" class="row" type="flex" style="margin-top: 10px">
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<el-button <el-button
type="text" type="text"
size="small" size="small"
style="color:#409EFF"
@click="openDialog(scope.row)" @click="openDialog(scope.row)"
>{{ scope.row.roleId | roleAdminButton }}</el-button> >{{ scope.row.roleId | roleAdminButton }}</el-button>
</template> </template>
...@@ -67,14 +68,16 @@ ...@@ -67,14 +68,16 @@
></el-pagination> ></el-pagination>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import BreadCrumb from "../../components/breadcrumb.vue"; import BreadCrumb from "@/components/yqrange/breadcrumb-range.vue";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils"; import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils"; import * as commonUtil from "../../utils/utils";
import * as operationData from "../../utils/operation"; import * as operationData from "../../utils/operation";
let vm = null; let vm = null;
export default { export default {
components: { components: {
...@@ -83,10 +86,11 @@ export default { ...@@ -83,10 +86,11 @@ export default {
data() { data() {
return { return {
curmbFirst: "云鹊小圈", curmbFirst: "云鹊小圈",
curmbSecond: "设置管理员", curmbThird: "设置管理员",
jumPathThird: '/yq-range',
circleId: "", circleId: "",
formInline: { formInline: {
blackStatus:0,//默认角色
region: ["0"], region: ["0"],
administrativeId: "", administrativeId: "",
orgName: "", orgName: "",
...@@ -137,15 +141,6 @@ export default { ...@@ -137,15 +141,6 @@ export default {
console.log("newData", newData); console.log("newData", newData);
resolve(newData); resolve(newData);
}); });
} else if (node.level == 3) {
let req = {
countyId: node.data.value
};
vm.GET("basic-data/position/towns", req).then(res => {
let newData = vm.setMoreOption(res.data.townList, "towns");
console.log("newData", newData);
resolve(newData);
});
} }
} }
} }
...@@ -156,7 +151,13 @@ export default { ...@@ -156,7 +151,13 @@ export default {
}, },
created() { created() {
vm = this; vm = this;
vm.circleId = 129; this.circleId = this.$route.query.circleId;
this.circleName = this.$route.query.circleName;
this.curmbSecond = "圈子管理-" + this.circleName;
this.jumPathFouth = "/range-manage?id=" + this.circleId + "&name=" + this.circleName + "&activeName=first";
vm.circleId = vm.getUrlSearch(window.location.href, "circleId");
vm.formInline.blackStatus = 0 ;
vm.search(); vm.search();
}, },
// 挂载到Dom完成时 // 挂载到Dom完成时
...@@ -230,7 +231,7 @@ export default { ...@@ -230,7 +231,7 @@ export default {
vm.scopeRow = row; vm.scopeRow = row;
vm.shieldBlock = row.roleId; vm.shieldBlock = row.roleId;
if (row.roleId == 0) { if (row.roleId == 0) {
this.$confirm(`确定要将普通成员“${row.name}”升为管理员?`, '', { this.$confirm(`确定要将普通成员“${row.name}”升为管理员?`, '提示', {
confirmButtonText: '确 定', confirmButtonText: '确 定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
...@@ -243,7 +244,7 @@ export default { ...@@ -243,7 +244,7 @@ export default {
}); });
} }
if (row.roleId == 1) { if (row.roleId == 1) {
this.$confirm(`确定要将管理员员“${row.name}”降为普通成员?`, '', { this.$confirm(`确定要将管理员员“${row.name}”降为普通成员?`, '提示', {
confirmButtonText: '确 定', confirmButtonText: '确 定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
...@@ -255,7 +256,7 @@ export default { ...@@ -255,7 +256,7 @@ export default {
// cancel // cancel
}); });
} }
}, },
// 升为管理员/降为普通成员 // 升为管理员/降为普通成员
changeStatus() { changeStatus() {
...@@ -330,4 +331,4 @@ export default { ...@@ -330,4 +331,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="yqrange-index-wrapper"> <div class="yqrange-index-wrapper">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird" :jumPathThird="jumPathThird" :jumPathFouth="jumPathFouth"></bread-crumb>
<div class="yqrange-index-content screenSet" id="screenSet"> <div class="yqrange-index-content screenSet" id="screenSet">
<div class="header-title">黑名单</div> <div class="header-title">黑名单</div>
<el-form <el-form
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</template> </template>
<script> <script>
let vm = null; let vm = null;
import BreadCrumb from "@/components/breadcrumb.vue"; import BreadCrumb from "@/components/yqrange/breadcrumb-range.vue";
// import * as operationData from "../../../utils/operation"; // import * as operationData from "../../../utils/operation";
import checkBlackList from "./checkBlackList"; import checkBlackList from "./checkBlackList";
export default { export default {
...@@ -88,8 +88,9 @@ export default { ...@@ -88,8 +88,9 @@ export default {
return { return {
circleId: 0, circleId: 0,
curmbFirst: "云鹊小圈", curmbFirst: "云鹊小圈",
curmbSecond: "圈子管理", curmbSecond: "",
curmbThird: "黑名单", curmbThird: "黑名单",
jumPathThird: '/yq-range',
searchForm: { searchForm: {
organization: "", organization: "",
staffName: "", staffName: "",
...@@ -106,12 +107,14 @@ export default { ...@@ -106,12 +107,14 @@ export default {
created() { created() {
vm = this; vm = this;
// this.circleId = this.$route.query.id; // this.circleId = this.$route.query.id;
this.circleId = 131; // this.circleId = 131;
this.circleId = this.$route.query.circleId;
this.idType = localStorage.getItem("storageIdType"); this.idType = localStorage.getItem("storageIdType");
this.circleName = this.$route.query.circleName;
this.curmbSecond = "圈子管理-" + this.circleName;
this.jumPathFouth = "/range-manage?id=" + this.circleId + "&name=" + this.circleName + "&activeName=first";
console.log("alex storageIdType = " + this.idType + ", id = " + this.id); console.log("alex storageIdType = " + this.idType + ", id = " + this.id);
this.searchList(); this.searchList();
this.curmbSecond = "圈子管理-新建县基层医疗圈";
}, },
methods: { methods: {
// 搜索 // 搜索
......
...@@ -11,19 +11,19 @@ ...@@ -11,19 +11,19 @@
:inline="true" :inline="true"
> >
<el-row :gutter="30" type="flex" style="margin-top: 10px"> <el-row :gutter="30" type="flex" style="margin-top: 10px">
<el-col :span="10"> <el-col :span="8">
<el-form-item label="直播名称"> <el-form-item label="直播名称">
<el-input v-model="searchForm.liveName" size="small" placeholder="请输入直播名称"></el-input> <el-input v-model="searchForm.liveName" size="small" placeholder="请输入直播名称"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="9">
<el-form-item label="直播状态"> <el-form-item label="直播状态">
<el-select <el-select
v-model="searchForm.liveStatus" v-model="searchForm.liveStatus"
id="statusSelector" id="statusSelector"
placeholder="请选择发布状态" placeholder="请选择发布状态"
clearable clearable
style="margin-left:20px;" style="margin-left:20px;height: 32px;line-height: 32px;"
> >
<el-option <el-option
v-for="item in statusList" v-for="item in statusList"
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" style="text-align: right"> <el-col :span="7" style="text-align: right">
<el-button type="primary" size="small" @click="search">查询</el-button> <el-button type="primary" size="small" @click="search">搜索</el-button>
<el-button type="default" size="small" @click="resetForm" style="margin-left:0;">重置</el-button> <el-button type="default" size="small" @click="resetForm" style="margin-left:0;">取消搜索</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -1384,4 +1384,8 @@ export default { ...@@ -1384,4 +1384,8 @@ export default {
height: 400px; height: 400px;
margin: 0 auto; margin: 0 auto;
} }
.el-select .el-input__inner {
height: 32px;
line-height: 32px;
}
</style> </style>
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<div v-if="active == 0"> <div v-if="active == 0">
<el-tabs v-model="activeName" @tab-click="tabChangeHandler"> <el-tabs v-model="activeName" @tab-click="tabChangeHandler">
<el-tab-pane label="成员管理" name="first"> <el-tab-pane label="成员管理" name="first">
<mebman :circleId="circleId" :roleType="roleType" :circleName="name"></mebman>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="分组管理" name="second"> <!--<el-tab-pane label="分组管理" name="second">-->
</el-tab-pane> <!--</el-tab-pane>-->
<el-tab-pane label="直播管理" name="third"> <el-tab-pane label="直播管理" name="third">
<live-manage @setActive="setActive" :circleName="name"></live-manage> <live-manage @setActive="setActive" :circleName="name"></live-manage>
</el-tab-pane> </el-tab-pane>
...@@ -38,10 +38,10 @@ import BreadCrumb from "@/components/yqrange/breadcrumb-range.vue"; ...@@ -38,10 +38,10 @@ import BreadCrumb from "@/components/yqrange/breadcrumb-range.vue";
import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting} from "../../utils/yqrange/yqrangeApi"; import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting} from "../../utils/yqrange/yqrangeApi";
import LiveManage from "./live-manage"; import LiveManage from "./live-manage";
import RangeSetting from "./range-setting"; import RangeSetting from "./range-setting";
import CreateLive from "./create-live"; import Mebman from "../../components/yqrange/mebman";
export default { export default {
components: { components: {
CreateLive, Mebman,
RangeSetting, RangeSetting,
LiveManage, LiveManage,
BreadCrumb BreadCrumb
...@@ -70,14 +70,16 @@ export default { ...@@ -70,14 +70,16 @@ export default {
dialogSettingVisible: false, dialogSettingVisible: false,
circleId: null, circleId: null,
name: "", name: "",
active: 0 active: 0,
roleType: ''
} }
}, },
created() { created() {
const {id, name, activeName} = this.$route.query; const {id, name, activeName, roleType} = this.$route.query;
this.circleId = id; this.circleId = id;
this.name = name; this.name = name;
this.activeName = activeName; this.activeName = activeName;
this.roleType = roleType;
this.curmbSecond = "圈子管理-" + name; this.curmbSecond = "圈子管理-" + name;
this.curmbThird = this.curmbSecond; this.curmbThird = this.curmbSecond;
this.active = 0; this.active = 0;
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
<div class="header-title">云鹊小圈</div> <div class="header-title">云鹊小圈</div>
<el-form ref="searchForm" :model="searchForm" label-width="75px" label-suffix=":" :inline="true"> <el-form ref="searchForm" :model="searchForm" label-width="75px" label-suffix=":" :inline="true">
<el-row :gutter="30" type="flex" style="margin-top: 10px"> <el-row :gutter="30" type="flex" style="margin-top: 10px">
<el-col :span="10"> <el-col :span="8">
<el-form-item label="圈子名称"> <el-form-item label="圈子名称">
<el-input v-model="searchForm.name" size="small" placeholder="请输入圈子名称"></el-input> <el-input v-model="searchForm.name" size="small" placeholder="请输入圈子名称"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="9">
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker <el-date-picker
v-model="searchForm.createdTime" v-model="searchForm.createdTime"
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" style="text-align: right"> <el-col :span="7" style="text-align: right">
<el-button type="primary" size="small" @click="search">查询</el-button> <el-button type="primary" size="small" @click="search">搜索</el-button>
<el-button type="default" size="small" @click="resetForm" style="margin-left:0;">重置</el-button> <el-button type="default" size="small" @click="resetForm" style="margin-left:0;">取消搜索</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -57,11 +57,11 @@ ...@@ -57,11 +57,11 @@
<div v-if="scope.row.status != 50"> <div v-if="scope.row.status != 50">
<el-button @click="publishRange(scope.row)" v-if="scope.row.status != 30 && scope.row.status != 0" type="text" size="small">上线</el-button> <el-button @click="publishRange(scope.row)" v-if="scope.row.status != 30 && scope.row.status != 0" type="text" size="small">上线</el-button>
<el-button @click="unPublishRange(scope.row)" v-if="scope.row.status == 30 && scope.row.status != 0" type="text" size="small">下线</el-button> <el-button @click="unPublishRange(scope.row)" v-if="scope.row.status == 30 && scope.row.status != 0" type="text" size="small">下线</el-button>
<el-button @click="liveManage(scope.row)" type="text" size="small" v-if="scope.row.status != 0">直播管理</el-button> <!--<el-button @click="liveManage(scope.row)" type="text" size="small" v-if="scope.row.status != 0">直播管理</el-button>-->
<el-button @click="roleManage(scope.row)" type="text" size="small" v-if="scope.row.status != 0">成员管理</el-button> <!--<el-button @click="roleManage(scope.row)" type="text" size="small" v-if="scope.row.status != 0">成员管理</el-button>-->
<el-button @click="editRange(scope.row)" type="text" size="small">编辑</el-button> <el-button @click="editRange(scope.row)" type="text" size="small">编辑</el-button>
<el-button @click="deleteRange(scope.row)" type="text" size="small" v-if="showAllFlag && scope.row.status != 0">解散圈子</el-button> <el-button @click="deleteRange(scope.row)" type="text" size="small" v-if="showAllFlag && scope.row.status != 0">解散圈子</el-button>
<el-button @click="setting(scope.row)" type="text" size="small" v-if="scope.row.status != 0 && showNewFlag">应用配置</el-button> <!--<el-button @click="setting(scope.row)" type="text" size="small" v-if="scope.row.status != 0 && showNewFlag">应用配置</el-button>-->
<el-button @click="rangeManage(scope.row)" type="text" size="small" v-if="scope.row.status != 0">管理</el-button> <el-button @click="rangeManage(scope.row)" type="text" size="small" v-if="scope.row.status != 0">管理</el-button>
</div> </div>
</template> </template>
...@@ -315,7 +315,9 @@ export default { ...@@ -315,7 +315,9 @@ export default {
path: '/range-manage', path: '/range-manage',
query: { query: {
id: row.id, id: row.id,
name: row.name name: row.name,
activeName: 'first',
roleType: row.roleId
} }
}) })
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册