法规库-标准分解单-拆分结果上传
This commit is contained in:
@@ -834,6 +834,7 @@
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-upload
|
||||
:key="cfjgscUploadKey"
|
||||
style="display: inline-block;margin:0 5px;"
|
||||
:show-file-list = 'false'
|
||||
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'bd291146ac1e42c48968c5142ae55375' : '960a97045a6e47b0b8e33ebc347e5fd9'"
|
||||
@@ -1836,6 +1837,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cfjgscUploadKey:1,
|
||||
externalStatus: '',
|
||||
handleList: [],
|
||||
CycxOptions: [],
|
||||
@@ -2179,7 +2181,7 @@ export default {
|
||||
splitType: '全部章节'
|
||||
},
|
||||
headers:{
|
||||
token: localStorage.getItem('userInfo')?.token
|
||||
token: JSON.parse(localStorage.getItem('userInfo')).token
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2192,24 +2194,29 @@ export default {
|
||||
},
|
||||
uploadSplitResultSuccess (res, file, fileList) {
|
||||
if (res.ok) {
|
||||
this.uploadFilesplitEo.attId = res.data.attId
|
||||
this.uploadFilesplitEo.fileName = res.data.name
|
||||
if (res.data.standNum != null && res.data.standNum !== '') {
|
||||
this.uploadFilesplitEo.standNumSplit = res.data.standNum
|
||||
}
|
||||
if (res.data.standName != null && res.data.standName !== '') {
|
||||
this.uploadFilesplitEo.standNameSplit = res.data.standName
|
||||
}
|
||||
this.defaultImportSplitResultFileList.push(file)
|
||||
this.$message.success('文件上传成功')
|
||||
setTimeout(()=>{
|
||||
this.handleImportSplitResult();
|
||||
},1000)
|
||||
this.$message.success(res.message)
|
||||
this.cfjgscUploadKey++
|
||||
// this.uploadFilesplitEo.attId = res.data.attId
|
||||
// this.uploadFilesplitEo.fileName = res.data.name
|
||||
// if (res.data.standNum != null && res.data.standNum !== '') {
|
||||
// this.uploadFilesplitEo.standNumSplit = res.data.standNum
|
||||
// }
|
||||
// if (res.data.standName != null && res.data.standName !== '') {
|
||||
// this.uploadFilesplitEo.standNameSplit = res.data.standName
|
||||
// }
|
||||
// this.defaultImportSplitResultFileList.push(file)
|
||||
// this.$message.success('文件上传成功')
|
||||
// setTimeout(()=>{
|
||||
// this.handleImportSplitResult();
|
||||
// },1000)
|
||||
} else {
|
||||
this.defaultImportSplitResultFileList = []
|
||||
this.uploadFilesplitEo.attId = ''
|
||||
// this.defaultImportSplitResultFileList = []
|
||||
// this.uploadFilesplitEo.attId = ''
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.$router.go(0)
|
||||
},2000)
|
||||
},
|
||||
handleImportSplitResult(){
|
||||
console.log(123333)
|
||||
@@ -2220,10 +2227,13 @@ export default {
|
||||
_formData.append('standNumSplit', this.uploadFilesplitEo.standNumSplit)
|
||||
_formData.append('standId', this.uploadFilesplitEo.standId)
|
||||
_formData.append('standNameSplit', this.uploadFilesplitEo.standNameSplit)
|
||||
_formData.append('fileType', this.uploadFilesplitEo.fileType)
|
||||
// _formData.append('fileType', this.uploadFilesplitEo.fileType)
|
||||
console.log(this.textStatusMap[sarStandardsInfoEO.textStatus])
|
||||
_formData.append('fileType', this.textStatusMap[sarStandardsInfoEO.textStatus])
|
||||
_formData.append('file', file.raw)
|
||||
if (fileTypeResult) {
|
||||
this.importSplitResultLoading = true
|
||||
console.log(123)
|
||||
this.$http.postData('lawss/sarFileSplitItems/importSplitItemsZip', _formData, {
|
||||
}, res => {
|
||||
this.importSplitResultLoading = false
|
||||
@@ -2256,11 +2266,12 @@ export default {
|
||||
}
|
||||
this.sarStandardsInfoEO.lawsName = this.sarStandardsInfoEO.standName
|
||||
this.sarStandardsInfoEO.stateName = this.sarStandardsInfoEO.standStateShow
|
||||
// this.sarStandardsInfoEO.resType = this.$route.params.pageType
|
||||
this.sarStandardsInfoEO.resType = this.$route.params.pageType
|
||||
this.uploadFilesplitEo.standNumSplit = this.sarStandardsInfoEO.lawsNumber
|
||||
this.uploadFilesplitEo.standNameSplit = this.sarStandardsInfoEO.lawsName
|
||||
this.uploadFilesplitEo.standId = this.sarStandardsInfoEO.id
|
||||
this.uploadFilesplitEo.fileType = this.$route.params.pageType
|
||||
// this.uploadFilesplitEo.fileType = this.$route.params.pageType
|
||||
this.uploadFilesplitEo.fileType = this.sarStandardsInfoEO.textStatus
|
||||
|
||||
var filename = file.name
|
||||
var index1 = filename.lastIndexOf('.')
|
||||
|
||||
Reference in New Issue
Block a user