Commit bafc6c81 by wangql

修改BUG

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