From de91e8fccf78519e9d8bf767182d8250f814bc38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=99=8C?= Date: Tue, 6 Jun 2023 18:57:17 +0800 Subject: [PATCH] no message --- src/views/system/fileList/api.js | 16 +- src/views/system/fileList/crud.js | 275 +++++++++++++--------------- src/views/system/fileList/index.vue | 8 - src/views/system/user/crud.js | 4 +- 4 files changed, 137 insertions(+), 166 deletions(-) diff --git a/src/views/system/fileList/api.js b/src/views/system/fileList/api.js index cfb41b6..32fb9f9 100644 --- a/src/views/system/fileList/api.js +++ b/src/views/system/fileList/api.js @@ -1,15 +1,5 @@ -/* - * @创建文件时间: 2021-08-14 17:37:36 - * @Auther: 猿小天 - * @最后修改人: 猿小天 - * @最后修改时间: 2021-08-14 21:20:16 - * 联系Qq:1638245306 - * @文件介绍: 文件管理 - */ - import { request } from '@/api/service' - -export const urlPrefix = '/system/file/' +export const urlPrefix = '/system/file' export function GetList (query) { return request({ @@ -29,7 +19,7 @@ export function AddObj (obj) { export function UpdateObj (obj) { return request({ - url: urlPrefix + obj.id + '/', + url: urlPrefix +'/update', method: 'put', data: obj }) @@ -37,7 +27,7 @@ export function UpdateObj (obj) { export function DelObj (id) { return request({ - url: urlPrefix + id + '/', + url: urlPrefix + '/delete', method: 'delete', data: { id } }) diff --git a/src/views/system/fileList/crud.js b/src/views/system/fileList/crud.js index 754b3e6..9ce5d8a 100644 --- a/src/views/system/fileList/crud.js +++ b/src/views/system/fileList/crud.js @@ -1,147 +1,136 @@ export const crudOptions = (vm) => { - return { - pageOptions: { - compact: true - }, - options: { - height: '100%' - }, - rowHandle: { - width: 110, - view: { - thin: true, - text: '', - disabled () { - return !vm.hasPermissions('Retrieve') - } - }, - edit: false, - remove: { - thin: true, - text: '', - disabled () { - return !vm.hasPermissions('Delete') - } - } - }, - viewOptions: { - componentType: 'form' - }, - formOptions: { - defaultSpan: 12 // 默认的表单 span - }, - indexRow: { // 或者直接传true,不显示title,不居中 - title: '序号', - align: 'center', - width: 100 - }, - columns: [ - { - title: '关键词', - key: 'search', - show: false, - disabled: true, - search: { - disabled: false + return { + pageOptions: { + compact: true }, - form: { - disabled: true, - component: { - placeholder: '请输入关键词' - } + options: { + height: '100%' }, - view: { - disabled: true - } - }, - { - title: 'ID', - key: 'id', - width: 90, - disabled: true, - form: { - disabled: true - } - }, - { - title: '文件名称', - key: 'name', - search: { - disabled: false - }, - width: 160, - type: 'input', - form: { - component: { - placeholder: '请输入文件名称' - } - } - }, - { - title: '文件地址', - key: 'url', - type: 'file-uploader', - search: { - disabled: true - }, - width: 220 - }, - { - title: '文件MD5', - key: 'md5sum', - width: 200, - search: { - disabled: true - }, - form: { - disabled: false - } - }, - { - title: '备注', - key: 'description', - show: false, - search: { - disabled: true - }, - type: 'textarea', - form: { - component: { - placeholder: '请输入内容', - showWordLimit: true, - maxlength: '200', - props: { - type: 'textarea' + rowHandle: { + width: 110, + view: { + thin: true, + text: '', + disabled() { + return !vm.hasPermissions('Retrieve') + } + }, + edit: false, + remove: { + thin: true, + text: '', + disabled() { + return !vm.hasPermissions('Delete') + } } - } - } - }, { - title: '创建人', - show: false, - width: 100, - key: 'modifier_name', - form: { - disabled: true - } - }, - { - title: '更新时间', - key: 'update_datetime', - width: 160, - type: 'datetime', - form: { - disabled: true - } - }, - { - title: '创建时间', - key: 'create_datetime', - width: 160, - type: 'datetime', - form: { - disabled: true - } - } - ] - } -} + }, + viewOptions: { + // componentType: 'form' + }, + formOptions: { + defaultSpan: 12 // 默认的表单 span + }, + columns: [{ + title: 'ID', + align: 'center', + key: 'id', + width: 50, + form: { + disabled: true + }, + search: { + disabled: false + }, + }, { + title: '关键词', + key: 'search', + show: false, + disabled: true, + search: { + disabled: false + }, + form: { + disabled: true, + component: { + placeholder: '请输入关键词' + } + }, + view: { + disabled: true + } + }, { + title: '文件名称', + key: 'name', + search: { + disabled: false + }, + width: 160, + type: 'input', + form: { + component: { + placeholder: '请输入文件名称' + } + } + }, { + title: '文件地址', + key: 'url', + type: 'file-uploader', + search: { + disabled: true + }, + width: 220 + }, { + title: '文件MD5', + key: 'md5sum', + width: 200, + search: { + disabled: true + }, + form: { + disabled: false + } + }, { + title: '备注', + key: 'description', + show: false, + search: { + disabled: true + }, + type: 'textarea', + form: { + component: { + placeholder: '请输入内容', + showWordLimit: true, + maxlength: '200', + props: { + type: 'textarea' + } + } + } + }, { + title: '创建人', + show: false, + width: 100, + key: 'modifier_name', + form: { + disabled: true + } + }, { + title: '更新时间', + key: 'update_datetime', + width: 160, + type: 'datetime', + form: { + disabled: true + } + }, { + title: '创建时间', + key: 'create_datetime', + width: 160, + type: 'datetime', + form: { + disabled: true + } + }] + } +} \ No newline at end of file diff --git a/src/views/system/fileList/index.vue b/src/views/system/fileList/index.vue index e5e9c20..01cc98f 100644 --- a/src/views/system/fileList/index.vue +++ b/src/views/system/fileList/index.vue @@ -1,11 +1,3 @@ -