Commit 6f3bb8bf by lujunyi

大小

parent 4712799c
......@@ -99,33 +99,33 @@ public function search()
// 姓名
$img->text($prescription->patient_name, 410, 260, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf'));
$font->size(36);
$font->size(40);
$font->color('#000000');
});
// 性别
$gender = PatientModel::SEX_MAP[$prescription->patient_gender];
$img->text($gender, 890, 260, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf'));
$font->size(36);
$font->size(40);
$font->color('#000000');
});
// 年龄
$img->text("{$prescription->patient_age}岁", 1270, 260, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf'));
$font->size(36);
$font->size(40);
$font->color('#000000');
});
// 开方日期
$date = \Carbon\Carbon::parse($prescription->prescription_at)->format('Y-m-d');
$img->text($date, 1215, 330, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf'));
$font->size(36);
$font->size(40);
$font->color('#000000');
});
// 诊断
$img->text($prescription->diagnosis_name, 330, 460, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf'));
$font->size(32);
$font->size(40);
$font->color('#000000');
});
......@@ -157,7 +157,7 @@ public function search()
$medicineText = "{$medicine['drug_name']} {$medicine['spec']} {$medicine['num']}{$medicine['unit']}";
$img->text($medicineText, 450, $yCoordinate, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf'));
$font->size(36);
$font->size(40);
$font->color('#000000');
$font->align('left');
});
......@@ -168,7 +168,7 @@ public function search()
// 打印 sig 信息
$img->text('Sig: '.$medicine['dosage_desc'], 450, $yCoordinate, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf'));
$font->size(36);
$font->size(40);
$font->color('#000000');
$font->align('left');
});
......@@ -206,7 +206,7 @@ public function search()
// 不带印章处方图片生成
$picName = $prescriptionNo.'.jpg';
$tempPath = storage_path('app/public').$picName;
$img->save($tempPath); // 不带电子印章
$img->save($tempPath, quality: 100); // 不带电子印章
// 上传到腾讯云
Storage::putFileAs('prescriptions', $tempPath, $picName);
......@@ -217,7 +217,7 @@ public function search()
$img->place($eseal, 'bottom-right', 180, 500);
$picEsealName = $prescriptionNo.'-eseal.jpg';
$tempEsealPath = storage_path('app/public').$picEsealName;
$img->save($tempEsealPath);
$img->save($tempEsealPath, quality: 100);
// 上传到腾讯云
Storage::putFileAs('prescriptions', $tempEsealPath, $picEsealName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment