布局符合性流程
This commit is contained in:
@@ -0,0 +1,504 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="box-text">
|
||||
<div class="header-text">
|
||||
{{$t('engineeringConfirmation')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-content">
|
||||
<div class="operator-text" @click="distributionEngineerClick($t('distributionEngineer'))">
|
||||
<a-icon type="audit"/>
|
||||
{{ $t('distributionEngineer') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="reminderHandling()">
|
||||
<a-icon type="sound"/>
|
||||
{{ $t('reminderHandling') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="distributionEngineerClick($t('addFeedback'))">
|
||||
<a-icon type="plus-circle"/>
|
||||
{{ $t('addFeedback') }}
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
ref="table"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
<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>
|
||||
</span>
|
||||
</a-table>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:width="600"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24" v-if="title == $t('distributionEngineer')">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('engineer')">{{$t('engineer')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<PersonnelSelection
|
||||
:query="{db_field_name:'certificationEngineer',db_field_txt:$t('engineer')}"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.certificationEngineerName"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="title == $t('addFeedback') || title == $t('edit')">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('feedbackFromTheEngineer')">{{$t('feedbackFromTheEngineer')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="engineerFeedbackContent">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+$t('feedbackFromTheEngineer')"
|
||||
:disabled="false"
|
||||
v-model="formInline.engineerFeedbackContent" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="title == $t('addFeedback') || title == $t('edit')">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('Deliverables')">{{$t('Deliverables')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="fileId">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('fileId')">
|
||||
{{ (formInline.fileId === 'null' || formInline.fileId === '' ||
|
||||
formInline.fileId == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="title == $t('replyFromProjectContactPerson')">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('replyFromProjectContactPerson')">{{$t('replyFromProjectContactPerson')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="engineeringInterfacePersonReply">
|
||||
<a-textarea
|
||||
:placeholder="$t('replyFromProjectContactPerson')"
|
||||
:disabled="false"
|
||||
v-model="formInline.engineeringInterfacePersonReply" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<a-modal
|
||||
:title="$t('engineeringConfirmationDetails')"
|
||||
:width="600"
|
||||
:visible="visibleDetails"
|
||||
:maskClosable="false"
|
||||
@cancel="visibleDetails = false"
|
||||
>
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="visibleDetails = false">
|
||||
{{$t('cancel')}}
|
||||
</a-button>
|
||||
</template>
|
||||
<a-row :gutter="24" style="margin-bottom: 18px">
|
||||
<a-col :span="6">
|
||||
<div class="text-field-left">{{this.$t('feedbackFromTheEngineer')}}:</div>
|
||||
</a-col>
|
||||
<a-col :span="18">
|
||||
<div class="text-field-right">
|
||||
{{this.formInlineDetails.engineerFeedbackContent}}
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" style="margin-bottom: 18px">
|
||||
<a-col :span="6">
|
||||
<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>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" style="margin-bottom: 18px">
|
||||
<a-col :span="6">
|
||||
<div class="text-field-left">{{this.$t('completedBy')}}:</div>
|
||||
</a-col>
|
||||
<a-col :span="18">
|
||||
<div class="text-field-right">
|
||||
{{formInlineDetails.createBy}}
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" style="margin-bottom: 18px">
|
||||
<a-col :span="6">
|
||||
<div class="text-field-left">{{this.$t('completedTime')}}:</div>
|
||||
</a-col>
|
||||
<a-col :span="18">
|
||||
<div class="text-field-right">
|
||||
{{formInlineDetails.createTime}}
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" style="margin-bottom: 18px">
|
||||
<a-col :span="6">
|
||||
<div class="text-field-left">{{this.$t('replyFromProjectContactPerson')}}:</div>
|
||||
</a-col>
|
||||
<a-col :span="18">
|
||||
<div class="text-field-right">
|
||||
{{formInlineDetails.engineeringInterfacePersonReply}}
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-modal>
|
||||
<a-modal
|
||||
:title="$t('reminderHandling')"
|
||||
:width="800"
|
||||
:visible="visibleTable"
|
||||
:maskClosable="false"
|
||||
@cancel="visibleTable = false"
|
||||
>
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="visibleTable = false">
|
||||
{{$t('cancel')}}
|
||||
</a-button>
|
||||
</template>
|
||||
<a-table
|
||||
ref="table"
|
||||
:loading="loadingTable"
|
||||
:pagination="false"
|
||||
:scroll="{x: true,y:400}"
|
||||
:data-source="dataSourceTable"
|
||||
:columns="columnsTable"
|
||||
>
|
||||
<span slot="operationTable" slot-scope="result">
|
||||
<a>{{$t('reminder')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
<uploadFile ref="uploadFileDetails" :disabled="true"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import { getAction, postAction, putAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
|
||||
export default {
|
||||
name: 'engineeringConfirmation',
|
||||
components: {
|
||||
PersonnelSelection,
|
||||
uploadFile
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
dataSource: [{}],
|
||||
dataSourceTable: [],
|
||||
columnsTable: [
|
||||
{
|
||||
title: this.$t('engineer'),
|
||||
dataIndex: 'engineer',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
scopedSlots: { customRender: 'operationTable' }
|
||||
}
|
||||
],
|
||||
loadingTable: false,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
visibleTable: false,
|
||||
title: '',
|
||||
formInline: {},
|
||||
formInlineDetails: {},
|
||||
rules: {
|
||||
engineerFeedbackContent: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('feedbackFromTheEngineer') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('feedbackFromTheEngineer') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
engineeringInterfacePersonReply: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('replyFromProjectContactPerson') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('replyFromProjectContactPerson') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
fileId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('Deliverables') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
visibleDetails: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
align: 'center',
|
||||
customRender: (text, record, index) => `${index + 1}`
|
||||
},
|
||||
{
|
||||
title: this.$t('feedbackFromTheEngineer'),
|
||||
dataIndex: 'engineerFeedbackContent',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('Deliverables'),
|
||||
dataIndex: 'fileId',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('completedBy'),
|
||||
dataIndex: 'createBy',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('completedTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('replyFromProjectContactPerson'),
|
||||
dataIndex: 'engineeringInterfacePersonReply',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
handleOk() {
|
||||
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
distributionEngineerClick(title) {
|
||||
this.title = title
|
||||
this.visible = true
|
||||
this.formInline = {}
|
||||
},
|
||||
reminderHandling() {
|
||||
this.visibleTable = true
|
||||
},
|
||||
detailsClick(val) {
|
||||
this.formInlineDetails = val
|
||||
this.visibleDetails = true
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
edit(val, title) {
|
||||
this.title = title
|
||||
this.visible = true
|
||||
this.formInline = val
|
||||
},
|
||||
answerClick(val, title) {
|
||||
this.title = title
|
||||
this.visible = true
|
||||
this.formInline = val
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = item
|
||||
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
} else {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
},
|
||||
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 = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.box {
|
||||
padding: 0 24px 24px 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.box-text {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
}
|
||||
|
||||
.header-content {
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.operator-text {
|
||||
cursor: pointer;
|
||||
margin-right: 53px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.operator-text:last-child {
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 124px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
height: 38px;
|
||||
width: calc(100% - 100px);
|
||||
line-height: 38px;
|
||||
background: #fff;
|
||||
border: 1px #00B3BE solid;
|
||||
color: #00B3BE;
|
||||
}
|
||||
|
||||
.text-field-left {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #6F7385;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.text-field-right {
|
||||
font-size: 16px;
|
||||
color: #040B29;
|
||||
font-weight: 400;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user