From 8c5129f63acb3c0406f7a5d5e1b109426e4f6f00 Mon Sep 17 00:00:00 2001 From: jacky Date: Thu, 11 Apr 2024 18:02:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=8F=E7=9B=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E5=A2=9E=E5=8A=A0=E5=AA=92=E4=BD=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 5 +- src/api/breakpoint.js | 8 +- src/api/channel.js | 63 +++ src/api/mediaFile.js | 44 ++ src/components/chooseImg/index.vue | 81 +--- src/components/richtext/rich-edit.vue | 23 +- src/components/selectFile/selectFile.vue | 15 +- src/components/selectImage/selectImage.vue | 213 ++------- src/components/upload/common.vue | 37 +- src/components/upload/image.vue | 31 +- src/view/content/channel/index.vue | 266 +++++++++++ src/view/content/mediaFile/breakpoint.vue | 279 +++++++++++ src/view/content/mediaFile/index.vue | 192 ++++++++ src/view/login/index.vue | 92 +--- src/view/person/person.vue | 231 +++------- src/view/superAdmin/menu/icon.vue | 24 +- src/view/superAdmin/menu/menu.vue | 509 +++++---------------- vite.config.js | 10 +- 18 files changed, 1158 insertions(+), 965 deletions(-) create mode 100644 src/api/channel.js create mode 100644 src/api/mediaFile.js create mode 100644 src/view/content/channel/index.vue create mode 100644 src/view/content/mediaFile/breakpoint.vue create mode 100644 src/view/content/mediaFile/index.vue diff --git a/.eslintrc.js b/.eslintrc.js index 4d84ecb..29677ec 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,11 +12,14 @@ module.exports = { extends: ['plugin:vue/recommended', 'eslint:recommended'], rules: { 'vue/no-v-model-argument': 0, - 'vue/max-attributes-per-line': 2, + 'vue/max-attributes-per-line': 0, + 'vue/first-attribute-linebreak': 'off', 'vue/singleline-html-element-content-newline': 'off', 'vue/multiline-html-element-content-newline': 'off', 'vue/multi-word-component-names': 'off', + 'vue/html-closing-bracket-newline': 'off', 'vue/no-v-html': 'off', + 'vue/html-indent': 'off', 'accessor-pairs': 2, 'arrow-spacing': [ 2, diff --git a/src/api/breakpoint.js b/src/api/breakpoint.js index 1dbfba2..cdb6bbf 100644 --- a/src/api/breakpoint.js +++ b/src/api/breakpoint.js @@ -9,7 +9,7 @@ import service from '@/utils/request' export const findFile = (params) => { return service({ - url: '/fileUploadAndDownload/findFile', + url: '/mediaFile/findFile', method: 'get', params }) @@ -17,7 +17,7 @@ export const findFile = (params) => { export const breakpointContinue = (data) => { return service({ - url: '/fileUploadAndDownload/breakpointContinue', + url: '/mediaFile/breakpointContinue', method: 'post', donNotShowLoading: true, headers: { 'Content-Type': 'multipart/form-data' }, @@ -27,7 +27,7 @@ export const breakpointContinue = (data) => { export const breakpointContinueFinish = (params) => { return service({ - url: '/fileUploadAndDownload/breakpointContinueFinish', + url: '/mediaFile/breakpointContinueFinish', method: 'post', params }) @@ -35,7 +35,7 @@ export const breakpointContinueFinish = (params) => { export const removeChunk = (data, params) => { return service({ - url: '/fileUploadAndDownload/removeChunk', + url: '/mediaFile/removeChunk', method: 'post', data, params diff --git a/src/api/channel.js b/src/api/channel.js new file mode 100644 index 0000000..0d84841 --- /dev/null +++ b/src/api/channel.js @@ -0,0 +1,63 @@ +import service from '@/utils/request' + +// @Summary 获取栏目树 +// @Produce application/json +// @Router /channel/getChannelTree [post] +export const getChannelTree = () => { + return service({ + url: '/channel/getChannelTree', + method: 'post', + }) +} + +// @Summary 新增栏目 +// @Produce application/json +// @Param menu Object +// @Router /channel/addChannel [post] +export const addChannel = (data) => { + return service({ + url: '/channel/addChannel', + method: 'post', + data + }) +} + +// @Summary 删除栏目 +// @Produce application/json +// @Param ID int +// @Router /channel/deleteChannel [post] +export const deleteChannel = (data) => { + return service({ + url: '/channel/deleteChannel', + method: 'post', + data + }) +} + +// @Summary 修改栏目 +// @Produce application/json +// @Param menu Object +// @Router /channel/updateChannel [post] +export const updateChannel = (data) => { + return service({ + url: '/channel/updateChannel', + method: 'post', + data + }) +} + +// @Tags 文章栏目 +// @Summary 根据id获取栏目 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body api.GetById true "根据id获取栏目" +// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" +// @Router /channel/getChannelById [post] +export const getChannelById = (data) => { + return service({ + url: '/channel/getChannelById', + method: 'post', + data + }) +} diff --git a/src/api/mediaFile.js b/src/api/mediaFile.js new file mode 100644 index 0000000..b9b914e --- /dev/null +++ b/src/api/mediaFile.js @@ -0,0 +1,44 @@ +import service from '@/utils/request' +// @Tags MediaFile +// @Summary 分页文件列表 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body modelInterface.PageInfo true "分页获取文件户列表" +// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" +// @Router /mediaFile/getFileList [post] +export const getFileList = (data) => { + return service({ + url: '/mediaFile/getFileList', + method: 'post', + data + }) +} + +// @Tags MediaFile +// @Summary 删除文件 +// @Security ApiKeyAuth +// @Produce application/json +// @Param data body dbModel.MediaFile true "传入文件里面id即可" +// @Success 200 {string} json "{"success":true,"data":{},"msg":"返回成功"}" +// @Router /mediaFile/deleteFile [post] +export const deleteFile = (data) => { + return service({ + url: '/mediaFile/deleteFile', + method: 'post', + data + }) +} + +/** + * 编辑文件名或者备注 + * @param data + * @returns {*} + */ +export const editFileName = (data) => { + return service({ + url: '/mediaFile/editFileName', + method: 'post', + data + }) +} diff --git a/src/components/chooseImg/index.vue b/src/components/chooseImg/index.vue index cccd5db..7801304 100644 --- a/src/components/chooseImg/index.vue +++ b/src/components/chooseImg/index.vue @@ -1,59 +1,24 @@ - + diff --git a/src/components/selectFile/selectFile.vue b/src/components/selectFile/selectFile.vue index c85b652..303eab2 100644 --- a/src/components/selectFile/selectFile.vue +++ b/src/components/selectFile/selectFile.vue @@ -1,16 +1,8 @@