111
This commit is contained in:
parent
d6bdabc210
commit
1b2a2a0f4f
@ -16,7 +16,7 @@
|
||||
<a-descriptions-item label="性别 " class="required">{{ $smartEnumPlugin.getDescByValue('GENDER_ENUM', caseVO.sex) }}</a-descriptions-item>
|
||||
<a-descriptions-item label="年龄 " class="required">{{ caseVO.age ? caseVO.age : '--' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="入院时间 " :span="2" class="required">{{
|
||||
caseVO.admissionTime ? caseVO.admissionTime : '--'
|
||||
caseVO.admissionTime ? formateDate(caseVO.admissionTime) : '--'
|
||||
}}</a-descriptions-item>
|
||||
|
||||
<a-descriptions-item label="治疗类型(多选) " :span="3" class="required">
|
||||
@ -99,7 +99,7 @@
|
||||
>
|
||||
|
||||
<a-descriptions-item label="治疗时间 " :span="2" class="required">
|
||||
{{ dpm.treatTime }}
|
||||
{{ formateDate(dpm.treatTime) }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="治疗内容 " :span="2" class="required" v-if="dpm">
|
||||
<div class="row">1、模式(单选):</div>
|
||||
@ -186,13 +186,13 @@
|
||||
<a-tab-pane key="4" tab="实验室检测">
|
||||
<a-descriptions title="" bordered :column="caseVO.dpmas.length>1?3:2">
|
||||
<a-descriptions-item label="首次治疗前检测时间 " :span="3" class="required">
|
||||
{{ caseVO.headTime }}
|
||||
{{ formateDate(caseVO.headTime) }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="首次治疗后检测时间 " :span="3" class="required">
|
||||
{{ caseVO.afterTime }}
|
||||
{{ formateDate(caseVO.afterTime) }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="最后一次治疗后检测时间 " :span="3" class="required" v-if="caseVO.dpmas.length>1">
|
||||
{{ caseVO.lastTime }}
|
||||
{{ formateDate(caseVO.lastTime)}}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="首次治疗前总胆红素" class="required">{{ caseVO.headTb ? caseVO.headTb : '--' }} umol/L</a-descriptions-item>
|
||||
<a-descriptions-item label="首次治疗后总胆红素" class="required">{{ caseVO.afterTb ? caseVO.afterTb : '--' }} umol/L</a-descriptions-item>
|
||||
@ -237,13 +237,13 @@
|
||||
<a-descriptions-item v-if="caseVO.dpmas.length>1" label="最后一次治疗后凝血酶原活动度">{{ caseVO.lastPta ? caseVO.lastPta : '--' }} %</a-descriptions-item>
|
||||
|
||||
<a-descriptions-item label="首次治疗前国际标准化比值 " class="required"
|
||||
>{{ caseVO.headInr ? caseVO.headInr : '--' }} INR</a-descriptions-item
|
||||
>{{ caseVO.headInr ? caseVO.headInr : '--' }}</a-descriptions-item
|
||||
>
|
||||
<a-descriptions-item label="首次治疗后国际标准化比值 " class="required"
|
||||
>{{ caseVO.afterInr ? caseVO.afterInr : '--' }} INR</a-descriptions-item
|
||||
>{{ caseVO.afterInr ? caseVO.afterInr : '--' }}</a-descriptions-item
|
||||
>
|
||||
<a-descriptions-item v-if="caseVO.dpmas.length>1" label="最后一次治疗后国际标准化比值 " class="required"
|
||||
>{{ caseVO.lastInr ? caseVO.lastInr : '--' }} INR</a-descriptions-item
|
||||
>{{ caseVO.lastInr ? caseVO.lastInr : '--' }} </a-descriptions-item
|
||||
>
|
||||
|
||||
<a-descriptions-item label="首次治疗前C反应蛋白">{{ caseVO.headCrp ? caseVO.headCrp : '--' }} ng/L</a-descriptions-item>
|
||||
@ -273,7 +273,7 @@
|
||||
<a-tab-pane key="5" tab="疾病转归">
|
||||
<a-descriptions title="" bordered :column="4">
|
||||
<a-descriptions-item label="出院时间 " :span="3" class="required">
|
||||
{{ caseVO.dischargeTime }}
|
||||
{{ formateDate(caseVO.dischargeTime) }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="出院天数 " :span="3" class="required">
|
||||
{{ caseVO.day }}
|
||||
@ -328,6 +328,7 @@ import { caseplatformCaseApi } from '/@/api/business/case/caseplatform-case-api'
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import imgCell from './imgCell.vue';
|
||||
import imgEditor from './imgEditor.vue';
|
||||
import dayjs from 'dayjs';
|
||||
import {il6Unit, caseTypeOption, diagnoseOption, patientSickOption, ganneiOption, ganwaiOption, moshiOption, kangningOption, hospitalOption } from './data';
|
||||
// ---------------- -------- 事件 ------------------------
|
||||
const imgEditorRef = ref(null);
|
||||
@ -630,6 +631,9 @@ const saveEditor = () => {
|
||||
const handleOk = () => {
|
||||
showEdit.value = false;
|
||||
};
|
||||
const formateDate=(val)=>{
|
||||
return dayjs(val).format('YYYY-MM-DD')
|
||||
};
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
@ -684,7 +688,7 @@ defineExpose({
|
||||
margin: 0;
|
||||
}
|
||||
:deep(.ant-descriptions-item-label){
|
||||
max-width: 140px;
|
||||
max-width: 160px;
|
||||
}
|
||||
:deep(.ant-checkbox-checked .ant-checkbox-inner),:deep(.ant-radio-checked .ant-radio-inner){
|
||||
background-color: #1890ff;
|
||||
|
||||
@ -4,26 +4,26 @@
|
||||
|
||||
<script setup>
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { ref,onBeforeUnmount} from 'vue';
|
||||
import { ref, onBeforeUnmount, nextTick } from 'vue';
|
||||
import 'tui-image-editor/dist/tui-image-editor.css';
|
||||
import 'tui-color-picker/dist/tui-color-picker.css';
|
||||
import ImageEditor from 'tui-image-editor';
|
||||
import { caseplatformCaseApi } from '/@/api/business/case/caseplatform-case-api';
|
||||
import { FileUtil } from '/@/utils/fileutil'
|
||||
import { FileUtil } from '/@/utils/fileutil';
|
||||
import dayjs from 'dayjs';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
const props = defineProps({
|
||||
imgsrc: {
|
||||
type: String,
|
||||
default:''
|
||||
default: '',
|
||||
},
|
||||
imgIndex: {
|
||||
type: Number,
|
||||
default:0
|
||||
default: 0,
|
||||
},
|
||||
imgType: {
|
||||
type: String,
|
||||
default:''
|
||||
default: '',
|
||||
},
|
||||
dpmasId: {
|
||||
type: Number,
|
||||
@ -36,11 +36,11 @@ const props=defineProps({
|
||||
caseObj: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
const uploadImgSrc = ref('');
|
||||
|
||||
const emit=defineEmits(['freshDetail'])
|
||||
const emit = defineEmits(['freshDetail']);
|
||||
// tui-image-editor语言配置,汉化文字
|
||||
const locale_zh = {
|
||||
ZoomIn: '放大',
|
||||
@ -200,17 +200,20 @@ const HandleMainDiagnoseImg=()=>{
|
||||
let obj = props.caseObj.mainDiagnose;
|
||||
obj.mainDiagnoseImg = uploadImgSrc.value;
|
||||
|
||||
caseplatformCaseApi.updateMainDiagnose({
|
||||
caseplatformCaseApi
|
||||
.updateMainDiagnose({
|
||||
caseId: props.caseId,
|
||||
mainDiagnose:JSON.stringify(obj)
|
||||
}).then(res=>{
|
||||
emit('freshDetail')
|
||||
mainDiagnose: JSON.stringify(obj),
|
||||
})
|
||||
.then((res) => {
|
||||
emit('freshDetail');
|
||||
SmartLoading.hide();
|
||||
message.success('保存成功');
|
||||
}).catch(err=>{
|
||||
})
|
||||
.catch((err) => {
|
||||
SmartLoading.hide();
|
||||
message.error('保存失败');
|
||||
})
|
||||
});
|
||||
};
|
||||
const HandleDpmasImg = () => {
|
||||
let dpmasList = props.caseObj.dpmas;
|
||||
@ -221,67 +224,71 @@ const HandleDpmasImg=()=>{
|
||||
break;
|
||||
}
|
||||
}
|
||||
console.log(dpmasList[dpmasIndex].dpmasImg)
|
||||
console.log(dpmasList[dpmasIndex].dpmasImg);
|
||||
let newImgList = dpmasList[dpmasIndex].dpmasImg.split(',');
|
||||
newImgList[props.imgIndex] = uploadImgSrc.value;
|
||||
let dpmasImg = '';
|
||||
newImgList.forEach(item=>{
|
||||
newImgList.forEach((item) => {
|
||||
if (dpmasImg) {
|
||||
dpmasImg += ',' + item;
|
||||
} else {
|
||||
dpmasImg=item
|
||||
dpmasImg = item;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
caseplatformCaseApi.updateDpmas({
|
||||
caseplatformCaseApi
|
||||
.updateDpmas({
|
||||
caseId: props.caseId,
|
||||
dmpsId: props.dpmasId,
|
||||
dpmasImg:dpmasImg
|
||||
}).then(res=>{
|
||||
emit('freshDetail')
|
||||
dpmasImg: dpmasImg,
|
||||
})
|
||||
.then((res) => {
|
||||
emit('freshDetail');
|
||||
SmartLoading.hide();
|
||||
message.success('保存成功');
|
||||
|
||||
}).catch(err=>{
|
||||
})
|
||||
.catch((err) => {
|
||||
SmartLoading.hide();
|
||||
message.error('保存失败');
|
||||
})
|
||||
});
|
||||
};
|
||||
const HandleCheckImg = () => {
|
||||
let newImgList = props.caseObj.checkImg.split(',');
|
||||
console.log(newImgList)
|
||||
console.log(newImgList);
|
||||
newImgList[props.imgIndex] = uploadImgSrc.value;
|
||||
let checkImg = '';
|
||||
newImgList.forEach(item=>{
|
||||
newImgList.forEach((item) => {
|
||||
if (checkImg) {
|
||||
checkImg += ',' + item;
|
||||
} else {
|
||||
checkImg=item
|
||||
checkImg = item;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
caseplatformCaseApi.updateCheck({
|
||||
caseplatformCaseApi
|
||||
.updateCheck({
|
||||
caseId: props.caseId,
|
||||
checkImg:checkImg
|
||||
}).then(res=>{
|
||||
emit('freshDetail')
|
||||
checkImg: checkImg,
|
||||
})
|
||||
.then((res) => {
|
||||
emit('freshDetail');
|
||||
SmartLoading.hide();
|
||||
message.success('保存成功');
|
||||
|
||||
}).catch(err=>{
|
||||
})
|
||||
.catch((err) => {
|
||||
SmartLoading.hide();
|
||||
message.error('保存失败');
|
||||
})
|
||||
});
|
||||
};
|
||||
const getImageFormat = (imageUrl) => {
|
||||
console.log(imageUrl)
|
||||
console.log(imageUrl);
|
||||
var parts = imageUrl.split('.');
|
||||
return parts[parts.length - 1];
|
||||
};
|
||||
const getImg = (file) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
caseplatformCaseApi.getOssSign(1).then(res=>{
|
||||
console.log(res.data)
|
||||
caseplatformCaseApi.getOssSign(1).then((res) => {
|
||||
console.log(res.data);
|
||||
let { accessid, dir, policy, signature, host } = res.data;
|
||||
let filename = dayjs().format('YYYYMMDDHHmmss') + FileUtil.UUID() + '.' + 'png';
|
||||
let formData = new FormData();
|
||||
@ -291,22 +298,23 @@ const getImg=(file)=>{
|
||||
formData.append('key', dir + filename);
|
||||
formData.append('file', file, filename);
|
||||
formData.append('success_action_status', 200);
|
||||
caseplatformCaseApi.ossUpload(host,formData).then(res => {
|
||||
caseplatformCaseApi
|
||||
.ossUpload(host, formData)
|
||||
.then((res) => {
|
||||
console.log(host + dir + filename);
|
||||
resolve(host + dir + filename);
|
||||
|
||||
}).catch((err) => {
|
||||
message.error('上传失败')
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error('上传失败');
|
||||
SmartLoading.hide();
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
SmartLoading.hide();
|
||||
|
||||
}
|
||||
};
|
||||
const blobToFile = (blob, name) => {
|
||||
return new File([blob], name, { type: blob.type });
|
||||
}
|
||||
};
|
||||
|
||||
const save = () => {
|
||||
SmartLoading.show();
|
||||
@ -324,8 +332,9 @@ const save = () => {
|
||||
// newSrc.value = res;
|
||||
// });
|
||||
let file = blobToFile(blob, new Date().getTime() + '.png');
|
||||
console.log(file)
|
||||
getImg(file).then(res=>{
|
||||
console.log(file);
|
||||
getImg(file)
|
||||
.then((res) => {
|
||||
uploadImgSrc.value = res;
|
||||
if (props.imgType === 'mainDiagnose') {
|
||||
HandleMainDiagnoseImg();
|
||||
@ -334,10 +343,10 @@ const save = () => {
|
||||
} else if (props.imgType === 'check') {
|
||||
HandleCheckImg();
|
||||
}
|
||||
|
||||
}).catch(err=>{
|
||||
SmartLoading.hide();
|
||||
})
|
||||
.catch((err) => {
|
||||
SmartLoading.hide();
|
||||
});
|
||||
};
|
||||
|
||||
const fileToBase64 = (file) => {
|
||||
@ -355,6 +364,7 @@ const init = (src) => {
|
||||
path: src,
|
||||
name: '编辑图片',
|
||||
},
|
||||
|
||||
menu: ['draw', 'text'], // 底部菜单按钮列表 隐藏镜像flip和遮罩mask
|
||||
initMenu: 'draw', // 默认打开的菜单项
|
||||
menuBarPosition: 'bottom', // 菜单所在的位置
|
||||
@ -362,10 +372,14 @@ const init = (src) => {
|
||||
theme: customTheme, // 自定义样式
|
||||
},
|
||||
cssMaxWidth: 1000, // canvas 最大宽度
|
||||
cssMaxHeight: 600, //
|
||||
usageStatistics: false,
|
||||
cssMaxHeight: 600
|
||||
})
|
||||
setTimeout(() => {
|
||||
instance.value.setBrush({
|
||||
color: '#000000',
|
||||
width: 12,
|
||||
});
|
||||
|
||||
},1000);
|
||||
document.getElementsByClassName('tui-image-editor-main')[0].style.top = '45px'; // 调整图片显示位置
|
||||
//document.getElementsByClassName('tie-btn-reset tui-image-editor-item help')[0].style.display = 'none'; // 隐藏顶部重置按钮
|
||||
document.getElementsByClassName('tie-text-align-button')[0].style.display = 'none'; // 隐藏文字对齐选项
|
||||
@ -388,8 +402,7 @@ onBeforeUnmount(() => {
|
||||
instance.value = null;
|
||||
}
|
||||
});
|
||||
defineExpose({init,save})
|
||||
|
||||
defineExpose({ init, save });
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@ -161,7 +161,7 @@ const columns = ref([
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
title: '申请状态',
|
||||
dataIndex: 'status',
|
||||
ellipsis: true,
|
||||
},
|
||||
|
||||
@ -31,7 +31,11 @@
|
||||
<p class="hint">初始密码默认为:随机</p>
|
||||
</a-form-item>
|
||||
<a-form-item label="性别" name="gender">
|
||||
<smart-enum-select style="width: 100%" v-model:value="form.gender" placeholder="请选择性别" enum-name="GENDER_ENUM" />
|
||||
<a-select v-model:value="form.gender" placeholder="请选择性别">
|
||||
<a-select-option value="1">男</a-select-option>
|
||||
<a-select-option value="2">女</a-select-option>
|
||||
</a-select>
|
||||
<!-- <smart-enum-select style="width: 100%" v-model:value="form.gender" placeholder="请选择性别" enum-name="GENDER_ENUM" /> -->
|
||||
</a-form-item>
|
||||
<a-form-item label="状态" name="disabledFlag">
|
||||
<a-select v-model:value="form.disabledFlag" placeholder="请选择状态">
|
||||
@ -79,6 +83,10 @@ import { smartSentry } from '/@/lib/smart-sentry';
|
||||
}
|
||||
// 显示
|
||||
async function showDrawer(rowData) {
|
||||
if(rowData.gender){
|
||||
rowData.gender=rowData.gender.toString();
|
||||
}
|
||||
|
||||
Object.assign(form, formDefault);
|
||||
if (rowData && !_.isEmpty(rowData)) {
|
||||
Object.assign(form, rowData);
|
||||
@ -153,6 +161,7 @@ import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
||||
// 提交数据
|
||||
async function onSubmit(keepAdding) {
|
||||
|
||||
let validateFormRes = await validateForm(formRef.value);
|
||||
if (!validateFormRes) {
|
||||
message.error('参数验证错误,请仔细填写表单数据!');
|
||||
@ -168,6 +177,7 @@ import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
||||
async function addEmployee(keepAdding) {
|
||||
try {
|
||||
console.log(form);
|
||||
let { data } = await employeeApi.addEmployee(form);
|
||||
message.success('添加成功');
|
||||
emit('show-account', form.loginName, data);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user