修改下载接口
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
>
|
>
|
||||||
<span slot="operation" slot-scope="record">
|
<span slot="operation" slot-scope="record">
|
||||||
<a class="text" v-for="(ol,index) in OperationList"
|
<a class="text" v-for="(ol,index) in OperationList"
|
||||||
@click="OperationClick(ol,record)">{{ol.text}}</a>
|
@click="OperationClick(ol,record)">{{ ol.text instanceof Array ? ol.text[record.collectFlag || 0] : ol.text}}</a>
|
||||||
</span>
|
</span>
|
||||||
<span slot="detailClick" slot-scope="text,record">
|
<span slot="detailClick" slot-scope="text,record">
|
||||||
<a class="text" @click="detailClick(record)">{{text}}</a>
|
<a class="text" @click="detailClick(record)">{{text}}</a>
|
||||||
|
|||||||
@@ -26,44 +26,44 @@
|
|||||||
<span class="text-field-right">{{ol.value ? ol.value : '--'}}</span>
|
<span class="text-field-right">{{ol.value ? ol.value : '--'}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="TextInformation" v-if="val == '文本信息'">
|
<div class="TextInformation" v-if="val == '文本信息'">
|
||||||
<div class="TextInformationContent" v-for="(ol,index1) in item[val]" style="width: 100%">
|
<div class="TextInformationContent" v-for="(ol,index1) in item[val]" style="width: 100%">
|
||||||
<span class="TextInformationContentLeft">
|
<span class="TextInformationContentLeft">
|
||||||
{{ol.db_field_txt}}
|
{{ol.db_field_txt}}
|
||||||
</span>
|
</span>
|
||||||
<span class="TextInformationContentcontent">
|
<span class="TextInformationContentcontent">
|
||||||
{{ol.value ? ol.value.fileName : '--'}}
|
{{ol.value ? ol.value.fileName : '--'}}
|
||||||
</span>
|
</span>
|
||||||
<span class="TextInformationContentright">
|
<span class="TextInformationContentright" v-show="ol.value" @click="download(ol.value)">
|
||||||
<a-icon type="vertical-align-bottom"/>
|
<a-icon type="vertical-align-bottom"/>
|
||||||
下载
|
下载
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="TextInformation" v-else-if="val == '关联信息'">
|
</div>
|
||||||
<div class="TextInformationContent" v-for="(ol,index1) in item[val]" style="width: 100%">
|
<div class="TextInformation" v-else-if="val == '关联信息'">
|
||||||
|
<div class="TextInformationContent" v-for="(ol,index1) in item[val]" style="width: 100%">
|
||||||
<span class="TextInformationContentLeft">
|
<span class="TextInformationContentLeft">
|
||||||
{{ol.db_field_txt}}
|
{{ol.db_field_txt}}
|
||||||
</span>
|
</span>
|
||||||
<span class="TextInformationContentcontent">
|
<span class="TextInformationContentcontent">
|
||||||
{{ol.value ? ol.value.fileName : '--'}}
|
{{ol.value ? ol.value.fileName : '--'}}
|
||||||
</span>
|
</span>
|
||||||
<span class="TextInformationContentright">
|
<span class="TextInformationContentright" v-show="ol.value" @click="download(ol.value)">
|
||||||
<a-icon type="vertical-align-bottom"/>
|
<a-icon type="vertical-align-bottom"/>
|
||||||
下载
|
下载
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'docIndex',
|
name: 'docIndex',
|
||||||
@@ -87,6 +87,9 @@
|
|||||||
this.detailList = []
|
this.detailList = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
download(item) {
|
||||||
|
downloadFile('/sys/common/download', item.fileName, { id: item.id })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,11 +65,11 @@
|
|||||||
return {
|
return {
|
||||||
OperationList: [
|
OperationList: [
|
||||||
{
|
{
|
||||||
text: '收藏',
|
text: ['收藏','取消收藏'],
|
||||||
ClickEvent: 'Collection'
|
ClickEvent: 'Collection'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '订阅',
|
text: ['订阅','取消订阅'],
|
||||||
ClickEvent: 'subscribe'
|
ClickEvent: 'subscribe'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -169,15 +169,22 @@
|
|||||||
},
|
},
|
||||||
//收藏按钮
|
//收藏按钮
|
||||||
Collection(val) {
|
Collection(val) {
|
||||||
|
let _this = this
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: '确认收藏?',
|
content: val.collectFlag == 0 || !val.collectFlag ? '确认收藏?':'确定取消收藏',
|
||||||
onOk() {
|
onOk() {
|
||||||
getAction('document/bussDocumentLibraryEO/addCollect', { id: val.id }).then((res) => {
|
let url = ''
|
||||||
|
if (val.collectFlag == 0 || !val.collectFlag){
|
||||||
|
url = 'document/bussDocumentLibraryEO/addCollect'
|
||||||
|
}else{
|
||||||
|
url = 'document/bussDocumentLibraryEO/cancelCollect'
|
||||||
|
}
|
||||||
|
getAction(url, { id: val.id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
_this.$message.success(res.message)
|
||||||
eventBUs.$emit('searchReset')
|
eventBUs.$emit('searchReset')
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
_this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user