| | |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/blade-resource/attach/list', |
| | | url: '/blade-resource/attach/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | |
| | | }); |
| | | }; |
| | | |
| | | export const removeAttachAndData = ids => { |
| | | return request({ |
| | | url: '/blade-resource/attach/removeAttachAndData', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | export const add = row => { |
| | | return request({ |
| | | url: '/blade-resource/attach/submit', |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, getDetail, remove } from '@/api/resource/attach'; |
| | | import { getList, getDetail, removeAttachAndData } from '@/api/resource/attach'; |
| | | import { mapGetters } from 'vuex'; |
| | | import func from '@/utils/func'; |
| | | |
| | |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | grid: true, |
| | | // grid: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | |
| | | { |
| | | label: '附件域名', |
| | | prop: 'domainUrl', |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: '附件名称', |
| | | prop: 'name', |
| | | search: true, |
| | | searchSpan:4, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: '附件原名', |
| | | prop: 'originalName', |
| | | search: true, |
| | | searchSpan:4, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | { |
| | | label: '附件拓展名', |
| | | prop: 'extension', |
| | | search: true, |
| | | searchSpan:4, |
| | | searchLabelWidth:95, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | trigger: 'blur', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: '创建日期', |
| | | prop: 'createTime' |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | window.open(`${row.link}`); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm('确定将选择数据删除?', { |
| | | this.$confirm('确定将选择数据及对应的文件删除?', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | return removeAttachAndData(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | |
| | | this.$message.warning('请选择至少一条数据'); |
| | | return; |
| | | } |
| | | this.$confirm('确定将选择数据删除?', { |
| | | this.$confirm('确定将选择数据及对应的文件删除?', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | return removeAttachAndData(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |