| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="1250" |
| | | :width="1600" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :loading="confirmLoading" |
| | | @change="handleTableChange" |
| | | :customRow="clickThenCheck" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | > |
| | | |
| | | <span slot="faultDescription" slot-scope="text"> |
| | | <j-ellipsis :value="text" :length="10" /> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | </a-form> |
| | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis'//引入过长裁剪 |
| | | import store from '@/store' |
| | | import { |
| | | ACCESS_TOKEN, |
| | | USER_NAME, |
| | | USER_INFO, |
| | | USER_AUTH, |
| | | SYS_BUTTON_AUTH, |
| | | UI_CACHE_DB_DICT_DATA, |
| | | TENANT_ID, |
| | | CACHE_INCLUDED_ROUTES |
| | | } from '@/store/mutation-types' |
| | | |
| | | export default { |
| | | name: "FaultReportRepair", |
| | |
| | | JDate, |
| | | Tooltip, |
| | | JEllipsis, |
| | | store |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | columns: [ |
| | | { |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: '状态', |
| | | align: "center", |
| | | dataIndex: 'statusName', |
| | | }, |
| | | { |
| | | title: '单据号', |
| | | align: 'center', |
| | | dataIndex: 'num', |
| | | align: "center", |
| | | dataIndex: 'num' |
| | | }, |
| | | { |
| | | title: '设备编码', |
| | | align: "center", |
| | | dataIndex: 'equipmentNum' |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: 'center', |
| | | align: "center", |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: '设备型号', |
| | | align: "center", |
| | | dataIndex: 'equipmentModel', |
| | | }, |
| | | { |
| | | title: '规格', |
| | | align: "center", |
| | | dataIndex: 'equipmentSpecification', |
| | | }, |
| | | { |
| | | title: '使用部门', |
| | | align: "center", |
| | | dataIndex: 'departName', |
| | | }, |
| | | { |
| | | title: '故障描述', |
| | | align: "center", |
| | | dataIndex: 'faultDescription' |
| | | dataIndex: 'faultDescription', |
| | | scopedSlots: { |
| | | customRender: 'faultDescription' |
| | | } |
| | | |
| | | }, |
| | | { |
| | | title: '故障时间', |
| | |
| | | dataIndex: 'faultTime' |
| | | }, |
| | | { |
| | | title: '紧急程度', |
| | | align: 'center', |
| | | dataIndex: 'urgency_dictText', |
| | | title: '是否停机待修', |
| | | align: "center", |
| | | dataIndex: 'isStopName', |
| | | }, |
| | | { |
| | | title: '创建人', |
| | | align: "center", |
| | | dataIndex: 'createBy' |
| | | }, |
| | | { |
| | | title: '创建时间', |
| | | align: "center", |
| | | dataIndex: 'createTime', |
| | | }, |
| | | { |
| | | title: '备注', |
| | | align: "center", |
| | | dataIndex: 'remark', |
| | | scopedSlots: { |
| | | customRender: 'faultDescription' |
| | | } |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/equipmentReportRepair/list", |
| | | list: "/eam/equipmentReportRepair/getReportRepairList", |
| | | add: "/eam/repairOrder/addBySelectReport" |
| | | }, |
| | | } |
| | | }, |
| | |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | this.queryParam.status = '1'; |
| | | this.queryParam.userId = store.getters.userInfo.id |
| | | var params = this.getQueryParams() //查询条件 |
| | | this.loading = true |
| | | params.isCreateOrder = 0 |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {}; |
| | | this.loadData(1) |
| | | }, |
| | | list(params) { |
| | | this.selectedRowKeys = []; |
| | | this.selectedRowRecord = []; |
| | | this.visible = true; |
| | | this.loadData(1); |
| | | }, |
| | | clickThenCheck(record) { |
| | | return { |
| | |
| | | } |
| | | }; |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectedRows) { |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectedRowRecord = selectedRows[0]; |
| | | this.selectionRows = selectionRows; |
| | | }, |
| | | close() { |
| | | this.queryParam = {}; |
| | |
| | | handleOk() { |
| | | const that = this; |
| | | // 触发表单验证 |
| | | if (that.selectedRowKeys.length > 0) { |
| | | if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { |
| | | that.$emit('sendFaultReportRepairRecord', { record: that.selectedRowRecord }); |
| | | that.close(); |
| | | } else { |
| | | that.$message.error("请选择故障报修信息!") |
| | | } |
| | | } else { |
| | | that.$message.error("请选择故障报修信息!") |
| | | if (that.selectedRowKeys.length === 0) { |
| | | that.$message.error("请选择故障报修单后提交!") |
| | | return false; |
| | | } |
| | | postAction(this.url.add,this.selectionRows).then(res=>{ |
| | | if(res.success){ |
| | | that.$message.success("领取成功!") |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.error("领取出现异常!") |
| | | } |
| | | }).finally(res=>{ |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }); |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close(); |
| | | }, |
| | |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | |
| | | /deep/ .notshow { |
| | | .notshow { |
| | | display: none; |
| | | } |
| | | |
| | |
| | | } |
| | | .dataUnKnow { |
| | | color: #1890ff; |
| | | } |
| | | |
| | | /deep/ .frozenRowClass { |
| | | } .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | </style> |