update 法规合规评估流程
This commit is contained in:
+98
-24
@@ -13,25 +13,35 @@
|
||||
:columns="columns"
|
||||
:data-source="dataSource"
|
||||
:scroll="{x: '100%'}"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
||||
:pagination="ipagination"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!--选择责任单位联络人-->
|
||||
<!--选择设计工程师-->
|
||||
<template v-slot:moduleOwner="{text,record,index}">
|
||||
<user-selection :show-btn="false"
|
||||
:value="record.contact"
|
||||
:name-str="record.contact_dictText"
|
||||
v-if="!record.uninvolved"
|
||||
:value="record.designEngineer"
|
||||
:name-str="record.designEngineer_dictText"
|
||||
v-if="!record.notInvolved"
|
||||
type="checkbox"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')" />
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
|
||||
@listChange="list => handleUserChange(list, index)" />
|
||||
<div v-else>{{ global.emptyLine }}</div>
|
||||
</template>
|
||||
|
||||
<!--条文内容-->
|
||||
<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:action="{text,record,index}">
|
||||
<div class="action-span-cell">
|
||||
<a @click="handleUninvolved(record, index)">{{
|
||||
!record.uninvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
|
||||
!record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
|
||||
}}</a>
|
||||
</div>
|
||||
</template>
|
||||
@@ -42,6 +52,8 @@
|
||||
<user-select-modal ref="userSelectModal" type="checkbox" @listChange="handleBatchSelected" />
|
||||
<!--不涉及原因-->
|
||||
<uninvolved-modal ref="uninvolvedModal" @ok="handleUninvolvedOk" />
|
||||
<!--条文内容-->
|
||||
<split-clause-detail ref="clauseDetail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -50,31 +62,43 @@ import UserSelection from '../../../../components/selection/UserSelection'
|
||||
import UserSelectModal from '../../../../components/selection/UserSelectModal'
|
||||
import UninvolvedModal from '../modules/UninvolvedModal'
|
||||
import JTable from '../../../../components/jero/JTable'
|
||||
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
|
||||
|
||||
export default {
|
||||
name: 'ModuleOwnerIssueTable',
|
||||
components: { JTable, UninvolvedModal, UserSelectModal, UserSelection },
|
||||
components: { SplitClauseDetail, JTable, UninvolvedModal, UserSelectModal, UserSelection },
|
||||
props: {
|
||||
// 回显的数据
|
||||
displayDataSource: {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
columns: [
|
||||
// 标准编号/条款号
|
||||
{
|
||||
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('workCenter.standardConsultationProcess.designEngineer'),
|
||||
@@ -85,13 +109,36 @@ export default {
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
dataSource: [{ id: 1 }],
|
||||
selectedRowKeys: []
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
/* 分页参数 */
|
||||
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 = []
|
||||
if (value) {
|
||||
this.dataSource = value
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -110,9 +157,9 @@ export default {
|
||||
const data = JSON.parse(JSON.stringify(this.dataSource))
|
||||
this.dataSource = data.map(item => {
|
||||
// 选中且没有填写不涉及理由
|
||||
if (this.selectedRowKeys.includes(item.id) && !item.uninvolved) {
|
||||
item.contact = list.map(tt => tt.id).join(',')
|
||||
item.contact_dictText = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
|
||||
if (this.selectedRowKeys.includes(item.id) && !item.notInvolved) {
|
||||
item.designEngineer = list.map(tt => tt.id).join(',')
|
||||
item.designEngineer_dictText = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
|
||||
}
|
||||
return item
|
||||
})
|
||||
@@ -130,6 +177,33 @@ export default {
|
||||
},
|
||||
onSelectChange (selectedRowKeys) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
showContent (text) {
|
||||
this.$refs.clauseDetail.open(text)
|
||||
},
|
||||
handleUserChange (list, index) {
|
||||
this.dataSource[index].designEngineer = list.map(item => item.id).join(',')
|
||||
this.dataSource[index].designEngineer_dictText = list.map(item => item.realname + '(' + item.username + ')').join(',')
|
||||
},
|
||||
/**
|
||||
* 提交数据
|
||||
* @param needValidator
|
||||
* @param needRemind
|
||||
*/
|
||||
submit (needValidator, needRemind) {
|
||||
if (!needValidator) {
|
||||
return this.dataSource
|
||||
}
|
||||
if (this.dataSource.length === 0 || this.dataSource.some(tt => !tt.designEngineer && !tt.notInvolved)) {
|
||||
if (needRemind) {
|
||||
this.$message.warning(this.$t('workCenter.standardCompliance.pleaseSelectDesignEngineer'))
|
||||
}
|
||||
return false
|
||||
}
|
||||
return this.dataSource
|
||||
},
|
||||
handleTableChange (pagination) {
|
||||
this.ipagination = pagination
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,4 +219,4 @@ export default {
|
||||
/deep/ .user-input {
|
||||
width: 100% !important
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user