Commit 513dcad6 authored by wuhao's avatar wuhao 🎯

asder

parent 6c794ea1
Pipeline #6558 passed with stages
in 11 minutes and 17 seconds
export default { export default {
dev: { dev: {
REACT_APP_URL: "/vstp", // http://tasks-dev.nangaoyun.com REACT_APP_URL: "http://jmcl.nangaoyun.com/vstp", // http://tasks-dev.nangaoyun.com
DEFAULT_HEAD_IMG: "./assets/images/avatars/avatar_21.jpg", DEFAULT_HEAD_IMG: "./assets/images/avatars/avatar_21.jpg",
DEFAULT_404_IMG: "./assets/illustrations/illustration_404.svg", DEFAULT_404_IMG: "./assets/illustrations/illustration_404.svg",
DOWNLOAD_URL: "http://192.168.40.2", DOWNLOAD_URL: "http://192.168.40.2",
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
export default { export default {
dev: { dev: {
"/vstp/": { "/vstp/": {
target: "http://192.168.40.146:8044", target: "http://jmcl.nangaoyun.com/vstp/",
changeOrigin: true, changeOrigin: true,
// pathRewrite: { "^/vstp": "" }, // pathRewrite: { "^/vstp": "" },
}, },
......
...@@ -11,7 +11,9 @@ import { useRequest } from "ahooks"; ...@@ -11,7 +11,9 @@ import { useRequest } from "ahooks";
import { Divider, Drawer, message, Table, Tabs, Tag, Tooltip } from "antd"; import { Divider, Drawer, message, Table, Tabs, Tag, Tooltip } from "antd";
import { useMemo, useRef, useState } from "react"; import { useMemo, useRef, useState } from "react";
import "./index.less"; import "./index.less";
function removeFirstAndLastChar(str) {
return str.substring(1, str.length - 1);
}
function Checkhomework() { function Checkhomework() {
const actionRef = useRef(), const actionRef = useRef(),
formRef = useRef(), formRef = useRef(),
...@@ -524,26 +526,23 @@ function Checkhomework() { ...@@ -524,26 +526,23 @@ function Checkhomework() {
rowKey={"id"} rowKey={"id"}
dataSource={ dataSource={
dialogprops?.tabdata?.PeculiarityInfosDict dialogprops?.tabdata?.PeculiarityInfosDict
? Object.values( ? Object.values(dialogprops?.tabdata?.PeculiarityInfosDict)
dialogprops?.tabdata?.PeculiarityInfosDict ?.map((it, i) => {
)?.map((it, i) => return it?.map((item, index) => {
it?.[0] return {
? { ...item,
...it?.[0], id: i + "," + index,
id: i + 1, };
} });
: {} })
) ?.flat()
: [] : []
} }
expandable={{ expandable={{
expandedRowRender: ({ ElementInfoList }) => { expandedRowRender: ({ ElementInfoList, PointList }) => {
return ( return (
<div style={{ display: "flex", gap: 6 }}> <div style={{ display: "flex", gap: 6 }}>
{ElementInfoList?.map((it) => { {ElementInfoList?.map((it) => {
function removeFirstAndLastChar(str) {
return str.substring(1, str.length - 1);
}
return ( return (
<div <div
style={{ style={{
...@@ -587,6 +586,45 @@ function Checkhomework() { ...@@ -587,6 +586,45 @@ function Checkhomework() {
</div> </div>
); );
})} })}
<div
style={{
padding: 12,
backgroundColor: "#f0f0f0",
display: "inline-block",
borderRadius: 4,
marginBottom: 6,
}}
>
<span style={{ paddingRight: 12 }}>点集合</span>
{PointList?.map((its) => (
<Tooltip
key={its?.id}
title={
<div
dangerouslySetInnerHTML={{
__html: removeFirstAndLastChar(
JSON.stringify(its.Position)
).replace(/,/g, "<br/>"),
}}
></div>
}
>
<Tag
onClick={() => {
setDrawer((s) => ({
...s,
position: its.Position,
open: true,
}));
}}
style={{ cursor: "pointer" }}
>
{its.Name}
</Tag>
</Tooltip>
))}
</div>
</div> </div>
); );
}, },
......
...@@ -14,7 +14,9 @@ import { useMemo, useRef, useState } from "react"; ...@@ -14,7 +14,9 @@ import { useMemo, useRef, useState } from "react";
import "./index.less"; import "./index.less";
dayjs.extend(duration); dayjs.extend(duration);
function removeFirstAndLastChar(str) {
return str.substring(1, str.length - 1);
}
function Record() { function Record() {
const actionRef = useRef(); const actionRef = useRef();
const [dialogprops, setdialogprops] = useState({ const [dialogprops, setdialogprops] = useState({
...@@ -309,26 +311,23 @@ function Record() { ...@@ -309,26 +311,23 @@ function Record() {
rowKey={"id"} rowKey={"id"}
dataSource={ dataSource={
dialogprops?.tabdata?.PeculiarityInfosDict dialogprops?.tabdata?.PeculiarityInfosDict
? Object.values( ? Object.values(dialogprops?.tabdata?.PeculiarityInfosDict)
dialogprops?.tabdata?.PeculiarityInfosDict ?.map((it, i) => {
)?.map((it, i) => return it?.map((item, index) => {
it?.[0] return {
? { ...item,
...it?.[0], id: i + "," + index,
id: i + 1, };
} });
: {} })
) ?.flat()
: [] : []
} }
expandable={{ expandable={{
expandedRowRender: ({ ElementInfoList }) => { expandedRowRender: ({ ElementInfoList, PointList }) => {
return ( return (
<div style={{ display: "flex", gap: 6 }}> <div style={{ display: "flex", gap: 6 }}>
{ElementInfoList?.map((it) => { {ElementInfoList?.map((it) => {
function removeFirstAndLastChar(str) {
return str.substring(1, str.length - 1);
}
return ( return (
<div <div
style={{ style={{
...@@ -339,7 +338,9 @@ function Record() { ...@@ -339,7 +338,9 @@ function Record() {
marginBottom: 6, marginBottom: 6,
}} }}
> >
<span style={{ paddingRight: 12 }}>{it?.Name}</span> <span style={{ paddingRight: 12 }}>
{it?.Name}
</span>
{it?.PointList?.map((its) => ( {it?.PointList?.map((its) => (
<Tooltip <Tooltip
key={its?.id} key={its?.id}
...@@ -370,6 +371,45 @@ function Record() { ...@@ -370,6 +371,45 @@ function Record() {
</div> </div>
); );
})} })}
<div
style={{
padding: 12,
backgroundColor: "#f0f0f0",
display: "inline-block",
borderRadius: 4,
marginBottom: 6,
}}
>
<span style={{ paddingRight: 12 }}>点集合</span>
{PointList?.map((its) => (
<Tooltip
key={its?.id}
title={
<div
dangerouslySetInnerHTML={{
__html: removeFirstAndLastChar(
JSON.stringify(its.Position)
).replace(/,/g, "<br/>"),
}}
></div>
}
>
<Tag
onClick={() => {
setDrawer((s) => ({
...s,
position: its.Position,
open: true,
}));
}}
style={{ cursor: "pointer" }}
>
{its.Name}
</Tag>
</Tooltip>
))}
</div>
</div> </div>
); );
}, },
......
import AutoTable from "@/components/AutoTable"; import AutoTable from "@/components/AutoTable";
import DraggableDialog from "@/components/DraggableDialog"; import DraggableDialog from "@/components/DraggableDialog";
import InitForm from "@/components/InitForm"; import InitForm from "@/components/InitForm";
import PointViewer from "@/components/PointViewer";
import PremButton from "@/components/PremButton"; import PremButton from "@/components/PremButton";
import SplitDesc from "@/components/SplitDesc"; import SplitDesc from "@/components/SplitDesc";
import { doFetch } from "@/utils/doFetch"; import { doFetch } from "@/utils/doFetch";
...@@ -8,12 +9,15 @@ import { ProDescriptions } from "@ant-design/pro-components"; ...@@ -8,12 +9,15 @@ import { ProDescriptions } from "@ant-design/pro-components";
import { Box, Container, Stack, Typography } from "@mui/material"; import { Box, Container, Stack, Typography } from "@mui/material";
import { useParams } from "@umijs/max"; import { useParams } from "@umijs/max";
import { useAsyncEffect, useRequest } from "ahooks"; import { useAsyncEffect, useRequest } from "ahooks";
import { Divider, message, Segmented, Table, Tabs,Drawer } from "antd"; import { Divider, Drawer, message, Segmented, Table, Tabs } from "antd";
import { useEffect, useMemo, useRef, useState } from "react"; import { useEffect, useMemo, useRef, useState } from "react";
import PointViewer from "@/components/PointViewer";
import { history } from "umi"; import { history } from "umi";
import "./index.less"; import "./index.less";
function removeFirstAndLastChar(str) {
return str.substring(1, str.length - 1);
}
function Dolessons() { function Dolessons() {
const params = useParams(); const params = useParams();
const formRefc = useRef(); const formRefc = useRef();
...@@ -473,26 +477,23 @@ function Dolessons() { ...@@ -473,26 +477,23 @@ function Dolessons() {
rowKey={"id"} rowKey={"id"}
dataSource={ dataSource={
dialogprops?.tabdata?.PeculiarityInfosDict dialogprops?.tabdata?.PeculiarityInfosDict
? Object.values( ? Object.values(dialogprops?.tabdata?.PeculiarityInfosDict)
dialogprops?.tabdata?.PeculiarityInfosDict ?.map((it, i) => {
)?.map((it, i) => return it?.map((item, index) => {
it?.[0] return {
? { ...item,
...it?.[0], id: i + "," + index,
id: i + 1, };
} });
: {} })
) ?.flat()
: [] : []
} }
expandable={{ expandable={{
expandedRowRender: ({ ElementInfoList }) => { expandedRowRender: ({ ElementInfoList, PointList }) => {
return ( return (
<div style={{ display: "flex", gap: 6 }}> <div style={{ display: "flex", gap: 6 }}>
{ElementInfoList?.map((it) => { {ElementInfoList?.map((it) => {
function removeFirstAndLastChar(str) {
return str.substring(1, str.length - 1);
}
return ( return (
<div <div
style={{ style={{
...@@ -536,6 +537,45 @@ function Dolessons() { ...@@ -536,6 +537,45 @@ function Dolessons() {
</div> </div>
); );
})} })}
<div
style={{
padding: 12,
backgroundColor: "#f0f0f0",
display: "inline-block",
borderRadius: 4,
marginBottom: 6,
}}
>
<span style={{ paddingRight: 12 }}>点集合</span>
{PointList?.map((its) => (
<Tooltip
key={its?.id}
title={
<div
dangerouslySetInnerHTML={{
__html: removeFirstAndLastChar(
JSON.stringify(its.Position)
).replace(/,/g, "<br/>"),
}}
></div>
}
>
<Tag
onClick={() => {
setDrawer((s) => ({
...s,
position: its.Position,
open: true,
}));
}}
style={{ cursor: "pointer" }}
>
{its.Name}
</Tag>
</Tooltip>
))}
</div>
</div> </div>
); );
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment