Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
b243e87d
提交
b243e87d
编写于
9月 04, 2020
作者:
alex.zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
黑名单添加
上级
e08e7b40
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
629 行增加
和
19 行删除
+629
-19
memberApi.js
src/utils/yqrange/memberApi.js
+29
-0
blacklist-manage.vue
src/views/yqrange/blacklist-manage.vue
+36
-19
checkBlackList.vue
src/views/yqrange/checkBlackList.vue
+564
-0
未找到文件。
src/utils/yqrange/memberApi.js
浏览文件 @
b243e87d
...
...
@@ -35,6 +35,16 @@ export const moOption = (params) => {
})
};
export
const
moOptionBlackList
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`circle/memberSelect/black/option`
),
method
:
'post'
,
data
:
params
,
description
:
'黑名单- 勾选操作'
,
})
};
export
const
moSave
=
(
params
)
=>
{
return
fetch
({
headers
,
...
...
@@ -45,6 +55,16 @@ export const moSave = (params) => {
})
};
export
const
moSaveBlackList
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`circle/memberSelect/black/save`
),
method
:
'post'
,
data
:
params
,
description
:
'添加黑名单-保存'
,
})
};
export
const
moOrgSearch
=
(
params
)
=>
{
return
fetch
({
headers
,
...
...
@@ -64,6 +84,15 @@ export const clearCacheOrg = (circleId) => {
})
};
export
const
clearBlackListCacheOrg
=
(
circleId
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`circle/memberSelect/black/option/clearCache/
${
circleId
}
`
),
method
:
'get'
,
description
:
'黑名单-清除缓存'
,
})
};
export
const
mpRelSearch
=
(
params
)
=>
{
return
fetch
({
headers
,
...
...
src/views/yqrange/blacklist-manage.vue
浏览文件 @
b243e87d
...
...
@@ -11,7 +11,7 @@
:inline=
"true"
>
<el-row
:gutter=
"30"
type=
"flex"
style=
"margin-top: 10px"
>
<p
class=
"add_btn"
@
click=
"
resetForm
"
>
+ 添加人员至黑名单
</p>
<p
class=
"add_btn"
@
click=
"
openDialogBlackList()
"
>
+ 添加人员至黑名单
</p>
<el-col
:span=
"8"
>
<el-form-item
label=
"机构"
>
<el-input
size=
"small"
v-model=
"searchForm.organization"
placeholder=
"请输入机构名称"
></el-input>
...
...
@@ -24,7 +24,7 @@
</el-col>
<el-col
:span=
"4"
style=
"text-align: right;margin-top: 5px"
>
<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=
"
searchCancel
"
style=
"margin-left:0;"
>
取消搜索
</el-button>
</el-col>
</el-row>
</el-form>
...
...
@@ -56,26 +56,31 @@
</div>
</div>
<
!-- <
el-dialog
title
:visible.sync="dialog
DeleteVisible
"
width="
500px
"
:close-on-click-modal="false
"
center
<el-dialog
title
=
"添加机构"
:visible
.
sync=
"dialog
BlackList
"
width=
"
80%
"
top=
"5vh
"
:before-close=
"handleClose"
>
<p>
确定将"<span>{{ row. }}</span>"移除黑名单?
</p>
</el-dialog> -->
<checkBlackList
:circleId=
"circleId"
@
addOrg=
"addOrg"
@
handleClose=
"handleClose"
></checkBlackList>
<!-- :roleType="roleType" -->
</el-dialog>
</div>
</template>
<
script
>
let
vm
=
null
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
// import * as operationData from "../../../utils/operation";
import
checkBlackList
from
"./checkBlackList"
;
export
default
{
components
:
{
BreadCrumb
,
checkBlackList
,
},
data
()
{
vm
=
this
;
...
...
@@ -95,11 +100,13 @@ export default {
tableData
:
[],
selfRoleId
:
0
,
docIds
:
[],
dialogBlackList
:
false
,
};
},
created
()
{
vm
=
this
;
this
.
circleId
=
this
.
$route
.
query
.
id
;
// this.circleId = this.$route.query.id;
this
.
circleId
=
131
;
this
.
idType
=
localStorage
.
getItem
(
"storageIdType"
);
console
.
log
(
"alex storageIdType = "
+
this
.
idType
+
", id = "
+
this
.
id
);
this
.
searchList
();
...
...
@@ -112,6 +119,9 @@ export default {
this
.
searchForm
.
pageNo
=
1
;
this
.
searchList
();
},
searchCancel
()
{
},
searchList
()
{
console
.
log
(
"查询"
);
...
...
@@ -137,6 +147,9 @@ export default {
vm
.
$message
.
error
(
error
);
});
},
openDialogBlackList
()
{
this
.
dialogBlackList
=
true
;
},
resetForm
()
{
console
.
log
(
"重置"
);
this
.
searchForm
.
organization
=
""
;
...
...
@@ -154,15 +167,12 @@ export default {
})
.
then
(()
=>
{
console
.
log
(
"移出: row.name = "
+
row
.
name
);
this
.
docIds
=
[
row
.
id
];
this
.
docIds
=
[
row
.
id
];
let
req
=
{
circleId
:
this
.
circleId
,
docIds
:
this
.
docIds
,
};
vm
.
POST
(
"circle/memberSelect/black/related/deletePeople"
,
req
)
vm
.
POST
(
"circle/memberSelect/black/related/deletePeople"
,
req
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
"000000"
)
{
vm
.
$message
({
...
...
@@ -192,7 +202,14 @@ export default {
this
.
searchForm
.
pageNo
=
val
;
this
.
searchList
();
},
},
handleClose
()
{
this
.
dialogBlackList
=
false
;
},
addOrg
()
{
this
.
handleClose
();
this
.
search
();
},
}
};
</
script
>
<
style
lang=
"scss"
>
...
...
src/views/yqrange/checkBlackList.vue
0 → 100644
浏览文件 @
b243e87d
<
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
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:200px;"
size=
"small"
v-model=
"formOrganization.organization"
placeholder=
"请输入机构名称"
></el-input>
</el-form-item>
<el-form-item
label
>
<el-input
style=
"width:200px;"
size=
"small"
v-model=
"formOrganization.name"
placeholder=
"请输入人员名称"
></el-input>
</el-form-item>
<el-form-item>
<el-button
size=
"small"
type=
"primary"
@
click=
"search()"
>
搜索
</el-button>
</el-form-item>
<el-form-item>
<el-button
size=
"small"
type=
"default"
@
click=
"searchCancel()"
>
取消搜索
</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
{
moOptionBlackList
,
moOrgSearch
,
moSaveBlackList
,
clearBlackListCacheOrg
}
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
:
""
,
optionsRegion
:
[],
organizationRank
:
[],
tableOrganization
:
new
Array
(),
currentOrganization
:
1
,
totalOrganization
:
10
,
pageSizeOrganization
:
2
,
selectionList
:[],
formOrganization
:
{
name
:
""
,
organization
:
""
,
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"
);
this
.
search
();
},
methods
:
{
search
()
{
console
.
log
(
"search() enter"
)
this
.
searchList
();
},
searchCancel
()
{
},
searchList
()
{
console
.
log
(
"黑名单搜索 "
+
this
.
circleId
);
let
req
=
{
circleId
:
this
.
circleId
,
name
:
this
.
formOrganization
.
name
,
orgName
:
this
.
formOrganization
.
organization
,
pageNo
:
this
.
formOrganization
.
pageNum
,
pageSize
:
this
.
formOrganization
.
pageSize
,
};
vm
.
POST
(
"circle/memberSelect/black/add/search"
,
req
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
"000000"
)
{
// this.tableData = res.data.peoplesDtoList;
// this.totalRows = res.data.total;
this
.
tableOrganization
=
res
.
data
.
peoplesDtoList
;
this
.
totalOrganization
=
res
.
data
.
total
;
}
else
{
// vm.$message.info(res.message);
// vm.$message.info("操作失败,请重试");
}
})
.
catch
(
function
(
error
)
{
vm
.
$message
.
error
(
error
);
});
},
clear
()
{
console
.
log
(
"clear() enter"
)
clearBlackListCacheOrg
(
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
()
{
this
.
getRegionOption
();
this
.
listLevels
();
this
.
formOrganization
.
pageNum
=
1
;
this
.
formOrganization
.
name
=
""
;
this
.
formOrganization
.
level
=
""
;
},
//获取地区
getRegionOption
()
{
openLoading
(
vm
);
let
idType
=
localStorage
.
getItem
(
"storageIdType"
);
getCircleProvincesReq
(
idType
).
then
(
res
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
if
(
idType
==
1
)
{
vm
.
optionsRegion
=
operationData
.
setRegionOption2
(
res
.
data
.
provinceList
);
}
else
{
vm
.
optionsRegion
=
operationData
.
setRegionOption3
(
res
.
data
.
provinceList
);
}
vm
.
formOrganization
.
administrativeIdList
.
push
(
vm
.
optionsRegion
[
0
].
value
);
vm
.
getOrganization
();
}
else
{
this
.
$message
(
res
.
message
);
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
'请求失败'
);
});
},
//获取医院等级
listLevels
()
{
let
req
=
{};
vm
.
GET
(
"contents/courseDoctor/listLevels?sysCode=10"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
this
.
organizationRank
=
operationData
.
getLevelList
(
res
.
data
.
list
);
}
else
{
this
.
organizationRank
=
[
{
id
:
"0"
,
label
:
"全部医院等级"
}
];
}
});
},
//查询所有的机构列表
getOrganization
()
{
let
idType
=
localStorage
.
getItem
(
"storageIdType"
);
let
administrativeIdItem
=
""
;
// 如果是外部用户(2),只能看到所在省份的数据
if
(
idType
==
2
){
let
optionRegionArray
=
new
Array
();
optionRegionArray
.
push
(
this
.
optionsRegion
[
0
].
provinceId
);
administrativeIdItem
=
operationData
.
setAdministrativeId
(
optionRegionArray
);
}
let
req
=
{
circleId
:
this
.
circleId
,
districtIds
:
administrativeIdItem
,
orgLevel
:
""
,
member
:
this
.
formOrganization
.
name
,
pageNo
:
this
.
formOrganization
.
pageNum
,
pageSize
:
this
.
formOrganization
.
pageSize
,
idType
:
idType
,
roleType
:
this
.
roleType
};
openLoading
(
vm
);
moOrgSearch
(
req
).
then
(
res
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
this
.
tableOrganization
=
res
.
data
.
orgList
;
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
);
});
}
});
},
//机构搜索
getOrganizationChoose
()
{
let
administrativeIdItem
=
operationData
.
setAdministrativeId
(
this
.
formOrganization
.
administrativeIdList
);
if
(
administrativeIdItem
==
"000_0"
){
administrativeIdItem
=
""
}
let
idType
=
localStorage
.
getItem
(
"storageIdType"
);
let
req
=
{
circleId
:
this
.
circleId
,
districtIds
:
administrativeIdItem
,
orgLevel
:
this
.
formOrganization
.
level
,
member
:
this
.
formOrganization
.
name
,
pageNo
:
this
.
formOrganization
.
pageNum
,
pageSize
:
this
.
formOrganization
.
pageSize
,
idType
:
idType
,
roleType
:
this
.
roleType
};
openLoading
(
vm
);
moOrgSearch
(
req
).
then
(
res
=>
{
closeLoading
(
vm
);
if
(
res
.
code
==
"000000"
)
{
this
.
tableOrganization
=
res
.
data
.
orgList
;
this
.
totalOrganization
=
res
.
data
.
total
;
vm
.
initOrganizationStatus
();
}
else
{
this
.
$message
(
res
.
message
);
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
'请求失败'
);
});
},
//选择搜索机构方式
searchOrganization
()
{
this
.
formOrganization
.
pageNum
=
1
;
let
searchForm
=
this
.
formOrganization
;
if
(
searchForm
.
administrativeId
==
"0"
&&
searchForm
.
administrativeIdList
[
searchForm
.
administrativeIdList
.
length
-
1
]
==
"0"
&&
searchForm
.
level
==
""
&&
searchForm
.
name
==
""
)
{
this
.
searchOrganizationType
=
""
;
this
.
getOrganization
();
}
else
{
this
.
searchOrganizationType
=
"choose"
;
this
.
getOrganizationChoose
();
}
},
// 更改每页显示的数据数量
handleSizeOrganization
(
val
)
{
console
.
log
(
`每页
${
val
}
条`
);
this
.
formOrganization
.
pageSize
=
val
;
this
.
search
();
},
// 更改当前页数
handleCurrentOrganization
(
val
)
{
//console.log(`当前页: ${val}`);
this
.
formOrganization
.
pageNum
=
val
;
console
.
log
(
"this.formOrganization.pageNum = "
+
this
.
formOrganization
.
pageNum
)
this
.
search
();
},
//机构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
);
moOptionBlackList
(
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
(
'请求失败'
);
});
}
},
//机构table中勾选一个
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
);
moOptionBlackList
(
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
()
{
console
.
log
(
"this.allSelect = "
+
this
.
allSelect
)
console
.
log
(
"this.allSelect.length = "
+
this
.
allSelect
.
length
)
if
(
!
(
this
.
allSelect
&&
this
.
allSelect
.
length
))
{
this
.
$message
.
error
(
'已选列表为空'
);
return
}
let
params
=
{
circleId
:
this
.
circleId
}
moSaveBlackList
(
params
)
.
then
(()
=>
{
this
.
$emit
(
'addOrg'
)
})
.
catch
(()
=>
{
this
.
$message
.
error
(
'保存失败,请重试'
);
})
},
// 取消
canclefn
()
{
console
.
log
(
"alex do 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
>
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录