diff --git a/src/components/DialogComponents/Form.vue b/src/components/DialogComponents/Form.vue
index 95807684494899781f0de8699ee50a35a8cb8a40..27f435a4680e10bda50da408db58a7e29cd3a94f 100644
--- a/src/components/DialogComponents/Form.vue
+++ b/src/components/DialogComponents/Form.vue
@@ -162,7 +162,22 @@
v-el-select-loadmore="loadmore"
@change="item.func ? item.func($event) : {}"
>
+
+
+
+ e.id)
+ console.log(this.consortiaDataRole[0].opts)
+ }
+ },
// 修改启用状态
// 启用状态
openChage(data, index) {
@@ -478,7 +486,7 @@ export default {
let params = {
current: current,
unionName: this.searchQuery ? this.searchQuery : undefined,
- size: 20,
+ size: 10000,
}
medicalunionList(params).then((res) => {
if (res.code === 1) {
@@ -509,19 +517,29 @@ export default {
this.options = []
}
},
+ // 授权医联体
handleConsortiaConfirm(unionIds) {
- console.log(unionIds, this.rowId)
+ let unionIdList = unionIds.consortiaList
+ if (unionIds.consortiaList.includes("all")) {
+ unionIdList = this.consortiaDataRole[0].opts.map((e) => e.value)
+ }
const data = {
userId: this.rowId,
- unionIds: unionIds.consortiaList,
+ unionIds: unionIdList,
}
- baseUnion(data).then((res) => {
- if (res.code === 1) {
- this.$message.success("授权成功")
- this.handleSearch()
- this.$refs.consortiaRole.close()
- }
- })
+ baseUnion(data)
+ .then((res) => {
+ if (res.code === 1) {
+ this.$message.success("授权成功")
+ this.handleSearch()
+ this.$refs.consortiaRole.close()
+ } else {
+ this.$refs.consortiaRole.loading = false
+ }
+ })
+ .catch(() => {
+ this.$refs.consortiaRole.loading = false
+ })
},
orgChange(orgId) {
const list = []
@@ -594,6 +612,7 @@ export default {
}
})
},
+ // 医联体授权弹窗
handleConsortia({ id }) {
this.rowId = id
this.$refs.consortiaRole.open()
@@ -604,10 +623,13 @@ export default {
res.data.unionList.map((item) => {
consortiaList.push(item.id)
})
-
- this.consortiaList = [...consortiaList]
+ if (consortiaList.length == this.consortiaDataRole[0].opts.length) {
+ this.consortiaList = ["all"]
+ } else {
+ this.consortiaList = consortiaList
+ }
this.$refs.consortiaRole.initFields({
- consortiaList: consortiaList,
+ consortiaList: this.consortiaList,
})
}
})