提交 c7c25508 编写于 作者: zhongyao.qiao's avatar zhongyao.qiao

feat 问诊详情增加医生省市区

上级 ba1a558f
......@@ -401,6 +401,13 @@
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="助诊医生地区">
<el-input
:value="`${formData.userProvince}${formData.userCity}${formData.userCounty}${formData.userTown}`"
class="set-width"
disabled
/>
</el-form-item>
<el-form-item label="助诊医生所在机构">
<el-input
v-model="formData.userHospital"
......@@ -484,6 +491,13 @@
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="接诊医生地区">
<el-input
:value="`${formData.doctorProvince}${formData.doctorCity}${formData.doctorCounty}${formData.doctorTown}`"
class="set-width"
disabled
/>
</el-form-item>
<el-form-item label="接诊医生所在机构">
<el-input
v-model="formData.doctorHospital"
......@@ -963,254 +977,254 @@
</div>
</template>
<script>
import {
diagnoseUpdate,
getAdminDiagnose,
getDiagnoseLog,
getDoctorList,
import {
diagnoseUpdate,
getAdminDiagnose,
getDiagnoseLog,
getDoctorList,
} from '@/api/diagnosis';
import uploadImg from '@/components/editor/upload-img';
import uploadMusic from '@/components/editor/upload-music';
import {
CAR_LIST,
D_S_LIST,
FOLLW_LIST,
PAY_LIST,
RELATION_LIST,
SEX_LIST,
SOURCE_LIST,
STATUS_LIST,
TYPE_LIST,
CAR_LIST,
D_S_LIST,
FOLLW_LIST,
PAY_LIST,
RELATION_LIST,
SEX_LIST,
SOURCE_LIST,
STATUS_LIST,
TYPE_LIST,
} from '@/utils/constants';
import { getBirth } from '@/utils/index';
const PAY_TYPE = {
1: '自动付款',
2: '手动付款',
};
export default {
components: {
uploadImg,
uploadMusic,
},
data() {
return {
asd: 123,
diagnoseLogId: '',
birthDisable: false,
noable: false,
editorType: 1, // //1为编辑状态,2为查看
loading: true,
btnDisable: false,
oldDiagnoseAdvice: '', // 旧的诊断建议
formData: {
// 预约单信息
diagnoseType: '',
appointSource: '',
createdTime: '',
operateTime: '',
doneTime: '',
payType: '',
crrsName: '',
// 预约信息
status: 1,
operateUserName: '',
appointBeginTime: '',
appointEndTime: '',
triageOperatorName: '', // 分诊人员姓名
receptionOperatorName: '', // 接诊人员姓名
assistantBeginTime: '', // 助诊意向开始时间
assistantEndTime: '', // 助诊意向结束时间
assistantRemark: '', // 助诊备注
triageDepartmentId: '', // 分诊科室id,
triageDepartment: '', // 分诊科室名
triageRemark: '', // 分诊备注
receptionBeginTime: '', // 接诊意向开始时间
receptionEndTime: '', // 接诊意向结束时间
// 患者信息
patientName: '',
idCardType: 1,
idCard: '',
birthdayStr: '',
birthday: '',
sex: 1,
patientMobilePhone: '',
// 助诊信息
userName: '',
userTitle: '',
userHospital: '',
userDepartment: '',
userMobile: '',
patientRelation: '',
// crrsName: '', // 招募人
// 医生信息
doctorName: '',
doctorTitle: '',
doctorHospital: '',
doctorDepartment: '',
doctorMobile: '',
doctorSource: '',
serviceFee: '',
outsideDoctor: '', // 站外医生姓名
// 问诊信息
diagnoseStage: '',
determineFlag: '',
diagnoseDisease: '',
illnessDetail: '',
illnessImageUrls: [],
diagnoseAdvice: '',
illnessAudioUrls: [],
followFlag: 1,
drugFollow: '',
drugFollowStatus: '',
checkFollow: '',
checkFollowStatus: '',
otherFollowStatus: '',
otherFollow: '',
remark: '',
maritalStatus: 2,
createType: 1, // //创建方式1.系统创建 2.手动创建
// 备注信息
patInFlag: '', // 患者是否在场 1是 2否
valueFlag: '', // 是否有价值 1是 2否
worthlessReason: '', // 无价值原因
otherRemark: '', // 其他备注
// 结算信息
receptionServiceFee: 0, // 接诊医生服务费单位分
receptionServiceFeeStr: '', // 接诊医生服务费展示字段
receptionPayType: '', // 接诊医生付款方式1自动打款2手动打款
receptionSettleTime: '', // 接诊医生结算时间
assistantServiceFee: 0, // 助诊医生服务费单位分
assistantServiceFeeStr: '', // 助诊医生服务费展示字段
assistantPayType: '', // 助诊医生付款方式1自动打款2手动打款
assistantSettleTime: '', // 助诊医生结算时间
// 录像信息
vodList: {
name: '',
url: '',
},
const PAY_TYPE = {
1: '自动付款',
2: '手动付款',
};
export default {
components: {
uploadImg,
uploadMusic,
},
data() {
return {
asd: 123,
diagnoseLogId: '',
birthDisable: false,
noable: false,
editorType: 1, // //1为编辑状态,2为查看
loading: true,
btnDisable: false,
oldDiagnoseAdvice: '', // 旧的诊断建议
formData: {
// 预约单信息
diagnoseType: '',
appointSource: '',
createdTime: '',
operateTime: '',
doneTime: '',
payType: '',
crrsName: '',
// 预约信息
status: 1,
operateUserName: '',
appointBeginTime: '',
appointEndTime: '',
triageOperatorName: '', // 分诊人员姓名
receptionOperatorName: '', // 接诊人员姓名
assistantBeginTime: '', // 助诊意向开始时间
assistantEndTime: '', // 助诊意向结束时间
assistantRemark: '', // 助诊备注
triageDepartmentId: '', // 分诊科室id,
triageDepartment: '', // 分诊科室名
triageRemark: '', // 分诊备注
receptionBeginTime: '', // 接诊意向开始时间
receptionEndTime: '', // 接诊意向结束时间
// 患者信息
patientName: '',
idCardType: 1,
idCard: '',
birthdayStr: '',
birthday: '',
sex: 1,
patientMobilePhone: '',
// 助诊信息
userName: '',
userTitle: '',
userHospital: '',
userDepartment: '',
userMobile: '',
patientRelation: '',
// crrsName: '', // 招募人
// 医生信息
doctorName: '',
doctorTitle: '',
doctorHospital: '',
doctorDepartment: '',
doctorMobile: '',
doctorSource: '',
serviceFee: '',
outsideDoctor: '', // 站外医生姓名
// 问诊信息
diagnoseStage: '',
determineFlag: '',
diagnoseDisease: '',
illnessDetail: '',
illnessImageUrls: [],
diagnoseAdvice: '',
illnessAudioUrls: [],
followFlag: 1,
drugFollow: '',
drugFollowStatus: '',
checkFollow: '',
checkFollowStatus: '',
otherFollowStatus: '',
otherFollow: '',
remark: '',
maritalStatus: 2,
createType: 1, // //创建方式1.系统创建 2.手动创建
// 备注信息
patInFlag: '', // 患者是否在场 1是 2否
valueFlag: '', // 是否有价值 1是 2否
worthlessReason: '', // 无价值原因
otherRemark: '', // 其他备注
// 结算信息
receptionServiceFee: 0, // 接诊医生服务费单位分
receptionServiceFeeStr: '', // 接诊医生服务费展示字段
receptionPayType: '', // 接诊医生付款方式1自动打款2手动打款
receptionSettleTime: '', // 接诊医生结算时间
assistantServiceFee: 0, // 助诊医生服务费单位分
assistantServiceFeeStr: '', // 助诊医生服务费展示字段
assistantPayType: '', // 助诊医生付款方式1自动打款2手动打款
assistantSettleTime: '', // 助诊医生结算时间
// 录像信息
vodList: {
name: '',
url: '',
},
tyleList: TYPE_LIST,
payList: PAY_LIST,
sourceList: SOURCE_LIST,
statusList: STATUS_LIST,
carList: CAR_LIST,
sexList: SEX_LIST,
relationList: RELATION_LIST,
doctorSourceList: D_S_LIST,
followList: FOLLW_LIST,
doctorList: [],
rules: {
appointBeginTime: [
{ required: true, message: '请输入预约时间', trigger: 'change' },
],
patientName: [
{
required: true,
message: '请输入患姓名',
trigger: ['blur', 'change'],
},
{
min: 2,
max: 20,
message: '长度在 2 到 20 个字符',
trigger: ['blur', 'change'],
},
],
idCardType: [
{ required: true, message: '请选择证件类型', trigger: 'change' },
],
idCard: [
{ min: 18, message: '长度18个字符', trigger: 'blur' },
{ pattern: /[0-9A-Za-z]{6,24}$/, message: '只能是数字或字母' },
],
birth: [{ required: true, message: '请选择生日', trigger: 'change' }],
sex: [{ required: true, message: '请选择性别', trigger: 'change' }],
maritalStatus: [
{ required: true, message: '请选择婚否', trigger: 'change' },
],
patientMobilePhone: [
{
required: true,
message: '请输入患者电话',
trigger: ['blur', 'change'],
},
],
doctorName: [
{ required: true, message: '请选择接诊医生', trigger: 'change' },
],
serviceFee: [
{ required: false, message: '请输入医生服务费', trigger: 'change' },
{
pattern:
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
message: '请输入正确额格式,可保留两位小数',
},
],
diagnoseStage: [
{ required: true, message: '请选择初/复诊', trigger: 'change' },
],
determineFlag: [
{ required: true, message: '是否确诊', trigger: 'change' },
],
illnessDetail: [
{ required: true, message: '请输入病情描述', trigger: 'change' },
],
diagnoseAdvice: [
{ required: true, message: '请输入诊断建议', trigger: 'change' },
],
worthlessReason: [
{
required: true,
min: 2,
max: 1000,
message: '必填项,支持2-1000个字符',
trigger: 'change',
},
],
otherRemark: [
{
required: true,
min: 2,
max: 1000,
message: '必填项,支持2-1000个字符',
trigger: 'change',
},
],
patInFlag: [
{
required: true,
message: '必填项',
},
],
valueFlag: [
{
required: true,
message: '必填项',
},
],
},
endDateOpt: {
disabledData: (time) => {
if (
this.formData.appointEndTime != '' &&
this.formData.appointEndTime != null
) {
return (
time.getTime() > new Date(this.formData.appointEndTime).getTime()
);
}
},
tyleList: TYPE_LIST,
payList: PAY_LIST,
sourceList: SOURCE_LIST,
statusList: STATUS_LIST,
carList: CAR_LIST,
sexList: SEX_LIST,
relationList: RELATION_LIST,
doctorSourceList: D_S_LIST,
followList: FOLLW_LIST,
doctorList: [],
rules: {
appointBeginTime: [
{ required: true, message: '请输入预约时间', trigger: 'change' },
],
patientName: [
{
required: true,
message: '请输入患姓名',
trigger: ['blur', 'change'],
},
},
endDateOpt1: {
disabledDate: (time) => {
{
min: 2,
max: 20,
message: '长度在 2 到 20 个字符',
trigger: ['blur', 'change'],
},
],
idCardType: [
{ required: true, message: '请选择证件类型', trigger: 'change' },
],
idCard: [
{ min: 18, message: '长度18个字符', trigger: 'blur' },
{ pattern: /[0-9A-Za-z]{6,24}$/, message: '只能是数字或字母' },
],
birth: [{ required: true, message: '请选择生日', trigger: 'change' }],
sex: [{ required: true, message: '请选择性别', trigger: 'change' }],
maritalStatus: [
{ required: true, message: '请选择婚否', trigger: 'change' },
],
patientMobilePhone: [
{
required: true,
message: '请输入患者电话',
trigger: ['blur', 'change'],
},
],
doctorName: [
{ required: true, message: '请选择接诊医生', trigger: 'change' },
],
serviceFee: [
{ required: false, message: '请输入医生服务费', trigger: 'change' },
{
pattern:
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
message: '请输入正确额格式,可保留两位小数',
},
],
diagnoseStage: [
{ required: true, message: '请选择初/复诊', trigger: 'change' },
],
determineFlag: [
{ required: true, message: '是否确诊', trigger: 'change' },
],
illnessDetail: [
{ required: true, message: '请输入病情描述', trigger: 'change' },
],
diagnoseAdvice: [
{ required: true, message: '请输入诊断建议', trigger: 'change' },
],
worthlessReason: [
{
required: true,
min: 2,
max: 1000,
message: '必填项,支持2-1000个字符',
trigger: 'change',
},
],
otherRemark: [
{
required: true,
min: 2,
max: 1000,
message: '必填项,支持2-1000个字符',
trigger: 'change',
},
],
patInFlag: [
{
required: true,
message: '必填项',
},
],
valueFlag: [
{
required: true,
message: '必填项',
},
],
},
endDateOpt: {
disabledData: (time) => {
if (
this.formData.appointEndTime != '' &&
this.formData.appointEndTime != null
) {
return (
time.getTime() < new Date(this.formData.appointBeginTime).getTime()
time.getTime() > new Date(this.formData.appointEndTime).getTime()
);
},
}
},
},
endDateOpt1: {
disabledDate: (time) => {
return (
time.getTime() < new Date(this.formData.appointBeginTime).getTime()
);
},
// 操作日志数据
/* 元素结构
},
// 操作日志数据
/* 元素结构
{
operateTime: '2016-05-02',
operateUserName: '赵丽颖',
......@@ -1218,233 +1232,233 @@ import { getBirth } from '@/utils/index';
from: '助诊医生时间不匹配'
}
*/
logData: [],
logData: [],
// 分页功能与产品沟通不做
// logCurrentPage: 1,
// logTotalCount: 0
};
};
},
computed: {
getReceptionPayType() {
return PAY_TYPE[this.formData.receptionPayType];
},
computed: {
getReceptionPayType() {
return PAY_TYPE[this.formData.receptionPayType];
},
getAssistantPayType() {
return PAY_TYPE[this.formData.assistantPayType];
},
illnessImageUrls() {
const m = this.formData.illnessImageUrls.filter((i) => {
console.log('---', i);
});
return m;
},
getAssistantPayType() {
return PAY_TYPE[this.formData.assistantPayType];
},
created() {
this.editorType = this.$route.query.editorType;
this.diagnoseLogId = this.$route.query.id;
this.search();
illnessImageUrls() {
const m = this.formData.illnessImageUrls.filter((i) => {
console.log('---', i);
});
return m;
},
mounted() {},
methods: {
search() {
this.loading = true;
getAdminDiagnose({
id: this.diagnoseLogId,
})
.then((res) => {
this.loading = false;
if (res.code == '000000') {
this.formData = res.data;
this.formData.price = this.priceFilter(this.formData.price);
this.formData.serviceFee = this.priceFilter(
this.formData.serviceFee
);
if (!this.formData.illnessImageUrls) {
this.formData.illnessImageUrls = [];
} else {
this.formData.illnessImageUrls = this.setObjectArr(
this.formData.illnessImageUrls
);
}
console.log(
'this.formData.illnessImageUrls',
},
created() {
this.editorType = this.$route.query.editorType;
this.diagnoseLogId = this.$route.query.id;
this.search();
},
mounted() {},
methods: {
search() {
this.loading = true;
getAdminDiagnose({
id: this.diagnoseLogId,
})
.then((res) => {
this.loading = false;
if (res.code == '000000') {
this.formData = res.data;
this.formData.price = this.priceFilter(this.formData.price);
this.formData.serviceFee = this.priceFilter(
this.formData.serviceFee
);
if (!this.formData.illnessImageUrls) {
this.formData.illnessImageUrls = [];
} else {
this.formData.illnessImageUrls = this.setObjectArr(
this.formData.illnessImageUrls
);
if (!this.formData.illnessAudioUrls) {
this.formData.illnessAudioUrls = [];
} else {
this.formData.illnessAudioUrls = this.setObjectArr(
this.formData.illnessAudioUrls
);
}
if (this.formData.diagnoseAdvice) {
this.oldDiagnoseAdvice = this.formData.diagnoseAdvice;
this.formData.diagnoseAdvice = '';
}
if (!this.formData.sex) {
this.formData.sex = 1;
}
if (!this.formData.maritalStatus) {
this.formData.maritalStatus = 1;
}
}
console.log(
'this.formData.illnessImageUrls',
this.formData.illnessImageUrls
);
if (!this.formData.illnessAudioUrls) {
this.formData.illnessAudioUrls = [];
} else {
this.$message.info('请稍后重试');
this.formData.illnessAudioUrls = this.setObjectArr(
this.formData.illnessAudioUrls
);
}
this.getDoctorList();
this.queryOperationLogs();
})
.catch(() => {
if (this.formData.diagnoseAdvice) {
this.oldDiagnoseAdvice = this.formData.diagnoseAdvice;
this.formData.diagnoseAdvice = '';
}
if (!this.formData.sex) {
this.formData.sex = 1;
}
if (!this.formData.maritalStatus) {
this.formData.maritalStatus = 1;
}
} else {
this.$message.info('请稍后重试');
});
},
getDoctorList() {
this.loading = true;
getDoctorList({
diagnoseType: this.formData.diagnoseType,
}
this.getDoctorList();
this.queryOperationLogs();
})
.then((res) => {
this.loading = false;
if (res.code == '000000') {
this.doctorList = res.data;
} else {
this.$message.info('请稍后重试');
}
})
.catch(() => {
this.loading = false;
.catch(() => {
this.$message.info('请稍后重试');
});
},
getDoctorList() {
this.loading = true;
getDoctorList({
diagnoseType: this.formData.diagnoseType,
})
.then((res) => {
this.loading = false;
if (res.code == '000000') {
this.doctorList = res.data;
} else {
this.$message.info('请稍后重试');
});
},
queryOperationLogs() {
getDiagnoseLog({
id: this.diagnoseLogId,
}
})
.catch(() => {
this.loading = false;
this.$message.info('请稍后重试');
});
},
queryOperationLogs() {
getDiagnoseLog({
id: this.diagnoseLogId,
})
.then((res) => {
if (res.code == '000000') {
this.logData = res.data;
}
// 非交互性功能接口不提示
})
.catch(() => {
this.loading = false;
});
},
// 预约开始时间选择时
continueBeginChange(val) {
if (this.formData.appointEndTime) {
if (
new Date(val).getTime() >
new Date(this.formData.appointEndTime).getTime()
) {
this.$message.info('开始时间要小于结束时间');
this.formData.appointBeginTime = '';
return;
}
}
},
// 预约结束时间选择时
continueEndChange(val) {
if (this.formData.appointBeginTime) {
if (
new Date(val).getTime() <=
new Date(this.formData.appointBeginTime).getTime()
) {
this.$message.info('结束时间要大于开始时间');
this.formData.appointEndTime = '';
return;
}
}
},
blurFn() {
if (
this.formData.idCardType == 1 &&
this.formData.idCard &&
this.formData.idCard.length == 18
) {
this.formData.birthdayStr = getBirth(this.formData.idCard);
this.birthDisable = true;
} else {
this.formData.birthdayStr = '';
this.birthDisable = false;
}
},
cancle() {
this.$router.back();
},
priceFilter(value) {
if (!value) return 0;
if (value) {
return value / 100;
}
},
setPrice(value) {
if (!value) return 0;
if (value) {
return value * 100;
}
},
doctorChanged(value) {
const selected = this.doctorList.find((item) => item.doctorId === value);
if (selected) {
this.formData.doctorId = value;
this.formData.doctorName = selected.doctorName;
this.formData.doctorTitle = selected.doctorTitle;
this.formData.doctorHospital = selected.doctorHospital;
this.formData.doctorDepartment = selected.doctorDepartment;
this.formData.doctorMobile = selected.doctorMobile;
this.formData.serviceFee = this.priceFilter(selected.serviceFee);
}
},
save() {
this.$refs.form.validate(() => {
this.formData.birthday = new Date(this.formData.birthdayStr);
// this.formData.birthday = this.formData.birthdayStr;
const params = JSON.parse(JSON.stringify(this.formData));
params.illnessImageUrls = this.$refs.imgComponent
? [...this.$refs.imgComponent.setNewArr()]
: [];
params.illnessAudioUrls = this.$refs.musicComponent
? [...this.$refs.musicComponent.setNewArr()]
: [];
params.price = this.setPrice(params.price);
params.serviceFee = this.setPrice(params.serviceFee);
if (!params.diagnoseAdvice) {
params.diagnoseAdvice = this.oldDiagnoseAdvice;
}
this.loading = true;
this.btnDisable = true;
diagnoseUpdate(params)
.then((res) => {
this.loading = false;
this.btnDisable = false;
if (res.code == '000000') {
this.logData = res.data;
this.$message.success('保存成功');
this.$router.back();
} else {
this.$message({
message: res.message,
type: 'error',
});
}
// 非交互性功能接口不提示
})
.catch(() => {
this.btnDisable = false;
this.loading = false;
});
},
// 预约开始时间选择时
continueBeginChange(val) {
if (this.formData.appointEndTime) {
if (
new Date(val).getTime() >
new Date(this.formData.appointEndTime).getTime()
) {
this.$message.info('开始时间要小于结束时间');
this.formData.appointBeginTime = '';
return;
}
}
},
// 预约结束时间选择时
continueEndChange(val) {
if (this.formData.appointBeginTime) {
if (
new Date(val).getTime() <=
new Date(this.formData.appointBeginTime).getTime()
) {
this.$message.info('结束时间要大于开始时间');
this.formData.appointEndTime = '';
return;
}
}
},
blurFn() {
if (
this.formData.idCardType == 1 &&
this.formData.idCard &&
this.formData.idCard.length == 18
) {
this.formData.birthdayStr = getBirth(this.formData.idCard);
this.birthDisable = true;
} else {
this.formData.birthdayStr = '';
this.birthDisable = false;
}
},
cancle() {
this.$router.back();
},
priceFilter(value) {
if (!value) return 0;
if (value) {
return value / 100;
}
},
setPrice(value) {
if (!value) return 0;
if (value) {
return value * 100;
}
},
doctorChanged(value) {
const selected = this.doctorList.find((item) => item.doctorId === value);
if (selected) {
this.formData.doctorId = value;
this.formData.doctorName = selected.doctorName;
this.formData.doctorTitle = selected.doctorTitle;
this.formData.doctorHospital = selected.doctorHospital;
this.formData.doctorDepartment = selected.doctorDepartment;
this.formData.doctorMobile = selected.doctorMobile;
this.formData.serviceFee = this.priceFilter(selected.serviceFee);
}
},
save() {
this.$refs.form.validate(() => {
this.formData.birthday = new Date(this.formData.birthdayStr);
// this.formData.birthday = this.formData.birthdayStr;
const params = JSON.parse(JSON.stringify(this.formData));
params.illnessImageUrls = this.$refs.imgComponent
? [...this.$refs.imgComponent.setNewArr()]
: [];
params.illnessAudioUrls = this.$refs.musicComponent
? [...this.$refs.musicComponent.setNewArr()]
: [];
params.price = this.setPrice(params.price);
params.serviceFee = this.setPrice(params.serviceFee);
if (!params.diagnoseAdvice) {
params.diagnoseAdvice = this.oldDiagnoseAdvice;
}
this.loading = true;
this.btnDisable = true;
diagnoseUpdate(params)
.then((res) => {
this.loading = false;
this.btnDisable = false;
if (res.code == '000000') {
this.$message.success('保存成功');
this.$router.back();
} else {
this.$message({
message: res.message,
type: 'error',
});
}
})
.catch(() => {
this.btnDisable = false;
this.loading = false;
});
});
},
// 格式话音频/视频数组
setObjectArr(array) {
const newArr = [];
array.forEach((element) => {
newArr.push({ from: 'all', url: element });
});
return newArr;
},
openPdf(item) {
window.open(item.url);
},
});
},
// 格式话音频/视频数组
setObjectArr(array) {
const newArr = [];
array.forEach((element) => {
newArr.push({ from: 'all', url: element });
});
return newArr;
},
openPdf(item) {
window.open(item.url);
},
};
},
};
</script>
<style lang="scss" scoped>
.diagnosis-list-content {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册