add 项目合规流程页面
This commit is contained in:
@@ -363,6 +363,20 @@ module.exports = {
|
||||
selectStandard: '选择标准',
|
||||
taskDistributing: '任务分发',
|
||||
nextStep: '下一步',
|
||||
lastStep: '上一步'
|
||||
lastStep: '上一步',
|
||||
rDComplianceList: '研发合规清单',
|
||||
salvageListSource: '分解单来源',
|
||||
vehicleItemInfo: '车型项目信息',
|
||||
propertiesAndTextAttachments: '属性及文本附件',
|
||||
batchSelector: '批量选择人员',
|
||||
standardNameClauseName: '标准名称/条款名称',
|
||||
terms: '条款内容',
|
||||
accountabilityUnit: '责任单位',
|
||||
responsibleUnitHead: '责任单位负责人',
|
||||
noCauseInvolved: '不涉及原因',
|
||||
cancelNotInvolve: '取消不涉及',
|
||||
preNodePeople: '上一节点处理人',
|
||||
evaluationFeedback:'评估反馈',
|
||||
ccPerson: '抄送人员'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
type="textarea"
|
||||
:maxLength="500"
|
||||
:placeholder="$t('pleaseEnter')+form.dbFieldTxt"
|
||||
:disabled="form.isDisabled || false"
|
||||
:disabled="allDisabled || form.isDisabled || false"
|
||||
v-model="record[form.dbFieldName]" />
|
||||
</template>
|
||||
<template v-else-if="form.fieldShowType === 2">
|
||||
<j-upload
|
||||
v-model="record[form.dbFieldName]"
|
||||
:disabled="form.isDisabled || false"
|
||||
:disabled="allDisabled || form.isDisabled || false"
|
||||
:file-type="form.fileType || canUploadType">
|
||||
</j-upload>
|
||||
</template>
|
||||
@@ -46,7 +46,7 @@
|
||||
<a-date-picker
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
:disabled="form.isDisabled || false"
|
||||
:disabled="allDisabled || form.isDisabled || false"
|
||||
v-model="record[form.dbFieldName]">
|
||||
</a-date-picker>
|
||||
</template>
|
||||
@@ -54,7 +54,7 @@
|
||||
<a-input
|
||||
:maxLength="50"
|
||||
:placeholder="$t('pleaseEnter')+form.dbFieldTxt"
|
||||
:disabled="form.isDisabled || false"
|
||||
:disabled="allDisabled || form.isDisabled || false"
|
||||
v-model="record[form.dbFieldName]" />
|
||||
</template>
|
||||
</a-form-model-item>
|
||||
@@ -70,14 +70,14 @@
|
||||
<a-input
|
||||
type="textarea"
|
||||
:maxLength="500"
|
||||
:disabled="form.isDisabled || false"
|
||||
:disabled="allDisabled || form.isDisabled || false"
|
||||
:placeholder="$t('pleaseEnter')+form.dbFieldTxt"
|
||||
v-model="record[form.dbFieldName]" />
|
||||
</template>
|
||||
<template v-else-if="form.fieldShowType === 2">
|
||||
<j-upload
|
||||
v-model="record[form.dbFieldName]"
|
||||
:disabled="form.isDisabled || false"
|
||||
:disabled="allDisabled || form.isDisabled || false"
|
||||
:file-type="form.fileType || canUploadType">
|
||||
</j-upload>
|
||||
</template>
|
||||
@@ -85,7 +85,7 @@
|
||||
<a-date-picker
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
:disabled="form.isDisabled || false"
|
||||
:disabled="allDisabled || form.isDisabled || false"
|
||||
v-model="record[form.dbFieldName]">
|
||||
</a-date-picker>
|
||||
</template>
|
||||
@@ -93,7 +93,7 @@
|
||||
<a-input
|
||||
:maxLength="50"
|
||||
:placeholder="$t('pleaseEnter')+form.dbFieldTxt"
|
||||
:disabled="form.isDisabled || false"
|
||||
:disabled="allDisabled || form.isDisabled || false"
|
||||
v-model="record[form.dbFieldName]" />
|
||||
</template>
|
||||
</a-form-model-item>
|
||||
@@ -201,6 +201,12 @@ export default {
|
||||
formIsDepend: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
// 全部禁用
|
||||
allDisabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
||||
@@ -5,15 +5,14 @@
|
||||
:type="inputType"
|
||||
:autosize="true"
|
||||
:rows="1"
|
||||
disabled
|
||||
readOnly
|
||||
class="user-input"
|
||||
:placeholder="placeholder"
|
||||
:value="checkedValue"
|
||||
@click="selectClick"
|
||||
:title="checkedValue"
|
||||
>
|
||||
:title="checkedValue">
|
||||
</a-input>
|
||||
<a-button type="primary" class="button-box" @click="selectClick" :disabled="disabled">
|
||||
<a-button type="primary" class="button-box" @click="selectClick" :disabled="disabled" v-if="showBtn">
|
||||
{{ $t('userSelect.select') }}
|
||||
</a-button>
|
||||
</div>
|
||||
@@ -62,6 +61,12 @@ export default {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'text'
|
||||
},
|
||||
// 是否展示按钮
|
||||
showBtn: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -79,6 +84,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
selectClick () {
|
||||
console.log('点击了')
|
||||
this.$refs.selectModal.open(this.value)
|
||||
},
|
||||
selectChange (ids) {
|
||||
|
||||
@@ -289,7 +289,13 @@ export const ProcurementProcessNodes = new EsEnums({
|
||||
|
||||
// 项目合规评估流程节点
|
||||
export const ProjectComplianceEvaluationProcessNode = new EsEnums({
|
||||
initiate: { text: '法规工程师发起', value: '1', btn: ['save', 'pre', 'next', 'submit'] }
|
||||
initiate: { text: '法规工程师发起', value: '1', btn: ['save', 'pre', 'next', 'submit'] },
|
||||
departLeaderIssued: { text: '各部门主管级领导下发', value: '2', btn: ['return', 'save', 'submit'] },
|
||||
moduleOwnerIssued: { text: '模块负责人分发', value: '3', btn: ['return', 'save', 'submit'] },
|
||||
designEngineerEvaluation: { text: '设计工程师评估', value: '4', btn: ['return', 'save', 'submit'] },
|
||||
moduleOwnerApproval: { text: '模块负责人审批', value: '5', btn: ['return', 'save', 'agree', 'reject'] },
|
||||
departLeaderApproval: { text: '各部门主管级领导审批', value: '6', btn: ['return', 'save', 'agree', 'reject'] },
|
||||
regulatoryEngineerFiling: { text: '法规工程师归档', value: '7', btn: ['return', 'save', 'submit'] }
|
||||
})
|
||||
|
||||
// 企标立项、变更流程
|
||||
|
||||
@@ -181,14 +181,14 @@ export default {
|
||||
})
|
||||
},
|
||||
handleEdit ({ id }) {
|
||||
this.$refs.modalForm.edit(id)
|
||||
this.$refs.modalForm.title = this.$t('edit')
|
||||
this.$refs.modalForm.disableSubmit = false
|
||||
this.$refs.modalForm.edit(id)
|
||||
},
|
||||
handleDetail ({ id }) {
|
||||
this.$refs.modalForm.edit(id)
|
||||
this.$refs.modalForm.title = this.$t('details')
|
||||
this.$refs.modalForm.disableSubmit = false
|
||||
this.$refs.modalForm.edit(id)
|
||||
},
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
|
||||
@@ -54,8 +54,10 @@
|
||||
dict-code="yn" />
|
||||
</a-form-item>
|
||||
<!--在线对比-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('docTool.customComparison.onlineComparison')">
|
||||
<a-switch v-model="isStartComparison" @change="handleSwitchChange" />
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('docTool.customComparison.onlineComparison')">
|
||||
<a-switch v-model="isStartComparison" @change="handleSwitchChange" :disabled="isDetail"/>
|
||||
</a-form-item>
|
||||
<div v-show="isStartComparison" class="comparison-box">
|
||||
<div class="operation-box" v-if="!isDetail">
|
||||
@@ -222,11 +224,6 @@ export default {
|
||||
maintainItemList: [] // 维护项列表
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
title () {
|
||||
this.isDetail = this.title === this.$t('details')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible = true
|
||||
@@ -244,6 +241,20 @@ export default {
|
||||
this.isFirstOpenComparison = false
|
||||
this.getFormData()
|
||||
this.initTableData()
|
||||
this.dealIsDetail()
|
||||
},
|
||||
dealIsDetail () {
|
||||
this.isDetail = this.title === this.$t('details')
|
||||
if (this.isDetail) {
|
||||
this.isStartComparison = true
|
||||
this.columns.push({
|
||||
title: this.$t('docTool.customComparison.comparativeAnalysisResult'),
|
||||
dataIndex: 'compareResult',
|
||||
width: 150,
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'resultCell' }
|
||||
})
|
||||
}
|
||||
},
|
||||
initDictConfig () {
|
||||
// 涉及国家
|
||||
@@ -425,6 +436,7 @@ export default {
|
||||
})
|
||||
return { ...maintainObj, ...obj }
|
||||
})
|
||||
this.dealIsDetail()
|
||||
},
|
||||
/**
|
||||
* 删除特点(三级表头)
|
||||
|
||||
+816
-42
@@ -16,21 +16,27 @@
|
||||
|
||||
<!--基本信息-->
|
||||
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
|
||||
|
||||
<!--步骤条-->
|
||||
<a-steps :current="currentStep" v-if="showStep">
|
||||
<a-step v-for="item in steps" :key="item.title" :title="item.title" />
|
||||
</a-steps>
|
||||
|
||||
<!--流程信息-->
|
||||
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
||||
<div class="process-part-title" v-show="processInfoShowField && processInfoShowField.length > 0">{{ $t('processInformation') }}</div>
|
||||
<a-form :form="processInfoForm">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-col :span="12" v-show="processInfoShowField.includes('processName')">
|
||||
<!--流程名称-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
disabled
|
||||
v-decorator="['processName']" />
|
||||
:disabled="processInfoDisabled"
|
||||
v-decorator="['processName', validatorRules.processName]" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-col :span="12" v-show="processInfoShowField.includes('processDueDate')">
|
||||
<!--截止日期-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
|
||||
<a-date-picker class="box-input"
|
||||
@@ -39,38 +45,205 @@
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-decorator="['processDueDate']"
|
||||
:disabled="disabled"
|
||||
:disabled="processInfoDisabled"
|
||||
style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12" v-show="processInfoShowField.includes('projectName')">
|
||||
<!--车型项目信息-->
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.projectComplianceEvaluationProcess.vehicleItemInfo')">
|
||||
<div class="can-click-table-text" v-if="projectDataSource && projectDataSource.length > 0">
|
||||
<div v-for="(project, index) in projectDataSource" :key="index + 'project'" @click="toProjectDetail(project)">
|
||||
{{ projectDataSource[0].projectName }}
|
||||
</div>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" v-show="processInfoShowField.includes('standardNumber')">
|
||||
<!--属性及文本附件-->
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.projectComplianceEvaluationProcess.propertiesAndTextAttachments')">
|
||||
<div class="can-click-table-text" v-if="standardDataSource && standardDataSource.length > 0">
|
||||
<div v-for="(standard, index) in standardDataSource" :key="index + 'standard'" @click="toStandardDetail(standard)">
|
||||
{{ standard.standardNumber }} {{ standard.standardName }}
|
||||
</div>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!--流程说明-->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
|
||||
<a-form-item v-show="processInfoShowField.includes('processDescription')"
|
||||
:labelCol="longLabelCol"
|
||||
:wrapperCol="longWrapperCol"
|
||||
:label="$t('processExplain')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="500"
|
||||
type="textarea"
|
||||
:disabled="disabled"
|
||||
:disabled="processInfoDisabled"
|
||||
v-decorator="['processDescription']" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<!--发起第二步选择项目、第三步添加标准,采用引入组件的方式-->
|
||||
<keep-alive>
|
||||
<component :is="comp" v-if="comp" ref="projectStandardTable" />
|
||||
</keep-alive>
|
||||
|
||||
<!--业务分派信息-->
|
||||
<template v-if="showDispatchAndApprovalInfo">
|
||||
<div class="process-part-title">{{ $t('workCenter.dispatchInformation') }}</div>
|
||||
<div class="table-operator">
|
||||
<!--批量选择人员-->
|
||||
<a-button type="primary" ghost @click="batchSelector" v-if="!showExpandTable">
|
||||
{{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<div v-if="!showExpandTable">
|
||||
<j-table
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
v-bind="$attrs">
|
||||
|
||||
<!--责任单位-->
|
||||
<template v-slot:depart="{text, record, index}">
|
||||
<j-select-depart multi
|
||||
:back-depart="true"
|
||||
:value="record.depart"
|
||||
@change="value => handleDepartChange(value, record, index)" />
|
||||
</template>
|
||||
|
||||
<!--责任单位负责人-->
|
||||
<template v-slot:user="{text, record, index}">
|
||||
<user-selection :name-str="record.user_dictText"
|
||||
:show-btn="false"
|
||||
:value="record.user"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.responsibleUnitHead')"
|
||||
type="checkbox"
|
||||
@listChange="value => handleUserChange(value, record, index, 'user')" />
|
||||
</template>
|
||||
|
||||
<!--模块负责人-->
|
||||
<template v-slot:moduleOwner="{text, record, index}">
|
||||
<!--不涉及不需要选模块负责人,需要填写不涉及理由-->
|
||||
<user-selection :name-str="record.moduleOwner_dictText"
|
||||
:show-btn="false"
|
||||
:value="record.moduleOwner"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.moduleOwner')"
|
||||
type="checkbox"
|
||||
v-if="!record.uninvolved"
|
||||
@listChange="value => handleUserChange(value, record, index, 'moduleOwner')" />
|
||||
<div v-else>{{ global.emptyLine }}</div>
|
||||
</template>
|
||||
|
||||
<!--设计工程师-->
|
||||
<template v-slot:designEngineer="{text, record, index}">
|
||||
<!--不涉及不需要选模块负责人,需要填写不涉及理由-->
|
||||
<user-selection :name-str="record.designEngineer_dictText"
|
||||
:show-btn="false"
|
||||
:value="record.designEngineer"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
|
||||
type="checkbox"
|
||||
v-if="!record.uninvolved"
|
||||
@listChange="value => handleUserChange(value, record, index, 'designEngineer')" />
|
||||
<div v-else>{{ global.emptyLine }}</div>
|
||||
</template>
|
||||
|
||||
<!--操作(删除)-->
|
||||
<template v-slot:action="{text, record}">
|
||||
<a @click="handleDelete(record.id)">{{ $t('delete') }}</a>
|
||||
</template>
|
||||
|
||||
<!--操作(不涉及/不涉及原因)-->
|
||||
<template v-slot:uninvolved="{text, record, index}">
|
||||
<a @click="handleUninvolved(record, index)">
|
||||
{{
|
||||
!record.uninvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
|
||||
}}
|
||||
</a>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
<div v-if="showExpandTable">
|
||||
<j-expand-table :columns="columns"
|
||||
:data-source="dataSource"
|
||||
:pagination="false"
|
||||
:all-disabled="expandTableDisabled"
|
||||
form-is-depend="evaluationFeedback"
|
||||
:extra-form="extraForm"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
||||
|
||||
<template v-slot:evaluationFeedback="{text, record, index}">
|
||||
|
||||
<j-dict-select-tag
|
||||
v-if="!expandTableDisabled"
|
||||
style="width: 100%"
|
||||
:placeholde="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.evaluationFeedback')"
|
||||
:value="record.evaluationFeedback"
|
||||
:options="[
|
||||
{value:'1', text: '符合'},
|
||||
{value:'2', text: '不符合'},
|
||||
{value:'3', text: '待验证'},
|
||||
{value:'4', text: '不涉及'},
|
||||
]"
|
||||
@change="value => handleEvaluationFeedBackChange(value, record, index)" />
|
||||
|
||||
<template v-else>
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</j-expand-table>
|
||||
</div>
|
||||
|
||||
<a-form :form="dispatchInfoForm" class="dispatch-form" v-if="showCcPerson">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<!--抄送人员-->
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.projectComplianceEvaluationProcess.ccPerson')">
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.ccPerson')"
|
||||
type="checkbox"
|
||||
v-decorator="['ccPerson', validatorRules.ccPerson]" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
|
||||
<!--流程审批信息-->
|
||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||
<a-form :form="approvalInfoForm">
|
||||
<!--备注-->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="500"
|
||||
type="textarea"
|
||||
v-decorator="['handleText', validatorRules.handleText]" />
|
||||
</a-form-item>
|
||||
<!--附件-->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
||||
<j-upload v-decorator="['handleFile']" return-id />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<template v-if="showDispatchAndApprovalInfo">
|
||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||
<a-form :form="approvalInfoForm">
|
||||
<!--备注-->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="500"
|
||||
type="textarea"
|
||||
v-decorator="['handleText', validatorRules.handleText]" />
|
||||
</a-form-item>
|
||||
<!--附件-->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
||||
<j-upload v-decorator="['handleFile']" return-id />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!--人员信息-->
|
||||
@@ -84,27 +257,40 @@
|
||||
|
||||
<!--底部按钮-->
|
||||
<div class="detail-page-bottom-operate-box">
|
||||
<!--转办 审批节点存在-->
|
||||
<!--转办-->
|
||||
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo">
|
||||
{{ $t('turnTo') }}
|
||||
</a-button>
|
||||
<!--保存 发起节点、审批节点都存在-->
|
||||
<!--保存-->
|
||||
<a-button type="primary" :loading="loading" ghost v-if="btnList.includes('save')" @click="handleSave">
|
||||
<i class="iconfont icon-save" />{{ $t('preservation') }}
|
||||
</a-button>
|
||||
<!--提交 发起节点存在-->
|
||||
<!--上一步-->
|
||||
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('pre')" @click="handleLastStep">
|
||||
{{ $t('workCenter.projectComplianceEvaluationProcess.lastStep') }}
|
||||
</a-button>
|
||||
<!--下一步-->
|
||||
<a-button type="primary" :loading="loading" icon="arrow-down" v-if="btnList.includes('next')" @click="handleNextStep">
|
||||
{{ $t('workCenter.projectComplianceEvaluationProcess.nextStep') }}
|
||||
</a-button>
|
||||
<!--提交-->
|
||||
<a-button type="primary" :loading="loading" @click="handleSubmit" v-if="btnList.includes('submit')" icon="upload">
|
||||
{{ $t('submit') }}
|
||||
</a-button>
|
||||
<!--同意 审批节点存在-->
|
||||
<!--同意-->
|
||||
<a-button type="primary" :loading="loading" icon="check-circle" v-if="btnList.includes('agree')" @click="handleAgree">
|
||||
{{ $t('agree') }}
|
||||
</a-button>
|
||||
<!--驳回 审批节点存在-->
|
||||
<!--驳回-->
|
||||
<a-button type="primary" :loading="loading" icon="close-circle" v-if="btnList.includes('reject')" @click="handleReject">
|
||||
{{ $t('reject') }}
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<!--选人-->
|
||||
<user-select-modal type="checkbox" ref="userSelectModal" @listChange="handleBatchSelectorOk" />
|
||||
<!--不涉及-->
|
||||
<uninvolved-modal ref="uninvolvedModal" @ok="handleUninvolvedOk" />
|
||||
</internal-detail-page>
|
||||
</template>
|
||||
|
||||
@@ -113,55 +299,618 @@ import PersonnelInfo from '../../../components/PersonnelInfo'
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage'
|
||||
import ProcessDetailList from '../../../components/ProcessDetailList'
|
||||
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
|
||||
import { ProcessKey } from '../../../enums/commonEnums'
|
||||
import { ProcessKey, ProjectComplianceEvaluationProcessNode } from '../../../enums/commonEnums'
|
||||
import JTable from '../../../components/jero/JTable'
|
||||
import ProjectTable from './components/ProjectTable'
|
||||
import UserSelection from '../../../components/selection/UserSelection'
|
||||
import UserSelectModal from '../../../components/selection/UserSelectModal'
|
||||
import UninvolvedModal from './modules/UninvolvedModal'
|
||||
import JExpandTable from '../../../components/JExpandTable'
|
||||
|
||||
export default {
|
||||
name: 'ProjectComplianceEvaluationProcess',
|
||||
components: { ProcessDetailList, InternalDetailPage, PersonnelInfo },
|
||||
mixins: [WorkCenterMixin],
|
||||
computed: {
|
||||
pageTitle () {
|
||||
return `${this.$t('flowCenter')}${this.$route.meta.title}`
|
||||
}
|
||||
components: {
|
||||
JExpandTable,
|
||||
JTable,
|
||||
ProcessDetailList,
|
||||
InternalDetailPage,
|
||||
PersonnelInfo,
|
||||
ProjectTable,
|
||||
UserSelection,
|
||||
UserSelectModal,
|
||||
UninvolvedModal
|
||||
},
|
||||
mixins: [WorkCenterMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
btnList: [],
|
||||
disabled: false,
|
||||
// 流程信息表单
|
||||
processInfoForm: this.$form.createForm(this),
|
||||
processInfo: {},
|
||||
// 业务分派信息的表单
|
||||
dispatchInfoForm: this.$form.createForm(this),
|
||||
dispatchInfo: {},
|
||||
// 审批信息的表单
|
||||
approvalInfoForm: this.$form.createForm(this),
|
||||
approvalInfo: {},
|
||||
currentNode: null,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 }
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 20 }
|
||||
sm: { span: 18 }
|
||||
},
|
||||
longLabelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 2 }
|
||||
sm: { span: 3 }
|
||||
},
|
||||
longWrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 22 }
|
||||
sm: { span: 21 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 流程名称
|
||||
processName: {
|
||||
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 备注
|
||||
handleText: {
|
||||
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 抄送人员
|
||||
ccPerson: {
|
||||
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.projectComplianceEvaluationProcess.ccPerson') }],
|
||||
validateTrigger: 'change'
|
||||
}
|
||||
},
|
||||
currentStep: 0,
|
||||
steps: [
|
||||
// 基本信息
|
||||
{
|
||||
title: this.$t('essentialInformation')
|
||||
},
|
||||
// 选择项目
|
||||
{
|
||||
title: this.$t('projectLibrary.selectProject')
|
||||
},
|
||||
// 选择标准
|
||||
{
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.selectStandard')
|
||||
},
|
||||
// 任务分发
|
||||
{
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.taskDistributing')
|
||||
}
|
||||
],
|
||||
projectDataSource: [], // 选中的项目
|
||||
standardDataSource: [], // 选中的标准
|
||||
basicColumns: [
|
||||
// 序号
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
key: 'rowIndex',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
// 标准编号/条款号
|
||||
{
|
||||
dataIndex: 'workNumber',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
|
||||
width: 150,
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
// 标准名称/条款名称
|
||||
{
|
||||
dataIndex: 'projectName',
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
|
||||
width: 160,
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
// 条款内容
|
||||
{
|
||||
dataIndex: 'projectSource_dictText',
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.terms'),
|
||||
width: 150,
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
// 展开表格的配置项
|
||||
extraForm: {
|
||||
// 符合
|
||||
'1': {
|
||||
rules: {
|
||||
// 依据描述
|
||||
basisDescription: {
|
||||
required: true,
|
||||
message: this.$t('pleaseEnter') + this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
// 佐证材料
|
||||
basisFile: {
|
||||
required: false,
|
||||
message: this.$t('pleaseUpload') + this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
|
||||
trigger: 'change'
|
||||
}
|
||||
},
|
||||
formArr: [
|
||||
{
|
||||
fieldShowType: 1,
|
||||
dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
dbFieldName: 'basisDescription'
|
||||
},
|
||||
{
|
||||
fieldShowType: 2,
|
||||
dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
|
||||
dbFieldName: 'basisFile',
|
||||
fileType: 'pdf,doc,docx,pptx,ppt,jpg,jpeg,png,xls,xlsx,bmp'
|
||||
}
|
||||
]
|
||||
},
|
||||
// 不符合
|
||||
'2': {
|
||||
rules: {
|
||||
// 依据描述
|
||||
basisDescription: {
|
||||
required: true,
|
||||
message: this.$t('pleaseEnter') + this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
// 预计整改完成日期
|
||||
basisFile: {
|
||||
required: true,
|
||||
message: this.$t('pleaseSelect') + this.$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification'),
|
||||
trigger: 'change'
|
||||
}
|
||||
},
|
||||
formArr: [
|
||||
{
|
||||
fieldShowType: 1,
|
||||
dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
dbFieldName: 'basisDescription'
|
||||
},
|
||||
{
|
||||
fieldShowType: 3,
|
||||
dbFieldTxt: this.$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification'),
|
||||
dbFieldName: 'basisFile'
|
||||
}
|
||||
]
|
||||
},
|
||||
// 待验证
|
||||
'3': {
|
||||
rules: {
|
||||
// 依据描述
|
||||
basisDescription: {
|
||||
required: true,
|
||||
message: this.$t('pleaseEnter') + this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
// 预计整改完成日期
|
||||
basisFile: {
|
||||
required: true,
|
||||
message: this.$t('pleaseSelect') + this.$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification'),
|
||||
trigger: 'change'
|
||||
}
|
||||
},
|
||||
formArr: [
|
||||
{
|
||||
fieldShowType: 1,
|
||||
dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
dbFieldName: 'basisDescription'
|
||||
},
|
||||
{
|
||||
fieldShowType: 3,
|
||||
dbFieldTxt: this.$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification'),
|
||||
dbFieldName: 'basisFile'
|
||||
}
|
||||
]
|
||||
},
|
||||
// 不涉及
|
||||
'4': {
|
||||
rules: {
|
||||
// 依据描述
|
||||
basisDescription: {
|
||||
required: true,
|
||||
message: this.$t('pleaseEnter') + this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
},
|
||||
formArr: [
|
||||
{
|
||||
fieldShowType: 1,
|
||||
dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
dbFieldName: 'basisDescription'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pageTitle () {
|
||||
return `${this.$t('flowCenter')}${this.$route.meta.title}`
|
||||
},
|
||||
// 流程信息禁用
|
||||
processInfoDisabled () {
|
||||
return !(this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value && !this.$route.query.processInstanceId && this.currentStep !== 3)
|
||||
},
|
||||
// 节点显示的按钮
|
||||
btnList () {
|
||||
let btnList = ProjectComplianceEvaluationProcessNode.propertyOfValue('btn', this.currentNode)
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
||||
switch (this.currentStep) {
|
||||
case 0:
|
||||
btnList = ['save', 'next']
|
||||
break
|
||||
case 1:
|
||||
case 2:
|
||||
btnList = ['save', 'pre', 'next']
|
||||
break
|
||||
case 3:
|
||||
btnList = ['save', 'pre', 'submit']
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
return btnList
|
||||
},
|
||||
// 流程信息展示的字段
|
||||
processInfoShowField () {
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
||||
let fieldList = []
|
||||
switch (this.currentStep) {
|
||||
case 0:
|
||||
fieldList = ['processName', 'processDueDate', 'processDescription']
|
||||
break
|
||||
case 1:
|
||||
case 2:
|
||||
fieldList = []
|
||||
break
|
||||
case 3:
|
||||
fieldList = ['processName', 'processDueDate', 'processDescription', 'projectName', 'standardNumber']
|
||||
break
|
||||
default:
|
||||
fieldList = []
|
||||
break
|
||||
}
|
||||
return fieldList
|
||||
}
|
||||
return ['processName', 'processDueDate', 'processDescription', 'projectName', 'standardNumber']
|
||||
},
|
||||
comp () {
|
||||
// 发起节点的第二步
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value && this.currentStep === 1) {
|
||||
return resolve => require(['./components/ProjectTable.vue'], resolve)
|
||||
}
|
||||
// 发起节点第三步
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value && this.currentStep === 2) {
|
||||
return resolve => require(['./components/StandardList.vue'], resolve)
|
||||
}
|
||||
return null
|
||||
},
|
||||
// 展示业务分派信息和流程审批信息的判断
|
||||
showDispatchAndApprovalInfo () {
|
||||
return !(this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value && this.currentStep !== 3)
|
||||
},
|
||||
// 业务分派信息部分表头
|
||||
columns () {
|
||||
console.log(this.currentNode)
|
||||
// 法规工程师发起
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
||||
return this.basicColumns.concat([
|
||||
// 责任单位
|
||||
{
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.accountabilityUnit'),
|
||||
dataIndex: 'depart',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'depart' }
|
||||
},
|
||||
// 责任单位负责人
|
||||
{
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.responsibleUnitHead'),
|
||||
dataIndex: 'user',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'user' }
|
||||
},
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
])
|
||||
}
|
||||
// 各部门主管级领导下发
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.departLeaderIssued.value) {
|
||||
return this.basicColumns.concat([
|
||||
// 发起人
|
||||
{
|
||||
title: this.$t('workCenter.processCenter.initiator'),
|
||||
dataIndex: 'depart',
|
||||
width: 150
|
||||
},
|
||||
// 模块负责人
|
||||
{
|
||||
title: this.$t('workCenter.standardConsultationProcess.moduleOwner'),
|
||||
dataIndex: 'moduleOwner',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'moduleOwner' }
|
||||
},
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 120,
|
||||
scopedSlots: { customRender: 'uninvolved' }
|
||||
}
|
||||
])
|
||||
}
|
||||
// 模块负责人分发
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.moduleOwnerIssued.value) {
|
||||
return this.basicColumns.concat([
|
||||
// 设计工程师
|
||||
{
|
||||
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
|
||||
dataIndex: 'designEngineer',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'designEngineer' }
|
||||
},
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 120,
|
||||
scopedSlots: { customRender: 'uninvolved' }
|
||||
}
|
||||
])
|
||||
}
|
||||
// 设计工程师评估、模块负责人审批、各部门主管级领导审批、法规工程师归档
|
||||
const showNode = [ProjectComplianceEvaluationProcessNode.designEngineerEvaluation.value, ProjectComplianceEvaluationProcessNode.moduleOwnerApproval.value, ProjectComplianceEvaluationProcessNode.departLeaderApproval.value, ProjectComplianceEvaluationProcessNode.regulatoryEngineerFiling.value]
|
||||
if (showNode.includes(this.currentNode)) {
|
||||
return this.basicColumns.concat([
|
||||
// 上一节点处理人
|
||||
{
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.preNodePeople'),
|
||||
dataIndex: 'preNodePeople',
|
||||
width: 150,
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
// 评估反馈
|
||||
{
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.evaluationFeedback'),
|
||||
dataIndex: 'evaluationFeedback',
|
||||
width: 150,
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'evaluationFeedback' }
|
||||
}
|
||||
])
|
||||
}
|
||||
return []
|
||||
},
|
||||
// 是否展示步骤条
|
||||
showStep () {
|
||||
return this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value
|
||||
},
|
||||
// 是否展示可展开表格
|
||||
showExpandTable () {
|
||||
// 设计工程师评估及之后节点都是
|
||||
const showNode = [ProjectComplianceEvaluationProcessNode.designEngineerEvaluation.value, ProjectComplianceEvaluationProcessNode.moduleOwnerApproval.value, ProjectComplianceEvaluationProcessNode.departLeaderApproval.value, ProjectComplianceEvaluationProcessNode.regulatoryEngineerFiling.value]
|
||||
return showNode.includes(this.currentNode)
|
||||
},
|
||||
// 展开表格的禁用
|
||||
expandTableDisabled () {
|
||||
return this.showExpandTable && this.currentNode !== ProjectComplianceEvaluationProcessNode.designEngineerEvaluation.value
|
||||
},
|
||||
// 是否展示抄送人员
|
||||
showCcPerson () {
|
||||
return this.currentNode === ProjectComplianceEvaluationProcessNode.regulatoryEngineerFiling.value
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getPersonInfoStructure(ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value)
|
||||
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||
this.currentNode = this.$route.query.nodeId
|
||||
this.initProcessInfo()
|
||||
} else {
|
||||
this.currentNode = ProjectComplianceEvaluationProcessNode.initiate.value
|
||||
}
|
||||
this.getPersonInfoStructure(ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value, () => {
|
||||
this.initPersonInfoData()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 上一步
|
||||
*/
|
||||
handleLastStep () {
|
||||
this.currentStep--
|
||||
},
|
||||
/**
|
||||
* 下一步
|
||||
*/
|
||||
handleNextStep () {
|
||||
let flag = true
|
||||
// 第一步,填写流程信息
|
||||
if (this.currentStep === 0) {
|
||||
this.processInfoForm.validateFields(this.processInfoShowField, (errors, values) => {
|
||||
if (errors) {
|
||||
flag = false
|
||||
}
|
||||
})
|
||||
}
|
||||
// 第二步选择项目
|
||||
if (this.currentStep === 1) {
|
||||
this.projectDataSource = this.$refs.projectStandardTable.getData()
|
||||
if (!this.projectDataSource || this.projectDataSource.length === 0) {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
flag = false
|
||||
}
|
||||
}
|
||||
// 第三步选择标准
|
||||
if (this.currentStep === 2) {
|
||||
this.standardDataSource = this.$refs.projectStandardTable.getData()
|
||||
if (!this.standardDataSource || this.standardDataSource.length === 0) {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
flag = false
|
||||
} else {
|
||||
// TODO 这块应该需要调接口把标准转成第四步要的条款
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
return
|
||||
}
|
||||
this.currentStep++
|
||||
},
|
||||
/**
|
||||
* 跳转项目详情
|
||||
*/
|
||||
toProjectDetail (project) {
|
||||
this.$router.push({
|
||||
path: '/projectLibrary/VehicleItemLibraryDetail',
|
||||
query: {
|
||||
id: project.id,
|
||||
projectName: project.projectName
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 跳转标准详情
|
||||
*/
|
||||
toStandardDetail (standard) {
|
||||
// todo 需要标准类别
|
||||
console.log(standard)
|
||||
},
|
||||
/**
|
||||
* 批量选择人员
|
||||
*/
|
||||
batchSelector () {
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectOne'))
|
||||
return
|
||||
}
|
||||
this.$refs.userSelectModal.open()
|
||||
},
|
||||
handleBatchSelectorOk (list) {
|
||||
let fieldName
|
||||
switch (this.currentNode) {
|
||||
// 发起节点,批量选择的是责任单位负责人
|
||||
case ProjectComplianceEvaluationProcessNode.initiate.value:
|
||||
fieldName = 'user'
|
||||
break
|
||||
// 各部门主管级领导下发,批量选择的是模块负责人
|
||||
case ProjectComplianceEvaluationProcessNode.departLeaderIssued.value:
|
||||
fieldName = 'moduleOwner'
|
||||
break
|
||||
// 模块负责人分发,批量选择的是设计工程师
|
||||
case ProjectComplianceEvaluationProcessNode.moduleOwnerIssued.value:
|
||||
fieldName = 'designEngineer'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
if (!fieldName) {
|
||||
return
|
||||
}
|
||||
this.dataSource.forEach((item, index) => {
|
||||
if (this.selectedRowKeys.includes(item.id)) {
|
||||
item[fieldName] = list.map(tt => tt.id).join(',')
|
||||
item[fieldName + '_dictText'] = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
|
||||
this.$set(this.dataSource, index, item)
|
||||
}
|
||||
})
|
||||
this.selectedRowKeys = []
|
||||
},
|
||||
onSelectChange (selectedRowKeys) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
/**
|
||||
* 选择部门
|
||||
* @param value
|
||||
* @param record
|
||||
* @param index
|
||||
*/
|
||||
handleDepartChange (value, record, index) {
|
||||
record.depart = value
|
||||
this.$set(this.dataSource, index, record)
|
||||
},
|
||||
/**
|
||||
* 选择用户
|
||||
* @param list
|
||||
* @param record
|
||||
* @param index
|
||||
* @param fieldName
|
||||
*/
|
||||
handleUserChange (list, record, index, fieldName) {
|
||||
record[fieldName] = list.map(tt => tt.id).join(',')
|
||||
record[fieldName + '_dictText'] = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
|
||||
this.$set(this.dataSource, index, record)
|
||||
},
|
||||
handleDelete (id) {
|
||||
const index = this.dataSource.findIndex(tt => tt.id === id)
|
||||
if (index !== -1) {
|
||||
this.$confirm({
|
||||
title: this.$t('confirmDeletion'),
|
||||
content: this.$t('areYouSure'),
|
||||
onOk: () => {
|
||||
this.dataSource.splice(index, 1)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 不涉及
|
||||
* @param record
|
||||
* @param index
|
||||
*/
|
||||
handleUninvolved (record, index) {
|
||||
this.$refs.uninvolvedModal.open(record, index)
|
||||
},
|
||||
handleUninvolvedOk (record, index) {
|
||||
this.$set(this.dataSource, index, record)
|
||||
},
|
||||
/**
|
||||
* 评估反馈修改
|
||||
* @param value
|
||||
* @param record
|
||||
* @param index
|
||||
*/
|
||||
handleEvaluationFeedBackChange (value, record, index) {
|
||||
record.evaluationFeedback = value
|
||||
this.$set(this.dataSource, index, record)
|
||||
},
|
||||
handleSave () {
|
||||
},
|
||||
handleSubmit () {
|
||||
},
|
||||
handleTurnTo () {
|
||||
|
||||
},
|
||||
handleAgree () {
|
||||
|
||||
},
|
||||
handleReject () {
|
||||
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, form, next) {
|
||||
// 跳转项目详情就不销毁
|
||||
if (to.path !== '/projectLibrary/VehicleItemLibraryDetail') {
|
||||
this.$destroy()
|
||||
}
|
||||
next()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -169,4 +918,29 @@ export default {
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
/deep/ .ant-steps-item-process > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title {
|
||||
color: @primary-color;
|
||||
}
|
||||
|
||||
/deep/ .ant-steps-item-wait > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title {
|
||||
color: #4E5969;
|
||||
}
|
||||
|
||||
/deep/ .ant-steps-item-wait .ant-steps-item-icon {
|
||||
background: #F2F3F5;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
/deep/ .ant-steps-item-wait .ant-steps-item-icon > .ant-steps-icon {
|
||||
font-weight: 600;
|
||||
color: #4E5969;
|
||||
}
|
||||
|
||||
/deep/ .user-input {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dispatch-form {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="process-part-title">{{ $t('project') }}</div>
|
||||
<div class="table-operator">
|
||||
<!-- 新增-->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
|
||||
<!-- 批量删除-->
|
||||
<a-button type="primary" icon="delete" ghost @click="batchDel">{{ $t('delete') }}</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<j-table
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
v-bind="$attrs">
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<select-project-modal ref="selectProjectModal" @ok="handleOk" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '../../../../components/jero/JTable'
|
||||
import SelectProjectModal from '../modules/SelectProjectModal'
|
||||
|
||||
export default {
|
||||
name: 'ProjectTable',
|
||||
components: { JTable, SelectProjectModal },
|
||||
data () {
|
||||
return {
|
||||
columns: [
|
||||
// 工作令编号
|
||||
{
|
||||
dataIndex: 'workNumber',
|
||||
title: this.$t('projectLibrary.workOrderNumber'),
|
||||
width: 250
|
||||
},
|
||||
// 项目名称
|
||||
{
|
||||
dataIndex: 'projectName',
|
||||
title: this.$t('projectLibrary.projectName'),
|
||||
width: 250
|
||||
},
|
||||
// 项目来源
|
||||
{
|
||||
dataIndex: 'projectSource_dictText',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.projectSource'),
|
||||
width: 250
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
rowIds: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAdd () {
|
||||
this.$refs.selectProjectModal.open(this.rowIds)
|
||||
},
|
||||
batchDel () {
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectOne'))
|
||||
return
|
||||
}
|
||||
this.$confirm({
|
||||
title: this.$t('confirmBatchDeletion'),
|
||||
content: this.$t('deleteAData'),
|
||||
onOk: () => {
|
||||
this.dataSource = []
|
||||
this.selectedRowKeys = []
|
||||
this.rowIds = []
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange (selectedRowKeys) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
handleOk (ids, rows) {
|
||||
this.rowIds = ids
|
||||
this.dataSource = rows
|
||||
},
|
||||
getData () {
|
||||
return this.dataSource
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.process-part-title:first-child {
|
||||
margin-top: 32px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="process-part-title">{{ $t('workCenter.projectComplianceEvaluationProcess.rDComplianceList') }}</div>
|
||||
<div class="table-operator">
|
||||
<!-- 新增-->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
|
||||
<!-- 批量删除-->
|
||||
<a-button type="primary" icon="delete" ghost @click="batchDel">{{ $t('delete') }}</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<j-table
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
v-bind="$attrs">
|
||||
|
||||
<!--分解单来源-->
|
||||
<template v-slot:salvageListSource="{text, record, index}">
|
||||
<j-dict-select-tag style="width: 100%"
|
||||
:value="record.salvageSource"
|
||||
:options="standardFileType"
|
||||
@change="value => handleSourceChange(value, record, index)" />
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<select-standard-list-drawer ref="selectStandardDrawer" @listChange="handleOk" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '../../../../components/jero/JTable'
|
||||
import SelectStandardListDrawer from '../modules/SelectStandardListDrawer'
|
||||
import { ajaxGetDictItems } from '../../../../api/api'
|
||||
|
||||
export default {
|
||||
name: 'StandardList',
|
||||
components: { JTable, SelectStandardListDrawer },
|
||||
data () {
|
||||
return {
|
||||
columns: [
|
||||
// 标准编号
|
||||
{
|
||||
title: this.$t('standardNumber'),
|
||||
dataIndex: 'standardNumber',
|
||||
width: 150
|
||||
},
|
||||
// 标准名称
|
||||
{
|
||||
title: this.$t('standardName'),
|
||||
dataIndex: 'standardName',
|
||||
width: 150
|
||||
},
|
||||
// 标准状态
|
||||
{
|
||||
title: this.$t('standardSelect.textState'),
|
||||
dataIndex: 'standardState_dictText',
|
||||
width: 150
|
||||
},
|
||||
// 分解单来源
|
||||
{
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.salvageListSource'),
|
||||
dataIndex: 'salvageSource',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'salvageListSource' }
|
||||
},
|
||||
// 发布日期
|
||||
{
|
||||
title: this.$t('standardSelect.releaseDate'),
|
||||
dataIndex: 'releaseDate',
|
||||
width: 120
|
||||
},
|
||||
// 新车型实施日期
|
||||
{
|
||||
dataIndex: 'newModelImplementationDate',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.newModelImplementationDate'),
|
||||
width: 150
|
||||
},
|
||||
// 在产车实施日期
|
||||
{
|
||||
dataIndex: 'onTheProductionDate',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.productionDate'),
|
||||
width: 150
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
rowIds: [],
|
||||
standardFileType: []
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.initDict()
|
||||
},
|
||||
methods: {
|
||||
initDict () {
|
||||
ajaxGetDictItems('process_manuscript').then(res => {
|
||||
if (res.success) {
|
||||
this.standardFileType = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd () {
|
||||
this.$refs.selectStandardDrawer.open()
|
||||
},
|
||||
batchDel () {
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectOne'))
|
||||
return
|
||||
}
|
||||
this.$confirm({
|
||||
title: this.$t('confirmBatchDeletion'),
|
||||
content: this.$t('deleteAData'),
|
||||
onOk: () => {
|
||||
this.dataSource = []
|
||||
this.selectedRowKeys = []
|
||||
this.rowIds = []
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange (selectedRowKeys) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
handleOk (rows) {
|
||||
this.dataSource = rows
|
||||
},
|
||||
getData () {
|
||||
return this.dataSource
|
||||
},
|
||||
handleSourceChange (value, record, index) {
|
||||
record.salvageSource = value
|
||||
this.$set(this.dataSource, index, record)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.process-part-title:first-child {
|
||||
margin-top: 32px;
|
||||
}
|
||||
</style>
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="$t('projectLibrary.selectProject')"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
:closable="true"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
switchFullscreen
|
||||
:visible="visible">
|
||||
<!--查询区域-->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!--项目编号-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.projectNumber')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.projectNumber')"
|
||||
v-model="queryParam.workNumber"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--项目名称-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('projectLibrary.projectName')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.projectName')" v-model="queryParam.projectName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--项目来源-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.projectSource')">
|
||||
<j-dict-select-tag
|
||||
class="box-input"
|
||||
v-model="queryParam.projectSource"
|
||||
:placeholder="$t('pleaseSelect') + $t('projectLibrary.vehicleItemLibrary.projectSource')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
:dictCode="'project_source'" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div>
|
||||
<j-table
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
:rowKey="(record, index) => {return index}"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"
|
||||
:loading="loading">
|
||||
</j-table>
|
||||
</div>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '../../../../components/jero/JTable'
|
||||
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
|
||||
|
||||
export default {
|
||||
name: 'SelectProjectModal',
|
||||
components: { JTable },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
disableMixinCreated: true,
|
||||
columns: [
|
||||
// 项目编号
|
||||
{
|
||||
dataIndex: 'workNumber',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.projectNumber'),
|
||||
width: 150
|
||||
},
|
||||
// 项目名称
|
||||
{
|
||||
dataIndex: 'projectName',
|
||||
title: this.$t('projectLibrary.projectName'),
|
||||
width: 150
|
||||
},
|
||||
// 项目来源
|
||||
{
|
||||
dataIndex: 'projectSource_dictText',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.projectSource'),
|
||||
width: 150
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/projectLibrary/lawsProjectLibrary/page'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (selectedRowKeys) {
|
||||
this.visible = true
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.searchReset()
|
||||
},
|
||||
handleOk () {
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectOne'))
|
||||
return
|
||||
}
|
||||
this.$emit('ok', this.selectedRowKeys, this.selectionRows)
|
||||
this.close()
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
this.onClearSelected()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
||||
min-width: 65px;
|
||||
}
|
||||
</style>
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="$t('standardSelect.standardSelection')"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
class="custom-drawer-style">
|
||||
<div class="custom-drawer-style-scroll">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :sm="8">
|
||||
<a-form-item :label="$t('standardSelect.source')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag style="width: 100%" v-model="queryParam.source"
|
||||
:placeholder="$t('pleaseSelect')+$t('standardSelect.source')"
|
||||
:triggerChange="false"
|
||||
:options="sourceOptions"
|
||||
@change="handleTypeChange" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :sm="8">
|
||||
<a-form-item :label="$t('standardSelect.standardNumOrName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter')+$t('standardSelect.standardNumOrName')"
|
||||
v-model="queryParam.standardNumberOrName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<div style="float: right;overflow: hidden;margin-right: 41px;margin-bottom: 20px"
|
||||
class="table-page-search-submitButtons">
|
||||
<a-button style="margin-left: 8px" type="primary" icon="search" @click="searchQuery">{{ $t('query') }}</a-button>
|
||||
<a-button style="margin-left: 8px" type="primary" ghost icon="reload" @click="searchReset">{{ $t('reset') }}</a-button>
|
||||
</div>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
rowKey="standardNumber"
|
||||
:scroll="{x: 900}"
|
||||
:data-source="dataList"
|
||||
:pagination="ipagination"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
<template slot="text" slot-scope="text">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
<div class="custom-drawer-style-bottom-btn">
|
||||
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ajaxGetDictItems, getStandardList } from '../../../../api/api'
|
||||
import { StandardSource } from '../../../../enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'SelectStandardListDrawer',
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
labelCol: {
|
||||
sm: 8
|
||||
},
|
||||
wrapperCol: {
|
||||
sm: 14
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
selectedRowList: [],
|
||||
loading: false,
|
||||
queryParam: {},
|
||||
/* 分页参数 */
|
||||
ipagination: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
total: 0
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standardNumber'),
|
||||
dataIndex: 'standardNumber',
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: this.$t('standardName'),
|
||||
dataIndex: 'standardName',
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
width: 150
|
||||
},
|
||||
// 发布日期
|
||||
{
|
||||
title: this.$t('standardSelect.releaseDate'),
|
||||
dataIndex: 'releaseDate',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('standardSelect.textState'),
|
||||
dataIndex: 'standardState_dictText',
|
||||
align: 'center',
|
||||
width: 150
|
||||
}
|
||||
],
|
||||
dataList: [],
|
||||
sourceOptions: [],
|
||||
source: StandardSource.DOMESTIC.value,
|
||||
canSelectedSource: [StandardSource.DOMESTIC.value, StandardSource.OVERSEAS.value]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
this.initDict()
|
||||
this.$nextTick(() => {
|
||||
this.source ? this.queryParam.source = this.source : this.queryParam = {}
|
||||
this.replacePage()
|
||||
})
|
||||
},
|
||||
initDict () {
|
||||
ajaxGetDictItems('standard_source').then(res => {
|
||||
if (res.success) {
|
||||
this.sourceOptions = res.result.filter(tt => this.canSelectedSource.includes(tt.value))
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取表格数据
|
||||
replacePage () {
|
||||
const query = {
|
||||
...this.queryParam,
|
||||
...this.filters,
|
||||
pageNo: this.ipagination.current,
|
||||
pageSize: this.ipagination.pageSize,
|
||||
excludeStandardNumbers: this.excludeStandardNumbers
|
||||
}
|
||||
// 清空在可选范围内进行查询
|
||||
if (!query.source && this.canSelectedSource.length < 3) {
|
||||
query.source = this.canSelectedSource.join(',')
|
||||
}
|
||||
// this.selectedRowKeys = []
|
||||
this.loading = true
|
||||
getStandardList(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records
|
||||
this.ipagination.total = res.result.total
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
searchQuery () {
|
||||
this.replacePage()
|
||||
},
|
||||
searchReset () {
|
||||
// 如果禁用来源,就不重置来源
|
||||
if (this.disabledSourceSearch) {
|
||||
this.queryParam = { source: this.source }
|
||||
} else {
|
||||
this.queryParam = {}
|
||||
}
|
||||
this.replacePage()
|
||||
},
|
||||
// 表格选择改变
|
||||
onSelectChange (value, row) {
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRowList = row
|
||||
},
|
||||
handleTableChange (pagination) {
|
||||
// 分页、排序、筛选变化时触发
|
||||
this.ipagination = pagination
|
||||
this.replacePage()
|
||||
},
|
||||
handleCancel () {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit () {
|
||||
const serialNumber = []
|
||||
const serialNameArr = []
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.selectedRowList.forEach(res => {
|
||||
serialNumber.push(res.standardNumber)
|
||||
serialNameArr.push(res.standardName)
|
||||
})
|
||||
this.$emit('change', serialNumber.join(','))
|
||||
this.$emit('nameChange', serialNameArr.join(','))
|
||||
this.$emit('listChange', this.selectedRowList)
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
handleTypeChange () {
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="$t('projectLibrary.vehicleItemLibrary.uninvolved')"
|
||||
:maskClosable="false"
|
||||
:width="600"
|
||||
:closable="true"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
switchFullscreen
|
||||
:visible="visible">
|
||||
|
||||
<a-form :form="form">
|
||||
<!--清单名称-->
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')"
|
||||
type="textarea"
|
||||
:maxLength="500"
|
||||
v-decorator="['uninvolved', validatorRules.uninvolved]" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<template v-slot:footer>
|
||||
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
|
||||
<a-button type="primary" @click="handleOk(false)">
|
||||
{{ $t('workCenter.projectComplianceEvaluationProcess.cancelNotInvolve') }}
|
||||
</a-button>
|
||||
<a-button @click="handleOk(true)" type="primary">{{ $t('submit') }}</a-button>
|
||||
</template>
|
||||
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'UninvolvedModal',
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
form: this.$form.createForm(this),
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 18 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 不涉及原因
|
||||
uninvolved: {
|
||||
rules: [{
|
||||
required: true,
|
||||
message: this.$t('pleaseEnter') + this.$t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
|
||||
}],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
},
|
||||
model: {},
|
||||
dataIndex: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (record, index) {
|
||||
this.visible = true
|
||||
this.model = Object.assign({}, record)
|
||||
this.dataIndex = index
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(this.model)
|
||||
})
|
||||
},
|
||||
handleOk (flag) {
|
||||
this.validatorRules.uninvolved.rules[0].required = flag
|
||||
if (!flag) {
|
||||
this.form.setFieldsValue({ uninvolved: null })
|
||||
}
|
||||
this.form.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
const formData = Object.assign(this.model, values)
|
||||
this.$emit('ok', formData, this.dataIndex)
|
||||
this.close()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
this.model = {}
|
||||
this.form.resetFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user