From 72524446c3f1b9512906ff9fd249d23202420114 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期二, 03 九月 2024 00:06:54 +0800
Subject: [PATCH] 修改了权限和家谱图姓名
---
ruoyi-ui/src/views/doctor/index.vue | 215 ++++++++++++++++++++++++++++-------------------------
1 files changed, 114 insertions(+), 101 deletions(-)
diff --git a/ruoyi-ui/src/views/doctor/index.vue b/ruoyi-ui/src/views/doctor/index.vue
index 1be08fa..d0dbc35 100644
--- a/ruoyi-ui/src/views/doctor/index.vue
+++ b/ruoyi-ui/src/views/doctor/index.vue
@@ -132,58 +132,29 @@
</el-upload>
</el-col>
-
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-top"
- size="mini"
- :disabled="multiple"
- @click="handleShare"
-
- >鍒嗕韩</el-button>
- </el-col>
-
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-top"
- size="mini"
- @click="handleWho"
- >鍒嗕韩缁欒皝浜嗕粈涔堟暟鎹�</el-button>
- </el-col>
-
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-top"
- size="mini"
- @click="whoShare"
- >鍒嗕韩缁欐垜鐨勬暟鎹�</el-button>
- </el-col>
-
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-top"
- size="mini"
- @click="showData"
- >灞曠ず涓嬭浇鐨勫垎浜暟鎹�</el-button>
- </el-col>
-
-
-
-
-
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+ <el-dropdown placement="鍒嗕韩鐩稿叧">
+ <el-button size="mini" type="primary"
+ plain
+ icon="el-icon-top">鍒嗕韩鐩稿叧</el-button>
+ <template #dropdown>
+ <el-dropdown-menu>
+ <el-dropdown-item :disabled="multiple" icon="el-icon-top" style="height: 32px;width:240px;color: #0099ff;" @click.native="handleShare">鍒嗕韩</el-dropdown-item>
+
+ <el-dropdown-item icon="el-icon-top" @click.native="whoShare">鍒嗕韩缁欐垜鐨勬暟鎹�</el-dropdown-item>
+ <el-dropdown-item icon="el-icon-top" @click.native="handleWho">鍒嗕韩缁欒皝浜嗕粈涔堟暟鎹�</el-dropdown-item>
+ <el-dropdown-item icon="el-icon-top" @click.native="showData">灞曠ず涓嬭浇鐨勫垎浜暟鎹�</el-dropdown-item>
+ </el-dropdown-menu>
+ </template>
+ </el-dropdown>
+
+
+
+ <right-toolbar :parentValue.sync="valueFromParent" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+
</el-row>
</div>
- <el-table v-loading="loading" :data="doctorList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;">
+ <el-table v-loading="loading" border :data="doctorList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;">
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column fixed label="搴忓彿" sortable type="index" align="center" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60"/>
<el-table-column label="绫诲埆" prop="type" sortable :show-overflow-tooltip="true" width="80" align="center">
@@ -573,6 +544,15 @@
</el-table-column>
</el-table>
+ <pagination
+ v-show="total1>0"
+ :total="total1"
+ :page.sync="queryParams2.pageNo"
+ :limit.sync="queryParams2.pageSize"
+ @pagination='fenYe'
+ style="background: #FEF7FC;"
+ />
+
</el-dialog>
@@ -606,37 +586,51 @@
// shareList2: [],
userOptions:[],
user:undefined,
+ userList:[],
ifNum:undefined,
selectWho:undefined,
+ title1: "",
+ title2: "",
+ loading1: false,
+ loading2: false,
+ valueFromParent: '瀹跺涵灏忓尰鐢�',
+ // 鏌ヨ鍙傛暟1
+ queryParams1: {
+ pageNum: 1,
+ pageSize: 10,
+ },
+ queryParams2: {
+ pageNo: 1,
+ pageSize: 10,
+ },
+ ids1: [],
+ single1: true,
+ multiple1: true,
+ dateRange1: [],
+
userId: undefined,
// 閬僵灞�
disabled: false,
-
loading: true,
- loading1: false,
- loading2: false,
formData:[],
// 閫変腑鏁扮粍
ids: [],
- ids1: [],
// 闈炲崟涓鐢�
single: true,
- single1: true,
// 闈炲涓鐢�
multiple: true,
- multiple1: true,
// 鏄剧ず鎼滅储鏉′欢
showSearch: true,
// 鎬绘潯鏁�
total: 0,
+ total1: 0,
// 灏忓尰鐢熻〃鏍兼暟鎹�
doctorList: [],
typeList:[],
// 寮瑰嚭灞傛爣棰�
title: "",
- title1: "",
- title2: "",
+
// 鏄惁鏄剧ず寮瑰嚭灞�
open: false,
// 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛�
@@ -647,10 +641,11 @@
deptNodeAll: false,
// 鏃ユ湡鑼冨洿
dateRange: [],
- dateRange1: [],
+
// 鏁版嵁鑼冨洿閫夐」
fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
- '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
+ '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng',
+ '.m4a'],
fileList:[],
fileList1:[],
uploadFileList: [],
@@ -690,15 +685,7 @@
effect:undefined,
},
- // 鏌ヨ鍙傛暟1
- queryParams1: {
- pageNum: 1,
- pageSize: 10,
- identity:undefined,
- nickName:undefined,
- sex:undefined,
- birth:undefined,
- },
+
// searchVal:"",
// 琛ㄥ崟鍙傛暟
@@ -761,12 +748,26 @@
this.getList();
this.getTypeOptions();
this.getInfo();
+
this.getList1();
},
methods: {
+ // 鍒嗛〉
+ fenYe(){
+ // @pagination='ifNum === 1 ? selectValue : (ifNum === 2 ? whoShare : showData)'
+ if(this.ifNum === 1){
+ this.selectValue(this.selectWho)
+ }else if(this.ifNum === 2){
+ this.whoShare()
+ }else{
+ this.showData()
+ }
+ },
// 鍏抽棴寮圭獥鍚�
handleClose(){
this.user = ''
+ this.queryParams2.pageNo = 1
+ this.total1 = 0
},
handleClose2(){
this.$refs.table1.clearSelection()
@@ -788,8 +789,9 @@
Message({ message: "鏀跺洖鎴愬姛", type: 'success' })
const list2 = {"shareIds": [this.selectWho]}
- shareToWho(list2).then(response => {
- this.shareList1 = response.data
+ shareToWho(list2,this.queryParams2).then(response => {
+ this.shareList1 = response.data.data
+ this.total1 = response.data.total;
})
})
},
@@ -799,9 +801,10 @@
this.ifNum = 3
this.open2 = true
this.title2 = "涓嬭浇鐨勫垎浜暟鎹�";
- showShareData().then(response => {
- this.shareList1 = response
- // console.log(this.shareList1,'showShareDatashowShareData')
+ showShareData(this.queryParams2).then(response => {
+ this.shareList1 = response.data.data
+ this.total1 = response.data.total;
+ // console.log(response,'灞曠ず涓嬭浇鐨勫垎浜暟鎹睍绀轰笅杞界殑鍒嗕韩鏁版嵁')
})
},
// 灞曠ず鍒嗕韩缁欐垜鐨勬暟鎹�
@@ -810,12 +813,16 @@
this.ifNum = 2
this.open2 = true
this.title2 = "鍒嗕韩缁欐垜鐨勬暟鎹�";
- getWhoShare().then(response => {
- const data = response.data
+ // const list = {"shareId": this.userList}
+ // const list = {"shareId": 111}
+ getWhoShare(this.queryParams2).then(response => {
+ const data = response.data.data
+ this.total1 = response.data.total
+ console.log(response,'灞曠ず鍒嗕韩缁欐垜鐨勬暟鎹睍绀哄垎浜粰鎴戠殑鏁版嵁s')
for(let i in data){
+ console.log(i,'灞曠ず鍒嗕韩缁欐垜鐨勬暟鎹睍绀哄垎浜粰鎴戠殑鏁版嵁')
this.shareList1.push(data[i])
}
-
})
},
@@ -823,14 +830,19 @@
selectValue(value){
this.selectWho = value
this.shareList1 = []
- const list = {"shareIds": [value]}
- shareToWho(list).then(response => {
- this.loading2 = true;
- this.shareList1 = response.data
- this.loading2 = false;
- console.log(this.shareList1,'鍒嗕韩缁欒皝浜嗕粈涔堟暟鎹垎浜粰璋佷簡浠�涔堟暟鎹�')
+ const list = {"shareIds": [this.selectWho]}
+ shareToWho(list,this.queryParams2).then(response => {
+ // this.loading2 = true;
+ response.data.data.forEach(res=>{
+ if(res){
+ this.shareList1.push(res)
+ }
+ })
+ // this.shareList1 = response.data.data
+ this.total1 = response.data.total;
+ // this.loading2 = false;
+ console.log(response.data,'鍒嗕韩缁欒皝浜嗕粈涔堟暟鎹垎浜粰璋佷簡浠�涔堟暟鎹�')
})
- // console.log(value)
},
handleWho(){
this.ifNum = 1
@@ -841,16 +853,15 @@
/** 鍒嗕韩鎿嶄綔 */
handleShare(row) {
- // this.getList1();
- this.id1 = row.id
+ if(row.id){
+ this.id1 = [row.id]
+ }
this.open1 = true;
this.title1 = "鍒嗕韩";
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange1(selection) {
this.ids1 = selection.map(item => item.userId)
- // console.log(selection)
- // console.log(this.ids1,'ids1ids1ids1ids1')
this.single1 = selection.length!=1
this.multiple1 = !selection.length
},
@@ -862,15 +873,21 @@
// this.single1 = selection.length!=1
// this.multiple1 = !selection.length
},
+ getRowId1(row)
+ {
+ return row.id
+ },
+ getRowId2(row)
+ {
+ return row.id
+ },
getList1() {
this.loading1 = true;
this.queryParams1.happenStartTime = this.dateRange1.length > 0 && this.dateRange1[0]
this.queryParams1.happenEndTime = this.dateRange1.length > 0 && this.dateRange1[1]
+ this.queryParams.clanId = this.$store.state.user.clanId
listUserAll(this.queryParams1).then(response => {
this.listRoot = response.data.data;
- // console.log(this.listRoot,'listrootlistroot')
- // this.total1 = response.data.total;
-
const kon = {}
this.listRoot.forEach(element => {
kon[element['nickName']] = element['userId']
@@ -878,9 +895,10 @@
for(let i in kon){
this.userOptions.push({label: i,value: kon[i]})
}
- // console.log(this.userOptions,'userListuserListuserListuserListuserList')
-
-
+ for(let i in this.userOptions){
+ this.userList.push(this.userOptions[i].value)
+ }
+ console.log(this.userList,'userListuserListuserList')
this.loading1 = false;
}
);
@@ -897,9 +915,11 @@
this.getList();
this.$modal.msgSuccess("鍒嗕韩鎴愬姛");
+ this.id1 = undefined
this.open1 = false;
}).catch(() => {});
},
+ // ------------------------------------------------------------------
getInfo(){
console.log('-----------------')
@@ -1022,14 +1042,7 @@
{
return row.id
},
- getRowId1(row)
- {
- return row.id
- },
- getRowId2(row)
- {
- return row.id
- },
+
// 鍙栨秷鎸夐挳锛堟暟鎹潈闄愶級
cancelDataScope() {
this.openDataScope = false;
--
Gitblit v1.9.1