对接设计符合性确认
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user