diff --git a/src/api/modules/banner.ts b/src/api/modules/banner.ts index 5b3a23b..1a9f739 100644 --- a/src/api/modules/banner.ts +++ b/src/api/modules/banner.ts @@ -37,6 +37,6 @@ export const getBannerListExportApi = (params: any) => { }); }; //分类 -export const getBannerClassListApi = () => { - return http.get(`/banner/list`); //v1/banner/list +export const getBannerClassListApi = (params: any) => { + return http.get(`/banner/list`, params); //v1/banner/list }; diff --git a/src/api/modules/downloadClass.ts b/src/api/modules/downloadClass.ts index 38e1bf1..feb869c 100644 --- a/src/api/modules/downloadClass.ts +++ b/src/api/modules/downloadClass.ts @@ -26,6 +26,6 @@ export const getCategorySortApi = (params: any) => { return http.post(`${ATT_C}/sort/${params.id}`, { sort: params.sort }); }; //下载分类下拉列表 -export const getCategorysApi = () => { - return http.get(`/attachment/categorys`); +export const getCategorysApi = (params: any) => { + return http.get(`/attachment/categorys`, params); }; diff --git a/src/api/modules/videoList.ts b/src/api/modules/videoList.ts index 1bc0c50..c66e4f8 100644 --- a/src/api/modules/videoList.ts +++ b/src/api/modules/videoList.ts @@ -27,6 +27,6 @@ export const getVideoListExportApi = (params: any) => { }); }; //视频分类 -export const getVideoClassListApi = () => { - return http.get(`/video/categorys`); +export const getVideoClassListApi = (params: any) => { + return http.get(`/video/categorys`, params); }; diff --git a/src/components.d.ts b/src/components.d.ts index f86285d..b03dfa2 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -16,6 +16,11 @@ declare module "vue" { ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"]; ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"]; ElButton: typeof import("element-plus/es")["ElButton"]; + ElCarousel: typeof import("element-plus/es")["ElCarousel"]; + ElCarouselItem: typeof import("element-plus/es")["ElCarouselItem"]; + ElCheckbox: typeof import("element-plus/es")["ElCheckbox"]; + ElCheckboxGroup: typeof import("element-plus/es")["ElCheckboxGroup"]; + ElColorPicker: typeof import("element-plus/es")["ElColorPicker"]; ElContainer: typeof import("element-plus/es")["ElContainer"]; ElDatePicker: typeof import("element-plus/es")["ElDatePicker"]; ElDialog: typeof import("element-plus/es")["ElDialog"]; @@ -37,6 +42,7 @@ declare module "vue" { ElOption: typeof import("element-plus/es")["ElOption"]; ElPagination: typeof import("element-plus/es")["ElPagination"]; ElRadio: typeof import("element-plus/es")["ElRadio"]; + ElRadioButton: typeof import("element-plus/es")["ElRadioButton"]; ElRadioGroup: typeof import("element-plus/es")["ElRadioGroup"]; ElScrollbar: typeof import("element-plus/es")["ElScrollbar"]; ElSelect: typeof import("element-plus/es")["ElSelect"]; @@ -47,6 +53,8 @@ declare module "vue" { ElTabPane: typeof import("element-plus/es")["ElTabPane"]; ElTabs: typeof import("element-plus/es")["ElTabs"]; ElTag: typeof import("element-plus/es")["ElTag"]; + ElTooltip: typeof import("element-plus/es")["ElTooltip"]; + ElTree: typeof import("element-plus/es")["ElTree"]; ElTreeSelect: typeof import("element-plus/es")["ElTreeSelect"]; ElUpload: typeof import("element-plus/es")["ElUpload"]; Empty: typeof import("./components/ProTable/components/Empty.vue")["default"]; diff --git a/src/components/Upload/UploadImg.vue b/src/components/Upload/UploadImg.vue index 54b9c97..45af60b 100644 --- a/src/components/Upload/UploadImg.vue +++ b/src/components/Upload/UploadImg.vue @@ -56,7 +56,7 @@ import { ElNotification, formContextKey, formItemContextKey } from "element-plus import type { UploadProps, UploadRequestOptions } from "element-plus"; interface UploadFileProps { - imageUrl: string; // 图片地址 ==> 必传 + imageUrl: any; // 图片地址 ==> 必传 api?: (params: any) => Promise; // 上传图片的 api 方法,一般项目上传都是同一个 api 方法,在组件里直接引入即可 ==> 非必传 drag?: boolean; // 是否支持拖拽上传 ==> 非必传(默认为 true) disabled?: boolean; // 是否禁用上传组件 ==> 非必传(默认为 false) diff --git a/src/views/articleManagement/list/constant/edit.ts b/src/views/articleManagement/list/constant/edit.ts index 2f3baeb..9cbf7fd 100644 --- a/src/views/articleManagement/list/constant/edit.ts +++ b/src/views/articleManagement/list/constant/edit.ts @@ -55,6 +55,22 @@ export const EDIT_FORM_DATA: FormItem[] = [ } ] }, + // { + // prop: "is_show1", + // placeholder: "", + // type: "radio", + // label: "是否启动: ", + // options: [ + // { + // label: "是", + // value: 1 + // }, + // { + // label: "否", + // value: 0 + // } + // ] + // }, { prop: "link", placeholder: "请输入", diff --git a/src/views/articleManagement/list/edit.vue b/src/views/articleManagement/list/edit.vue index 88fca86..7fbaf68 100644 --- a/src/views/articleManagement/list/edit.vue +++ b/src/views/articleManagement/list/edit.vue @@ -57,7 +57,7 @@ const dataStore = reactive({ //文章分类 const getArticleClassData = async () => { - const result = await getArticleClassDataApi(); + const result = await getArticleClassDataApi({ is_show: 1 }); if (result?.code === 0) { const { data } = result; dataStore.editFormData[1].options = useSearchInfoArray(data); diff --git a/src/views/articleManagement/list/index.vue b/src/views/articleManagement/list/index.vue index 575077f..fee94f3 100644 --- a/src/views/articleManagement/list/index.vue +++ b/src/views/articleManagement/list/index.vue @@ -60,7 +60,7 @@ const dataStore = reactive({ //文章分类(搜索条件) const getArticleClassData = async () => { - const result = await getArticleClassDataApi(); + const result = await getArticleClassDataApi({ is_show: 0 }); if (result?.code === 0) { const { data } = result; dataStore.formData[1].options = useSearchInfoArray(data); @@ -80,10 +80,6 @@ const handleAdd = (type: any) => { //导出接口 const getArticleListExport = async () => { - // searchParam, - // searchInitParam, - console.log(proTableRef?.value?.pageable, "===proTableRef?.value?.pageable=="); - console.log(proTableRef?.value?.searchParam, "=dataStore.initParam="); const result = await getArticleListExportApi({ ...proTableRef?.value?.searchParam, ...proTableRef?.value?.pageable diff --git a/src/views/articleManagement/recycle/constant/table.ts b/src/views/articleManagement/recycle/constant/table.ts index f3c51e4..5900f46 100644 --- a/src/views/articleManagement/recycle/constant/table.ts +++ b/src/views/articleManagement/recycle/constant/table.ts @@ -50,12 +50,12 @@ export const COLUMNS = [ width: 160 }, - { - align: "center", - label: "状态", - prop: "status", - width: 80 - }, + // { + // align: "center", + // label: "状态", + // prop: "status", + // width: 80 + // }, { prop: "operation", label: "操作", fixed: "right", width: 200 } ]; diff --git a/src/views/bannerManagement/list/constant/edit.ts b/src/views/bannerManagement/list/constant/edit.ts index 25dcca3..6a5babb 100644 --- a/src/views/bannerManagement/list/constant/edit.ts +++ b/src/views/bannerManagement/list/constant/edit.ts @@ -49,6 +49,22 @@ export const EDIT_FORM_DATA: FormItem[] = [ } ] }, + { + prop: "status", + placeholder: "", + type: "radio", + label: "是否启动: ", + options: [ + { + label: "是", + value: 1 + }, + { + label: "否", + value: 0 + } + ] + }, { prop: "image", type: "upImg", @@ -121,6 +137,22 @@ export const EDIT_FORM_DATA1: FormItem[] = [ } ] }, + { + prop: "status", + placeholder: "", + type: "radio", + label: "是否启动: ", + options: [ + { + label: "是", + value: 1 + }, + { + label: "否", + value: 0 + } + ] + }, { prop: "image", type: "upImg", diff --git a/src/views/bannerManagement/list/constant/table.ts b/src/views/bannerManagement/list/constant/table.ts index 84df59e..1c6475b 100644 --- a/src/views/bannerManagement/list/constant/table.ts +++ b/src/views/bannerManagement/list/constant/table.ts @@ -33,6 +33,11 @@ export const COLUMNS = [ label: "添加时间", prop: "created_at" }, - + { + align: "center", + label: "状态", + prop: "status", + width: 80 + }, { prop: "operation", label: "操作", fixed: "right", width: 200 } ]; diff --git a/src/views/bannerManagement/list/index.vue b/src/views/bannerManagement/list/index.vue index 0a7f13a..e757f02 100644 --- a/src/views/bannerManagement/list/index.vue +++ b/src/views/bannerManagement/list/index.vue @@ -17,6 +17,11 @@ +