修复:违章bug

This commit is contained in:
2025-06-26 18:34:12 +08:00
parent ed80e2db40
commit ea506483a1
3 changed files with 54 additions and 19 deletions

View File

@@ -41,9 +41,21 @@ const List: React.FC = () => {
if (showLoading) setLoading(true)
setRefreshing(true)
const res = await pageHjmViolation({
const where = {
keywords: keywords.trim(),
})
}
const roleCode = Taro.getStorageSync('RoleCode');
if(roleCode == 'kuaidi'){
if(Taro.getStorageSync('OrganizationId') == Taro.getStorageSync('OrganizationParentId')){
// @ts-ignore
where.organizationParentId = Taro.getStorageSync('OrganizationParentId');
}else {
// @ts-ignore
where.organizationId = Taro.getStorageSync('OrganizationId');
}
}
const res = await pageHjmViolation(where)
setList(res?.list || [])
} catch (error) {

View File

@@ -58,6 +58,7 @@ const UserCell = () => {
</Cell.Group>
{
(roleName === 'kuaidi' || roleName == 'zhandian') && (
<>
<Cell.Group divider={true}>
<Cell
className="nutui-cell-clickable"
@@ -74,6 +75,7 @@ const UserCell = () => {
}}
/>
</Cell.Group>
</>
)
}
{
@@ -156,6 +158,27 @@ const UserCell = () => {
)
}
{
roleName === 'kuaidi' && (
<Cell.Group divider={true}>
<Cell
className="nutui-cell-clickable"
title={
<div style={{display: 'inline-flex', alignItems: 'center'}}>
<Truck size={16}/>
<span className={'pl-3 text-sm'}></span>
</div>
}
align="center"
extra={<ArrowRight color="#cccccc" size={18}/>}
onClick={() => {
navTo('/hjm/violation/list', true)
}}
/>
</Cell.Group>
)
}
{/*<Cell.Group divider={true} description={*/}
{/* <div style={{display: 'inline-flex', alignItems: 'center'}}>*/}
{/* <span style={{marginTop: '12px'}}>管理</span>*/}

View File

@@ -4,7 +4,7 @@ import {BaseUrl, TenantId} from "@/utils/config";
let baseUrl = BaseUrl
if(process.env.NODE_ENV === 'development'){
// baseUrl = 'http://localhost:9000/api'
baseUrl = 'http://localhost:9000/api'
}
export function request<T>(options:any) {
const token = Taro.getStorageSync('access_token');