193 lines
5.7 KiB
Vue
193 lines
5.7 KiB
Vue
<template>
|
|
<j-modal
|
|
:title="title"
|
|
:width="drawerWidth"
|
|
:visible="visible"
|
|
:confirmLoading="loading"
|
|
switchFullscreen
|
|
@ok="handleOk"
|
|
@cancel="handleCancel"
|
|
:cancelText="$t('close')">
|
|
<a-spin :spinning="loading">
|
|
<p>
|
|
{{ $t('workCenter.esInspectionProcess.enterpriseStandard') }}
|
|
{{model.inspectNo}}
|
|
{{model.inspectName}}
|
|
</p>
|
|
<div class="table-operator" v-if="!disabled">
|
|
<!-- 新增 -->
|
|
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
|
|
</div>
|
|
<j-table
|
|
v-if="columns && columns.length > 0"
|
|
:columns="columns"
|
|
:dataSource="dataSource"
|
|
:can-drag="true"
|
|
rowKey="id"
|
|
:row-selection="null"
|
|
:pagination="ipagination"
|
|
:scroll="{x: '100%'}"
|
|
@change="tableOnChange">
|
|
|
|
<!-- 企标号、企标名称 -->
|
|
<template v-slot:standard="{text, record}">
|
|
<a-tooltip overlay-class-name="tooltip-style">
|
|
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
|
<a v-if="text" class="link-a" @click="detailClick(record)">{{ text }}</a>
|
|
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
|
</a-tooltip>
|
|
</template>
|
|
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="{text, record, index}">
|
|
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
|
|
<a-divider type="vertical" />
|
|
<a @click="handleDelete(record.id)" >{{ $t('delete') }}</a>
|
|
</template>
|
|
|
|
</j-table>
|
|
</a-spin>
|
|
<!-- 新增、编辑整改计划 -->
|
|
<inspection-process-rectification-plan-modal ref="modalForm" @ok="modalFormOk"/>
|
|
</j-modal>
|
|
</template>
|
|
|
|
<script>
|
|
import JTable from '@comp/jero/JTable'
|
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
|
import InspectionProcessRectificationPlanModal
|
|
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessRectificationPlanModal'
|
|
|
|
export default {
|
|
name: 'InspectionProcessRectificationPlan',
|
|
mixins: [JeroListMixin],
|
|
components: { InspectionProcessRectificationPlanModal, JTable },
|
|
props: {
|
|
disabled: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
data () {
|
|
const columns = [
|
|
{ // 不符合项描述
|
|
title: this.$t('workCenter.esInspectionProcess.nonCompliantDescription'),
|
|
align: 'center',
|
|
width: 120,
|
|
dataIndex: 'issue',
|
|
scopedSlots: { customRender: 'text' }
|
|
},
|
|
{ // 整改措施
|
|
title: this.$t('workCenter.esInspectionProcess.rectificationMeasures'),
|
|
align: 'center',
|
|
width: 180,
|
|
dataIndex: 'rectifyMeasure',
|
|
scopedSlots: { customRender: 'text' }
|
|
},
|
|
{ // 整改负责人
|
|
title: this.$t('workCenter.esInspectionProcess.rectificationDirector'),
|
|
align: 'center',
|
|
width: 180,
|
|
dataIndex: 'responseUserDictText',
|
|
scopedSlots: { customRender: 'text' }
|
|
},
|
|
{ // 整改计划完成时间
|
|
title: this.$t('workCenter.esInspectionProcess.rectificationPlanDoneDate'),
|
|
align: 'center',
|
|
width: 120,
|
|
dataIndex: 'planCompleteDate',
|
|
scopedSlots: { customRender: 'text' }
|
|
},
|
|
{ // 整改实际完成时间
|
|
title: this.$t('workCenter.esInspectionProcess.rectificationRealityDoneDate'),
|
|
align: 'center',
|
|
width: 120,
|
|
dataIndex: 'actualCompleteDate',
|
|
scopedSlots: { customRender: 'text' }
|
|
},
|
|
{ // 整改状态
|
|
title: this.$t('workCenter.esInspectionProcess.rectificationStatus'),
|
|
align: 'center',
|
|
width: 100,
|
|
dataIndex: 'rectifyStatus_dictText',
|
|
scopedSlots: { customRender: 'text' }
|
|
},
|
|
{
|
|
// 操作
|
|
fixed: 'right',
|
|
title: this.$t('operation'),
|
|
// dataIndex: 'action',
|
|
align: 'center',
|
|
width: 140,
|
|
scopedSlots: { customRender: 'action' }
|
|
}
|
|
]
|
|
return {
|
|
disableMixinCreated: true,
|
|
title: this.$t('workCenter.esInspectionProcess.inspectionReport'),
|
|
drawerWidth: 1000,
|
|
visible: false,
|
|
model: {},
|
|
url: {
|
|
list: '/laws.enterprise/enterpriseStandardInspectRectifyPlan/queryByProcessEsInspectId',
|
|
delete: '/laws.enterprise/enterpriseStandardInspectRectifyPlan/delete'
|
|
},
|
|
dataSource: [],
|
|
columns: columns.slice(0, this.disabled ? 6 : 7)
|
|
}
|
|
},
|
|
methods: {
|
|
show (record) {
|
|
this.filters = {
|
|
processEsInspectId: record.id
|
|
}
|
|
this.loadData()
|
|
this.model = Object.assign({}, record)
|
|
this.visible = true
|
|
},
|
|
// 确定
|
|
handleOk () {
|
|
console.log(this.selectedRowKeys)
|
|
this.close()
|
|
},
|
|
// 关闭
|
|
handleCancel () {
|
|
this.close()
|
|
},
|
|
close () {
|
|
this.$emit('close')
|
|
this.visible = false
|
|
},
|
|
// 跳转详情
|
|
detailClick (record) {
|
|
this.$openPageNewSheet({
|
|
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
|
|
query: {
|
|
id: record.id
|
|
}
|
|
})
|
|
},
|
|
tableOnChange (pagination, filters, sorter) {
|
|
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
|
|
this.orderByField = sorter.columnKey
|
|
this.ipagination = pagination
|
|
this.getTableList()
|
|
},
|
|
handleAdd () {
|
|
this.$refs.modalForm.add(this.model)
|
|
this.$refs.modalForm.title = this.$t('newlyAdded')
|
|
this.$refs.modalForm.disableSubmit = false
|
|
},
|
|
handleEdit (record) {
|
|
this.$refs.modalForm.edit(this.model, record)
|
|
this.$refs.modalForm.title = this.$t('edit')
|
|
this.$refs.modalForm.disableSubmit = false
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|