update 法规合规流程页面
This commit is contained in:
@@ -0,0 +1,148 @@
|
||||
<!--模块负责人分发-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="process-part-title">{{ $t('workCenter.dispatchInformation') }}</div>
|
||||
<div class="table-operator">
|
||||
<!--批量选择人员-->
|
||||
<a-button type="primary" @click="handleSelectPerson">
|
||||
{{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<j-table rowKey="id"
|
||||
:columns="columns"
|
||||
:data-source="dataSource"
|
||||
:scroll="{x: '100%'}"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
||||
|
||||
<!--选择责任单位联络人-->
|
||||
<template v-slot:moduleOwner="{text,record,index}">
|
||||
<user-selection :show-btn="false"
|
||||
:value="record.contact"
|
||||
:name-str="record.contact_dictText"
|
||||
v-if="!record.uninvolved"
|
||||
type="checkbox"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')" />
|
||||
<div 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')
|
||||
}}</a>
|
||||
</div>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<!--批量选择人员-->
|
||||
<user-select-modal ref="userSelectModal" type="checkbox" @listChange="handleBatchSelected" />
|
||||
<!--不涉及原因-->
|
||||
<uninvolved-modal ref="uninvolvedModal" @ok="handleUninvolvedOk" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UserSelection from '../../../../components/selection/UserSelection'
|
||||
import UserSelectModal from '../../../../components/selection/UserSelectModal'
|
||||
import UninvolvedModal from '../modules/UninvolvedModal'
|
||||
import JTable from '../../../../components/jero/JTable'
|
||||
|
||||
export default {
|
||||
name: 'ModuleOwnerIssueTable',
|
||||
components: { JTable, UninvolvedModal, UserSelectModal, UserSelection },
|
||||
data () {
|
||||
return {
|
||||
columns: [
|
||||
// 标准编号/条款号
|
||||
{
|
||||
dataIndex: 'workNumber',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
|
||||
width: 150
|
||||
},
|
||||
// 标准名称/条款名称
|
||||
{
|
||||
dataIndex: 'projectName',
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
|
||||
width: 160
|
||||
},
|
||||
// 标准状态
|
||||
{
|
||||
title: this.$t('standardSelect.textState'),
|
||||
dataIndex: 'standardState_dictText',
|
||||
width: 150
|
||||
},
|
||||
// 设计工程师
|
||||
{
|
||||
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
|
||||
dataIndex: 'contact',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'moduleOwner' }
|
||||
},
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
dataSource: [{ id: 1 }],
|
||||
selectedRowKeys: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 批量选择人员
|
||||
*/
|
||||
handleSelectPerson () {
|
||||
// 请选择要分发的数据
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('pleaseSelectDistributeData'))
|
||||
return
|
||||
}
|
||||
this.$refs.userSelectModal.open()
|
||||
},
|
||||
handleBatchSelected (list) {
|
||||
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(',')
|
||||
}
|
||||
return item
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 不涉及
|
||||
* @param record
|
||||
* @param index
|
||||
*/
|
||||
handleUninvolved (record, index) {
|
||||
this.$refs.uninvolvedModal.open(record, index)
|
||||
},
|
||||
handleUninvolvedOk (record, index) {
|
||||
this.$set(this.dataSource, index, record)
|
||||
},
|
||||
onSelectChange (selectedRowKeys) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.process-part-title:first-child {
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
/deep/ .user-input {
|
||||
width: 100% !important
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user