update 法规合规评估、零部件选择弹框
This commit is contained in:
@@ -136,6 +136,7 @@
|
|||||||
@nameChange="treeSelectNameChange"
|
@nameChange="treeSelectNameChange"
|
||||||
:filedName="item.dbFieldName"
|
:filedName="item.dbFieldName"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
:options-href="item.fieldHref"
|
||||||
:nameStr="formInline[item.dbFieldName + '_dictText']"
|
:nameStr="formInline[item.dbFieldName + '_dictText']"
|
||||||
:dict-id="item.dictId"
|
:dict-id="item.dictId"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction } from '../../api/manage'
|
import { getAction } from '../../api/manage'
|
||||||
import { getDictTreeList, getDictByCode } from '../../api/api'
|
import { getDictByCode } from '../../api/api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TreeSelectModal',
|
name: 'TreeSelectModal',
|
||||||
@@ -80,6 +80,12 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
// 获取数据的接口
|
||||||
|
optionsHref: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -111,7 +117,7 @@ export default {
|
|||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('system.tag.name'),
|
title: this.$t('system.tag.name'),
|
||||||
dataIndex: 'itemText'
|
dataIndex: 'title'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
@@ -121,9 +127,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
open (values) {
|
open (values) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.filters.dictId = this.dictId
|
|
||||||
this.selectedRowKeys = values ? values.split(',') : []
|
this.selectedRowKeys = values ? values.split(',') : []
|
||||||
this.loadData()
|
this.loadData(1)
|
||||||
this.getSelectedList(values)
|
this.getSelectedList(values)
|
||||||
},
|
},
|
||||||
handleCancel () {
|
handleCancel () {
|
||||||
@@ -154,12 +159,15 @@ export default {
|
|||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
loadData () {
|
loadData (arg) {
|
||||||
|
if (arg) {
|
||||||
|
this.ipagination.current = 1
|
||||||
|
}
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
const params = Object.assign({}, this.queryParam, this.filters)
|
const params = Object.assign({}, this.queryParam, this.filters)
|
||||||
params.pageNo = this.ipagination.current
|
params.pageNo = this.ipagination.current
|
||||||
params.pageSize = this.ipagination.pageSize
|
params.pageSize = this.ipagination.pageSize
|
||||||
getDictTreeList(params).then(res => {
|
getAction(this.optionsHref, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataSource = res.result.records || res.result
|
this.dataSource = res.result.records || res.result
|
||||||
if (res.result.total) {
|
if (res.result.total) {
|
||||||
|
|||||||
@@ -555,3 +555,9 @@ export const InconformityItemState = {
|
|||||||
caution: { text: '警示', value: '6' },
|
caution: { text: '警示', value: '6' },
|
||||||
exceedTheTimeLimit: { text: '超期', value: '7' }
|
exceedTheTimeLimit: { text: '超期', value: '7' }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 法规合规评估结果
|
||||||
|
export const StandardEvaluationResultType = {
|
||||||
|
accordWith: { text: '符合', value: '1' },
|
||||||
|
inconformity: { text: '不符合', value: '2' },
|
||||||
|
}
|
||||||
|
|||||||
@@ -75,20 +75,23 @@
|
|||||||
<initial-assign-table ref="termList"
|
<initial-assign-table ref="termList"
|
||||||
:selected-spilt-info-id="selectedSpiltInfoId"
|
:selected-spilt-info-id="selectedSpiltInfoId"
|
||||||
:selected-standard="selectedStandard"
|
:selected-standard="selectedStandard"
|
||||||
:display-data-source="dispathDataSource" />
|
:display-data-source="dispatchDataSource" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!--部所主管级领导下发-->
|
<!--部所主管级领导下发-->
|
||||||
<depart-leader-issue-table v-if="isDepartLeaderIssue" ref="termList" :display-data-source="dispathDataSource" />
|
<depart-leader-issue-table v-if="isDepartLeaderIssue" ref="termList" :display-data-source="dispatchDataSource" />
|
||||||
|
|
||||||
<!--模块责任人分发-->
|
<!--模块责任人分发-->
|
||||||
<module-owner-issue-table v-if="isModuleOwnerIssue" ref="termList" :display-data-source="dispathDataSource" />
|
<module-owner-issue-table v-if="isModuleOwnerIssue" ref="termList" :display-data-source="dispatchDataSource" />
|
||||||
|
|
||||||
<!--设计工程师评估-->
|
<!--设计工程师评估-->
|
||||||
<design-engineer-assess v-if="isDesignEngineerAssess" ref="termList" :display-data-source="dispathDataSource"/>
|
<design-engineer-assess v-if="isDesignEngineerAssess"
|
||||||
|
ref="asyncTermList"
|
||||||
|
:display-data-source="dispatchDataSource"
|
||||||
|
:pre-node-user="preNodeUser" />
|
||||||
|
|
||||||
<!--模块负责人评审-->
|
<!--模块负责人评审-->
|
||||||
<module-owner-approve-table v-if="isModuleOwnerApprove" />
|
<module-owner-approve-table v-if="isModuleOwnerApprove" ref="termList" :display-data-source="dispatchDataSource" />
|
||||||
|
|
||||||
<!--部所主管级领导审批-->
|
<!--部所主管级领导审批-->
|
||||||
<depart-leader-approve-table v-if="isDepartLeaderApprove" />
|
<depart-leader-approve-table v-if="isDepartLeaderApprove" />
|
||||||
@@ -178,7 +181,9 @@ import {
|
|||||||
initStandardCompliance,
|
initStandardCompliance,
|
||||||
submitStandardCompliance,
|
submitStandardCompliance,
|
||||||
queryStandardCompliance,
|
queryStandardCompliance,
|
||||||
processTransfer
|
processTransfer,
|
||||||
|
agreeStandardCompliance,
|
||||||
|
rejectStandardCompliance
|
||||||
} from '../../../api/workCenter'
|
} from '../../../api/workCenter'
|
||||||
import UserSelectModal from '../../../components/selection/UserSelectModal'
|
import UserSelectModal from '../../../components/selection/UserSelectModal'
|
||||||
|
|
||||||
@@ -238,8 +243,9 @@ export default {
|
|||||||
selectedStandard: {}, // 发起节点,选中的标准
|
selectedStandard: {}, // 发起节点,选中的标准
|
||||||
selectedSpiltInfoId: null, // 发起节点,选中标准的分解单拆分id
|
selectedSpiltInfoId: null, // 发起节点,选中标准的分解单拆分id
|
||||||
businessId: null,
|
businessId: null,
|
||||||
dispathDataSource: [], // 业务分派信息的数据
|
dispatchDataSource: [], // 业务分派信息的数据
|
||||||
currentNodePrefix: null
|
currentNodePrefix: null, // 判断节点的前缀
|
||||||
|
preNodeUser: null // 上一节点处理人
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -313,8 +319,8 @@ export default {
|
|||||||
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
|
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
|
||||||
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {}, { taskId: this.$route.query.taskId })
|
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {}, { taskId: this.$route.query.taskId })
|
||||||
this.selectedStandard = Object.assign({}, result.businessInfoDTO.processProjectStandard || {})
|
this.selectedStandard = Object.assign({}, result.businessInfoDTO.processProjectStandard || {})
|
||||||
console.log(this.selectedStandard)
|
this.preNodeUser = result.businessInfoDTO.moduleOwner
|
||||||
this.dispathDataSource = result.businessInfoDTO.processProjectStandardTermList || []
|
this.dispatchDataSource = result.businessInfoDTO.processProjectStandardTermList || []
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.processInfoForm.setFieldsValue(this.processInfo)
|
this.processInfoForm.setFieldsValue(this.processInfo)
|
||||||
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
|
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
|
||||||
@@ -375,7 +381,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 处理保存的数据,保存不需要进行表单校验
|
* 处理保存的数据,保存不需要进行表单校验
|
||||||
*/
|
*/
|
||||||
dealSaveFormData () {
|
async dealSaveFormData () {
|
||||||
// 流程信息
|
// 流程信息
|
||||||
const basicProcessInfoDTO = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
const basicProcessInfoDTO = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
||||||
// 流程审批信息
|
// 流程审批信息
|
||||||
@@ -389,9 +395,14 @@ export default {
|
|||||||
}
|
}
|
||||||
// 条款列表
|
// 条款列表
|
||||||
let processProjectStandardTermList = []
|
let processProjectStandardTermList = []
|
||||||
|
// 同步
|
||||||
if (this.$refs.termList) {
|
if (this.$refs.termList) {
|
||||||
processProjectStandardTermList = this.$refs.termList.submit(false)
|
processProjectStandardTermList = this.$refs.termList.submit(false)
|
||||||
}
|
}
|
||||||
|
// 异步
|
||||||
|
if (this.$refs.asyncTermList) {
|
||||||
|
processProjectStandardTermList = await this.$refs.asyncTermList.submit(false)
|
||||||
|
}
|
||||||
// 校验是否至少填了一项
|
// 校验是否至少填了一项
|
||||||
const checkValueArr = Object.values({ ...basicProcessInfoDTO, ...basicTaskInfoDTO, ...processProjectStandard })
|
const checkValueArr = Object.values({ ...basicProcessInfoDTO, ...basicTaskInfoDTO, ...processProjectStandard })
|
||||||
if (checkValueArr.every(tt => !tt) && (!processProjectStandardTermList || processProjectStandardTermList.length === 0)) {
|
if (checkValueArr.every(tt => !tt) && (!processProjectStandardTermList || processProjectStandardTermList.length === 0)) {
|
||||||
@@ -405,14 +416,15 @@ export default {
|
|||||||
draftId: this.$route.query.draftId,
|
draftId: this.$route.query.draftId,
|
||||||
businessInfoDTO: {
|
businessInfoDTO: {
|
||||||
processProjectStandard,
|
processProjectStandard,
|
||||||
processProjectStandardTermList
|
processProjectStandardTermList,
|
||||||
|
moduleOwner: this.preNodeUser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 处理提交表单数据
|
* 处理提交表单数据
|
||||||
*/
|
*/
|
||||||
dealSubmitFormData () {
|
async dealSubmitFormData () {
|
||||||
let basicProcessInfoDTO = {}, basicTaskInfoDTO = {}, flag = true
|
let basicProcessInfoDTO = {}, basicTaskInfoDTO = {}, flag = true
|
||||||
this.processInfoForm.validateFields((errors, values) => {
|
this.processInfoForm.validateFields((errors, values) => {
|
||||||
if (!errors) {
|
if (!errors) {
|
||||||
@@ -438,10 +450,15 @@ export default {
|
|||||||
flag = !!processProjectStandard
|
flag = !!processProjectStandard
|
||||||
// 条款列表
|
// 条款列表
|
||||||
let processProjectStandardTermList
|
let processProjectStandardTermList
|
||||||
|
const needRemind = this.$refs.standardList ? processProjectStandard && processProjectStandard.id : true
|
||||||
|
// 同步
|
||||||
if (this.$refs.termList) {
|
if (this.$refs.termList) {
|
||||||
const needRemind = this.$refs.standardList ? processProjectStandard && processProjectStandard.id : true
|
|
||||||
processProjectStandardTermList = this.$refs.termList.submit(true, needRemind)
|
processProjectStandardTermList = this.$refs.termList.submit(true, needRemind)
|
||||||
}
|
}
|
||||||
|
// 异步
|
||||||
|
if (this.$refs.asyncTermList) {
|
||||||
|
processProjectStandardTermList = await this.$refs.asyncTermList.submit(true, needRemind)
|
||||||
|
}
|
||||||
flag = !!processProjectStandardTermList
|
flag = !!processProjectStandardTermList
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
this.switchValue = 'base'
|
this.switchValue = 'base'
|
||||||
@@ -460,8 +477,8 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*/
|
*/
|
||||||
handleSave () {
|
async handleSave () {
|
||||||
const formData = this.dealSaveFormData()
|
const formData = await this.dealSaveFormData()
|
||||||
if (!formData) {
|
if (!formData) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -481,8 +498,8 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 提交
|
* 提交
|
||||||
*/
|
*/
|
||||||
handleSubmit () {
|
async handleSubmit () {
|
||||||
const formData = this.dealSubmitFormData()
|
const formData = await this.dealSubmitFormData()
|
||||||
if (!formData) {
|
if (!formData) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -508,11 +525,52 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAgree () {
|
/**
|
||||||
|
* 同意
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
|
async handleAgree () {
|
||||||
|
this.validatorRules.handleText.rules[0].required = false
|
||||||
|
if (!this.approvalInfoForm.getFieldValue('handleText')) {
|
||||||
|
this.approvalInfoForm.setFieldsValue({ handleText: '同意' })
|
||||||
|
}
|
||||||
|
const formData = await this.dealSubmitFormData()
|
||||||
|
if (!formData) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
agreeStandardCompliance(formData).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleReject () {
|
/**
|
||||||
|
* 驳回
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
|
async handleReject () {
|
||||||
|
this.validatorRules.handleText.rules[0].required = true
|
||||||
|
const formData = await this.dealSubmitFormData()
|
||||||
|
if (!formData) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
rejectStandardCompliance(formData).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
toStandardDetail () {
|
toStandardDetail () {
|
||||||
const { source, standardId } = this.selectedStandard
|
const { source, standardId } = this.selectedStandard
|
||||||
|
|||||||
+111
-38
@@ -6,15 +6,16 @@
|
|||||||
<!--上一节点处理人-->
|
<!--上一节点处理人-->
|
||||||
<div class="info-form-item">
|
<div class="info-form-item">
|
||||||
<label class="info-form-item-label">{{ $t('workCenter.projectComplianceEvaluationProcess.preNodePeople') }}:</label>
|
<label class="info-form-item-label">{{ $t('workCenter.projectComplianceEvaluationProcess.preNodePeople') }}:</label>
|
||||||
<div class="info-form-item-text"></div>
|
<div class="info-form-item-text">{{ preNodeUser }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<a-table
|
<a-table
|
||||||
:bordered="true"
|
:bordered="false"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
|
:pagination="ipagination"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data-source="dataSource">
|
:data-source="dataSource"
|
||||||
|
@change="handleTableChange">
|
||||||
|
|
||||||
<template slot="text" slot-scope="text">
|
<template slot="text" slot-scope="text">
|
||||||
<a-tooltip overlay-class-name="tooltip-style">
|
<a-tooltip overlay-class-name="tooltip-style">
|
||||||
@@ -23,43 +24,44 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!--评估结果-->
|
|
||||||
<template v-slot:evaluationResult="text,record,index">
|
|
||||||
<j-dict-select-tag dict-code="assess_results"
|
|
||||||
style="width: 100%"
|
|
||||||
:value="record.assessResults"
|
|
||||||
@change="value => handleEvaluationResultChange(value, record, index)" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!--条文内容-->
|
<!--条文内容-->
|
||||||
<template v-slot:clauseContent="{text}">
|
<template v-slot:clauseContent="text">
|
||||||
<div class="table-text" style="cursor: pointer" @click="showContent(text)" v-if="text">
|
<div class="table-text" style="cursor: pointer" @click="showContent(text)" v-if="text">
|
||||||
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
|
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
|
||||||
</div>
|
</div>
|
||||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!--评估结果-->
|
||||||
|
<template v-slot:evaluationResult="text,record">
|
||||||
|
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('projectLibrary.vehicleItemLibrary.evaluationResult')"
|
||||||
|
dict-code="standards_assess_results"
|
||||||
|
style="width: 100%"
|
||||||
|
:value="record.assessResults"
|
||||||
|
@change="value => handleEvaluationResultChange(value, record, record.dataSourceIndex)" />
|
||||||
|
</template>
|
||||||
|
|
||||||
<!--展开的部分-->
|
<!--展开的部分-->
|
||||||
<template v-slot:expandedRowRender="record,index">
|
<template v-slot:expandedRowRender="record">
|
||||||
<a-form-model :model="record" :rules="record.assessResults === inconformity ? rules : null" :ref="`ruleForm${index}`">
|
<a-form-model :model="record" :rules="record.assessResults === inconformity ? rules : null" :ref="`ruleForm${record.dataSourceIndex}`">
|
||||||
<!--不符合-->
|
<!--不符合-->
|
||||||
<template v-if="record.assessResults === inconformity">
|
<template v-if="record.assessResults === inconformity">
|
||||||
<!--是否与车型强关联-->
|
<!--是否与车型强关联-->
|
||||||
<a-form-model-item :label="$t('workCenter.standardCompliance.stronglyRelatedVehicleType')"
|
<a-form-model-item :label="$t('workCenter.standardCompliance.stronglyRelatedVehicleType')"
|
||||||
:labelCol="{span: 4}"
|
:labelCol="{span: 4}"
|
||||||
:wrapperCol="{span: 18}"
|
:wrapperCol="{span: 18}"
|
||||||
prop="stronglyRelatedVehicleType">
|
prop="isRelate">
|
||||||
<j-dict-select-tag v-model="record.stronglyRelatedVehicleType"
|
<j-dict-select-tag v-model="record.isRelate"
|
||||||
dict-code="yn"
|
dict-code="yn"
|
||||||
type="radio" />
|
type="radio" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<!--不符合车型系列-->
|
<!--不符合车型系列-->
|
||||||
<a-form-model-item :label="$t('workCenter.standardCompliance.modelSeries')"
|
<a-form-model-item :label="$t('workCenter.standardCompliance.doesNotFitModel')"
|
||||||
:labelCol="{span: 4}"
|
:labelCol="{span: 4}"
|
||||||
:wrapperCol="{span: 18}"
|
:wrapperCol="{span: 18}"
|
||||||
prop="modelSeries"
|
prop="modelSeries"
|
||||||
v-if="record.modelSeries === yesValue">
|
v-if="record.isRelate === yesValue">
|
||||||
<a-select :placeholder="$t('pleaseSelect') + $t('project')"
|
<a-select :placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.doesNotFitModel')"
|
||||||
v-model="record.modelSeries"
|
v-model="record.modelSeries"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
show-search
|
show-search
|
||||||
@@ -73,8 +75,8 @@
|
|||||||
<a-form-model-item :label="$t('projectLibrary.specialProjectLibrary.basisDescription')"
|
<a-form-model-item :label="$t('projectLibrary.specialProjectLibrary.basisDescription')"
|
||||||
:labelCol="{span: 4}"
|
:labelCol="{span: 4}"
|
||||||
:wrapperCol="{span: 18}"
|
:wrapperCol="{span: 18}"
|
||||||
prop="basisDescription">
|
prop="description">
|
||||||
<a-input type="textarea" :maxLength="500" v-model="record.basisDescription" />
|
<a-input type="textarea" :maxLength="500" v-model="record.description" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<!--佐证材料-->
|
<!--佐证材料-->
|
||||||
<a-form-model-item :label="$t('projectLibrary.specialProjectLibrary.supportingMaterial')"
|
<a-form-model-item :label="$t('projectLibrary.specialProjectLibrary.supportingMaterial')"
|
||||||
@@ -82,7 +84,7 @@
|
|||||||
:wrapperCol="{span: 18}"
|
:wrapperCol="{span: 18}"
|
||||||
prop="supportingMaterial">
|
prop="supportingMaterial">
|
||||||
<j-upload return-id
|
<j-upload return-id
|
||||||
v-model="record.supportingMaterial"
|
v-model="record.fileId"
|
||||||
file-type="pdf,doc,docx,pptx,ppt,jpg,jpeg,png,xls,xlsx,bmp" />
|
file-type="pdf,doc,docx,pptx,ppt,jpg,jpeg,png,xls,xlsx,bmp" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -97,13 +99,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { EvaluationResultType, YesOrNoEnum } from '../../../../enums/commonEnums'
|
import { StandardEvaluationResultType, YesOrNoEnum } from '../../../../enums/commonEnums'
|
||||||
import { getCarTypeProjectList } from '../../../../api/projectLibraryApi'
|
import { getCarTypeProjectList } from '../../../../api/projectLibraryApi'
|
||||||
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
|
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
|
||||||
|
import JTable from '../../../../components/jero/JTable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DesignEngineerAssess',
|
name: 'DesignEngineerAssess',
|
||||||
components: { SplitClauseDetail },
|
components: { JTable, SplitClauseDetail },
|
||||||
props: {
|
props: {
|
||||||
// 回显的数据
|
// 回显的数据
|
||||||
displayDataSource: {
|
displayDataSource: {
|
||||||
@@ -112,6 +115,12 @@ export default {
|
|||||||
default: () => {
|
default: () => {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 上一节点处理人
|
||||||
|
preNodeUser: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -122,14 +131,14 @@ export default {
|
|||||||
dataIndex: 'termNumber',
|
dataIndex: 'termNumber',
|
||||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
|
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
|
||||||
width: 150,
|
width: 150,
|
||||||
align: 'center',
|
align: 'center'
|
||||||
},
|
},
|
||||||
// 标准名称/条款名称
|
// 标准名称/条款名称
|
||||||
{
|
{
|
||||||
dataIndex: 'termName',
|
dataIndex: 'termName',
|
||||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
|
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
|
||||||
width: 150,
|
width: 150,
|
||||||
align: 'center',
|
align: 'center'
|
||||||
},
|
},
|
||||||
// 条款内容
|
// 条款内容
|
||||||
{
|
{
|
||||||
@@ -160,13 +169,13 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
// 依据描述
|
// 依据描述
|
||||||
basisDescription: {
|
description: {
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('pleaseEnter') + this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
message: this.$t('pleaseEnter') + this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
},
|
},
|
||||||
// 是否与车型强关联
|
// 是否与车型强关联
|
||||||
stronglyRelatedVehicleType: {
|
isRelate: {
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('pleaseSelect') + this.$t('workCenter.standardCompliance.stronglyRelatedVehicleType'),
|
message: this.$t('pleaseSelect') + this.$t('workCenter.standardCompliance.stronglyRelatedVehicleType'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
@@ -174,11 +183,23 @@ export default {
|
|||||||
// 不符合车型系列
|
// 不符合车型系列
|
||||||
modelSeries: {
|
modelSeries: {
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('pleaseSelect') + this.$t('workCenter.standardCompliance.modelSeries'),
|
message: this.$t('pleaseSelect') + this.$t('workCenter.standardCompliance.doesNotFitModel'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
carTypeList: [] // 车型下拉数据
|
carTypeList: [], // 车型下拉数据
|
||||||
|
/* 分页参数 */
|
||||||
|
ipagination: {
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
|
||||||
|
showTotal: (total, range) => {
|
||||||
|
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
|
||||||
|
},
|
||||||
|
showQuickJumper: true,
|
||||||
|
showSizeChanger: true,
|
||||||
|
total: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -186,7 +207,13 @@ export default {
|
|||||||
handler (value) {
|
handler (value) {
|
||||||
this.dataSource = []
|
this.dataSource = []
|
||||||
if (value) {
|
if (value) {
|
||||||
this.dataSource = value
|
this.dataSource = value.map((item, index) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
dataSourceIndex: index,
|
||||||
|
modelSeries: item.modelSeries ? item.modelSeries.split(',') : undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
@@ -194,11 +221,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
// 符合
|
||||||
accordWith () {
|
accordWith () {
|
||||||
return EvaluationResultType.accordWith.value
|
return StandardEvaluationResultType.accordWith.value
|
||||||
},
|
},
|
||||||
|
// 不符合
|
||||||
inconformity () {
|
inconformity () {
|
||||||
return EvaluationResultType.inconformity.value
|
return StandardEvaluationResultType.inconformity.value
|
||||||
},
|
},
|
||||||
yesValue () {
|
yesValue () {
|
||||||
return YesOrNoEnum.YES.value
|
return YesOrNoEnum.YES.value
|
||||||
@@ -208,7 +237,6 @@ export default {
|
|||||||
this.getCarTypeList()
|
this.getCarTypeList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取车型下拉数据
|
* 获取车型下拉数据
|
||||||
*/
|
*/
|
||||||
@@ -224,9 +252,51 @@ export default {
|
|||||||
data[index].assessResults = value
|
data[index].assessResults = value
|
||||||
this.dataSource.splice(0, this.dataSource.length, ...data)
|
this.dataSource.splice(0, this.dataSource.length, ...data)
|
||||||
},
|
},
|
||||||
handleCheck () {
|
async submit () {
|
||||||
this.$refs[`ruleForm0`].validate(valid => {
|
let flag = true
|
||||||
console.log(valid)
|
for (const index in this.dataSource) {
|
||||||
|
console.log(index)
|
||||||
|
const record = this.dataSource[index]
|
||||||
|
// 没选评估结果,不需要继续校验了
|
||||||
|
if (!record.assessResults) {
|
||||||
|
flag = false
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
// 选了评估结果,且可以读取到表单,根据表单校验结果走即可
|
||||||
|
if (this.$refs[`ruleForm${index}`]) {
|
||||||
|
const valid = await this.validateForm(index)
|
||||||
|
if (!valid) {
|
||||||
|
flag = false
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
// 选了评估结果,读不到表单,符合,没有必填项,直接跳出
|
||||||
|
if (record.assessResults === this.accordWith) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
// 选了评估结果,读不到表单,不符合,校验
|
||||||
|
if (record.assessResults === this.inconformity) {
|
||||||
|
// 是否与车型强关联、依据描述有没写的
|
||||||
|
if (!record.isRelate || !record.description) {
|
||||||
|
flag = false
|
||||||
|
} else if (!record.modelSeries || record.modelSeries.length === 0) {
|
||||||
|
flag = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!flag) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const data = JSON.parse(JSON.stringify(this.dataSource))
|
||||||
|
return data.map(item => {
|
||||||
|
return { ...item, modelSeries: item.modelSeries ? item.modelSeries.join(',') : null }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
validateForm (index) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
this.$refs[`ruleForm${index}`].validate(valid => {
|
||||||
|
resolve(valid)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
filterOption (input, option) {
|
filterOption (input, option) {
|
||||||
@@ -236,6 +306,9 @@ export default {
|
|||||||
showContent (text) {
|
showContent (text) {
|
||||||
this.$refs.clauseDetail.open(text)
|
this.$refs.clauseDetail.open(text)
|
||||||
},
|
},
|
||||||
|
handleTableChange (pagination) {
|
||||||
|
this.ipagination = pagination
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+88
-17
@@ -3,17 +3,51 @@
|
|||||||
<div>
|
<div>
|
||||||
<!--项目审批-->
|
<!--项目审批-->
|
||||||
<div class="process-part-title">{{ $t('workCenter.standardCompliance.projectApproval') }}</div>
|
<div class="process-part-title">{{ $t('workCenter.standardCompliance.projectApproval') }}</div>
|
||||||
<j-table :columns="columns" :data-source="dataSource" :pagination="false" :scroll="{x: '100%'}">
|
<j-table :columns="columns"
|
||||||
|
:data-source="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:scroll="{x: '100%'}"
|
||||||
|
@change="handleTableChange">
|
||||||
|
<!--条文内容-->
|
||||||
|
<template v-slot:clauseContent="{text}">
|
||||||
|
<div class="table-text" style="cursor: pointer" @click="showContent(text)" v-if="text">
|
||||||
|
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
|
||||||
|
</div>
|
||||||
|
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!--佐证材料-->
|
||||||
|
<template v-slot:file="{text}">
|
||||||
|
<a-button class="table-text" v-if="!!text" type="primary" ghost @click="displayFile(text)">{{ $t('view') }}</a-button>
|
||||||
|
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||||
|
</template>
|
||||||
</j-table>
|
</j-table>
|
||||||
|
|
||||||
|
<!--条文内容-->
|
||||||
|
<split-clause-detail ref="clauseDetail" />
|
||||||
|
<!--佐证材料回显-->
|
||||||
|
<upload-file ref="fileDisplayModal" disabled />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import JTable from '../../../../components/jero/JTable'
|
import JTable from '../../../../components/jero/JTable'
|
||||||
|
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
|
||||||
|
import UploadFile from '../../../../components/UploadFile'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModuleOwnerApproveTable',
|
name: 'ModuleOwnerApproveTable',
|
||||||
components: { JTable },
|
components: { SplitClauseDetail, JTable, UploadFile },
|
||||||
|
props: {
|
||||||
|
// 回显的数据
|
||||||
|
displayDataSource: {
|
||||||
|
type: Array,
|
||||||
|
required: false,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
columns: [
|
columns: [
|
||||||
@@ -28,22 +62,23 @@ export default {
|
|||||||
},
|
},
|
||||||
// 标准编号/条款号
|
// 标准编号/条款号
|
||||||
{
|
{
|
||||||
dataIndex: 'workNumber',
|
dataIndex: 'termNumber',
|
||||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
|
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
|
||||||
width: 150
|
width: 150
|
||||||
},
|
},
|
||||||
// 标准名称/条款名称
|
// 标准名称/条款名称
|
||||||
{
|
{
|
||||||
dataIndex: 'projectName',
|
dataIndex: 'termName',
|
||||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
|
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
|
||||||
width: 160
|
|
||||||
},
|
|
||||||
// 标准状态
|
|
||||||
{
|
|
||||||
title: this.$t('standardSelect.textState'),
|
|
||||||
dataIndex: 'standardState_dictText',
|
|
||||||
width: 150
|
width: 150
|
||||||
},
|
},
|
||||||
|
// 条款内容
|
||||||
|
{
|
||||||
|
dataIndex: 'termText',
|
||||||
|
title: this.$t('workCenter.projectComplianceEvaluationProcess.terms'),
|
||||||
|
width: 250,
|
||||||
|
scopedSlots: { customRender: 'clauseContent' }
|
||||||
|
},
|
||||||
// 实施日期
|
// 实施日期
|
||||||
{
|
{
|
||||||
title: this.$t('dashboard.advancedSearch.materialDate'),
|
title: this.$t('dashboard.advancedSearch.materialDate'),
|
||||||
@@ -53,35 +88,71 @@ export default {
|
|||||||
// 设计工程师
|
// 设计工程师
|
||||||
{
|
{
|
||||||
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
|
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
|
||||||
dataIndex: 'contact',
|
dataIndex: 'designEngineer_dictText',
|
||||||
width: 150
|
width: 150
|
||||||
},
|
},
|
||||||
// 评估结果
|
// 评估结果
|
||||||
{
|
{
|
||||||
dataIndex: 'evaluationResults_dictText',
|
dataIndex: 'assessResults_dictText',
|
||||||
title: this.$t('projectLibrary.vehicleItemLibrary.evaluationResult'),
|
title: this.$t('projectLibrary.vehicleItemLibrary.evaluationResult'),
|
||||||
width: 120
|
width: 120
|
||||||
},
|
},
|
||||||
// 车型
|
// 车型
|
||||||
{
|
{
|
||||||
dataIndex: '4',
|
dataIndex: 'modelSeries_dictText',
|
||||||
title: this.$t('projectLibrary.specialProjectLibrary.vehicleModel'),
|
title: this.$t('projectLibrary.specialProjectLibrary.vehicleModel'),
|
||||||
width: 100
|
width: 100
|
||||||
},
|
},
|
||||||
// 依据描述
|
// 依据描述
|
||||||
{
|
{
|
||||||
dataIndex: 'nameWorkNo',
|
dataIndex: 'description',
|
||||||
title: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
title: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||||
width: 250
|
width: 250
|
||||||
},
|
},
|
||||||
// 佐证材料
|
// 佐证材料
|
||||||
{
|
{
|
||||||
dataIndex: '5',
|
dataIndex: 'fileId',
|
||||||
title: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
|
title: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
|
||||||
width: 120
|
width: 200,
|
||||||
|
scopedSlots: { customRender: 'file' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataSource: []
|
dataSource: [],
|
||||||
|
/* 分页参数 */
|
||||||
|
ipagination: {
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
|
||||||
|
showTotal: (total, range) => {
|
||||||
|
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
|
||||||
|
},
|
||||||
|
showQuickJumper: true,
|
||||||
|
showSizeChanger: true,
|
||||||
|
total: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
displayDataSource: {
|
||||||
|
handler (value) {
|
||||||
|
this.dataSource = value || []
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleTableChange (pagination) {
|
||||||
|
this.ipagination = pagination
|
||||||
|
},
|
||||||
|
showContent (text) {
|
||||||
|
this.$refs.clauseDetail.open(text)
|
||||||
|
},
|
||||||
|
submit () {
|
||||||
|
return this.dataSource
|
||||||
|
},
|
||||||
|
displayFile (text) {
|
||||||
|
this.$refs.fileDisplayModal.open(text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ export default {
|
|||||||
// 设计工程师
|
// 设计工程师
|
||||||
{
|
{
|
||||||
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
|
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
|
||||||
dataIndex: 'contact',
|
dataIndex: 'designEngineer_dictText',
|
||||||
width: 150,
|
width: 150,
|
||||||
scopedSlots: { customRender: 'moduleOwner' }
|
scopedSlots: { customRender: 'moduleOwner' }
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user