update 法规合规流程页面
This commit is contained in:
@@ -387,6 +387,9 @@ module.exports = {
|
|||||||
// 法规合规评估流程
|
// 法规合规评估流程
|
||||||
standardCompliance: {
|
standardCompliance: {
|
||||||
addStandard: '添加标准',
|
addStandard: '添加标准',
|
||||||
responsibleUnitContactPerson: '责任单位联络人'
|
responsibleUnitContactPerson: '责任单位联络人',
|
||||||
|
pleaseSelectDeleteData: '请选择要删除的数据',
|
||||||
|
moduleOwner: '模块责任人',
|
||||||
|
projectAppraisal: '项目评估'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -391,3 +391,15 @@ export const EsStartUseNodes = new EsEnums({
|
|||||||
leaderApproval: { text: '起草人和会签人主管级领导审批', value: 'sid-0BC5B3BC-ED99-4061-84B4-7320E25DE326' },
|
leaderApproval: { text: '起草人和会签人主管级领导审批', value: 'sid-0BC5B3BC-ED99-4061-84B4-7320E25DE326' },
|
||||||
standardizationApproval: { text: '标准化审批', value: 'sid-9C90582D-F71F-4516-B54F-1E9F896C30D8' }
|
standardizationApproval: { text: '标准化审批', value: 'sid-9C90582D-F71F-4516-B54F-1E9F896C30D8' }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 法规合规流程节点
|
||||||
|
export const StandardComplianceNodes = new EsEnums({
|
||||||
|
initial: { text: '法规工程师发起', value: '1', btn: ['save', 'submit'] },
|
||||||
|
departLeaderIssue: { text: '部所主管级领导下发', value: '2', btn: [] },
|
||||||
|
moduleOwnerIssue: { text: '模块责任人分发', value: '3', btn: [] },
|
||||||
|
designEngineerAssess: { text: '设计工程师评估', value: '4', btn: [] },
|
||||||
|
moduleOwnerReview: { text: '模块责任人审批', value: '5', btn: [] },
|
||||||
|
departLeaderApprove: { text: '部所主管级领导审批', value: '6', btn: [] },
|
||||||
|
regulatoryEngineerApprove: { text: '法规工程师审批', value: '7', btn: [] },
|
||||||
|
designEngineerWriteProject: { text: '设计工程师补充立项项目号', value: '8', btn: [] }
|
||||||
|
})
|
||||||
|
|||||||
@@ -53,12 +53,32 @@
|
|||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-decorator="['processDescription']" />
|
v-decorator="['processDescription']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<!--标准编号/标准名称-->
|
||||||
|
<div class="standard-info" v-if="!isInitial">
|
||||||
|
<label class="standard-info-label">{{ $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName') }}:</label>
|
||||||
|
<div class="standard-info-text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
<!--业务基本信息(选择标准)-->
|
<!--发起节点-->
|
||||||
<initial-basic-service-info />
|
<template v-if="isInitial">
|
||||||
<!--业务分派信息-->
|
<!--业务基本信息(选择标准)-->
|
||||||
<initial-assign-table />
|
<initial-basic-service-info @source:change="handleSourceChange" @standard:change="handleStandardChange" />
|
||||||
|
<!--业务分派信息-->
|
||||||
|
<initial-assign-table :selected-source="selectedSource" :selected-standard="selectedStandard" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!--部所主管级领导下发-->
|
||||||
|
<depart-leader-issue-table v-if="isDepartLeaderIssue" />
|
||||||
|
|
||||||
|
<!--模块责任人分发-->
|
||||||
|
<module-owner-issue-table v-if="isModuleOwnerIssue" />
|
||||||
|
|
||||||
|
<!--设计工程师评估-->
|
||||||
|
<design-engineer-assess v-if="isDesignEngineerAssess" />
|
||||||
|
|
||||||
<!--流程审批信息-->
|
<!--流程审批信息-->
|
||||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||||
@@ -118,19 +138,26 @@ import PersonnelInfo from '../../../components/PersonnelInfo'
|
|||||||
import InternalDetailPage from '../../../components/InternalDetailPage'
|
import InternalDetailPage from '../../../components/InternalDetailPage'
|
||||||
import ProcessDetailList from '../../../components/ProcessDetailList'
|
import ProcessDetailList from '../../../components/ProcessDetailList'
|
||||||
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
|
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
|
||||||
import { ProcessKey } from '../../../enums/commonEnums'
|
import { ProcessKey, StandardComplianceNodes } from '../../../enums/commonEnums'
|
||||||
import InitialBasicServiceInfo from './components/InitialBasicServiceInfo'
|
import InitialBasicServiceInfo from './components/InitialBasicServiceInfo'
|
||||||
import InitialAssignTable from './components/InitialAssignTable'
|
import InitialAssignTable from './components/InitialAssignTable'
|
||||||
|
import DepartLeaderIssueTable from './components/DepartLeaderIssueTable'
|
||||||
|
import ModuleOwnerIssueTable from './components/ModuleOwnerIssueTable'
|
||||||
|
import DesignEngineerAssess from './components/DesignEngineerAssess'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandardComplianceProcess',
|
name: 'StandardComplianceProcess',
|
||||||
components: { ProcessDetailList, InternalDetailPage, PersonnelInfo, InitialBasicServiceInfo, InitialAssignTable },
|
components: {
|
||||||
mixins: [WorkCenterMixin],
|
ProcessDetailList,
|
||||||
computed: {
|
InternalDetailPage,
|
||||||
pageTitle () {
|
PersonnelInfo,
|
||||||
return `${this.$t('flowCenter')}${this.$route.meta.title}`
|
InitialBasicServiceInfo,
|
||||||
}
|
InitialAssignTable,
|
||||||
|
DepartLeaderIssueTable,
|
||||||
|
ModuleOwnerIssueTable,
|
||||||
|
DesignEngineerAssess
|
||||||
},
|
},
|
||||||
|
mixins: [WorkCenterMixin],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -142,7 +169,7 @@ export default {
|
|||||||
// 审批信息的表单
|
// 审批信息的表单
|
||||||
approvalInfoForm: this.$form.createForm(this),
|
approvalInfoForm: this.$form.createForm(this),
|
||||||
approvalInfo: {},
|
approvalInfo: {},
|
||||||
currentNode: null,
|
currentNode: '4',
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 4 }
|
sm: { span: 4 }
|
||||||
@@ -165,11 +192,58 @@ export default {
|
|||||||
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }],
|
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
selectedStandard: {}, // 发起节点,选中的标准
|
||||||
|
selectedSource: null // 发起节点,选中标准的分解单来源
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
pageTitle () {
|
||||||
|
return `${this.$t('flowCenter')}${this.$route.meta.title}`
|
||||||
|
},
|
||||||
|
// 是否发起节点,发起节点展示业务基本信息、业务分派信息
|
||||||
|
isInitial () {
|
||||||
|
return this.currentNode === StandardComplianceNodes.initial.value
|
||||||
|
},
|
||||||
|
// 是否部所主管级领导下发节点
|
||||||
|
isDepartLeaderIssue () {
|
||||||
|
return this.currentNode === StandardComplianceNodes.departLeaderIssue.value
|
||||||
|
},
|
||||||
|
// 是否模块负责人分发
|
||||||
|
isModuleOwnerIssue () {
|
||||||
|
return this.currentNode === StandardComplianceNodes.moduleOwnerIssue.value
|
||||||
|
},
|
||||||
|
// 是否设计工程师评估节点
|
||||||
|
isDesignEngineerAssess () {
|
||||||
|
return this.currentNode === StandardComplianceNodes.designEngineerAssess.value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value)
|
// if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||||
|
// this.currentNode = this.$route.query.nodeId
|
||||||
|
// } else {
|
||||||
|
// this.currentNode = StandardComplianceNodes.initial.value
|
||||||
|
// }
|
||||||
|
this.btnList = StandardComplianceNodes.propertyOfValue('btn', this.currentNode)
|
||||||
|
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value, () => {
|
||||||
|
this.initPersonInfoData()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 分解单来源变化
|
||||||
|
* @param source
|
||||||
|
*/
|
||||||
|
handleSourceChange (source) {
|
||||||
|
this.selectedSource = source
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 选择的标准变化
|
||||||
|
* @param standard
|
||||||
|
*/
|
||||||
|
handleStandardChange (standard) {
|
||||||
|
this.selectedStandard = Object.assign({}, standard)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -177,4 +251,15 @@ export default {
|
|||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
|
.standard-info {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
&-text {
|
||||||
|
flex: 1;
|
||||||
|
width: 0;
|
||||||
|
word-break: break-word;
|
||||||
|
color: @primary-color;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
<!--部所主管级领导下发-->
|
||||||
|
<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"
|
||||||
|
:placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.moduleOwner')" />
|
||||||
|
<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" @listChange="handleBatchSelected" />
|
||||||
|
<!--不涉及原因-->
|
||||||
|
<uninvolved-modal ref="uninvolvedModal" @ok="handleUninvolvedOk" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import UserSelection from '../../../../components/selection/UserSelection'
|
||||||
|
import JTable from '../../../../components/jero/JTable'
|
||||||
|
import UserSelectModal from '../../../../components/selection/UserSelectModal'
|
||||||
|
import UninvolvedModal from '../modules/UninvolvedModal'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DepartLeaderIssueTable',
|
||||||
|
components: { JTable, UserSelection, UserSelectModal, UninvolvedModal },
|
||||||
|
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.standardCompliance.moduleOwner'),
|
||||||
|
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>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<!--设计工程师评估-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!--项目评估-->
|
||||||
|
<div class="process-part-title">{{ $t('workCenter.standardCompliance.projectAppraisal') }}</div>
|
||||||
|
<!--上一节点处理人-->
|
||||||
|
<div class="info-form-item">
|
||||||
|
<label class="info-form-item-label">{{ $t('workCenter.projectComplianceEvaluationProcess.preNodePeople') }}:</label>
|
||||||
|
<div class="info-form-item-text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'DesignEngineerAssess'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
|
.process-part-title:first-child {
|
||||||
|
margin-top: 32px;
|
||||||
|
}
|
||||||
|
.info-form-item {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
&-text {
|
||||||
|
flex: 1;
|
||||||
|
width: 0;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -8,14 +8,16 @@
|
|||||||
{{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }}
|
{{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<!--批量删除-->
|
<!--批量删除-->
|
||||||
<a-button type="primary" ghost @click="handleDelete">
|
<a-button type="primary" ghost @click="batchDelete">
|
||||||
{{ $t('batchDelete') }}
|
{{ $t('batchDelete') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<j-table :columns="columns"
|
<j-table rowKey="id"
|
||||||
|
:columns="columns"
|
||||||
:data-source="dataSource"
|
:data-source="dataSource"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
|
:pagination="false"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
||||||
|
|
||||||
<!--选择责任单位联络人-->
|
<!--选择责任单位联络人-->
|
||||||
@@ -30,13 +32,13 @@
|
|||||||
<!--操作-->
|
<!--操作-->
|
||||||
<template v-slot:action="{text,record,index}">
|
<template v-slot:action="{text,record,index}">
|
||||||
<div class="action-span-cell">
|
<div class="action-span-cell">
|
||||||
<a :disabled="index === 0 && dataSource.length === 1">{{ $t('delete') }}</a>
|
<a :disabled="index === 0 && dataSource.length === 1" @click="handleDelete(record.id)">{{ $t('delete') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</j-table>
|
</j-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<user-select-modal ref="userSelectModal" />
|
<user-select-modal ref="userSelectModal" type="checkbox" @listChange="handleBatchSelected" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -48,6 +50,37 @@ import UserSelectModal from '../../../../components/selection/UserSelectModal'
|
|||||||
export default {
|
export default {
|
||||||
name: 'InitialAssignTable',
|
name: 'InitialAssignTable',
|
||||||
components: { UserSelection, JTable, UserSelectModal },
|
components: { UserSelection, JTable, UserSelectModal },
|
||||||
|
props: {
|
||||||
|
// 选中的标准
|
||||||
|
selectedStandard: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 分解单来源
|
||||||
|
selectedSource: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// 选中标准变化,清除表格数据
|
||||||
|
selectedStandard: {
|
||||||
|
handler () {
|
||||||
|
this.dataSource = []
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
// 选中的分解单来源变化
|
||||||
|
selectedSource (value) {
|
||||||
|
if (value && this.selectedStandard.id) {
|
||||||
|
// todo 获取条款号的数据
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
columns: [
|
columns: [
|
||||||
@@ -100,7 +133,7 @@ export default {
|
|||||||
scopedSlots: { customRender: 'action' }
|
scopedSlots: { customRender: 'action' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataSource: [{ id: 1 }, { id: 2 }, { id: 3 }],
|
dataSource: [],
|
||||||
selectedRowKeys: []
|
selectedRowKeys: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -114,9 +147,49 @@ export default {
|
|||||||
this.$message.warning(this.$t('pleaseSelectDistributeData'))
|
this.$message.warning(this.$t('pleaseSelectDistributeData'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.$refs.userSelectModal.open()
|
||||||
},
|
},
|
||||||
handleDelete () {
|
handleBatchSelected (list) {
|
||||||
|
const data = JSON.parse(JSON.stringify(this.dataSource))
|
||||||
|
this.dataSource = data.map(item => {
|
||||||
|
if (this.selectedRowKeys.includes(item.id)) {
|
||||||
|
item.contact = list.map(tt => tt.id).join(',')
|
||||||
|
item.contact_dictText = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
|
||||||
|
}
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleDelete (id) {
|
||||||
|
this.$confirm({
|
||||||
|
title: this.$t('confirmDeletion'),
|
||||||
|
content: this.$t('areYouSure'),
|
||||||
|
onOk: () => {
|
||||||
|
const index = this.dataSource.findIndex(tt => tt.id === id)
|
||||||
|
this.dataSource[index] = null
|
||||||
|
this.dataSource = this.dataSource.filter(tt => !!tt)
|
||||||
|
this.selectedRowKeys = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
batchDelete () {
|
||||||
|
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||||
|
this.$message.warning(this.$t('workCenter.standardCompliance.pleaseSelectDeleteData'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm({
|
||||||
|
title: this.$t('confirmBatchDeletion'),
|
||||||
|
content: this.$t('deleteAData'),
|
||||||
|
onOk: () => {
|
||||||
|
const data = this.dataSource.map(item => {
|
||||||
|
if (this.selectedRowKeys.includes(item.id)) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
return item
|
||||||
|
}).filter(tt => !!tt)
|
||||||
|
this.dataSource = JSON.parse(JSON.stringify(data))
|
||||||
|
this.selectedRowKeys = []
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onSelectChange (selectedRowKeys) {
|
onSelectChange (selectedRowKeys) {
|
||||||
this.selectedRowKeys = selectedRowKeys
|
this.selectedRowKeys = selectedRowKeys
|
||||||
|
|||||||
@@ -93,10 +93,12 @@ export default {
|
|||||||
},
|
},
|
||||||
handleSelectedStandard (list) {
|
handleSelectedStandard (list) {
|
||||||
this.dataSource = list
|
this.dataSource = list
|
||||||
|
this.$emit('standard:change', list[0])
|
||||||
},
|
},
|
||||||
handleSourceChange (value, record, index) {
|
handleSourceChange (value, record, index) {
|
||||||
record.salvageSource = value
|
record.salvageSource = value
|
||||||
this.$set(this.dataSource, index, record)
|
this.$set(this.dataSource, index, record)
|
||||||
|
this.$emit('source:change', value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -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