预测性维护工单
1.工单执行
2.子表:触发条件,维护内容,计划用料,危险防控,作业指导书,实际用料,实际工时
| | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <maintenance-order-modal |
| | | <predictive-work-order-model |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></maintenance-order-modal> |
| | | <inspection-order-assign-modal |
| | | ref="InspectionOrderAssignModal" |
| | | ></predictive-work-order-model> |
| | | <predictive-work-order-drawer |
| | | ref="PredictiveWorkOrderDrawer" |
| | | @ok="modalFormOk" |
| | | ></inspection-order-assign-modal> |
| | | <specialy-maintenance-order-exe-drawer |
| | | ref="SpecialyMaintenanceOrderExeDrawer" |
| | | @ok="modalFormOk" |
| | | ></specialy-maintenance-order-exe-drawer> |
| | | <specialty-maintenance-order-assign-modal |
| | | ref="SpecialtyMaintenanceOrderAssignModal" |
| | | @ok="modalFormOk" |
| | | > |
| | | </specialty-maintenance-order-assign-modal> |
| | | ></predictive-work-order-drawer> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import MaintenanceOrderModal from './modules/specialtyMaintenanceOrder/MaintenanceOrderModal' |
| | | import InspectionOrderAssignModal from './modules/specialtyMaintenanceOrder/InspectionOrderAssignModal' |
| | | import SpecialyMaintenanceOrderExeDrawer from './modules/specialtyMaintenanceOrder/SpecialyMaintenanceOrderExeDrawer' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import SpecialtyMaintenanceOrderAssignModal from './modules/specialtyMaintenanceOrder/SpecialtyMaintenanceOrderAssignModal.vue' |
| | | import SpecialtyInspectionOrderAssignModal from './modules/specialtyInspectionOrder/SpecialtyInspectionOrderAssignModal.vue' |
| | | import PredictiveWorkOrderModel from './modules/predictiveWorkOrder/PredictiveWorkOrderModel' |
| | | import PredictiveWorkOrderDrawer from './modules/predictiveWorkOrder/PredictiveWorkOrderDrawer' |
| | | |
| | | |
| | | export default { |
| | | name: 'PredictiveWorkOrderList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | MaintenanceOrderModal, |
| | | InspectionOrderAssignModal, |
| | | SpecialyMaintenanceOrderExeDrawer, |
| | | SpecialtyMaintenanceOrderAssignModal, |
| | | SpecialtyInspectionOrderAssignModal |
| | | PredictiveWorkOrderModel, |
| | | PredictiveWorkOrderDrawer |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | { |
| | | title: 'ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'statusName' |
| | | dataIndex: 'status_dictText' |
| | | }, |
| | | { |
| | | title: 'åæ®å·', |
| | |
| | | { |
| | | title: 'çæ§ç±»å', |
| | | align: "center", |
| | | dataIndex: 'maintenanceMode' |
| | | dataIndex: 'monitorType_dictText' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'departName', |
| | | dataIndex: 'equipmentNum', |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | dataIndex: 'maintenanceTypeName', |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: 'åå·', |
| | | align: "center", |
| | | dataIndex: 'maintenanceCycleName', |
| | | dataIndex: 'model', |
| | | }, |
| | | { |
| | | title: 'æ åç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'assignModeName', |
| | | dataIndex: 'planNum', |
| | | }, |
| | | { |
| | | title: 'çæ¬', |
| | | align: "center", |
| | | dataIndex: 'specialtyMaintenancePlanNum', |
| | | dataIndex: 'version', |
| | | }, |
| | | { |
| | | title: '使ç¨é¨é¨', |
| | | align: "center", |
| | | dataIndex: 'teamName', |
| | | dataIndex: 'useId_dictText', |
| | | }, |
| | | { |
| | | title: '派工æ¹å¼', |
| | | align: "center", |
| | | dataIndex: 'sumOfWorkingHourQuota', |
| | | dataIndex: 'assignMode_dictText', |
| | | }, |
| | | { |
| | | title: '责任çç»', |
| | | align: "center", |
| | | dataIndex: 'planStartTime', |
| | | dataIndex: 'teamId_dictText', |
| | | width: 170 |
| | | |
| | | }, |
| | | { |
| | | title: '责任人', |
| | | align: "center", |
| | | dataIndex: 'planEndTime', |
| | | dataIndex: 'maintenanceUserId_dictText', |
| | | width: 170 |
| | | }, |
| | | { |
| | | title: 'å·¥æ¶å®é¢ï¼å°æ¶ï¼', |
| | | align: "center", |
| | | dataIndex: 'planEndTime', |
| | | width: 170 |
| | | }, |
| | | // { |
| | | // title: 'å·¥æ¶å®é¢ï¼å°æ¶ï¼', |
| | | // align: "center", |
| | | // dataIndex: 'planEndTime', |
| | | // width: 170 |
| | | // }, |
| | | { |
| | | title: 'å®é
å·¥æ¶', |
| | | align: "center", |
| | | dataIndex: 'planEndTime', |
| | | dataIndex: 'actualWorkingHourQuota', |
| | | width: 170 |
| | | }, |
| | | { |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | batchAssign() { |
| | | this.$refs.InspectionOrderAssignModal.visible = true |
| | | this.$refs.InspectionOrderAssignModal.title = '工忴¾å·¥' |
| | | this.$refs.InspectionOrderAssignModal.selectionRows |
| | | this.$refs.InspectionOrderAssignModal.handleShow() |
| | | this.$bus.$emit('selectionRows', this.selectionRows); |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows; |
| | | }, |
| | | |
| | | handleOrderExe(record) { |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.visible = true |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.title = 'ä¸ä¸ä¿å
»å·¥åæ§è¡' |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.handleShow(record) |
| | | this.$refs. PredictiveWorkOrderDrawer.visible = true |
| | | this.$refs. PredictiveWorkOrderDrawer.title = 'ä¸ä¸ä¿å
»å·¥åæ§è¡' |
| | | this.$refs. PredictiveWorkOrderDrawer.handleShow(record) |
| | | if (record.status === '3') { |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.buttonDistable = true//ä¿åãæåãæ¥å·¥ |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.revocationDistable = true//æ¤éæé® |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.SWbuttonDistable = false//å¼å·¥æé® |
| | | this.$refs. PredictiveWorkOrderDrawer.buttonDistable = true//ä¿åãæåãæ¥å·¥ |
| | | this.$refs. PredictiveWorkOrderDrawer.revocationDistable = true//æ¤éæé® |
| | | this.$refs. PredictiveWorkOrderDrawer.SWbuttonDistable = false//å¼å·¥æé® |
| | | } else if (record.status === '4') { |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.buttonDistable = false |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.revocationDistable = true |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.SWbuttonDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.buttonDistable = false |
| | | this.$refs. PredictiveWorkOrderDrawer.revocationDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.SWbuttonDistable = true |
| | | } else if (record.status === '5') { |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.buttonDistable = true |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.revocationDistable = false |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.SWbuttonDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.buttonDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.revocationDistable = false |
| | | this.$refs. PredictiveWorkOrderDrawer.SWbuttonDistable = true |
| | | } else if (record.status === '7') { |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.buttonDistable = true |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.revocationDistable = true |
| | | this.$refs.SpecialyMaintenanceOrderExeDrawer.SWbuttonDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.buttonDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.revocationDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.SWbuttonDistable = true |
| | | } |
| | | }, |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | <template |
| | | v-for="col in columns" |
| | | :slot="col.dataIndex" |
| | | slot-scope='text, record, index' |
| | | > |
| | | <div :key="col.dataIndex"> |
| | | <a-input-search |
| | | v-if="col.dataIndex == 'materialName'" |
| | | enter-button |
| | | @search="onSearchMaterial(index)" |
| | | :value="text" |
| | | :read-only="true" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | /> |
| | | <a-input-number |
| | | :value="text" |
| | | v-if="col.dataIndex == 'actualQuantity'" |
| | | :min="1" |
| | | :max="99999" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="record.disabled" |
| | | /> |
| | | |
| | | </div> |
| | | </template> |
| | | <span |
| | | slot='action' |
| | | slot-scope='text, record,index' |
| | | > |
| | | <a @click="handleDeleteFake(index)">å é¤</a> |
| | | </span> |
| | | </a-table> |
| | | <a-button |
| | | style="width: 100%; margin-top: 16px; margin-bottom: 8px" |
| | | type="dashed" |
| | | icon="plus" |
| | | @click="addMaterial" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >æ·»å å®é
ç¨æ |
| | | |
| | | </a-button> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'right'}"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | :disabled="repairOrderStatus!='3'" |
| | | > |
| | | æ¸
空 |
| | | </a-button> |
| | | <a-button |
| | | @click="handleOk(1)" |
| | | type="primary" |
| | | :style="{marginRight: '8px'}" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >æå</a-button> |
| | | <a-button |
| | | @click="handleOk(0)" |
| | | type="primary" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >ä¿å</a-button> |
| | | </a-row> |
| | | <!-- :disabled="false" --> |
| | | </div> |
| | | <actual-material-select |
| | | ref="actualMaterialSelect" |
| | | @sendMaterialRecord="sendMaterialRecord" |
| | | > |
| | | </actual-material-select> |
| | | </a-card> |
| | | </template> |
| | | <script> |
| | | import { postAction, getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import pick from 'lodash.pick' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import ActualMaterialSelect from './select/ActualMaterialSelect.vue' |
| | | export default { |
| | | name: 'ActualMaterialEditTable', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JEllipsis, |
| | | ActualMaterialSelect |
| | | }, |
| | | props: { |
| | | repairOrderId: { |
| | | type: String, |
| | | required: false, |
| | | default: '-1' |
| | | }, |
| | | repairOrderStatus: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "å·¥èºç¡®è®¤", |
| | | flag: false,//主页é¢çæ è®°ä½ ç¨äºåºåæ¯å¦ç¡®è®¤è¿å·¥åå·¥èº æ¥åºåtable页å±ç¤º å·¥åå·¥åº è¿æ¯äº§åå·¥åº |
| | | visible: false, |
| | | model: {}, |
| | | obj: {}, |
| | | maskClosable: true, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 99, |
| | | pageSizeOptions: ['99', '199'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | validatorRules: { |
| | | materialId: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©ç©æ!' }, |
| | | ] |
| | | }, |
| | | actualQuantity: { |
| | | rules: [ |
| | | { required: false, message: 'è¯·å¡«åæ°é!' }, |
| | | ] |
| | | }, |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 7 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | drawerWidth: "100%", |
| | | visible: false, |
| | | disableSubmit: false, |
| | | disableSelect: false, |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: '颿åºåºåå·', |
| | | dataIndex: 'num', |
| | | align: "center", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶ç¼ç ', |
| | | dataIndex: 'sparePartNum', |
| | | align: "center", |
| | | |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åç§°', |
| | | dataIndex: 'sparePartName', |
| | | align: "center", |
| | | |
| | | }, |
| | | { |
| | | title: 'è§æ ¼', |
| | | dataIndex: 'specification', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: 'åå·', |
| | | dataIndex: 'model', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: 'å¶é å', |
| | | dataIndex: 'constructorName', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: '主åä½', |
| | | dataIndex: 'mainUnitName', |
| | | align: "center", |
| | | |
| | | }, |
| | | { |
| | | title: '主æ°é', |
| | | align: 'center', |
| | | dataIndex: 'mainQuantity' |
| | | }, |
| | | { |
| | | title: 'å¯ç¨æ°é', |
| | | align: 'center', |
| | | dataIndex: 'availableQuantity' |
| | | }, |
| | | { |
| | | title: 'ä½¿ç¨æ°é', |
| | | dataIndex: 'quantity', |
| | | align: "center", |
| | | scopedSlots: { customRender: 'quantity' }, |
| | | className: 'red', |
| | | |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | width: 250, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/repairOrder/listRepairOrderActualMaterialByMainId", |
| | | confirmMaterial: "/eam/repairOrder/addRepairOrderActualMaterial" |
| | | }, |
| | | changeIndex: 0 |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | this.queryParam['repairOrderId'] = this.repairOrderId; |
| | | this.loadData(1); |
| | | }, |
| | | methods: { |
| | | addMaterial() { |
| | | this.dataSource.push({ materialId: '', repairOrderId: this.repairOrderId, actualQuantity: 1, materialNum: '', materialName: '', materialModel: '', materialSpecification: '', unitId_dictText: '' }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.dataSource = []; |
| | | this.disableSubmit = false; |
| | | this.visible = false; |
| | | }, |
| | | handleDeleteFake(index) { |
| | | this.dataSource.pop(index); |
| | | }, |
| | | handleOk(saveStatus) { |
| | | const that = this |
| | | if (saveStatus == 0) { |
| | | let materialDataSource = that.dataSource; |
| | | let indexIdList = []; |
| | | for (let i = 0; i < materialDataSource.length; i++) { |
| | | if (materialDataSource[i].materialId == undefined || materialDataSource[i].materialId == null || materialDataSource[i].materialId == '') { |
| | | that.$message.warning("è¯·éæ©ç¬¬" + (i + 1) + "è¡ç©æï¼"); |
| | | return false; |
| | | } |
| | | if (materialDataSource[i].actualQuantity == undefined || materialDataSource[i].actualQuantity == null || materialDataSource[i].actualQuantity == '') { |
| | | that.$message.warning("请填å第" + (i + 1) + "è¡ç¨ææ°ï¼"); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let formData = {} |
| | | formData.repairOrderId = that.repairOrderId; |
| | | formData.actualMaterialList = that.dataSource; |
| | | let obj = obj = postAction(this.url.confirmMaterial, formData) |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | that.loadData(1); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleChange(value, key, column, index) { |
| | | let that = this; |
| | | const temp = [...that.dataSource]; |
| | | const target = temp[index]; |
| | | if (target) { |
| | | target[column.dataIndex] = value; |
| | | if ('materialId' == column.dataIndex) { |
| | | target['materialId'] = value; |
| | | } |
| | | if ('actualQuantity' == column.dataIndex) { |
| | | target['actualQuantity'] = value; |
| | | } |
| | | that.dataSource = temp; |
| | | } |
| | | }, |
| | | onSearchMaterial(index) { |
| | | this.recordIndex = index |
| | | this.$refs.actualMaterialSelect.list() |
| | | this.$refs.actualMaterialSelect.title = 'ç©æéæ©' |
| | | }, |
| | | sendMaterialRecord(data, val) { |
| | | let record = data.record |
| | | const temp = [...this.dataSource] |
| | | const target = temp[this.recordIndex] |
| | | if (target) { |
| | | console.log(target) |
| | | target.materialId = record.id; |
| | | target.materialName = record.name; |
| | | target.materialNum = record.num; |
| | | target.materialModel = record.model; |
| | | target.materialSpecification = record.specification; |
| | | target.unitId_dictText = record.unitId_dictText; |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | clearList() { |
| | | this.dataSource = []; |
| | | this.ipagination.current = 1 |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | repairOrderId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | this.clearList(); |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /deep/ .red { |
| | | color: red; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | @change="handleTableChange" |
| | | > |
| | | <template |
| | | v-for="col in columns" |
| | | :slot="col.dataIndex" |
| | | slot-scope='text, record, index' |
| | | > |
| | | <div :key="col.dataIndex"> |
| | | <a-input-search |
| | | v-if="col.dataIndex == 'username'" |
| | | enter-button |
| | | @search="onSearchUser(index)" |
| | | :value="text" |
| | | :read-only="true" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | /> |
| | | <a-input-number |
| | | :value="text" |
| | | v-if="col.dataIndex == 'actualHour'" |
| | | :min="1" |
| | | :max="99999" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="record.disabled" |
| | | /> |
| | | |
| | | </div> |
| | | </template> |
| | | <span slot='action' slot-scope='text, record,index'> |
| | | <a @click="handleDeleteFake(index)">å é¤</a> |
| | | </span> |
| | | </a-table> |
| | | <a-button |
| | | style="width: 100%; margin-top: 16px; margin-bottom: 8px" |
| | | type="dashed" |
| | | icon="plus" |
| | | @click="addHour" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >æ·»å å®é
å·¥æ¶ |
| | | </a-button> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'right'}"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | :disabled="repairOrderStatus!='3'" |
| | | > |
| | | æ¸
空 |
| | | </a-button> |
| | | <a-button |
| | | @click="handleOk(1)" |
| | | type="primary" |
| | | :style="{marginRight: '8px'}" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >æå</a-button> |
| | | <a-button |
| | | @click="handleOk(0)" |
| | | type="primary" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >ä¿å</a-button> |
| | | </a-row> |
| | | <!-- :disabled="false" --> |
| | | </div> |
| | | <actual-hour-user-select |
| | | ref="actualUserSelect" |
| | | @sendUserRecord="sendUserRecord" |
| | | > |
| | | </actual-hour-user-select> |
| | | </a-card> |
| | | </template> |
| | | <script> |
| | | import { postAction, getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import pick from 'lodash.pick' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import ActualHourUserSelect from './select/ActualHourUserSelect.vue' |
| | | export default { |
| | | name: 'ActualWorkHoursEditTable', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JEllipsis, |
| | | ActualHourUserSelect |
| | | }, |
| | | props:{ |
| | | repairOrderId:{ |
| | | type:String, |
| | | required:false, |
| | | default:'' |
| | | }, |
| | | repairOrderStatus:{ |
| | | type:String, |
| | | required:false, |
| | | default:'' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "å·¥èºç¡®è®¤", |
| | | flag: false,//主页é¢çæ è®°ä½ ç¨äºåºåæ¯å¦ç¡®è®¤è¿å·¥åå·¥èº æ¥åºåtable页å±ç¤º å·¥åå·¥åº è¿æ¯äº§åå·¥åº |
| | | visible: false, |
| | | model: {}, |
| | | obj: {}, |
| | | maskClosable: true, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 99, |
| | | pageSizeOptions: ['99', '199'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | validatorRules: { |
| | | userId: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©äººå!' }, |
| | | ] |
| | | }, |
| | | actual_hour: { |
| | | rules: [ |
| | | { required: false, message: '请填åå·¥æ¶!'}, |
| | | ] |
| | | }, |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 7 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | drawerWidth: "100%", |
| | | visible: false, |
| | | disableSubmit: false, |
| | | disableSelect: false, |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: '*人åç¼ç ', |
| | | dataIndex: 'username', |
| | | align: "center", |
| | | scopedSlots: { customRender: 'username' }, |
| | | className: 'red', |
| | | width: 250, |
| | | }, |
| | | { |
| | | title: '人ååç§°', |
| | | dataIndex: 'realname', |
| | | align: "center", |
| | | width: 250, |
| | | }, |
| | | { |
| | | title: '*å®é
å·¥æ¶', |
| | | dataIndex: 'actualHour', |
| | | align: "center", |
| | | className: 'red', |
| | | scopedSlots: { customRender: 'actualHour' }, |
| | | width: 250, |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | width: 250, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/repairOrder/listRepairOrderActualWorkHoursByMainId", |
| | | confirmHour:"/eam/repairOrder/addRepairOrderActualWorkHours" |
| | | }, |
| | | changeIndex: 0 |
| | | } |
| | | }, |
| | | created(){ |
| | | this.queryParam['repairOrderId'] = this.repairOrderId; |
| | | this.loadData(1); |
| | | }, |
| | | methods: { |
| | | addHour() { |
| | | this.dataSource.push({userId:'',repairOrderId:this.repairOrderId,actualHour:0,username:'',realname:''}) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.dataSource = [] |
| | | this.disableSubmit = false; |
| | | this.visible = false; |
| | | }, |
| | | handleDeleteFake(index){ |
| | | this.dataSource.pop(index); |
| | | }, |
| | | handleOk(saveStatus) { |
| | | const that = this |
| | | if(saveStatus==0){ |
| | | let workHoursDataSource = that.dataSource; |
| | | for (let i = 0; i < workHoursDataSource.length; i++) { |
| | | if (workHoursDataSource[i].userId == undefined || workHoursDataSource[i].userId == null || workHoursDataSource[i].userId == '') { |
| | | that.$message.warning("è¯·éæ©ç¬¬"+(i+1)+"è¡ç»´ä¿®äººåï¼"); |
| | | return false; |
| | | } |
| | | if(workHoursDataSource[i].actualHour == undefined || workHoursDataSource[i].actualHour == null||workHoursDataSource[i].actualHour==''){ |
| | | that.$message.warning("请填å第"+(i+1)+"è¡å®é
å·¥æ¶ï¼"); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let formData = {} |
| | | formData.repairOrderId = that.repairOrderId; |
| | | formData.actualHourList = that.dataSource; |
| | | let obj = obj = postAction(this.url.confirmHour, formData) |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | that.loadData(1); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleChange(value, key, column, index) { |
| | | let that = this; |
| | | const temp = [...that.dataSource]; |
| | | const target = temp[index]; |
| | | if (target) { |
| | | target[column.dataIndex] = value; |
| | | if ('userId' == column.dataIndex) { |
| | | target['userId'] = value; |
| | | } |
| | | if ('actualHour' == column.dataIndex) { |
| | | target['actualHour'] = value; |
| | | } |
| | | that.dataSource = temp; |
| | | } |
| | | }, |
| | | onSearchUser(index) { |
| | | this.recordIndex = index |
| | | this.$refs.actualUserSelect.list() |
| | | this.$refs.actualUserSelect.title = '人åéæ©' |
| | | }, |
| | | sendUserRecord(data, val) { |
| | | let record = data.record |
| | | const temp = [...this.dataSource] |
| | | const target = temp[this.recordIndex] |
| | | if (target) { |
| | | console.log(record) |
| | | target.userId = record.id; |
| | | target.username = record.username; |
| | | target.realname = record.realname; |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | clearList(){ |
| | | this.dataSource=[]; |
| | | this.ipagination.current = 1 |
| | | } |
| | | }, |
| | | watch:{ |
| | | repairOrderId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | this.clearList(); |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /deep/ .red { |
| | | color: red; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="mainId"> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | v-if="mainId !='' && isAdd " |
| | | >æ°å¢</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange"> |
| | | <!-- :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 @click="handleEdit(record)" v-if="addStatus" >ç¼è¾</a> |
| | | <a-divider type="vertical" v-if="addStatus" /> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)" > |
| | | <a v-if="addStatus">å é¤</a> |
| | | </a-popconfirm> |
| | | <a style="font-size: 12px;font-style: italic;" v-if="!addStatus">è¯¥ç¶æä¸å¯æä½</a> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | export default { |
| | | name: "RepairOrderDetailList", |
| | | mixins:[JeecgListMixin], |
| | | components: { }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | }, |
| | | maintenanceStandardId: { |
| | | type: String, |
| | | required: false |
| | | }, |
| | | isEdit: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isAdd: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isDel: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | |
| | | }, |
| | | watch:{ |
| | | mainId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.mainId){ |
| | | this.clearList() |
| | | }else{ |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | disableMixinCreated:true, |
| | | repairOrderSelectionRows:[], |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'é¨ä½', |
| | | align:"center", |
| | | dataIndex: 'location', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'示æå¾', |
| | | align:"center", |
| | | scopedSlots: {customRender: 'imgSlot'}, |
| | | dataIndex: 'sketchMap', |
| | | width:200 |
| | | }, |
| | | // { |
| | | // title:'维修项ç®', |
| | | // align:"center", |
| | | // dataIndex: 'maintenanceItem' |
| | | // }, |
| | | { |
| | | title:'ç»´ä¿®è¦æ±', |
| | | align:"center", |
| | | dataIndex: 'maintenanceRequire', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'æ¹æ³', |
| | | align:"center", |
| | | dataIndex: 'maintenanceWay', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'å·¥å
·', |
| | | align:"center", |
| | | dataIndex: 'maintenanceTooling', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'å®å
¨è¦æ±', |
| | | align:"center", |
| | | dataIndex: 'safetyRequirement' , |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'å·¥æ¶å®é¢', |
| | | align:"center", |
| | | dataIndex: 'timeQuota', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'ç»´ä¿ä¸ä¸', |
| | | align:"center", |
| | | dataIndex: 'mamaintenanceSpecialtyId_dictText', |
| | | width:200 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/repairOrder/pageRepairOrderDetailByMainId", |
| | | delete: "/eam/repairOrder/deleteRepairOrderDetail", |
| | | deleteBatch: "/eam/repairOrder/deleteBatchRepairOrderDetail", |
| | | exportXlsUrl: "/eam/repairOrder/exportRepairOrderDetail", |
| | | importUrl: "/eam/repairOrder/importRepairOrderDetail", |
| | | }, |
| | | dictOptions:{ |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('repairOrderSelectionRows', (data) => { |
| | | this.repairOrderSelectionRows = data |
| | | }) |
| | | }, |
| | | methods: { |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less' |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction, deleteAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | export default { |
| | | name: 'PlanningMaterial', |
| | | components: { |
| | | Tooltip, |
| | | }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | maintenanceStandardId: { |
| | | type: String, |
| | | required: false |
| | | }, |
| | | isEdit: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isAdd: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isDel: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: { |
| | | maintenanceStandardId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (this.maintenanceStandardId) { |
| | | this.queryParam.maintenanceStandardId = val |
| | | this.queryParam.delFlag = 0 |
| | | this.loadData(1) |
| | | }else{ |
| | | this.clearList(); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated:true, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶ç¼å·', |
| | | dataIndex: 'num', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åç§°', |
| | | dataIndex: 'name', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶è§æ ¼', |
| | | dataIndex: 'specification', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åå·', |
| | | dataIndex: 'model', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å¶é å', |
| | | dataIndex: 'constructorName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'æ°é', |
| | | dataIndex: 'quantity', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | dataIndex: 'unitName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: '/eam/maintenanceStandardPlanningMaterial/getMaintenanceStandardPlanningMaterialList', |
| | | delete: '/eam/maintenanceStandardPlanningMaterial/delete' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | handleAdd: function() { |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = '计åç¨æ' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.maintenanceStandardId = this.maintenanceStandardId |
| | | }, |
| | | |
| | | handleDelete: function(id) { |
| | | if (!this.url.delete) { |
| | | this.$message.error('请设置url.delete屿§!') |
| | | return |
| | | } |
| | | var that = this |
| | | deleteAction(that.url.delete, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | that.alterFlag = new Date() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true |
| | | // this.originTargetKeys = []; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records || res.result |
| | | |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-drawer |
| | | :title="title" |
| | | :width="drawerWidth" |
| | | :visible="visible" |
| | | @close="handleCancel" |
| | | :confirmLoading="confirmLoading" |
| | | :maskClosable="maskClosable" |
| | | > |
| | | <a-card :style="getBackground()"> |
| | | <template> |
| | | <a-card> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'left'}"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleSW" |
| | | :disabled=SWbuttonDistable |
| | | type="primary" |
| | | >å¼å·¥</a-button> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleReport" |
| | | :disabled="buttonDistable" |
| | | type="primary" |
| | | >æ¥å·¥</a-button> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleReset" |
| | | :disabled="revocationDistable" |
| | | type="primary" |
| | | >æ¤é</a-button> |
| | | </a-row> |
| | | </div> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ç¶æ" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.statusName }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ä¿å
»å·¥åå·" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.num }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ä¿å
»ç±»å" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.maintenanceTypeName }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="对象é¨é¨" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.departName }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ç»´ä¿æ¹å¼" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hight" |
| | | >{{ this.model.maintenanceMode }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="责任çç»" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.teamName }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="设å¤ç¼å·" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.equipmentNum }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="设å¤åç§°" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.equipmentName }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="设å¤åå·" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.equipmentModel }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <a-tabs |
| | | type="card" |
| | | defaultActiveKey="1" |
| | | > |
| | | <a-tab-pane |
| | | tab='è§¦åæ¡ä»¶' |
| | | key="1" |
| | | class="hightColor" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <predictive-spare-parts :planId='workPlanId' v-show="model.monitorType == 'smkz'"/> |
| | | <!-- v-if="selectionRows[0].monitorType == 'smkz'"--> |
| | | <predictive-parameters :planId='workPlanId' v-show="model.monitorType == 'cskz'"/> |
| | | <!-- v-if="selectionRows[0].monitorType == 'cskz'" --> |
| | | <predictive-warn :planId='workPlanId' v-show="model.monitorType == 'bjkz'"/> |
| | | <!-- v-if="selectionRows[0].monitorType == 'bjkz'"--> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab='ç»´æ¤å
容' |
| | | key="2" |
| | | class="hightColor" |
| | | > |
| | | <predictive-order-detail-list :mainId='workPlanId'></predictive-order-detail-list> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane |
| | | tab='计åç¨æ' |
| | | key="3" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <plan-material :maintenanceStandardId="workPlanId" /> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab='å±é©é²æ§' |
| | | key="4" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <maintenance-standard-safety-requirement :maintenanceStandardId='workPlanId' /> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab='ä½ä¸æå¯¼ä¹¦' |
| | | key="5" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <predictive-work-instruction :maintenanceStandardId='workPlanId'></predictive-work-instruction> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab='å®é
ç¨æ' |
| | | key="6" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <actual-material-edit-table |
| | | ref="actualMaterialTabel" |
| | | :specialyMaintenanceOrderId="this.model.id" |
| | | :specialyMaintenanceOrderStatus="this.model.status" |
| | | :equipmentId="this.model.equipmentId" |
| | | ></actual-material-edit-table> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab='å®é
å·¥æ¶' |
| | | key="7" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <actual-work-hours-edit-table |
| | | :specialyMaintenanceOrderId="this.model.id" |
| | | :specialyMaintenanceOrderStatus="this.model.status" |
| | | :equipmentId="this.model.equipmentId" |
| | | :teamId="this.model.teamId" |
| | | ></actual-work-hours-edit-table> |
| | | </div> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-card> |
| | | </template> |
| | | </a-card> |
| | | |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'right'}"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | > |
| | | åæ¶ |
| | | </a-button> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleTS" |
| | | :disabled="buttonDistable" |
| | | type="primary" |
| | | v-if="false" |
| | | >æå</a-button> |
| | | <a-button |
| | | @click="handleOk" |
| | | :disabled="buttonDistable" |
| | | type="primary" |
| | | v-if="false" |
| | | >ä¿å</a-button> |
| | | </a-row> |
| | | </div> |
| | | </a-drawer> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { requestPut, getAction, downFile } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | |
| | | import { preview } from 'vue-photo-preview' |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import Vue from 'vue' |
| | | import PdfView from '@views/common/PdfView' |
| | | import { getFileAccessHttpUrl } from '@/api/manage'; |
| | | |
| | | import PlanMaterial from './PlanMaterial.vue' |
| | | import MaintenanceStandardSafetyRequirement from './SafetyRequirement' |
| | | import ActualMaterialEditTable from './ActualMaterialEditTable' |
| | | import ActualWorkHoursEditTable from './ActualWorkHoursEditTable' |
| | | //æ°ä¸è¥¿ |
| | | import PredictiveParameters from './boms/PredictiveParameters.vue' |
| | | import PredictiveSpareParts from './boms/PredictiveSpareParts.vue' |
| | | import PredictiveWarn from './boms/PredictiveWarn.vue' |
| | | import PredictiveOrderDetailList from './DetailList' |
| | | import PredictiveWorkInstruction from './WorkInstruction' |
| | | |
| | | export default { |
| | | name: 'PredictiveWorkOrderExeDrawer', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | PdfView, |
| | | Tooltip, |
| | | PlanMaterial, |
| | | MaintenanceStandardSafetyRequirement, |
| | | ActualMaterialEditTable, |
| | | ActualWorkHoursEditTable, |
| | | PredictiveParameters, |
| | | PredictiveSpareParts, |
| | | PredictiveWarn, |
| | | PredictiveOrderDetailList, |
| | | PredictiveWorkInstruction |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | pageSizeOptions: ['1'], |
| | | currentPage: 1, |
| | | pageSize: 1, |
| | | total: 10, |
| | | workPlanId:'', |
| | | title: "ä¸ä¸å·¥åæ§è¡", |
| | | visible: false, |
| | | maskClosable: true, |
| | | confirmLoading: false, |
| | | drawerWidth: "100%", |
| | | buttonDistable: false, |
| | | SWbuttonDistable: false, |
| | | revocationDistable: false, |
| | | currentNodeSelect: '', |
| | | specialtyMaintenancePlanId: '', |
| | | maintenanceStandardId: '-1', |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | url: { |
| | | getEquipmentTotalByOrderId: "/eam/specialtyMaintenanceOrderDetail/getEquipmentTotalByOrderId", |
| | | urlDownload: window._CONFIG['staticDomainURL'], |
| | | download: '/sys/upload/downloadFile', |
| | | editStatus: "/eam/specialtyMaintenanceOrder/editStatus", |
| | | revocation: "/eam/specialtyMaintenanceOrder/revocation", |
| | | report: "/eam/specialtyMaintenanceOrder/report", |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('closeDrawer', (data) => { |
| | | this.visible = false; |
| | | }) |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | onChange(page, pageSize) { |
| | | this.queryParam.specialtyMaintenanceOrderId = this.specialtyMaintenanceOrderId |
| | | this.queryParam.pageSize = pageSize |
| | | this.queryParam.pageNo = page |
| | | this.getEquipmentTotal() |
| | | }, |
| | | |
| | | handleShow(record) { |
| | | this.model = Object.assign({}, record); |
| | | this.workPlanId = record.workPlanId; |
| | | this.visible = true; |
| | | }, |
| | | getEquipmentTotal() { |
| | | var params = this.queryParam;//æ¥è¯¢æ¡ä»¶ |
| | | getAction(this.url.getEquipmentTotalByOrderId, params).then((res) => { |
| | | if (res.success) { |
| | | this.total = res.result.total |
| | | this.model.equipmentNum = res.result.records[0].equipmentNum |
| | | this.model.equipmentName = res.result.records[0].equipmentName |
| | | this.model.equipmentModel = res.result.records[0].equipmentModel |
| | | this.model.equipmentId = res.result.records[0].equipmentId |
| | | this.queryParam.equipmentId = res.result.records[0].equipmentId |
| | | this.loadData1(1) |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | |
| | | }) |
| | | }, |
| | | loadData1(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | this.maintenanceStandardId = res.result.records[i].maintenanceStandardId; |
| | | let r = res.result.records[i].sketchPhoto; |
| | | r.src = this.getSrc(res.result.records[i].sketchPhoto); |
| | | } |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records || res.result; |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total; |
| | | } else { |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | modalFormOk() { |
| | | this.getEquipmentTotal() |
| | | //æ¸
空å表éä¸ |
| | | this.onClearSelected() |
| | | }, |
| | | loadData() { |
| | | // this.getEquipmentTotal() |
| | | }, |
| | | getBackground() { |
| | | return "background-color:rgba(127, 127, 127,0.08)"; |
| | | }, |
| | | handleCancel() { |
| | | this.$emit('ok'); |
| | | this.alterFlag = new Date(); |
| | | this.close() |
| | | }, |
| | | close() { |
| | | this.visible = false; |
| | | }, |
| | | //æå |
| | | handleTS() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | let formData = Object.assign(this.model); |
| | | formData.specialtyInspectionOrderDetails = that.dataSource |
| | | requestPut(this.url.edit, formData).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("æåæå!"); |
| | | that.getEquipmentTotal() |
| | | that.$emit('ok'); |
| | | that.alterFlag = new Date(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | // that.close(); |
| | | }) |
| | | }, |
| | | //å¼å·¥ |
| | | handleSW() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'ä¿å
»å·¥åå¼å·¥', |
| | | content: 'æç¤ºï¼å¼å·¥åæ æ³æ¤åï¼è¯·è°¨æ
æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | requestPut(that.url.editStatus, { id: that.specialtyMaintenanceOrderId, status: '4' }).then((res) => { |
| | | if (res.success) { |
| | | that.model.status = '4' |
| | | that.$message.success("å·¥åå¼å·¥æåï¼") |
| | | that.getEquipmentTotal() |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | | } else { |
| | | that.$message.warning("å·¥åå¼å·¥å¤±è´¥ï¼") |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | // that.close(); |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | //æ¥å·¥ |
| | | handleReport() { |
| | | var actualMaterials = this.$refs.actualMaterialTabel.dataSource; |
| | | for (var i = 0; i < actualMaterials.length; i++) { |
| | | if (actualMaterials[i].isLock == 'no') { |
| | | this.$message.warn("å®é
ç¨æç¬¬" + (i + 1) + "è¡å°æªéæï¼è¯·éæååè¿è¡æ¥å·¥"); |
| | | return false; |
| | | } |
| | | } |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'ä¿å
»å·¥åæ¥å·¥', |
| | | content: 'æç¤ºï¼æ¥å·¥åç¹æ£å®å·¥ï¼è¯·è°¨æ
æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | requestPut(that.url.report, { id: that.specialtyMaintenanceOrderId, status: '5' }).then((res) => { |
| | | if (res.success) { |
| | | that.model.status = '5' |
| | | that.$message.success(res.message) |
| | | that.getEquipmentTotal() |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | | that.$emit('ok'); |
| | | that.alterFlag = new Date(); |
| | | that.close(); |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | // |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | //æ¤é |
| | | handleReset() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'å®å·¥æ¤é', |
| | | content: 'æç¤ºï¼å®å·¥æ¤éåå¯ç»§ç»æ¥å·¥æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | requestPut(that.url.revocation, { id: that.specialtyMaintenanceOrderId, status: '4' }).then((res) => { |
| | | if (res.success) { |
| | | that.model.status = '4' |
| | | that.$message.success(res.message) |
| | | that.getEquipmentTotal() |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | // that.close(); |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | //ä¿å |
| | | handleOk() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | let formData = Object.assign(this.model); |
| | | for (let i = 0; i < that.dataSource.length; i++) { |
| | | let o = this.dataSource[i] |
| | | if (o.inspectionProjectResult == null || o.inspectionProjectResult == '') { |
| | | that.$message.warning('请è¾å
¥ç¹æ£ç»æï¼') |
| | | that.confirmLoading = false; |
| | | return |
| | | } |
| | | if (o.treatmentMeasure == null || o.treatmentMeasure == '') { |
| | | that.$message.warning('è¯·éæ©å¼å¸¸å¤ç½®ï¼') |
| | | that.confirmLoading = false; |
| | | return |
| | | } |
| | | } |
| | | formData.specialtyInspectionOrderDetails = that.dataSource |
| | | requestPut(this.url.save, formData).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("ä¿åæå!"); |
| | | that.getEquipmentTotal() |
| | | that.$emit('ok'); |
| | | that.alterFlag = new Date(); |
| | | } else { |
| | | that.$message.warning("ä¿å失败!"); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | // that.close(); |
| | | }) |
| | | }, |
| | | |
| | | view(record) { |
| | | this.$refs.pdfview.showPdf(record.src); |
| | | }, |
| | | |
| | | handleDownload(record) { |
| | | downFile(this.url.download, { id: record.upload.id }).then((res) => { |
| | | if (!res) { |
| | | this.$message.warning('æä»¶ä¸è½½å¤±è´¥') |
| | | return |
| | | } else { |
| | | let fileName = record.upload.name; |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | window.navigator.msSaveBlob(new Blob([res]), fileName); |
| | | } else { |
| | | let url = window.URL.createObjectURL(new Blob([res])); |
| | | let link = document.createElement('a'); |
| | | link.style.display = 'none'; |
| | | link.href = url; |
| | | link.setAttribute('download', fileName); |
| | | document.body.appendChild(link); |
| | | link.click() |
| | | document.body.removeChild(link) //ä¸è½½å®æç§»é¤å
ç´ |
| | | window.URL.revokeObjectURL(url) //éæ¾æblob对象 |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getSrc(record) { |
| | | if (!record.path) { |
| | | return ''; |
| | | } |
| | | //æ¬å°ï¼local\Minioï¼minio\é¿éäºï¼alioss |
| | | if (record.uploadType == 'local') { |
| | | |
| | | let ssoLoginFlag = Vue.ls.get("ssoLoginFlag"); |
| | | let deployMode = Vue.ls.get("deployMode"); |
| | | |
| | | if (ssoLoginFlag && deployMode == "container") { |
| | | var baseProject = Vue.ls.get("baseProject"); |
| | | console.log("baseProject==>" + baseProject) |
| | | |
| | | var hostname = window.location.protocol + "//" + window.location.host; |
| | | var url = hostname + '/' + baseProject + '/sys/common/static'; |
| | | return getFileAccessHttpUrl(record.path + record.encodeName, url, window._CONFIG['hyperTextTransfer']) |
| | | } else { |
| | | //æ ¹æ®åå¸ç¶æä¿®æ¹https æ http |
| | | return getFileAccessHttpUrl(record.path + record.encodeName, this.url.urlDownload, window._CONFIG['hyperTextTransfer']) |
| | | } |
| | | |
| | | } else if (record.uploadType == 'alioss') { |
| | | |
| | | const OSS = require('ali-oss') |
| | | const client = new OSS({ |
| | | // region以æå·ä¸ºä¾ï¼oss-cn-hangzhouï¼ï¼å
¶ä»regionæå®é
æ
åµå¡«åã |
| | | region: window._CONFIG['region'], |
| | | // é¿éäºä¸»è´¦å·AccessKeyæ¥æææAPIçè®¿é®æéï¼é£é©å¾é«ã强ç建议æ¨å建并使ç¨RAMè´¦å·è¿è¡APIè®¿é®ææ¥å¸¸è¿ç»´ï¼è¯·ç»å½RAMæ§å¶å°å建RAMè´¦å·ã |
| | | accessKeyId: window._CONFIG['accessKeyId'], |
| | | accessKeySecret: window._CONFIG['accessKeySecret'], |
| | | bucket: window._CONFIG['bucket'], |
| | | }) |
| | | // object-key表示ä»OSSä¸è½½æä»¶æ¶éè¦æå®å
嫿件åç¼å¨å
ç宿´è·¯å¾ï¼ä¾å¦abc/efg/123.jpgã |
| | | return client.signatureUrl(record.path) |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | .hightColor { |
| | | height: 10%; |
| | | font-weight: bold; |
| | | font-size: 20px; |
| | | color: #1b1e1e; |
| | | } |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .hight { |
| | | color: #f5222d; |
| | | } |
| | | .red { |
| | | color: red; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="1250" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | @ok="handleOk" |
| | | cancelText="å
³é" |
| | | @cancel="handleCancel" |
| | | :confirmLoading="confirmLoading" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="ç»ä¸ç¼ç " |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'ç³»ç»èªå¨çæ'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="ä¿å
»æ¥æ" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-date |
| | | :disabled="disableSubmit" |
| | | v-decorator="['planStartTime', validatorRules.planStartTime ]" |
| | | placeholder="è¯·éæ©ç»´æ¤æ¶é´" |
| | | style="width: 100%" |
| | | :showTime="true" |
| | | dateFormat="YYYY-MM-DD HH:mm:ss" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="ä¸ä¸ä¿å
»æ¹æ¡" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input-search |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'è¯·éæ©é¢æµæ§ç»´æ¤æ¹æ¡'" |
| | | enter-button |
| | | @search="onPredictiveWorkPlanList()" |
| | | :read-only="true" |
| | | v-decorator="['planNum', validatorRules.planNum]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="派工æ¹å¼" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'è¯·éæ©æ´¾å·¥æ¹å¼'" |
| | | :triggerChange="true" |
| | | dictCode="assign_mode" |
| | | v-decorator="['assignMode', validatorRules.assignMode]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="责任çç»" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥è´£ä»»çç»'" |
| | | v-decorator="['teamId_dictText', validatorRules.teamId_dictText ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | hidden |
| | | :span="12" |
| | | > |
| | | <a-form-item |
| | | label="ä¸ä¸ç¹æ£æ¹æ¡Id" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'ä¸ä¸ç¹æ£æ¹æ¡Id'" |
| | | v-decorator="['workPlanId', validatorRules.workPlanId ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row |
| | | v-if="!isHidden" |
| | | :gutter="24" |
| | | > |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="责任人" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input-search |
| | | :disabled="disableSubmit" |
| | | placeholder="责任人" |
| | | enter-button |
| | | @search="onDutyUserList()" |
| | | :read-only="true" |
| | | v-decorator="['maintenanceUserId_dictText', validatorRules.maintenanceUserId_dictText]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row |
| | | hidden |
| | | :gutter="24" |
| | | > |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="责任çç»Id" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥è´£ä»»çç»Id'" |
| | | v-decorator="['teamId', validatorRules.teamId ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="责任人/ç»´æ¤äººId" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥è´£ä»»äºº'" |
| | | v-decorator="['maintenanceUserId', validatorRules.maintenanceUserId ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | |
| | | <template slot="footer"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel()" |
| | | > |
| | | å
³é |
| | | </a-button> |
| | | |
| | | <a-button |
| | | @click="handleOk()" |
| | | type="primary" |
| | | :loading="confirmLoading" |
| | | :disabled="disableSubmit || confirmLoading" |
| | | >ç¡®å®</a-button> |
| | | </template> |
| | | <predictive-work-plan-list |
| | | ref="PredictiveWorkPlanList" |
| | | @sendPlanRecord='sendPlanRecord' |
| | | ></predictive-work-plan-list> |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import JMultiSelectTag from '@/components/dict/JMultiSelectTag' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import PredictiveWorkPlanList from './PredictiveWorkPlanList.vue' |
| | | |
| | | export default { |
| | | name: "MaintenanceOrderModal", |
| | | components: { |
| | | JMultiSelectTag, |
| | | Tooltip, |
| | | PredictiveWorkPlanList |
| | | // PdfView, |
| | | // preview, |
| | | }, |
| | | data() { |
| | | return { |
| | | isHidden: true, |
| | | title: "æä½", |
| | | visible: false, |
| | | disableSubmit: false, |
| | | codeDisable: true, |
| | | model: {}, |
| | | inspectionCycles: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | num: { |
| | | rules: [ |
| | | // { required: true, message: '请è¾å
¥å·¥åç¼ç !' }, |
| | | ] |
| | | }, |
| | | planNum: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©ä¸ä¸ç¹æ£æ¹æ¡!' }, |
| | | ] |
| | | }, |
| | | planStartTime: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©ä¿å
»æ¥æ!' }, |
| | | ] |
| | | }, |
| | | assignMode: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©æ´¾å·¥æ¹å¼!' }, |
| | | ] |
| | | }, |
| | | maintenanceUserId_dictText: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©è´£ä»»äºº!' }, |
| | | ] |
| | | }, |
| | | teamId_dictText: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©è´£ä»»çç»!' }, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/eam/specialtyMaintenanceOrder/add", |
| | | edit: "/eam/specialtyMaintenanceOrder/edit", |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | add() { |
| | | this.edit({}) |
| | | }, |
| | | |
| | | edit(record) { |
| | | let that = this; |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | that.$nextTick(() => { |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'planNum', 'assignMode', 'assignMode_dictText', 'teamId', 'teamId_dictText', 'workPlanId', 'planStartTime')); |
| | | }); |
| | | if (record.id) { |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | } |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close(); |
| | | }, |
| | | onPredictiveWorkPlanList() { |
| | | this.$refs.PredictiveWorkPlanList.list(); |
| | | this.$refs.PredictiveWorkPlanList.title = "鿩颿µæ§ç»´æ¤æ¹æ¡"; |
| | | }, |
| | | sendPlanRecord(data) { |
| | | let record = data.record; |
| | | this.form.setFieldsValue({ assignMode: null, teamId_dictText: null, teamId: null, maintenanceUserName: null, maintenanceUserId: null }); |
| | | this.form.setFieldsValue({ workPlanId: record.id, planNum: record.num }); |
| | | this.form.setFieldsValue({ assignMode: record.assign_mode, teamId_dictText: record.teamName, teamId: record.teamId }); |
| | | if ("3" == record.assignMode) { |
| | | this.isHidden = false |
| | | } else { |
| | | this.isHidden = true |
| | | } |
| | | }, |
| | | |
| | | handleOk() { |
| | | const that = this; |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let formData = Object.assign(this.model, values); |
| | | let obj; |
| | | if (!this.model.id) { |
| | | obj = postAction(this.url.add, formData); |
| | | } else { |
| | | obj = requestPut(this.url.edit, formData, { id: this.model.id }); |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /deep/ .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="1250" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="æ¹æ¡ç¼ç "> |
| | | <a-input |
| | | placeholder="请è¾å
¥æ¹æ¡ç¼ç æ£ç´¢" |
| | | v-model="queryParam.num" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="人åç¼å·"> |
| | | <a-input |
| | | placeholder="请è¾å
¥äººåç¼å·æ£ç´¢" |
| | | v-model="queryParam.username" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="人ååç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥äººååç§°æ£ç´¢" |
| | | v-model="queryParam.realname" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> --> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left:8px;" |
| | | >éç½®</a-button> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div style="margin-top:8px;"> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | :customRow="clickThenCheck" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" |
| | | > |
| | | |
| | | </a-table> |
| | | </div> |
| | | </a-form> |
| | | </a-spin> |
| | | |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { postAction, getAction } from '@/api/manage' |
| | | import JDate from '@/components/jeecg/JDate' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis'//å¼å
¥è¿é¿è£åª |
| | | import store from '@/store' |
| | | |
| | | export default { |
| | | name: "PredictiveWorkPlanList", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JDate, |
| | | Tooltip, |
| | | JEllipsis, |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "颿µæ§ç»´æ¤æ¹æ¡", |
| | | visible: false, |
| | | model: {}, |
| | | dataSource: [], |
| | | disableSubmit: false, |
| | | type: "radio", |
| | | params: "-1", |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'çæ¬ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'statusName' |
| | | }, |
| | | { |
| | | title: 'çæ¬', |
| | | align: 'center', |
| | | dataIndex: 'planVersion' |
| | | }, |
| | | |
| | | { |
| | | title: 'æ¹æ¡ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'num' |
| | | }, |
| | | { |
| | | title: 'æ¹æ¡åç§°', |
| | | align: 'center', |
| | | dataIndex: 'name' |
| | | }, |
| | | { |
| | | title: 'çæ§ç±»å', |
| | | align: 'center', |
| | | dataIndex: 'monitorTypeName' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'deviceNum' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'deviceName' |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: 'center', |
| | | dataIndex: 'deviceModel' |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿æ¹å¼', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceMethodName' |
| | | }, |
| | | { |
| | | title: '派工æ¹å¼', |
| | | align: 'center', |
| | | dataIndex: 'assignModeName' |
| | | }, |
| | | { |
| | | title: '责任çç»', |
| | | align: 'center', |
| | | dataIndex: 'teamName' |
| | | }, |
| | | { |
| | | title: 'å建人', |
| | | align: 'center', |
| | | dataIndex: 'createBy' |
| | | }, |
| | | { |
| | | title: 'åå»ºæ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'createTime' |
| | | }, |
| | | ], |
| | | url: { |
| | | list: '/eam/predictiveworkplan/pagePredictiveWorkPlan', |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {}; |
| | | this.loadData(1) |
| | | }, |
| | | list() { |
| | | this.selectedRowKeys = []; |
| | | this.selectedRowRecord = []; |
| | | this.visible = true; |
| | | this.loadData(1); |
| | | }, |
| | | clickThenCheck(record) { |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | this.selectedRowRecord = record; |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectedRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectedRowRecord = selectedRows[0]; |
| | | }, |
| | | close() { |
| | | this.queryParam = {}; |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | this.queryParam.status = '1' |
| | | var params = this.getQueryParams() //æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true |
| | | getAction(this.url.list, params) |
| | | .then(res => { |
| | | if (res.success) { |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records || res.result |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | if (that.selectedRowKeys.length > 0) { |
| | | if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { |
| | | that.$emit('sendPlanRecord', { record: that.selectedRowRecord }); |
| | | that.close(); |
| | | } else { |
| | | that.$message.error("è¯·éæ©é¢æµæ§ç»´æ¤æ¹æ¡ï¼") |
| | | } |
| | | } else { |
| | | that.$message.error("è¯·éæ©é¢æµæ§ç»´æ¤æ¹æ¡ï¼") |
| | | } |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close(); |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | .anty-row-operator button { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .ant-btn-danger { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .ant-modal-cust-warp { |
| | | height: 100%; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | |
| | | .notshow { |
| | | display: none; |
| | | } |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .hight { |
| | | color: #f5222d; |
| | | } |
| | | .middle { |
| | | color: #fa8c16; |
| | | } |
| | | .low { |
| | | color: #52c41a; |
| | | } |
| | | .dataUnKnow { |
| | | color: #1890ff; |
| | | } |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | v-if="maintenanceStandardId !='' && isAdd " |
| | | >æ°å¢ |
| | | </a-button> |
| | | <div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction, deleteAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | |
| | | export default { |
| | | name: 'MaintenanceStandardPlanningMaterial', |
| | | components: { |
| | | Tooltip, |
| | | }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | maintenanceStandardId: { |
| | | type: String, |
| | | required: false |
| | | }, |
| | | isEdit: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isAdd: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isDel: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | watch: { |
| | | maintenanceStandardId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (this.maintenanceStandardId) { |
| | | this.queryParam.maintenanceStandardId = val |
| | | this.queryParam.delFlag = 0 |
| | | this.loadData(1) |
| | | }else{ |
| | | this.clearList(); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated:true, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 100, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'å±é©æºç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'num', |
| | | width:200 |
| | | |
| | | }, |
| | | |
| | | { |
| | | title: 'å±é©æº', |
| | | align: 'center', |
| | | dataIndex: 'name', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å±é©æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'description', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: '鲿§æªæ½', |
| | | align: 'center', |
| | | dataIndex: 'measure', |
| | | width:200 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: '/eam/maintenanceStandardSafetyRequirement/getMaintenanceStandardSafetyRequirementList', |
| | | delete: '/eam/maintenanceStandardSafetyRequirement/delete' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | handleAdd: function() { |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = 'å±é©é²æ§' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.maintenanceStandardId = this.maintenanceStandardId |
| | | }, |
| | | |
| | | handleDelete: function(id) { |
| | | if (!this.url.delete) { |
| | | this.$message.error('请设置url.delete屿§!') |
| | | return |
| | | } |
| | | var that = this |
| | | deleteAction(that.url.delete, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | that.alterFlag = new Date() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records || res.result |
| | | |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | v-if="maintenanceStandardId !='' && isAdd " |
| | | >æ°å¢</a-button> |
| | | <div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <span |
| | | slot="size" |
| | | slot-scope="text" |
| | | class="error" |
| | | > |
| | | {{sizeConvert(text)}} |
| | | </span> |
| | | <!-- <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> --> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | |
| | | <Tooltip |
| | | placement="top" |
| | | title="é¢è§å¾ç" |
| | | > |
| | | <img |
| | | v-if="record.upload.path && (record.upload.format.toLowerCase()=='jpg'||record.upload.format.toLowerCase()=='bmp'||record.upload.format.toLowerCase()=='png'||record.upload.format.toLowerCase()=='jpeg'||record.upload.format.toLowerCase()=='gif')" |
| | | width="30" |
| | | height="14" |
| | | border="1" |
| | | draggable="false" |
| | | preview="1" |
| | | :preview-text="''" |
| | | :src="record.upload.src" |
| | | /> |
| | | </Tooltip> |
| | | |
| | | <a |
| | | v-if="record.upload.path && record.upload.format.toLowerCase()=='pdf'" |
| | | href="javascript:;" |
| | | @click="view(record)" |
| | | > |
| | | é¢è§ |
| | | </a> |
| | | |
| | | <a-divider |
| | | v-if="record.upload.path && (record.upload.format.toLowerCase()=='jpg'||record.upload.format.toLowerCase()=='bmp'||record.upload.format.toLowerCase()=='png'||record.upload.format.toLowerCase()=='jpeg'||record.upload.format.toLowerCase()=='gif'||record.upload.format.toLowerCase()=='pdf')" |
| | | type="vertical" |
| | | /> |
| | | |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleDownload(record)" |
| | | >ä¸è½½</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | <pdf-view ref="pdfview"></pdf-view> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction, deleteAction, downFile } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | |
| | | import JInput from '@/components/jeecg/JInput' |
| | | import JEllipsis from "@/components/jeecg/JEllipsis"; |
| | | |
| | | import { preview } from 'vue-photo-preview' |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import Vue from 'vue' |
| | | import PdfView from '@views/common/PdfView' |
| | | import { getFileAccessHttpUrl } from '@/api/manage'; |
| | | import store from '@/store/' |
| | | |
| | | export default { |
| | | name: "MaintenanceStandardWorkInstruction", |
| | | components: { |
| | | Tooltip, |
| | | JInput, |
| | | JEllipsis, |
| | | PdfView, |
| | | preview, |
| | | }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | maintenanceStandardId: { |
| | | type: String, |
| | | required: false |
| | | }, |
| | | isEdit: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isAdd: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isDel: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | watch: { |
| | | maintenanceStandardId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (this.maintenanceStandardId) { |
| | | this.queryParam.maintenanceStandardId = val |
| | | this.queryParam.delFlag = 0 |
| | | this.loadData(1) |
| | | }else{ |
| | | this.clearList(); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated:true, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 100, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'ææ¡£ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'num', |
| | | width:200 |
| | | }, |
| | | |
| | | { |
| | | title: 'ææ¡£åç§°', |
| | | align: 'center', |
| | | dataIndex: 'name', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'ææ¡£ç±»å', |
| | | align: 'center', |
| | | dataIndex: 'typeName', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'ææ¡£å¤§å°', |
| | | align: 'center', |
| | | dataIndex: 'size', |
| | | scopedSlots: { customRender: 'size' }, |
| | | width:200 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/maintenanceStandardWorkInstruction/getMaintenanceStandardWorkInstructionList", |
| | | delete: "/eam/maintenanceStandardWorkInstruction/delete", |
| | | urlDownload: window._CONFIG['staticDomainURL'], |
| | | download: '/sys/upload/downloadFile', |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | handleAdd: function () { |
| | | this.$refs.modalForm.add(); |
| | | this.$refs.modalForm.title = "ä½ä¸æå¯¼ä¹¦"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | this.$refs.modalForm.maintenanceStandardId = this.maintenanceStandardId |
| | | }, |
| | | |
| | | handleDelete: function (id) { |
| | | if (!this.url.delete) { |
| | | this.$message.error("请设置url.delete屿§!") |
| | | return |
| | | } |
| | | var that = this; |
| | | deleteAction(that.url.delete, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | that.alterFlag = new Date(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | let r = res.result.records[i].upload; |
| | | r.src = this.getSrc(res.result.records[i].upload); |
| | | } |
| | | this.dataSource = res.result.records || res.result; |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total; |
| | | } else { |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | handleDownload(record) { |
| | | downFile(this.url.download, { id: record.upload.id }).then((res) => { |
| | | if (!res) { |
| | | this.$message.warning('æä»¶ä¸è½½å¤±è´¥') |
| | | return |
| | | } else { |
| | | let fileName = record.name; |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | window.navigator.msSaveBlob(new Blob([res]), fileName); |
| | | } else { |
| | | let url = window.URL.createObjectURL(new Blob([res])); |
| | | let link = document.createElement('a'); |
| | | link.style.display = 'none'; |
| | | link.href = url; |
| | | link.setAttribute('download', fileName); |
| | | document.body.appendChild(link); |
| | | link.click() |
| | | document.body.removeChild(link) //ä¸è½½å®æç§»é¤å
ç´ |
| | | window.URL.revokeObjectURL(url) //éæ¾æblob对象 |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //æ¼è£
src |
| | | getSrc(record) { |
| | | |
| | | if (!record.path) { |
| | | return ''; |
| | | } |
| | | //æ¬å°ï¼local\Minioï¼minio\é¿éäºï¼alioss |
| | | if (record.uploadType == 'local') { |
| | | |
| | | let ssoLoginFlag = Vue.ls.get("ssoLoginFlag"); |
| | | let deployMode = Vue.ls.get("deployMode"); |
| | | |
| | | if (ssoLoginFlag && deployMode == "container") { |
| | | var baseProject = Vue.ls.get("baseProject"); |
| | | console.log("baseProject==>" + baseProject) |
| | | |
| | | var hostname = window.location.protocol + "//" + window.location.host; |
| | | var url = hostname + '/' + baseProject + '/sys/common/static'; |
| | | return getFileAccessHttpUrl(record.path + record.encodeName, url, window._CONFIG['hyperTextTransfer']) |
| | | } else { |
| | | //æ ¹æ®åå¸ç¶æä¿®æ¹https æ http |
| | | return getFileAccessHttpUrl(record.path + record.encodeName, this.url.urlDownload, window._CONFIG['hyperTextTransfer']) |
| | | } |
| | | |
| | | } else if (record.uploadType == 'alioss') { |
| | | |
| | | const OSS = require('ali-oss') |
| | | const client = new OSS({ |
| | | // region以æå·ä¸ºä¾ï¼oss-cn-hangzhouï¼ï¼å
¶ä»regionæå®é
æ
åµå¡«åã |
| | | region: window._CONFIG['region'], |
| | | // é¿éäºä¸»è´¦å·AccessKeyæ¥æææAPIçè®¿é®æéï¼é£é©å¾é«ã强ç建议æ¨å建并使ç¨RAMè´¦å·è¿è¡APIè®¿é®ææ¥å¸¸è¿ç»´ï¼è¯·ç»å½RAMæ§å¶å°å建RAMè´¦å·ã |
| | | accessKeyId: window._CONFIG['accessKeyId'], |
| | | accessKeySecret: window._CONFIG['accessKeySecret'], |
| | | bucket: window._CONFIG['bucket'], |
| | | }) |
| | | // object-key表示ä»OSSä¸è½½æä»¶æ¶éè¦æå®å
嫿件åç¼å¨å
ç宿´è·¯å¾ï¼ä¾å¦abc/efg/123.jpgã |
| | | return client.signatureUrl(record.path) |
| | | } |
| | | }, |
| | | |
| | | |
| | | sizeConvert(limit) { |
| | | var size = ""; |
| | | if (limit < 0.1 * 1024) { |
| | | size = parseFloat(limit).toFixed(2) + "B";//å°äº0.1KBï¼å转åæB |
| | | } else if (limit < 0.1 * 1024 * 1024) { |
| | | size = (parseFloat(limit) / 1024).toFixed(2) + "KB";//å°äº0.1MBï¼å转åæKB |
| | | } else if (limit < 0.1 * 1024 * 1024 * 1024) { |
| | | size = (parseFloat(limit) / (1024 * 1024)).toFixed(2) + "MB";//å°äº0.1GBï¼å转åæMB |
| | | } else { |
| | | size = (parseFloat(limit) / (1024 * 1024 * 1024)).toFixed(2) + "GB";//å
¶ä»è½¬åæGB |
| | | } |
| | | var sizeStr = size + "";//转æå符串 |
| | | var index = sizeStr.indexOf(".");//è·åå°æ°ç¹å¤çç´¢å¼ |
| | | var dou = sizeStr.substr(index + 1, 2);//è·åå°æ°ç¹å两ä½çå¼ |
| | | if (dou == "00") {//夿å䏤使¯å¦ä¸º00ï¼å¦ææ¯åå é¤00 |
| | | return sizeStr.substring(0, index) + sizeStr.substr(index + 3, 2); |
| | | } |
| | | return size; |
| | | }, |
| | | |
| | | view(record) { |
| | | this.$refs.pdfview.showPdf(record.upload.src); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { deleteAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | |
| | | export default { |
| | | name: 'PredictiveParameters', |
| | | components: { |
| | | Tooltip, |
| | | }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | planId: { |
| | | type: String, |
| | | default:'', |
| | | required: false |
| | | }, |
| | | equipmentId: { |
| | | type: String, |
| | | required: false |
| | | }, |
| | | isAdd: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isDel: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: { |
| | | planId:{ |
| | | immediate:true, |
| | | handler(val){ |
| | | if (this.planId) { |
| | | this.queryParam.planId = val |
| | | this.queryParam.delFlag = 0 |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated: true, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æ¡ä»¶', |
| | | dataIndex: 'conditionalRelationName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: '忰代ç ', |
| | | dataIndex: 'parameterCode', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'åæ°åç§°', |
| | | dataIndex: 'parameterName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'åæ°åä½', |
| | | dataIndex: 'unitName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'åæ°ä¸é', |
| | | dataIndex: 'upperLimitValue', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'åæ°ä¸é', |
| | | dataIndex: 'lowerLimitValue', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: '/eam/predictiveworkplanparameter/pagePredictiveWorkPlanParameter', |
| | | delete: '/eam/predictiveworkplanparameter/delete' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | handleAdd: function() { |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = 'åæ°æ§å¶' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.planId = this.planId |
| | | this.$refs.modalForm.equipmentId = this.equipmentId |
| | | }, |
| | | |
| | | handleDelete: function(id) { |
| | | if (!this.url.delete) { |
| | | this.$message.error('请设置url.delete屿§!') |
| | | return |
| | | } |
| | | var that = this |
| | | deleteAction(that.url.delete, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | that.alterFlag = new Date() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction, deleteAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | |
| | | export default { |
| | | name: 'PredictiveSpareParts', |
| | | components: { |
| | | Tooltip, |
| | | }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | planId: { |
| | | type: String, |
| | | required: false |
| | | }, |
| | | isEdit: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isAdd: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isDel: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: { |
| | | planId:{ |
| | | immediate:true, |
| | | handler(val){ |
| | | if (this.planId) { |
| | | this.queryParam.planId = val |
| | | this.queryParam.delFlag = 0 |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated: true, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶ç¼å·', |
| | | dataIndex: 'sparePartNum', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åç§°', |
| | | dataIndex: 'sparePartName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶è§æ ¼', |
| | | dataIndex: 'sparePartSpecification', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åå·', |
| | | dataIndex: 'sparePartModel', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | dataIndex: 'mainUnitName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'é
奿°é', |
| | | dataIndex: 'supportingQuantity', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'é¢å®å¯¿å½/å°æ¶', |
| | | dataIndex: 'ratedLife', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å¯¿å½æ§å¶é', |
| | | dataIndex: 'lifeWarning', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: '/eam/predictiveworkplansparepart/pagePredictiveWorkPlanSparePart', |
| | | delete: '/eam/predictiveworkplansparepart/delete' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | handleAdd: function() { |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = '计åç¨æ' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.planId = this.planId |
| | | }, |
| | | |
| | | handleDelete: function(id) { |
| | | if (!this.url.delete) { |
| | | this.$message.error('请设置url.delete屿§!') |
| | | return |
| | | } |
| | | var that = this |
| | | deleteAction(that.url.delete, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | that.alterFlag = new Date() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { deleteAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | |
| | | export default { |
| | | name: 'PredictiveWarn', |
| | | components: { |
| | | Tooltip, |
| | | }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | planId: { |
| | | type: String, |
| | | required: false |
| | | }, |
| | | equipmentId: { |
| | | type: String, |
| | | required: false |
| | | }, |
| | | isAdd: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isDel: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: { |
| | | planId:{ |
| | | immediate:true, |
| | | handler(val){ |
| | | if (this.planId) { |
| | | this.queryParam.planId = val |
| | | this.queryParam.delFlag = 0 |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated: true, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æ¡ä»¶', |
| | | dataIndex: 'conditionalRelationName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'æ¥è¦ä»£ç ', |
| | | dataIndex: 'warnCode', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'æ¥è¦åç§°', |
| | | dataIndex: 'warnName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'æ¥è¦å¨æ', |
| | | dataIndex: 'warnCycle', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'æ¥è¦å¨æåä½', |
| | | dataIndex: 'cycleUnitName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'æ¥è¦æ¬¡æ°', |
| | | dataIndex: 'times', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: '/eam/predictiveworkplanwarn/pagePredictiveWorkPlanWarn', |
| | | delete: '/eam/predictiveworkplanwarn/delete' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | handleAdd: function() { |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = 'æ¥è¦æ§å¶' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.planId = this.planId |
| | | this.$refs.modalForm.equipmentId = this.equipmentId |
| | | }, |
| | | |
| | | handleDelete: function(id) { |
| | | if (!this.url.delete) { |
| | | this.$message.error('请设置url.delete屿§!') |
| | | return |
| | | } |
| | | var that = this |
| | | deleteAction(that.url.delete, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | that.alterFlag = new Date() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="1250" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="çç»åç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥çç»åç§°æ£ç´¢" |
| | | v-model="queryParam.num" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="人åç¼å·"> |
| | | <a-input |
| | | placeholder="请è¾å
¥äººåç¼å·æ£ç´¢" |
| | | v-model="queryParam.username" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="人ååç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥äººååç§°æ£ç´¢" |
| | | v-model="queryParam.realname" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left:8px;" |
| | | >éç½®</a-button> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div style="margin-top:8px;"> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | :customRow="clickThenCheck" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" |
| | | > |
| | | |
| | | </a-table> |
| | | </div> |
| | | </a-form> |
| | | </a-spin> |
| | | |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { postAction, getAction } from '@/api/manage' |
| | | import JDate from '@/components/jeecg/JDate' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis'//å¼å
¥è¿é¿è£åª |
| | | import store from '@/store' |
| | | |
| | | export default { |
| | | name: "EquipmentList", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JDate, |
| | | Tooltip, |
| | | JEllipsis, |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "人åä¿¡æ¯", |
| | | visible: false, |
| | | model: {}, |
| | | dataSource: [], |
| | | disableSubmit: false, |
| | | type: "radio", |
| | | params: "-1", |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'çç»ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'teamName', |
| | | }, |
| | | { |
| | | title: '人åç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'username', |
| | | }, |
| | | { |
| | | title: '人ååç§°', |
| | | align: 'center', |
| | | dataIndex: 'realname', |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/inspectionOrder/findUserList", |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = { teamId: this.params }; |
| | | this.loadData(1) |
| | | }, |
| | | list(params) { |
| | | this.selectedRowKeys = []; |
| | | this.selectedRowRecord = []; |
| | | this.visible = true; |
| | | if (params == null || params == "") { |
| | | this.queryParam.teamId = "-1" |
| | | } else { |
| | | this.queryParam.teamId = params |
| | | } |
| | | this.loadData(1); |
| | | }, |
| | | clickThenCheck(record) { |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | this.selectedRowRecord = record; |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectedRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectedRowRecord = selectedRows[0]; |
| | | }, |
| | | close() { |
| | | this.queryParam = {}; |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | if (that.selectedRowKeys.length > 0) { |
| | | if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { |
| | | that.$emit('sendUserRecord', { record: that.selectedRowRecord }); |
| | | that.close(); |
| | | } else { |
| | | that.$message.error("è¯·éæ©äººåï¼") |
| | | } |
| | | } else { |
| | | that.$message.error("è¯·éæ©äººåï¼") |
| | | } |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close(); |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | .anty-row-operator button { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .ant-btn-danger { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .ant-modal-cust-warp { |
| | | height: 100%; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | |
| | | /deep/ .notshow { |
| | | display: none; |
| | | } |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .hight { |
| | | color: #f5222d; |
| | | } |
| | | .middle { |
| | | color: #fa8c16; |
| | | } |
| | | .low { |
| | | color: #52c41a; |
| | | } |
| | | .dataUnKnow { |
| | | color: #1890ff; |
| | | } |
| | | |
| | | /deep/ .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="1000" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="ç©æç¼ç "> |
| | | <j-input |
| | | placeholder="请è¾å
¥ç©æç¼ç " |
| | | v-model="queryParam.num" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="ç©æåç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ç©æåç§°" |
| | | v-model="queryParam.name" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left:8px;" |
| | | >éç½®</a-button> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div style="margin-top:8px;"> |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}" |
| | | @change="handleTableChange" |
| | | :customRow="clickThenCheck" |
| | | > |
| | | </a-table> |
| | | </div> |
| | | </a-form> |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | export default { |
| | | name: "MaterialSelectTable", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JInput |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | model: {}, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç©æç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'num', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'ç©æåç§°', |
| | | align: 'center', |
| | | dataIndex: 'name', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'ç©æè§æ ¼', |
| | | align: 'center', |
| | | dataIndex: 'specification', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'ç©æåå·', |
| | | align: 'center', |
| | | dataIndex: 'model', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | align: 'center', |
| | | dataIndex: 'unitId_dictText', |
| | | sorter: true, |
| | | }, |
| | | |
| | | ], |
| | | url: { |
| | | list: "/base/material/list", |
| | | }, |
| | | index: '', |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | }, |
| | | |
| | | list(index) { |
| | | this.visible = true; |
| | | this.index = index; |
| | | this.loadData(1); |
| | | }, |
| | | |
| | | clickThenCheck(record) { |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | this.selectedRowRecord = record; |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | |
| | | onSelectChange(selectedRowKeys, selectedRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectedRowRecord = selectedRows[0]; |
| | | }, |
| | | |
| | | close() { |
| | | this.queryParam = {}; |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.selectedRowKeys = []; |
| | | }, |
| | | |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | if (that.selectedRowKeys.length > 0) { |
| | | if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { |
| | | that.$emit('sendMaterialRecord', { index: this.index, record: that.selectedRowRecord }); |
| | | that.close(); |
| | | } else { |
| | | that.$message.error("è¯·éæ©ç©æï¼") |
| | | } |
| | | } else { |
| | | that.$message.error("è¯·éæ©ç©æï¼") |
| | | } |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close(); |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | @import '~@assets/less/common.less'; |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .fontweightfrozen { |
| | | font-weight: bold; |
| | | color: #c9c9c9; |
| | | } |
| | | .success { |
| | | color: green; |
| | | } |
| | | .error { |
| | | color: red; |
| | | } |
| | | </style> |