修改已知问题
This commit is contained in:
@@ -899,4 +899,5 @@ module.exports = {
|
||||
fullScreenView:'Full Screen View',
|
||||
systemPrompt:'System Prompt',
|
||||
loginExpired:'Login Expired',
|
||||
reportNotUploaded:'Report not uploaded',
|
||||
}
|
||||
@@ -904,4 +904,5 @@ module.exports = {
|
||||
fullScreenView:'全屏查看',
|
||||
systemPrompt:'系统提示',
|
||||
loginExpired:'登录已过期',
|
||||
reportNotUploaded:'报告未上传',
|
||||
}
|
||||
@@ -151,10 +151,10 @@
|
||||
@click="deleteLib(record)">
|
||||
{{ $t('deleteLib') }}
|
||||
</a>
|
||||
<!-- <a class="text-operation"-->
|
||||
<!-- @click="resultReportedClick(record)">-->
|
||||
<!-- {{$t('resultReported')}}-->
|
||||
<!-- </a>-->
|
||||
<a class="text-operation"
|
||||
@click="resultReportedClick(record)">
|
||||
{{$t('resultReported')}}
|
||||
</a>
|
||||
</span>
|
||||
<span slot="titleName" slot-scope="text,record" :title="text">
|
||||
{{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }}
|
||||
@@ -303,7 +303,7 @@
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<resultReportedUpload ref="resultReportedUploadRef"/>
|
||||
<resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@@ -1371,8 +1371,15 @@
|
||||
},
|
||||
|
||||
resultReportedClick(val) {
|
||||
this.clickButtonToUpload(val, 1)
|
||||
// this.$refs.resultReportedUploadRef.clickButtonToUploadFile(val)
|
||||
if (val.regulationOwnerId == this.userInfo().id) {
|
||||
this.$refs.resultReportedUploadRef.clickButtonToUploadFile(val)
|
||||
} else {
|
||||
if (val.fileId) {
|
||||
this.clickButtonToUpload(val.fileId, 1)
|
||||
} else {
|
||||
this.$message.warning(this.$t('reportNotUploaded'))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
name="file"
|
||||
:file-list="myfileList"
|
||||
:multiple="true"
|
||||
:action="uploadAction+'?state='+state+'&cut='+cut"
|
||||
:action="uploadAction+'?cut='+cut"
|
||||
:headers="headers"
|
||||
@preview="preview"
|
||||
:before-upload="beforeUpload"
|
||||
@@ -33,7 +33,7 @@
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
|
||||
import { getAction, postAction, downFile, downloadFile, putAction } from '@/api/manage'
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
export default {
|
||||
@@ -54,6 +54,9 @@
|
||||
cut: '',
|
||||
confirmLoading: false,
|
||||
uploadQuery: {},
|
||||
url: {
|
||||
editModel: '/project/projectLawsInventoryEO/edit'
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -75,14 +78,21 @@
|
||||
this.uploadQuery = item
|
||||
this.myfileList = []
|
||||
this.visible = true
|
||||
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
|
||||
getAction('sys/common/getFileInfos', { id: item.fileId }).then((res) => {
|
||||
if (res.success) {
|
||||
let data = res.result
|
||||
if (data && data.length > 0) {
|
||||
this.myfileList.forEach((res) => {
|
||||
res.name = res.fileName
|
||||
res.uid = res.id
|
||||
this.myfileList = res.result
|
||||
if (this.myfileList && this.myfileList.length > 0) {
|
||||
this.myfileList.forEach((val) => {
|
||||
val.name = val.fileName
|
||||
val.uid = val.id
|
||||
if (val.response) {
|
||||
this.fileList.push(val.response.result)
|
||||
} else {
|
||||
this.fileList.push(val)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.myfileList = []
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -91,7 +101,29 @@
|
||||
if (this.myfileList && this.myfileList.length == 0) {
|
||||
this.$message.warning(this.$t('pleaseUpload') + this.$t('resultReported'))
|
||||
} else {
|
||||
|
||||
let content = []
|
||||
this.fileList.forEach(res => {
|
||||
content.push(res.id || res.name)
|
||||
})
|
||||
let formInline = JSON.parse(JSON.stringify(this.uploadQuery))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] && formInline[res] instanceof Array) {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
})
|
||||
formInline.fileId = content.join(',')
|
||||
this.confirmLoading = true
|
||||
putAction(this.url.editModel, formInline).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('resultReportedUploadForm')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleCancel() {
|
||||
|
||||
Reference in New Issue
Block a user