修改虚拟清单的导出及新增的传参
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import {ACCESS_TOKEN} from '@/store/mutation-types'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import eventBUs from '../../common/event'
|
||||
|
||||
export default {
|
||||
@@ -25,32 +25,38 @@
|
||||
default: {}
|
||||
},
|
||||
//判断当前文档库还是其余的页面
|
||||
isTrue:{
|
||||
isTrue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
accept:{
|
||||
accept: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
projectId:{
|
||||
projectId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
dummyInventoryBaseId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
|
||||
cut: '',
|
||||
tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
|
||||
cut: ''
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
importUrl(){
|
||||
if (this.projectId){
|
||||
return window._CONFIG['domianURL'] +'/'+ this.url.importZipUrl+'?cut='+this.cut+'&projectId='+this.projectId
|
||||
}
|
||||
return window._CONFIG['domianURL'] +'/'+ this.url.importZipUrl+'?cut='+this.cut
|
||||
},
|
||||
computed: {
|
||||
importUrl() {
|
||||
if (this.projectId) {
|
||||
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&projectId=' + this.projectId
|
||||
} else if (this.dummyInventoryBaseId) {
|
||||
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&dummyInventoryBaseId=' + this.dummyInventoryBaseId
|
||||
}
|
||||
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let long = localStorage.getItem('language')
|
||||
@@ -71,14 +77,14 @@
|
||||
if (info.file.status === 'done') {
|
||||
if (info.file.response.success) {
|
||||
if (info.file.response.code === 201) {
|
||||
let {message} = info.file.response
|
||||
let {name} = info.file
|
||||
let { message } = info.file.response
|
||||
let { name } = info.file
|
||||
let content = []
|
||||
if (message) {
|
||||
message = message.split('</br>')
|
||||
message.forEach(res => {
|
||||
if (res) {
|
||||
content.push( < div > {res} < /div>)
|
||||
content.push( < div > { res } < /div>)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -86,28 +92,28 @@
|
||||
title: name,
|
||||
content: (
|
||||
< div >
|
||||
{content}
|
||||
{ content }
|
||||
< /div>
|
||||
)
|
||||
})
|
||||
} else {
|
||||
if (this.isTrue){
|
||||
if (this.isTrue) {
|
||||
this.$emit('getList')
|
||||
}else{
|
||||
} else {
|
||||
eventBUs.$emit('searchReset')
|
||||
}
|
||||
this.$message.success(info.file.response.message || `${info.file.name} 文件导入成功`)
|
||||
}
|
||||
this.spinning = false
|
||||
} else {
|
||||
let {message} = info.file.response
|
||||
let {name} = info.file
|
||||
let { message } = info.file.response
|
||||
let { name } = info.file
|
||||
let content = []
|
||||
if (message) {
|
||||
message = message.split('</br>')
|
||||
message.forEach(res => {
|
||||
if (res) {
|
||||
content.push( < div > {res} < /div>)
|
||||
content.push( < div > { res } < /div>)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -115,7 +121,7 @@
|
||||
title: name,
|
||||
content: (
|
||||
< div >
|
||||
{content}
|
||||
{ content }
|
||||
< /div>
|
||||
)
|
||||
})
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
{{$t('DocumentStandard')}}
|
||||
</div>
|
||||
<div class="operator-text" v-has="'document:importZip'" v-if="isTrue">
|
||||
<ImportFile :url="url" :isTrue="true" @getList="getPersonnelList" :accept="'.zip'"/>
|
||||
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true" @getList="getPersonnelList" :accept="'.zip'"/>
|
||||
</div>
|
||||
<!-- 模板下载-->
|
||||
<div @click="handleModule" class="operator-text" v-if="isTrue">
|
||||
@@ -611,7 +611,8 @@
|
||||
getList() {
|
||||
let query = {
|
||||
...this.queryParam,
|
||||
...this.queryParamQuery
|
||||
...this.queryParamQuery,
|
||||
dummyInventoryBaseId: this.$route.query.id
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user