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

排班显示

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