{
display: "flex",
alignItems: "center",
justifyContent: "center",
- padding:"10px"
+ padding: "10px",
}}
>
{preView()}
diff --git a/src/pages/home/homeRigrt/ac.tsx b/src/pages/home/homeRigrt/ac.tsx
index 22ba775..1894df2 100644
--- a/src/pages/home/homeRigrt/ac.tsx
+++ b/src/pages/home/homeRigrt/ac.tsx
@@ -179,7 +179,7 @@ const Ac = (props: Store) => {
{
);
})}
+
{
);
})}
+
{preView()}
diff --git a/src/pages/home/homeRigrt/kanban.less b/src/pages/home/homeRigrt/kanban.less
index 260a9d8..c392cee 100644
--- a/src/pages/home/homeRigrt/kanban.less
+++ b/src/pages/home/homeRigrt/kanban.less
@@ -4,5 +4,6 @@
display: flex;
align-items: center;
justify-content: center;
- border: 1px solid;
+ border: 1px solid rgba(255, 255, 255, 0.3);
+ box-sizing: border-box;
}
diff --git a/src/pages/home/homeRigrt/kanban.tsx b/src/pages/home/homeRigrt/kanban.tsx
index 7209f5b..53665dc 100644
--- a/src/pages/home/homeRigrt/kanban.tsx
+++ b/src/pages/home/homeRigrt/kanban.tsx
@@ -1,11 +1,13 @@
-import Col from "antd/es/col";
-import { Row } from "antd/lib/grid";
import * as echarts from "echarts";
import "./kanban.less";
import { useEffect } from "react";
+import Timer from "../homeLeft/timer";
+import { inject, observer } from "mobx-react";
+import { Store } from "antd/es/form/interface";
-const KanBan = () => {
+const KanBan = (props: Store) => {
+ const { homeStore } = props;
const initChart = () => {
var myChart = echarts.init(document.getElementById("yibiaopan"));
var option = {
@@ -15,30 +17,20 @@ const KanBan = () => {
center: ["50%", "70%"],
startAngle: 200,
endAngle: -20,
- radius:70,
+ radius: 100,
min: 0,
max: 30,
splitNumber: 12,
itemStyle: {
color: "#FFAB91",
},
- axisLabel: {
- distance: -20,
- color: "#999",
- fontSize: 20,
- },
- anchor: {
- show: false,
- },
- title: {
- show: true,
- },
+
detail: {
valueAnimation: true,
width: "40%",
- lineHeight: 40,
+ lineHeight: 80,
borderRadius: 8,
- offsetCenter: [0, "-10%"],
+ offsetCenter: [0, "10%"],
fontSize: 20,
fontWeight: "bolder",
formatter: "{value} °C",
@@ -54,12 +46,12 @@ const KanBan = () => {
type: "gauge",
center: ["50%", "70%"],
startAngle: 200,
- radius:70,
- endAngle: -20,
+ radius: 80,
+ endAngle: 10,
min: 0,
max: 60,
itemStyle: {
- color: "#FD7347",
+ color: "#FD7347"
},
progress: {
show: true,
@@ -74,12 +66,8 @@ const KanBan = () => {
axisTick: {
show: false,
},
- splitLine: {
- show: false,
- },
- axisLabel: {
- show: false,
- },
+ splitLine: { show: false },
+ axisLabel: { show: false },
detail: {
show: false,
},
@@ -93,7 +81,8 @@ const KanBan = () => {
};
option && myChart.setOption(option);
};
- const sourece = (id: string) => {
+
+ const guoqi = (id: string, list: any) => {
var myChart = echarts.init(document.getElementById(id));
var option = {
legend: {
@@ -115,92 +104,19 @@ const KanBan = () => {
formatter: "{b}:{c}",
},
},
- data: [
- { value: 40, name: "第三方" },
- { value: 18, name: "购买" },
- { value: 18, name: "自有" },
- ],
+ data: list,
},
],
};
option && myChart.setOption(option);
};
- const guoqi = (id: string) => {
- var myChart = echarts.init(document.getElementById(id));
- var option = {
- legend: {
- top: "bottom",
- show: false,
- },
- series: [
- {
- type: "pie",
- radius: [30, 80],
- center: ["50%", "50%"],
- itemStyle: {
- borderRadius: 2,
- },
- label: {
- normal: {
- show: true,
- position: "inner",
- formatter: "{b}:{c}",
- },
- },
- data: [
- { value: 40, name: "即将过期" },
- { value: 18, name: "已经过期" },
- { value: 18, name: "未过期" },
- ],
- },
- ],
- };
- option && myChart.setOption(option);
- };
- const outin = (id: string) => {
- var myChart = echarts.init(document.getElementById(id));
- var option = {
- legend: {
- top: "bottom",
- show: false,
- },
- series: [
- {
- type: "pie",
- radius: [30, 80],
- center: ["50%", "50%"],
- itemStyle: {
- borderRadius: 2,
- },
- label: {
- normal: {
- show: true,
- position: "inner",
- formatter: "{b}:{c}",
- },
- },
- data: [
- { value: 40, name: "出库" },
- { value: 18, name: "入库" },
- ],
- },
- ],
- };
- option && myChart.setOption(option);
- };
- const gailan = () => {
+
+ const gailan = (list) => {
var myChart = echarts.init(document.getElementById("gailan"));
var option = {
xAxis: {
type: "category",
- data: [
- "个人携行",
- "反恐维稳",
- "反恐维稳",
- "地震救援",
- "防汛抗洪",
- "灭火救援",
- ],
+ data: list.map((item) => item.name),
axisLabel: {
show: true,
interval: 0,
@@ -216,7 +132,7 @@ const KanBan = () => {
},
series: [
{
- data: [820, 932, 901, 934, 1290, 1330],
+ data: list.map((item) => item.value),
type: "line",
smooth: true,
areaStyle: {
@@ -239,44 +155,73 @@ const KanBan = () => {
};
useEffect(() => {
initChart();
- sourece("sourece");
- guoqi("yujing");
- outin("baozhiqi");
- sourece("level");
- gailan();
- }, []);
+
+ homeStore.getMm().then((res) => {
+ gailan(res.data?.record ?? []);
+ });
+ homeStore.getmmb().then((res) => {
+ guoqi("yujing", [
+ { value: res.data?.record?.other_num??0, name: "第三方" },
+ { value: res.data?.record?.own_num??0, name: "自有" },
+ ]);
+ guoqi("sourece", [
+ { value: res.data?.record?.jygq??0, name: "即将过期" },
+ { value: res.data?.record?.gq??0, name: "已经过期" },
+ { value: res.data?.record?.bgq??0, name: "未过期" },
+ ]);
+ guoqi("level", [
+ { value: res.data?.record?.drck??0, name: "当日出库" },
+ { value: res.data?.record?.drrk??0, name: "当日入库" },
+ ]);
+ });
+
+ }, [homeStore]);
return (
- <>
-
-
+
+
+
-
-
- 安全运行天数
-
-
- 109
-
-
2024 / 12 / 12 星期四 09:10
-
+
+ 安全运行天数
+
+
+ 109
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
);
};
-export default KanBan;
+export default inject("homeStore")(observer(KanBan));
diff --git a/src/pages/materialMgmt/material.tsx b/src/pages/materialMgmt/material.tsx
index 77ff33f..c161058 100644
--- a/src/pages/materialMgmt/material.tsx
+++ b/src/pages/materialMgmt/material.tsx
@@ -118,6 +118,7 @@ const Material = (props: Store) => {
const edit = (record) => {
setIsModalOpen(true);
record.expiry_date = dayjs(record.expiry_date);
+ record.supplie_piker=record.supplie_piker===""?[]:record.supplie_piker
setRecord(record);
};
@@ -130,7 +131,6 @@ const Material = (props: Store) => {
...values,
pid: values.pid ?? 0,
storage_cloumn: Number(values.storage_cloumn),
- // supplie_piker: values.supplie_piker[0].name,
};
if (values.supplie_piker.length > 0) {
data.supplie_piker = values.supplie_piker[0].name;
diff --git a/src/pages/materialMgmt/material_column.tsx b/src/pages/materialMgmt/material_column.tsx
index a1b7e6a..0555d34 100644
--- a/src/pages/materialMgmt/material_column.tsx
+++ b/src/pages/materialMgmt/material_column.tsx
@@ -77,5 +77,6 @@ export const defaultConfig = [
label: "物资图片",
name: "supplie_piker",
value: [],
+ rules: [{ required: true, message: "请上传物资图片!" }],
},
];
diff --git a/src/pages/poverPage/index.tsx b/src/pages/poverPage/index.tsx
index b368803..6834ce3 100644
--- a/src/pages/poverPage/index.tsx
+++ b/src/pages/poverPage/index.tsx
@@ -1,5 +1,4 @@
import { useEffect, useState } from "react";
-import * as echarts from "echarts";
import "./pv.less";
import { SnippetsTwoTone } from "@ant-design/icons";
import { inject, observer } from "mobx-react";
@@ -9,61 +8,13 @@ import PoverDetail from "../poverDetail";
const PoverPage = (props: Store) => {
const { usrStore } = props;
const [poverData, setPover] = useState
();
- const [config, setConfig] = useState({
- militia_type: 1,
- vet: 1,
- o_type: "",
- });
- const initChart = (id: string, count: number, total: number) => {
- var myChart = echarts.init(document.getElementById(id));
- var option = {
- title: {
- text: count,
- left: "center",
- top: "center",
- textStyle: {
- color: "#fff",
- fontSize: "18px",
- },
- },
- series: [
- {
- type: "pie",
- radius: ["70%", "100%"],
- center: ["50%", "50%"],
- color: "#000",
- data: [
- {
- value: count,
- itemStyle: { color: "#254e99", borderRadius: 100 },
- emphasis: { scale: false },
- },
- {
- value: total,
- itemStyle: { color: "#f5f5f5" },
- emphasis: { scale: false },
- },
- ],
- label: {
- show: false,
- },
- animationDelay: function (idx) {
- return Math.random() * 200;
- },
- },
- ],
- };
- myChart.setOption(option);
- };
useEffect(() => {
usrStore.getPover().then((e) => {
- initChart("pover_jg", e.data.o_type, e.data.total);
- initChart("pover_jgs", e.data.o_types, e.data.total);
setPover(e.data);
});
}, [usrStore]);
- const serch = () => {
- usrStore.getPoverList(config);
+ const serch = (configs) => {
+ usrStore.getPoverList(configs);
};
return (
{
}}
>
-
+
+
{
- setConfig({
+ serch({
+ o_type: "01JAZB1GVJED5R34V6Z8MBWER4",
+ size: 30,
+ offset: 1,
+ });
+ }}
+ >
+
{poverData?.o_types}人
+
机关单位
+
+
+
+
+
+
{
+ serch({
o_type: "01JAZAZDTHJE8FZ24GY9AJ758N",
size: 30,
offset: 1,
});
- serch();
}}
- >
-
机关单位
+ >
+
{poverData?.o_type}人
+
企事业单位
+
-
{
- setConfig({
- o_type: "01JAZB1GVJED5R34V6Z8MBWER4",
- size: 30,
- offset: 1,
- });
- serch();
- }}
- >
-
-
企事业单位
+
+
+
+
{
+ serch({
+ o_type: "01JAZB1QSM13C7PHZBTSDE1VXE",
+ size: 30,
+ offset: 1,
+ });
+ }}
+ >
+
{poverData?.news_num}人
+
新兴领域
+
@@ -115,12 +84,11 @@ const PoverPage = (props: Store) => {
{
- setConfig({
+ serch({
militia_type: 1,
size: 30,
offset: 1,
});
- serch();
}}
>
@@ -133,12 +101,11 @@ const PoverPage = (props: Store) => {
{
- setConfig({
+ serch({
militia_type: 2,
size: 30,
offset: 1,
});
- serch();
}}
>
{poverData?.easy_meber}人
@@ -149,18 +116,32 @@ const PoverPage = (props: Store) => {
{
- setConfig({
+ serch({
vet: 1,
size: 30,
offset: 1,
});
- serch();
}}
>
{poverData?.vet_meber}人
退役军人
+
+
+
{
+ serch({
+ grid_user: 1,
+ size: 30,
+ offset: 1,
+ });
+ }}
+ >
+
{poverData?.grid_meber}人
+
网格员
+
+
diff --git a/src/pages/poverPage/pv.less b/src/pages/poverPage/pv.less
index 4c87438..4d8b6c0 100644
--- a/src/pages/poverPage/pv.less
+++ b/src/pages/poverPage/pv.less
@@ -14,7 +14,6 @@
justify-content: start;
}
.content-right {
- width: 85%;
height: 100%;
overflow: auto;
text-align: center;
diff --git a/src/pages/signin/column.tsx b/src/pages/signin/column.tsx
index 7668f0d..add6622 100644
--- a/src/pages/signin/column.tsx
+++ b/src/pages/signin/column.tsx
@@ -16,16 +16,32 @@ export const studyColumns: ColumnsType
= [
dataIndex: "tel",
},
{
- title: "签到时间",
+ title: "上午签到时间",
dataIndex: "created_at",
render(leave_start_time) {
+ if (!leave_start_time){
+ return "未签到";
+ }
return dayjs(leave_start_time).format("YYYY-MM-DD HH:mm");
},
},
{
- title: "签到地址",
+ title: "下午签到时间",
+ render(record) {
+ if (record.created_at === record.updated_at){
+ return "未签到";
+ }
+ return dayjs(record.created_at).format("YYYY-MM-DD HH:mm");
+ },
+ },
+ {
+ title: "上午签到地址",
dataIndex: "address",
},
+ {
+ title: "下午签到地址",
+ dataIndex: "pm_address",
+ },
// {
// title: "经度",
// dataIndex: "long",
@@ -65,5 +81,4 @@ export const serchConfig = [
value: "",
rules: [],
},
-
-];
\ No newline at end of file
+];
diff --git a/src/pages/user/user_config.tsx b/src/pages/user/user_config.tsx
index e871560..b4e6a6c 100644
--- a/src/pages/user/user_config.tsx
+++ b/src/pages/user/user_config.tsx
@@ -1,10 +1,9 @@
import { FormType } from "@/components/form/interface";
import { UserDataType } from "@/model/userModel";
import { ColumnsType } from "antd/lib/table";
-import { Avatar, Image } from "antd";
+import { Avatar, Image, Tooltip } from "antd";
import { getAgeByIDCard, getBirthDateAndGender } from "@/util/util";
-export const defaultConfig =(team,per)=>
-[
+export const defaultConfig = (team, per) => [
{
type: FormType.input,
label: "用户名",
@@ -131,7 +130,7 @@ export const defaultConfig =(team,per)=>
value: 0,
rules: [{ required: true, message: "请选择是否民兵" }],
},
-
+
{
type: FormType.input,
label: "身份证",
@@ -158,7 +157,7 @@ export const defaultConfig =(team,per)=>
type: FormType.cehckboxGroup,
label: "所属队伍",
name: "team_link_user",
- checkboxData:team,
+ checkboxData: team,
value: "",
rules: [{ required: true, message: "请选择所属队伍" }],
},
@@ -166,7 +165,7 @@ export const defaultConfig =(team,per)=>
type: FormType.cehckboxGroup,
label: "个人身份属性",
name: "pers_link_user",
- checkboxData:per,
+ checkboxData: per,
value: "",
rules: [{ required: true, message: "请选择个人身份属性" }],
},
@@ -206,7 +205,6 @@ export const defaultConfig =(team,per)=>
value: "",
},
-
{
type: FormType.date,
label: "入伍时间",
@@ -225,7 +223,7 @@ export const defaultConfig =(team,per)=>
name: "serv_unit",
value: "",
},
-
+
{
type: FormType.input,
label: "专业特长",
@@ -279,7 +277,9 @@ export const columns: ColumnsType = [
{
title: "性别",
width: 100,
- render: (render) => {getBirthDateAndGender(render.id_card)?.gender},
+ render: (render) => (
+ {getBirthDateAndGender(render.id_card)?.gender}
+ ),
},
{
title: "年龄",
@@ -290,8 +290,10 @@ export const columns: ColumnsType = [
title: "头像",
dataIndex: "head_img",
width: 150,
- render: (head_img) =>{
- return } />
+ render: (head_img) => {
+ return (
+ } />
+ );
},
},
{
@@ -314,7 +316,7 @@ export const columns: ColumnsType = [
width: 150,
dataIndex: "pos_held",
},
-
+
{
title: "邮箱",
width: 150,
@@ -351,7 +353,15 @@ export const columns: ColumnsType = [
},
{
title: "备注",
- width: 300,
dataIndex: "remark",
+ ellipsis: {
+ showTitle: false,
+ },
+ width:200,
+ render: (remark) => (
+
+ {remark}
+
+ ),
},
];
diff --git a/src/store/home.ts b/src/store/home.ts
index 16b9cc6..6cf7374 100644
--- a/src/store/home.ts
+++ b/src/store/home.ts
@@ -10,6 +10,7 @@ class HomeConfig {
static tr: string = "/v1/public/tr"
static af: string = "/v1/public/af"
static mm: string = "/v1/public/mm"
+ static mmb: string = "/v1/public/mmb"
static rm: string = "/v1/public/rm"
static ae: string = "/v1/public/ae"
static todo: string = "/v1/public/todo"
@@ -63,6 +64,9 @@ class HomeStore extends BaseStore {
async getRm() {
return await baseHttp.get(HomeConfig.rm, {});
}
+ async getmmb() {
+ return await baseHttp.get(HomeConfig.mmb, {});
+ }
async getAe() {
return await baseHttp.get(HomeConfig.ae, {});
}