|
@@ -147,26 +147,41 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row v-if="nurseList.length > 0">
|
|
|
|
|
|
+ <el-row v-if="addMemberForm.subordinate!==undefined && Object.keys(addMemberForm.subordinate).length>0">
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-form-item :label="this.$t('clerkManage.clerkList')">
|
|
<el-form-item :label="this.$t('clerkManage.clerkList')">
|
|
<div class="text item">
|
|
<div class="text item">
|
|
- <el-row>
|
|
|
|
- <el-checkbox-group v-model="newCheckList">
|
|
|
|
- <el-col v-for="(bed,_index) in nurseClerkList" :key="_index" :xs="8" :sm="8" :md="6" :lg="6" :xl="6">
|
|
|
|
- <el-checkbox :label="bed.clerk_id" @change="handleCheckboxChanged(bed)">
|
|
|
|
- <span v-if="bed.group_id && !bed.checked" style="color: #13ce66">{{ bed.clerk_name }} <span style="color: #302db4">{{ bed.group_name }}</span></span>
|
|
|
|
- <span v-else>{{ bed.clerk_name }}</span>
|
|
|
|
|
|
+
|
|
|
|
+ <fieldset style="margin-bottom: 10px" v-for="(roleName,_index) in Object.keys(addMemberForm.subordinate)" :key="_index">
|
|
|
|
+ <legend><span
|
|
|
|
+ style="margin-right: 10px">{{roleName}}</span>
|
|
|
|
+ </legend>
|
|
|
|
+ <el-row :gutter="20" type="flex" style="padding: 10px">
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-checkbox v-for="(clerk,index) in addMemberForm.subordinate[roleName]" :key="index" v-model="clerk.checked"
|
|
|
|
+ >{{ clerk.clerk_name }}<span v-if="!clerk.checked&&clerk.leader_id!==addMemberForm.clerk_id" style="color: #67C23A;margin-left: 10px;">{{ clerk.leader_name }}</span>
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
</el-col>
|
|
</el-col>
|
|
- </el-checkbox-group>
|
|
|
|
- <el-col v-for="(bed,_index) in nurseClerkList" :key="_index" :xs="8" :sm="8" :md="6" :lg="6" :xl="6">
|
|
|
|
- <!-- <el-checkbox v-model="bed.checked">-->
|
|
|
|
- <!-- <span v-if="bed.group_id && !bed.checked" style="color: #13ce66">{{ bed.clerk_name }} <span style="color: #302db4">{{ bed.group_name }}</span></span>-->
|
|
|
|
- <!-- <span v-else>{{ bed.clerk_name }}</span>-->
|
|
|
|
- <!-- </el-checkbox>-->
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
|
|
+ </el-row>
|
|
|
|
+ </fieldset>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+<!-- <el-row>-->
|
|
|
|
+<!-- <el-checkbox-group v-model="newCheckList">-->
|
|
|
|
+<!-- <el-col v-for="(bed,_index) in addMemberForm.subordinate" :key="_index" :xs="8" :sm="8" :md="6" :lg="6" :xl="6">-->
|
|
|
|
+<!-- <el-checkbox :label="bed.clerk_id" @change="handleCheckboxChanged(bed)">-->
|
|
|
|
+<!-- <span v-if="bed.group_id && !bed.checked" style="color: #13ce66">{{ bed.clerk_name }} <span style="color: #302db4">{{ bed.group_name }}</span></span>-->
|
|
|
|
+<!-- <span v-else>{{ bed.clerk_name }}</span>-->
|
|
|
|
+<!-- </el-checkbox>-->
|
|
|
|
+<!-- </el-col>-->
|
|
|
|
+<!-- </el-checkbox-group>-->
|
|
|
|
+<!-- <el-col v-for="(bed,_index) in nurseClerkList" :key="_index" :xs="8" :sm="8" :md="6" :lg="6" :xl="6">-->
|
|
|
|
+<!-- <!– <el-checkbox v-model="bed.checked">–>-->
|
|
|
|
+<!-- <!– <span v-if="bed.group_id && !bed.checked" style="color: #13ce66">{{ bed.clerk_name }} <span style="color: #302db4">{{ bed.group_name }}</span></span>–>-->
|
|
|
|
+<!-- <!– <span v-else>{{ bed.clerk_name }}</span>–>-->
|
|
|
|
+<!-- <!– </el-checkbox>–>-->
|
|
|
|
+<!-- </el-col>-->
|
|
|
|
+<!-- </el-row>-->
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
@@ -204,13 +219,14 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
// import { serverUrl } from '@/utils/domain'
|
|
// import { serverUrl } from '@/utils/domain'
|
|
-import * as clerk_API from '@/api/ncs_clerk'
|
|
|
|
|
|
+import * as API_Clerk from '@/api/ncs_clerk'
|
|
import * as RegExp from '@/utils/RegExp'
|
|
import * as RegExp from '@/utils/RegExp'
|
|
import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
|
|
import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
|
|
import ButtonCellRender from '@/components/AgGridCellRender/ButtonCellRender'
|
|
import ButtonCellRender from '@/components/AgGridCellRender/ButtonCellRender'
|
|
import AgGridImg from '@/components/AgGridImg/AgGridImg'
|
|
import AgGridImg from '@/components/AgGridImg/AgGridImg'
|
|
import ImageViewer from 'element-ui/packages/image/src/image-viewer'
|
|
import ImageViewer from 'element-ui/packages/image/src/image-viewer'
|
|
import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
|
|
import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
|
|
|
|
+import ListFilter from '@/components/AgGridCustomFilter/ListFilter'
|
|
import * as API_User from "@/api/user";
|
|
import * as API_User from "@/api/user";
|
|
import {ROLE_TYPE} from "@/utils/enum/RoleTypeEnum";
|
|
import {ROLE_TYPE} from "@/utils/enum/RoleTypeEnum";
|
|
import ButtonCellRenderList from "@/components/AgGridCellRender/ButtonCellRenderList";
|
|
import ButtonCellRenderList from "@/components/AgGridCellRender/ButtonCellRenderList";
|
|
@@ -218,7 +234,8 @@ let prevOverflow = ''
|
|
const serverUrl = domain.serverUrl
|
|
const serverUrl = domain.serverUrl
|
|
export default {
|
|
export default {
|
|
name: 'CareDoctorManager',
|
|
name: 'CareDoctorManager',
|
|
- components: { ButtonCellRenderList, ButtonCellRender, AgGridImg, ImageViewer, RadioFilter },
|
|
|
|
|
|
+ components: { ButtonCellRenderList, ButtonCellRender, AgGridImg, ImageViewer, RadioFilter,ListFilter },
|
|
|
|
+
|
|
props: {
|
|
props: {
|
|
partId: {
|
|
partId: {
|
|
type: Number,
|
|
type: Number,
|
|
@@ -310,6 +327,7 @@ export default {
|
|
{ key: this.$t('member.man'), value: 1 },
|
|
{ key: this.$t('member.man'), value: 1 },
|
|
{ key: this.$t('member.woman'), value: 0 }
|
|
{ key: this.$t('member.woman'), value: 0 }
|
|
],
|
|
],
|
|
|
|
+ roleTransfer:[],
|
|
roleId: null,
|
|
roleId: null,
|
|
roleZzId: null,
|
|
roleZzId: null,
|
|
newCheckList: [],
|
|
newCheckList: [],
|
|
@@ -331,7 +349,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.shopId = val
|
|
this.shopId = val
|
|
}
|
|
}
|
|
- this.params.fixedCondition = this.part_view ? 'nc.shop_id=' + this.shopId : '1 = 1'
|
|
|
|
|
|
+ this.params.fixedCondition = this.part_view ? 'shop_id=' + this.shopId : '1 = 1'
|
|
this.GET_MemberList()
|
|
this.GET_MemberList()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -345,11 +363,11 @@ export default {
|
|
headerCheckboxSelectionFilteredOnly: true,
|
|
headerCheckboxSelectionFilteredOnly: true,
|
|
checkboxSelection: true,
|
|
checkboxSelection: true,
|
|
sortable: false, filter: false,
|
|
sortable: false, filter: false,
|
|
- width: 50,
|
|
|
|
|
|
+ width: 100,
|
|
resizable: false,
|
|
resizable: false,
|
|
valueGetter: this.hashValueGetter
|
|
valueGetter: this.hashValueGetter
|
|
},
|
|
},
|
|
- { headerName: this.$t('member.face'), field: 'face', sortable: true, filter: false, width: 70,
|
|
|
|
|
|
+ { headerName: this.$t('member.face'), field: 'face', sortable: true, filter: false, width: 180,
|
|
cellRendererFramework: 'AgGridImg',
|
|
cellRendererFramework: 'AgGridImg',
|
|
cellRendererParams: param => {
|
|
cellRendererParams: param => {
|
|
return {
|
|
return {
|
|
@@ -358,15 +376,19 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- { headerName: this.$t('member.uname'), field: 'uname', sortable: true, filter: true, minWidth: 170 },
|
|
|
|
- { headerName: this.$t('member.nickname'), field: 'clerk_name', sortable: true, filter: true, minWidth: 120 },
|
|
|
|
- { headerName: this.$t('member.sex'), field: 'sex', sortable: true, valueFormatter: this.formatterSex, width: 100, filterFramework: 'RadioFilter',
|
|
|
|
|
|
+ { headerName: this.$t('member.uname'), field: 'uname', sortable: true, filter: true, width: 180 },
|
|
|
|
+ { headerName: this.$t('member.nickname'), field: 'clerk_name', sortable: true, filter: true, width: 180 },
|
|
|
|
+ { headerName: this.$t('member.sex'), field: 'sex', sortable: true, valueFormatter: this.formatterSex, width: 180, filterFramework: 'RadioFilter',
|
|
filterParams: {
|
|
filterParams: {
|
|
listData: this.sexTransfer
|
|
listData: this.sexTransfer
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- { headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: true, minWidth: 170 },
|
|
|
|
- { headerName: this.$t('clerkManage.role'), field: 'role_name', sortable: true, filter: false, valueFormatter: this.formatterRole, width: 120 },
|
|
|
|
|
|
+ { headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: true, width: 200 },
|
|
|
|
+ { headerName: this.$t('clerkManage.role'), field: 'role_name', sortable: true, filter: false, valueFormatter: this.formatterRole, filterFramework: 'ListFilter', flex:1,
|
|
|
|
+ filterParams: {
|
|
|
|
+ listData: this.roleTransfer
|
|
|
|
+ } },
|
|
|
|
+ { headerName: this.$t('member.leaderName'), field: 'leader_name', sortable: true, filter: true, width: 180 },
|
|
{ headerName: this.$t('action.handle'), field: 'id',
|
|
{ headerName: this.$t('action.handle'), field: 'id',
|
|
cellRendererFramework: 'ButtonCellRender',
|
|
cellRendererFramework: 'ButtonCellRender',
|
|
cellRendererParams: param => {
|
|
cellRendererParams: param => {
|
|
@@ -380,7 +402,7 @@ export default {
|
|
filter: false,
|
|
filter: false,
|
|
pinned: 'right',
|
|
pinned: 'right',
|
|
lockPinned: true,
|
|
lockPinned: true,
|
|
- width: 100,
|
|
|
|
|
|
+ width: 160,
|
|
resizable: false,
|
|
resizable: false,
|
|
sortable: false
|
|
sortable: false
|
|
},
|
|
},
|
|
@@ -432,7 +454,7 @@ export default {
|
|
// },
|
|
// },
|
|
]
|
|
]
|
|
this.defaultColDef = {
|
|
this.defaultColDef = {
|
|
- filter: 'agTextColumnFilter',
|
|
|
|
|
|
+ // filter: 'agTextColumnFilter',
|
|
sortable: true,
|
|
sortable: true,
|
|
resizable: true,
|
|
resizable: true,
|
|
comparator: this.testComparator,
|
|
comparator: this.testComparator,
|
|
@@ -445,9 +467,11 @@ export default {
|
|
}
|
|
}
|
|
this.rowSelection = 'multiple'
|
|
this.rowSelection = 'multiple'
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
|
|
+ async mounted() {
|
|
this.gridApi = this.gridOptions.api
|
|
this.gridApi = this.gridOptions.api
|
|
- this.getRoles({ page_size: 200, page_no: 1, fixedCondition: ' shop_id = -1', sort: ' role_id', dir: 'desc' })
|
|
|
|
|
|
+ this.gridApi = this.gridOptions.api
|
|
|
|
+ this.gridColumnApi = this.gridOptions.columnApi
|
|
|
|
+
|
|
if (this.partId === 0) {
|
|
if (this.partId === 0) {
|
|
this.shopId = this.$store.getters.partId
|
|
this.shopId = this.$store.getters.partId
|
|
} else {
|
|
} else {
|
|
@@ -455,6 +479,8 @@ export default {
|
|
}
|
|
}
|
|
this.params.fixedCondition = this.part_view ? 'shop_id=' + this.shopId : '1 = 1'
|
|
this.params.fixedCondition = this.part_view ? 'shop_id=' + this.shopId : '1 = 1'
|
|
this.GET_MemberList()
|
|
this.GET_MemberList()
|
|
|
|
+ this.getRoles({ page_size: 200, page_no: 1, fixedCondition: ' shop_id = -1', sort: ' role_id', dir: 'desc' })
|
|
|
|
+
|
|
},
|
|
},
|
|
activated() {
|
|
activated() {
|
|
this.GET_MemberList()
|
|
this.GET_MemberList()
|
|
@@ -468,8 +494,8 @@ export default {
|
|
GET_MemberList() {
|
|
GET_MemberList() {
|
|
this.loading = true
|
|
this.loading = true
|
|
this.gridApi.showLoadingOverlay()
|
|
this.gridApi.showLoadingOverlay()
|
|
- this.gridApi.sizeColumnsToFit()
|
|
|
|
- clerk_API.getList(this.params).then(response => {
|
|
|
|
|
|
+ // this.gridApi.sizeColumnsToFit()
|
|
|
|
+ API_Clerk.getList(this.params).then(response => {
|
|
this.loading = false
|
|
this.loading = false
|
|
const size = 0
|
|
const size = 0
|
|
// response.data.forEach((item, index) => {
|
|
// response.data.forEach((item, index) => {
|
|
@@ -504,7 +530,7 @@ export default {
|
|
cancelButtonText: this.$t('action.cancel'),
|
|
cancelButtonText: this.$t('action.cancel'),
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- clerk_API.remove(ids).then(
|
|
|
|
|
|
+ API_Clerk.remove(ids).then(
|
|
response => {
|
|
response => {
|
|
this.GET_MemberList()
|
|
this.GET_MemberList()
|
|
this.$message({
|
|
this.$message({
|
|
@@ -527,8 +553,14 @@ export default {
|
|
},
|
|
},
|
|
getRoles(param) {
|
|
getRoles(param) {
|
|
// 获取角色
|
|
// 获取角色
|
|
- clerk_API.getRoles(param).then(res => {
|
|
|
|
|
|
+ API_Clerk.getRoles(param).then(res => {
|
|
this.rolesOptions = res.data
|
|
this.rolesOptions = res.data
|
|
|
|
+ this.roleTransfer =[...res.data.map(p=>{return {'key':p.role_name,'value':p.role_name}})]
|
|
|
|
+ this.columnDefs[6].filterParams.listData=this.roleTransfer
|
|
|
|
+ console.log(this.columnDefs)
|
|
|
|
+ this.gridApi.setColumnDefs(this.columnDefs);
|
|
|
|
+ this.gridApi.redrawRows()
|
|
|
|
+ console.log(this.roleTransfer)
|
|
const nurseZz = res.data.find(item => item.role_name === '护士组长')
|
|
const nurseZz = res.data.find(item => item.role_name === '护士组长')
|
|
if (nurseZz) {
|
|
if (nurseZz) {
|
|
this.roleZzId = nurseZz.role_id
|
|
this.roleZzId = nurseZz.role_id
|
|
@@ -594,24 +626,24 @@ export default {
|
|
}
|
|
}
|
|
params.role_name = this.rolesOptions.filter( p => p.role_id === params.role_id)[0].role_name
|
|
params.role_name = this.rolesOptions.filter( p => p.role_id === params.role_id)[0].role_name
|
|
if (params.member_id) {
|
|
if (params.member_id) {
|
|
- if (this.roleZzId === params.role_id) {
|
|
|
|
- const addIds = this.newCheckList.filter(function(val) { return _this.oldCheckList.indexOf(val) === -1 })
|
|
|
|
- const delIds = this.oldCheckList.filter(function(val) { return _this.newCheckList.indexOf(val) === -1 })
|
|
|
|
- const data = {
|
|
|
|
- clerkId: params.clerk_id,
|
|
|
|
- addIds: addIds.join(','),
|
|
|
|
- delIds: delIds.join(',')
|
|
|
|
- }
|
|
|
|
- clerk_API.updateParentById(data)
|
|
|
|
- }
|
|
|
|
- clerk_API.update(params.clerk_id, params).then(response => {
|
|
|
|
|
|
+ // if (this.roleZzId === params.role_id) {
|
|
|
|
+ // const addIds = this.newCheckList.filter(function(val) { return _this.oldCheckList.indexOf(val) === -1 })
|
|
|
|
+ // const delIds = this.oldCheckList.filter(function(val) { return _this.newCheckList.indexOf(val) === -1 })
|
|
|
|
+ // const data = {
|
|
|
|
+ // clerkId: params.clerk_id,
|
|
|
|
+ // addIds: addIds.join(','),
|
|
|
|
+ // delIds: delIds.join(',')
|
|
|
|
+ // }
|
|
|
|
+ // API_Clerk.updateParentById(data)
|
|
|
|
+ // }
|
|
|
|
+ API_Clerk.update(params.clerk_id, params).then(response => {
|
|
this.dialogAddMemberVisible = false
|
|
this.dialogAddMemberVisible = false
|
|
this.imageUrl = null
|
|
this.imageUrl = null
|
|
this.GET_MemberList()
|
|
this.GET_MemberList()
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
params.shop_id = this.shopId
|
|
params.shop_id = this.shopId
|
|
- clerk_API.add(params).then(response => {
|
|
|
|
|
|
+ API_Clerk.add(params).then(response => {
|
|
this.dialogAddMemberVisible = false
|
|
this.dialogAddMemberVisible = false
|
|
this.imageUrl = null
|
|
this.imageUrl = null
|
|
this.GET_MemberList()
|
|
this.GET_MemberList()
|
|
@@ -655,7 +687,7 @@ export default {
|
|
const _this = this
|
|
const _this = this
|
|
this.newCheckList = []
|
|
this.newCheckList = []
|
|
this.oldCheckList = []
|
|
this.oldCheckList = []
|
|
- clerk_API.getNurseByRoleId(_this.roleId, this.shopId).then(r => {
|
|
|
|
|
|
+ API_Clerk.getNurseByRoleId(_this.roleId, this.shopId).then(r => {
|
|
_this.nurseList = r
|
|
_this.nurseList = r
|
|
_this.getNurseIds(id)
|
|
_this.getNurseIds(id)
|
|
// r.forEach(item => {
|
|
// r.forEach(item => {
|
|
@@ -668,7 +700,7 @@ export default {
|
|
},
|
|
},
|
|
getNurseIds(id) {
|
|
getNurseIds(id) {
|
|
const _this = this
|
|
const _this = this
|
|
- clerk_API.getNurseIdsByPartId(this.shopId).then(r => {
|
|
|
|
|
|
+ API_Clerk.getNurseIdsByPartId(this.shopId).then(r => {
|
|
r.forEach(item => {
|
|
r.forEach(item => {
|
|
_this.nurseList.forEach(t => {
|
|
_this.nurseList.forEach(t => {
|
|
if (t.clerk_id === item.nurse_id) {
|
|
if (t.clerk_id === item.nurse_id) {
|
|
@@ -808,6 +840,11 @@ export default {
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ fieldset {
|
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
|
+ border-radius: 5px;
|
|
|
|
+ }
|
|
|
|
+
|
|
.formwrap /deep/ .el-tabs__content {
|
|
.formwrap /deep/ .el-tabs__content {
|
|
overflow: visible !important;
|
|
overflow: visible !important;
|
|
}
|
|
}
|