|
|
@ -1,5 +1,5 @@ |
|
|
<script> |
|
|
<script> |
|
|
import {getOssNextFileNo, ossUpload, ossUpgrade, previewOssFileById, queryOss, removeOss} from "../../../api/oss/oss"; |
|
|
|
|
|
|
|
|
import {getOssNextFileNo, ossUpdateRemark, ossUpload, ossUpgrade, previewOssFileById, queryOss, removeOss} from "../../../api/oss/oss"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "ossComponents", |
|
|
name: "ossComponents", |
|
|
@ -56,6 +56,10 @@ export default { |
|
|
type:Boolean, |
|
|
type:Boolean, |
|
|
default:true |
|
|
default:true |
|
|
}, |
|
|
}, |
|
|
|
|
|
editVisible:{ |
|
|
|
|
|
type:Boolean, |
|
|
|
|
|
default:false |
|
|
|
|
|
}, |
|
|
visibleFlag: { |
|
|
visibleFlag: { |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
|
default: true |
|
|
default: true |
|
|
@ -132,7 +136,14 @@ export default { |
|
|
newRev:null, |
|
|
newRev:null, |
|
|
fileRemark:'' |
|
|
fileRemark:'' |
|
|
}, |
|
|
}, |
|
|
orderRef3FilterValue:'' |
|
|
|
|
|
|
|
|
orderRef3FilterValue:'', |
|
|
|
|
|
remarkEditVisible:false, |
|
|
|
|
|
remarkEditLoading:false, |
|
|
|
|
|
remarkEditForm:{ |
|
|
|
|
|
id:null, |
|
|
|
|
|
fileName:'', |
|
|
|
|
|
fileRemark:'' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
methods:{ |
|
|
@ -492,6 +503,46 @@ export default { |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
openRemarkEditDialog(row){ |
|
|
|
|
|
if (!row || !row.id) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.remarkEditForm.id = row.id |
|
|
|
|
|
this.remarkEditForm.fileName = row.fileName || '' |
|
|
|
|
|
this.remarkEditForm.fileRemark = row.fileRemark || '' |
|
|
|
|
|
this.remarkEditVisible = true |
|
|
|
|
|
}, |
|
|
|
|
|
submitRemarkEdit(){ |
|
|
|
|
|
if (!this.remarkEditForm.id) { |
|
|
|
|
|
this.$message.warning('附件ID不能为空') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.remarkEditLoading = true |
|
|
|
|
|
const payload = { |
|
|
|
|
|
id: this.remarkEditForm.id, |
|
|
|
|
|
fileRemark: this.remarkEditForm.fileRemark || '' |
|
|
|
|
|
} |
|
|
|
|
|
ossUpdateRemark(payload).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success(data.msg || '操作成功') |
|
|
|
|
|
this.remarkEditVisible = false |
|
|
|
|
|
this.handleQuery() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.warning((data && data.msg) || '备注更新失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch((error) => { |
|
|
|
|
|
this.$message.error(error) |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
this.remarkEditLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
closeRemarkEditDialog(){ |
|
|
|
|
|
this.remarkEditForm = { |
|
|
|
|
|
id:null, |
|
|
|
|
|
fileName:'', |
|
|
|
|
|
fileRemark:'' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
previewFile(row){ |
|
|
previewFile(row){ |
|
|
// 预览文件 |
|
|
// 预览文件 |
|
|
let type = ''; |
|
|
let type = ''; |
|
|
@ -642,7 +693,7 @@ export default { |
|
|
<el-button type="primary" @click="handleDownload">下载</el-button> |
|
|
<el-button type="primary" @click="handleDownload">下载</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template v-if="showOrderRef3Filter"> |
|
|
<template v-if="showOrderRef3Filter"> |
|
|
<span style="margin-left: 8px; margin-right: 6px;"></span> |
|
|
|
|
|
|
|
|
<span style="margin-left: 8px; margin-right: 6px;">类型</span> |
|
|
<el-select v-model="orderRef3FilterValue" clearable style="width: 180px"> |
|
|
<el-select v-model="orderRef3FilterValue" clearable style="width: 180px"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="(item, index) in orderRef3FilterOptions" |
|
|
v-for="(item, index) in orderRef3FilterOptions" |
|
|
@ -686,14 +737,17 @@ export default { |
|
|
fixed="right" |
|
|
fixed="right" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
width="120" |
|
|
|
|
|
label="操作" v-if="removeVisible || previewVisible"> |
|
|
|
|
|
|
|
|
width="180" |
|
|
|
|
|
label="操作" v-if="editVisible || removeVisible || previewVisible"> |
|
|
<template slot-scope="{row,$index}"> |
|
|
<template slot-scope="{row,$index}"> |
|
|
|
|
|
<template v-if="editVisible&&effectiveVisibleFlag"> |
|
|
|
|
|
<el-link style="cursor:pointer;" v-if="!disabled&&!readonly" @click="openRemarkEditDialog(row)">编辑</el-link> |
|
|
|
|
|
</template> |
|
|
<template v-show="removeVisible&&effectiveVisibleFlag"> |
|
|
<template v-show="removeVisible&&effectiveVisibleFlag"> |
|
|
<el-link style="cursor:pointer;" v-if="!disabled&&!readonly" @click="handleRemove(row)">删除</el-link> |
|
|
|
|
|
|
|
|
<el-link style="cursor:pointer;margin-left: 8px;" v-if="!disabled&&!readonly" @click="handleRemove(row)">删除</el-link> |
|
|
</template> |
|
|
</template> |
|
|
<template v-if="previewVisible"> |
|
|
<template v-if="previewVisible"> |
|
|
<el-link style="cursor:pointer;" @click="previewFile(row)">预览</el-link> |
|
|
|
|
|
|
|
|
<el-link style="cursor:pointer;margin-left: 8px;" @click="previewFile(row)">预览</el-link> |
|
|
</template> |
|
|
</template> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -792,6 +846,21 @@ export default { |
|
|
<el-button @click="upgradeVisible = false">关闭</el-button> |
|
|
<el-button @click="upgradeVisible = false">关闭</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="编辑" :visible.sync="remarkEditVisible" v-drag width="420px" append-to-body :close-on-click-modal="false" @close="closeRemarkEditDialog"> |
|
|
|
|
|
<el-form :model="remarkEditForm" label-position="top"> |
|
|
|
|
|
<el-form-item label="文件名称"> |
|
|
|
|
|
<el-input :value="remarkEditForm.fileName" disabled></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="备注"> |
|
|
|
|
|
<el-input type="textarea" v-model="remarkEditForm.fileRemark" resize="none" :autosize="{minRows: 3, maxRows: 3}"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-footer style="height:35px;margin-top: 55px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" :loading="remarkEditLoading" @click="submitRemarkEdit">确定</el-button> |
|
|
|
|
|
<el-button @click="remarkEditVisible = false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
|