fix(icc add hls)

This commit is contained in:
wang_yp 2025-08-12 17:56:16 +08:00
parent a36ea869ac
commit 854e8562af
12 changed files with 177 additions and 35 deletions

View File

@ -23,10 +23,13 @@ const BTable = (props: any) => {
onPageChange,
config,
btnText,
children
children,
searchConfig
} = props;
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
const formRef = React.useRef<FormInstance>(null);
const searchFormRef = React.useRef<FormInstance>(null);
const [record, setRecord] = useState<any>(null);
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
const onSelectChange = (newSelectedRowKeys: React.Key[]) => {
@ -98,12 +101,30 @@ const BTable = (props: any) => {
setRecord(null);
setIsModalOpen(true);
};
const searchWidget = () => {
return (
<>
{searchConfig ? <SimpleForm
formName={"search_form"}
formRef={searchFormRef}
colProps={30}
onFinish={() => { }}
formDatas={searchConfig} />
: null}
</>
)
}
return (
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
{
config ? <Button type="default" onClick={() => addHandler()}>
config ? <div>
<Button type="default" onClick={() => addHandler()}>
{btnText ?? "添加部门"}
</Button> : null
</Button>
{searchWidget()}
</div>: null
}
<Table
style={{ height: "100%", overflow: "auto" }}

View File

@ -24,6 +24,7 @@ export const items = [
icon: <DatabaseOutlined />,
children: [
{ label: "人员", key: "/source/list" },
{ label: "事件类型", key: "/source/type" },
{ label: "事件", key: "/source/event" }
],
},

View File

@ -1,6 +1,7 @@
import { FormType } from "@/components/form/interface";
import { UserDataType } from "@/model/userModel";
import SourceConfig from "@/service/source_config";
import { EventTypeConfig } from "@/service/user_config";
import { ColumnsType } from "antd/es/table";
export const defaultConfig = [
@ -31,6 +32,15 @@ export const defaultConfig = [
name: "address",
value: "",
rules: [{ required: true, message: "请输入事件地点!" }],
},
{
type: FormType.select,
label: "事件类型",
name: "type_identity",
value: "",
keys:"type_name",
selectUrl: EventTypeConfig.LIST,
rules: [{ required: true, message: "请输入事件地点!" }],
},
{
type: FormType.input,
@ -70,13 +80,7 @@ export const defaultConfig = [
value: "",
rules: [{ required: true, message: "请输入负责人电话!" }],
},
{
type: FormType.input,
label: "负责人身份证",
name: "id_card",
value: "",
rules: [{ required: true, message: "请输入负责人身份证!" }],
},
{
type: FormType.fetchList,
label: "参与人员选择",
@ -110,7 +114,7 @@ export const defaultConfig = [
label: "现场拍摄",
name: "images",
value: [],
rules: [{ required: true, message: "现场图片不能为空!" }],
rules: [],
},
]
@ -153,8 +157,5 @@ export const columns: ColumnsType<UserDataType> = [
title: "电话",
dataIndex: "tel",
},
{
title: "负责人身份证",
dataIndex: "id_card",
},
];

View File

@ -0,0 +1,34 @@
import { FormType } from "@/components/form/interface";
import { UserDataType } from "@/model/userModel";
import { ColumnsType } from "antd/es/table";
export const defaultConfig = [
{
type: FormType.input,
label: "事件类型标题",
name: "type_name",
value: "",
rules: [{ required: true, message: "请输入事件类型标题!" }],
},
{
type: FormType.input,
label: "事件类型描述",
name: "type_desc",
value: "",
},
]
export const columns: ColumnsType<UserDataType> = [
{
title: "事件类型标题",
dataIndex: "type_name",
fixed: "left",
},
{
title: "事件类型描述",
dataIndex: "type_desc",
},
];

View File

@ -0,0 +1,26 @@
import BTable from "@/components/b_table";
import { Store } from "antd/es/form/interface";
import { inject, observer } from "mobx-react";
import { useEffect } from "react";
import { columns, defaultConfig } from "./config";
const EventType= (props: Store) => {
const { thingTypeStore } = props;
useEffect(() => {
thingTypeStore.getlist();
}, [thingTypeStore]);
return <div className="contentBox">
<BTable
btnText="添加事件类型"
store={thingTypeStore}
scroll={{ x: "max-content" }}
columns={columns}
dataSource={thingTypeStore.list ?? []}
config={defaultConfig}
>
</BTable>
</div>
}
export default inject("thingTypeStore")(observer(EventType));

View File

@ -1,7 +1,7 @@
import { FormType } from "@/components/form/interface";
import { UserDataType } from "@/model/userModel";
import SourceConfig from "@/service/source_config";
import { CompanyConfig, DepConfig, MenuConfig } from "@/service/user_config";
// import SourceConfig from "@/service/source_config";
// import { CompanyConfig, DepConfig, MenuConfig } from "@/service/user_config";
import { ColumnsType } from "antd/lib/table";
export const defaultConfig = [
@ -29,15 +29,15 @@ export const defaultConfig = [
// value: "",
// rules: [],
// },
{
type: FormType.treeSelect,
label: "所属单位",
name: "company_id",
treeCheckbox:false,
selectUrl: CompanyConfig.LIST,
value: "",
rules: [{ required: true, message: "所属单位不能为空" }],
},
// {
// type: FormType.treeSelect,
// label: "所属单位",
// name: "company_id",
// treeCheckbox:false,
// selectUrl: CompanyConfig.LIST,
// value: "",
// rules: [{ required: true, message: "所属单位不能为空" }],
// },
// {
// type: FormType.treeSelect,
// treeCheckbox:true,
@ -69,13 +69,13 @@ export const columns: ColumnsType<UserDataType> = [
dataIndex: "desc",
},
{
title: "菜单权限",
dataIndex: "menu_rights",
},
// {
// title: "菜单权限",
// dataIndex: "menu_rights",
// },
{
title: "接口权限",
dataIndex: "api_rights",
},
// {
// title: "接口权限",
// dataIndex: "api_rights",
// },
];

View File

@ -0,0 +1,29 @@
import { FormType } from "@/components/form/interface";
import { CompanyConfig, RoleConfig } from "@/service/user_config";
export const searchConfig = [
{
type: FormType.input,
label: "用户名",
name: "user_name",
value: "",
rules: [{ required: true, message: "请输入用户名称!" }],
},
{
type: FormType.treeSelect,
label: "所属单位",
name: "company_identity",
treeCheckbox: false,
selectUrl: CompanyConfig.LIST,
value: "",
keys: "company_id",
rules: [{ required: true, message: "所属单位不能为空" }],
},
{
type: FormType.select,
label: "角色",
name: "role_identity",
selectUrl: RoleConfig.LIST,
value: "",
rules: [{ required: true, message: "角色不能为空" }],
},
];

View File

@ -4,6 +4,7 @@ import { useEffect } from "react";
import { Store } from "antd/lib/form/interface";
import { columns, defaultConfig } from "./user_config";
import "./user.less";
import { searchConfig } from "./search_config";
const User = (props: Store) => {
const { usrStore } = props;
@ -28,6 +29,7 @@ const User = (props: Store) => {
columns={columns}
btnText="添加人员"
dataSource={usrStore.list}
searchConfig={searchConfig}
deleteCallback={(record) => {
usrStore.deleteItem(record);
}}

View File

@ -10,6 +10,7 @@ import Permission from "@/pages/permission";
import Dep from "@/pages/dep";
import Company from "@/pages/company";
import Event from "@/pages/event";
import EventType from "@/pages/event_type";
import { My } from "@/pages/my";
import Work from "@/pages/work";
@ -43,6 +44,12 @@ const routers = createHashRouter([
index: true,
element: <Event />,
},
{
path: "/source/type",
index: true,
element: <EventType />,
},
{
path: "/permi/permi",
index: true,

View File

@ -45,6 +45,12 @@ class EventConfig {
static DELETE: string = "/thing";
static ThingList: string = "/thing/byIdcard";
}
class EventTypeConfig {
static ADD: string = "/thing_type";
static EDIT: string = "/thing_type";
static LIST: string = "/thing_type/list";
static DELETE: string = "/thing_type";
}
class ShareConfig {
static ADD: string = "/share";
@ -54,4 +60,4 @@ class ShareConfig {
}
export { RoleConfig, UserConfig, MenuConfig, DepConfig, CompanyConfig, EventConfig,ShareConfig };
export { RoleConfig, UserConfig, MenuConfig, DepConfig, CompanyConfig, EventConfig, ShareConfig, EventTypeConfig };

View File

@ -6,6 +6,7 @@ import depStore from './dep';
import companyStore from './company';
import thingStore from './thing';
import shareStore from './share';
import thingTypeStore from './thing_type';
const store = {
usrStore,
@ -16,6 +17,7 @@ const store = {
companyStore,
thingStore,
shareStore,
thingTypeStore
};
export default store;

13
src/store/thing_type.ts Normal file
View File

@ -0,0 +1,13 @@
import { makeObservable } from "mobx";
import BaseStore from "./baseStore";
import { UserDataType } from "@/model/userModel";
import { EventTypeConfig } from "@/service/user_config";
class ThingTypeStore extends BaseStore<UserDataType> {
constructor() {
super(EventTypeConfig)
makeObservable(this, {})
}
}
const thingTypeStore = new ThingTypeStore();
export default thingTypeStore;