| | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | <span slot="faultDescription" slot-scope="text"> |
| | | <j-ellipsis :value="text" :length="10" /> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | |
| | | import MalfunctionRepairModal from './modules/malfunctionRepair/MalfunctionRepaireModal' |
| | | 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: 'faultReason' |
| | | // }, |
| | | { |
| | | title: '故障时间', |
| | | align: "center", |
| | |
| | | align: "center", |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | // { |
| | | // title: '操作', |
| | | // dataIndex: 'action', |
| | | // align: "center", |
| | | // fixed: "right", |
| | | // width: 200, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/eam/equipmentReportRepair/getReportRepairList", |
| | |
| | | handleCancel() { |
| | | this.close(); |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list属性!') |
| | | return |
| | | } |
| | | //加载数据 若传入参数1则加载第一页的内容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | this.onClearSelected() |
| | | this.queryParam.equipmentStatus = '1'; |
| | | var params = this.getQueryParams()//查询条件 |
| | | this.loading = true |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | }, |
| | | } |
| | |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | |
| | | /deep/ .notshow { |
| | | .notshow { |
| | | display: none; |
| | | } |
| | | |
| | |
| | | .dataUnKnow { |
| | | color: #1890ff; |
| | | } |
| | | |
| | | /deep/ .frozenRowClass { |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | </style> |
| | |
| | | add: "/eam/equipmentReportRepair/add", |
| | | edit: "/eam/equipmentReportRepair/edit", |
| | | queryById: "/eam/equipmentReportRepair/queryById", |
| | | equipmentList: '/eam/equipment/list' |
| | | equipmentList: '/eam/equipment/list', |
| | | getNum:'/eam/sysIdentity/getNumNew' |
| | | }, |
| | | isMaintenance: [ |
| | | { label: '是', value: true }, |
| | |
| | | add() { |
| | | this.modelDefault.status = 1 |
| | | this.modelDefault.isStop = false |
| | | this.edit(this.modelDefault); |
| | | let that = this; |
| | | let param = { |
| | | type: 'EquipmentReportRepair', |
| | | length: 4 |
| | | }; |
| | | getAction(this.url.getNum,param).then(res=>{ |
| | | if(res.success){ |
| | | that.modelDefault.num = res.result; |
| | | that.edit(that.modelDefault); |
| | | } |
| | | }) |
| | | }, |
| | | async edit(record) { |
| | | await this.fetchList() |
| | | this.model = Object.assign({}, record); |
| | | if (this.model.id) { |
| | | |
| | | this.selectStatus = Number(record.status) |
| | | record.isStop == 'true' ? this.isStop = true : this.isStop = false |
| | | this.equipmentId = String(record.equipmentId) |
| | |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | placeholder="请输入单据号" |
| | | v-decorator="['num', validatorRules.num]" |
| | | /> |
| | |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请选择是否停机维修'" |
| | | :triggerChange="true" |
| | | dictCode="is_stop" |
| | |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-date |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | style="width: 100%" |
| | | placeholder="请选择故障时间" |
| | | :showTime="true" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <!-- <a-row :gutter="24"> |
| | | <a-col :span="24/2"> |
| | | <a-form-item |
| | | label="紧急程度" |
| | |
| | | v-decorator="['urgency', validatorRules.urgency]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24/2" v-show="false"> |
| | | </a-col> --> |
| | | <!-- <a-col :span="24/2" v-show="false"> |
| | | <a-form-item |
| | | label="故障原因" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | enter-button |
| | | v-decorator="['faultReason', validatorRules.faultReason]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-col> --> |
| | | <!-- </a-row> --> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24/2"> |
| | | <a-form-item |
| | |
| | | // import JImageUpload from '@/components/jeecg/JImage2Upload' |
| | | import EquipmentList from './EquipmentList' |
| | | import Vue from 'vue' |
| | | import dayjs from 'dayjs' |
| | | |
| | | |
| | | export default { |
| | | name: "MalfunctionRepaireModal", |
| | |
| | | JMultiSelectTag, |
| | | Tooltip, |
| | | // JImageUpload, |
| | | EquipmentList |
| | | EquipmentList, |
| | | dayjs |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | { required: true, message: '请选择故障时间!' }, |
| | | ] |
| | | }, |
| | | faultDescription:{ |
| | | rules: [ |
| | | { required: true, message: '请描述故障!' }, |
| | | { max: 1000, min:1,message: '最多可描述1000字!' }, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/eam/equipmentReportRepair/add", |
| | | edit: "/eam/equipmentReportRepair/edit", |
| | | getSysDeparts: "/eam/equipment/getSysDeparts", |
| | | getNum:'/eam/sysIdentity/getNumNew' |
| | | }, |
| | | |
| | | dataSource: [], |
| | | } |
| | | }, |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | add() { |
| | | this.edit({}) |
| | | let that = this; |
| | | let param = { |
| | | type: 'EquipmentReportRepair', |
| | | length: 4 |
| | | }; |
| | | let modelDefault = {}; |
| | | getAction(this.url.getNum,param).then(res=>{ |
| | | if(res.success){ |
| | | modelDefault.num = res.result; |
| | | modelDefault.isStop = '2' |
| | | modelDefault.faultTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'); |
| | | that.edit(modelDefault); |
| | | } |
| | | }) |
| | | }, |
| | | edit(record) { |
| | | let that = this; |