fix(icc add hls)
This commit is contained in:
parent
a36ea869ac
commit
854e8562af
|
@ -23,10 +23,13 @@ const BTable = (props: any) => {
|
||||||
onPageChange,
|
onPageChange,
|
||||||
config,
|
config,
|
||||||
btnText,
|
btnText,
|
||||||
children
|
children,
|
||||||
|
searchConfig
|
||||||
} = props;
|
} = props;
|
||||||
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||||
const formRef = React.useRef<FormInstance>(null);
|
const formRef = React.useRef<FormInstance>(null);
|
||||||
|
const searchFormRef = React.useRef<FormInstance>(null);
|
||||||
|
|
||||||
const [record, setRecord] = useState<any>(null);
|
const [record, setRecord] = useState<any>(null);
|
||||||
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
||||||
const onSelectChange = (newSelectedRowKeys: React.Key[]) => {
|
const onSelectChange = (newSelectedRowKeys: React.Key[]) => {
|
||||||
|
@ -98,12 +101,30 @@ const BTable = (props: any) => {
|
||||||
setRecord(null);
|
setRecord(null);
|
||||||
setIsModalOpen(true);
|
setIsModalOpen(true);
|
||||||
};
|
};
|
||||||
|
const searchWidget = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{searchConfig ? <SimpleForm
|
||||||
|
formName={"search_form"}
|
||||||
|
formRef={searchFormRef}
|
||||||
|
colProps={30}
|
||||||
|
onFinish={() => { }}
|
||||||
|
formDatas={searchConfig} />
|
||||||
|
: null}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
||||||
{
|
{
|
||||||
config ? <Button type="default" onClick={() => addHandler()}>
|
config ? <div>
|
||||||
|
<Button type="default" onClick={() => addHandler()}>
|
||||||
{btnText ?? "添加部门"}
|
{btnText ?? "添加部门"}
|
||||||
</Button> : null
|
</Button>
|
||||||
|
{searchWidget()}
|
||||||
|
</div>: null
|
||||||
}
|
}
|
||||||
<Table
|
<Table
|
||||||
style={{ height: "100%", overflow: "auto" }}
|
style={{ height: "100%", overflow: "auto" }}
|
||||||
|
|
|
@ -24,6 +24,7 @@ export const items = [
|
||||||
icon: <DatabaseOutlined />,
|
icon: <DatabaseOutlined />,
|
||||||
children: [
|
children: [
|
||||||
{ label: "人员", key: "/source/list" },
|
{ label: "人员", key: "/source/list" },
|
||||||
|
{ label: "事件类型", key: "/source/type" },
|
||||||
{ label: "事件", key: "/source/event" }
|
{ label: "事件", key: "/source/event" }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { FormType } from "@/components/form/interface";
|
import { FormType } from "@/components/form/interface";
|
||||||
import { UserDataType } from "@/model/userModel";
|
import { UserDataType } from "@/model/userModel";
|
||||||
import SourceConfig from "@/service/source_config";
|
import SourceConfig from "@/service/source_config";
|
||||||
|
import { EventTypeConfig } from "@/service/user_config";
|
||||||
import { ColumnsType } from "antd/es/table";
|
import { ColumnsType } from "antd/es/table";
|
||||||
|
|
||||||
export const defaultConfig = [
|
export const defaultConfig = [
|
||||||
|
@ -31,6 +32,15 @@ export const defaultConfig = [
|
||||||
name: "address",
|
name: "address",
|
||||||
value: "",
|
value: "",
|
||||||
rules: [{ required: true, message: "请输入事件地点!" }],
|
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,
|
type: FormType.input,
|
||||||
|
@ -70,13 +80,7 @@ export const defaultConfig = [
|
||||||
value: "",
|
value: "",
|
||||||
rules: [{ required: true, message: "请输入负责人电话!" }],
|
rules: [{ required: true, message: "请输入负责人电话!" }],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: FormType.input,
|
|
||||||
label: "负责人身份证",
|
|
||||||
name: "id_card",
|
|
||||||
value: "",
|
|
||||||
rules: [{ required: true, message: "请输入负责人身份证!" }],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: FormType.fetchList,
|
type: FormType.fetchList,
|
||||||
label: "参与人员选择",
|
label: "参与人员选择",
|
||||||
|
@ -110,7 +114,7 @@ export const defaultConfig = [
|
||||||
label: "现场拍摄",
|
label: "现场拍摄",
|
||||||
name: "images",
|
name: "images",
|
||||||
value: [],
|
value: [],
|
||||||
rules: [{ required: true, message: "现场图片不能为空!" }],
|
rules: [],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -153,8 +157,5 @@ export const columns: ColumnsType<UserDataType> = [
|
||||||
title: "电话",
|
title: "电话",
|
||||||
dataIndex: "tel",
|
dataIndex: "tel",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "负责人身份证",
|
|
||||||
dataIndex: "id_card",
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -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",
|
||||||
|
},
|
||||||
|
|
||||||
|
];
|
|
@ -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));
|
|
@ -1,7 +1,7 @@
|
||||||
import { FormType } from "@/components/form/interface";
|
import { FormType } from "@/components/form/interface";
|
||||||
import { UserDataType } from "@/model/userModel";
|
import { UserDataType } from "@/model/userModel";
|
||||||
import SourceConfig from "@/service/source_config";
|
// import SourceConfig from "@/service/source_config";
|
||||||
import { CompanyConfig, DepConfig, MenuConfig } from "@/service/user_config";
|
// import { CompanyConfig, DepConfig, MenuConfig } from "@/service/user_config";
|
||||||
import { ColumnsType } from "antd/lib/table";
|
import { ColumnsType } from "antd/lib/table";
|
||||||
|
|
||||||
export const defaultConfig = [
|
export const defaultConfig = [
|
||||||
|
@ -29,15 +29,15 @@ export const defaultConfig = [
|
||||||
// value: "",
|
// value: "",
|
||||||
// rules: [],
|
// rules: [],
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
type: FormType.treeSelect,
|
// type: FormType.treeSelect,
|
||||||
label: "所属单位",
|
// label: "所属单位",
|
||||||
name: "company_id",
|
// name: "company_id",
|
||||||
treeCheckbox:false,
|
// treeCheckbox:false,
|
||||||
selectUrl: CompanyConfig.LIST,
|
// selectUrl: CompanyConfig.LIST,
|
||||||
value: "",
|
// value: "",
|
||||||
rules: [{ required: true, message: "所属单位不能为空" }],
|
// rules: [{ required: true, message: "所属单位不能为空" }],
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// type: FormType.treeSelect,
|
// type: FormType.treeSelect,
|
||||||
// treeCheckbox:true,
|
// treeCheckbox:true,
|
||||||
|
@ -69,13 +69,13 @@ export const columns: ColumnsType<UserDataType> = [
|
||||||
dataIndex: "desc",
|
dataIndex: "desc",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
// {
|
||||||
title: "菜单权限",
|
// title: "菜单权限",
|
||||||
dataIndex: "menu_rights",
|
// dataIndex: "menu_rights",
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
title: "接口权限",
|
// title: "接口权限",
|
||||||
dataIndex: "api_rights",
|
// dataIndex: "api_rights",
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
|
|
|
@ -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: "角色不能为空" }],
|
||||||
|
},
|
||||||
|
];
|
|
@ -4,6 +4,7 @@ import { useEffect } from "react";
|
||||||
import { Store } from "antd/lib/form/interface";
|
import { Store } from "antd/lib/form/interface";
|
||||||
import { columns, defaultConfig } from "./user_config";
|
import { columns, defaultConfig } from "./user_config";
|
||||||
import "./user.less";
|
import "./user.less";
|
||||||
|
import { searchConfig } from "./search_config";
|
||||||
|
|
||||||
const User = (props: Store) => {
|
const User = (props: Store) => {
|
||||||
const { usrStore } = props;
|
const { usrStore } = props;
|
||||||
|
@ -28,6 +29,7 @@ const User = (props: Store) => {
|
||||||
columns={columns}
|
columns={columns}
|
||||||
btnText="添加人员"
|
btnText="添加人员"
|
||||||
dataSource={usrStore.list}
|
dataSource={usrStore.list}
|
||||||
|
searchConfig={searchConfig}
|
||||||
deleteCallback={(record) => {
|
deleteCallback={(record) => {
|
||||||
usrStore.deleteItem(record);
|
usrStore.deleteItem(record);
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import Permission from "@/pages/permission";
|
||||||
import Dep from "@/pages/dep";
|
import Dep from "@/pages/dep";
|
||||||
import Company from "@/pages/company";
|
import Company from "@/pages/company";
|
||||||
import Event from "@/pages/event";
|
import Event from "@/pages/event";
|
||||||
|
import EventType from "@/pages/event_type";
|
||||||
import { My } from "@/pages/my";
|
import { My } from "@/pages/my";
|
||||||
import Work from "@/pages/work";
|
import Work from "@/pages/work";
|
||||||
|
|
||||||
|
@ -43,6 +44,12 @@ const routers = createHashRouter([
|
||||||
index: true,
|
index: true,
|
||||||
element: <Event />,
|
element: <Event />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/source/type",
|
||||||
|
index: true,
|
||||||
|
element: <EventType />,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "/permi/permi",
|
path: "/permi/permi",
|
||||||
index: true,
|
index: true,
|
||||||
|
|
|
@ -45,6 +45,12 @@ class EventConfig {
|
||||||
static DELETE: string = "/thing";
|
static DELETE: string = "/thing";
|
||||||
static ThingList: string = "/thing/byIdcard";
|
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 {
|
class ShareConfig {
|
||||||
static ADD: string = "/share";
|
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 };
|
|
@ -6,6 +6,7 @@ import depStore from './dep';
|
||||||
import companyStore from './company';
|
import companyStore from './company';
|
||||||
import thingStore from './thing';
|
import thingStore from './thing';
|
||||||
import shareStore from './share';
|
import shareStore from './share';
|
||||||
|
import thingTypeStore from './thing_type';
|
||||||
|
|
||||||
const store = {
|
const store = {
|
||||||
usrStore,
|
usrStore,
|
||||||
|
@ -16,6 +17,7 @@ const store = {
|
||||||
companyStore,
|
companyStore,
|
||||||
thingStore,
|
thingStore,
|
||||||
shareStore,
|
shareStore,
|
||||||
|
thingTypeStore
|
||||||
};
|
};
|
||||||
|
|
||||||
export default store;
|
export default store;
|
|
@ -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;
|
Loading…
Reference in New Issue