91 lines
2.0 KiB
Vue
91 lines
2.0 KiB
Vue
<template>
|
|
<j-modal
|
|
:title="title"
|
|
:width="drawerWidth"
|
|
:visible="visible"
|
|
:confirmLoading="confirmLoading"
|
|
switchFullscreen
|
|
@ok="handleOk"
|
|
@cancel="handleCancel"
|
|
:cancelText="$t('close')">
|
|
<a-spin :spinning="confirmLoading">
|
|
<j-table
|
|
v-if="columns && columns.length > 0"
|
|
:columns="columns"
|
|
:dataSource="dataSource"
|
|
:can-drag="true"
|
|
rowKey="id"
|
|
:pagination="false"
|
|
:scroll="{x: '100%'}">
|
|
</j-table>
|
|
</a-spin>
|
|
</j-modal>
|
|
</template>
|
|
|
|
<script>
|
|
import JTable from '@comp/jero/JTable'
|
|
export default {
|
|
name: 'ShowOpinionModal',
|
|
components: { JTable },
|
|
data () {
|
|
return {
|
|
title: this.$t('workCenter.esInspectionPlan.solicitOpinion'),
|
|
drawerWidth: 1000,
|
|
visible: false,
|
|
model: {},
|
|
confirmLoading: false,
|
|
url: {
|
|
list: ''
|
|
},
|
|
dataSource: [],
|
|
columns: [
|
|
{ // 征求意见对象
|
|
title: this.$t('workCenter.esInspectionPlan.solicitOpinionObject'),
|
|
align: 'center',
|
|
width: 180,
|
|
dataIndex: 'createByDictText',
|
|
scopedSlots: { customRender: 'text' }
|
|
},
|
|
{ // 意见
|
|
title: this.$t('workCenter.esInspectionPlan.opinion'),
|
|
align: 'center',
|
|
width: 180,
|
|
dataIndex: 'opinion',
|
|
scopedSlots: { customRender: 'text' }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
methods: {
|
|
show (record) {
|
|
this.model = Object.assign({}, record)
|
|
this.visible = true
|
|
this.dataSource = record.processEsInspectPlanOpinionList || []
|
|
},
|
|
// 确定
|
|
handleOk () {
|
|
this.close()
|
|
},
|
|
// 关闭
|
|
handleCancel () {
|
|
this.close()
|
|
},
|
|
close () {
|
|
this.$emit('close')
|
|
this.dataSource = []
|
|
this.visible = false
|
|
},
|
|
tableOnChange (pagination, filters, sorter) {
|
|
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
|
|
this.orderByField = sorter.columnKey
|
|
this.ipagination = pagination
|
|
this.getTableList()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|