Commit bafc6c81 by wangql

修改BUG

1 parent f4da840e
......@@ -158,7 +158,12 @@ export default {
type: String,
default: '870px'
},
detail: Object,
detail: {
type: Object,
default: function() {
return {}
}
},
diaTitle: String
},
watch: {
......
......@@ -111,7 +111,7 @@
</gl-col>
</gl-row>
</gl-form>
<!-- <a :href="fileUrl" download="" ref="fileA" v-show="false">aaaaaaaaaaaa</a> -->
<a :href="fileUrl" ref="fileA" v-show="false" target="_blank">aaaaaaaaaaaa</a>
<gl-table
class="m-b10"
:table="tableData"
......@@ -122,7 +122,7 @@
<a @click="openPushListDialog(scope.scope.row.recordId)" class="el-button el-button--text">{{tableData.data[scope.scope.$index][i.prop]}}</a>
</template>
<template v-else-if='i.prop === "titilePage"'>
<img class="tableImg" :src="tableData.data[scope.scope.$index][i.prop]">
<img class="tableImg" :src="tableData.data[scope.scope.$index][i.prop]" @click="showTableImg(tableData.data[scope.scope.$index][i.prop])">
</template>
<template v-else-if="i.formatter">
{{i.formatter(scope.scope.row)}}
......@@ -226,12 +226,19 @@
>
</detail-dialog>
<!-- 详情弹出框 end -->
<!-- 大图弹出框 start -->
<gl-dialog
:visible="!!dialogImageUrl"
:before-close="handleClose_bigImg">
<img width="100%" :src="dialogImageUrl" alt="">
</gl-dialog>
<!-- 大图弹出框 end -->
</div>
</template>
<script>
import { ctMethods, nmMethods, request } from '@/api'
import notice from '@/common/notice'
// import notice from '@/common/notice'
import DetailDialog from './DetailDialog'
export default {
name: 'noticeCenter',
......@@ -294,6 +301,7 @@ export default {
dialogVisible_pushList: false,
dialogVisible_detail: false,
detailVisible: false,
dialogImageUrl: '',
columnMap: {
'1': [
{
......@@ -779,16 +787,23 @@ export default {
label: '下载附件',
type: 'text',
formatter(cellValue) {
return cellValue.publishStatus === 3 ? '' : '下载附件'
return cellValue.attachment ? '下载附件' : ''
},
callback: (index, row) => {
if (row[index].attachment) {
location.href = row[index].attachment
} else {
notice.errorTips('附件为空')
}
// this.fileUrl = 'https://dz.80txt.com/57199/极品全能学生.zip'
// this.$refs['fileA'].click()
// if (row[index].attachment) {
// location.href = row[index].attachment
// } else {
// notice.errorTips('附件为空')
// }
this.fileUrl = row[index].attachment
const file = this.$refs['fileA']
let i = 0
i = setInterval(() => {
if (file.getAttribute('href') === this.fileUrl) {
clearInterval(i)
file.click()
}
}, 100)
// this.$confirm('下载附件', '', {
// type: 'warning'
// })
......@@ -1002,6 +1017,13 @@ export default {
},
handleDetailHide() {
this.detailVisible = !this.detailVisible
},
showTableImg(url) {
this.dialogImageUrl = url
},
// 关闭大图弹出框
handleClose_bigImg() {
this.dialogImageUrl = ''
}
}
}
......
......@@ -53,7 +53,7 @@
>
<!-- <a href="http://down8.5156edu.com/showzipdown4.php?f_type1=2&id=96098">下载附件</a> -->
<!-- <a href="https://cdn.shopify.com/s/files/1/1545/3617/files/SH01_User_Manaul.pdf" download="SH01_User_Manaul.pdf">下载附件</a> -->
<a :href="noticeForm.attachment" v-if="noticeForm.attachment">下载附件</a>
<a :href="noticeForm.attachment" v-if="noticeForm.attachment" target="_blank">下载附件</a>
<span v-else>暂无附件</span>
</gl-form-item>
<gl-form-item
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!