修改bug ,非超级管理员不能删除记录

main
yanzai 1 year ago
parent b6cf7e3767
commit 8dfd73f2a0

@ -1,5 +1,6 @@
<?php
namespace App\Services\Admin\YeWu;
use Illuminate\Support\Facades\Log;
use App\Lib\HSM;
use Illuminate\Support\Facades\DB;
use App\Services\mH5\PersonService;
@ -62,8 +63,9 @@ class HealthCheckupService
$img_url='';
if(isset($CheckupInfo['head_img'])){
$date = date("Ymd");
preg_match('/^(data:\s*image\/(\w+);base64,)/', $CheckupInfo['head_img'], $res);
$file = base64_decode(Str::after($CheckupInfo['head_img'], $res[1]));
// preg_match('/^(data:\s*image\/(\w+);base64,)/', $CheckupInfo['head_img'], $res);
// $file = base64_decode(Str::after($CheckupInfo['head_img'], $res[1]));
$file = base64_decode($CheckupInfo['head_img']);
$filePath = 'APIUpload/'.$date.'/'.$CheckupInfo['tijian_num'].$CheckupInfo['id_card_num'].'.jpg';
Storage::disk('public')->put($filePath, $file);
$img_url='/storage/'.$filePath;
@ -122,7 +124,9 @@ class HealthCheckupService
} catch (\Exception $e) {
DB::rollBack(); // 回滚事务
dd($e);
Log::error('发生错误: ' . $e->getMessage(), [
'exception' => $e
]);
}

@ -1,6 +1,6 @@
ENV = 'production'
VITE_APP_API = 'http://192.168.50.123:33583/common/la/public/api/'
VITE_APP_FILE = 'http://192.168.50.123:33583/common/la/public'
VITE_APP_API_6666 = 'http://192.168.50.123:33583/common/la/public/api/'
VITE_APP_FILE_5555 = 'http://192.168.50.123:33583/common/la/public'
VITE_APP_API_5555 = 'http://172.31.68.39:33583/common/la/public/api/'
VITE_APP_FILE_5555 = 'http://172.31.68.39:33583/common/la/public'
VITE_APP_API = 'http://172.31.68.39:33583/common/la/public/api/'
VITE_APP_FILE = 'http://172.31.68.39:33583/common/la/public'

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@ -64,8 +64,8 @@
</template>
</el-table-column>
<el-table-column prop="created_at" label="创建时间" />
<el-table-column label="操作" width="100">
<template #default="scope">
<el-table-column label="操作" width="100" v-if="userinfo.group==1">
<template #default="scope" >
<el-button type="primary" @click="del(scope.row.id)"></el-button>
</template>
</el-table-column>
@ -167,9 +167,12 @@
})
}
let userinfo=ref('');
onMounted(() => {
getHealthOrganizationEnableList()
GetList()
userinfo.value=JSON.parse(sessionStorage.getItem('userinfo'))
console.log(userinfo.value);
})
</script>

@ -124,7 +124,7 @@
import {
useDark
} from "@vueuse/core";
import userjpg from '@/assets/user.jpg'
import userjpg from '@/assets/user.png'
const isDark = useDark()
const toggleDark = () => useToggle(isDark)
@ -174,6 +174,8 @@ import userjpg from '@/assets/user.jpg'
const getBaseAdminUserInfo = () => {
GetBaseAdminUserInfo().then(res => {
BaseUserInfo.value = res.info[0]
sessionStorage.setItem('userinfo',JSON.stringify(BaseUserInfo.value));
})
}
onMounted(() => {

Loading…
Cancel
Save