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