修改api路径问题,以及部分没用变量注释(有一个暂时不敢动)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import request from "../utils/request";
|
||||
import request from "@/utils/request";
|
||||
interface queryParamsType {
|
||||
deptName?: string;
|
||||
state?: number;
|
||||
|
||||
@@ -1,67 +1,67 @@
|
||||
import request from "@/utils/request";
|
||||
interface paramsType {
|
||||
cluster?: string,
|
||||
contentType?: string,
|
||||
noticeTitle?: string,
|
||||
noticeType?: string,
|
||||
publishId?: number,
|
||||
sendType?: string,
|
||||
pageNum?: number,
|
||||
pageSize?: number
|
||||
}
|
||||
cluster?: string;
|
||||
contentType?: string;
|
||||
noticeTitle?: string;
|
||||
noticeType?: string;
|
||||
publishId?: number;
|
||||
sendType?: string;
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
interface addParamsType {
|
||||
action?: string,
|
||||
cluster?: string,
|
||||
contentType?: string,
|
||||
noticeContent?: string,
|
||||
noticeTitle?: string,
|
||||
noticeType?:string,
|
||||
remark?:string,
|
||||
sendType?: string,
|
||||
senderIds?:number[]
|
||||
}
|
||||
export const getDataListAPI = (params:paramsType) => {
|
||||
interface addParamsType {
|
||||
action?: string;
|
||||
cluster?: string;
|
||||
contentType?: string;
|
||||
noticeContent?: string;
|
||||
noticeTitle?: string;
|
||||
noticeType?: string;
|
||||
remark?: string;
|
||||
sendType?: string;
|
||||
senderIds?: number[];
|
||||
}
|
||||
export const getDataListAPI = (params: paramsType) => {
|
||||
return request({
|
||||
url: "/notice/notice",
|
||||
method: "get",
|
||||
params: params
|
||||
params: params,
|
||||
});
|
||||
};
|
||||
export const getUserListAPI = () => {
|
||||
return request({
|
||||
url: "/admin/user",
|
||||
method: "get"
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
export const getRolesListAPI = () => {
|
||||
return request({
|
||||
url: "/admin/role",
|
||||
method: "get"
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
export const getDeptsListAPI = () => {
|
||||
return request({
|
||||
url: "/admin/dept",
|
||||
method: "get"
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
export const addDataAPI=(addParams:addParamsType)=>{
|
||||
export const addDataAPI = (addParams: addParamsType) => {
|
||||
return request({
|
||||
url:`/notice/notice`,
|
||||
method:'post',
|
||||
data:addParams
|
||||
})
|
||||
}
|
||||
export const deleteDataAPI=(noticeId:number)=>{
|
||||
url: `/notice/notice`,
|
||||
method: "post",
|
||||
data: addParams,
|
||||
});
|
||||
};
|
||||
export const deleteDataAPI = (noticeId: number) => {
|
||||
return request({
|
||||
url:`/notice/notice/${noticeId}`,
|
||||
method:'delete',
|
||||
})
|
||||
}
|
||||
export const getDataAPI=(noticeId:number)=>{
|
||||
url: `/notice/notice/${noticeId}`,
|
||||
method: "delete",
|
||||
});
|
||||
};
|
||||
export const getDataAPI = (noticeId: number) => {
|
||||
return request({
|
||||
url:`/notice/notice/${noticeId}`,
|
||||
method:'get',
|
||||
})
|
||||
}
|
||||
url: `/notice/notice/${noticeId}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import request from "../utils/request";
|
||||
import request from "@/utils/request";
|
||||
interface paramsType {
|
||||
createTime?: string,
|
||||
dataScope?: string,
|
||||
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
getDataAPI,
|
||||
} from "../../../api/system/dept";
|
||||
import "./index.scss";
|
||||
import { useForm } from "antd/es/form/Form";
|
||||
// import { useForm } from "antd/es/form/Form";
|
||||
interface searchValueType {
|
||||
deptName: string | undefined;
|
||||
state: string | undefined;
|
||||
@@ -169,13 +169,14 @@ export default function Dept() {
|
||||
};
|
||||
const handleSerach = () => {
|
||||
searchValue = formSearch.getFieldsValue();
|
||||
setSearchValue(searchValue)
|
||||
console.log(searchValue);
|
||||
// queryTableDataParams={...searchValue}
|
||||
setQueryTableDataParams({ ...searchValue });
|
||||
};
|
||||
const handleReset = () => {
|
||||
formSearch.resetFields();
|
||||
searchValue = formSearch.getFieldsValue();
|
||||
setSearchValue(searchValue)
|
||||
setQueryTableDataParams({ ...searchValue });
|
||||
};
|
||||
const handleEdit = async (dept: any) => {
|
||||
|
||||
@@ -74,7 +74,6 @@ interface queryParamsType {
|
||||
let thisrole: any = {};
|
||||
export default function Inform() {
|
||||
const { confirm } = Modal;
|
||||
const { RangePicker } = DatePicker;
|
||||
//提示组件
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
//搜索框内所有内容
|
||||
@@ -241,17 +240,14 @@ export default function Inform() {
|
||||
};
|
||||
const handleSerach = () => {
|
||||
searchValue = formSearch.getFieldsValue();
|
||||
if (typeof searchValue.dateTime !== "undefined") {
|
||||
searchValue.startTime = (searchValue.dateTime as string[])[0];
|
||||
searchValue.endTime = (searchValue.dateTime as string[])[1];
|
||||
}
|
||||
console.log(searchValue);
|
||||
setSearchValue(searchValue)
|
||||
count = 1;
|
||||
setQueryTableDataParams({ ...searchValue });
|
||||
};
|
||||
const handleReset = () => {
|
||||
formSearch.resetFields();
|
||||
searchValue = formSearch.getFieldsValue();
|
||||
setSearchValue(searchValue)
|
||||
setQueryTableDataParams({ ...searchValue });
|
||||
};
|
||||
//Modal区域
|
||||
@@ -429,50 +425,6 @@ export default function Inform() {
|
||||
getDataList(queryTableDataParams);
|
||||
// console.log(queryParams);
|
||||
}, [queryTableDataParams]);
|
||||
const SendIds = function () {
|
||||
if (senderIds === undefined)
|
||||
return (
|
||||
<Select
|
||||
mode="multiple"
|
||||
style={{ textAlign: "left" }}
|
||||
allowClear
|
||||
showSearch
|
||||
placeholder="请选择发送对象"
|
||||
optionFilterProp="lable"
|
||||
filterOption={filterOption}
|
||||
/>
|
||||
);
|
||||
else if (senderIds[0].children === undefined) {
|
||||
return (
|
||||
<Select
|
||||
mode="multiple"
|
||||
style={{ textAlign: "left" }}
|
||||
allowClear
|
||||
showSearch
|
||||
placeholder="请选择发送对象"
|
||||
optionFilterProp="lable"
|
||||
filterOption={filterOption}
|
||||
options={senderIds}
|
||||
/>
|
||||
);
|
||||
} else
|
||||
return (
|
||||
<TreeSelect
|
||||
multiple
|
||||
// mode="multiple"
|
||||
// showSearch
|
||||
style={{ textAlign: "left" }}
|
||||
// value={value}
|
||||
dropdownStyle={{ maxHeight: 400, overflow: "auto" }}
|
||||
placeholder="请选择发送对象"
|
||||
allowClear
|
||||
// treeDefaultExpandAll
|
||||
// onChange={onChange}
|
||||
treeData={senderIds}
|
||||
//
|
||||
/>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<ConfigProvider locale={zh_CN}>
|
||||
<div className="Box">
|
||||
|
||||
@@ -16,7 +16,6 @@ import {
|
||||
Radio,
|
||||
Tree,
|
||||
ConfigProvider,
|
||||
Spin,
|
||||
} from "antd";
|
||||
import type { CheckboxChangeEvent } from "antd/es/checkbox";
|
||||
import type { DatePickerProps, RangePickerProps } from "antd/es/date-picker";
|
||||
@@ -38,7 +37,7 @@ import {
|
||||
setRoleDataAPI,
|
||||
getMenuLiseAPI,
|
||||
} from "../../../api/system/role";
|
||||
import { useForm } from "antd/es/form/Form";
|
||||
// import { useForm } from "antd/es/form/Form";
|
||||
interface searchValueType {
|
||||
dateTime: string[] | undefined;
|
||||
roleName: string | undefined;
|
||||
@@ -269,22 +268,20 @@ export default function Role() {
|
||||
});
|
||||
};
|
||||
const handleSerach = () => {
|
||||
// console.log("搜索框", searchValue);
|
||||
// setSearchValue({ ...searchValue });
|
||||
searchValue = formSearch.getFieldsValue();
|
||||
|
||||
if (typeof searchValue.dateTime !== "undefined") {
|
||||
searchValue.startTime = (searchValue.dateTime as string[])[0];
|
||||
searchValue.endTime = (searchValue.dateTime as string[])[1];
|
||||
}
|
||||
|
||||
console.log(searchValue);
|
||||
setSearchValue(searchValue)
|
||||
count = 1;
|
||||
// queryTableDataParams={...searchValue}
|
||||
setQueryTableDataParams({ ...searchValue });
|
||||
};
|
||||
const handleReset = () => {
|
||||
formSearch.resetFields();
|
||||
searchValue =formSearch.getFieldsValue()
|
||||
setSearchValue(searchValue)
|
||||
setQueryTableDataParams({ ...searchValue });
|
||||
// setSearchValue({ ...searchValue });
|
||||
// setCount(1)
|
||||
@@ -339,7 +336,7 @@ export default function Role() {
|
||||
searchValue.startTime = dateString[0];
|
||||
searchValue.endTime = dateString[1];
|
||||
formSearch.setFieldsValue({ dateTime: [dateString[0], dateString[1]] });
|
||||
console.log("time:", searchValue.endTime, searchValue.startTime);
|
||||
setSearchValue(searchValue)
|
||||
// setSearchValue({ ...searchValue })
|
||||
};
|
||||
const filterOption = (
|
||||
|
||||
Reference in New Issue
Block a user