提交 360bdeed 编写于 作者: xiaoping.di's avatar xiaoping.di

Merge branch 'develop' into 'release-new'

Develop

See merge request !214
......@@ -288,3 +288,10 @@ export const outboundIntention = async (data) => {
method: 'post',
});
};
export const departmentAll = async () => {
return request({
url: '/diagnose/department/all',
method: 'get',
});
};
......@@ -27,7 +27,7 @@
type="date"
:clearable="false"
:disabled="formData.receptionName == ''"
placeholder="日期-请先选择医生"
placeholder="请选择日期"
@change="getNowDate"
/>
</div>
......@@ -135,122 +135,6 @@
</div>
</div>
</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>
</template>
......@@ -346,8 +230,8 @@
timeChoosetList: [],
startTime: '',
endTime: '',
todayNum: '',
maxTodayNum: '',
todayNum: 0,
maxTodayNum: 0,
};
},
watch: {
......@@ -367,17 +251,11 @@
},
},
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;
this.getDoctorList();
if (!(this.doctorList || []).some(item => { item.doctorId == this.formData.receptionId;})) {
this.refreshData();
}
},
methods: {
getChooseTimeValue(value, index) {
......@@ -436,8 +314,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 = '';
......@@ -448,7 +326,8 @@
})
.catch(function (err) {
vm.isClick = false;
vm.$message.error(err.message);
console.log(err);
// vm.$message.error(err.message);
});
},
refreshData() {
......@@ -462,8 +341,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 = [];
......@@ -494,6 +373,8 @@
this.formData.doctorMobile = selected.doctorMobile;
this.formData.doctorDepartmentId = selected.doctorDepartmentId;
this.acceptsCeilings(this.formData.receptionId);
const nowDate = dayjs(new Date()).format('YYYY-MM-DD');
this.getNowDate(nowDate);
// debugger;
// this.formData.serviceFee = this.priceFilter(selected.serviceFee)
}
......@@ -554,8 +435,8 @@
startTimeConfirm(isCancle) {
console.log('isCancle-', isCancle);
if (isCancle == 'cancel') {
this.endTimeValue = '';
this.timeRange = '';
this.startTime = '';
this.endTime = '';
}
if (isCancle == 'submit') {
if (String(this.startTimeValue).trim() === '' || !this.startTimeValue) {
......@@ -626,7 +507,7 @@
<style lang="scss">
.set-width {
width: 300px;
min-width: 230px;
}
.grey-bg {
padding: 0px 15px;
......@@ -669,15 +550,15 @@
width: 130px;
}
.open-diagnosis-doctor {
padding: 10px 40px 40px 40px;
padding: 10px 20px 40px 30px;
.choose-diagnosis-doctor {
.el-select {
margin-right: 30px;
padding-bottom: 20px;
.el-input {
width: 300px;
// width: 300px;
.el-input__inner {
width: 300px;
// width: 300px;
height: 32px;
background: #ffffff;
border-radius: 16px;
......@@ -691,7 +572,7 @@
}
.el-date-editor {
.el-input__inner {
width: 180px;
max-width: 150px;
height: 32px;
background: #ffffff;
border-radius: 16px;
......@@ -859,15 +740,15 @@
}
.work-info-botton {
.contest {
width: 200px;
min-width: 100px;
border-radius: 18px;
}
.refresh {
width: 200px;
min-width: 150px;
border-radius: 18px;
}
.el-button--default {
width: 150px;
min-width: 150px;
border-radius: 18px;
}
}
......
......@@ -143,10 +143,12 @@
chooseTimeIndex: 1000,
pickerOptionsStart: {
disabledDate: (time) => {
const month = 28 * 24 * 60 * 60 * 1000; // 限定一个日期范围,这里是28天
const now = new Date();
const day = now.getDay();
const oneDayTime = 24 * 60 * 60 * 1000;
const SundayTime = ((7 - day) * oneDayTime) + 21 * 24 * 60 * 60 * 1000;
return (
time.getTime() + 1 * 24 * 60 * 60 * 1000 < new Date() ||
time.getTime() > new Date().getTime() + month
time.getTime() + 1 * 24 * 60 * 60 * 1000 < new Date() || time.getTime() > new Date().getTime() + SundayTime
);
},
},
......@@ -177,7 +179,11 @@
this.getLeisureTime(this.chooseTime);
},
nextChangeData() {
const maxDate = dayjs(new Date()).add(27, 'day').unix();
const now = new Date();
const day = now.getDay();
const SundayTime = 7 - day;
console.log(SundayTime, 'SundayTime');
const maxDate = dayjs(new Date()).add((SundayTime + 20), 'day').unix();
if (dayjs(this.chooseTime).unix() > maxDate) {
this.$message({
message: '时间不能超过28天',
......@@ -192,12 +198,11 @@
this.getLeisureTime(this.chooseTime);
},
getChooseTimeValue(value, index) {
console.log(value, index);
this.startDate = value.startDate;
this.endDate = value.endDate;
if (value.isFull == 2) {
if (value.isFull == 0) {
return;
}
this.startDate = value.startDate;
this.endDate = value.endDate;
this.chooseTimeIndex = index;
},
confirm() {
......@@ -225,12 +230,14 @@
vm.$message.error(res.message);
}
})
.catch(function (err) {
.catch(function () {
vm.isClick = false;
vm.$message.error(err.message);
// vm.$message.error(err.message);
});
},
cancel() {
this.startTime = '';
this.endTime = '';
this.rangeTime = '';
this.model.assistantRemark = '';
this.$emit('update:diagnosisTimeVisible', false);
......
......@@ -21,7 +21,7 @@
class="required-label"
prop="triageDepartmentId"
>
<el-select
<!-- <el-select
v-model="model.triageDepartmentId"
placeholder="请选择分诊科室"
clearable
......@@ -35,7 +35,31 @@
:label="item.name"
: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 label="备注">
......@@ -70,6 +94,7 @@
<script>
import { updateDiagnosis, getDepList } from '../../utils/diagnosis';
import { departmentAll } from '@/api/diagnosis';
let vm = null;
export default {
props: {
......@@ -92,6 +117,12 @@
},
data() {
return {
// props: {
// // props定义的值根据接口返回的数据定的
// label: 'departmentId',
// value: 'departmentName',
// children: [],
// },
show: false,
title: '设置分诊科室',
confirmTxt: '确定',
......@@ -107,6 +138,9 @@
{ required: true, message: '请选择分诊科室', trigger: 'change' },
],
},
allTilst: [],
allList: {
},
};
},
watch: {
......@@ -125,8 +159,63 @@
created() {
vm = this;
this.getDepList();
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.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()
.then(function (res) {
......@@ -171,15 +260,13 @@
this.model.triageDepartmentId = '';
this.model.triageRemark = '';
this.$emit('update:doctorVisible', false);
// this.doctorVisible = false;
},
change(data) {
for (let i = 0; i < this.depList.length; i++) {
if (data == this.depList[i].id) {
this.model.triageDepartment = this.depList[i].name;
break;
}
}
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');
console.log(this.model.triageDepartment, 'model.triageDepartment');
},
},
};
......
......@@ -92,7 +92,7 @@
sortable
/>
<el-table-column
prop="createdId"
prop="modifiedId"
label="修改人ID"
width="170"
align="center"
......
......@@ -36,7 +36,7 @@
label="分诊科室"
class="t-b"
>
<el-select
<!-- <el-select
v-model="searchParam.triageDepartmentId"
placeholder="请选择科室"
style="width: 220px"
......@@ -48,7 +48,31 @@
:label="item.name"
:value="item.id"
/>
</el-select>
</el-select> -->
<el-cascader
ref="cascader"
v-model="searchParam.triageDepartmentId"
filterable
clearable
:options="allTilst"
placeholder="选择科室"
:show-all-levels="false"
@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>
</div>
<div>
......@@ -508,6 +532,7 @@
getDepartments,
diagnoseExport,
diagnoseList,
departmentAll
} from '@/api/diagnosis';
import MatchComponent from '@/components/common/match';
......@@ -632,6 +657,8 @@
userNamePhone: '',
triageDepartment: '',
departmentId: '',
allTilst: [],
allList: {}
};
},
watch: {
......@@ -649,16 +676,69 @@
},
created() {
vm = this;
this.getDep();
// this.getDep();
},
mounted() {
this.setTableHeight();
this.getOutboundNote();
this.departmentAll();
},
destroyed() {
clearInterval(this.timer);
},
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();
if (checkedNodes.length > 0) {
this.searchParam.triageDepartmentId = checkedNodes[0].value;
}else{
this.searchParam.triageDepartmentId = '';
}
console.log(this.searchParam.triageDepartmentId, 'this.searchParam.triageDepartmentId');
},
changeStartTime(time) {
this.rangeTimeData = time
? time.time
......
......@@ -117,6 +117,7 @@
}
.show-work-set {
margin-top: 100px;
padding: 10px;
}
.agment-left-con {
padding: 15px;
......@@ -124,8 +125,14 @@
background: #f2f2f2;
border-radius: 12px;
}
.maxNum-first-show {
padding: 20px 15px 5px 15px;
.show-sep-num {
color: red;
}
}
.reset-doctor-schedu {
padding: 30px 15px 5px 15px;
padding: 10px 15px 5px 15px;
text-align: center;
.copy-submit {
background: #fff;
......@@ -306,7 +313,7 @@
}
@media screen and (min-width: 1000px) and (max-width: 1300px) {
/deep/.fc-header-toolbar {
right: 6%;
right: 3%;
}
.ag-left1 {
width: 12% !important;
......@@ -332,3 +339,17 @@
word-wrap: break-word;
white-space: normal;
}
/deep/.fc-col-header-cell-cushion {
background: #fff;
border: 1px solid #0d9078;
color: #0d9078;
border-radius: 20px;
height: 30px;
line-height: 25px;
font-size: 14px;
margin: 10px 0;
text-decoration: none;
}
/deep/a:hover {
text-decoration: none;
}
......@@ -48,8 +48,8 @@
<el-input-number
v-model="maxDiaNum"
:step="1"
:min="10"
:max="1000000"
:min="0"
:max="10000000"
step-strictly
@change="getInputNumber"
/>
......@@ -100,7 +100,7 @@
},
data() {
return {
maxDiaNum: 100,
maxDiaNum: 10,
dateTime: '',
interfaceOptions: [],
innerform: [],
......@@ -129,7 +129,7 @@
],
// timeZone: 'UTC',
locale: 'zh-cn',
aspectRatio: 4.5, // 设置日历单元格宽度与高度的比例。
aspectRatio: 2.8, // 设置日历单元格宽度与高度的比例。
schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
initialView: 'resourceTimeGridDay',
resources: [],
......@@ -151,6 +151,7 @@
meridiem: 'short',
hour12: false, // 设置时间为24小时
},
expandRows: true,
},
workingTicketVisible: false, // 工作表票详情页面
scrollerHeight: 0,
......@@ -182,6 +183,10 @@
};
setPlatformUpper(params).then((res) => {
if (res.code === '000000') {
this.$message({
message: '保存成功',
type: 'success',
});
this.getPlatformUpper();
}
});
......@@ -244,7 +249,7 @@
departmentId: this.departmentId,
};
previewWork({ ...params }).then((res) => {
if (res.code === '000000') {
if (res.code === '000000' && res.data) {
this.calendarOptions.resources = (res.data.doctorList || []).map(
(item) => {
return {
......@@ -253,7 +258,7 @@
};
}
);
const dutyRosterPreList = res.data.dutyRosterPreList.map(
const dutyRosterPreList = (res.data.dutyRosterPreList || []).map(
(item, index) => {
return {
id: index,
......@@ -264,21 +269,24 @@
};
}
);
const dutyWorkList = res.data.dutyWorkList.map((item, index) => {
return {
id: index,
resourceId: item.doctorId,
end: item.endTime,
start: item.startTime,
color: '#E7F4F5',
};
});
// this.getWidth = this.$refs.agmentSelect.scrollWidth + 'px';
// this.getWidth = 3000 + 'px';
this.calendarOptions.events = [].concat(
dutyRosterPreList,
dutyWorkList
const dutyWorkList = (res.data.dutyWorkList || []).map(
(item, index) => {
return {
id: index,
resourceId: item.doctorId,
end: item.endTime,
start: item.startTime,
color: '#E7F4F5',
};
}
);
if (res.data) {
this.calendarOptions.events = [].concat(
dutyRosterPreList,
dutyWorkList
);
}
const calendarApi = this.$refs.fullCalendar.getApi();
this.getWidth = `${
(this.calendarOptions.resources.length + 1) * 150
......@@ -290,6 +298,9 @@
console.log(this.calendarOptions.resources);
console.log(this.calendarOptions.events);
} else {
this.calendarOptions.events = [];
this.calendarOptions.resources = [];
}
});
},
......
......@@ -25,6 +25,31 @@
@expand-change="handleItemChange"
@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
v-model="searchParam.createType"
class="select-first"
......@@ -213,6 +238,105 @@
tableData: [],
loading: false,
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: {},
......@@ -220,8 +344,43 @@
this.getFirstLevelLable();
this.getLevel();
this.search();
this.showListALL();
},
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数据
handleItemChange(val) {
const value = val[0];
......@@ -386,12 +545,12 @@
target.setAttribute('href', u);
target.click();
},
// goBack(flag) {
// this.ScheduleListShow = true;
// if (flag) {
// this.search();
// }
// },
// goBack(flag) {
// this.ScheduleListShow = true;
// if (flag) {
// this.search();
// }
// },
},
};
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册