From a36ea869acdc6f24490e016cbadf0f8f5d3f34e6 Mon Sep 17 00:00:00 2001
From: wang_yp <357754663@qq.com>
Date: Tue, 12 Aug 2025 14:43:18 +0800
Subject: [PATCH] fix(icc add hls)
---
src/components/b_table.tsx | 1 +
src/pages/company/index.tsx | 2 +-
src/pages/user/user.tsx | 2 +-
src/pages/user/user_config.tsx | 21 ++++++++-------------
src/store/baseStore.ts | 5 +++++
5 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/components/b_table.tsx b/src/components/b_table.tsx
index 1780f60..442c12c 100644
--- a/src/components/b_table.tsx
+++ b/src/components/b_table.tsx
@@ -111,6 +111,7 @@ const BTable = (props: any) => {
scroll={scroll}
loading={store.listStatus}
rowSelection={rowSelection}
+ rowKey={(record) => record.id}
columns={[...props.columns, actionDefultColumn]}
dataSource={dataSource}
/>
diff --git a/src/pages/company/index.tsx b/src/pages/company/index.tsx
index 027009b..ea26193 100644
--- a/src/pages/company/index.tsx
+++ b/src/pages/company/index.tsx
@@ -9,7 +9,7 @@ const Company = (props: Store) => {
const { companyStore } = props;
useEffect(() => {
- companyStore.getlist();
+ companyStore.getlist()
}, [companyStore]);
return (
diff --git a/src/pages/user/user.tsx b/src/pages/user/user.tsx
index 4d6425b..0c36485 100644
--- a/src/pages/user/user.tsx
+++ b/src/pages/user/user.tsx
@@ -18,7 +18,7 @@ const User = (props: Store) => {
element.thing_ids = element.thing.map((item) => item.thing_identity)
}
});
- }, [usrStore]);
+ }, [usrStore, usrStore.isRefresh]);
return (
diff --git a/src/pages/user/user_config.tsx b/src/pages/user/user_config.tsx
index 99da040..5699f80 100644
--- a/src/pages/user/user_config.tsx
+++ b/src/pages/user/user_config.tsx
@@ -13,13 +13,6 @@ export const defaultConfig = [
value: "",
rules: [{ required: true, message: "请输入用户名称!" }],
},
- // {
- // type: FormType.input,
- // label: "身份证",
- // name: "id_card",
- // value: "",
- // rules: [{ required: true, message: "请输入身份证" }],
- // },
{
type: FormType.input,
label: "登录账号",
@@ -71,6 +64,7 @@ export const defaultConfig = [
keys: "company_id",
rules: [{ required: true, message: "所属单位不能为空" }],
},
+
{
type: FormType.select,
label: "角色",
@@ -79,18 +73,19 @@ export const defaultConfig = [
value: "",
rules: [{ required: true, message: "角色不能为空" }],
},
- // {
- // type: FormType.input,
- // label: "邮箱",
- // name: "email",
- // value: "",
- // },
+ {
+ type: FormType.inputNumber,
+ label: "排序",
+ name: "orders",
+ value: 0,
+ },
{
type: FormType.upload,
label: "头像",
name: "head_img",
value: [],
},
+
];
diff --git a/src/store/baseStore.ts b/src/store/baseStore.ts
index 842c449..6111f94 100644
--- a/src/store/baseStore.ts
+++ b/src/store/baseStore.ts
@@ -13,6 +13,7 @@ interface BaseStoreInterface {
page: Pages
setPages(pages: Pages): any
listStatus: boolean | null | undefined
+ isRefresh: boolean
}
class BaseStore implements BaseStoreInterface {
@@ -32,6 +33,7 @@ class BaseStore implements BaseStoreInterface {
})
this.urlConfig = urlConfig;
}
+
// 删除
async deleteItem(id: number) {
@@ -57,6 +59,7 @@ class BaseStore implements BaseStoreInterface {
message.error(res.msg)
return false
}
+ this.isRefresh = true
this.getlist(listParam)
return true;
} catch (error) {
@@ -72,6 +75,7 @@ class BaseStore implements BaseStoreInterface {
message.error(res.msg)
return false
}
+ this.isRefresh = true
this.getlist(listParam)
return true;
} catch (error) {
@@ -117,6 +121,7 @@ class BaseStore implements BaseStoreInterface {
total!: number;
page!: Pages;
listStatus: boolean | null | undefined;
+ isRefresh!: boolean;
}
export default BaseStore
\ No newline at end of file