| | |
| | | > |
| | | <a-form-item label="çæ¬ç¶æ"> |
| | | <a-radio-group |
| | | v-model="queryParam.versionStatus" |
| | | v-model="queryParam.status" |
| | | @change="onChange" |
| | | default-value="2" |
| | | > |
| | |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | import { requestPut } from '@/api/manage' |
| | | import { requestPut,deleteAction } from '@/api/manage' |
| | | |
| | | import DailyMaintenanceStandardDetail from './modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail' |
| | | //计åç¨æ |
| | |
| | | isDel: false, |
| | | url: { |
| | | list: '/eam/predictiveworkplan/pagePredictiveWorkPlan', |
| | | delete: '/eam/maintenanceStandard/delete', |
| | | deleteBatch: '/eam/maintenanceStandard/deleteBatch', |
| | | versionTakeEffect: '/eam/maintenanceStandard/versionTakeEffect' |
| | | delete: '/eam/predictiveworkplan/delete', |
| | | versionTakeEffect: '/eam/predictiveworkplan/versionTakeEffect' |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.planId = '' |
| | | this.equipmentId = '' |
| | | this.isAdd = false |
| | | }, |
| | | 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.onClearSelected() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys |
| | |
| | | //åç |
| | | handleRevise: function(record) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = 'ä¿å
»æ åçæ¬å级' |
| | | this.$refs.modalForm.title = 'å级' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.isRevise = true |
| | | }, |
| | |
| | | requestPut(that.url.versionTakeEffect, { |
| | | id: record.id, |
| | | num: record.num, |
| | | versionStatus: '2' |
| | | status: '2' |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success('çæ¬çææåï¼') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="设å¤ç¼å·"> |
| | | <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" |
| | | 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", |
| | | /* å页忰 */ |
| | | 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: 'num', |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'name', |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: "center", |
| | | dataIndex: 'model' |
| | | }, |
| | | { |
| | | title: '设å¤è§æ ¼', |
| | | align: "center", |
| | | dataIndex: 'specification' |
| | | }, |
| | | { |
| | | title: '设å¤ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'equipmentStatus_dictText' |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/equipment/pageEquipment", |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = { equipmentStatus: '1' }; |
| | | this.loadData(1) |
| | | }, |
| | | list(params) { |
| | | this.selectedRowKeys = []; |
| | | this.selectedRowRecord = []; |
| | | this.visible = true; |
| | | if (params == null || params == "") { |
| | | this.queryParam.useId = "" |
| | | } else { |
| | | this.queryParam.useId = params |
| | | } |
| | | this.queryParam.equipmentStatus = '1' |
| | | 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('sendEquipmentRecord', { 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> |
| | |
| | | @sendEquipmentRecord='sendEquipmentRecord' |
| | | ></equipment-list> |
| | | |
| | | <!-- <j-select-maintenance-standard-modal ref="maintenanceStandardModalForm"></j-select-maintenance-standard-modal>--> |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, postAction, requestPut, deleteAction } from '@/api/manage' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import JMultiSelectTag from '@/components/dict/JMultiSelectTag' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | // import JSelectMaintenanceStandardModal from './JSelectMaintenanceStandardModal' |
| | | |
| | | 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 EquipmentList from '.././dailyInspectionStandard/EquipmentList' |
| | | import EquipmentList from '@/views/eam/common/EquipmentList' |
| | | |
| | | export default { |
| | | name: 'MaintenanceStandardModal', |
| | | components: { |
| | | JMultiSelectTag, |
| | | Tooltip, |
| | | // JSelectMaintenanceStandardModal, |
| | | // UploadModel, |
| | | PdfView, |
| | | preview, |
| | | EquipmentList |
| | | }, |
| | | data() { |
| | | return {title: 'æä½', |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | visible4Confirm: false, |
| | | disableSubmit: false, |
| | |
| | | } |
| | | }, |
| | | url: { |
| | | list: '/eam/maintenanceStandardDetail/getMaintenanceStandardDetailListByIds', |
| | | add: '/eam/predictiveworkplan/add', |
| | | edit: '/eam/predictiveworkplan/edit', |
| | | addDetail: '/eam/maintenanceStandardDetail/add', |
| | | revise: '/eam/maintenanceStandard/revise', |
| | | getReviseVersion: '/eam/maintenanceStandard/getReviseVersion', |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions' |
| | | revise: '/eam/predictiveworkplan/revise', |
| | | getReviseVersion: '/eam/predictiveworkplan/getReviseVersion' |
| | | }, |
| | | |
| | | dataSource: [], |
| | |
| | | methods: { |
| | | |
| | | add() { |
| | | this.edit({ maintenanceStandardDetaillist: [] }) |
| | | this.edit() |
| | | }, |
| | | |
| | | edit(record) { |
| | | let that = this |
| | | this.initOptions() |
| | | this.dataSource = [] |
| | | this.form.resetFields() |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | if (record.maintenanceStandardDetaillist != undefined) { |
| | | const temp = [...record.maintenanceStandardDetaillist] |
| | | // for (let i = 0; i < temp.length; i++) { |
| | | // let r = temp[i].upload; |
| | | // r.src = this.getSrc(temp[i].upload); |
| | | // } |
| | | that.dataSource = temp |
| | | } |
| | | that.$nextTick(() => { |
| | | that.model.equipmentId = record.id |
| | | that.model.equipmentId = record.equipmentId |
| | | that.model.teamId = record.teamId |
| | | if (!record.status) { |
| | | that.model.status = 1 |
| | | } |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'equipmentName', 'useDepartName', 'teamName', 'assignMode', 'planVersion', 'remark')) |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'name', 'monitorType', 'maintenanceMethod', 'assignMode', 'teamName', 'planVersion')) |
| | | that.form.setFieldsValue({ |
| | | equipmentName: record.deviceNum + '/' + record.deviceName + '/' + record.deviceModel, |
| | | historyVersion: record.planVersion |
| | | }) |
| | | }) |
| | | if (record.id) { |
| | | this.codeDisable = true |
| | |
| | | if (that.isRevise) { |
| | | requestPut(that.url.getReviseVersion, record).then((res) => { |
| | | if (res.success) { |
| | | that.form.setFieldsValue({ planVersion: res.result, historyVersion: record.version }) |
| | | that.form.setFieldsValue({ planVersion: res.result }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | that.form.setFieldsValue({ 'planVersion': '1.0' }) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | initOptions() { |
| | | getAction(this.url.loadOptions).then(res => { |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | onEquipmentList() { |
| | |
| | | let formData = Object.assign(this.model, values) |
| | | let obj |
| | | if (!this.model.id) { |
| | | formData.planVersion = '1' |
| | | formData.status = '1' |
| | | obj = postAction(this.url.add, formData) |
| | | } else { |
| | | if (this.isRevise) { |
| | | formData.planVersion = '1' |
| | | formData.status = '1' |
| | | obj = postAction(this.url.revise, formData) |
| | | } else { |
| | | obj = requestPut(this.url.edit, formData, { id: this.model.id }) |