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