visuddhinanda 3 лет назад
Родитель
Сommit
e38b3abb9e

+ 1 - 0
dashboard/src/pages/studio/analysis/list.tsx

@@ -42,6 +42,7 @@ const Widget = () => {
 	};
 	return (
 		<>
+			{studioname}
 			<Line {...config} />
 
 			<Calendar

+ 0 - 1
dashboard/src/pages/studio/article/edit.tsx

@@ -3,7 +3,6 @@ import { useIntl } from "react-intl";
 import {
 	ProForm,
 	ProFormText,
-	ProFormSelect,
 	ProFormTextArea,
 } from "@ant-design/pro-components";
 import { Card, message } from "antd";

+ 0 - 4
dashboard/src/pages/studio/article/list.tsx

@@ -1,6 +1,5 @@
 import { useParams, Link } from "react-router-dom";
 import { useIntl } from "react-intl";
-import { useState } from "react";
 
 import { Space, Button, Popover, Dropdown, MenuProps, Menu, Table } from "antd";
 import { ProTable } from "@ant-design/pro-components";
@@ -48,10 +47,7 @@ interface DataItem {
 const Widget = () => {
 	const intl = useIntl(); //i18n
 	const { studioname } = useParams(); //url 参数
-
 	const articleCreate = <ArticleCreate studio={studioname} />;
-	const linkRead = `/article/show/12345`;
-	const linkStudio = `/studio/${studioname}`;
 
 	return (
 		<>

+ 0 - 1
dashboard/src/pages/studio/channel/edit.tsx

@@ -2,7 +2,6 @@ import { useParams } from "react-router-dom";
 import {
 	ProForm,
 	ProFormText,
-	ProFormSelect,
 	ProFormTextArea,
 } from "@ant-design/pro-components";
 import { useIntl } from "react-intl";

+ 2 - 3
dashboard/src/pages/studio/group/edit.tsx

@@ -1,4 +1,4 @@
-import { Link, useParams } from "react-router-dom";
+import { useParams } from "react-router-dom";
 import {
 	ProForm,
 	ProFormText,
@@ -6,11 +6,10 @@ import {
 	ProFormTextArea,
 } from "@ant-design/pro-components";
 import { useIntl } from "react-intl";
-import { message, Card, Button } from "antd";
+import { message, Card } from "antd";
 import { IGroupResponse } from "../../../components/api/Group";
 import { useEffect, useState } from "react";
 import { get } from "../../../request";
-import { ArrowLeftOutlined } from "@ant-design/icons";
 import GoBack from "../../../components/studio/GoBack";
 
 interface IFormData {

+ 17 - 24
dashboard/src/pages/studio/term/list.tsx

@@ -1,8 +1,12 @@
 import { useParams } from "react-router-dom";
 import { ProTable } from "@ant-design/pro-components";
 import { useIntl } from "react-intl";
-import { Button, Space, Table, Popover, Dropdown, Menu, MenuProps } from "antd";
-import { PlusOutlined, SearchOutlined } from "@ant-design/icons";
+import { Button, Space, Table, Dropdown, Menu, MenuProps } from "antd";
+import {
+	SearchOutlined,
+	DeleteOutlined,
+	ShareAltOutlined,
+} from "@ant-design/icons";
 
 import TermCreate from "../../../components/studio/term/TermCreate";
 import { ITermListResponse } from "../../../components/api/Term";
@@ -18,18 +22,18 @@ const menu = (
 		items={[
 			{
 				key: "1",
-				label: "在藏经阁中打开",
+				label: "更多查询",
 				icon: <SearchOutlined />,
 			},
 			{
 				key: "2",
 				label: "分享",
-				icon: <SearchOutlined />,
+				icon: <ShareAltOutlined />,
 			},
 			{
 				key: "3",
 				label: "删除",
-				icon: <SearchOutlined />,
+				icon: <DeleteOutlined />,
 			},
 		]}
 	/>
@@ -37,7 +41,7 @@ const menu = (
 
 interface IItem {
 	sn: number;
-	id: number;
+	id: string;
 	word: string;
 	tag: string;
 	channel: string;
@@ -158,9 +162,11 @@ const Widget = () => {
 										//setIsEditOpen(true);
 									}}
 								>
-									{intl.formatMessage({
-										id: "buttons.edit",
-									})}
+									<TermCreate
+										studio={studioname}
+										edit={true}
+										wordId={row.id}
+									/>
 								</Dropdown.Button>,
 							];
 						},
@@ -221,7 +227,7 @@ const Widget = () => {
 							1;
 						return {
 							sn: id2,
-							id: item.id,
+							id: item.guid,
 							word: item.word,
 							tag: item.tag,
 							channel: item.channal,
@@ -243,20 +249,7 @@ const Widget = () => {
 					showQuickJumper: true,
 					showSizeChanger: true,
 				}}
-				toolBarRender={() => [
-					<Popover
-						content={<TermCreate studio={studioname} />}
-						placement="bottomRight"
-					>
-						<Button
-							key="button"
-							icon={<PlusOutlined />}
-							type="primary"
-						>
-							{intl.formatMessage({ id: "buttons.create" })}
-						</Button>
-					</Popover>,
-				]}
+				toolBarRender={() => [<TermCreate studio={studioname} />]}
 				search={false}
 				options={{
 					search: true,