no message
This commit is contained in:
parent
68deffd548
commit
de91e8fccf
@ -1,15 +1,5 @@
|
|||||||
/*
|
|
||||||
* @创建文件时间: 2021-08-14 17:37:36
|
|
||||||
* @Auther: 猿小天
|
|
||||||
* @最后修改人: 猿小天
|
|
||||||
* @最后修改时间: 2021-08-14 21:20:16
|
|
||||||
* 联系Qq:1638245306
|
|
||||||
* @文件介绍: 文件管理
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { request } from '@/api/service'
|
import { request } from '@/api/service'
|
||||||
|
export const urlPrefix = '/system/file'
|
||||||
export const urlPrefix = '/system/file/'
|
|
||||||
|
|
||||||
export function GetList (query) {
|
export function GetList (query) {
|
||||||
return request({
|
return request({
|
||||||
@ -29,7 +19,7 @@ export function AddObj (obj) {
|
|||||||
|
|
||||||
export function UpdateObj (obj) {
|
export function UpdateObj (obj) {
|
||||||
return request({
|
return request({
|
||||||
url: urlPrefix + obj.id + '/',
|
url: urlPrefix +'/update',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: obj
|
data: obj
|
||||||
})
|
})
|
||||||
@ -37,7 +27,7 @@ export function UpdateObj (obj) {
|
|||||||
|
|
||||||
export function DelObj (id) {
|
export function DelObj (id) {
|
||||||
return request({
|
return request({
|
||||||
url: urlPrefix + id + '/',
|
url: urlPrefix + '/delete',
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
data: { id }
|
data: { id }
|
||||||
})
|
})
|
||||||
|
@ -1,147 +1,136 @@
|
|||||||
export const crudOptions = (vm) => {
|
export const crudOptions = (vm) => {
|
||||||
return {
|
return {
|
||||||
pageOptions: {
|
pageOptions: {
|
||||||
compact: true
|
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
|
|
||||||
},
|
},
|
||||||
form: {
|
options: {
|
||||||
disabled: true,
|
height: '100%'
|
||||||
component: {
|
|
||||||
placeholder: '请输入关键词'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
view: {
|
rowHandle: {
|
||||||
disabled: true
|
width: 110,
|
||||||
}
|
view: {
|
||||||
},
|
thin: true,
|
||||||
{
|
text: '',
|
||||||
title: 'ID',
|
disabled() {
|
||||||
key: 'id',
|
return !vm.hasPermissions('Retrieve')
|
||||||
width: 90,
|
}
|
||||||
disabled: true,
|
},
|
||||||
form: {
|
edit: false,
|
||||||
disabled: true
|
remove: {
|
||||||
}
|
thin: true,
|
||||||
},
|
text: '',
|
||||||
{
|
disabled() {
|
||||||
title: '文件名称',
|
return !vm.hasPermissions('Delete')
|
||||||
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'
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
viewOptions: {
|
||||||
}, {
|
// componentType: 'form'
|
||||||
title: '创建人',
|
},
|
||||||
show: false,
|
formOptions: {
|
||||||
width: 100,
|
defaultSpan: 12 // 默认的表单 span
|
||||||
key: 'modifier_name',
|
},
|
||||||
form: {
|
columns: [{
|
||||||
disabled: true
|
title: 'ID',
|
||||||
}
|
align: 'center',
|
||||||
},
|
key: 'id',
|
||||||
{
|
width: 50,
|
||||||
title: '更新时间',
|
form: {
|
||||||
key: 'update_datetime',
|
disabled: true
|
||||||
width: 160,
|
},
|
||||||
type: 'datetime',
|
search: {
|
||||||
form: {
|
disabled: false
|
||||||
disabled: true
|
},
|
||||||
}
|
}, {
|
||||||
},
|
title: '关键词',
|
||||||
{
|
key: 'search',
|
||||||
title: '创建时间',
|
show: false,
|
||||||
key: 'create_datetime',
|
disabled: true,
|
||||||
width: 160,
|
search: {
|
||||||
type: 'datetime',
|
disabled: false
|
||||||
form: {
|
},
|
||||||
disabled: true
|
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
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,3 @@
|
|||||||
<!--
|
|
||||||
* @创建文件时间: 2021-08-14 17:37:36
|
|
||||||
* @Auther: 猿小天
|
|
||||||
* @最后修改人: 猿小天
|
|
||||||
* @最后修改时间: 2021-08-14 21:27:12
|
|
||||||
* 联系Qq:1638245306
|
|
||||||
* @文件介绍: 图片管理
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<d2-container :class="{ 'page-compact': crud.pageOptions.compact }">
|
<d2-container :class="{ 'page-compact': crud.pageOptions.compact }">
|
||||||
<d2-crud-x
|
<d2-crud-x
|
||||||
|
@ -24,7 +24,7 @@ export const crudOptions = (vm) => {
|
|||||||
text: '',
|
text: '',
|
||||||
disabled () {
|
disabled () {
|
||||||
return !vm.hasPermissions('Retrieve')
|
return !vm.hasPermissions('Retrieve')
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
edit: {
|
edit: {
|
||||||
thin: true,
|
thin: true,
|
||||||
@ -371,7 +371,7 @@ export const crudOptions = (vm) => {
|
|||||||
key: 'avatar',
|
key: 'avatar',
|
||||||
type: 'avatar-cropper',
|
type: 'avatar-cropper',
|
||||||
width: 60,
|
width: 60,
|
||||||
align: 'left',
|
align: 'center',
|
||||||
form: {
|
form: {
|
||||||
component: {
|
component: {
|
||||||
props: {
|
props: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user