Commit c099ec42 authored by jingnan's avatar jingnan 👀

Merge branch 'develop' of http://94.191.100.41/inet-two/web into develop

parents bf14f9ef bb323292
...@@ -189,6 +189,8 @@ export default { ...@@ -189,6 +189,8 @@ export default {
if (this.$utils.isObect(val)) { if (this.$utils.isObect(val)) {
if (val.id) { if (val.id) {
searchArray = [val.id] searchArray = [val.id]
} else {
searchArray = val
} }
} else if (this.$utils.isNumber(val)) { } else if (this.$utils.isNumber(val)) {
searchArray = [val] searchArray = [val]
......
...@@ -14,14 +14,14 @@ export function downFileByFileCode(fileCode) { ...@@ -14,14 +14,14 @@ export function downFileByFileCode(fileCode) {
export function downFileByFileId(fileId) { export function downFileByFileId(fileId) {
return downloadFile(`/dfs/fileManager/downloadio?fileId=${fileId}`) return downloadFile(`/dfs/fileManager/downloadio?fileId=${fileId}`)
} }
// // 下载文件 // 下载文件
// export function downFileByFileId(objName, objId, linkId, disLoadingFlag) { export function downFileByFileIds(objName, objId, linkId, disLoadingFlag) {
// let url = `/dfs/fileManager/downloadio?objName=${objName}&objId=${objId}&linkId=${linkId}` let url = `/dfs/fileManager/downloadio?objName=${objName}&objId=${objId}&linkId=${linkId}`
// if (disLoadingFlag) { if (disLoadingFlag) {
// url += '&disLoadingFlag=' + disLoadingFlag url += '&disLoadingFlag=' + disLoadingFlag
// } }
// return downloadFile(url) return downloadFile(url)
// } }
export function downFileUseFileId(fileId) { export function downFileUseFileId(fileId) {
return downloadFile(`/dfs/fileManager/downloadio?fileId=${fileId}`) return downloadFile(`/dfs/fileManager/downloadio?fileId=${fileId}`)
} }
<template>
<div class="downloadObjFiles">
<span
v-if="ifShow"
ref="load"
class="content"
:basicData="basicData"
@click="downFileByFile"
>下载</span>
</div>
</template>
<script>
import { downFileByFileIds } from '@/api/file'
// import { post } from '@/utils/http'
export default {
name: 'DownloadObjFiles',
componentName: '行动项-附件下载',
props: {
basicData: {
type: Object,
default: () => {}
},
form: {
type: Object,
default: () => {}
}
},
data() {
return {
}
},
computed: {
ifShow() {
if (this.form.state !== 'under_reviewing' || this.form.state !== 'Complete') {
return true
} else {
return false
}
}
},
methods: {
downFileByFile() {
const subTypeName = this.$parent.$parent.$parent.$parent.$parent.$parent.$parent.basicData.subTypeName
const obj = this.form.objFileLinks[0]
downFileByFileIds(subTypeName, obj.targetId, obj.id, true).then(res => {
this.downLoadFileUrl(res)
})
},
downLoadFileUrl(res) {
if (res.headers['content-disposition']) {
const fileName = decodeURI(res.headers['content-disposition'].substring(res.headers['content-disposition'].indexOf('=') + 1, res.headers['content-disposition'].length))
const url = window.URL.createObjectURL(new Blob([res.data], { type: res.headers['content-type'] }))
this.$utils.downLoadFileUrl(url, decodeURI(fileName))
} else {
if (res.data instanceof Blob) {
var reader = new FileReader()
reader.addEventListener('loadend', () => {
const message = reader.result && JSON.parse(reader.result)
this.$utils.showMessageWarning(message ? message.message : '数据包下载出错:未找到数据包内容的下载链接,请联系管理员排查问题!')
})
reader.readAsText(res.data, 'utf-8')
} else {
const message = res.data && res.data.message
this.$utils.showMessageWarning(message || '数据包下载出错:未找到数据包内容的下载链接,请联系管理员排查问题!')
}
}
}
}
}
</script>
<style lang="scss" scoped>
.downloadObjFiles{
text-align: center;
.content{
color: #2363AF;
cursor: pointer;
}
}
</style>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</template> </template>
<div v-for="(item) in doclinkList" :key="item.id" class="docInfo"> <div v-for="(item) in doclinkList" :key="item.id" class="docInfo">
<span class="remove" @click="removeFile(item)">删除</span> <span class="remove" @click="removeFile(item)">删除</span>
<span class="name" @click="gotoFileDetail(item)"> {{ item.name }}-{{ item.number }}</span> <span class="name" @click="gotoFileDetail(item.target)"> {{ item.target.name }}-{{ item.target.number }}</span>
</div> </div>
</el-popover> </el-popover>
</div> </div>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<script> <script>
import ExtReviewFeedDocumentLinkAdd from '../ExtReviewFeedDocumentLinkAdd/index.vue' import ExtReviewFeedDocumentLinkAdd from '../ExtReviewFeedDocumentLinkAdd/index.vue'
import { post } from '@/utils/http' import { del, post } from '@/utils/http'
export default { export default {
name: 'SelectUpdateFile', name: 'SelectUpdateFile',
components: { ExtReviewFeedDocumentLinkAdd }, components: { ExtReviewFeedDocumentLinkAdd },
...@@ -117,6 +117,8 @@ export default { ...@@ -117,6 +117,8 @@ export default {
this.doclinkList = res.items.content.map(item => { this.doclinkList = res.items.content.map(item => {
return item.target return item.target
}) })
this.doclinkList = res.items.content
console.log('res.items.content', res.items.content)
this.ifAdd = true this.ifAdd = true
console.log(' this.doclinkList', this.doclinkList) console.log(' this.doclinkList', this.doclinkList)
} }
...@@ -129,7 +131,7 @@ export default { ...@@ -129,7 +131,7 @@ export default {
}) })
}, },
removeFile(item) { removeFile(item) {
post(`/ExtReviewFeedDocumentLink/batch/${item.id}`).then(res => { del(`/ExtReviewFeedDocumentLink/batch/${item.id}`).then(res => {
this.$utils.showMessageSuccess('删除成功') this.$utils.showMessageSuccess('删除成功')
this.getDoclinkList() this.getDoclinkList()
}) })
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<div v-if="basicData && basicData.basicInfo && !basicData.basicInfo.forwardFlag && (!isCheckTaskState || (isCheckTaskState && basicData.basicInfo.state==='BE_RESOLVED' && !basicData.basicInfo.parentTaskId))"> <div v-if="basicData && basicData.basicInfo && !basicData.basicInfo.forwardFlag && (!isCheckTaskState || (isCheckTaskState && basicData.basicInfo.state==='BE_RESOLVED' && !basicData.basicInfo.parentTaskId))">
<div class="sub-title" style="padding-bottom:12px">任务处理</div> <div class="sub-title" style="padding-bottom:12px">任务处理</div>
<div <div
v-if="basicData&& basicData.businessObject &&basicData.businessObject.subTypeName&& basicData.businessObject.subTypeName==='ExtActionItem'&&basicData.businessObject.state==='InProgress'" v-if="basicData&& basicData.businessObject &&basicData.businessObject.subTypeName&& basicData.businessObject.subTypeName==='ExtActionItem'&&basicData.businessObject.state==='InProgress'&&basicData.basicInfo.aliasName!=='编制'"
> >
<dee-as-com <dee-as-com
:lay-config="{ :lay-config="{
...@@ -597,6 +597,7 @@ export default { ...@@ -597,6 +597,7 @@ export default {
}] }]
// 获取流程信息 // 获取流程信息
getInstanceInfo(instanceId).then(res => { getInstanceInfo(instanceId).then(res => {
console.log('流程信息', this.basicData)
this.processInstVO = res.items this.processInstVO = res.items
this.$set(this.basicData, 'instanceData', res.items) this.$set(this.basicData, 'instanceData', res.items)
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment