提交 80faa72b 编写于 作者: qian.jie's avatar qian.jie

Merge branch 'feature/jq_1' into 'develop'

Feature/jq 1

See merge request !211
...@@ -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',
});
};
...@@ -135,122 +135,6 @@ ...@@ -135,122 +135,6 @@
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
title="问诊开始时间"
:visible.sync="diagnosisStartTimeDialog"
>
<div class="startTime-wrap">
<div class="line-wrap">
<div>
<span>问诊开始时间:</span>
<div class="date-wrap">
<el-date-picker
v-model="startTimeValue"
popper-class="scale-datepicker"
size="large"
type="datetime"
placeholder="选择日期时间"
@change="startTimeChange"
/>
</div>
</div>
<div class="mt20">
<span>问诊结束时间:</span>
<div class="date-wrap">
&nbsp;{{ dayFormatWithoutSecond(endTimeValue) }}
</div>
</div>
</div>
<div class="time-wrap">
<span>问诊时长:</span>
<div class="time-range">
<el-radio-group
v-model="timeRange"
@change="timeRangeChange"
>
<div>
<el-radio
border
size="large"
:label="10"
>
10分钟
</el-radio>
</div>
<div class="mt20">
<el-radio
border
size="medium"
:label="15"
>
15分钟
</el-radio>
</div>
<div class="mt20">
<el-radio
border
size="medium"
:label="20"
>
20分钟
</el-radio>
</div>
<div class="mt20">
<el-radio
border
size="medium"
:label="30"
>
30分钟
</el-radio>
</div>
<div class="mt20">
<el-radio
border
size="medium"
:label="1234"
>
自定义时间
</el-radio>
</div>
</el-radio-group>
<div v-show="timeRange == 1234">
<el-input-number
v-model="selfTimeRange"
class="selfTime-input"
type="number"
controls-position="right"
:min="0"
:step="1"
:precision="0"
/>
<el-button
type="primary"
size="small"
@click="selfTimeRangeChange"
>
确定
</el-button>
</div>
</div>
</div>
</div>
<div
class="startTime-footer"
style="text-align: center"
>
<el-button @click="startTimeConfirm('cancel')">
取 消
</el-button>
<el-button
type="primary"
:disabled="isClick"
@click="startTimeConfirm('submit')"
>
确定
</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -346,8 +230,8 @@ ...@@ -346,8 +230,8 @@
timeChoosetList: [], timeChoosetList: [],
startTime: '', startTime: '',
endTime: '', endTime: '',
todayNum: '', todayNum: 0,
maxTodayNum: '', maxTodayNum: 0,
}; };
}, },
watch: { watch: {
...@@ -367,23 +251,14 @@ ...@@ -367,23 +251,14 @@
}, },
}, },
created() { created() {
// this.startTimeValue = this.rangeTimeData;
console.log('``````', this.formData);
// if (this.rangeTimeData) {
// this.timeRange = Number(20);
// this.endTimeValue = dayjs(this.rangeTimeData)
// .add(this.timeRange, 'minute')
// .format('YYYY-MM-DD HH:mm:ss');
// }
console.log('``````', this.rangeTimeData, this.endTimeValue);
vm = this; vm = this;
this.getDoctorList(); this.getDoctorList();
if (!(this.doctorList || []).some(item => { item.doctorId == this.formData.receptionId;})) {
this.refreshData();
}
}, },
methods: { methods: {
getChooseTimeValue(value, index) { getChooseTimeValue(value, index) {
// if (value.isFull == 0) {
// return;
// }
this.chooseTimeIndex = index; this.chooseTimeIndex = index;
this.startTime = value.startDate; this.startTime = value.startDate;
this.endTime = value.endDate; this.endTime = value.endDate;
...@@ -439,8 +314,8 @@ ...@@ -439,8 +314,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 = '';
...@@ -451,7 +326,8 @@ ...@@ -451,7 +326,8 @@
}) })
.catch(function (err) { .catch(function (err) {
vm.isClick = false; vm.isClick = false;
vm.$message.error(err.message); console.log(err);
// vm.$message.error(err.message);
}); });
}, },
refreshData() { refreshData() {
...@@ -465,8 +341,8 @@ ...@@ -465,8 +341,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 = [];
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
class="required-label" class="required-label"
prop="triageDepartmentId" prop="triageDepartmentId"
> >
<el-select <!-- <el-select
v-model="model.triageDepartmentId" v-model="model.triageDepartmentId"
placeholder="请选择分诊科室" placeholder="请选择分诊科室"
clearable clearable
...@@ -35,7 +35,31 @@ ...@@ -35,7 +35,31 @@
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
/> />
</el-select> </el-select> -->
<el-cascader
ref="cascader"
v-model="model.triageDepartmentId"
filterable
clearable
:options="allTilst"
placeholder="选择科室"
:show-all-levels="false"
@change="change"
>
<template slot-scope="{ data }">
<span :style="{ fontSize: '15px', color: '#606266' }">{{
data.label
}}</span>
<span
:style="{
fontSize: '10px',
color: '#606266',
marginLeft: '10px',
opacity: '0.7',
}"
>{{ data.text }}</span>
</template>
</el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
...@@ -70,6 +94,7 @@ ...@@ -70,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: {
...@@ -92,6 +117,12 @@ ...@@ -92,6 +117,12 @@
}, },
data() { data() {
return { return {
// props: {
// // props定义的值根据接口返回的数据定的
// label: 'departmentId',
// value: 'departmentName',
// children: [],
// },
show: false, show: false,
title: '设置分诊科室', title: '设置分诊科室',
confirmTxt: '确定', confirmTxt: '确定',
...@@ -107,6 +138,9 @@ ...@@ -107,6 +138,9 @@
{ required: true, message: '请选择分诊科室', trigger: 'change' }, { required: true, message: '请选择分诊科室', trigger: 'change' },
], ],
}, },
allTilst: [],
allList: {
},
}; };
}, },
watch: { watch: {
...@@ -125,8 +159,63 @@ ...@@ -125,8 +159,63 @@
created() { created() {
vm = this; vm = this;
this.getDepList(); this.getDepList();
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() {
const arr = [];
const { departmentMapList, parentDepartmentList } = this.allList;
parentDepartmentList.map((item) => {
const obj = {
label: item.departmentName,
value: item.departmentId,
children: [],
};
departmentMapList.map((info) => {
if (info.parentDepartmentId === obj.value) {
const children = [];
info.diagnoseDepartmentRespList.map((detail) => {
const secondObj = {
label: detail.departmentName,
value: detail.departmentId,
text: '',
};
let secondChildren = '';
(detail.departmentDeseaseRespList || []).map((res) => {
secondChildren += res.deseaseName + ' ';
});
secondObj.text = `(${secondChildren})`;
children.push(secondObj);
});
obj.children = children;
}
});
arr.push(obj);
});
console.log(arr);
this.allTilst = arr;
},
getDepList() { getDepList() {
getDepList() getDepList()
.then(function (res) { .then(function (res) {
...@@ -171,15 +260,13 @@ ...@@ -171,15 +260,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() {
for (let i = 0; i < this.depList.length; i++) { const checkedNodes = this.$refs['cascader'].getCheckedNodes();
if (data == this.depList[i].id) { this.model.triageDepartmentId = checkedNodes[0].value;
this.model.triageDepartment = this.depList[i].name; this.model.triageDepartment = checkedNodes[0].label;
break; console.log(this.model.triageDepartmentId, 'model.triageDepartmentId');
} console.log(this.model.triageDepartment, 'model.triageDepartment');
}
}, },
}, },
}; };
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
label="分诊科室" label="分诊科室"
class="t-b" class="t-b"
> >
<el-select <!-- <el-select
v-model="searchParam.triageDepartmentId" v-model="searchParam.triageDepartmentId"
placeholder="请选择科室" placeholder="请选择科室"
style="width: 220px" style="width: 220px"
...@@ -48,7 +48,32 @@ ...@@ -48,7 +48,32 @@
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
/> />
</el-select> </el-select> -->
<el-cascader
ref="cascader"
v-model="searchParam.triageDepartmentId"
filterable
clearable
:options="allTilst"
placeholder="选择科室"
:show-all-levels="false"
:style="{width:'110%'}"
@change="changeDepart"
>
<template slot-scope="{ data }">
<span :style="{ fontSize: '15px', color: '#606266' }">{{
data.label
}}</span>
<span
:style="{
fontSize: '10px',
color: '#606266',
marginLeft: '10px',
opacity: '0.7',
}"
>{{ data.text }}</span>
</template>
</el-cascader>
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
...@@ -508,6 +533,7 @@ ...@@ -508,6 +533,7 @@
getDepartments, getDepartments,
diagnoseExport, diagnoseExport,
diagnoseList, diagnoseList,
departmentAll
} from '@/api/diagnosis'; } from '@/api/diagnosis';
import MatchComponent from '@/components/common/match'; import MatchComponent from '@/components/common/match';
...@@ -632,6 +658,8 @@ ...@@ -632,6 +658,8 @@
userNamePhone: '', userNamePhone: '',
triageDepartment: '', triageDepartment: '',
departmentId: '', departmentId: '',
allTilst: [],
allList: {}
}; };
}, },
watch: { watch: {
...@@ -649,16 +677,65 @@ ...@@ -649,16 +677,65 @@
}, },
created() { created() {
vm = this; vm = this;
this.getDep(); // this.getDep();
}, },
mounted() { mounted() {
this.setTableHeight(); this.setTableHeight();
this.getOutboundNote(); this.getOutboundNote();
this.departmentAll();
}, },
destroyed() { destroyed() {
clearInterval(this.timer); clearInterval(this.timer);
}, },
methods: { methods: {
departmentAll() {
departmentAll().then((res) => {
if (res.code == '000000') {
console.log(res, 'res111');
this.allList = res.data || {};
this.showListALL();
}
});
},
showListALL() {
const arr = [];
const { departmentMapList, parentDepartmentList } = this.allList;
parentDepartmentList.map((item) => {
const obj = {
label: item.departmentName,
value: item.departmentId,
children: [],
};
departmentMapList.map((info) => {
if (info.parentDepartmentId === obj.value) {
const children = [];
info.diagnoseDepartmentRespList.map((detail) => {
const secondObj = {
label: detail.departmentName,
value: detail.departmentId,
text: '',
};
let secondChildren = '';
(detail.departmentDeseaseRespList || []).map((res) => {
secondChildren += res.deseaseName + ' ';
});
secondObj.text = `(${secondChildren})`;
children.push(secondObj);
});
obj.children = children;
}
});
arr.push(obj);
});
console.log(arr);
this.allTilst = arr;
},
changeDepart() {
const checkedNodes = this.$refs['cascader'].getCheckedNodes();
this.searchParam.triageDepartmentId = checkedNodes[0].value;
console.log(this.searchParam.triageDepartmentId, 'this.searchParam.triageDepartmentId');
},
changeStartTime(time) { changeStartTime(time) {
this.rangeTimeData = time this.rangeTimeData = time
? time.time ? time.time
......
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
departmentId: this.departmentId, departmentId: this.departmentId,
}; };
previewWork({ ...params }).then((res) => { previewWork({ ...params }).then((res) => {
if (res.code === '000000') { if (res.code === '000000' && res.data) {
this.calendarOptions.resources = (res.data.doctorList || []).map( this.calendarOptions.resources = (res.data.doctorList || []).map(
(item) => { (item) => {
return { return {
...@@ -298,6 +298,9 @@ ...@@ -298,6 +298,9 @@
console.log(this.calendarOptions.resources); console.log(this.calendarOptions.resources);
console.log(this.calendarOptions.events); console.log(this.calendarOptions.events);
} else {
this.calendarOptions.events = [];
this.calendarOptions.resources = [];
} }
}); });
}, },
......
...@@ -25,6 +25,31 @@ ...@@ -25,6 +25,31 @@
@expand-change="handleItemChange" @expand-change="handleItemChange"
@change="selectApi($event, innerform)" @change="selectApi($event, innerform)"
/> />
<el-cascader
v-model="innerform"
class="serviceSchedule-cascader"
filterable
clearable
:options="allTilst"
placeholder="选择科室"
:show-all-levels="false"
@expand-change="handleItemChange"
@change="selectApi($event, innerform)"
>
<template slot-scope="{ data }">
<span :style="{ fontSize: '15px', color: '#606266' }">{{
data.label
}}</span>
<span
:style="{
fontSize: '10px',
color: '#00BDA5',
marginLeft: '10px',
opacity: '0.7',
}"
>{{ data.text }}</span>
</template>
</el-cascader>
<el-select <el-select
v-model="searchParam.createType" v-model="searchParam.createType"
class="select-first" class="select-first"
...@@ -213,6 +238,105 @@ ...@@ -213,6 +238,105 @@
tableData: [], tableData: [],
loading: false, loading: false,
newCreateList: [], newCreateList: [],
allTilst: [],
allList: {
parentDepartmentList: [
{
no: 11,
value: '妇产科',
},
{
no: 27,
value: '口腔科',
},
],
departmentMapList: [
{
diagnoseDepartmentRespList: [
{
departmentDeseaseRespList: [
{
deseaseId: 1001,
deseaseName: '高血压',
},
{
deseaseId: 1002,
deseaseName: '高血脂',
},
{
deseaseId: 1002,
deseaseName: '高血糖',
},
],
departmentId: 4,
departmentName: '妇科',
parentdepartmentId: 11,
},
{
departmentDeseaseRespList: [
{
deseaseId: 1003,
deseaseName: '这是一个妇科的描述1',
},
],
departmentId: 56,
departmentName: '妇产科',
parentdepartmentId: 11,
},
{
departmentDeseaseRespList: [
{
deseaseId: 1002,
deseaseName: '这是一个妇科的描述2',
},
],
departmentId: 172,
departmentName: '产前检查科',
parentdepartmentId: 11,
},
],
parentDepartmentId: 11,
},
{
diagnoseDepartmentRespList: [
{
departmentDeseaseRespList: [
{
deseaseId: 1064,
deseaseName: '口腔科描述3',
},
],
departmentId: 64,
departmentName: '口腔科',
parentdepartmentId: 27,
},
{
departmentDeseaseRespList: [
{
deseaseId: 1065,
deseaseName: '口腔科描述2',
},
],
departmentId: 64,
departmentName: '颌面外科',
parentdepartmentId: 27,
},
{
departmentDeseaseRespList: [
{
deseaseId: 1066,
deseaseName: '口腔科描述1',
},
],
departmentId: 64,
departmentName: '牙周科',
parentdepartmentId: 27,
},
],
parentDepartmentId: 27,
},
],
},
}; };
}, },
watch: {}, watch: {},
...@@ -220,8 +344,43 @@ ...@@ -220,8 +344,43 @@
this.getFirstLevelLable(); this.getFirstLevelLable();
this.getLevel(); this.getLevel();
this.search(); this.search();
this.showListALL();
}, },
methods: { methods: {
showListALL() {
const arr = [];
const { departmentMapList, parentDepartmentList } = this.allList;
parentDepartmentList.map((item) => {
const obj = {
label: item.value,
value: item.no,
children: [],
};
departmentMapList.map((info) => {
if (info.parentDepartmentId === obj.value) {
const children = [];
info.diagnoseDepartmentRespList.map((detail) => {
const secondObj = {
label: detail.departmentName,
value: detail.departmentId,
text: '',
};
let secondChildren = '';
detail.departmentDeseaseRespList.map((res) => {
secondChildren += res.deseaseName + ' ';
});
secondObj.text = `(${secondChildren})`;
children.push(secondObj);
});
obj.children = children;
}
});
arr.push(obj);
});
console.log(arr);
this.allTilst = arr;
},
// 通过监听expand-change事件(当展开节点发生变化时触发)获取第二层数据,组装interfaceOptions数据 // 通过监听expand-change事件(当展开节点发生变化时触发)获取第二层数据,组装interfaceOptions数据
handleItemChange(val) { handleItemChange(val) {
const value = val[0]; const value = val[0];
...@@ -386,12 +545,12 @@ ...@@ -386,12 +545,12 @@
target.setAttribute('href', u); target.setAttribute('href', u);
target.click(); target.click();
}, },
// goBack(flag) { // goBack(flag) {
// this.ScheduleListShow = true; // this.ScheduleListShow = true;
// if (flag) { // if (flag) {
// this.search(); // this.search();
// } // }
// }, // },
}, },
}; };
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册