| | |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange" |
| | | :rowSelection = "rowSelection" |
| | | :customRow="clickThenSelect" |
| | | > |
| | | <!-- :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" --> |
| | | |
| | | <template |
| | | slot="htmlSlot" |
| | | slot-scope="text" |
| | | > |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template |
| | | slot="imgSlot" |
| | | slot-scope="text,record" |
| | | > |
| | | <span |
| | | v-if="!text" |
| | | style="font-size: 12px;font-style: italic;" |
| | | >无图片</span> |
| | | <img |
| | | v-else |
| | | :src="getImgView(text)" |
| | | :preview="record.id" |
| | | height="25px" |
| | | alt="" |
| | | style="max-width:80px;font-size: 12px;font-style: italic;" |
| | | /> |
| | | </template> |
| | | <template |
| | | slot="fileSlot" |
| | | slot-scope="text" |
| | | > |
| | | <span |
| | | v-if="!text" |
| | | style="font-size: 12px;font-style: italic;" |
| | | >无文件</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)" |
| | | > |
| | | 下载 |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | v-if="record.status == '1'" |
| | | title="确认提交吗?" |
| | | @confirm="() =>handleCommit(record, 'commit')" |
| | | > |
| | | <a>提交</a> |
| | | </a-popconfirm> |
| | | <a-popconfirm |
| | | v-if="record.status == '2'" |
| | | title="确认撤回吗?" |
| | | @confirm="() =>handleCommit(record, 'back')" |
| | | > |
| | | <a>撤回</a> |
| | | </a-popconfirm> |
| | | <a-popconfirm |
| | | v-if="record.status == '1' || record.status == '4'" |
| | | title="确认提交吗?" |
| | | @confirm="() =>handleCommit(record, 'commit')" |
| | | > |
| | | <a>提交</a> |
| | | </a-popconfirm> |
| | | <a-popconfirm |
| | | v-if="record.status == '2'" |
| | | title="确认撤回吗?" |
| | | @confirm="() =>handleCommit(record, 'back')" |
| | | > |
| | | <a>撤回</a> |
| | | </a-popconfirm> |
| | | |
| | | <a-divider |
| | | v-if="record.status == '1' || record.status == '2'" |
| | | v-if="record.status == '1' || record.status == '2' || record.status == '4'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.status == '1' " |
| | | v-if="record.status == '1' || record.status == '4'" |
| | | @click="handleEdit(record)" |
| | | >编辑</a> |
| | | <a v-if="record.status == '2'" @click="handleApprove(record)">审批</a> |
| | | <a |
| | | v-if="record.status == '2'" |
| | | @click="handleApprove(record)" |
| | | >审批</a> |
| | | <a-divider |
| | | v-if="record.status == '1' || record.status == '2'" |
| | | v-if="record.status == '1' || record.status == '2' || record.status == '4'" |
| | | type="vertical" |
| | | /> |
| | | <a-dropdown> |
| | |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <!-- <a-menu-item v-if="record.status == '1'"> |
| | | <a-popconfirm |
| | | v-if="record.status == '1'" |
| | | title="确认提交吗?" |
| | | @confirm="() =>handleCommit(record, 'commit')" |
| | | > |
| | | <a>提交</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.status == '2'"> |
| | | <a-popconfirm |
| | | v-if="record.status == '2'" |
| | | title="确认撤回吗?" |
| | | @confirm="() =>handleCommit(record, 'back')" |
| | | > |
| | | <a>撤回</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.status == '2'"> |
| | | <a-popconfirm |
| | | v-if="record.status == '2'" |
| | | title="确认驳回吗?" |
| | | @confirm="() =>handleFinish(record, 'reject')" |
| | | > |
| | | <a>驳回</a> |
| | | </a-popconfirm> |
| | | </a-menu-item>--> |
| | | <a-menu-item v-if="record.status == '3' || record.status == '4'"> |
| | | <a-popconfirm |
| | | v-if="record.status == '3' || record.status == '4'" |
| | |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | <span slot="faultDescription" slot-scope="text"> |
| | | <j-ellipsis :value="text" :length="10" /> |
| | | </span> |
| | | |
| | | </a-table> |
| | |
| | | class="table-operator" |
| | | style="margin-top: 0px" |
| | | > |
| | | <FaultDescriptionList ref="FaultDescriptionList" /> |
| | | <FaultDescriptionList ref="FaultDescriptionList" @ok="modalFormOk"/> |
| | | </div> |
| | | |
| | | </a-tab-pane> |
| | |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></malfunction-repair-modal> |
| | | <approvel-modal ref='approvalModalForm' @ok='approvalModalFormOk' @cancel='approvalModalFormOk'></approvel-modal> |
| | | <approvel-modal |
| | | ref='approvalModalForm' |
| | | @ok='approvalModalFormOk' |
| | | @cancel='approvalModalFormOk' |
| | | ></approvel-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { putAction,getAction } from '@/api/manage' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import MalfunctionRepairModal from './modules/malfunctionRepair/MalfunctionRepaireModal' |
| | | import FaultDescriptionList from './FaultDescriptionList' |
| | | import FaultDescriptionList from './modules/malfunctionRepair/FaultDescriptionList' |
| | | import ApprovelModal from './modules/malfunctionRepair/ApprovelModal' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | |
| | | export default { |
| | | name: 'MalfunctionRepairList', |
| | |
| | | components: { |
| | | MalfunctionRepairModal, |
| | | FaultDescriptionList, |
| | | ApprovelModal |
| | | ApprovelModal, |
| | | JEllipsis |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | align: "center", |
| | | dataIndex: 'departName', |
| | | }, |
| | | { |
| | | title: '紧急程度', |
| | | align: "center", |
| | | dataIndex: 'urgencyName', |
| | | }, |
| | | // { |
| | | // title: '紧急程度', |
| | | // align: "center", |
| | | // dataIndex: 'urgencyName', |
| | | // }, |
| | | { |
| | | title: '故障描述', |
| | | align: "center", |
| | | dataIndex: 'faultDescription' |
| | | dataIndex: 'faultDescription', |
| | | scopedSlots: { |
| | | customRender: 'faultDescription' |
| | | } |
| | | |
| | | }, |
| | | // { |
| | | // title: '故障拍照', |
| | |
| | | // dataIndex: 'photo', |
| | | // scopedSlots: { customRender: 'imgSlot' } |
| | | // }, |
| | | // { |
| | | // title: '故障原因', |
| | | // align: "center", |
| | | // dataIndex: 'faultReason' |
| | | // }, |
| | | { |
| | | title: '故障时间', |
| | | align: "center", |
| | | dataIndex: 'faultTime' |
| | | }, |
| | | // { |
| | | // title: '是否停机待修', |
| | | // align: "center", |
| | | // dataIndex: 'isStop_dictText', |
| | | // }, |
| | | { |
| | | title: '是否停机待修', |
| | | align: "center", |
| | | dataIndex: 'isStopName', |
| | | }, |
| | | { |
| | | title: '创建人', |
| | | align: "center", |
| | |
| | | align: "center", |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | // { |
| | | // title: '操作', |
| | | // dataIndex: 'action', |
| | | // align: "center", |
| | | // fixed: "right", |
| | | // width: 200, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/eam/equipmentReportRepair/getReportRepairList", |
| | |
| | | importExcelUrl: "eam/equipmentReportRepair/importExcel", |
| | | edit: "/eam/equipmentReportRepair/edit", |
| | | }, |
| | | imgList:'' |
| | | /* 分页参数 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " 共" + total + "条" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | |
| | | }) |
| | | }, |
| | | |
| | | handleFinish(record,type) { |
| | | if(type == 'agree'){ |
| | | handleFinish(record, type) { |
| | | if (type == 'agree') { |
| | | record.status = '3' |
| | | }else if(type == 'reject'){ |
| | | } else if (type == 'reject') { |
| | | record.status = '4' |
| | | }else if(type == 'revoke'){ |
| | | } else if (type == 'revoke') { |
| | | record.status = '2' |
| | | } |
| | | putAction(this.url.edit, record).then(res => { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleApprove: function(record) { |
| | | handleApprove: function (record) { |
| | | let edit |
| | | edit = this.url.edit |
| | | this.$refs.approvalModalForm.showModals(record, edit,'3','4') |
| | | this.$refs.approvalModalForm.showModals(record, edit, '3', '4') |
| | | this.$refs.approvalModalForm.title = '审批' |
| | | this.$refs.approvalModalForm.disableSubmit = false |
| | | |