-
{homeStore.ogMap?.count??0}
+
{homeStore.ogMap?.count ?? 0}
党组织数量
-
{homeStore.ogMap?.member_count??0}
+
{homeStore.ogMap?.member_count ?? 0}
党员数量
diff --git a/src/pages/home/homeRigrt/kanban.tsx b/src/pages/home/homeRigrt/kanban.tsx
index 7939d7b..7209f5b 100644
--- a/src/pages/home/homeRigrt/kanban.tsx
+++ b/src/pages/home/homeRigrt/kanban.tsx
@@ -12,43 +12,16 @@ const KanBan = () => {
series: [
{
type: "gauge",
- center: ["40%", "70%"],
+ center: ["50%", "70%"],
startAngle: 200,
endAngle: -20,
+ radius:70,
min: 0,
max: 30,
splitNumber: 12,
itemStyle: {
color: "#FFAB91",
},
- progress: {
- show: true,
- width: 20,
- },
- pointer: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- width: 15,
- },
- },
- axisTick: {
- distance: -45,
- splitNumber: 5,
- lineStyle: {
- width: 2,
- color: "#999",
- },
- },
- splitLine: {
- distance: -42,
- length: 14,
- lineStyle: {
- width: 3,
- color: "#999",
- },
- },
axisLabel: {
distance: -20,
color: "#999",
@@ -58,7 +31,7 @@ const KanBan = () => {
show: false,
},
title: {
- show: false,
+ show: true,
},
detail: {
valueAnimation: true,
@@ -79,8 +52,9 @@ const KanBan = () => {
},
{
type: "gauge",
- center: ["40%", "70%"],
+ center: ["50%", "70%"],
startAngle: 200,
+ radius:70,
endAngle: -20,
min: 0,
max: 60,
@@ -89,7 +63,7 @@ const KanBan = () => {
},
progress: {
show: true,
- width: 8,
+ width: 6,
},
pointer: {
show: false,
@@ -129,11 +103,18 @@ const KanBan = () => {
series: [
{
type: "pie",
- radius: [40, 80],
+ 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: "购买" },
@@ -144,12 +125,82 @@ const KanBan = () => {
};
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 = () => {
var myChart = echarts.init(document.getElementById("gailan"));
var option = {
xAxis: {
type: "category",
- data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+ data: [
+ "个人携行",
+ "反恐维稳",
+ "反恐维稳",
+ "地震救援",
+ "防汛抗洪",
+ "灭火救援",
+ ],
axisLabel: {
show: true,
interval: 0,
@@ -165,7 +216,7 @@ const KanBan = () => {
},
series: [
{
- data: [820, 932, 901, 934, 1290, 1330, 1320],
+ data: [820, 932, 901, 934, 1290, 1330],
type: "line",
smooth: true,
areaStyle: {
@@ -189,8 +240,8 @@ const KanBan = () => {
useEffect(() => {
initChart();
sourece("sourece");
- sourece("yujing");
- sourece("baozhiqi");
+ guoqi("yujing");
+ outin("baozhiqi");
sourece("level");
gailan();
}, []);
diff --git a/src/pages/home/homeRigrt/pyzx.tsx b/src/pages/home/homeRigrt/pyzx.tsx
index d117ba4..4c49103 100644
--- a/src/pages/home/homeRigrt/pyzx.tsx
+++ b/src/pages/home/homeRigrt/pyzx.tsx
@@ -18,7 +18,7 @@ const Pyzx = (props: Store) => {
diff --git a/src/pages/home/video.tsx b/src/pages/home/video.tsx
new file mode 100644
index 0000000..b76ae2e
--- /dev/null
+++ b/src/pages/home/video.tsx
@@ -0,0 +1,29 @@
+import { Store } from "antd/es/form/interface";
+import { inject, observer } from "mobx-react";
+import { useEffect } from "react";
+import ReactPlayer from "react-player";
+
+const Video = (props: Store) => {
+ const { homeStore } = props;
+ useEffect(() => {
+ homeStore.getNewTask();
+ }, [homeStore]);
+ return (
+ <>
+ {homeStore.showVideo ? (
+
+ ) : (
+ <>>
+ )}
+ >
+ );
+};
+
+export default inject("homeStore")(observer(Video));
diff --git a/src/pages/org_config.ts b/src/pages/org_config.ts
index 659d9c7..35f8bee 100644
--- a/src/pages/org_config.ts
+++ b/src/pages/org_config.ts
@@ -59,7 +59,7 @@ export const orgData = [
},
{
position: "战士",
- user_name: "王小四7",
+ user_name: "wang_yp",
userId: 13,
},
],
@@ -226,7 +226,7 @@ export const orgData = [
},
{
position: "战士",
- user_name: "王小五",
+ user_name: "wang_yp",
userId: 13,
},
],
diff --git a/src/store/home.ts b/src/store/home.ts
index 01cc959..ab68411 100644
--- a/src/store/home.ts
+++ b/src/store/home.ts
@@ -11,8 +11,7 @@ class HomeConfig {
static mm: string = "public/mm"
static rm: string = "public/rm"
static ae: string = "public/ae"
-
-
+ static newTask: string = "user/newTask"
}
class HomeStore extends BaseStore
{
constructor() {
@@ -21,6 +20,8 @@ class HomeStore extends BaseStore {
getOgCount: action,
ogMap: observable,
alist: observable,
+ showVideo: observable,
+ showVideoHandler: action,
})
}
@@ -44,7 +45,17 @@ class HomeStore extends BaseStore {
async getAe() {
return await baseHttp.get(HomeConfig.ae, {});
}
+ async getNewTask() {
+ let res = await baseHttp.get(HomeConfig.newTask, {});
+ if (res.data?.record) {
+ this.showVideoHandler(true)
+ }
+ }
+ showVideoHandler(status) {
+ this.showVideo = status
+ }
ogMap!: Object;
+ showVideo!: boolean;
alist!: Array;
}
const homeStore = new HomeStore()
diff --git a/src/util/config.ts b/src/util/config.ts
index 90d37e5..603e062 100644
--- a/src/util/config.ts
+++ b/src/util/config.ts
@@ -1,13 +1,11 @@
class Config {
- // static baseUrl = "https://rw.quwanya.cn/";
- // static uploadUrl = "https://rw.quwanya.cn/";
- // static ws = "wss://rw.quwanya.cn/ws";
-
- static ws = "ws://127.0.0.1:12214/ws?id=admin";
- static baseUrl = "http://127.0.0.1:12214/";
- static uploadUrl = "http://127.0.0.1:12214/";
+ static baseUrl = "https://rw.quwanya.cn/";
+ static uploadUrl = "https://rw.quwanya.cn/";
+ static ws = "wss://rw.quwanya.cn/wsadmin?id=admin";
static rtc = "wss://rw.quwanya.cn/ws";
-
+ // static ws = "ws://127.0.0.1:12214/ws?id=admin";
+ // static baseUrl = "http://127.0.0.1:12214/";
+ // static uploadUrl = "http://127.0.0.1:12214/";
}
export default Config;