修改法规清单重新提交

This commit is contained in:
范强强
2023-05-18 10:29:57 +08:00
parent 588fe9df01
commit 0b11d8b4ba
4 changed files with 501 additions and 1 deletions
+3
View File
@@ -1835,4 +1835,7 @@ module.exports = {
expectedDeliveryTime:'Expected Delivery Time',
changeAuthor:'Change Author',
theProcessThatNeedsToBeReset:'The process that needs to be reset',
toResubmit:'To Resubmit',
selectDesignConformanceAsConformance:'Select Design Conformance verification process state as Conformance or Verify conformance verification process state as conformance obtained data',
submissionProcess:'Submission Process',
}
+3
View File
@@ -1936,4 +1936,7 @@ module.exports = {
expectedDeliveryTime:'预计交付时间',
changeAuthor:'更改作者',
theProcessThatNeedsToBeReset:'需要重置的流程',
toResubmit:'重新提交',
selectDesignConformanceAsConformance:'请选择设计符合性确认流程状态为符合或验证符合性确认流程状态为符合的数据',
submissionProcess:'提交流程',
}
@@ -199,6 +199,12 @@
{{ $t('customize') }}
</div>
</a-popconfirm>
<!-- 复制-->
<div @click="toResubmitClick()" v-if="this.roleSwitchingCode == '31'"
class="operator-text">
<a-icon type="copy"/>
{{ $t('toResubmit') }}
</div>
<!-- 更多-->
<a-popconfirm overlayClassName="popconfirm" placement="bottomRight" v-if="this.roleSwitchingCode == '0'">
<template slot="title" id="popconfirm">
@@ -694,6 +700,7 @@
<viewFileModel ref="viewFileModelRef"/>
<designCompliance ref="designComplianceRef"/>
<modifyOperator ref="modifyOperatorRef" @modifyOperatorForm="modifyOperatorForm"/>
<toResubmitForm ref="toResubmitFormRef" @toResubmitFormForm="toResubmitFormForm"/>
</a-card>
</template>
@@ -712,6 +719,7 @@
import viewFileModel from '@/components/viewFileModel/index'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import modifyOperator from './modifyOperator'
import toResubmitForm from './toResubmitForm'
import batchSettingPersonnel from './batchSettingPersonnel'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
@@ -737,7 +745,8 @@
listOfRegulationsView,
viewFileModel,
designCompliance,
modifyOperator
modifyOperator,
toResubmitForm
},
mixins: [ResizeColumnProvide, ResizeHeader],
data() {
@@ -3217,6 +3226,39 @@
},
download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
},
toResubmitClick() {
let _this = this
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('selectLeastOne'))
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else if (this.selectedRowKeys.length == 1) {
let dataSource = []
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < this.selectedRowKeys.length; j++) {
if (this.dataSource[i].id == this.selectedRowKeys[j]) {
dataSource.push(this.dataSource[i])
}
}
}
let isDesign = false
let isVerify = false
if (dataSource[0].designFlowStatus == 'Compliance') {
isDesign = true
}
if (dataSource[0].verifyFlowStatus == 'Compliance') {
isVerify = true
}
if (isDesign || isVerify) {
this.$refs.toResubmitFormRef.getData(dataSource[0], isDesign, isVerify)
} else {
this.$message.warning(this.$t('selectDesignConformanceAsConformance'))
}
}
},
toResubmitFormForm() {
this.getList()
}
// profileClick() {
// let _this = this
@@ -0,0 +1,452 @@
<template>
<a-drawer
:title="$t('toResubmit')"
:maskClosable="false"
:width="700"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;margin-bottom: 436px;">
<a-spin :spinning="confirmLoading">
<div class="box">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('submissionProcess')">{{$t('submissionProcess')}}</span>
</div>
</div>
<a-form-model-item class="itemModel" :prop="'submissionProcess'">
<a-select :placeholder="$t('PleaseSelect')+$t('submissionProcess')"
v-model="formInline.submissionProcess">
<a-select-option v-for="(item, key) in submissionProcessList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name}}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('resultofhandling')">{{$t('resultofhandling')}}</span>
</div>
</div>
<a-form-model-item class="itemModel" :prop="'disposeResult'">
<a-radio-group @change="reviewResultChange"
class="box-input"
v-model="formInline.disposeResult">
<a-radio value="Compliance">
{{$t('accord')}}
</a-radio>
<a-radio value="Non-Compliance">
{{$t('nonConformity')}}
</a-radio>
<a-radio value="To be tracked">
{{$t('Tracked')}}
</a-radio>
<a-radio value="NA">
{{$t('notInvolved')}}
</a-radio>
<a-radio value="Returned">
{{$t('sendBack')}}
</a-radio>
</a-radio-group>
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="isDeliveryTime">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('expectedDeliveryTime')">{{$t('expectedDeliveryTime')}}</span>
</div>
</div>
<a-form-model-item class="itemModel" :prop="'deliveryTime'">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('expectedDeliveryTime')"
@change="dateChange({db_field_name:'deliveryTime'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.deliveryTime"
style="width: 100%"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span>
</div>
</div>
<a-form-model-item class="itemModel" prop="approvalOpinion">
<a-textarea :placeholder="$t('pleaseEnter')+$t('feedbackMessage')"
v-model="formInline.approvalOpinion"
:rows="2"
style="min-height: 68px"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('enclosure')">{{$t('enclosure')}}</span>
</div>
</div>
<a-form-model-item class="itemModel">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('approvalFile')">
{{ (formInline.approvalFile === 'null' || formInline.approvalFile === '' ||
formInline.approvalFile == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<uploadFile ref="uploadFile"
@uploadSuccess="uploadSuccess"/>
</div>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction, putAction, deleteAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import moment from 'moment'
import { mapGetters } from 'vuex'
export default {
name: 'toResubmitForm',
components: {
uploadFile
},
data() {
return {
visible: false,
confirmLoading: false,
isDeliveryTime: false,
formInline: {},
submissionProcessList: [],
rules: {
disposeResult: [
{
required: true,
message: this.$t('resultofhandling') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
submissionProcess: [
{
required: true,
message: this.$t('submissionProcess') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
deliveryTime: [
{
required: true,
message: this.$t('expectedDeliveryTime') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
approvalOpinion: [
{
required: true,
message: this.$t('feedbackMessage') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 300,
message: this.$t('feedbackMessage') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
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'
}
],
fileId: [
{
required: true,
message: this.$t('Deliverables') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
listOfData: {}
}
},
mounted() {
},
methods: {
...mapGetters(['userInfo']),
handleCancel() {
this.visible = false
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.confirmLoading = true
if (this.formInline.disposeResult == 'To be tracked') {
this.formInline.approvalOpinion = this.formInline.approvalOpinion + ';' + this.$t('expectedDeliveryTime') + ':' + this.formInline.deliveryTime
}
if (this.formInline.submissionProcess == '1') {
this.formInline.flowType = '32'
} else if (this.formInline.submissionProcess == '2') {
this.formInline.flowType = '34'
}
let query = Object.assign(this.listOfData, this.formInline)
this.startProcess(query)
}
})
},
startProcess(value) {
let query = {
type: 31,
projectLawsInvnetoryList: value,
projectNameId: this.$route.query.projectNameId,
projectName: this.$route.query.projectName,
projectLawsInventoryId: value.id
}
postAction('/workFlow/startProcess', query).then((res) => {
if (res.success) {
this.completeTask(value, res.result)
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
completeTask(value, taskId) {
value.handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
Object.keys(value).forEach(res => {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
})
let query = {
userid: this.userInfo().id,
taskId: taskId,
json: JSON.stringify(value).replace(/\"/g, '\'')
}
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('toResubmitFormForm')
} else {
this.confirmLoading = false
this.$message.warning(res.message)
}
})
},
getData(val, isDesign, isVerify) {
this.submissionProcessList = []
this.visible = true
this.listOfData = val
this.formInline = {}
if (isDesign) {
this.submissionProcessList.push({
name: this.$t('designComplianceProcess'),
value: '1'
})
} else {
this.formInline.submissionProcess = '2'
}
if (isVerify) {
this.submissionProcessList.push({
name: this.$t('validationComplianceProcess'),
value: '2'
})
} else {
this.formInline.submissionProcess = '1'
}
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
reviewResultChange(value) {
if (value.target.value == 'To be tracked') {
this.isDeliveryTime = true
} else {
this.isDeliveryTime = false
this.formInline.deliveryTime = ''
}
this.formInline = { ...this.formInline }
},
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()
}
})
},
/** 上传文件的回调 */
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 }
this.$nextTick(() => {
this.$refs.ruleForm.validateField([this.uploadName])
})
},
dateChange(item) {
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
this.formInline = { ...this.formInline }
}
}
}
</script>
<style scoped lang="less">
.box {
padding: 0 0 24px 0;
box-sizing: border-box;
}
.box-text {
display: flex;
justify-content: space-between;
height: 40px;
line-height: 24px;
.header-text {
font-size: 16px;
font-weight: bold;
color: #000;
}
}
.box-title-text {
/*line-height: 1.4;*/
display: flex;
/*align-items: center;*/
}
.title-text {
/*width: 88px;*/
text-align: left;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 32px;
line-height: 36px;
color: #000F16;
}
.title-text-fq {
/*width: 130px;*/
text-align: left;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
color: #000F16;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: 100%;
display: inline-block;
margin-top: 2px;
margin-bottom: 0px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
/*.formAdd {*/
/* margin-bottom: 40px;*/
/*}*/
.text-header {
font-size: 16px;
color: #040B29;
font-weight: 400;
}
.button-text {
height: 38px;
width: calc(50% - 100px);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
z-index: 100;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>