|
|
@@ -17,7 +17,7 @@
|
|
|
@refresh-change="refreshChange"
|
|
|
@on-load="onLoad">
|
|
|
<template slot="menuLeft">
|
|
|
- <el-button type="primary"
|
|
|
+ <!-- <el-button type="primary"
|
|
|
size="small"
|
|
|
plain
|
|
|
v-if="permission.attach_upload"
|
|
|
@@ -30,10 +30,15 @@
|
|
|
plain
|
|
|
v-if="permission.attach_delete"
|
|
|
@click="handleDelete">删 除
|
|
|
- </el-button>
|
|
|
+ </el-button> -->
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
<el-button type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="small"
|
|
|
+ @click="handleUpload(scope.row)">上传附件
|
|
|
+ </el-button>
|
|
|
+ <el-button type="text"
|
|
|
icon="el-icon-download"
|
|
|
size="small"
|
|
|
v-if="permission.attach_download"
|
|
|
@@ -74,6 +79,7 @@
|
|
|
attachBox: false,
|
|
|
selectionList: [],
|
|
|
option: {
|
|
|
+ dialogWidth: 500,
|
|
|
height: 'auto',
|
|
|
calcHeight: 30,
|
|
|
tip: false,
|
|
|
@@ -84,36 +90,46 @@
|
|
|
viewBtn: true,
|
|
|
selection: true,
|
|
|
dialogClickModal: false,
|
|
|
+ delBtn: false,
|
|
|
column: [
|
|
|
{
|
|
|
- label: "附件地址",
|
|
|
- prop: "link",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入附件地址",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "附件域名",
|
|
|
- prop: "domainUrl",
|
|
|
+ label: "模板名称",
|
|
|
+ prop: "title",
|
|
|
+ display: false,
|
|
|
search: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入附件域名",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
},
|
|
|
{
|
|
|
- label: "附件名称",
|
|
|
- prop: "name",
|
|
|
- search: true,
|
|
|
+ label: "附件地址",
|
|
|
+ prop: "link",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
- message: "请输入附件名称",
|
|
|
+ message: "请输入附件地址",
|
|
|
trigger: "blur"
|
|
|
- }]
|
|
|
+ }],
|
|
|
+ display: false,
|
|
|
},
|
|
|
+ // {
|
|
|
+ // label: "附件域名",
|
|
|
+ // prop: "domainUrl",
|
|
|
+ // search: true,
|
|
|
+ // rules: [{
|
|
|
+ // required: true,
|
|
|
+ // message: "请输入附件域名",
|
|
|
+ // trigger: "blur"
|
|
|
+ // }],
|
|
|
+ // display: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "附件名称",
|
|
|
+ // prop: "name",
|
|
|
+ // search: true,
|
|
|
+ // rules: [{
|
|
|
+ // required: true,
|
|
|
+ // message: "请输入附件名称",
|
|
|
+ // trigger: "blur"
|
|
|
+ // }],
|
|
|
+ // display: false,
|
|
|
+ // },
|
|
|
{
|
|
|
label: "附件原名",
|
|
|
prop: "originalName",
|
|
|
@@ -122,49 +138,57 @@
|
|
|
required: true,
|
|
|
message: "请输入附件原名",
|
|
|
trigger: "blur"
|
|
|
- }]
|
|
|
+ }],
|
|
|
+ display: false,
|
|
|
},
|
|
|
+ // {
|
|
|
+ // label: "附件拓展名",
|
|
|
+ // prop: "extension",
|
|
|
+ // rules: [{
|
|
|
+ // required: true,
|
|
|
+ // message: "请输入附件拓展名",
|
|
|
+ // trigger: "blur"
|
|
|
+ // }],
|
|
|
+ // display: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "附件大小",
|
|
|
+ // prop: "attachSize",
|
|
|
+ // slot: true,
|
|
|
+ // rules: [{
|
|
|
+ // required: true,
|
|
|
+ // message: "请输入附件大小",
|
|
|
+ // trigger: "blur"
|
|
|
+ // }],
|
|
|
+ // display: false,
|
|
|
+ // },
|
|
|
{
|
|
|
- label: "附件拓展名",
|
|
|
- prop: "extension",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入附件拓展名",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "附件大小",
|
|
|
- prop: "attachSize",
|
|
|
- slot: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入附件大小",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ label: "备注",
|
|
|
+ prop: "remark",
|
|
|
},
|
|
|
]
|
|
|
},
|
|
|
data: [],
|
|
|
attachForm: {},
|
|
|
- attachOption: {
|
|
|
- submitBtn: false,
|
|
|
- emptyBtn: false,
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: '附件上传',
|
|
|
- prop: 'attachFile',
|
|
|
- type: 'upload',
|
|
|
- drag: true,
|
|
|
- loadText: '模板上传中,请稍等',
|
|
|
- span: 24,
|
|
|
- propsHttp: {
|
|
|
- res: 'data'
|
|
|
- },
|
|
|
- action: "/api/kd-resource/oss/endpoint/put-file-attach"
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
+ currRowAttachId: '',
|
|
|
+ // attachOption: {
|
|
|
+ // submitBtn: false,
|
|
|
+ // emptyBtn: false,
|
|
|
+ // column: [
|
|
|
+ // {
|
|
|
+ // label: '附件上传',
|
|
|
+ // prop: 'attachFile',
|
|
|
+ // type: 'upload',
|
|
|
+ // drag: true,
|
|
|
+ // loadText: '模板上传中,请稍等',
|
|
|
+ // span: 24,
|
|
|
+ // propsHttp: {
|
|
|
+ // res: 'data'
|
|
|
+ // },
|
|
|
+ // action: "/api/kd-resource/oss/endpoint/put-file-attach"
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // }
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -186,14 +210,38 @@
|
|
|
ids.push(ele.id);
|
|
|
});
|
|
|
return ids.join(",");
|
|
|
+ },
|
|
|
+ attachOption() {
|
|
|
+ return {
|
|
|
+ submitBtn: false,
|
|
|
+ emptyBtn: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '附件上传',
|
|
|
+ prop: 'attachFile',
|
|
|
+ type: 'upload',
|
|
|
+ drag: true,
|
|
|
+ loadText: '模板上传中,请稍等',
|
|
|
+ span: 24,
|
|
|
+ propsHttp: {
|
|
|
+ res: 'data'
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ attachId: this.currRowAttachId
|
|
|
+ },
|
|
|
+ action: "/api/kd-resource/oss/endpoint/put-file-attach-exist"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- handleUpload() {
|
|
|
+ handleUpload(row) {
|
|
|
+ this.currRowAttachId = row.id;
|
|
|
+ console.log(row)
|
|
|
this.attachBox = true;
|
|
|
},
|
|
|
uploadAfter(res, done, loading, column) {
|
|
|
- window.console.log(column);
|
|
|
this.attachBox = false;
|
|
|
this.refreshChange();
|
|
|
done();
|