提交 98248e4c 编写于 作者: qian.jie's avatar qian.jie

排班显示

上级 f7e85bc0
...@@ -288,3 +288,10 @@ export const outboundIntention = async (data) => { ...@@ -288,3 +288,10 @@ export const outboundIntention = async (data) => {
method: 'post', method: 'post',
}); });
}; };
export const departmentAll = async () => {
return request({
url: '/diagnose/department/all',
method: 'get',
});
};
...@@ -439,8 +439,8 @@ ...@@ -439,8 +439,8 @@
if (res.code == '000000') { if (res.code == '000000') {
vm.cancel(); vm.cancel();
vm.$emit('search'); vm.$emit('search');
this.todayNum = ''; this.todayNum = 0;
this.maxTodayNum = ''; this.maxTodayNum = 0;
this.rateValue = ''; this.rateValue = '';
this.chooseTime = ''; this.chooseTime = '';
this.startTime = ''; this.startTime = '';
...@@ -465,8 +465,8 @@ ...@@ -465,8 +465,8 @@
// this.startTimeValue = this.rangeTimeData; // this.startTimeValue = this.rangeTimeData;
// this.endTimeValue = ''; // this.endTimeValue = '';
// this.timeRange = Number(20); // this.timeRange = Number(20);
this.todayNum = ''; this.todayNum = 0;
this.maxTodayNum = ''; this.maxTodayNum = 0;
this.rateValue = ''; this.rateValue = '';
this.chooseTime = ''; this.chooseTime = '';
this.timeChoosetList = []; this.timeChoosetList = [];
...@@ -509,8 +509,8 @@ ...@@ -509,8 +509,8 @@
}; };
acceptsCeiling(params).then((res) => { acceptsCeiling(params).then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
this.todayNum = res.data.dayAcceptsCount || ''; this.todayNum = res.data.dayAcceptsCount || 0;
this.maxTodayNum = res.data.dayAcceptsCeiling || ''; this.maxTodayNum = res.data.dayAcceptsCeiling || 0;
this.rateValue = res.data.level; this.rateValue = res.data.level;
} }
}); });
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
/> />
</el-select> --> </el-select> -->
<el-cascader <el-cascader
ref="cascader"
v-model="model.triageDepartmentId" v-model="model.triageDepartmentId"
filterable filterable
clearable clearable
...@@ -93,6 +94,7 @@ ...@@ -93,6 +94,7 @@
<script> <script>
import { updateDiagnosis, getDepList } from '../../utils/diagnosis'; import { updateDiagnosis, getDepList } from '../../utils/diagnosis';
import { departmentAll } from '@/api/diagnosis';
let vm = null; let vm = null;
export default { export default {
props: { props: {
...@@ -115,6 +117,12 @@ ...@@ -115,6 +117,12 @@
}, },
data() { data() {
return { return {
// props: {
// // props定义的值根据接口返回的数据定的
// label: 'departmentId',
// value: 'departmentName',
// children: [],
// },
show: false, show: false,
title: '设置分诊科室', title: '设置分诊科室',
confirmTxt: '确定', confirmTxt: '确定',
...@@ -198,7 +206,7 @@ ...@@ -198,7 +206,7 @@
deseaseName: '口腔科描述3', deseaseName: '口腔科描述3',
}, },
], ],
departmentId: 64, departmentId: 65,
departmentName: '口腔科', departmentName: '口腔科',
parentdepartmentId: 27, parentdepartmentId: 27,
}, },
...@@ -220,7 +228,7 @@ ...@@ -220,7 +228,7 @@
deseaseName: '口腔科描述1', deseaseName: '口腔科描述1',
}, },
], ],
departmentId: 64, departmentId: 63,
departmentName: '牙周科', departmentName: '牙周科',
parentdepartmentId: 27, parentdepartmentId: 27,
}, },
...@@ -229,11 +237,6 @@ ...@@ -229,11 +237,6 @@
}, },
], ],
}, },
props: {
// props定义的值根据接口返回的数据定的
label: 'value',
value: 'no',
},
}; };
}, },
watch: { watch: {
...@@ -252,16 +255,36 @@ ...@@ -252,16 +255,36 @@
created() { created() {
vm = this; vm = this;
this.getDepList(); this.getDepList();
this.showListALL(); this.departmentAll();
}, },
methods: { methods: {
departmentAll() {
departmentAll().then((res) => {
if (res.code == '000000') {
console.log(res, 'res111');
this.allList = res.data || {};
this.showListALL();
}
});
},
getCascaderObj(val, opt) {
return val.map(function (value) {
for (var itm of opt) {
if (itm.value == value) {
opt = itm.children;
return itm;
}
}
return null;
});
},
showListALL() { showListALL() {
const arr = []; const arr = [];
const { departmentMapList, parentDepartmentList } = this.allList; const { departmentMapList, parentDepartmentList } = this.allList;
parentDepartmentList.map((item) => { parentDepartmentList.map((item) => {
const obj = { const obj = {
label: item.value, label: item.departmentName,
value: item.no, value: item.departmentId,
children: [], children: [],
}; };
departmentMapList.map((info) => { departmentMapList.map((info) => {
...@@ -274,7 +297,7 @@ ...@@ -274,7 +297,7 @@
text: '', text: '',
}; };
let secondChildren = ''; let secondChildren = '';
detail.departmentDeseaseRespList.map((res) => { (detail.departmentDeseaseRespList || []).map((res) => {
secondChildren += res.deseaseName + ' '; secondChildren += res.deseaseName + ' ';
}); });
secondObj.text = `(${secondChildren})`; secondObj.text = `(${secondChildren})`;
...@@ -333,17 +356,13 @@ ...@@ -333,17 +356,13 @@
this.model.triageDepartmentId = ''; this.model.triageDepartmentId = '';
this.model.triageRemark = ''; this.model.triageRemark = '';
this.$emit('update:doctorVisible', false); this.$emit('update:doctorVisible', false);
// this.doctorVisible = false;
}, },
change(data) { change() {
console.log(data, 'data'); const checkedNodes = this.$refs['cascader'].getCheckedNodes();
this.model.triageDepartmentId = checkedNodes[0].value;
this.model.triageDepartment = checkedNodes[0].label;
console.log(this.model.triageDepartmentId, 'model.triageDepartmentId'); console.log(this.model.triageDepartmentId, 'model.triageDepartmentId');
for (let i = 0; i < this.depList.length; i++) { console.log(this.model.triageDepartment, 'model.triageDepartment');
if (data == this.depList[i].id) {
this.model.triageDepartment = this.depList[i].name;
break;
}
}
}, },
}, },
}; };
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</div> </div>
<div> <div>
<el-form-item <el-form-item
label="分诊科室" label="分诊科室11"
class="t-b" class="t-b"
> >
<el-select <el-select
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册