修改已知问题

This commit is contained in:
qq787203167
2022-05-31 10:44:19 +08:00
parent 6709b7c925
commit f53278df09
4 changed files with 57 additions and 16 deletions
+1
View File
@@ -899,4 +899,5 @@ module.exports = {
fullScreenView:'Full Screen View', fullScreenView:'Full Screen View',
systemPrompt:'System Prompt', systemPrompt:'System Prompt',
loginExpired:'Login Expired', loginExpired:'Login Expired',
reportNotUploaded:'Report not uploaded',
} }
+1
View File
@@ -904,4 +904,5 @@ module.exports = {
fullScreenView:'全屏查看', fullScreenView:'全屏查看',
systemPrompt:'系统提示', systemPrompt:'系统提示',
loginExpired:'登录已过期', loginExpired:'登录已过期',
reportNotUploaded:'报告未上传',
} }
@@ -151,10 +151,10 @@
@click="deleteLib(record)"> @click="deleteLib(record)">
{{ $t('deleteLib') }} {{ $t('deleteLib') }}
</a> </a>
<!-- <a class="text-operation"--> <a class="text-operation"
<!-- @click="resultReportedClick(record)">--> @click="resultReportedClick(record)">
<!-- {{$t('resultReported')}}--> {{$t('resultReported')}}
<!-- </a>--> </a>
</span> </span>
<span slot="titleName" slot-scope="text,record" :title="text"> <span slot="titleName" slot-scope="text,record" :title="text">
{{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }} {{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }}
@@ -303,7 +303,7 @@
</a-row> </a-row>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<resultReportedUpload ref="resultReportedUploadRef"/> <resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/>
</a-card> </a-card>
</template> </template>
@@ -1371,8 +1371,15 @@
}, },
resultReportedClick(val) { resultReportedClick(val) {
this.clickButtonToUpload(val, 1) if (val.regulationOwnerId == this.userInfo().id) {
// this.$refs.resultReportedUploadRef.clickButtonToUploadFile(val) 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" name="file"
:file-list="myfileList" :file-list="myfileList"
:multiple="true" :multiple="true"
:action="uploadAction+'?state='+state+'&cut='+cut" :action="uploadAction+'?cut='+cut"
:headers="headers" :headers="headers"
@preview="preview" @preview="preview"
:before-upload="beforeUpload" :before-upload="beforeUpload"
@@ -33,7 +33,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 { getAction, postAction, downFile, downloadFile } from '@/api/manage' import { getAction, postAction, downFile, downloadFile, putAction } from '@/api/manage'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
export default { export default {
@@ -54,6 +54,9 @@
cut: '', cut: '',
confirmLoading: false, confirmLoading: false,
uploadQuery: {}, uploadQuery: {},
url: {
editModel: '/project/projectLawsInventoryEO/edit'
}
} }
}, },
created() { created() {
@@ -75,14 +78,21 @@
this.uploadQuery = item this.uploadQuery = item
this.myfileList = [] this.myfileList = []
this.visible = true this.visible = true
getAction('sys/common/getFileInfos', { id: item }).then((res) => { getAction('sys/common/getFileInfos', { id: item.fileId }).then((res) => {
if (res.success) { if (res.success) {
let data = res.result this.myfileList = res.result
if (data && data.length > 0) { if (this.myfileList && this.myfileList.length > 0) {
this.myfileList.forEach((res) => { this.myfileList.forEach((val) => {
res.name = res.fileName val.name = val.fileName
res.uid = res.id 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) { if (this.myfileList && this.myfileList.length == 0) {
this.$message.warning(this.$t('pleaseUpload') + this.$t('resultReported')) this.$message.warning(this.$t('pleaseUpload') + this.$t('resultReported'))
} else { } 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() { handleCancel() {