对接设计符合性确认
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="$t('viewFile')"
|
||||
:width="600"
|
||||
:visible="visibleFile"
|
||||
:maskClosable="false"
|
||||
@cancel="visibleFile = false"
|
||||
>
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="visibleFile = false">
|
||||
{{$t('cancel')}}
|
||||
</a-button>
|
||||
</template>
|
||||
<a-table
|
||||
class="table"
|
||||
:columns="columnsFile"
|
||||
:pagination="false"
|
||||
:scroll="{x:500,y: 400}"
|
||||
:data-source="dataSourceFile"
|
||||
:loading="loading"
|
||||
>
|
||||
<span slot="fileOperation" slot-scope="record">
|
||||
<a class="text" @click="pdfPreview(record)"
|
||||
:disabled="record.fileSuffix == '.pdf' || record.fileSuffix == '.docx'
|
||||
|| record.fileSuffix == '.xlsx' || record.fileSuffix == '.xls' ? false : true">
|
||||
{{$t('See')}}
|
||||
</a>
|
||||
<a class="text" @click="download(record)">
|
||||
{{ $t('download') }}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Base64 } from 'js-base64'
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'viewFileModel',
|
||||
|
||||
data() {
|
||||
return {
|
||||
dataSourceFile: [],
|
||||
loading: false,
|
||||
visibleFile:false,
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
columnsFile: [
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
dataIndex: 'fileName',
|
||||
align: 'center',
|
||||
width: 260,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
width: 130,
|
||||
scopedSlots: { customRender: 'fileOperation' }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pdfPreview(fileQuery) {
|
||||
let fileName = fileQuery.fileName
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
if (fileSuffix == '.pdf') {
|
||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
||||
} else if (fileSuffix == '.docx') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
||||
}
|
||||
},
|
||||
download(item) {
|
||||
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id })
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.loading = true
|
||||
this.visibleFile = true
|
||||
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSourceFile = res.result
|
||||
this.dataSourceFile.forEach((val) => {
|
||||
let fileName = val.fileName
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
val.fileSuffix = fileSuffix
|
||||
})
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataSourceFile = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -27,11 +27,16 @@
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
<span slot="Deliverables" slot-scope="text,result">
|
||||
<a @click="viewFileClick(result.fileId)" v-if="result.fileId">
|
||||
{{$t('viewFile')}}
|
||||
</a>
|
||||
</span>
|
||||
<span slot="operation" slot-scope="result">
|
||||
<a class="text" @click="edit(result,$t('edit'))">{{$t('edit')}}</a>
|
||||
<a class="text" @click="detailsClick(result)">{{$t('details')}}</a>
|
||||
<a class="text" @click="answerClick(result,$t('replyFromProjectContactPerson'))">{{$t('answer')}}</a>
|
||||
<a class="text">{{$t('deleteLib')}}</a>
|
||||
<a class="text" @click="deleted(result)">{{$t('deleteLib')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<a-modal
|
||||
@@ -52,12 +57,12 @@
|
||||
<span class="title-text-text"
|
||||
:title="$t('engineer')">{{$t('engineer')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel" prop="userName">
|
||||
<PersonnelSelection
|
||||
:query="{db_field_name:'certificationEngineer',db_field_txt:$t('engineer')}"
|
||||
:query="{db_field_name:'userId',db_field_txt:$t('engineer')}"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.certificationEngineerName"/>
|
||||
v-model="formInline.userName"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -129,7 +134,7 @@
|
||||
</a-col>
|
||||
<a-col :span="18">
|
||||
<div class="text-field-right">
|
||||
{{this.formInlineDetails.engineerFeedbackContent}}
|
||||
{{formInlineDetails.engineerFeedbackContent}}
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -138,12 +143,10 @@
|
||||
<div class="text-field-left">{{this.$t('Deliverables')}}:</div>
|
||||
</a-col>
|
||||
<a-col :span="18">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUploadDetails('fileId')">
|
||||
{{ (formInlineDetails.fileId === 'null' || formInlineDetails.fileId === '' ||
|
||||
formInlineDetails.fileId == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
<div v-if="formInlineDetails.fileId" class="text-field-right text-field-cou"
|
||||
@click="viewFileClick(formInlineDetails.fileId)">
|
||||
{{this.$t('viewFile')}}
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" style="margin-bottom: 18px">
|
||||
@@ -198,35 +201,39 @@
|
||||
:columns="columnsTable"
|
||||
>
|
||||
<span slot="operationTable" slot-scope="result">
|
||||
<a>{{$t('reminder')}}</a>
|
||||
<a @click="reminderClick(result)">{{$t('reminder')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
<uploadFile ref="uploadFileDetails" :disabled="true"/>
|
||||
<viewFileModel ref="viewFileModelRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import { getAction, postAction, putAction } from '@/api/manage'
|
||||
import { getAction, postAction, putAction, deleteAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
export default {
|
||||
name: 'engineeringConfirmation',
|
||||
components: {
|
||||
PersonnelSelection,
|
||||
uploadFile
|
||||
uploadFile,
|
||||
viewFileModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
dataSource: [{}],
|
||||
visibleFile: false,
|
||||
dataSource: [],
|
||||
dataSourceTable: [],
|
||||
columnsTable: [
|
||||
{
|
||||
title: this.$t('engineer'),
|
||||
dataIndex: 'engineer',
|
||||
dataIndex: 'userName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
@@ -274,6 +281,13 @@
|
||||
message: this.$t('Deliverables') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
userName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('engineer') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
visibleDetails: false,
|
||||
@@ -293,7 +307,8 @@
|
||||
{
|
||||
title: this.$t('Deliverables'),
|
||||
dataIndex: 'fileId',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'Deliverables' }
|
||||
},
|
||||
{
|
||||
title: this.$t('completedBy'),
|
||||
@@ -329,11 +344,60 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleOk() {
|
||||
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.title == this.$t('addFeedback')) {
|
||||
this.feedbackData(this.url.add, postAction)
|
||||
} else if (this.title == this.$t('edit')) {
|
||||
this.feedbackData(this.url.edit, putAction)
|
||||
} else if (this.title == this.$t('replyFromProjectContactPerson')) {
|
||||
this.feedbackData(this.url.edit, putAction)
|
||||
} else if (this.title == this.$t('distributionEngineer')) {
|
||||
this.distributionEngineer(this.url.edit, putAction)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
distributionEngineer() {
|
||||
let query = {
|
||||
status: 'NotDone',
|
||||
actiProcInstId: this.$route.query.actiProcInstId,
|
||||
projectTaskInventoryId: this.$route.query.id,
|
||||
flowType: '2',
|
||||
userIds: this.formInline.userId,
|
||||
taskDefinitionKey: 'dreDispose'
|
||||
}
|
||||
postAction(this.url.DetailEOAdd, query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.getList()
|
||||
this.visible = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
feedbackData(url, Action) {
|
||||
this.confirmLoading = true
|
||||
Action(url, this.formInline).then((res) => {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.getList()
|
||||
this.visible = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
@@ -342,9 +406,38 @@
|
||||
this.title = title
|
||||
this.visible = true
|
||||
this.formInline = {}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.validateField()
|
||||
})
|
||||
},
|
||||
reminderHandling() {
|
||||
this.visibleTable = true
|
||||
this.getReminderHandlingList()
|
||||
},
|
||||
getReminderHandlingList() {
|
||||
this.loadingTable = true
|
||||
getAction(this.url.queryByActiProcInstId, { actiProcInstId: this.$route.query.actiProcInstId }).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSourceTable = res.result || []
|
||||
this.loadingTable = false
|
||||
} else {
|
||||
this.dataSourceTable = []
|
||||
this.loadingTable = false
|
||||
}
|
||||
})
|
||||
},
|
||||
reminderClick(val) {
|
||||
let query = {
|
||||
msgType: 'designRemindMsg',
|
||||
projectLibraryId: this.$route.query.projectLibraryId,
|
||||
dreUserIds: val.userId,
|
||||
serialNumber: this.$route.query.serialNumber
|
||||
}
|
||||
postAction(this.url.remindDispose, query).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
detailsClick(val) {
|
||||
this.formInlineDetails = val
|
||||
@@ -357,12 +450,18 @@
|
||||
edit(val, title) {
|
||||
this.title = title
|
||||
this.visible = true
|
||||
this.formInline = val
|
||||
this.formInline = JSON.parse(JSON.stringify(val))
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.validateField()
|
||||
})
|
||||
},
|
||||
answerClick(val, title) {
|
||||
this.title = title
|
||||
this.visible = true
|
||||
this.formInline = val
|
||||
this.formInline = JSON.parse(JSON.stringify(val))
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.validateField()
|
||||
})
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
@@ -376,18 +475,6 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
clickButtonToUploadDetails(item) {
|
||||
this.$refs.uploadFileDetails.perentHandleFunc()
|
||||
this.$refs.uploadFileDetails.visible = true
|
||||
this.uploadName = item
|
||||
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFileDetails.perentHandleFunc(res.result)
|
||||
} else {
|
||||
this.$refs.uploadFileDetails.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 上传文件的回调 */
|
||||
uploadSuccess(data) {
|
||||
let attIdList = []
|
||||
@@ -399,10 +486,44 @@
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.validateField([this.uploadName])
|
||||
})
|
||||
},
|
||||
getList(){
|
||||
|
||||
getList() {
|
||||
let query = {
|
||||
actiProcInstId: this.$route.query.actiProcInstId
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.loading = false
|
||||
this.dataSource = res.result || []
|
||||
} else {
|
||||
this.loading = false
|
||||
this.dataSource = []
|
||||
}
|
||||
})
|
||||
},
|
||||
deleted(val) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
deleteAction(_this.url.deleted, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
viewFileClick(item) {
|
||||
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -506,7 +627,6 @@
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #6F7385;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.text-field-right {
|
||||
@@ -514,4 +634,9 @@
|
||||
color: #040B29;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.text-field-cou {
|
||||
color: #00B3BE !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@@ -24,38 +24,7 @@
|
||||
>{{queryForm[item.value]}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<a-modal
|
||||
:title="$t('deliverableTemplate')"
|
||||
:width="600"
|
||||
:visible="visibleFile"
|
||||
:maskClosable="false"
|
||||
@cancel="visibleFile = false"
|
||||
>
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="visibleFile = false">
|
||||
{{$t('cancel')}}
|
||||
</a-button>
|
||||
</template>
|
||||
<a-table
|
||||
class="table"
|
||||
:columns="columnsFile"
|
||||
:pagination="false"
|
||||
:scroll="{x:500,y: 400}"
|
||||
:data-source="dataSourceFile"
|
||||
:loading="loading"
|
||||
>
|
||||
<span slot="fileOperation" slot-scope="record">
|
||||
<a class="text" @click="pdfPreview(record)"
|
||||
:disabled="record.fileSuffix == '.pdf' || record.fileSuffix == '.docx'
|
||||
|| record.fileSuffix == '.xlsx' || record.fileSuffix == '.xls' ? false : true">
|
||||
{{$t('See')}}
|
||||
</a>
|
||||
<a class="text" @click="download(record)">
|
||||
{{ $t('download') }}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
<viewFileModel ref="viewFileModelRef"/>
|
||||
</div>
|
||||
</template>
|
||||
<!--
|
||||
@@ -67,6 +36,7 @@
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
import { Base64 } from 'js-base64'
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
|
||||
export default {
|
||||
name: 'standardContent',
|
||||
@@ -86,32 +56,16 @@
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
viewFileModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryForm: {},
|
||||
visibleFile: false,
|
||||
dataSourceFile: [],
|
||||
loading: false,
|
||||
columnsFile: [
|
||||
{
|
||||
title: this.$t('deliverableTemplate'),
|
||||
dataIndex: 'fileName',
|
||||
align: 'center',
|
||||
width: 260,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
width: 130,
|
||||
scopedSlots: { customRender: 'fileOperation' }
|
||||
}
|
||||
]
|
||||
queryForm: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.queryForm = this.standardContentQuery
|
||||
console.log(this.queryForm)
|
||||
},
|
||||
methods: {
|
||||
urlClick(val) {
|
||||
@@ -119,45 +73,8 @@
|
||||
window.open(val)
|
||||
}
|
||||
},
|
||||
pdfPreview(fileQuery) {
|
||||
let fileName = fileQuery.fileName
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
if (fileSuffix == '.pdf') {
|
||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
||||
} else if (fileSuffix == '.docx') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
||||
}
|
||||
},
|
||||
download(item) {
|
||||
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id })
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.loading = true
|
||||
this.visibleFile = true
|
||||
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSourceFile = res.result
|
||||
this.dataSourceFile.forEach((val) => {
|
||||
let fileName = val.fileName
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
val.fileSuffix = fileSuffix
|
||||
})
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataSourceFile = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,17 +212,29 @@
|
||||
switch (num) {
|
||||
case 1:
|
||||
query = {
|
||||
taskIds: val.designTaskId
|
||||
taskIds: val.designTaskId,
|
||||
actiProcInstId: val.designPId,
|
||||
id: val.id,
|
||||
projectLibraryId: this.$route.query.id,
|
||||
serialNumber: val.serialNumber
|
||||
}
|
||||
break
|
||||
case 2:
|
||||
query = {
|
||||
taskIds: val.prehomoTaskId
|
||||
taskIds: val.prehomoTaskId,
|
||||
actiProcInstId: val.prehomoPId,
|
||||
id: val.id,
|
||||
projectLibraryId: this.$route.query.id,
|
||||
serialNumber: val.serialNumber
|
||||
}
|
||||
break
|
||||
case 3:
|
||||
query = {
|
||||
taskIds: val.verifyTaskId
|
||||
taskIds: val.verifyTaskId,
|
||||
actiProcInstId: val.verifyPId,
|
||||
id: val.id,
|
||||
projectLibraryId: this.$route.query.id,
|
||||
serialNumber: val.serialNumber
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user