From b4edf6ce42debe4edcc85414d9f6c0d41f480587 Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期五, 20 六月 2025 11:36:06 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue | 223 - src/views/dnc/base/modules/TerminalIndex/ProcedureCall.vue | 2 src/assets/orange.png | 0 src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue | 36 src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue | 226 + src/views/mdc/base/MdcWorkshopSignage.vue | 219 - src/views/dnc/base/modules/DeviceCustomTypeManagement/DeviceCustomTypeManagementModal.vue | 4 src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue | 6 src/views/tms/InboundOrderList.vue | 26 src/views/mdc/base/modules/EquipmentDayAvail/EquipmentDayAvailMain.vue | 79 src/views/mdc/base/modules/DeviceLog/LogInfo.vue | 290 +- src/views/mdc/base/modules/DeviceLog/WorkHistoryModel.vue | 321 +- src/views/mdc/base/modules/DeviceLog/AlarmLogList.vue | 63 src/views/mdc/base/EquipmentList.vue | 1 src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue | 2 src/views/dnc/base/modules/ProductStructure/Document/NcDocumentSearchNcModal.vue | 2 src/views/mdc/base/GroupUtilizationRateChart.vue | 4 src/views/mdc/base/DeviceLog.vue | 2 src/views/mdc/base/DeviceBaseInfo.vue | 178 - src/views/tms/modules/inbound/InboundListRight.vue | 14 src/views/tms/modules/inbound/InboundModel.vue | 41 src/views/mdc/base/AlarmManager.vue | 88 src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue | 2453 +++++++++++----------- src/views/mdc/base/modules/DeviceParamThresholdManagement/ParamThresholdModal.vue | 3 src/views/mdc/base/modules/DeviceLog/LogList.vue | 78 src/views/system/modules/SelectDeviceDrawer.vue | 41 src/views/mdc/base/modules/DeviceBaseInfo/EquipmentList.vue | 92 src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue | 205 - src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue | 2 src/views/mdc/base/modules/DeviceBaseInfo/EquipmentLayout.vue | 147 src/views/mdc/base/modules/EquipmentList/UserModal.vue | 228 - src/views/eam/maintenance/EamInspectionOrderList.vue | 720 +++-- yarn.lock | 10 src/views/tms/modules/toolLedger/ToolLedgerListRight.vue | 3 src/views/mdc/base/modules/DeviceLog/FaultLogList.vue | 125 + package.json | 2 src/views/mdc/base/modules/DeviceLog/WorkChartModel.vue | 175 - src/views/mdc/base/modules/EquipmentAvailCompare/EquipmentAvailCompareMain.vue | 75 src/views/mdc/base/MdcEquipmentTypeList.vue | 29 src/views/mdc/base/modules/DeviceLog/WorkLogList.vue | 136 src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue | 220 + 41 files changed, 3,006 insertions(+), 3,565 deletions(-) diff --git a/package.json b/package.json index 760f186..557f883 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,10 @@ "lodash.pick": "^4.4.0", "md5": "^2.2.1", "nprogress": "^0.2.0", + "print-js": "^1.6.0", "qiankun": "^2.5.1", "qrcode.vue": "^1.7.0", + "qrcodejs2": "0.0.2", "tinymce": "5.4.1", "viser-vue": "^2.4.8", "vue": "^2.6.10", diff --git a/src/assets/orange.png b/src/assets/orange.png new file mode 100644 index 0000000..02b4076 --- /dev/null +++ b/src/assets/orange.png Binary files differ diff --git a/src/views/dnc/base/modules/DeviceCustomTypeManagement/DeviceCustomTypeManagementModal.vue b/src/views/dnc/base/modules/DeviceCustomTypeManagement/DeviceCustomTypeManagementModal.vue index 02fe64d..4a490b6 100644 --- a/src/views/dnc/base/modules/DeviceCustomTypeManagement/DeviceCustomTypeManagementModal.vue +++ b/src/views/dnc/base/modules/DeviceCustomTypeManagement/DeviceCustomTypeManagementModal.vue @@ -43,7 +43,7 @@ <a-col :span="24"> <a-form-model-item label="璁惧缁勭紪鍙�" :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="equipmentIds"> - <a-input-search v-model="model.equipmentIds" :disabled="!model.productionId" @search="deviceSearch" + <a-input-search v-model="model.equipmentIds" readOnly :disabled="!model.productionId" @search="deviceSearch" enter-button :placeholder='!model.productionId?"璇烽�夋嫨杞﹂棿":"璇烽�夋嫨璁惧缁勭紪鍙�"'/> </a-form-model-item> </a-col> @@ -98,7 +98,7 @@ ], equipmentIds: [ { - required: true, message: '璇烽�夋嫨璁惧缂栧彿!' + required: true, message: '璇烽�夋嫨璁惧缂栧彿!',trigger:'change' } ] }, diff --git a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentSearchNcModal.vue b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentSearchNcModal.vue index bc4c54c..19a6537 100644 --- a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentSearchNcModal.vue +++ b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentSearchNcModal.vue @@ -67,7 +67,7 @@ <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys,selectedRows:selectionRows, onChange: onSelectChange}" @change="handleTableChange" :customRow="customRow" - :scroll="{y:456}" :size="size" rowKey="docId"> + :scroll="{y:52*7}" :size="size" rowKey="docId"> <!-- 瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず--> <span slot="docName" slot-scope="text"> diff --git a/src/views/dnc/base/modules/TerminalIndex/ProcedureCall.vue b/src/views/dnc/base/modules/TerminalIndex/ProcedureCall.vue index a2f68d1..cf6d76b 100644 --- a/src/views/dnc/base/modules/TerminalIndex/ProcedureCall.vue +++ b/src/views/dnc/base/modules/TerminalIndex/ProcedureCall.vue @@ -20,7 +20,7 @@ <a-row> <a-col :span="24"> <a-form-model-item label="鍛煎彨鍘熷洜" prop="callReason"> - <a-input placeholder="璇疯緭鍏ュ懠鍙師鍥�" v-model="model.callReason" allowClear/> + <a-textarea placeholder="璇疯緭鍏ュ懠鍙師鍥�" v-model="model.callReason" allowClear/> </a-form-model-item> </a-col> </a-row> diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue index ecdc95a..775a14e 100644 --- a/src/views/eam/maintenance/EamInspectionOrderList.vue +++ b/src/views/eam/maintenance/EamInspectionOrderList.vue @@ -1,33 +1,91 @@ <template> <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper" v-if="isDisplayOperation"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <div + class="table-page-search-wrapper" + v-if="isDisplayOperation" + > + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="宸ュ崟鍙�"> - <a-input placeholder="璇疯緭鍏ュ伐鍗曞彿" v-model="queryParam.orderNum"></a-input> + <a-input + placeholder="璇疯緭鍏ュ伐鍗曞彿" + v-model="queryParam.orderNum" + ></a-input> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="璁惧缂栧彿"> - <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="queryParam.equipmentId"></lx-search-equipment-select> + <lx-search-equipment-select + placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" + v-model="queryParam.equipmentId" + ></lx-search-equipment-select> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="璁″垝鐐规鏃ユ湡"> - <a-range-picker v-model="queryParam.inspectionDateRange" @change="onInspectionDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" /> + <a-range-picker + v-model="queryParam.inspectionDateRange" + @change="onInspectionDateChange" + format="YYYY-MM-DD" + value-format="YYYY-MM-DD" + /> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="鐐规鐘舵��"> - <j-dict-select-tag placeholder="璇烽�夋嫨鐐规鐘舵��" dict-code="inspection_status" v-model="queryParam.inspectionStatus" /> + <j-dict-select-tag + placeholder="璇烽�夋嫨鐐规鐘舵��" + dict-code="inspection_status" + v-model="queryParam.inspectionStatus" + /> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > + <span + style="float: left;overflow: hidden;" + class="table-page-search-submitButtons" + > + <a-button + type="primary" + @click="searchQuery" + icon="search" + >鏌ヨ</a-button> + <a-button + type="info" + @click="searchReset" + icon="reload" + style="margin-left: 8px" + >閲嶇疆</a-button> </span> </a-col> </a-row> @@ -36,31 +94,54 @@ <!-- 鏌ヨ鍖哄煙-END --> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator" v-if="isDisplayOperation"> - <a-button @click="handleAdd" type="primary" icon="plus" v-if="isShowAuth('eam:inspection:add')">鏂板</a-button> + <div + class="table-operator" + v-if="isDisplayOperation" + > + <a-button + @click="handleAdd" + type="primary" + icon="plus" + v-if="isShowAuth('eam:inspection:add')" + >鏂板</a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> - <a-menu-item key="1" v-if="isShowAuth('eam:inspection:abolish')" @click="batchZf('ABOLISH')"> - <a-icon type="snippets"/> + <a-menu-item + key="1" + v-if="isShowAuth('eam:inspection:abolish')" + @click="batchZf('ABOLISH')" + > + <a-icon type="snippets" /> 浣滃簾 </a-menu-item> - <a-menu-item key="2" v-if="isShowAuth('eam:inspection:collect')" @click="batchLq('UNDER_INSPECTION')"> - <a-icon type="form"/> + <a-menu-item + key="2" + v-if="isShowAuth('eam:inspection:collect')" + @click="batchLq('UNDER_INSPECTION')" + > + <a-icon type="form" /> 棰嗗彇 </a-menu-item> </a-menu> <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> + <a-icon type="down" /> </a-button> </a-dropdown> </div> <!-- table鍖哄煙-begin --> <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> + <div + class="ant-alert ant-alert-info" + style="margin-bottom: 16px;" + v-if="isDisplayOperation" + > <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> + <a + style="margin-left: 24px" + @click="onClearSelected" + >娓呯┖</a> </div> <a-table @@ -75,330 +156,369 @@ :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" class="j-table-force-nowrap" - @change="handleTableChange"> + @change="handleTableChange" + > - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)" v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" >缂栬緫</a> + <span + slot="action" + slot-scope="text, record" + > + <a + @click="handleEdit(record)" + v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" + >缂栬緫</a> - <a-divider type="vertical" v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" /> + <a-divider + type="vertical" + v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" + /> - <a-popconfirm title="纭畾棰嗗彇鍚�?" v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" - @confirm="() => handleInspection(record.id)"> - <a>棰嗗彇</a> + <a-popconfirm + title="纭畾棰嗗彇鍚�?" + v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" + @confirm="() => handleInspection(record.id)" + > + <a>棰嗗彇</a> </a-popconfirm> - <a-divider type="vertical" v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" /> + <a-divider + type="vertical" + v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" + /> <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> <a-menu slot="overlay"> <a-menu-item> <a @click="handleDetail(record)">璇︽儏</a> </a-menu-item> <a-menu-item v-if="isShowAuth('eam:inspection:abolish') && record.inspectionStatus === 'WAIT_INSPECTION'"> - <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleOrReceive(record.id)"> + <a-popconfirm + title="纭畾浣滃簾鍚�?" + @confirm="() => handleOrReceive(record.id)" + > <a>浣滃簾</a> </a-popconfirm> </a-menu-item> </a-menu> </a-dropdown> + + <a-divider + v-if="record.inspectionStatus === 'COMPLETE'" + type="vertical" + /> + <a + v-if="record.inspectionStatus === 'COMPLETE'" + @click="handlePrint(record)" + >鎵撳嵃</a> </span> </a-table> </div> - <eam-inspection-order-modal ref="modalForm" @ok="modalFormOk"></eam-inspection-order-modal> + <eam-inspection-order-modal + ref="modalForm" + @ok="modalFormOk" + ></eam-inspection-order-modal> - <inspection-order-handle ref="modalFormXq" :selectShenpiData="selectInspectionOrderXqData"/> + <inspection-order-handle + ref="modalFormXq" + :selectShenpiData="selectInspectionOrderXqData" + /> </a-card> </template> <script> - import '@/assets/less/TableExpand.less' - import { mixinDevice } from '@/utils/mixin' - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import EamInspectionOrderModal from './modules/EamInspectionOrderModal' - import { deleteAction, getAction } from '@api/manage' - import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle' - import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' +import '@/assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import EamInspectionOrderModal from './modules/EamInspectionOrderModal' +import { deleteAction, getAction } from '@api/manage' +import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle' +import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' - export default { - name: 'EamInspectionOrderList', - mixins: [JeecgListMixin, mixinDevice], - components: { - InspectionOrderHandle, - EamInspectionOrderModal, - LxSearchEquipmentSelect, - }, - props: { - isDisplayOperation: { - type: Boolean, - default: true - } - }, - data() { - return { - description: 'eam_inspection_order绠$悊椤甸潰', - disableMixinCreated: true, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 60, - align: 'center', - customRender: function(t, r, index) { - return parseInt(index) + 1 - } - }, - { - title: '宸ュ崟鍙�', - align: 'center', - dataIndex: 'orderNum' - }, - { - title: '璁惧缂栧彿', - align: 'center', - dataIndex: 'equipmentCode' - }, - { - title: '璁惧鍚嶇О', - align: 'center', - dataIndex: 'equipmentName' - }, - { - title: '鏍囧噯鍚嶇О', - align: 'center', - dataIndex: 'standardId_dictText' - }, - { - title: '鐐规鏃ユ湡', - align: 'center', - dataIndex: 'inspectionDate', - customRender: function(text) { - return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) - } - }, - { - title: '鐐规杩囨湡鏃ユ湡', - align: 'center', - dataIndex: 'expirationTime', - customRender: function(text) { - return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) - } - }, - { - title: '鍒涘缓鏂瑰紡', - align: 'center', - dataIndex: 'creationMethod_dictText' - }, - { - title: '鐐规鐘舵��', - align: 'center', - dataIndex: 'inspectionStatus_dictText' - }, - { - title: '鐐规浜�', - align: 'center', - dataIndex: 'operator_dictText' - }, - { - title: '鐐规鏃堕棿', - align: 'center', - dataIndex: 'operateTime', - }, - { - title: '绠$悊鍛樼‘璁�', - align: 'center', - dataIndex: 'confirmUser_dictText' - }, - { - title: '纭鏃堕棿', - align: 'center', - dataIndex: 'confirmTime', - }, - { - title: '纭鎰忚', - align: 'center', - dataIndex: 'confirmComment', +export default { + name: 'EamInspectionOrderList', + mixins: [JeecgListMixin, mixinDevice], + components: { + InspectionOrderHandle, + EamInspectionOrderModal, + LxSearchEquipmentSelect, + }, + props: { + isDisplayOperation: { + type: Boolean, + default: true + } + }, + data() { + return { + description: 'eam_inspection_order绠$悊椤甸潰', + disableMixinCreated: true, + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function (t, r, index) { + return parseInt(index) + 1 } - ], - url: { - list: '/eam/eamInspectionOrder/list', - cancelInspectionOrder: '/eam/eamInspectionOrder/cancelInspectionOrder', - deleteBatch: '/eam/eamInspectionOrder/deleteBatch', - exportXlsUrl: '/eam/eamInspectionOrder/exportXls', - importExcelUrl: 'eam/eamInspectionOrder/importExcel', - receiveInspectionOrder: 'eam/eamInspectionOrder/receiveInspectionOrder', - cancelOrReceive: 'eam/eamInspectionOrder/cancelOrReceive' }, - dictOptions: {}, - superFieldList: [], - selectInspectionOrderXqData: {} - } + { + title: '宸ュ崟鍙�', + align: 'center', + dataIndex: 'orderNum' + }, + { + title: '璁惧缂栧彿', + align: 'center', + dataIndex: 'equipmentCode' + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName' + }, + { + title: '鏍囧噯鍚嶇О', + align: 'center', + dataIndex: 'standardId_dictText' + }, + { + title: '鐐规鏃ユ湡', + align: 'center', + dataIndex: 'inspectionDate', + customRender: function (text) { + return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) + } + }, + { + title: '鐐规杩囨湡鏃ユ湡', + align: 'center', + dataIndex: 'expirationTime', + customRender: function (text) { + return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) + } + }, + { + title: '鍒涘缓鏂瑰紡', + align: 'center', + dataIndex: 'creationMethod_dictText' + }, + { + title: '鐐规鐘舵��', + align: 'center', + dataIndex: 'inspectionStatus_dictText' + }, + { + title: '鐐规浜�', + align: 'center', + dataIndex: 'operator_dictText' + }, + { + title: '鐐规鏃堕棿', + align: 'center', + dataIndex: 'operateTime', + }, + { + title: '绠$悊鍛樼‘璁�', + align: 'center', + dataIndex: 'confirmUser_dictText' + }, + { + title: '纭鏃堕棿', + align: 'center', + dataIndex: 'confirmTime', + }, + { + title: '纭鎰忚', + align: 'center', + dataIndex: 'confirmComment', + } + ], + url: { + list: '/eam/eamInspectionOrder/list', + cancelInspectionOrder: '/eam/eamInspectionOrder/cancelInspectionOrder', + deleteBatch: '/eam/eamInspectionOrder/deleteBatch', + exportXlsUrl: '/eam/eamInspectionOrder/exportXls', + importExcelUrl: 'eam/eamInspectionOrder/importExcel', + receiveInspectionOrder: 'eam/eamInspectionOrder/receiveInspectionOrder', + cancelOrReceive: 'eam/eamInspectionOrder/cancelOrReceive' + }, + dictOptions: {}, + superFieldList: [], + selectInspectionOrderXqData: {} + } + }, + created() { + if (!this.isDisplayOperation) { + return + } + const operationColumn = { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + fixed: 'right', + width: 200, + scopedSlots: { customRender: 'action' } + } + this.columns = [...this.columns, operationColumn] + this.loadData(1) + }, + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } + }, + methods: { + initDictConfig() { }, - created() { - if (!this.isDisplayOperation) { + //璇︽儏 + handleDetail: function (record) { + this.selectInspectionOrderXqData = Object.assign({}, record) + this.$refs.modalFormXq.visible = true + this.$refs.modalFormXq.title = '璇︽儏' + this.$refs.modalFormXq.disableSubmit = true + this.$refs.modalFormXq.getAllApproveData(record) + this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id }) + }, + handleInspection(id) { + if (!this.url.receiveInspectionOrder) { + this.$message.error('璇疯缃畊rl.receiveInspectionOrder!') return } - const operationColumn = { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - fixed: 'right', - width: 200, - scopedSlots: { customRender: 'action' } - } - this.columns = [...this.columns, operationColumn] - this.loadData(1) + var that = this + getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) }, - computed: { - importExcelUrl: function() { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + handleOrReceive(id) { + if (!this.url.cancelInspectionOrder) { + this.$message.error('璇疯缃畊rl.cancelInspectionOrder!') + return } + var that = this + getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) }, - methods: { - initDictConfig() { - }, - //璇︽儏 - handleDetail: function(record) { - this.selectInspectionOrderXqData = Object.assign({}, record) - this.$refs.modalFormXq.visible = true - this.$refs.modalFormXq.title = '璇︽儏' - this.$refs.modalFormXq.disableSubmit = true - this.$refs.modalFormXq.getAllApproveData(record) - this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id }) - }, - handleInspection(id) { - if (!this.url.receiveInspectionOrder) { - this.$message.error('璇疯缃畊rl.receiveInspectionOrder!') - return + batchZf(type) { + if (this.selectedRowKeys.length <= 0) { + this.$notification.warning({ + message: '娑堟伅', + description: '璇烽�夋嫨涓�鏉¤褰�' + }) + } else { + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' } var that = this - getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => { - if (res.success) { - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message + this.$confirm({ + title: '纭浣滃簾', + content: '鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?', + onOk: function () { + that.loading = true + getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + that.onClearSelected() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.loading = false }) } }) - }, - handleOrReceive(id) { - if (!this.url.cancelInspectionOrder) { - this.$message.error('璇疯缃畊rl.cancelInspectionOrder!') - return + } + }, + batchLq(type) { + if (this.selectedRowKeys.length <= 0) { + this.$notification.warning({ + message: '娑堟伅', + description: '璇烽�夋嫨涓�鏉¤褰�' + }) + } else { + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' } var that = this - getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { - if (res.success) { - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message + this.$confirm({ + title: '纭棰嗗彇', + content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?', + onOk: function () { + that.loading = true + getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + that.onClearSelected() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.loading = false }) } }) - }, - batchZf(type) { - if (this.selectedRowKeys.length <= 0) { - this.$notification.warning({ - message: '娑堟伅', - description: '璇烽�夋嫨涓�鏉¤褰�' - }) - } else { - var ids = '' - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ',' - } - var that = this - this.$confirm({ - title: '纭浣滃簾', - content: '鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?', - onOk: function() { - that.loading = true - getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { - if (res.success) { - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - that.onClearSelected() - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }).finally(() => { - that.loading = false - }) - } - }) - } - }, - batchLq(type) { - if (this.selectedRowKeys.length <= 0) { - this.$notification.warning({ - message: '娑堟伅', - description: '璇烽�夋嫨涓�鏉¤褰�' - }) - } else { - var ids = '' - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ',' - } - var that = this - this.$confirm({ - title: '纭棰嗗彇', - content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?', - onOk: function() { - that.loading = true - getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { - if (res.success) { - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - that.onClearSelected() - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }).finally(() => { - that.loading = false - }) - } - }) - } - }, - onInspectionDateChange: function(value, dateString) { - this.queryParam.inspectionDateBegin = dateString[0] - this.queryParam.inspectionDateEnd = dateString[1] - }, - } + } + }, + onInspectionDateChange: function (value, dateString) { + this.queryParam.inspectionDateBegin = dateString[0] + this.queryParam.inspectionDateEnd = dateString[1] + }, + + handlePrint(record) { + let href = `${window._CONFIG['domianURL']}/jmreport/view/1094871242505912320?id=` + record.id + `&equipmentId=` + record.equipmentId + `&inspectionDate=` + record.inspectionDate; //缃戠珯閾炬帴 + window.open(href, "_blank"); + }, } +} </script> <style scoped> - @import '~@assets/less/common.less'; +@import '~@assets/less/common.less'; </style> \ No newline at end of file diff --git a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue index 84f1970..fd98045 100644 --- a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue @@ -2,36 +2,91 @@ <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper" v-if="isDisplayOperation"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <div + class="table-page-search-wrapper" + v-if="isDisplayOperation" + > + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="宸ュ崟鍙�"> - <a-input placeholder="璇疯緭鍏ュ伐鍗曞彿" v-model="queryParam.orderNum"></a-input> + <a-input + placeholder="璇疯緭鍏ュ伐鍗曞彿" + v-model="queryParam.orderNum" + ></a-input> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="璁惧缂栧彿"> - <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" - v-model="queryParam.equipmentId"></lx-search-equipment-select> + <lx-search-equipment-select + placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" + v-model="queryParam.equipmentId" + ></lx-search-equipment-select> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="璁″垝淇濆吇鏃ユ湡"> - <a-range-picker v-model="queryParam.maintenanceDateRange" @change="onMaintenanceDateChange" - format="YYYY-MM-DD" value-format="YYYY-MM-DD" /> + <a-range-picker + v-model="queryParam.maintenanceDateRange" + @change="onMaintenanceDateChange" + format="YYYY-MM-DD" + value-format="YYYY-MM-DD" + /> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="淇濆吇鐘舵��"> - <j-dict-select-tag placeholder="璇烽�夋嫨淇濆吇鐘舵��" dict-code="second_maintenance_status" - v-model="queryParam.maintenanceStatus" /> + <j-dict-select-tag + placeholder="璇烽�夋嫨淇濆吇鐘舵��" + dict-code="second_maintenance_status" + v-model="queryParam.maintenanceStatus" + /> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > + <span + style="float: left;overflow: hidden;" + class="table-page-search-submitButtons" + > + <a-button + type="primary" + @click="searchQuery" + icon="search" + >鏌ヨ</a-button> + <a-button + type="info" + @click="searchReset" + icon="reload" + style="margin-left: 8px" + >閲嶇疆</a-button> </span> </a-col> @@ -40,16 +95,32 @@ </div> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator" v-if="isDisplayOperation"> - <a-button @click="handleAdd" type="primary" icon="plus" v-if="isShowAuth('eam:secondMaintenance:add')">鏂板 + <div + class="table-operator" + v-if="isDisplayOperation" + > + <a-button + @click="handleAdd" + type="primary" + icon="plus" + v-if="isShowAuth('eam:secondMaintenance:add')" + >鏂板 </a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> - <a-menu-item key="1" @click="handlerBatchAbolish" v-if="isShowAuth('eam:secondMaintenance:abolish')"> + <a-menu-item + key="1" + @click="handlerBatchAbolish" + v-if="isShowAuth('eam:secondMaintenance:abolish')" + > <a-icon type="delete" /> 浣滃簾 </a-menu-item> - <a-menu-item key="2" @click="handlerBatchCollect" v-if="isShowAuth('eam:secondMaintenance:collect')"> + <a-menu-item + key="2" + @click="handlerBatchCollect" + v-if="isShowAuth('eam:secondMaintenance:collect')" + > <a-icon type="form" /> 棰嗗彇 </a-menu-item> @@ -62,10 +133,16 @@ <!-- table鍖哄煙-begin --> <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> + <div + class="ant-alert ant-alert-info" + style="margin-bottom: 16px;" + v-if="isDisplayOperation" + > + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <a + style="margin-left: 24px" + @click="onClearSelected" + >娓呯┖</a> </div> <a-table @@ -80,38 +157,61 @@ class="j-table-force-nowrap" :scroll="{x:'max-content'}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> + @change="handleTableChange" + > - <span slot="action" slot-scope="text, record"> + <span + slot="action" + slot-scope="text, record" + > <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> - <a @click="handleEdit(record)" v-if="isShowAuth('eam:secondMaintenance:edit')">缂栬緫</a> + <a + @click="handleEdit(record)" + v-if="isShowAuth('eam:secondMaintenance:edit')" + >缂栬緫</a> - <a-divider type="vertical" v-if="isShowAuth('eam:secondMaintenance:edit')" /> + <a-divider + type="vertical" + v-if="isShowAuth('eam:secondMaintenance:edit')" + /> - <a-popconfirm title="纭畾棰嗗彇鍚�?" @confirm="() => handlerCollect(record.id)" v-if="isShowAuth('eam:secondMaintenance:collect')"> - <a>棰嗗彇</a> - </a-popconfirm> + <a-popconfirm + title="纭畾棰嗗彇鍚�?" + @confirm="() => handlerCollect(record.id)" + v-if="isShowAuth('eam:secondMaintenance:collect')" + > + <a>棰嗗彇</a> + </a-popconfirm> - <a-divider type="vertical" v-if="isShowAuth('eam:secondMaintenance:collect')" /> + <a-divider + type="vertical" + v-if="isShowAuth('eam:secondMaintenance:collect')" + /> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> - <a-menu slot="overlay"> - <a-menu-item v-if="isShowAuth('eam:secondMaintenance:abolish')"> - <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handlerAbolish(record.id)" > - <a>浣滃簾</a> - </a-popconfirm> - </a-menu-item> - <a-menu-item> - <a @click="handleDetail(record)">璇︽儏</a> - </a-menu-item> - </a-menu> - </a-dropdown> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item v-if="isShowAuth('eam:secondMaintenance:abolish')"> + <a-popconfirm + title="纭畾浣滃簾鍚�?" + @confirm="() => handlerAbolish(record.id)" + > + <a>浣滃簾</a> + </a-popconfirm> + </a-menu-item> + <a-menu-item> + <a @click="handleDetail(record)">璇︽儏</a> + </a-menu-item> + </a-menu> + </a-dropdown> </template> <template v-else> - <a @click="handleDetail(record)">璇︽儏</a> + <a @click="handleDetail(record)">璇︽儏</a> + <a-divider type="vertical" /> + <a @click="handlePrint(record)">鎵撳嵃</a> </template> + </span> </a-table> @@ -119,9 +219,15 @@ <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> - <eamSecondMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"></eamSecondMaintenanceOrder-modal> + <eamSecondMaintenanceOrder-modal + ref="modalForm" + @ok="modalFormOk" + ></eamSecondMaintenanceOrder-modal> - <second-maintenance-approval-modal ref="secondMaintenanceApprovalModal" :selectShenpiData="selectSecondMaintenanceData" /> + <second-maintenance-approval-modal + ref="secondMaintenanceApprovalModal" + :selectShenpiData="selectSecondMaintenanceData" + /> </a-card> </template> @@ -161,7 +267,7 @@ width: 60, align: 'center', fixed: 'left', - customRender: function(t, r, index) { + customRender: function (t, r, index) { return parseInt(index) + 1 } }, @@ -289,7 +395,7 @@ }, computed: {}, methods: { - onMaintenanceDateChange: function(value, dateString) { + onMaintenanceDateChange: function (value, dateString) { if (dateString && dateString.length === 2) { this.queryParam.maintenanceDateBegin = dateString[0] this.queryParam.maintenanceDateEnd = dateString[1] @@ -344,7 +450,7 @@ this.$confirm({ title: '纭浣滃簾', content: '鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?', - onOk: function() { + onOk: function () { that.loading = true deleteAction(that.url.abolishBatch, { ids: ids }).then((res) => { if (res.success) { @@ -419,7 +525,7 @@ this.$confirm({ title: '纭棰嗗彇', content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?', - onOk: function() { + onOk: function () { that.loading = true deleteAction(that.url.collectBatch, { ids: ids }).then((res) => { if (res.success) { @@ -451,7 +557,13 @@ this.$refs.secondMaintenanceApprovalModal.recordDetail(record) this.$refs.secondMaintenanceApprovalModal.title = '璇︽儏' this.$refs.secondMaintenanceApprovalModal.disableSubmit = true - } + }, + + handlePrint(record) { + // let href = `${window._CONFIG['domianURL']}/jmreport/view/1094871242505912320`; //缃戠珯閾炬帴 + let href = `${window._CONFIG['domianURL']}/jmreport/view/1094834721929232384?id=` + record.id; //缃戠珯閾炬帴 + window.open(href, "_blank"); + }, } } </script> diff --git a/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue b/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue index e3cd159..2b65b8a 100644 --- a/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue @@ -2,36 +2,91 @@ <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper" v-if="isDisplayOperation"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <div + class="table-page-search-wrapper" + v-if="isDisplayOperation" + > + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="宸ュ崟鍙�"> - <a-input placeholder="璇疯緭鍏ュ伐鍗曞彿" v-model="queryParam.orderNum"></a-input> + <a-input + placeholder="璇疯緭鍏ュ伐鍗曞彿" + v-model="queryParam.orderNum" + ></a-input> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="璁惧缂栧彿"> - <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" - v-model="queryParam.equipmentId"></lx-search-equipment-select> + <lx-search-equipment-select + placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" + v-model="queryParam.equipmentId" + ></lx-search-equipment-select> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="璁″垝淇濆吇鏃ユ湡"> - <a-range-picker v-model="queryParam.maintenanceDateRange" @change="onMaintenanceDateChange" - format="YYYY-MM-DD" value-format="YYYY-MM-DD" /> + <a-range-picker + v-model="queryParam.maintenanceDateRange" + @change="onMaintenanceDateChange" + format="YYYY-MM-DD" + value-format="YYYY-MM-DD" + /> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="淇濆吇鐘舵��"> - <j-dict-select-tag placeholder="璇烽�夋嫨淇濆吇鐘舵��" dict-code="second_maintenance_status" - v-model="queryParam.maintenanceStatus" /> + <j-dict-select-tag + placeholder="璇烽�夋嫨淇濆吇鐘舵��" + dict-code="second_maintenance_status" + v-model="queryParam.maintenanceStatus" + /> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > + <span + style="float: left;overflow: hidden;" + class="table-page-search-submitButtons" + > + <a-button + type="primary" + @click="searchQuery" + icon="search" + >鏌ヨ</a-button> + <a-button + type="info" + @click="searchReset" + icon="reload" + style="margin-left: 8px" + >閲嶇疆</a-button> </span> </a-col> @@ -40,16 +95,32 @@ </div> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator" v-if="isDisplayOperation"> - <a-button @click="handleAdd" type="primary" icon="plus" v-if="isShowAuth('eam:secondMaintenance:add')">鏂板 + <div + class="table-operator" + v-if="isDisplayOperation" + > + <a-button + @click="handleAdd" + type="primary" + icon="plus" + v-if="isShowAuth('eam:secondMaintenance:add')" + >鏂板 </a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> - <a-menu-item key="1" @click="handlerBatchAbolish" v-if="isShowAuth('eam:secondMaintenance:abolish')"> + <a-menu-item + key="1" + @click="handlerBatchAbolish" + v-if="isShowAuth('eam:secondMaintenance:abolish')" + > <a-icon type="delete" /> 浣滃簾 </a-menu-item> - <a-menu-item key="2" @click="handlerBatchCollect" v-if="isShowAuth('eam:secondMaintenance:collect')"> + <a-menu-item + key="2" + @click="handlerBatchCollect" + v-if="isShowAuth('eam:secondMaintenance:collect')" + > <a-icon type="form" /> 棰嗗彇 </a-menu-item> @@ -62,10 +133,16 @@ <!-- table鍖哄煙-begin --> <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> + <div + class="ant-alert ant-alert-info" + style="margin-bottom: 16px;" + v-if="isDisplayOperation" + > + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <a + style="margin-left: 24px" + @click="onClearSelected" + >娓呯┖</a> </div> <a-table @@ -80,38 +157,67 @@ class="j-table-force-nowrap" :scroll="{x:'max-content'}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> + @change="handleTableChange" + > - <span slot="action" slot-scope="text, record"> + <span + slot="action" + slot-scope="text, record" + > <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> - <a @click="handleEdit(record)" v-if="isShowAuth('eam:thirdMaintenance:edit')">缂栬緫</a> + <a + @click="handleEdit(record)" + v-if="isShowAuth('eam:thirdMaintenance:edit')" + >缂栬緫</a> - <a-divider type="vertical" v-if="isShowAuth('eam:thirdMaintenance:edit')" /> + <a-divider + type="vertical" + v-if="isShowAuth('eam:thirdMaintenance:edit')" + /> - <a-popconfirm title="纭畾棰嗗彇鍚�?" @confirm="() => handlerCollect(record.id)" v-if="isShowAuth('eam:thirdMaintenance:collect')"> - <a>棰嗗彇</a> - </a-popconfirm> + <a-popconfirm + title="纭畾棰嗗彇鍚�?" + @confirm="() => handlerCollect(record.id)" + v-if="isShowAuth('eam:thirdMaintenance:collect')" + > + <a>棰嗗彇</a> + </a-popconfirm> - <a-divider type="vertical" v-if="isShowAuth('eam:thirdMaintenance:collect')" /> + <a-divider + type="vertical" + v-if="isShowAuth('eam:thirdMaintenance:collect')" + /> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> - <a-menu slot="overlay"> - <a-menu-item v-if="isShowAuth('eam:thirdMaintenance:abolish')"> - <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handlerAbolish(record.id)"> - <a>浣滃簾</a> - </a-popconfirm> - </a-menu-item> - <a-menu-item> - <a @click="handleDetail(record)">璇︽儏</a> - </a-menu-item> - </a-menu> - </a-dropdown> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item v-if="isShowAuth('eam:thirdMaintenance:abolish')"> + <a-popconfirm + title="纭畾浣滃簾鍚�?" + @confirm="() => handlerAbolish(record.id)" + > + <a>浣滃簾</a> + </a-popconfirm> + </a-menu-item> + <a-menu-item> + <a @click="handleDetail(record)">璇︽儏</a> + </a-menu-item> + </a-menu> + </a-dropdown> </template> <template v-else> - <a @click="handleDetail(record)">璇︽儏</a> + <a @click="handleDetail(record)">璇︽儏</a> </template> + + <a-divider + v-if="record.maintenanceStatus === 'COMPLETE'" + type="vertical" + /> + <a + v-if="record.maintenanceStatus === 'COMPLETE'" + @click="handlePrint(record)" + >鎵撳嵃</a> </span> </a-table> @@ -119,9 +225,15 @@ <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> - <eamThirdMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"></eamThirdMaintenanceOrder-modal> + <eamThirdMaintenanceOrder-modal + ref="modalForm" + @ok="modalFormOk" + ></eamThirdMaintenanceOrder-modal> - <third-maintenance-approval-modal ref="thirdMaintenanceApprovalModal" :selectShenpiData="selectThirdMaintenanceData" /> + <third-maintenance-approval-modal + ref="thirdMaintenanceApprovalModal" + :selectShenpiData="selectThirdMaintenanceData" + /> </a-card> </template> @@ -161,7 +273,7 @@ width: 60, align: 'center', fixed: 'left', - customRender: function(t, r, index) { + customRender: function (t, r, index) { return parseInt(index) + 1 } }, @@ -299,7 +411,7 @@ }, computed: {}, methods: { - onMaintenanceDateChange: function(value, dateString) { + onMaintenanceDateChange: function (value, dateString) { if (dateString && dateString.length === 2) { this.queryParam.maintenanceDateBegin = dateString[0] this.queryParam.maintenanceDateEnd = dateString[1] @@ -354,7 +466,7 @@ this.$confirm({ title: '纭浣滃簾', content: '鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?', - onOk: function() { + onOk: function () { that.loading = true deleteAction(that.url.abolishBatch, { ids: ids }).then((res) => { if (res.success) { @@ -429,7 +541,7 @@ this.$confirm({ title: '纭棰嗗彇', content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?', - onOk: function() { + onOk: function () { that.loading = true deleteAction(that.url.collectBatch, { ids: ids }).then((res) => { if (res.success) { @@ -461,7 +573,13 @@ this.$refs.thirdMaintenanceApprovalModal.recordDetail(record) this.$refs.thirdMaintenanceApprovalModal.title = '璇︽儏' this.$refs.thirdMaintenanceApprovalModal.disableSubmit = true - } + }, + + handlePrint(record) { + let href = `${window._CONFIG['domianURL']}/jmreport/view/1094880052100399104?id=` + record.id; + // + `&orderId=` + record.id; //缃戠珯閾炬帴 + window.open(href, "_blank"); + }, } } </script> diff --git a/src/views/mdc/base/AlarmManager.vue b/src/views/mdc/base/AlarmManager.vue index 04620a2..675f512 100644 --- a/src/views/mdc/base/AlarmManager.vue +++ b/src/views/mdc/base/AlarmManager.vue @@ -7,32 +7,6 @@ @keyup.enter.native="searchQuery" > <a-row :gutter="24"> - <!--<a-col--> - <!--:xl="4"--> - <!--:lg="4"--> - <!--:md="4"--> - <!--:sm="24"--> - <!-->--> - <!--<a-form-item label="璁惧缂栧彿">--> - <!--<a-input--> - <!--placeholder="璇疯緭鍏ヨ澶囩紪鍙�"--> - <!--v-model="queryParam.equipmentId"--> - <!--></a-input>--> - <!--</a-form-item>--> - <!--</a-col>--> - <!--<a-col--> - <!--:xl="4"--> - <!--:lg="4"--> - <!--:md="4"--> - <!--:sm="24"--> - <!-->--> - <!--<a-form-item label="璁惧鍚嶇О">--> - <!--<a-input--> - <!--placeholder="璇疯緭鍏ヨ澶囧悕绉�"--> - <!--v-model="queryParam.equipmentName"--> - <!--></a-input>--> - <!--</a-form-item>--> - <!--</a-col>--> <a-col :xl="6" :lg="7" @@ -40,11 +14,6 @@ :sm="24" > <a-form-item label="鎺у埗绯荤粺绫诲瀷"> - <!--<j-dict-select-tag--> - <!--placeholder="璇烽�夋嫨鎺у埗绯荤粺绫诲瀷"--> - <!--v-model="queryParam.driveType"--> - <!--dictCode="mdc_driveType"--> - <!--/>--> <a-auto-complete v-model="queryParam.driveType" :data-source="driveTypeList" @@ -102,13 +71,6 @@ icon="reload" style="margin-left: 8px" >閲嶇疆</a-button> - <!--<a--> - <!--@click="handleToggleSearch"--> - <!--style="margin-left: 8px"--> - <!-->--> - <!--{{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}--> - <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'" />--> - <!--</a>--> </span> </a-col> </a-row> @@ -123,24 +85,6 @@ type="primary" icon="plus" >鏂板</a-button> - <!--<a-button--> - <!--@click="handleAdd"--> - <!--type="primary"--> - <!--icon="plus"--> - <!-->璁惧鏂板</a-button>--> - <!--<a-upload--> - <!--name="file"--> - <!--:showUploadList="false"--> - <!--:multiple="false"--> - <!--:headers="tokenHeader"--> - <!--:action="importExcelUrl"--> - <!--@change="handleImportExcel"--> - <!-->--> - <!--<a-button--> - <!--type="primary"--> - <!--icon="import"--> - <!-->瀵煎叆</a-button>--> - <!--</a-upload>--> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item @@ -202,18 +146,15 @@ </a-table> </div> - <!--<alarm-manager-modal ref="modalForm" @ok="modalFormOk"></alarm-manager-modal>--> <alarm-manager-form ref="modalFormType" @ok="modalFormOk" :driveTypeList="driveTypeList" :filterOption="filterOption"></alarm-manager-form> <alarm-manager-edit ref="modalFormEdit" @ok="modalFormOk"></alarm-manager-edit> </a-card> </template> <script> - import '@/assets/less/TableExpand.less' import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' - // import MdcDriveTypeParamConfigModal from './modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigModal' import AlarmManagerModal from './modules/alarmManager/alarmManagerModal' import AlarmManagerForm from './modules/alarmManager/alarmManagerForm' import AlarmManagerEdit from './modules/alarmManager/alarmManagerEdit' @@ -255,29 +196,15 @@ return parseInt(index) + 1; } }, - // { - // title: '璁惧缂栧彿', - // align: "center", - // // sorter: true, - // dataIndex: 'equipmentId' - // }, - // { - // title: '璁惧鍚嶇О', - // align: "center", - // // sorter: true, - // dataIndex: 'equipmentName' - // }, { title: '鎶ヨ鍙�', align: "center", - // sorter: true, dataIndex: 'alarmCode', width:400 }, { title: '鎶ヨ鍐呭', align: "center", - // sorter: true, dataIndex: 'alarmContent', width:400 }, @@ -285,22 +212,14 @@ { title: '璁惧椹卞姩绫诲瀷', align: "center", - // sorter: true, dataIndex: 'driveType', width:400 }, - // { - // title: '鏄惁杩囨护', - // align: "center", - // dataIndex: 'isUse', - // customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isUse'], text) : ''), - // }, { dataIndex:'isUse_dictText', title: '鏄惁鍚敤', align: "center", width:380 - // dictCode:'alarm_is_use' }, { title: '鎿嶄綔', @@ -328,11 +247,6 @@ this.getSuperFieldList(); this.getDriveTypeByApi() }, - computed: { - // importExcelUrl: function () { - // return `${window._CONFIG['domianURL']}${this.url.importExcelUrl}`; - // }, - }, methods: { handleEdit: function (record) { this.$refs.modalFormEdit.edit(record); @@ -343,8 +257,6 @@ this.$refs.modalFormType.add(); this.$refs.modalFormType.title = "鏂板"; this.$refs.modalFormType.disableSubmit = false - }, - initDictConfig() { }, getSuperFieldList() { let fieldList = []; diff --git a/src/views/mdc/base/DeviceBaseInfo.vue b/src/views/mdc/base/DeviceBaseInfo.vue index 0394307..15f550c 100644 --- a/src/views/mdc/base/DeviceBaseInfo.vue +++ b/src/views/mdc/base/DeviceBaseInfo.vue @@ -7,39 +7,29 @@ <a-col :md="24-5" :sm="24"> <div class="device-status-info"> <a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info"> - <template v-if="item.value!=99"> - <div>{{ item.label }}</div> - <div class="status-square" :style="{ backgroundColor: item.color }"></div> - <div>{{getDeviceNumberByStatus(item.value) }}</div> - </template> - <template v-else> - <div>{{ item.label }}</div> - <div>{{getDeviceNumberByStatus(item.value) }}</div> - </template> + <div>{{ item.label }}</div> + <div v-if="item.value!=99" class="status-square" :style="{ backgroundColor: item.color }"></div> + <div>{{getDeviceNumberByStatus(item.value) }}</div> </a-space> </div> <div> <a-tabs default-active-key="1"> <a-tab-pane key="1" tab="甯冨眬鍥�"> - <equipment-layout :dataList="dataList" :equipmentId="selectEquipmentId" - :node="selectEquipment"></equipment-layout> + <equipment-layout :dataList="dataList" :equipmentId="selectEquipmentId" :node="selectEquipment"/> </a-tab-pane> <a-tab-pane key="2" tab="鍒楄〃" force-render> - <equipment-list :dataSource="dataList" @editEquipmentStatus="editEquipmentStatus"></equipment-list> + <equipment-list :dataSource="dataList"/> </a-tab-pane> </a-tabs> </div> </a-col> </a-row> - - </a-card> </template> <script> - import { putAction, getAction } from '@/api/manage' - import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import { getAction } from '@/api/manage' import BaseTree from '../common/BaseTree' import EquipmentLayout from './modules/DeviceBaseInfo/EquipmentLayout' import EquipmentList from './modules/DeviceBaseInfo/EquipmentList' @@ -58,14 +48,8 @@ selectEquipment: {}, equipmentStatisticsInfo: {}, dataList: [], - standbyNumber: 0, - offNumber: 0, - warningNumber: 0, - workNumber: 0, - allNumber: 0, url: { - list: '/mdc/mdcEquipment/queryEquipmentMonitorList', - updateEquipmentStatus: '/mdc/mdcEquipment/updateEquipmentStatus' + list: '/mdc/mdcEquipment/queryEquipmentMonitorList' }, param: {}, timer: null, @@ -91,9 +75,9 @@ color: '#FF0000' }, { - label: '寮傚父', - value: 33, - color: '#FFA200' + label: '鏁呴殰', + value: 5, + color: '#C11900' }, { label: '鎬绘暟', @@ -109,67 +93,44 @@ }, methods: { equipmentStatistics(param, resopnse = { key: false }) { - getAction(this.url.list, param).then((res) => { - this.dataList = [] - if (res.success) { - if (res.result.length != 0) { - this.standbyNumber = 0 - this.offNumber = 0 - this.warningNumber = 0 - this.workNumber = 0 - this.allNumber = 0 - this.dataList = res.result - this.allNumber = this.dataList.length - if (resopnse.key) { - this.$notification.success({ - key: 'equipmentStatus', + getAction(this.url.list, param) + .then((res) => { + this.dataList = [] + if (res.success) { + if (res.result.length != 0) { + this.dataList = res.result + if (resopnse.key) { + this.$notification.success({ + key: 'equipmentStatus', + message: '娑堟伅', + description: resopnse.message + }) + } + + // 绛涢�変粠杞︽澘璺宠浆杩囨潵鐨勯渶姹傛暟鎹� + const { signageData } = this.$route.params + console.log('signageData', signageData) + if (!signageData) return + else this.filterDataList(signageData) + } else { + this.$notification.warning({ message: '娑堟伅', - description: resopnse.message + description: '姝よ溅闂翠笅闈㈡棤璁惧锛侊紒' }) } - for (let i = 0; i < this.dataList.length; i++) { - let item = this.dataList[i] - switch (item.oporationDict) { - case '寰呮満' : - this.standbyNumber = this.standbyNumber + 1 - break - case '杩愯' : - this.workNumber = this.workNumber + 1 - break - case '鍏虫満' : - this.offNumber = this.offNumber + 1 - break - case '鎶ヨ' : - this.warningNumber = this.warningNumber + 1 - break - default: - break - } - } - - // 绛涢�変粠杞︽澘璺宠浆杩囨潵鐨勯渶姹傛暟鎹� - const { signageData } = this.$route.params - console.log('signageData', signageData) - if (!signageData) return - else this.filterDataList(signageData) - } else { + } + else { this.$notification.warning({ message: '娑堟伅', - description: '姝よ溅闂翠笅闈㈡棤璁惧锛侊紒' + description: res.message }) } - } else { - this.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) + }) }, /** * 绛涢�夋弧瓒充粠鐪嬫澘璺宠浆杩囨潵鏃剁殑鏉′欢鐨勬暟鎹� - * @param record + * @param signageData */ filterDataList(signageData) { this.dataList = this.dataList.filter(item => item.oporationDict === signageData.name) @@ -182,49 +143,12 @@ this.selectEquipment = val.equipmentId clearInterval(this.timer) this.timer = null - if (!val.equipmentId) { - this.param.key = val.key - this.equipmentStatistics(this.param) - this.timer = setInterval(() => { - setTimeout(this.equipmentStatistics(this.param), 0) - }, 1000 * 10) - } else { - this.param.key = val.parentId - this.equipmentStatistics(this.param) - this.timer = setInterval(() => { - setTimeout(this.equipmentStatistics(this.param), 0) - }, 1000 * 10) - } - }, - - /** - * 鍗曞嚮鐘舵�佸弽棣堝悗瑙﹀彂 - * @param record - */ - editEquipmentStatus(record) { - const _this = this - this.$notification.info({ - key: 'equipmentStatus', - message: '娑堟伅', - description: '鍙嶉涓�...' - }) - getAction(this.url.updateEquipmentStatus, { id: record.id }) - .then(res => { - if (res.success) { - _this.equipmentStatistics(this.param, { key: true, message: res.message }) - } else { - this.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - .catch(err => { - this.$notification.error({ - message: '娑堟伅', - description: err.message - }) - }) + if (!val.equipmentId) this.param.key = val.key + else this.param.key = val.parentId + this.equipmentStatistics(this.param) + this.timer = setInterval(() => { + setTimeout(this.equipmentStatistics(this.param), 0) + }, 1000 * 10) }, /** @@ -269,22 +193,6 @@ display: inline-block; width: 15px; height: 15px; - } - - .equipMessage table td .equipShutdown { - background-color: #808080; - } - - .equipMessage table td .standbyNumber { - background-color: #ffbf37; - } - - .equipMessage table td .equipRun { - background-color: #19FE01; - } - - .equipMessage table td .equipAlarm { - background-color: #FD0008; } .device-status-info { diff --git a/src/views/mdc/base/DeviceLog.vue b/src/views/mdc/base/DeviceLog.vue index 45817e3..303d4fe 100644 --- a/src/views/mdc/base/DeviceLog.vue +++ b/src/views/mdc/base/DeviceLog.vue @@ -6,7 +6,7 @@ <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-col> <a-col :md="24-5" :sm="24"> - <log-info :equipment="selectEquipment"></log-info> + <log-info :equipment="selectEquipment" @initEquipment="changeSelectionNode"></log-info> </a-col> </a-row> </div> diff --git a/src/views/mdc/base/EquipmentList.vue b/src/views/mdc/base/EquipmentList.vue index c3eddcd..2ed3a16 100644 --- a/src/views/mdc/base/EquipmentList.vue +++ b/src/views/mdc/base/EquipmentList.vue @@ -77,7 +77,6 @@ <a-table ref="table" bordered - size="middle" rowKey="id" :scroll="{x:'max-content',y:465}" :columns="columns" diff --git a/src/views/mdc/base/GroupUtilizationRateChart.vue b/src/views/mdc/base/GroupUtilizationRateChart.vue index ebb81fc..a7f005b 100644 --- a/src/views/mdc/base/GroupUtilizationRateChart.vue +++ b/src/views/mdc/base/GroupUtilizationRateChart.vue @@ -129,7 +129,7 @@ * @param shiftDataList 鐝鏁版嵁鍒楄〃 */ initChart({ dataList, dateList, shiftSubList, shiftDataList }) { - const defaultLegendData = ['24灏忔椂', '24灏忔椂锛堝幓闄ゆ晠闅滆澶囷級', '鐝', '绱杩愯鏃堕棿(h)'] + const defaultLegendData = ['24灏忔椂', '24灏忔椂锛堝幓闄ゆ晠闅滄椂闂达級', '鐝', '绱杩愯鏃堕棿(h)'] const defaultSeries = [ { type: 'line', @@ -139,7 +139,7 @@ }, { type: 'line', - name: '24灏忔椂锛堝幓闄ゆ晠闅滆澶囷級', + name: '24灏忔椂锛堝幓闄ゆ晠闅滄椂闂达級', yAxisIndex: 0, data: dataList ? dataList.map(item => item.amendUtilizationRate) : [] }, diff --git a/src/views/mdc/base/MdcEquipmentTypeList.vue b/src/views/mdc/base/MdcEquipmentTypeList.vue index 3f6577e..055aee8 100644 --- a/src/views/mdc/base/MdcEquipmentTypeList.vue +++ b/src/views/mdc/base/MdcEquipmentTypeList.vue @@ -13,10 +13,6 @@ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - <!--<a @click="handleToggleSearch" style="margin-left: 8px">--> - <!--{{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}--> - <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>--> - <!--</a>--> </span> </a-col> </a-row> @@ -27,12 +23,6 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <!--<a-button type="primary" icon="download" @click="handleExportXls('璁惧绫诲瀷')">瀵煎嚭</a-button>--> - <!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> - <!--<a-button type="primary" icon="import">瀵煎叆</a-button>--> - <!--</a-upload>--> - <!-- 楂樼骇鏌ヨ鍖哄煙 --> - <!--<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> @@ -62,25 +52,9 @@ @change="handleTableChange" :scroll="{x:'max-content',y:465}" > - - <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> + <img v-else :src="getImgView(text)" :preview="record.id" height="20" alt="" style="max-width:80px;"/> </template> <span slot="action" slot-scope="text, record"> @@ -101,7 +75,6 @@ </a-menu> </a-dropdown> </span> - </a-table> </div> diff --git a/src/views/mdc/base/MdcWorkshopSignage.vue b/src/views/mdc/base/MdcWorkshopSignage.vue index 57586b7..6525c5b 100644 --- a/src/views/mdc/base/MdcWorkshopSignage.vue +++ b/src/views/mdc/base/MdcWorkshopSignage.vue @@ -6,8 +6,7 @@ <a-row style="height: 100%"> <a-col :span="7" class="header-left"> <a-space> - <span v-if="!isSwitchChecked">寮�鍚姛鑳�</span> - <span v-else>鍏抽棴鍔熻兘</span> + <span>鍔熻兘寮�鍏�</span> <a-switch checked-children="寮�" un-checked-children="鍏�" @@ -22,17 +21,9 @@ <a-col :span="10" class="workshop-name">{{ workshopDetails.workshopName }}</a-col> <a-col :span="7" class="device-status-info"> - <!--<a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info"--> - <!--@click="handleScreenDevive(item)">--> - <!--<div :style="{color:item.checked?'#1890FF':'#fff'}">{{ item.label }}</div>--> - <!--<div class="status-square" :style="{ backgroundColor: item.color }"></div>--> - <!--<!–<a-checkbox :checked="item.checked" @change="checkboxChange(item)"></a-checkbox>–>--> - <!--<div>{{getDeviceNumberByStatus(item.value) }}</div>--> - <!--</a-space>--> <a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info"> <div :style="{color:item.checked?'#1890FF':'#fff'}">{{ item.label }}</div> <div class="status-square" :style="{ backgroundColor: item.color }"></div> - <!--<a-checkbox :checked="item.checked" @change="checkboxChange(item)"></a-checkbox>--> <div>{{getDeviceNumberByStatus(item.value) }}</div> </a-space> </a-col> @@ -67,23 +58,7 @@ @click="openDetail(item)"> <div class="device-status"> <div - v-if="item.equipmentStatus == 2 || item.equipmentStatus == 1" - :style="{ backgroundImage: `url(${require('@/assets/yellow.png')})` }" - class="status-image" - ></div> - <div - v-if="item.equipmentStatus == 22" - :style="{ backgroundImage: `url(${require('@/assets/red.png')})` }" - class="status-image" - ></div> - <div - v-if="item.equipmentStatus == 0" - :style="{ backgroundImage: `url(${require('@/assets/gray.png')})` }" - class="status-image" - ></div> - <div - v-if="item.equipmentStatus == 3" - :style="{ backgroundImage: `url(${require('@/assets/green.png')})` }" + :style="{ backgroundImage: `url(${getStatusImgUrl(item.equipmentStatus)})` }" class="status-image" ></div> <div @@ -91,8 +66,7 @@ class="device-image" ></div> </div> - <div class="device-id" id="deviceId" - :style="{ color:workshopDetails.equipmentIdColor }"> + <div :style="{ color:workshopDetails.equipmentIdColor }"> {{ item.equipmentId }} </div> </div> @@ -133,48 +107,32 @@ showGuideline: 'none', guidelineXTop: 0, guidelineYLeft: 0, - deviceList: [ - // { - // equipmentId: '123213213123232',// 璁惧ID - // equipmentImage: require('@/assets/8.png'), // 璁惧鍥剧墖 - // coordinateTop: 200, // 鎷栨嫿鍏冪礌璺濈洅瀛愰《璺濈 - // coordinateLeft: 100, // 鎷栨嫿鍏冪礌璺濈洅瀛愬乏渚ц窛绂� - // vw: 100, // 缂╂斁鍏冪礌瀹藉害 - // vh: 100, // 缂╂斁鍏冪礌楂樺害 - // equipmentStatus: 1 // 璁惧鐘舵�� 0:鍏虫満 22:鎶ヨ 2:寰呮満 3:杩愯 寮�鏈�:1锛堟病鏈夊洓鑹茬伅鏍囪瘑褰掍负寰呮満锛� - // } - ], // 璁惧淇℃伅鍒楄〃 - deviceList_copy: [], + deviceList: [], // 璁惧淇℃伅鍒楄〃 deviceStatusList: [ - // { - // label: '鍏ㄩ儴', - // value: 99, - // color: '#fff', - // checked: true - // }, { label: '鍏虫満', value: 0, - color: '#A8A8A8', - checked: false + color: '#A8A8A8' }, { label: '寰呮満', value: 2, - color: '#FFFF00', - checked: false + color: '#FFFF00' }, { label: '杩愯', value: 3, - color: '#00EE00', - checked: false + color: '#00EE00' }, { label: '鎶ヨ', value: 22, - color: '#FF0000', - checked: false + color: '#FF0000' + }, + { + label: '鏁呴殰', + value: 5, + color: '#C11900' } ],// 璁惧鐘舵�佹寚绀虹伅鍒楄〃锛� windowHeight: null,// 褰撳墠娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴︼紙锛堜笉鍖呮嫭宸ュ叿鏍忋�佷功绛俱�佸簳閮ㄤ换鍔℃爮锛� @@ -207,11 +165,9 @@ * @param id 杞﹂棿Id */ getDeviceListByApi(id) { - console.log('閲嶆柊鍒锋柊') api.getDeviceListInWorkshopSignagePageApi(id).then((res) => { if (res.result && res.result.length > 0) { this.deviceList = res.result - this.deviceList_copy = res.result } }) }, @@ -223,12 +179,8 @@ getWorkshopDetailsByApi(id) { api.getWorkshopDetailByWorkshopIdApi(id).then((res) => { this.workshopDetails = res.result - // this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView( - // this.workshopDetails.backgroundImage - // )})` this.imgSrc = this.getImgView(this.workshopDetails.backgroundImage) this.$refs.deviceContainerRef.style.height = (this.windowHeight - this.pageHeaderHeight) + 'px' - // this.parentH = this.windowHeight - this.pageHeaderHeight this.parentH = 900 this.parentLimitation = true // 鍦ㄧ埗鍏冪礌楂樺害璁剧疆鍚庡啀璁剧疆闄愬埗鎷栨嫿鍖哄煙锛屼笉杩欐牱鏈夋鐜囧鑷寸埗鍏冪礌楂樺害鏈缃氨闄愬埗鎷栨嫿 }) @@ -280,15 +232,6 @@ * @param index 鎷栨嫿璁惧鍦ㄦ暟缁勪腑鐨勪笅鏍� */ resize(newRect, index) { - // if (newRect.width > 100) { - // if (newRect.width / newRect.height < 2) { - // this.deviceList[index].fontSize = newRect.width / 10 - // } else { - // this.deviceList[index].fontSize = newRect.height / 5 - // } - // } else { - // this.deviceList[index].fontSize = 12 - // } this.showGuideline = 'block' this.deviceList[index].vw = newRect.width this.deviceList[index].vh = newRect.height @@ -304,8 +247,8 @@ * @returns {number} 璁惧鏁伴噺 */ getDeviceNumberByStatus(value) { - if (value === 99) return this.deviceList_copy.length - return this.deviceList_copy.filter((item) => item.equipmentStatus === value).length + if (value === 99) return this.deviceList.length + return this.deviceList.filter((item) => item.equipmentStatus === value).length }, /** @@ -318,19 +261,38 @@ this.isDraggable = !this.isDraggable }, - openDetail(item) { + /** + * 寮�鍚姛鑳借Е鍙戜簨浠� + * @param record 鐐瑰嚮鐨勮澶囦俊鎭� + */ + openDetail(record) { if (!this.isSwitchChecked) { - if (item.equipmentStatus == 0) { + if (record.equipmentStatus == 0) { this.$message.warning('璁惧澶勪簬鍏虫満鐘舵�侊紒') return false } - console.log(item) - console.log(this.$refs.EquipmentDetailModal) - this.$refs.EquipmentDetailModal.initData(item.equId) - this.$refs.EquipmentDetailModal.timerModel(item.equId) - // this.equipMessageTimer = setInterval(() => { - // setTimeout( this.$refs.equmentDetaiModel.initData(item.equipmentId),0) - // },1000*10) + this.$refs.EquipmentDetailModal.initData(record.equId) + this.$refs.EquipmentDetailModal.timerModel(record.equId) + } + }, + + /** + * 鏍规嵁璁惧鐘舵�佸�艰幏鍙栧搴斾笁鑹茬伅鍥剧墖鍦板潃 + * @param imgStatus 璁惧鐘舵�佸�� + */ + getStatusImgUrl(imgStatus) { + switch (imgStatus) { + case 1: + case 2: + return require('@/assets/yellow.png') + case 3: + return require('@/assets/green.png') + case 22: + return require('@/assets/red.png') + case 5: + return require('@/assets/orange.png') + default: + return require('@/assets/gray.png') } }, @@ -338,87 +300,11 @@ * 娴忚鍣ㄥ昂瀵稿彂鐢熸敼鍙樻椂瑙﹀彂 */ handleWindowSizeChange() { - // this.isFullScreen = !this.isFullScreen - // if (!this.isFullScreen) location.reload() // 濡傛灉涓哄叏灞忔ā寮忥紝鍒欏湪鍒囨崲妯″紡鏃堕噸鏂板姞杞介〉闈互閲嶆柊鑾峰彇娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴� const windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight - // this.parentH = 99999 - // const scaleRate = windowHeight / this.windowHeight - // this.windowHeight = windowHeight this.$refs.deviceContainerRef.style.height = (windowHeight - this.pageHeaderHeight) + 'px' - // const timer = setTimeout(() => { - // this.deviceList.forEach(item => { - // item.coordinateTop = item.coordinateTop * scaleRate - // item.vh = item.vh * scaleRate - // console.log('vh', item.vh) - // }) - // this.parentH = windowHeight - this.pageHeaderHeight - // console.log('changeDeviceList', this.deviceList) - // }, 500) - // console.log('scaleRate', scaleRate) - }, - - checkboxChange(obj) { - //闇�瑕佸垽鏂槸鍚﹀紑鍚姛鑳斤紝鐩殑鏄负浜嗗叧闂畾鏃跺櫒閬垮厤绛涢�夊悗璁惧琚畾鏃跺埛鏂扮殑鏂拌澶囪鐩� - if (this.isOperatingDevice) { - obj.checked = !obj.checked - if (obj.value !== 99) { - if (obj.checked) this.checkedStatusCount++ - else this.checkedStatusCount-- - } - - if (obj.value == 99) { - this.deviceStatusList.forEach(item => { - if (item.value !== obj.value) item.checked = obj.checked - }) - if (obj.checked) { - this.deviceList = this.deviceList_copy - this.checkedStatusCount = this.deviceStatusList.length - 1 - } else { - this.deviceList = [] - this.checkedStatusCount = 0 - } - } else { - this.deviceStatusList.forEach(item => { - if (item.value === 99) { - if (this.checkedStatusCount !== this.deviceStatusList.length - 1 || this.checkedStatusCount === 0) item.checked = false - if (this.checkedStatusCount === this.deviceStatusList.length - 1) item.checked = true - } - }) - if (obj.checked) { - this.deviceList.push(...this.deviceList_copy.filter(item => item.equipmentStatus === obj.value)) - } else { - this.deviceList = this.deviceList.filter(item => item.equipmentStatus !== obj.value) - } - } - } else { - this.$notification.warning({ - message: '娑堟伅', - description: '璇峰紑鍚姛鑳藉悗鍐嶈繘琛岀瓫閫�' - }) - } - }, - - handleScreenDevive(obj) { - //闇�瑕佸垽鏂槸鍚﹀紑鍚姛鑳斤紝鐩殑鏄负浜嗗叧闂畾鏃跺櫒閬垮厤绛涢�夊悗璁惧琚畾鏃跺埛鏂扮殑鏂拌澶囪鐩� - if (this.isOperatingDevice) { - obj.checked = true - this.deviceList = this.deviceList_copy - this.deviceStatusList.forEach(item => { - if (item.value !== obj.value) item.checked = false - }) - - if (obj.value == 99) this.deviceList = this.deviceList_copy - else this.deviceList = this.deviceList.filter(item => item.equipmentStatus === obj.value) - - } else { - this.$notification.warning({ - message: '娑堟伅', - description: '璇峰紑鍚姛鑳藉悗鍐嶈繘琛岀瓫閫�' - }) - } } }, created() { @@ -437,9 +323,6 @@ document.documentElement.clientHeight || document.body.clientHeight - // 鍒ゆ柇娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴︽槸鍚︾瓑浜庡垎杈ㄧ巼锛岃嫢鐩哥瓑鍒欒〃绀鸿繘鍏ユ椂娴忚鍣ㄤ负鍏ㄥ睆妯″紡 - // if (this.windowHeight === screen.height) this.isFullScreen = true - window.addEventListener('resize', this.handleWindowSizeChange) }, beforeDestroy() { @@ -457,10 +340,6 @@ color: #fff; .page-header { - /*font-size: 50px;*/ - /*text-align: center;*/ - /*position: relative;*/ - .header-left { height: 100%; display: flex; @@ -485,7 +364,6 @@ .single-status-info { margin: 10px; - cursor: pointer; .status-square { width: 14px; @@ -526,11 +404,7 @@ flex-direction: column; align-items: center; justify-content: space-between; - cursor: default; - - &:active { - border: 1px solid #1890ff; - } + cursor: pointer; .device-status { width: 100%; @@ -557,10 +431,5 @@ } } } - } - - /deep/ .ant-checkbox-inner { - background-color: transparent; - border-color: #fff; } </style> \ No newline at end of file diff --git a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue index 3e1b58a..92c9192 100644 --- a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue +++ b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue @@ -99,8 +99,7 @@ <a-descriptions title="杩愯鏁版嵁" - v-show="runData" - v-if="resultData.driveType != 'PLC'" + v-if="runData&&runData.length>0&&resultData.driveType != 'PLC'" :column="4" class="operationData" > @@ -155,1259 +154,1269 @@ </template> <script> -import { - getAction, - postAction -} from '@/api/manage' -import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + import { + getAction, + postAction + } from '@/api/manage' + import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' -export default { - name: 'EquipmentDetailModal', - components: {}, - props: {}, - data() { - return { - runData: [], - // xyzAliasesList: [], - //涓昏酱鍊嶇巼 - spindlebeilv: 0, - //杩涚粰鍊嶇巼 - feedbeilv: 0, - // 涓昏酱璐熻嵎 - spindleload: 0, - //蹇�熻繘缁欏�嶇巼 - rapidfeed: 0, - visible: false, - resultData: {}, - url: { - mdcEquipmentDetailedInfo: '/mdc/mdcEquipment/mdcEquipmentDetailedInfo' + export default { + name: 'EquipmentDetailModal', + components: {}, + props: {}, + data() { + return { + runData: [], + // xyzAliasesList: [], + //涓昏酱鍊嶇巼 + spindlebeilv: null, + //杩涚粰鍊嶇巼 + feedbeilv: null, + // 涓昏酱璐熻嵎 + spindleload: null, + //蹇�熻繘缁欏�嶇巼 + rapidfeed: null, + visible: false, + resultData: {}, + url: { + mdcEquipmentDetailedInfo: '/mdc/mdcEquipment/mdcEquipmentDetailedInfo' + }, + modalTimer: null, + xyzList: null + } + }, + beforeDestroy() { + clearInterval(this.modalTimer) + this.modalTimer = null + }, + methods: { + drawLine() { + let _this = this + if (_this.spindlebeilv) { + //鍩轰簬鍑嗗濂界殑dom锛屽垵濮嬪寲echarts瀹炰緥 + let mdcEquiMoniGauge1 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge1'), 'macarons') + let mdcEquiMoniGaugeOption1 = { + tooltip: { + formatter: '{a} <br/>{b} : {c}%' + }, + + series: [{ + name: '澶栭儴绾�', + type: 'gauge', + radius: '65%', // 鍔ㄦ�� + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#31F3FF'] // 鍔ㄦ�� + ], + width: 1 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { //鏍囬 + show: false + } + }, + { + name: '澶栭儴鍒诲害', + type: 'gauge', + radius: '80%', + min: 0, //鏈�灏忓埢搴� + max: 300, //鏈�澶у埢搴� + splitNumber: 10, //鍒诲害鏁伴噺 + startAngle: 225, + endAngle: -45, + axisLine: { + show: false, + lineStyle: { + color: [ + [1, 'rgba(0,0,0,0)'] + ] + } + }, //浠〃鐩樿酱绾� + axisLabel: { + show: true, + color: '#31F3FF', + fontSize: 10, // 鍔ㄦ�� + distance: -20 // 鍔ㄦ�� + + }, //鍒诲害鏍囩銆� + axisTick: { + show: false + }, //鍒诲害鏍峰紡 + splitLine: { + show: false + } + }, + { + name: '鍐呴儴瀹界嚎鏉�', + type: 'gauge', + radius: '55%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 4 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鍐呴儴缁嗙嚎鏉�', + type: 'gauge', + radius: '40%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 3 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '闂撮殧鏉″舰', + type: 'gauge', + radius: '52.5%', + z: 4, + splitNumber: 35, + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + opacity: 0 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false, + length: 20, + splitNumber: 1, + lineStyle: { + color: '#122B3C', + width: 1 + } + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鏁版嵁', + type: 'gauge', + radius: '52.5%', + z: 3, + startAngle: 225, + max: 300, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [_this.spindlebeilv / 300, '#31F3FF'], // 鍔ㄦ�� + [1, '#185363'] + ], + width: 4 + } + }, + tooltip: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: true, + fontWeight: 'bold', + fontSize: 12, + color: '#fff' + }, + pointer: { + show: true, + width: 3, + itemStyle: { + color: '#fff' + } + }, + data: [{ + name: '', + value: _this.spindlebeilv + }] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�', + 'type': 'pie', + 'radius': ['4%', '2%'], + 'hoverAnimation': false, + tooltip: { + show: false + }, + cursor: 'default', + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#fff' + }, + animation: false, + 'data': [1] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�2', + 'type': 'pie', + 'radius': '2%', + 'hoverAnimation': false, + cursor: 'default', + tooltip: { + show: false + }, + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#31F3FF' + }, + animation: false, + 'data': [1] + } + ] + } + mdcEquiMoniGauge1.setOption(mdcEquiMoniGaugeOption1) + } + if (_this.feedbeilv) { + let mdcEquiMoniGauge2 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge2'), 'macarons') + let mdcEquiMoniGaugeOption2 = { + tooltip: { + formatter: '{a} <br/>{b} : {c}%' + }, + + series: [{ + name: '澶栭儴绾�', + type: 'gauge', + radius: '65%', // 鍔ㄦ�� + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#31F3FF'] // 鍔ㄦ�� + ], + width: 1 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { //鏍囬 + show: false + } + }, + { + name: '澶栭儴鍒诲害', + type: 'gauge', + radius: '80%', + min: 0, //鏈�灏忓埢搴� + max: 300, //鏈�澶у埢搴� + splitNumber: 10, //鍒诲害鏁伴噺 + startAngle: 225, + endAngle: -45, + axisLine: { + show: false, + lineStyle: { + color: [ + [1, 'rgba(0,0,0,0)'] + ] + } + }, //浠〃鐩樿酱绾� + axisLabel: { + show: true, + color: '#31F3FF', + fontSize: 10, // 鍔ㄦ�� + distance: -20 // 鍔ㄦ�� + + }, //鍒诲害鏍囩銆� + axisTick: { + show: false + }, //鍒诲害鏍峰紡 + splitLine: { + show: false + } + }, + { + name: '鍐呴儴瀹界嚎鏉�', + type: 'gauge', + radius: '55%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 4 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鍐呴儴缁嗙嚎鏉�', + type: 'gauge', + radius: '40%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 3 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '闂撮殧鏉″舰', + type: 'gauge', + radius: '52.5%', + z: 4, + splitNumber: 35, + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + opacity: 0 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false, + length: 20, + splitNumber: 1, + lineStyle: { + color: '#122B3C', + width: 1 + } + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鏁版嵁', + type: 'gauge', + radius: '52.5%', + z: 3, + startAngle: 225, + max: 300, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [_this.feedbeilv / 300, '#31F3FF'], // 鍔ㄦ�� + [1, '#185363'] + ], + width: 4 + } + }, + tooltip: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: true, + fontWeight: 'bold', + fontSize: 12, + color: '#fff' + }, + pointer: { + show: true, + width: 3, + itemStyle: { + color: '#fff' + } + }, + data: [{ + name: '', + value: _this.feedbeilv + }] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�', + 'type': 'pie', + 'radius': ['4%', '2%'], + 'hoverAnimation': false, + tooltip: { + show: false + }, + cursor: 'default', + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#fff' + }, + animation: false, + 'data': [1] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�2', + 'type': 'pie', + 'radius': '2%', + 'hoverAnimation': false, + cursor: 'default', + tooltip: { + show: false + }, + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#31F3FF' + }, + animation: false, + 'data': [1] + } + ] + } + mdcEquiMoniGauge2.setOption(mdcEquiMoniGaugeOption2) + } + if (_this.spindleload) { + let mdcEquiMoniGauge3 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge3'), 'macarons') + let mdcEquiMoniGaugeOption3 = { + tooltip: { + formatter: '{a} <br/>{b} : {c}%' + }, + + series: [{ + name: '澶栭儴绾�', + type: 'gauge', + radius: '65%', // 鍔ㄦ�� + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#31F3FF'] // 鍔ㄦ�� + ], + width: 1 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { //鏍囬 + show: false + } + }, + { + name: '澶栭儴鍒诲害', + type: 'gauge', + radius: '80%', + min: 0, //鏈�灏忓埢搴� + max: 100, //鏈�澶у埢搴� + splitNumber: 10, //鍒诲害鏁伴噺 + startAngle: 225, + endAngle: -45, + axisLine: { + show: false, + lineStyle: { + color: [ + [1, 'rgba(0,0,0,0)'] + ] + } + }, //浠〃鐩樿酱绾� + axisLabel: { + show: true, + color: '#31F3FF', + fontSize: 10, // 鍔ㄦ�� + distance: -20 // 鍔ㄦ�� + + }, //鍒诲害鏍囩銆� + axisTick: { + show: false + }, //鍒诲害鏍峰紡 + splitLine: { + show: false + } + }, + { + name: '鍐呴儴瀹界嚎鏉�', + type: 'gauge', + radius: '55%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 4 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鍐呴儴缁嗙嚎鏉�', + type: 'gauge', + radius: '40%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 3 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '闂撮殧鏉″舰', + type: 'gauge', + radius: '52.5%', + z: 4, + splitNumber: 35, + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + opacity: 0 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false, + length: 20, + splitNumber: 1, + lineStyle: { + color: '#122B3C', + width: 1 + } + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鏁版嵁', + type: 'gauge', + radius: '52.5%', + z: 3, + startAngle: 225, + max: 100, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [_this.spindleload / 100, '#31F3FF'], // 鍔ㄦ�� + [1, '#185363'] + ], + width: 4 + } + }, + tooltip: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: true, + fontWeight: 'bold', + fontSize: 12, + color: '#fff' + }, + pointer: { + show: true, + width: 3, + itemStyle: { + color: '#fff' + } + }, + data: [{ + name: '', + value: _this.spindleload + }] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�', + 'type': 'pie', + 'radius': ['4%', '2%'], + 'hoverAnimation': false, + tooltip: { + show: false + }, + cursor: 'default', + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#fff' + }, + animation: false, + 'data': [1] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�2', + 'type': 'pie', + 'radius': '2%', + 'hoverAnimation': false, + cursor: 'default', + tooltip: { + show: false + }, + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#31F3FF' + }, + animation: false, + 'data': [1] + } + ] + } + mdcEquiMoniGauge3.setOption(mdcEquiMoniGaugeOption3) + } + if (_this.rapidfeed) { + let mdcEquiMoniGauge4 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge4'), 'macarons') + let mdcEquiMoniGaugeOption4 = { + tooltip: { + formatter: '{a} <br/>{b} : {c}%' + }, + + series: [{ + name: '澶栭儴绾�', + type: 'gauge', + radius: '65%', // 鍔ㄦ�� + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#31F3FF'] // 鍔ㄦ�� + ], + width: 1 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { //鏍囬 + show: false + } + }, + { + name: '澶栭儴鍒诲害', + type: 'gauge', + radius: '80%', + min: 0, //鏈�灏忓埢搴� + max: 300, //鏈�澶у埢搴� + splitNumber: 10, //鍒诲害鏁伴噺 + startAngle: 225, + endAngle: -45, + axisLine: { + show: false, + lineStyle: { + color: [ + [1, 'rgba(0,0,0,0)'] + ] + } + }, //浠〃鐩樿酱绾� + axisLabel: { + show: true, + color: '#31F3FF', + fontSize: 10, // 鍔ㄦ�� + distance: -20 // 鍔ㄦ�� + + }, //鍒诲害鏍囩銆� + axisTick: { + show: false + }, //鍒诲害鏍峰紡 + splitLine: { + show: false + } + }, + { + name: '鍐呴儴瀹界嚎鏉�', + type: 'gauge', + radius: '55%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 4 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鍐呴儴缁嗙嚎鏉�', + type: 'gauge', + radius: '40%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 3 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '闂撮殧鏉″舰', + type: 'gauge', + radius: '52.5%', + z: 4, + splitNumber: 35, + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + opacity: 0 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false, + length: 20, + splitNumber: 1, + lineStyle: { + color: '#122B3C', + width: 1 + } + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鏁版嵁', + type: 'gauge', + radius: '52.5%', + z: 3, + startAngle: 225, + max: 300, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [_this.rapidfeed / 300, '#31F3FF'], // 鍔ㄦ�� + [1, '#185363'] + ], + width: 4 + } + }, + tooltip: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: true, + fontWeight: 'bold', + fontSize: 12, + color: '#fff' + }, + pointer: { + show: true, + width: 3, + itemStyle: { + color: '#fff' + } + }, + data: [{ + name: '', + value: _this.rapidfeed + }] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�', + 'type': 'pie', + 'radius': ['4%', '2%'], + 'hoverAnimation': false, + tooltip: { + show: false + }, + cursor: 'default', + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#fff' + }, + animation: false, + 'data': [1] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�2', + 'type': 'pie', + 'radius': '2%', + 'hoverAnimation': false, + cursor: 'default', + tooltip: { + show: false + }, + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#31F3FF' + }, + animation: false, + 'data': [1] + } + ] + } + mdcEquiMoniGauge4.setOption(mdcEquiMoniGaugeOption4) + } }, - modalTimer: null, - xyzList: null - } - }, - beforeDestroy() { - clearInterval(this.modalTimer) - this.modalTimer = null - }, - methods: { - drawLine() { - let _this = this - if (_this.spindlebeilv) { - //鍩轰簬鍑嗗濂界殑dom锛屽垵濮嬪寲echarts瀹炰緥 - let mdcEquiMoniGauge1 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge1'), 'macarons') - let mdcEquiMoniGaugeOption1 = { - tooltip: { - formatter: '{a} <br/>{b} : {c}%' - }, + close() { + this.$emit('close') + this.visible = false + clearInterval(this.modalTimer) + this.modalTimer = null + }, + handleCancel() { + this.close() + clearInterval(this.modalTimer) + this.modalTimer = null + }, + timerModel(id) { + this.modalTimer = setInterval(() => { + setTimeout(this.initData(id), 0) + }, 1000 * 4) + }, - series: [{ - name: '澶栭儴绾�', - type: 'gauge', - radius: '65%', // 鍔ㄦ�� - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#31F3FF'] // 鍔ㄦ�� - ], - width: 1 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { //鏍囬 - show: false - } - }, - { - name: '澶栭儴鍒诲害', - type: 'gauge', - radius: '80%', - min: 0, //鏈�灏忓埢搴� - max: 300, //鏈�澶у埢搴� - splitNumber: 10, //鍒诲害鏁伴噺 - startAngle: 225, - endAngle: -45, - axisLine: { - show: false, - lineStyle: { - color: [ - [1, 'rgba(0,0,0,0)'] - ] - } - }, //浠〃鐩樿酱绾� - axisLabel: { - show: true, - color: '#31F3FF', - fontSize: 10, // 鍔ㄦ�� - distance: -20 // 鍔ㄦ�� + initData(id) { + let _this = this + this.visible = true + getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => { + if (res.success) { + _this.resultData = res.result.equipment + _this.spindlebeilv = res.result.spindlebeilv + _this.feedbeilv = res.result.feedbeilv + _this.spindleload = res.result.spindleload + _this.rapidfeed = res.result.rapidfeed + _this.runData = res.result.runData + _this.xyzList = res.result.xyzList - }, //鍒诲害鏍囩銆� - axisTick: { - show: false - }, //鍒诲害鏍峰紡 - splitLine: { - show: false - } - }, - { - name: '鍐呴儴瀹界嚎鏉�', - type: 'gauge', - radius: '55%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 4 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鍐呴儴缁嗙嚎鏉�', - type: 'gauge', - radius: '40%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 3 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '闂撮殧鏉″舰', - type: 'gauge', - radius: '52.5%', - z: 4, - splitNumber: 35, - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - opacity: 0 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false, - length: 20, - splitNumber: 1, - lineStyle: { - color: '#122B3C', - width: 1 - } - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鏁版嵁', - type: 'gauge', - radius: '52.5%', - z: 3, - startAngle: 225, - max: 300, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [_this.spindlebeilv / 300, '#31F3FF'], // 鍔ㄦ�� - [1, '#185363'] - ], - width: 4 - } - }, - tooltip: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: true, - fontWeight: 'bold', - fontSize: 12, - color: '#fff' - }, - pointer: { - show: true, - width: 3, - itemStyle: { - color: '#fff' - } - }, - data: [{ - name: '', - value: _this.spindlebeilv - }] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�', - 'type': 'pie', - 'radius': ['4%', '2%'], - 'hoverAnimation': false, - tooltip: { - show: false - }, - cursor: 'default', - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#fff' - }, - animation: false, - 'data': [1] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�2', - 'type': 'pie', - 'radius': '2%', - 'hoverAnimation': false, - cursor: 'default', - tooltip: { - show: false - }, - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#31F3FF' - }, - animation: false, - 'data': [1] - } - ] + // _this.xyzAliasesList = res.result.xyzAliasesList + this.$nextTick(() => { + _this.drawLine() + }) + } else { + _this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + + }, + + resetData() { + this.resultData = {} + this.spindlebeilv = null + this.feedbeilv = null + this.spindleload = null + this.rapidfeed = null + this.runData = [] + this.xyzList = null + }, + + mouseEnterItem(e) { + console.log(e, e.target, e.target.clientWidth, e.target.scrollWidth) + if (e.target.clientWidth >= e.target.scrollWidth) { + e.target.style.pointerEvents = 'none' // 闃绘榧犳爣浜嬩欢 pointer-events 灞炴�х敤浜庤缃厓绱犳槸鍚﹀榧犳爣浜嬩欢鍋氬嚭鍙嶅簲銆� } - mdcEquiMoniGauge1.setOption(mdcEquiMoniGaugeOption1) - } - if (_this.feedbeilv) { - let mdcEquiMoniGauge2 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge2'), 'macarons') - let mdcEquiMoniGaugeOption2 = { - tooltip: { - formatter: '{a} <br/>{b} : {c}%' - }, - - series: [{ - name: '澶栭儴绾�', - type: 'gauge', - radius: '65%', // 鍔ㄦ�� - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#31F3FF'] // 鍔ㄦ�� - ], - width: 1 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { //鏍囬 - show: false - } - }, - { - name: '澶栭儴鍒诲害', - type: 'gauge', - radius: '80%', - min: 0, //鏈�灏忓埢搴� - max: 300, //鏈�澶у埢搴� - splitNumber: 10, //鍒诲害鏁伴噺 - startAngle: 225, - endAngle: -45, - axisLine: { - show: false, - lineStyle: { - color: [ - [1, 'rgba(0,0,0,0)'] - ] - } - }, //浠〃鐩樿酱绾� - axisLabel: { - show: true, - color: '#31F3FF', - fontSize: 10, // 鍔ㄦ�� - distance: -20 // 鍔ㄦ�� - - }, //鍒诲害鏍囩銆� - axisTick: { - show: false - }, //鍒诲害鏍峰紡 - splitLine: { - show: false - } - }, - { - name: '鍐呴儴瀹界嚎鏉�', - type: 'gauge', - radius: '55%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 4 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鍐呴儴缁嗙嚎鏉�', - type: 'gauge', - radius: '40%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 3 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '闂撮殧鏉″舰', - type: 'gauge', - radius: '52.5%', - z: 4, - splitNumber: 35, - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - opacity: 0 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false, - length: 20, - splitNumber: 1, - lineStyle: { - color: '#122B3C', - width: 1 - } - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鏁版嵁', - type: 'gauge', - radius: '52.5%', - z: 3, - startAngle: 225, - max: 300, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [_this.feedbeilv / 300, '#31F3FF'], // 鍔ㄦ�� - [1, '#185363'] - ], - width: 4 - } - }, - tooltip: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: true, - fontWeight: 'bold', - fontSize: 12, - color: '#fff' - }, - pointer: { - show: true, - width: 3, - itemStyle: { - color: '#fff' - } - }, - data: [{ - name: '', - value: _this.feedbeilv - }] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�', - 'type': 'pie', - 'radius': ['4%', '2%'], - 'hoverAnimation': false, - tooltip: { - show: false - }, - cursor: 'default', - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#fff' - }, - animation: false, - 'data': [1] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�2', - 'type': 'pie', - 'radius': '2%', - 'hoverAnimation': false, - cursor: 'default', - tooltip: { - show: false - }, - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#31F3FF' - }, - animation: false, - 'data': [1] - } - ] - } - mdcEquiMoniGauge2.setOption(mdcEquiMoniGaugeOption2) - } - if (_this.spindleload) { - let mdcEquiMoniGauge3 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge3'), 'macarons') - let mdcEquiMoniGaugeOption3 = { - tooltip: { - formatter: '{a} <br/>{b} : {c}%' - }, - - series: [{ - name: '澶栭儴绾�', - type: 'gauge', - radius: '65%', // 鍔ㄦ�� - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#31F3FF'] // 鍔ㄦ�� - ], - width: 1 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { //鏍囬 - show: false - } - }, - { - name: '澶栭儴鍒诲害', - type: 'gauge', - radius: '80%', - min: 0, //鏈�灏忓埢搴� - max: 100, //鏈�澶у埢搴� - splitNumber: 10, //鍒诲害鏁伴噺 - startAngle: 225, - endAngle: -45, - axisLine: { - show: false, - lineStyle: { - color: [ - [1, 'rgba(0,0,0,0)'] - ] - } - }, //浠〃鐩樿酱绾� - axisLabel: { - show: true, - color: '#31F3FF', - fontSize: 10, // 鍔ㄦ�� - distance: -20 // 鍔ㄦ�� - - }, //鍒诲害鏍囩銆� - axisTick: { - show: false - }, //鍒诲害鏍峰紡 - splitLine: { - show: false - } - }, - { - name: '鍐呴儴瀹界嚎鏉�', - type: 'gauge', - radius: '55%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 4 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鍐呴儴缁嗙嚎鏉�', - type: 'gauge', - radius: '40%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 3 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '闂撮殧鏉″舰', - type: 'gauge', - radius: '52.5%', - z: 4, - splitNumber: 35, - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - opacity: 0 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false, - length: 20, - splitNumber: 1, - lineStyle: { - color: '#122B3C', - width: 1 - } - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鏁版嵁', - type: 'gauge', - radius: '52.5%', - z: 3, - startAngle: 225, - max: 100, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [_this.spindleload / 100, '#31F3FF'], // 鍔ㄦ�� - [1, '#185363'] - ], - width: 4 - } - }, - tooltip: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: true, - fontWeight: 'bold', - fontSize: 12, - color: '#fff' - }, - pointer: { - show: true, - width: 3, - itemStyle: { - color: '#fff' - } - }, - data: [{ - name: '', - value: _this.spindleload - }] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�', - 'type': 'pie', - 'radius': ['4%', '2%'], - 'hoverAnimation': false, - tooltip: { - show: false - }, - cursor: 'default', - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#fff' - }, - animation: false, - 'data': [1] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�2', - 'type': 'pie', - 'radius': '2%', - 'hoverAnimation': false, - cursor: 'default', - tooltip: { - show: false - }, - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#31F3FF' - }, - animation: false, - 'data': [1] - } - ] - } - mdcEquiMoniGauge3.setOption(mdcEquiMoniGaugeOption3) - } - if (_this.rapidfeed) { - let mdcEquiMoniGauge4 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge4'), 'macarons') - let mdcEquiMoniGaugeOption4 = { - tooltip: { - formatter: '{a} <br/>{b} : {c}%' - }, - - series: [{ - name: '澶栭儴绾�', - type: 'gauge', - radius: '65%', // 鍔ㄦ�� - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#31F3FF'] // 鍔ㄦ�� - ], - width: 1 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { //鏍囬 - show: false - } - }, - { - name: '澶栭儴鍒诲害', - type: 'gauge', - radius: '80%', - min: 0, //鏈�灏忓埢搴� - max: 300, //鏈�澶у埢搴� - splitNumber: 10, //鍒诲害鏁伴噺 - startAngle: 225, - endAngle: -45, - axisLine: { - show: false, - lineStyle: { - color: [ - [1, 'rgba(0,0,0,0)'] - ] - } - }, //浠〃鐩樿酱绾� - axisLabel: { - show: true, - color: '#31F3FF', - fontSize: 10, // 鍔ㄦ�� - distance: -20 // 鍔ㄦ�� - - }, //鍒诲害鏍囩銆� - axisTick: { - show: false - }, //鍒诲害鏍峰紡 - splitLine: { - show: false - } - }, - { - name: '鍐呴儴瀹界嚎鏉�', - type: 'gauge', - radius: '55%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 4 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鍐呴儴缁嗙嚎鏉�', - type: 'gauge', - radius: '40%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 3 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '闂撮殧鏉″舰', - type: 'gauge', - radius: '52.5%', - z: 4, - splitNumber: 35, - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - opacity: 0 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false, - length: 20, - splitNumber: 1, - lineStyle: { - color: '#122B3C', - width: 1 - } - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鏁版嵁', - type: 'gauge', - radius: '52.5%', - z: 3, - startAngle: 225, - max: 300, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [_this.rapidfeed / 300, '#31F3FF'], // 鍔ㄦ�� - [1, '#185363'] - ], - width: 4 - } - }, - tooltip: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: true, - fontWeight: 'bold', - fontSize: 12, - color: '#fff' - }, - pointer: { - show: true, - width: 3, - itemStyle: { - color: '#fff' - } - }, - data: [{ - name: '', - value: _this.rapidfeed - }] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�', - 'type': 'pie', - 'radius': ['4%', '2%'], - 'hoverAnimation': false, - tooltip: { - show: false - }, - cursor: 'default', - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#fff' - }, - animation: false, - 'data': [1] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�2', - 'type': 'pie', - 'radius': '2%', - 'hoverAnimation': false, - cursor: 'default', - tooltip: { - show: false - }, - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#31F3FF' - }, - animation: false, - 'data': [1] - } - ] - } - mdcEquiMoniGauge4.setOption(mdcEquiMoniGaugeOption4) - } - }, - close() { - this.$emit('close') - this.visible = false - clearInterval(this.modalTimer) - this.modalTimer = null - }, - handleCancel() { - this.close() - clearInterval(this.modalTimer) - this.modalTimer = null - }, - timerModel(id) { - this.modalTimer = setInterval(() => { - setTimeout(this.initData(id), 0) - }, 1000 * 4) - }, - - initData(id) { - let _this = this - this.visible = true - getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => { - if (res.success) { - _this.resultData = res.result.equipment - _this.spindlebeilv = res.result.spindlebeilv - _this.feedbeilv = res.result.feedbeilv - _this.spindleload = res.result.spindleload - _this.rapidfeed = res.result.rapidfeed - _this.runData = res.result.runData - _this.xyzList = res.result.xyzList - - // _this.xyzAliasesList = res.result.xyzAliasesList - this.$nextTick(() => { - _this.drawLine() - }) - } else { - _this.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - - }, - - mouseEnterItem(e) { - console.log(e, e.target, e.target.clientWidth, e.target.scrollWidth) - if (e.target.clientWidth >= e.target.scrollWidth) { - e.target.style.pointerEvents = 'none' // 闃绘榧犳爣浜嬩欢 pointer-events 灞炴�х敤浜庤缃厓绱犳槸鍚﹀榧犳爣浜嬩欢鍋氬嚭鍙嶅簲銆� } } } -} </script> <style scoped lang="less"> -body { - overflow-y: hidden !important; -} - -.full-modal { - .ant-modal { - top: 0; - padding-bottom: 0; - margin: 0; - background-color: #4a4a48 !important; - opacity: 0.5; + body { + overflow-y: hidden !important; } + + .full-modal { + .ant-modal { + top: 0; + padding-bottom: 0; + margin: 0; + background-color: #4a4a48 !important; + opacity: 0.5; + } + /deep/ .ant-modal-content { + display: flex; + flex-direction: column; + background-color: #4a4a48; + } + .ant-modal-body { + flex: 1; + } + } + /deep/ .ant-modal-content { - display: flex; - flex-direction: column; - background-color: #4a4a48; + background-color: #312c2c; + opacity: 0.9; } - .ant-modal-body { - flex: 1; + + /deep/ .ant-modal-close { + color: #1191b0; + font-size: 24px; } -} -/deep/ .ant-modal-content { - background-color: #312c2c; - opacity: 0.9; -} + /deep/ .ant-modal-close-x { + font-size: 24px; + } -/deep/ .ant-modal-close { - color: #1191b0; - font-size: 24px; -} + /deep/ .ant-modal-footer { + border-top: none; + } -/deep/ .ant-modal-close-x { - font-size: 24px; -} + /deep/ .ant-descriptions { + border: 1px solid #16738d; + margin: 10px 0; + } -/deep/ .ant-modal-footer { - border-top: none; -} + /deep/ .ant-descriptions-title { + color: #fff; + padding: 10px; + margin-bottom: 0; + } -/deep/ .ant-descriptions { - border: 1px solid #16738d; - margin: 10px 0; -} + /deep/ .ant-descriptions-view { + padding: 0 20px; + } -/deep/ .ant-descriptions-title { - color: #fff; - padding: 10px; - margin-bottom: 0; -} + /deep/ .ant-descriptions-view .ant-descriptions-row .ant-descriptions-item { + padding-bottom: 5px; + } -/deep/ .ant-descriptions-view { - padding: 0 20px; -} + /deep/ .ant-descriptions-item-colon { + color: #fff; + width: 5.1vw; + } -/deep/ .ant-descriptions-view .ant-descriptions-row .ant-descriptions-item { - padding-bottom: 5px; -} + /deep/ .ant-descriptions-item-content { + color: #fff; + border: 1px solid #4bcfc8; + padding: 0 10px; + width: auto; + min-width: 130px; + /*max-width: 300px;*/ + height: 25px; + } -/deep/ .ant-descriptions-item-colon { - color: #fff; - width: 5.1vw; -} + .mdcEquipMon { + color: #fff; + } -/deep/ .ant-descriptions-item-content { - color: #fff; - border: 1px solid #4bcfc8; - padding: 0 10px; - width: auto; - min-width: 130px; - /*max-width: 300px;*/ - height: 25px; -} + fieldset { + border: 1px solid #16738d; + padding: 17px; + margin: 14px; + } -.mdcEquipMon { - color: #fff; -} + fieldset legend { + display: inline; + width: 88px; + } -fieldset { - border: 1px solid #16738d; - padding: 17px; - margin: 14px; -} + table tr td { + text-align: left; + color: #fff; + } -fieldset legend { - display: inline; - width: 88px; -} + table tr td input { + border: 1px solid #a6eff9; + } -table tr td { - text-align: left; - color: #fff; -} + .ant-btn { + padding: 0 10px; + margin-left: 3px; + color: #fff !important; + background-color: #1191b0; + border: none; + } -table tr td input { - border: 1px solid #a6eff9; -} + .ant-form-item-control { + line-height: 0px; + } -.ant-btn { - padding: 0 10px; - margin-left: 3px; - color: #fff !important; - background-color: #1191b0; - border: none; -} + /** 涓昏〃鍗曡闂磋窛 */ + .ant-form .ant-form-item { + margin-bottom: 10px; + } -.ant-form-item-control { - line-height: 0px; -} + /** Tab椤甸潰琛岄棿璺� */ + .ant-tabs-content .ant-form-item { + margin-bottom: 0px; + } -/** 涓昏〃鍗曡闂磋窛 */ -.ant-form .ant-form-item { - margin-bottom: 10px; -} + /deep/ .ant-descriptions-item-label { + width: 6.7vw; + text-align: right; + margin-right: 10px; + } -/** Tab椤甸潰琛岄棿璺� */ -.ant-tabs-content .ant-form-item { - margin-bottom: 0px; -} + /deep/ .operationData .ant-descriptions-item-content { + width: 130px; + overflow: hidden; + } -/deep/ .ant-descriptions-item-label { - width: 6.7vw; - text-align: right; - margin-right: 10px; -} - -/deep/ .operationData .ant-descriptions-item-content { - width: 130px; - overflow: hidden; -} - -.description-item-class { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} + .description-item-class { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } </style> diff --git a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentLayout.vue b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentLayout.vue index f8099d1..08fee08 100644 --- a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentLayout.vue +++ b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentLayout.vue @@ -2,13 +2,14 @@ <a-card :bordered="false"> <div class="containerequip"> <div class="container_content"> - <div class="contnet" v-for="(item,index) in dataList" :key="index" :class="node == item.equipmentId ? 'addclass' : '' "> + <div class="contnet" v-for="(item,index) in dataList" :key="index" + :class="node == item.equipmentId ? 'addClass' : '' "> - <div class="content_equipment" @click="openDetail(item)"> + <div style="cursor: pointer" @click="openDetail(item)"> <div class="equipment_box"> <div> <img style="width: 11%;" :src="getStatusImgUrl(item.oporation)" alt=""> - <img class="orange" :src="getImgUrl(item.equipmentTypePictures)"> + <img class="deviceImage" :src="getImgUrl(item.equipmentTypePictures)"> </div> </div> </div> @@ -24,7 +25,7 @@ <script> import EquipmentDetailModal from './EquipmentDetailModal' - import {getFileAccessHttpUrl} from '@/api/manage'; + import { getFileAccessHttpUrl } from '@/api/manage' import { getAction } from '@/api/manage' @@ -32,128 +33,96 @@ export default { name: 'EquipmentLayout', components: { EquipmentDetailModal }, - props: { dataList: { + props: { + dataList: { type: Array, required: true, default: [] - }, equipmentId: '' , - node:''}, - data() { - return { - equipMessageTimer:'' - } - }, - created() { - }, - mounted() { - + }, + node: '' }, methods: { - getImgUrl(img){ - if(img == null || img ==''){ - return require("../../../../../assets/default.png"); + getImgUrl(img) { + if (img == null || img == '') { + return require('../../../../../assets/default.png') } return getFileAccessHttpUrl(img) }, - getStatusImgUrl(imgStaus){ - if(imgStaus == 1){ - return require("../../../../../assets/yellow.png"); - }else if(imgStaus == 2){ - return require("../../../../../assets/yellow.png"); - }else if(imgStaus == 3){ - return require("../../../../../assets/green.png"); - }else if(imgStaus ==22){ - return require("../../../../../assets/red.png"); - }else if(imgStaus ==0){ - return require("../../../../../assets/gray.png"); - }else{ - return require("../../../../../assets/gray.png"); + getStatusImgUrl(imgStatus) { + switch (imgStatus) { + case 1: + case 2: + return require('@/assets/yellow.png') + case 3: + return require('@/assets/green.png') + case 22: + return require('@/assets/red.png') + case 5: + return require('@/assets/orange.png') + default: + return require('@/assets/gray.png') } - }, - getBackgroundUrl(imgurl){ - return require("../../../../../assets/"+imgurl+".gif"); }, openDetail(item) { - if(item.oporation == 0){ - // this.$message.warn("璁惧澶勪簬鍏虫満鐘舵�侊紒"); + if (item.oporation == 0) { this.$notification.warning({ - message:'娑堟伅', - description:"璁惧澶勪簬鍏虫満鐘舵�侊紒" - }); - return false; + message: '娑堟伅', + description: '璁惧澶勪簬鍏虫満鐘舵�侊紒' + }) + return false } - console.log(item); - this.$refs.equipmentDetailModal.initData(item.id); - this.$refs.equipmentDetailModal.timerModel(item.id); - // this.equipMessageTimer = setInterval(() => { - // setTimeout( this.$refs.equmentDetaiModel.initData(item.equipmentId),0) - // },1000*10) + this.$refs.equipmentDetailModal.resetData() + this.$refs.equipmentDetailModal.initData(item.id) + this.$refs.equipmentDetailModal.timerModel(item.id) } - }, - beforeDestroy(){ - // clearInterval(this.equipMessageTimer); - // this.equipMessageTimer = null } } </script> <style scoped> - .gray{ - background-image: url("../../../../../assets/gray.gif"); + .deviceImage { -webkit-background-size: 100% 100%; background-size: 100% 100%; background-repeat: no-repeat; } - .green{ - background-image: url("../../../../../assets/green.gif"); - -webkit-background-size: 100% 100%; - background-size: 100% 100%; - background-repeat: no-repeat; - } - .red{ - background-image: url("../../../../../assets/red.gif"); - -webkit-background-size: 100% 100%; - background-size: 100% 100%; - background-repeat: no-repeat; - } - .orange{ - /*background-image: url("../../../../../assets/orange.gif");*/ - -webkit-background-size: 100% 100%; - background-size: 100% 100%; - background-repeat: no-repeat; - } - .equipment_box img{ + + .equipment_box img { width: 45%; } - .containerequip{ + .containerequip { overflow: auto; } - @media screen and (min-width: 1920px){ - .containerequip{ - height: 640px!important; + @media screen and (min-width: 1920px) { + .containerequip { + height: 640px !important; } } - @media screen and (min-width: 1680px) and (max-width: 1920px){ - .containerequip{ - height: 640px!important; + + @media screen and (min-width: 1680px) and (max-width: 1920px) { + .containerequip { + height: 640px !important; } } - @media screen and (min-width: 1400px) and (max-width: 1680px){ - .containerequip{ - height: 493px!important; + + @media screen and (min-width: 1400px) and (max-width: 1680px) { + .containerequip { + height: 493px !important; } } - @media screen and (min-width: 1280px) and (max-width: 1400px){ - .containerequip{ - height: 493px!important; + + @media screen and (min-width: 1280px) and (max-width: 1400px) { + .containerequip { + height: 493px !important; } } - @media screen and (max-width: 1280px){ - .containerequip{ - height: 394px!important; + + @media screen and (max-width: 1280px) { + .containerequip { + height: 394px !important; } } + .container_content { width: 100%; position: relative; @@ -170,7 +139,7 @@ padding-top: 5%; } - .addclass p { + .addClass p { border-bottom: 2px solid #e957ff; } </style> \ No newline at end of file diff --git a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentList.vue b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentList.vue index 727cdb6..ef2bb0a 100644 --- a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentList.vue +++ b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentList.vue @@ -1,84 +1,9 @@ <template> <a-card :bordered="false" style="display: flex;flex-direction: column"> - <!-- 鏌ヨ鍖哄煙 --> - <!--<div class="table-page-search-wrapper">--> - <!--<a-form layout="inline" @keyup.enter.native="searchQuery">--> - <!--<a-row :gutter="24">--> - <!--<a-col :md="7" :sm="7">--> - <!--<a-form-item label="璁惧鍚嶇О">--> - <!--<a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParam.equipmentName"></a-input>--> - <!--</a-form-item>--> - <!--</a-col>--> - <!--<a-col :md="7" :sm="7">--> - <!--<a-form-item label="鐘舵��">--> - <!--<a-select v-model="queryParam.status" placeholder="璇烽�夋嫨">--> - <!--<a-select-option value="">璇烽�夋嫨</a-select-option>--> - <!--<a-select-option value="0">鍏虫満</a-select-option>--> - <!--<a-select-option value="2">寰呮満</a-select-option>--> - <!--<a-select-option value="3">杩愯</a-select-option>--> - <!--<a-select-option value="22">鎶ヨ</a-select-option>--> - <!--</a-select>--> - <!--</a-form-item>--> - <!--</a-col>--> - <!--<a-col :md="3" :sm="3">--> - <!--<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">--> - <!--<a @click="handleToggleSearch" style="margin-left: 8px">--> - <!--{{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}--> - <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>--> - <!--</a>--> - <!--</span>--> - <!--</a-col>--> - <!--</a-row>--> - <!--<a-row :gutter="24">--> - <!--<template v-if="toggleSearchStatus">--> - <!--<a-col :md="12" :sm="12">--> - <!--<a-form-item label="閲囬泦鏃堕棿">--> - <!--<a-range-picker @change="dateParamChange" v-model="dates"/>--> - <!--</a-form-item>--> - <!--</a-col>--> - <!--</template>--> - - <!--</a-row>--> - <!--</a-form>--> - <!--</div>--> - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <!--<div class="table-operator" style="border-top: 5px">--> - <!--<a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>--> - <!--<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>--> - <!--</div>--> - <div class="equipmentList" id="DeviceList"> - <!--<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> - <!--<i class="anticon anticon-info-circle ant-alert-icon"></i>宸查�夋嫨 <a style="font-weight: 600">{{--> - <!--selectedRowKeys.length }}</a>椤� --> - <!--<a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>--> - <!--</div>--> - <a-table ref="table" bordered size="middle" rowKey="equipmentId" :columns="columns" :dataSource="dataSource" - :pagination="false" :loading="loading" :scroll="{x:'max-content',y:scrollY}"> - <!--<template slot="equipmentId" slot-scope="text, record">--> - <!--<div :style="{color:record.equipmentStatus!==0?'#f00':null}">{{text}}</div>--> - <!--</template>--> - <!--<template slot="equipmentName" slot-scope="text, record">--> - <!--<div :style="{color:record.equipmentStatus!==0?'#f00':null}">{{text}}</div>--> - <!--</template>--> - <!--<template slot="oporationDict" slot-scope="text, record">--> - <!--<div :style="{color:record.equipmentStatus!==0?'#f00':null}">{{text}}</div>--> - <!--</template>--> - <template slot="equipmentStatus" slot-scope="text"> - <div>{{text===0?'姝e父':'寮傚父'}}</div> - </template> - <!--<template slot="collecttime" slot-scope="text, record">--> - <!--<div :style="{color:record.equipmentStatus!==0?'#f00':null}">{{text}}</div>--> - <!--</template>--> - <!--<template slot="action" slot-scope="text, record">--> - <!--<a-popconfirm title="纭畾鍙嶉鍚�?" @confirm="$emit('editEquipmentStatus',record)" v-has="'deiveBaseInfo:responseStatus'">--> - <!--<a>鐘舵�佸弽棣�</a>--> - <!--</a-popconfirm>--> - <!--</template>--> - </a-table> - + :pagination="false" :loading="loading" :scroll="{x:'max-content',y:scrollY}"/> </div> </a-card> </template> @@ -113,13 +38,6 @@ width: 200 }, { - title: '璁惧寮傚父', - align: 'center', - dataIndex: 'equipmentStatus', - scopedSlots: { customRender: 'equipmentStatus' }, - width: 200 - }, - { title: '閲囬泦鏃堕棿', align: 'center', dataIndex: 'collecttime', @@ -129,14 +47,6 @@ }, width: 350 } - // { - // title: '鎿嶄綔', - // dataIndex: 'action', - // scopedSlots: {customRender: 'action'}, - // align: "center", - // width: 150, - // fixed:'right' - // } ], scrollY: 465 } diff --git a/src/views/mdc/base/modules/DeviceLog/AlarmLogList.vue b/src/views/mdc/base/modules/DeviceLog/AlarmLogList.vue index 4aa3935..f510ee4 100644 --- a/src/views/mdc/base/modules/DeviceLog/AlarmLogList.vue +++ b/src/views/mdc/base/modules/DeviceLog/AlarmLogList.vue @@ -1,42 +1,27 @@ <template> - <a-card :bordered="false"> - <!-- table鍖哄煙-begin --> - <div class="table_alarmLogist"> - <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns" - :dataSource="dataList" :pagination="false" :loading="loadingwarnStatus"> - <template slot="status" slot-scope="status"> - <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div> - <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div> - <div v-else-if="status == '0'" style="color: #A8A8A8;width: 100%; height: 100%;">鍏虫満</div> - <div v-else-if="status == '22'" style="color: red;width: 100%; height: 100%;">鎶ヨ</div> - </template> - </a-table> - </div> - </a-card> + <div class="table_alarmLogist"> + <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns" + :dataSource="dataList" :pagination="false" :loading="loading"> + <template slot="status" slot-scope="status"> + <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div> + <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div> + <div v-else-if="status == '0'" style="color: #A8A8A8;width: 100%; height: 100%;">鍏虫満</div> + <div v-else-if="status == '22'" style="color: red;width: 100%; height: 100%;">鎶ヨ</div> + </template> + </a-table> + </div> </template> <script> - import JDictSelectTag from '@/components/dict/JDictSelectTag' - - import JInput from '@/components/jeecg/JInput' - import JEllipsis from '@/components/jeecg/JEllipsis' - import Tooltip from 'ant-design-vue/es/tooltip' - export default { name: 'AlarmLogList', - components: { - Tooltip, - JDictSelectTag, - JInput, - JEllipsis - }, props: { dataList: { type: Array, required: true, default: [] }, - loadingwarnStatus:{ + loading:{ type:Boolean, default: false } @@ -55,22 +40,17 @@ title: '鎶ヨ鏃堕棿', align: 'center', dataIndex: 'startTime', - // defaultSortOrder:'descend', - // sorter: (a, b) => {return a.startTime>b.startTime?1:-1} }, { title: '缁撴潫鏃堕棿', align: 'center', dataIndex: 'endTime', - // defaultSortOrder:'descend', - // sorter: (a, b) => {return a.endTime>b.endTime?1:-1} }, { title: '鎸佺画鏃堕棿', align: 'center', dataIndex: 'duration', customRender:(t,r,index) =>{ - // console.log(t) var ss = parseInt(t) if(ss>=3600){ // 鏍规嵁绉掓暟杞崲鎴愬搴旂殑鏃跺垎绉� @@ -91,13 +71,6 @@ return hour + '灏忔椂' + min + '鍒�' + sec + '绉�' } } - // if(sec == '00'){ - // return hour + '灏忔椂' + min + '鍒�' - // } - // if(min == '00' && sec == '00'){ - // return hour + '灏忔椂' - // } - // return hour + '灏忔椂' + min + '鍒�' + sec + '绉�' }else if(60<ss && ss<3600){ const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) @@ -108,8 +81,6 @@ return sec2 + '绉�' } } - // defaultSortOrder:'descend', - // sorter: (a, b) => {return a.duration>b.duration?1:-1} }, { title: '鎶ヨ鍙�', @@ -137,31 +108,31 @@ @media screen and (min-width: 1920px){ .table_alarmLogist{ height: 417px!important; - overflow: scroll; + overflow: auto; } } @media screen and (min-width: 1680px) and (max-width: 1920px){ .table_alarmLogist{ height: 417px!important; - overflow: scroll; + overflow: auto; } } @media screen and (min-width: 1400px) and (max-width: 1680px){ .table_alarmLogist{ height: 266px!important; - overflow: scroll; + overflow: auto; } } @media screen and (min-width: 1280px) and (max-width: 1400px){ .table_alarmLogist{ height: 360px!important; - overflow: scroll; + overflow: auto; } } @media screen and (max-width: 1280px){ .table_alarmLogist{ height: 170px!important; - overflow: scroll; + overflow: auto; } } </style> diff --git a/src/views/mdc/base/modules/DeviceLog/FaultLogList.vue b/src/views/mdc/base/modules/DeviceLog/FaultLogList.vue new file mode 100644 index 0000000..68657a4 --- /dev/null +++ b/src/views/mdc/base/modules/DeviceLog/FaultLogList.vue @@ -0,0 +1,125 @@ +<template> + <div class="table_alarmLogist"> + <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns" + :dataSource="dataList" :pagination="false" :loading="loading"> + <template slot="status" slot-scope="status"> + <div v-if="status == '25'" style="color: #C11900;width: 100%; height: 100%;">鏁呴殰</div> + </template> + </a-table> + </div> +</template> + +<script> + export default { + name: 'FaultLogList', + props: { + dataList: { + type: Array, + required: true, + default: [] + }, + loading: { + type: Boolean, + default: false + } + }, + data() { + return { + disabled: true, + columns: [ + { + title: '鐘舵��', + align: 'center', + dataIndex: 'status', + scopedSlots: { customRender: 'status' } + }, + { + title: '鏁呴殰鏃堕棿', + align: 'center', + dataIndex: 'startTime' + }, + { + title: '缁撴潫鏃堕棿', + align: 'center', + dataIndex: 'endTime' + }, + { + title: '鎸佺画鏃堕棿', + align: 'center', + dataIndex: 'duration', + customRender: (t, r, index) => { + var ss = parseInt(t) + if (ss >= 3600) { + // 鏍规嵁绉掓暟杞崲鎴愬搴旂殑鏃跺垎绉� + const hour = parseInt(ss / 3600) < 10 ? '0' + parseInt(ss / 3600) : parseInt(ss / 3600) + const min = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) + const sec = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) + if (min == '00') { + if (sec == '00') { + return hour + '灏忔椂' + } else { + return hour + '灏忔椂' + sec + '绉�' + } + + } else { + if (sec == '00') { + return hour + '灏忔椂' + min + '鍒�' + } else { + return hour + '灏忔椂' + min + '鍒�' + sec + '绉�' + } + } + + } else if (60 < ss && ss < 3600) { + const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) + const sec1 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) + return min1 + '鍒�' + sec1 + '绉�' + } else { + const sec2 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) + return sec2 + '绉�' + } + } + }, + ] + } + } + } +</script> + +<style lang="less" scoped> + @import '~@assets/less/common.less'; + + @media screen and (min-width: 1920px) { + .table_alarmLogist { + height: 417px !important; + overflow: auto; + } + } + + @media screen and (min-width: 1680px) and (max-width: 1920px) { + .table_alarmLogist { + height: 417px !important; + overflow: auto; + } + } + + @media screen and (min-width: 1400px) and (max-width: 1680px) { + .table_alarmLogist { + height: 266px !important; + overflow: auto; + } + } + + @media screen and (min-width: 1280px) and (max-width: 1400px) { + .table_alarmLogist { + height: 360px !important; + overflow: auto; + } + } + + @media screen and (max-width: 1280px) { + .table_alarmLogist { + height: 170px !important; + overflow: auto; + } + } +</style> diff --git a/src/views/mdc/base/modules/DeviceLog/LogInfo.vue b/src/views/mdc/base/modules/DeviceLog/LogInfo.vue index da70e00..9b03a2c 100644 --- a/src/views/mdc/base/modules/DeviceLog/LogInfo.vue +++ b/src/views/mdc/base/modules/DeviceLog/LogInfo.vue @@ -6,18 +6,18 @@ <a-row :gutter="24"> <a-col :md="4" :sm="4"> <a-form-item label="璁惧缂栧彿"> - <a-input placeholder="璇烽�夋嫨璁惧" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input> + <a-input placeholder="璇烽�夋嫨璁惧" readOnly v-model="queryParams.equipmentId"></a-input> </a-form-item> </a-col> <a-col :md="6" :sm="6"> <a-form-item label="璁惧鍚嶇О"> - <a-input placeholder="璇烽�夋嫨璁惧" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input> + <a-input placeholder="璇烽�夋嫨璁惧" readOnly v-model="queryParams.equipmentName"></a-input> </a-form-item> </a-col> <a-col :md="4" :sm="4"> <a-form-item label="鏃ユ湡"> - <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange" - format='YYYY-MM-DD'/> + <a-date-picker v-model="queryParams.collectTimeStr" :disabledDate="disabledDate" + value-format='YYYY-MM-DD'/> </a-form-item> </a-col> <a-col :md="2" :sm="2" :xs="2"> @@ -29,7 +29,8 @@ </a-row> </a-form> </div> - <div style="width: 100%;height: 180px;border: none;" align="center"> + + <div> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td> @@ -63,9 +64,15 @@ </div> <div v-if="item.status == 22" style="z-index: 999;" :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' - v-for="item in waring"> + v-for="item in warning"> <span :style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span> + </div> + <div v-if="item.status == 25" style="z-index: 1000;" + :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' + v-for="item in fault"> + <span + :style='{display: "inline-block",width:"100%", left:0, height: "50%", background: "#C11900",position:"absolute",bottom:"0"}'></span> </div> </div> </td> @@ -104,56 +111,47 @@ </table> </td> </tr> - <tr> - <td> - <table width="400px;" align="center" style="margin-top: 20px;"> - <tr> - <td align="right"><a id="btnMdcLogPreviousDay" style="margin-right:15px"> - <img @click="dataBefore" src="../../../../../assets/image/left.png" alt=""> - </a></td> - <td align="right">鍏虫満</td> - <td align="left"> - <div style="width: 15px;height: 15px;background-color: #A8A8A8;position: static;"/> - </td> - <td align="right">寰呮満</td> - <td align="left"> - <div style="width: 15px;height: 15px;background-color: #ffea91"/> - </td> - <td align="right">杩愯</td> - <td align="left"> - <div style="width: 15px;height: 15px;background-color: #00ee00"/> - </td> - <td align="right">鎶ヨ</td> - <td align="left"> - <div style="width: 15px;height: 15px;background-color: red"/> - </td> - <td><a id="btnMdcLogAfterDay" style="margin-left:20px"> - <img @click="dataAfter" src="../../../../../assets/image/right.png" alt=""> - </a></td> - </tr> - </table> - </td> - </tr> </table> + + <a-space class="date-change-container"> + <img @click="dataBefore" src="@/assets/image/left.png" alt=""> + <span>鍏虫満</span> + <div style="background-color: #A8A8A8"/> + <span>寰呮満</span> + <div style="background-color: #ffea91"/> + <span>杩愯</span> + <div style="background-color: #00ee00"/> + <span>鎶ヨ</span> + <div style="background-color: #f00"/> + <span>鏁呴殰</span> + <div style="background-color: #C11900"/> + <img @click="dataAfter" src="@/assets/image/right.png" alt=""> + </a-space> </div> - <div id="mdcLogTabs" class="mdcLogTabs-title" style="width: 100%;"> + + <div id="mdcLogTabs" class="mdcLogTabs-title"> <div> - <a-tabs :activeKey="activeKey" @change="tabChange"> + <a-tabs> <a-tab-pane key="1" tab="璁惧鏃ュ織" force-render> - <log-list :dataList='normalList' ref="logList" :loadingequip='loadingStatus'></log-list> + <log-list :dataList='normalList' :loading='loading'/> </a-tab-pane> <a-tab-pane key="2" tab="杩愯鏃ュ織"> - <work-log-list :dataList='runList' ref="workLogList" :loadingrun="loadingRunStatus"></work-log-list> + <work-log-list :dataList='runList' :loading="loading"/> </a-tab-pane> <a-tab-pane key="3" tab="鎶ヨ鏃ュ織"> - <alarm-log-list :dataList='waringList' ref="alarmLogList" :loadingwarn="loadingWarnStatus"></alarm-log-list> + <alarm-log-list :dataList='warningList' :loading="loading"/> + </a-tab-pane> + <a-tab-pane key="4" tab="鏁呴殰鏃ュ織"> + <fault-log-list :dataList='faultList' :loading="loading"/> </a-tab-pane> </a-tabs> </div> </div> + <work-chart-model ref="workChartModel" :collectTime="this.queryParams.collectTime" - :equipment="this.equipment"></work-chart-model> - <work-history-model ref="workHistoryModel"></work-history-model> + :equipment="equipment"/> + + <work-history-model ref="workHistoryModel"/> </div> </template> @@ -163,12 +161,14 @@ import LogList from './LogList' import WorkLogList from './WorkLogList' import AlarmLogList from './AlarmLogList' + import FaultLogList from './FaultLogList' import WorkChartModel from './WorkChartModel' import WorkHistoryModel from './WorkHistoryModel' import { getAction } from '@/api/manage' export default { - components: { + components: { + FaultLogList, LogList, WorkLogList, AlarmLogList, @@ -178,101 +178,82 @@ props: { equipment: {} }, data() { return { - readOnly: true, - defaultId: '', - defaultName: '', - middleTime: '', queryParam: {}, queryParams: { - collectTime: undefined + collectTimeStr: moment().format('YYYY-MM-DD') }, - loadingStatus: false, - loadingRunStatus: false, - loadingWarnStatus: false, + loading: false, normal: [], - waring: [], + warning: [], + fault: [], normalList: [], - waringList: [], + warningList: [], + faultList: [], runList: [], - activeKey: '1', - equipment: {}, url: { - getBaseTree: '/mdc/mdcequipment/loadTree', getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid', list: '/mdc/mdcEquipmentRunningSection/logList' - }, - ProStartId: '' + } } }, methods: { - tabChange(val) { - this.activeKey = val - }, disabledDate(current) { return current && current > moment().subtract('days', 0) }, queryChart() { - // this.normal = [] - // this.waring = [] - this.loadingStatus = true - this.loadingRunStatus = true - this.loadingWarnStatus = true - getAction(this.url.list, this.queryParams).then((res) => { - this.normalList = [] - this.waringList = [] - this.runList = [] - this.loadingStatus = false - this.loadingRunStatus = false - this.loadingWarnStatus = false - this.normal = [] - this.waring = [] - if (res.success) { - if (res.result != null) { - for (let i = 0; i < res.result.length; i++) { - this.normalList.push(res.result[i]) - if ('22' == res.result[i].status) { - this.waringList.push(res.result[i]) + this.loading = true + this.normalList = [] + this.warningList = [] + this.runList = [] + this.faultList = [] + this.normal = [] + this.warning = [] + this.fault = [] + getAction(this.url.list, this.queryParams) + .then((res) => { + if (res.success) { + if (res.result != null) { + for (let i = 0; i < res.result.length; i++) { + this.normalList.push(res.result[i]) res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%' - let leftTmp = (moment(res.result[i].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 - res.result[i].left = leftTmp / 86400 * 100 + '%' - this.waring.push(res.result[i]) - - } else if ('3' == res.result[i].status) { - this.runList.push(res.result[i]) - res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%' - this.normal.push(res.result[i]) - } else { - res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%' - this.normal.push(res.result[i]) + if ('22' == res.result[i].status) { + let leftTmp = (moment(res.result[i].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 + res.result[i].left = leftTmp / 86400 * 100 + '%' + this.warning.push(res.result[i]) + this.warningList.push(res.result[i]) + } else if ('25' == res.result[i].status) { + let leftTmp = (moment(res.result[i].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 + res.result[i].left = leftTmp / 86400 * 100 + '%' + this.faultList.push(res.result[i]) + this.fault.push(res.result[i]) + } else if ('3' == res.result[i].status) { + this.runList.push(res.result[i]) + this.normal.push(res.result[i]) + } else { + this.normal.push(res.result[i]) + } } } } - } - }).finally(() => { - this.loading = false - this.cardLoading = false - }) - }, - dataChange(val) { - this.queryParams.collectTime = val - this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') + }) + .finally(() => { + this.loading = false + }) }, searchQuery() { - // console.log(this.queryParams.collectTime) - this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') if (!this.queryParams.equipmentId || !this.queryParams.equipmentName) { this.$notification.warning({ message: '娑堟伅', - description: '璇烽�夋嫨璁惧' + description: '璇烽�夋嫨璁惧杩涜鏌ヨ' }) - return false + return } this.queryChart() }, searchReset() { this.queryParams = { - collectTime : moment() - } + collectTimeStr: moment().format('YYYY-MM-DD') + } this.equipment = {} this.queryChart() }, @@ -282,12 +263,13 @@ message: '娑堟伅', description: '璇烽�夋嫨璁惧杩涜鏌ヨ' }) - } else { - // 鍒ゆ柇鏄惁鐐瑰嚮璁惧鏃ュ織琛ㄦ牸琛岀殑鏁版嵁锛屾鏃朵负鐐瑰嚮琛ㄦ牸鏁版嵁涓篺alse - this.$refs.workChartModel.isClicklogListRow = false - this.$refs.workChartModel.add(this.equipment) - this.$refs.workChartModel.title = '宸ヤ綔鏇茬嚎' + return } + + // 鍒ゆ柇鏄惁鐐瑰嚮璁惧鏃ュ織琛ㄦ牸琛岀殑鏁版嵁锛屾鏃朵负鐐瑰嚮琛ㄦ牸鏁版嵁涓篺alse + this.$refs.workChartModel.isClicklogListRow = false + this.$refs.workChartModel.add(this.equipment) + this.$refs.workChartModel.title = '宸ヤ綔鏇茬嚎' }, openHistoryChart() { if (!this.equipment.equipmentId) { @@ -295,27 +277,26 @@ message: '娑堟伅', description: '璇烽�夋嫨璁惧杩涜鏌ヨ' }) - } else { - this.$refs.workHistoryModel.add(this.equipment) - this.$refs.workHistoryModel.title = '鍘嗗彶鏃ュ織' + return } + this.$refs.workHistoryModel.add(this.equipment) + this.$refs.workHistoryModel.title = '鍘嗗彶鏃ュ織' }, dataBefore() { - this.queryParams.collectTime = moment(this.queryParams.collectTime.add(-1, 'd'), 'YYYY-MM-DD') + this.queryParams.collectTimeStr = moment(this.queryParams.collectTimeStr).add(-1, 'd').format('YYYY-MM-DD') this.searchQuery() }, dataAfter() { - if ((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')) { + if (moment(this.queryParams.collectTimeStr).isSame(moment(), 'd')) { this.$notification.warning({ message: '娑堟伅', description: '璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�' }) - } else { - this.queryParams.collectTime = moment(this.queryParams.collectTime.add(1, 'd'), 'YYYY-MM-DD') - this.searchQuery() + return } - + this.queryParams.collectTimeStr = moment(this.queryParams.collectTimeStr).add(1, 'd').format('YYYY-MM-DD') + this.searchQuery() }, initEquipment(id) { let _this = this @@ -324,11 +305,10 @@ if (res.result != null) { _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName) _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId) - _this.equipment = res.result - _this.searchQuery() + _this.$emit('initEquipment', res.result) } else { - this.queryParams = {} - this.equipment = {} + _this.queryParams = {} + _this.$emit('initEquipment', {}) _this.$notification.warning({ message: '娑堟伅', description: '璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' @@ -345,8 +325,6 @@ } }, created() { - this.queryParams.collectTime = moment() - this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') this.initEquipment() }, watch: { @@ -354,7 +332,6 @@ if (val && val.equipmentId) { this.$set(this.queryParams, 'equipmentName', val.equipmentName) this.$set(this.queryParams, 'equipmentId', val.equipmentId) - this.equipment = val this.searchQuery() } else { this.initEquipment(val.key) @@ -364,48 +341,25 @@ } </script> -<style scoped="scoped"> - .mdcLogTabs-title { +<style scoped="scoped" lang="less"> + .date-change-container { display: flex; - width: 100%; - } + align-items: center; + justify-content: center; + margin-top: 20px; - .mdcLogTabs-title > div { - margin: 2px 5px; - width: 100%; - color: #000; - font-weight: 600; - padding: 3px; - border-radius: 5px; - } + /deep/ .ant-space-item { + display: flex; + align-items: center; - .btnMdcLogSearch { - position: relative; - margin-left: 10px; - } + > div { + width: 15px; + height: 15px; + } + } - .btnMdcLogSearch .btnMdcLogSearchZi { - position: absolute; - left: 3px; + img { + cursor: pointer; + } } - - .btnMdcLogSearch input { - padding-left: 23px; - border-radius: 5px; - outline: none; - color: #000; - border: 1px solid #000; - } - - #mdcLogShow { - display: flex; - } - - #mdcLogShow > div { - flex: 1; - } - - /*.mdcLogShowOne{*/ - /*position: absolute;*/ - /*}*/ </style> diff --git a/src/views/mdc/base/modules/DeviceLog/LogList.vue b/src/views/mdc/base/modules/DeviceLog/LogList.vue index 4888611..6a5292b 100644 --- a/src/views/mdc/base/modules/DeviceLog/LogList.vue +++ b/src/views/mdc/base/modules/DeviceLog/LogList.vue @@ -1,52 +1,31 @@ <template> - <a-card :bordered="false"> - <!-- table鍖哄煙-begin --> - <div class="table_logList"> - <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns" - :dataSource="dataList" :pagination="ipagination" :loading="loadingequip" @change="handleTableChange" - :customRow="rowClick"> - <template slot="status" slot-scope="status"> - <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div> - <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div> - <div v-else-if="status == '0'" style="color: #A8A8A8;width: 100%; height: 100%;">鍏虫満</div> - <div v-else-if="status == '22'" style="color: red;width: 100%; height: 100%;">鎶ヨ</div> - </template> - </a-table> - </div> - </a-card> + <div class="table_logList"> + <a-table ref="table" bordered :rowKey="(record,index)=>{return index}" :columns="columns" + :dataSource="dataList" :pagination="ipagination" :loading="loading" @change="handleTableChange" + :customRow="rowClick"> + <template slot="status" slot-scope="status"> + <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div> + <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div> + <div v-else-if="status == '0'" style="color: #A8A8A8;width: 100%; height: 100%;">鍏虫満</div> + <div v-else-if="status == '22'" style="color: red;width: 100%; height: 100%;">鎶ヨ</div> + <div v-else-if="status == '25'" style="color: #C11900;width: 100%; height: 100%;">鏁呴殰</div> + </template> + </a-table> + </div> </template> <script> - import JDictSelectTag from '@/components/dict/JDictSelectTag' - import { - requestPut, - deleteAction - } from '@/api/manage' - - import JInput from '@/components/jeecg/JInput' - import JEllipsis from '@/components/jeecg/JEllipsis' - import Tooltip from 'ant-design-vue/es/tooltip' - import { - JeecgListMixin - } from '@/mixins/JeecgListMixin' import moment from 'moment' export default { name: 'LogList', - mixins: [JeecgListMixin], - components: { - Tooltip, - JDictSelectTag, - JInput, - JEllipsis - }, props: { dataList: { type: Array, required: true, default: [] }, - loadingequip: { + loading: { type: Boolean, default: false } @@ -54,10 +33,6 @@ watch: {}, data() { return { - statusName: '', - disabled: true, - disableMixinCreated: true, - loading: false, ipagination: { current: 1, pageSize: 100, @@ -116,14 +91,6 @@ return hour + '灏忔椂' + min + '鍒�' + sec + '绉�' } } - // if(sec == '00'){ - // return hour + '灏忔椂' + min + '鍒�' - // } - // if(min == '00' && sec == '00'){ - // return hour + '灏忔椂' - // } - // return hour + '灏忔椂' + min + '鍒�' + sec + '绉�' - } else if (60 < ss && ss < 3600) { const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) const sec1 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) @@ -153,7 +120,6 @@ this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc' } this.ipagination = pagination - // this.loadData(); }, /** * 缁欒澶囨棩蹇楄〃鏍间腑鐨勮娣诲姞鐐瑰嚮浜嬩欢 @@ -162,6 +128,9 @@ */ rowClick(record) { return { + style: { + cursor: 'pointer' + }, on: { click: () => { // 鍏虫満鐘舵�佽澶囨棩蹇椾笉寮瑰嚭宸ヤ綔鏇茬嚎 @@ -175,10 +144,7 @@ } } } - }, - created() { } - } </script> @@ -188,35 +154,35 @@ @media screen and (min-width: 1920px) { .table_logList { height: 417px !important; - overflow: scroll; + overflow: auto; } } @media screen and (min-width: 1680px) and (max-width: 1920px) { .table_logList { height: 417px !important; - overflow: scroll; + overflow: auto; } } @media screen and (min-width: 1400px) and (max-width: 1680px) { .table_logList { height: 266px !important; - overflow: scroll; + overflow: auto; } } @media screen and (min-width: 1280px) and (max-width: 1400px) { .table_logList { height: 360px !important; - overflow: scroll; + overflow: auto; } } @media screen and (max-width: 1280px) { .table_logList { height: 170px !important; - overflow: scroll; + overflow: auto; } } </style> diff --git a/src/views/mdc/base/modules/DeviceLog/WorkChartModel.vue b/src/views/mdc/base/modules/DeviceLog/WorkChartModel.vue index 864753c..4159410 100644 --- a/src/views/mdc/base/modules/DeviceLog/WorkChartModel.vue +++ b/src/views/mdc/base/modules/DeviceLog/WorkChartModel.vue @@ -4,67 +4,63 @@ :footer="null" :visible="visible" @cancel="handleCancel" cancelText="鍏抽棴"> <div> - <div> - <a-row :gutter="24"> - <a-col :span="6"> - <a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input> - </a-form-item> - </a-col> - <a-col :span="6"> - <a-form-item label="鏃ユ湡" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-date-picker v-model="queryParams.paramDate" :disabledDate="disabledDate" format='YYYY-MM-DD'/> - </a-form-item> - </a-col> - <a-col :span="6"> - <a-form-item label="閲囨牱鍛ㄦ湡" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-input-number v-model="queryParams.period"/> - </a-form-item> - </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span="6"> - <a-form-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input> - </a-form-item> + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input> + </a-form-item> + </a-col> + <a-col :span="6"> + <a-form-item label="鏃ユ湡" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-date-picker v-model="queryParams.paramDate" :disabledDate="disabledDate" format='YYYY-MM-DD'/> + </a-form-item> + </a-col> + <a-col :span="6"> + <a-form-item label="閲囨牱鍛ㄦ湡" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input-number v-model="queryParams.period"/> + </a-form-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input> + </a-form-item> + </a-col> + <a-col :span="6"> + <a-form-item label="鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <div class="params_time"> + <a-time-picker :open="stratOpen" format="HH:mm" @openChange="timeHandleChange('start')" + v-model="queryParams.start"> + <a-button slot="addon" size="small" type="primary" @click="timeHandleClose('start')"> + 纭畾 + </a-button> + </a-time-picker> + <a-time-picker :open="endOpen" format="HH:mm" @openChange="timeHandleChange('end')" + v-model="queryParams.end"> + <a-button slot="addon" size="small" type="primary" @click="timeHandleClose('end')"> + 纭畾 + </a-button> + </a-time-picker> + </div> + </a-form-item> + </a-col> + <a-col :span="4"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </a-col> + </a-row> - </a-col> - <a-col :span="10"> - <a-form-item label="鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <div class="params_time"> - <a-time-picker :open="stratOpen" format="HH:mm" @openChange="timeHandleChange('start')" - v-model="queryParams.start"> - <a-button slot="addon" size="small" type="primary" @click="timeHandleClose('start')"> - 纭畾 - </a-button> - </a-time-picker> - <a-time-picker :open="endOpen" format="HH:mm" @openChange="timeHandleChange('end')" - v-model="queryParams.end"> - <a-button slot="addon" size="small" type="primary" @click="timeHandleClose('end')"> - 纭畾 - </a-button> - </a-time-picker> - </div> - </a-form-item> - </a-col> - <a-col :span="4"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - </a-col> - </a-row> - - </div> - <div class="checkboxgroup"> - <p>缁熻鍙傛暟</p> - <div class="checkboxgroup_con"> - <a-checkbox-group name="checkboxgroup" :value="option" :options="plainOptions" @change="checkboxOnChange"/> - </div> - </div> - - - <a-spin :spinning="spinning"> - <div id="workChart" style="width:85%;height: 500px;"/> - </a-spin> </div> + <div class="checkboxgroup"> + <p>缁熻鍙傛暟</p> + <div class="checkboxgroup_con"> + <a-checkbox-group name="checkboxgroup" :value="option" :options="plainOptions" @change="checkboxOnChange"/> + </div> + </div> + + <a-spin :spinning="spinning"> + <div id="workChart" style="width:85%;height: 500px;"/> + </a-spin> </a-modal> </div> </template> @@ -312,8 +308,8 @@ boundaryGap: [0, '15%'], axisLine: { show: true, - lineStyle:{ - color:'#5470C6' + lineStyle: { + color: '#5470C6' } } }, @@ -325,8 +321,8 @@ boundaryGap: [0, '15%'], axisLine: { show: true, - lineStyle:{ - color:'#91CC75' + lineStyle: { + color: '#91CC75' } } }, @@ -338,8 +334,8 @@ boundaryGap: [0, '15%'], axisLine: { show: true, - lineStyle:{ - color:'#FAC858' + lineStyle: { + color: '#FAC858' } } } @@ -376,7 +372,7 @@ temp.push(item) } } - console.log('temp',temp) + console.log('temp', temp) getAction(this.url.workChart, param).then((res) => { if (JSON.stringify(res.result) == '[]' || res.result == null) { // this.$message.warning('鏃犳暟鎹紒') @@ -428,8 +424,8 @@ result.push(line) } - console.log('result===========',result) - console.log('legend=============',lengenddata) + console.log('result===========', result) + console.log('legend=============', lengenddata) // option.yAxis = Yarr; option.series = result option.legend = lengenddata @@ -476,51 +472,8 @@ } } - /deep/ .ant-modal { - /*background-color: #000;*/ - /*color: #fff;*/ - } - - /deep/ .ant-modal-header { - /*background-color: #000;*/ - } - - /deep/ .ant-modal-title { - /*color: #fff;*/ - } - - /deep/ .ant-modal-close { - color: #1191b0; - font-size: 24px; - } - /deep/ .ant-modal-content { - /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/ - /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/ - /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ - /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ - /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ - /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ - /*background-color: #000;*/ - /*color: #fff;*/ position: relative; - } - - /deep/ .ant-modal-header { - /*border-bottom: none!important;*/ - } - - /deep/ .ant-checkbox-wrapper { - /*color: #fff;*/ - } - - /deep/ .ant-form-item-label label { - /*color: #fff;*/ - } - - /deep/ .ant-btn { - /*position: absolute;*/ - } .checkboxgroup { diff --git a/src/views/mdc/base/modules/DeviceLog/WorkHistoryModel.vue b/src/views/mdc/base/modules/DeviceLog/WorkHistoryModel.vue index 44f7cef..a5682c5 100644 --- a/src/views/mdc/base/modules/DeviceLog/WorkHistoryModel.vue +++ b/src/views/mdc/base/modules/DeviceLog/WorkHistoryModel.vue @@ -1,166 +1,167 @@ <template> <div ref="workHistory"> - <a-modal :title="title" width="80%" :getContainer="() => this.$refs.workHistory" wrap-class-name="full-modal" :visible="visible" - @cancel="handleCancel" cancelText="鍏抽棴" :footer="null"> - <div> - <div class="his_params"> - <a-form layout="inline"> - <a-form-item label="璁惧缂栧彿"> - <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="true" v-model="queryParams.equipmentId"></a-input> - </a-form-item> - <a-form-item label="璁惧鍚嶇О"> - <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="true" v-model="queryParams.equipmentName"></a-input> - </a-form-item> - <a-form-item label="鏃ユ湡"> - <a-range-picker v-model="dates" :disabledDate="disabledDate" @change="dateParamChange" format='YYYY-MM-DD'/> - </a-form-item> - <a-button type="primary" @click="queryCharts" icon="search">鏌ヨ</a-button> - </a-form> - </div> - <div style="width: 100%;border: none;" align="center"> - <table cellpadding="0" cellspacing="0" width="100%"> - <tr> - <td> - <table width="100%"> - <tr style="word-break: keep-all;"> - <td width="100%" height="100%"> - <table width="100%" height="100%" align="center" cellpadding="0" cellspacing="0" style="border-collapse:separate; border-spacing:10px;"> - <tr v-for="info in listInfo" > - <td align="left">{{info.date}}</td> - <td style="word-break: keep-all;" align="left"> - <div - style="width: 100%; height: 62px;border: 1px solid;border-color: #9d9d9d;position: relative"> - <div class="mdcLogShowOne" - :style='{display: "inline-block",width:item.dateProportion, height: "100%"}' - v-for="item in info.value.normal"> + <a-modal :title="title" width="80%" :getContainer="() => this.$refs.workHistory" wrap-class-name="full-modal" + :visible="visible" + @cancel="handleCancel" cancelText="鍏抽棴" :footer="null"> + <div> + <div class="his_params"> + <a-form layout="inline"> + <a-form-item label="璁惧缂栧彿"> + <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="true" v-model="queryParams.equipmentId"></a-input> + </a-form-item> + <a-form-item label="璁惧鍚嶇О"> + <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="true" v-model="queryParams.equipmentName"></a-input> + </a-form-item> + <a-form-item label="鏃ユ湡"> + <a-range-picker v-model="dates" :disabledDate="disabledDate" @change="dateParamChange" + format='YYYY-MM-DD'/> + </a-form-item> + <a-button type="primary" @click="queryCharts" icon="search">鏌ヨ</a-button> + </a-form> + </div> + <div style="width: 100%;border: none;" align="center"> + <table cellpadding="0" cellspacing="0" width="100%"> + <tr> + <td> + <table width="100%"> + <tr style="word-break: keep-all;"> + <td width="100%" height="100%"> + <table width="100%" height="100%" align="center" cellpadding="0" cellspacing="0" + style="border-collapse:separate; border-spacing:10px;"> + <tr v-for="info in listInfo"> + <td align="left">{{info.date}}</td> + <td style="word-break: keep-all;" align="left"> + <div + style="width: 100%; height: 62px;border: 1px solid;border-color: #9d9d9d;position: relative"> + <div class="mdcLogShowOne" + :style='{display: "inline-block",width:item.dateProportion, height: "100%"}' + v-for="item in info.value.normal"> <span v-if="item.status == 0" :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#A8A8A8",position:"absolute",top:"0"}'></span> - <span v-if="item.status == 1" - :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span> - <span v-if="item.status == 2" - :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span> - <span v-if="item.status == 3" - :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",top:"0"}'></span> - <span v-if="item.status == 23" - :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span> - </div> - <div style="z-index: 999;" - :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' - v-for="item in info.value.waring"> + <span v-if="item.status == 1" + :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span> + <span v-if="item.status == 2" + :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span> + <span v-if="item.status == 3" + :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",top:"0"}'></span> + <span v-if="item.status == 23" + :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span> + </div> + <div style="z-index: 999;" + :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' + v-for="item in info.value.waring"> <span :style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span> + </div> + <div style="z-index: 1000;" + :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' + v-for="item in info.value.fault"> + <span + :style='{display: "inline-block",width:"100%", left:0, height: "50%", background: "#C11900",position:"absolute",bottom:"0"}'></span> + </div> </div> - </div> - </td> - </tr> - <tr> - <td align="right">0</td> - <td width="95%"> - <table width="100%;" cellpadding="0" cellspacing="0"> - <tr align="right" style="word-break: keep-all;"> - <td>02:00</td> - <td>04:00</td> - <td>06:00</td> - <td>08:00</td> - <td>10:00</td> - <td>12:00</td> - <td>14:00</td> - <td>16:00</td> - <td>18:00</td> - <td>20:00</td> - <td>22:00</td> - <td>24:00</td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> + </td> + </tr> + <tr> + <td align="right">0</td> + <td width="95%"> + <table width="100%;" cellpadding="0" cellspacing="0"> + <tr align="right" style="word-break: keep-all;"> + <td>02:00</td> + <td>04:00</td> + <td>06:00</td> + <td>08:00</td> + <td>10:00</td> + <td>12:00</td> + <td>14:00</td> + <td>16:00</td> + <td>18:00</td> + <td>20:00</td> + <td>22:00</td> + <td>24:00</td> + </tr> + </table> + </td> + </tr> + </table> + </td> + </tr> + </table> + </td> + </tr> - </table> + </table> + </div> </div> - </div> - </a-modal> + </a-modal> </div> </template> <script> import moment from 'moment' - import * as echarts from 'echarts' - import { - getAction, - postAction - } from '@/api/manage' - import { - duplicateCheck - } from '@/api/api' + import { getAction } from '@/api/manage' export default { name: 'WorkHistoryModel', - components: {}, - props: { waring:[],}, data() { return { title: '', listInfo: [], dates: [], - node: {}, - - stratOpen: false, - endOpen: false, visible: false, - show: false, queryParams: {}, url: { logCharts: '/mdc/mdcEquipmentRunningSection/logCharts' } } }, - mounted() { - }, methods: { - disabledDate(current){ - return current && current > moment().subtract('days', 1); + disabledDate(current) { + return current && current > moment().subtract('days', 1) }, queryCharts() { let _this = this - getAction(this.url.logCharts, this.queryParams).then((res) => { - if (res.success) { - for (let i = 0; i < res.result.length; i++) { - let tmp = res.result[i].value - // console.log(tmp) - if (tmp) { - if (tmp.normal) { - for (let k = 0; k < tmp.normal.length; k++) { - tmp.normal[k].dateProportion = tmp.normal[k].duration / 86400 * 100 + '%' - // let leftTmp = (moment(tmp.normal[i].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 - // tmp.normal[i].left = leftTmp / 86400 * 100 + '%' + this.listInfo = [] + getAction(this.url.logCharts, this.queryParams) + .then((res) => { + if (res.success) { + for (let i = 0; i < res.result.length; i++) { + let tmp = res.result[i].value + if (tmp) { + if (tmp.normal) { + for (let k = 0; k < tmp.normal.length; k++) { + tmp.normal[k].dateProportion = tmp.normal[k].duration / 86400 * 100 + '%' + } + } else { + tmp.normal = [] } - } else { - tmp.normal = [] - } - if (tmp.waring) { - // console.log("娴嬭瘯鍒ゆ柇") - for (let j = 0; j < tmp.waring.length; j++) { - tmp.waring[j].dateProportion = tmp.waring[j].duration / 86400 * 100 + '%' - let leftTmp = (moment(tmp.waring[j].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 - tmp.waring[j].left = leftTmp / 86400 * 100 + '%' + if (tmp.waring) { + for (let j = 0; j < tmp.waring.length; j++) { + tmp.waring[j].dateProportion = tmp.waring[j].duration / 86400 * 100 + '%' + let leftTmp = (moment(tmp.waring[j].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 + tmp.waring[j].left = leftTmp / 86400 * 100 + '%' + } + } else { + tmp.waring = [] } - } else { - tmp.waring = [] + if (tmp.fault) { + for (let j = 0; j < tmp.fault.length; j++) { + tmp.fault[j].dateProportion = tmp.fault[j].duration / 86400 * 100 + '%' + let leftTmp = (moment(tmp.fault[j].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 + tmp.fault[j].left = leftTmp / 86400 * 100 + '%' + } + } else { + tmp.fault = [] + } } - } else { - res.result[i].value = { normal: [], waring: [] } + else { + res.result[i].value = { normal: [], waring: [], fault: [] } + } } + _this.listInfo = res.result } - _this.listInfo = res.result - } - }) + }) }, dateParamChange(v1, v2) { this.queryParams.startTime = v2[0] @@ -169,7 +170,6 @@ add(node) { let _this = this this.visible = true - this.node = node this.queryParams = { equipmentId: node.equipmentId, equipmentName: node.equipmentName @@ -183,79 +183,8 @@ }, handleCancel() { this.visible = false - }, - close() { - this.visible = false - this.show = false } } } </script> -<style scoped lang="less"> - .full-modal { - .ant-modal { - max-width: 100%; - top: 0; - padding-bottom: 0; - margin: 0; - } - .ant-modal-content { - display: flex; - flex-direction: column; - height: calc(100vh); - } - .ant-modal-body { - flex: 1; - } - } - /deep/ .ant-modal{ - /*background-color: #000;*/ - /*color: #fff;*/ - } - /deep/ .ant-modal-header{ - /*background-color: #000;*/ - } - /deep/ .ant-modal-title{ - /*color: #fff;*/ - } - /deep/ .ant-modal-close{ - color: #1191b0; - font-size: 24px; - } - /deep/ .ant-modal-content{ - /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/ - /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/ - /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ - /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ - /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ - /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ - /*background-color: #000;*/ - /*color: #fff;*/ - position: relative; - } - /deep/ .ant-modal-header{ - /*border-bottom: none!important;*/ - } - /deep/ .ant-form-item-label label{ - /*color: #fff;*/ - } - /*.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> diff --git a/src/views/mdc/base/modules/DeviceLog/WorkLogList.vue b/src/views/mdc/base/modules/DeviceLog/WorkLogList.vue index badd7f4..2d4e1f2 100644 --- a/src/views/mdc/base/modules/DeviceLog/WorkLogList.vue +++ b/src/views/mdc/base/modules/DeviceLog/WorkLogList.vue @@ -1,46 +1,28 @@ <template> - <a-card :bordered="false"> - <!-- table鍖哄煙-begin --> - <div class="table_workLogist"> - <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns" - :dataSource="dataList" :pagination="false" :loading="loadingrunStatus"> - <template slot="status" slot-scope="status"> - <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div> - <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div> - <div v-else-if="status == '0'" style="color: #A8A8A8;width: 100%; height: 100%;">鍏虫満</div> - <div v-else-if="status == '22'" style="color: red;width: 100%; height: 100%;">鎶ヨ</div> - </template> - </a-table> - </div> - </a-card> + <div class="table_workLogist"> + <a-table ref="table" bordered :rowKey="(record,index)=>{return index}" :columns="columns" + :dataSource="dataList" :pagination="false" :loading="loading"> + <template slot="status" slot-scope="status"> + <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div> + <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div> + <div v-else-if="status == '0'" style="color: #A8A8A8;width: 100%; height: 100%;">鍏虫満</div> + <div v-else-if="status == '22'" style="color: red;width: 100%; height: 100%;">鎶ヨ</div> + </template> + </a-table> + </div> </template> <script> - import JDictSelectTag from '@/components/dict/JDictSelectTag' - import { - requestPut, - deleteAction - } from '@/api/manage' - import JInput from '@/components/jeecg/JInput' - import JEllipsis from '@/components/jeecg/JEllipsis' - import Tooltip from 'ant-design-vue/es/tooltip' - export default { name: 'WorkLogList', - components: { - Tooltip, - JDictSelectTag, - JInput, - JEllipsis - }, props: { dataList: { type: Array, required: true, default: [] }, - loadingrunStatus:{ - type:Boolean, + loading: { + type: Boolean, default: false } }, @@ -58,62 +40,47 @@ { title: '寮�濮嬫椂闂�', align: 'center', - dataIndex: 'startTime', - // defaultSortOrder:'descend', - // sorter: (a, b) => {return a.startTime>b.startTime?1:-1} + dataIndex: 'startTime' }, { title: '缁撴潫鏃堕棿', align: 'center', - dataIndex: 'endTime', - // defaultSortOrder:'descend', - // sorter: (a, b) => {return a.endTime>b.endTime?1:-1} + dataIndex: 'endTime' }, { title: '鎸佺画鏃堕棿', align: 'center', dataIndex: 'duration', - customRender:(t,r,index) =>{ - // console.log(t) + customRender: (t, r, index) => { var ss = parseInt(t) - if(ss>=3600){ + if (ss >= 3600) { // 鏍规嵁绉掓暟杞崲鎴愬搴旂殑鏃跺垎绉� const hour = parseInt(ss / 3600) < 10 ? '0' + parseInt(ss / 3600) : parseInt(ss / 3600) const min = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) const sec = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) - if(min == '00') { - if(sec == '00'){ + if (min == '00') { + if (sec == '00') { return hour + '灏忔椂' - }else{ - return hour + '灏忔椂'+ sec + '绉�' + } else { + return hour + '灏忔椂' + sec + '绉�' } - }else{ - if(sec == '00') { + } else { + if (sec == '00') { return hour + '灏忔椂' + min + '鍒�' - }else{ + } else { return hour + '灏忔椂' + min + '鍒�' + sec + '绉�' } } - // if(sec == '00'){ - // return hour + '灏忔椂' + min + '鍒�' - // } - // if(min == '00' && sec == '00'){ - // return hour + '灏忔椂' - // } - // return hour + '灏忔椂' + min + '鍒�' + sec + '绉�' - - }else if(60<ss && ss<3600){ + } else if (60 < ss && ss < 3600) { const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) const sec1 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) - return min1 + '鍒�' + sec1 + "绉�" - }else{ + return min1 + '鍒�' + sec1 + '绉�' + } else { const sec2 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) return sec2 + '绉�' } } - // defaultSortOrder:'descend', - // sorter: (a, b) => {return a.duration>b.duration?1:-1} }, { title: '绋嬪簭鍙�', @@ -122,44 +89,43 @@ } ] } - }, - methods: {}, - created() { } - } </script> <style lang="less" scoped> - @import '~@assets/less/common.less'; - @media screen and (min-width: 1920px){ - .table_workLogist{ - height: 417px!important; - overflow: scroll; + @media screen and (min-width: 1920px) { + .table_workLogist { + height: 417px !important; + overflow: auto; } } - @media screen and (min-width: 1680px) and (max-width: 1920px){ - .table_workLogist{ - height: 417px!important; - overflow: scroll; + + @media screen and (min-width: 1680px) and (max-width: 1920px) { + .table_workLogist { + height: 417px !important; + overflow: auto; } } - @media screen and (min-width: 1400px) and (max-width: 1680px){ - .table_workLogist{ - height: 266px!important; - overflow: scroll; + + @media screen and (min-width: 1400px) and (max-width: 1680px) { + .table_workLogist { + height: 266px !important; + overflow: auto; } } - @media screen and (min-width: 1280px) and (max-width: 1400px){ - .table_workLogist{ - height: 360px!important; - overflow: scroll; + + @media screen and (min-width: 1280px) and (max-width: 1400px) { + .table_workLogist { + height: 360px !important; + overflow: auto; } } - @media screen and (max-width: 1280px){ - .table_workLogist{ - height: 170px!important; - overflow: scroll; + + @media screen and (max-width: 1280px) { + .table_workLogist { + height: 170px !important; + overflow: auto; } } </style> diff --git a/src/views/mdc/base/modules/DeviceParamThresholdManagement/ParamThresholdModal.vue b/src/views/mdc/base/modules/DeviceParamThresholdManagement/ParamThresholdModal.vue index 73e9c7c..f0bd60b 100644 --- a/src/views/mdc/base/modules/DeviceParamThresholdManagement/ParamThresholdModal.vue +++ b/src/views/mdc/base/modules/DeviceParamThresholdManagement/ParamThresholdModal.vue @@ -144,7 +144,7 @@ minThreshold: '', maxThreshold: '' } - console.log('driveType',this.driveTypeList) + console.log('driveType', this.driveTypeList) this.handleDriveTypeChange(this.driveTypeList[0]) this.$nextTick(() => { this.form.setFieldsValue(pick(this.model, 'controlSystemType', 'chineseName', 'minThreshold', 'maxThreshold')) @@ -226,6 +226,7 @@ * @param value 椹卞姩鍙傛暟绫诲瀷閫変腑椤� */ handleDriveTypeChange(value) { + this.paramList = [] api.getParamListByDriveTypeApi(value) .then(res => { if (res.success) { diff --git a/src/views/mdc/base/modules/EquipmentAvailCompare/EquipmentAvailCompareMain.vue b/src/views/mdc/base/modules/EquipmentAvailCompare/EquipmentAvailCompareMain.vue index 33a362c..eaa447e 100644 --- a/src/views/mdc/base/modules/EquipmentAvailCompare/EquipmentAvailCompareMain.vue +++ b/src/views/mdc/base/modules/EquipmentAvailCompare/EquipmentAvailCompareMain.vue @@ -18,14 +18,14 @@ </a-col> <a-col :md="5" :sm="5" :xs="5"> <a-form-item label="鏃堕棿"> - <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/> + <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD" :allow-clear="false"/> </a-form-item> </a-col> <a-col :md="6" :sm="6" :xs="6"> <a-form-item label="鏃堕棿娈�"> - <a-time-picker :default-value="moment('00:00', 'HH:mm')" format="HH:mm" @change="onChangeStart"/> + <a-time-picker :default-value="moment('00:00', 'HH:mm')" format="HH:mm" @change="onChangeStart" :allow-clear="false"/> 鑷� - <a-time-picker :default-value="moment('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd"/> + <a-time-picker :default-value="moment('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd" :allow-clear="false"/> </a-form-item> </a-col> <a-col :md="2" :sm="3" :xs="3"> @@ -236,47 +236,40 @@ } }, searchQuery() { - if (this.queryParam.startTime && this.queryParam.endTime && this.dates && this.dates.length > 0) { - this.loading = true - this.spaceTime = [] - this.usingRates = [] - if (this.queryParams.typeTree == '1') { - this.queryParams.parentId = this.queryParamEquip.parentId - // this.queryParams.equipmentId = this.queryParamEquip.equipmentId + this.loading = true + this.spaceTime = [] + this.usingRates = [] + if (this.queryParams.typeTree == '1') { + this.queryParams.parentId = this.queryParamEquip.parentId + // this.queryParams.equipmentId = this.queryParamEquip.equipmentId - } else { - this.queryParams.parentId = this.queryParamEquip.parentId - // this.queryParams.equipmentId = "" - } - this.AnalysisList = [] - //鑾峰彇鏌ヨ鏉′欢 - this.queryParam.parentId = this.queryParams.parentId - this.queryParam.equipmentId = this.queryParams.equipmentId - this.queryParam.typeTree = this.queryParams.typeTree - getAction(this.url.dayUtilizationRateContrast, this.queryParam).then((res) => { - if (res.success) { - this.spaceTime = res.result.dateList - for (let i = 0; i < res.result.dayRateDto.length; i++) { - // res.result[i].useRateDayShift = this.numFilter(res.result[i].useRateDayShift) - this.usingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) - } - this.drawTu() - } else { - // this.$message.warning(res.message) - this.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }).finally(() => { - this.loading = false - }) } else { - this.$notification.warning({ - message: '娑堟伅', - description: '璇烽�夋嫨鏃堕棿鎴栨椂闂存' - }) + this.queryParams.parentId = this.queryParamEquip.parentId + // this.queryParams.equipmentId = "" } + this.AnalysisList = [] + //鑾峰彇鏌ヨ鏉′欢 + this.queryParam.parentId = this.queryParams.parentId + this.queryParam.equipmentId = this.queryParams.equipmentId + this.queryParam.typeTree = this.queryParams.typeTree + getAction(this.url.dayUtilizationRateContrast, this.queryParam).then((res) => { + if (res.success) { + this.spaceTime = res.result.dateList + for (let i = 0; i < res.result.dayRateDto.length; i++) { + // res.result[i].useRateDayShift = this.numFilter(res.result[i].useRateDayShift) + this.usingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) + } + this.drawTu() + } else { + // this.$message.warning(res.message) + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + this.loading = false + }) }, searchReset() { this.loading = true diff --git a/src/views/mdc/base/modules/EquipmentDayAvail/EquipmentDayAvailMain.vue b/src/views/mdc/base/modules/EquipmentDayAvail/EquipmentDayAvailMain.vue index d291654..e24d024 100644 --- a/src/views/mdc/base/modules/EquipmentDayAvail/EquipmentDayAvailMain.vue +++ b/src/views/mdc/base/modules/EquipmentDayAvail/EquipmentDayAvailMain.vue @@ -18,7 +18,7 @@ </a-col> <a-col :md="4" :sm="4" :xs="4"> <a-form-item label="鏃ユ湡"> - <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD' + <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD' :allow-clear="false" @change="dataChange"/> </a-form-item> </a-col> @@ -292,81 +292,6 @@ }) } }, - searchReset() { - this.spaceTime = [] - this.useingRates = [] - if (this.queryParams.typeTree == '1') { - this.typeTree = this.queryParams.typeTree - this.typeParent = this.queryParams.parentId - this.typeEquipment = this.queryParams.equipmentId - this.queryParams = {} - this.queryParam = {} - this.queryParams.typeTree = this.typeTree - this.queryParams.parentId = this.typeParent - if (this.queryParams.parentId != '') { - this.queryParams.equipmentId = '' - this.initEquipment() - } else { - if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) { - this.queryParams.equipmentId = this.typeEquipment - } else { - this.queryParams.equipmentId = this.queryParamEquip.equipmentId - } - } - getAction(this.url.dayUtilizationRate, this.queryParams).then((res) => { - if (res.success) { - this.spaceTime = res.result.dateList - for (var i = 0; i < res.result.dayRateDto.length; i++) { - this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) - } - this.drawTu() - } else { - this.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }).finally(() => { - this.loading = false - }) - } else { - this.typeTree = this.queryParams.typeTree - this.typeParent = this.queryParams.parentId - this.typeEquipment = this.queryParams.equipmentId - this.queryParams = {} - this.queryParam = {} - this.dates = [] - this.queryParams.typeTree = this.typeTree - this.queryParams.parentId = this.typeParent - if (this.queryParams.parentId != '') { - this.queryParams.equipmentId = '' - this.initEquipment() - } else { - if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) { - this.queryParams.equipmentId = this.typeEquipment - } else { - this.queryParams.equipmentId = this.queryParamEquip.equipmentId - } - } - getAction(this.url.dayUtilizationRate, this.queryParams).then((res) => { - if (res.success) { - this.spaceTime = res.result.dateList - for (var i = 0; i < res.result.dayRateDto.length; i++) { - this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) - } - this.drawTu() - } else { - this.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }).finally(() => { - this.loading = false - }) - } - - }, initEquipment(id) { let _this = this getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => { @@ -423,9 +348,7 @@ }, created() { let collectTime = moment(moment().add(-1, 'd'), 'YYYY-MM-DD') - this.queryParams.collectTime = collectTime - this.queryParam.dateTime = this.queryParams.collectTime.format('YYYYMMDD') this.queryParams.typeTree = '1' this.initEquipment() diff --git a/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue b/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue index f799bac..0e5a69c 100644 --- a/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue +++ b/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue @@ -6,13 +6,13 @@ <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="7" :sm="7"> + <a-col :md="9" :sm="9"> <a-form-item label="缁熶竴缂栫爜"> <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" v-model="queryParam.equipmentid"></a-input> </a-form-item> </a-col> - <a-col :md="7" :sm="7"> + <a-col :md="9" :sm="9"> <a-form-item label="璁惧鍚嶇О"> <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentname"></a-input> </a-form-item> @@ -21,7 +21,7 @@ <a-col :md="3" :sm="3"> <a-space> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> </a-space> </a-col> </a-row> @@ -30,8 +30,8 @@ <!-- table鍖哄煙-begin --> <div> - <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns" - :dataSource="dataSource" :pagination="ipagination" :loading="loading" + <a-table bordered rowKey="equipmentid" :scroll="{聽 y: 300聽}" :columns="columns" + :dataSource="dataSource" :pagination="ipagination" :loading="loading" :customRow="customRow" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" @change="handleTableChange"> </a-table> @@ -42,215 +42,106 @@ </template> <script> - import { - ajaxGetSelectItems - } from '@/api/api' - import JDictSelectTag from '@/components/dict/JDictSelectTag' - import { - deleteAction, - requestPut, - getAction - } from '@/api/manage' - import { - JeecgListMixin - } from '@/mixins/JeecgListMixin' - import JInput from '@/components/jeecg/JInput' - import JEllipsis from '@/components/jeecg/JEllipsis' - import Tooltip from 'ant-design-vue/es/tooltip' - import JDate from '@/components/jeecg/JDate' - import moment from 'moment' - import { filterObj } from '@/utils/util'; + import { getAction } from '@/api/manage' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' export default { name: 'DeviceListModel', mixins: [JeecgListMixin], - components: { - JDictSelectTag, - JEllipsis, - JInput, - Tooltip, - JDate - }, - props: { - status: { - type: Number, - default: 1 - } - }, data() { return { - title:'', + title: '', visible: false, disableMixinCreated: true, - queryParam: {}, - columns: [{ - title: '缁熶竴缂栫爜', - align: 'center', - dataIndex: 'equipmentid', - }, + columns: [ + { + title: '缁熶竴缂栫爜', + align: 'center', + dataIndex: 'equipmentid' + }, { title: '璁惧鍚嶇О', align: 'center', - dataIndex: 'equipmentname', + dataIndex: 'equipmentname' }, { title: '璁惧鍨嬪彿', align: 'center', - dataIndex: 'equipmentmodel', + dataIndex: 'equipmentmodel' }, - // { - // title: '璁惧绫诲瀷', - // align: 'center', - // dataIndex: 'equipmentType', - // }, { title: '鏈哄簥IP', align: 'center', - dataIndex: 'equipmentip', + dataIndex: 'equipmentip' }, { title: '椹卞姩绫诲瀷', align: 'center', - dataIndex: 'drivetype', + dataIndex: 'drivetype' }, { title: '绔彛', align: 'center', - dataIndex: 'dataport', + dataIndex: 'dataport' }, { title: '鏁版帶绯荤粺', align: 'center', - dataIndex: 'controlsystem', + dataIndex: 'controlsystem' } ], - url: { - list: '/mdc/equipment/list', + /* 鎺掑簭鍙傛暟 */ + isorter: { + column: '', + order: '' }, - + url: { + list: '/mdc/equipment/list' + } } - }, - created() { - }, methods: { openPage() { this.visible = true this.onClearSelected() - this.dataSource = []; - // this.queryParam = { - // status: this.status - // }; - this.loadData(); + this.dataSource = [] + this.loadData() }, - getQueryParams() { - //鑾峰彇鏌ヨ鏉′欢 - let sqp = {} - if(this.superQueryParams){ - sqp['superQueryParams']=encodeURI(this.superQueryParams) - sqp['superQueryMatchType'] = this.superQueryMatchType - } - var param = Object.assign(sqp, this.queryParam); - // param.field = this.getQueryField(); - param.pageNo = this.ipagination.current; - param.pageSize = this.ipagination.pageSize; - //鑾峰彇鐢ㄦ埛瀹氬埗鐨勫弬鏁板睘鎬� - // if (this.getCustomQueryParams) { - // param = this.getCustomQueryParams(param); - // if(!param){ - // return false; - // } - // } - return filterObj(param); - }, - loadData(arg) { - if(!this.url.list){ - this.$message.error("璇疯缃畊rl.list灞炴��!") - return - } - //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 - if (arg === 1) { - this.ipagination.current = 1; - } - var params = this.getQueryParams();//鏌ヨ鏉′欢 - - if(!params){ - return false; - } - - this.loading = true; - getAction(this.url.list, params).then((res) => { - if (res.success) { - // console.log(res) - //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; + /** + * 鑷畾涔夎〃鏍艰 + * @param record 琛ㄦ牸琛屼俊鎭� + * @returns {{style: {cursor: string}, on: {click: on.click}}} + */ + customRow(record) { + return { + style: { + cursor: 'pointer' + }, + on: { + click: () => { + this.onSelectChange([record.equipmentid], [record]) } - //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ - }else{ - // this.$message.warning(res.message) - this.$notification.warning({ - message:'娑堟伅', - description:res.message - }); } - }).finally(() => { - this.loading = false - }) + } }, - getQueryField() { - //TODO 瀛楁鏉冮檺鎺у埗 - // var str = ""; - // this.columns.forEach(function (value) { - // str += value.dataIndex +"," ; - // }); - // return str; - }, - modalFormOk(val) { - // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 - this.loadData(); - this.selectedRowKeys = [val.id]; - }, - searchQuery() { - this.loadData(); - this.onClearSelected() - }, - searchReset() { - this.queryParam = {} - this.loadData(); - this.onClearSelected() - }, + close() { this.$emit('close') this.visible = false }, + handleCancel() { this.close() }, + handleOk() { this.$emit('sendSelectionRows', this.selectionRows[0]) this.close() - }, - }, + } + } } </script> <style> @import '~@assets/less/common.less'; - - .frozenRowClass { - color: #c9c9c9; - } - - .success { - color: green; - } - - .error { - color: red; - } </style> diff --git a/src/views/mdc/base/modules/EquipmentList/UserModal.vue b/src/views/mdc/base/modules/EquipmentList/UserModal.vue index a460738..b42763e 100644 --- a/src/views/mdc/base/modules/EquipmentList/UserModal.vue +++ b/src/views/mdc/base/modules/EquipmentList/UserModal.vue @@ -2,33 +2,25 @@ <a-modal :title="title" :maskClosable="true" - :width="drawerWidth" + :width="modalWidth" @cancel="visible=false" :visible="visible" :footer="null" + centered style="height: 100%;overflow: auto;padding-bottom: 53px;"> - <template slot="title"> - <div style="width: 100%;"> - <span>{{ title }}</span> - <span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right"> - <a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0px"></a-button> - </span> - </div> - - </template> - <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :form="form" :model="model" :rules="validatorRules"> + <a-form-model ref="form" :form="form" :model="model" :rules="validatorRules" :labelCol="labelCol" + :wrapperCol="wrapperCol"> <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item label="缁熶竴缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId"> + <a-form-model-item label="缁熶竴缂栫爜" prop="equipmentId"> <a-input-search v-model="model.equipmentId" :disabled="disableSubmit" @search="deviceSearch" enter-button placeholder='璇烽�夋嫨缁熶竴缂栫爜'/> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="璁惧鍚嶇О"> <a-input :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囧悕绉�" v-model="model.equipmentName"/> </a-form-model-item> @@ -37,29 +29,28 @@ <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item v-if="isDepartType == 0" label="閮ㄩ棬鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" + <a-form-model-item v-if="isDepartType == 0" label="閮ㄩ棬鍒嗛厤" v-show="!departDisabled"> <j-select-equipment-depart :disabled="disableSubmit" v-model="model.selectedDeparts" :multi="false" @back="backDepartInfo" :backDepart="true" :treeOpera="true"></j-select-equipment-depart> </a-form-model-item> - <a-form-model-item v-if="isDepartType == -1" label="璁惧绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select :disabled="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷" + <a-form-model-item v-if="isDepartType == -1" label="璁惧绫诲瀷"> + <a-select :disabled="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷" allow-clear :triggerChange="true" v-model="model.equipmentType"> - <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> + <a-select-option v-for='item in equipmentTypeList' :key='item.id' :value='item.equipmentTypeName'> {{item.equipmentTypeName}} </a-select-option> </a-select> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="杞﹂棿鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled" + <a-form-model-item label="杞﹂棿鍒嗛厤" v-show="!productionDisabled" ref="selectedProduction" prop="selectedProduction"> - <!--<j-select-equipment-production v-decorator="['selectedProduction',{rules:[{required:true,message:'璇烽�夋嫨杞﹂棿!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>--> <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" - @back="backProductionInfo" :backProduction="true" + @back="backProductionInfo" :backProduction="true" :allowClear="false" :treeProductOpera="true"></j-select-equipment-production> </a-form-model-item> @@ -67,15 +58,15 @@ </a-row> <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item v-if="isDepartType == -1" label="绯荤粺鐗堟湰鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item v-if="isDepartType == -1" label="绯荤粺鐗堟湰鍙�"> <a-input :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ョ郴缁熺増鏈彿" v-model="model.systemVersion"/> </a-form-model-item> - <a-form-model-item v-if="isDepartType == 0" label="璁惧绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item v-if="isDepartType == 0" label="璁惧绫诲瀷"> <a-select :disabled="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷" :triggerChange="true" v-model="model.equipmentType"> - <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> + <a-select-option v-for='item in equipmentTypeList' :key='item.id' :value='item.equipmentTypeName'> {{item.equipmentTypeName}} </a-select-option> </a-select> @@ -83,7 +74,7 @@ </a-col> <a-col :span="12"> - <a-form-model-item label="璁惧鍔熺巼(kw)" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="璁惧鍔熺巼(kw)"> <a-input :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囧姛鐜�" v-model="model.devicePower"/> </a-form-model-item> @@ -92,13 +83,13 @@ <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item label="鏈哄簥IP" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-input :disabled="true" placeholder="璇疯緭鍏ユ満搴奍P" + <a-form-model-item label="鏈哄簥IP"> + <a-input :disabled="true" placeholder="璇疯緭鍏ユ満搴奍P" v-model="model.equipmentIp"/> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="鏈哄簥绔彛" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="鏈哄簥绔彛"> <a-input :disabled="true" placeholder="璇疯緭鍏ユ満搴婄鍙�" v-model="model.dataPort"/> </a-form-model-item> @@ -107,15 +98,15 @@ <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item label="椹卞姩绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="椹卞姩绫诲瀷"> <j-dict-select-tag :disabled="true" placeholder="璇烽�夋嫨椹卞姩绫诲瀷" :triggerChange="true" dictCode="mdc_driveType" - v-model="model.driveType" allow-clear/> + v-model="model.driveType"/> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="璁惧鍨嬪彿" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-input :disabled="true" allow-clear placeholder="璇疯緭鍏ヨ澶囧瀷鍙�" + <a-form-model-item label="璁惧鍨嬪彿"> + <a-input :disabled="true" allow-clear placeholder="璇疯緭鍏ヨ澶囧瀷鍙�" v-model="model.equipmentModel"/> </a-form-model-item> </a-col> @@ -123,29 +114,44 @@ <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item label="绯荤粺绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <j-dict-select-tag placeholder="璇烽�夋嫨绯荤粺绫诲瀷" :triggerChange="true" dictCode="system_type" :disabled="disableSubmit" - v-model="model.systemType" allow-clear/> + <a-form-model-item label="绯荤粺绫诲瀷"> + <j-dict-select-tag placeholder="璇烽�夋嫨绯荤粺绫诲瀷" :triggerChange="true" dictCode="system_type" + :disabled="disableSubmit" v-model="model.systemType"/> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="璁惧绾у埆" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绾у埆" dictCode="device_level" v-model="model.deviceLevel" :disabled="disableSubmit" allow-clear/> + <a-form-model-item label="璁惧绾у埆"> + <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绾у埆" dictCode="device_level" v-model="model.deviceLevel" + :disabled="disableSubmit"/> </a-form-model-item> </a-col> </a-row> <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item label="璁惧绉嶇被" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绉嶇被" dictCode="device_category" v-model="model.deviceCategory" :disabled="disableSubmit" - allow-clear/> + <a-form-model-item label="璁惧绉嶇被"> + <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绉嶇被" dictCode="device_category" v-model="model.deviceCategory" + :disabled="disableSubmit"/> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="鎺掑簭" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item label="鎺掑簭"> <a-input :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="璇疯緭鍏ユ帓搴�" v-model="model.sortNo" style="width: 100%"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span='12'> + <a-form-model-item label="閰嶉�佸皬缁�" prop="teamCode"> + <j-dict-select-tag placeholder="璇烽�夋嫨閰嶉�佸皬缁�" dictCode="mdc_staff_team" v-model="model.teamCode" + :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span='12'> + <a-form-model-item label="璁惧鍥剧墖"> + <j-image-upload v-model="model.equipmentImage" :disabled="disableSubmit"/> </a-form-model-item> </a-col> </a-row> @@ -165,7 +171,7 @@ <a-row :gutter="24"> <a-col :span='12'> - <a-form-model-item v-if="isDepartType == 0" label="绯荤粺鐗堟湰鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item v-if="isDepartType == 0" label="绯荤粺鐗堟湰鍙�"> <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ョ郴缁熺増鏈彿" v-model="model.systemVersion"/> </a-form-model-item> @@ -197,15 +203,9 @@ <script> import pick from 'lodash.pick' - import moment from 'moment' - import Vue from 'vue' - import { ACCESS_TOKEN } from '@/store/mutation-types' import { getAction } from '@/api/manage' import { addEquipment, editEquipment } from '@/api/api' - import { disabledAuthFilter } from '@/utils/authFilter' - import { duplicateCheck } from '@/api/api' import JSelectEquipmentProduction from '../../../../../components/jeecgbiz/JSelectEquipmentProduction' - import JSelectProduction from '../../../../../components/jeecgbiz/JSelectProduction' import DeviceListModel from './DeviceListModal' import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart' import { mapActions } from 'vuex' @@ -213,7 +213,6 @@ export default { name: 'UserModal', components: { - JSelectProduction, JSelectEquipmentDepart, JSelectEquipmentProduction, DeviceListModel @@ -223,36 +222,14 @@ departDisabled: false, //鏄惁鏄垜鐨勯儴闂ㄨ皟鐢ㄨ椤甸潰 productionDisabled: false, //鏄惁鏄垜鐨勮溅闂磋皟鐢ㄨ椤甸潰 roleDisabled: false, //鏄惁鏄鑹茬淮鎶よ皟鐢ㄨ椤甸潰 - modalWidth: 800, - drawerWidth: 700, - modalToggleFlag: true, - confirmDirty: false, + modalWidth: 900, userId: '', //淇濆瓨鐢ㄦ埛id - // disableSubmit:false, disableSubmit: true, - dateFormat: 'YYYY-MM-DD', form: this.$form.createForm(this), - validatorRules: { - // equipmentId: [{required: false, message: '璇烽�夋嫨璁惧缂栧彿!'}, {validator: this.validatequipmentId}], - equipmentId: - [ - { - required: true, message: '璇烽�夋嫨璁惧缂栧彿!' - } - // { - // validator: this.validatequipmentId - // } - ], - // trigger: 'blur' // 瑙﹀彂鏂瑰紡 - - selectedProduction: - [ - { - required: true, message: '璇烽�夋嫨杞﹂棿' - } - ] - + equipmentId: [{ required: true, message: '璇烽�夋嫨璁惧缂栧彿!', trigger: 'change' }], + selectedProduction: [{ required: true, message: '璇烽�夋嫨杞﹂棿' }], + teamCode: [{ required: true, message: '璇烽�夋嫨閰嶉�佸皬缁�' }] }, departIdShow: false, title: '鎿嶄綔', @@ -286,43 +263,27 @@ xs: { span: 24 }, sm: { span: 19 } }, - uploadLoading: false, confirmLoading: false, - headers: {}, systemType: false, systemValue: '3', url: { - fileUpload: window._CONFIG['domianURL'] + '/sys/common/upload', userWithDepart: '/mdc/mdcEquipment/equipmentDepartList', // 寮曞叆涓烘寚瀹氱敤鎴锋煡鐪嬮儴闂ㄤ俊鎭渶瑕佺殑url //寮曞叆涓烘寚瀹氱敤鎴锋煡鐪嬭溅闂翠俊鎭渶瑕佺殑url userProductionList: '/mdc/mdcEquipment/equipmentProductionList', - userId: '/sys/user/generateUserId', // 寮曞叆鐢熸垚娣诲姞鐢ㄦ埛鎯呭喌涓嬬殑url syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//鍚屾鐢ㄦ埛鍒板伐浣滄祦 - queryTenantList: '/sys/tenant/queryList', check: '/sys/duplicate/check', queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' }, - tenantsOptions: [], - rolesOptions: [], nextDepartOptions: [], nextProductionOptions: [], - selectList: [], + equipmentTypeList: [], isDepartType: '' } }, created() { - const token = Vue.ls.get(ACCESS_TOKEN) - this.headers = { 'X-Access-Token': token } this.queryGroup() this.queryTreeData() this.getAppPlatformName() - // this.initRoleList() - // this.initTenantList() - }, - computed: { - uploadAction: function() { - return this.url.fileUpload - } }, methods: { ...mapActions(['QueryDepartTree']), @@ -331,13 +292,11 @@ if (res.success) { this.isDepartType = res.result[0].value } else { - // this.$message.warn(res.message) this.$notification.warning({ message: '娑堟伅', description: res.message }) } - }).finally(() => { }) }, getAppPlatformName() { @@ -350,12 +309,8 @@ queryGroup() { getAction(this.url.queryEquipmentType).then(res => { if (res.success) { - this.selectList = res.result - // this.selectList = res.result.map((item, index, arr) => { - // return { label: item.id, value: item.equipmentTypeName + '' } - // }) + this.equipmentTypeList = res.result } else { - // this.$message.warning(res.message) this.$notification.warning({ message: '娑堟伅', description: res.message @@ -366,7 +321,6 @@ }) }, getDeviceRows(val) { - console.log(val) if (val.equipmentid) { this.model.equipmentId = val.equipmentid this.model.equipmentName = val.equipmentname @@ -405,46 +359,28 @@ //鏍规嵁灞忓箷瀹藉害鑷�傚簲鎶藉眽瀹藉害 this.resetScreenSize() - // that.userId = record.id; - // console.log(record) if (record.systemValue != null) { this.systemValue = record.systemValue } else { this.systemValue = '3' } that.model = Object.assign({}, record) - // that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record); - // this.model = Object.assign({}, record) this.$nextTick(() => { this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedProduction', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort', 'driveType', 'sortNo', 'remark', 'systemVersion', 'devicePower', 'controlSystem', 'saveTableName', 'systemValue')) }) if (record.hasOwnProperty('id')) { - // that.getUserRoles(record.id); that.getUserDeparts(record.id) } - // console.log('that.model=',that.model) - }, - isDisabledAuth(code) { - return disabledAuthFilter(code) - }, - //绐楀彛鏈�澶у寲鍒囨崲 - toggleScreen() { - if (this.modalToggleFlag) { - this.modalWidth = window.innerWidth - } else { - this.modalWidth = 800 - } - this.modalToggleFlag = !this.modalToggleFlag }, // 鏍规嵁灞忓箷鍙樺寲,璁剧疆鎶藉眽灏哄 resetScreenSize() { let screenWidth = document.body.clientWidth - if (screenWidth < 500) { - this.drawerWidth = screenWidth + if (screenWidth < 900) { + this.modalWidth = screenWidth } else { - this.drawerWidth = 700 + this.modalWidth = 900 } }, getUserDeparts(userid) { @@ -465,10 +401,7 @@ } that.model.selectedDeparts = selectDepartKeys.join(',') - // that.model.selectedProduction = selectDepartKeys.join(",") - that.nextDepartOptions = departOptions - // console.log('that.nextDepartOptions=',that.nextDepartOptions) } }) @@ -490,13 +423,11 @@ that.model.selectedProduction = selectProductKeys.join(',') that.nextProductionOptions = ProductionOptions - // console.log('that.nextProductionOptions=',that.nextProductionOptions) } }) //杞﹂棿鐨剈rl }, backDepartInfo(info) { - // console.log(info) this.model.departIds = this.model.selectedDeparts this.nextDepartOptions = info.map((item, index, arr) => { let c = { label: item.text, value: item.value + '' } @@ -504,7 +435,6 @@ }) }, backProductionInfo(info) { - // console.log(info) this.model.productionIds = this.model.selectedProduction this.nextProductionOptions = info.map((item, index, arr) => { let c = { label: item.text, value: item.value + '' } @@ -525,33 +455,27 @@ this.nextDepartOptions = [] this.nextProductionOptions = [] this.departIdShow = false - // this.$refs.form.resetFields(); }, - moment, handleSubmit() { const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 this.$refs.form.validate(valid => { if (valid) { that.confirmLoading = true - //濡傛灉鏄笂绾ф嫨浼犲叆departIds,鍚﹀垯涓虹┖ - // if(this.model.userIdentity!==2){ - // this.model.departIds=""; - // } - if (this.systemValue==null){ - this.$message.warning('璇烽�夋嫨绯荤粺绫诲瀷!'); - return false; + if (this.systemValue == null) { + this.$message.warning('璇烽�夋嫨绯荤粺绫诲瀷!') + return false } - let obj; - if(!this.model.id){ - this.model.id = this.userId; - this.model.systemValue=this.systemValue; - obj=addEquipment(this.model); - }else{ - this.model.systemValue=this.systemValue; - obj=editEquipment(this.model,{ - id: this.model.id - }); + let obj + if (!this.model.id) { + this.model.id = this.userId + this.model.systemValue = this.systemValue + obj = addEquipment(this.model) + } else { + this.model.systemValue = this.systemValue + obj = editEquipment(this.model, { + id: this.model.id + }) } obj.then((res) => { if (res.success) { @@ -574,18 +498,6 @@ return false } }) - }, - - handleConfirmBlur(e) { - const value = e.target.value - this.confirmDirty = this.confirmDirty || !!value - }, - identityChange(e) { - if (e.target.value === 1) { - this.departIdShow = false - } else { - this.departIdShow = true - } }, /** * 缂栬緫鎴栨煡鐪嬭鎯呮暟鎹椂娓呴櫎鎶藉眽琛ㄥ崟楠岃瘉 diff --git a/src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue b/src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue index 444bae8..e1401a5 100644 --- a/src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue +++ b/src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue @@ -40,7 +40,7 @@ </a-col> <a-col :span="24"> <a-form-model-item label="鏃ユ湡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="theDate"> - <a-date-picker v-model="model.theDate" :disabled="disabled" format="YYYY-MM-DD" + <a-date-picker v-model="model.theDate" :disabled="disabled" format="YYYY-MM-DD" :allow-clear="false" value-format="YYYY-MM-DD" style="width: 100%"></a-date-picker> </a-form-model-item> </a-col> @@ -87,7 +87,7 @@ confirmLoading: false, validatorRules: { equipmentIds: [ - { required: true, message: '璇烽�夋嫨璁惧!' } + { required: true, message: '璇烽�夋嫨璁惧!', trigger: 'change' } ], partId: [ { required: true, message: '璇疯緭鍏ラ浂浠跺彿!' } @@ -126,7 +126,6 @@ }, edit(record) { this.model = Object.assign({}, { equipmentIds: record.equipmentId }, record) - console.log('model', this.model) this.visible = true }, inputNumberChange() { @@ -179,7 +178,6 @@ */ selectOK(data) { this.$set(this.model, 'equipmentIds', data.join(',')) - if (this.model.equipmentIds) this.$refs.form.clearValidate('equipmentIds') } } } diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue index 4955e2e..1726314 100644 --- a/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue +++ b/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue @@ -85,7 +85,7 @@ span: 24 }, sm: { - span: 6 + span: 4 } }, wrapperCol: { diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue index 23245fd..64bae97 100644 --- a/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue +++ b/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue @@ -106,7 +106,7 @@ span: 24 }, sm: { - span: 6 + span: 4 } }, wrapperCol: { diff --git a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue b/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue index 32121ec..effe2c4 100644 --- a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue +++ b/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue @@ -5,11 +5,6 @@ <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <!--<a-col :md="5" :sm="5">--> - <!--<a-form-item label="鍚嶇О">--> - <!--<a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>--> - <!--</a-form-item>--> - <!--</a-col>--> <a-col :md="5" :sm="5"> <a-form-item label="璁惧"> <a-input-search :readOnly="true" v-model="queryParam.equipmentId" @search="deviceSearch" @@ -19,9 +14,6 @@ <a-col :md="5" :sm="5"> <a-form-item label="椹卞姩绫诲瀷"> - <!--<j-dict-select-tag placeholder="璇烽�夋嫨椹卞姩绫诲瀷"--> - <!--:triggerChange="true" dictCode="mdc_driveType"--> - <!--v-model="queryParam.driveType" allow-clear/>--> <a-auto-complete v-model="queryParam.driveType" :data-source="driveTypeList" @@ -33,10 +25,10 @@ </a-col> <a-col :md="6" :sm="6" :xs="6"> <a-form-item label="鏃堕棿"> - <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/> + <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD" :allow-clear="false"/> </a-form-item> </a-col> - <a-col> + <a-col :md="3" :sm="3" :xs="3"> <a-space> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> @@ -89,7 +81,6 @@ export default { name: 'ComparativeAnalysisMain', - // mixins: [JeecgListMixin], components: { Tooltip, ComparativeAnalysisBar, @@ -170,12 +161,14 @@ tabChange(val) { this.activeKey = val }, + dateParamChange(v1, v2) { // console.log(v1,v2) this.queryParam.startTime = v2[0] this.queryParam.endTime = v2[1] console.log(v2[0], v2[1]) }, + loadAnalysis() { getAction(this.url.comparativeAnalysis, this.queryParam).then(res => { if (res.success) { @@ -190,48 +183,42 @@ this.loading = false }) }, - searchQuery() { - if (this.dates && this.dates.length > 0) { - this.AnalysisList = [] - this.AnalysisBarList = [] - this.AnalysisGauge = [] - this.AnalysisPie = [] - if (this.queryParams.typeTree == '1') { - this.queryParams.parentId = this.queryParamEquip.parentId - // this.queryParams.equipmentId = this.queryParamEquip.equipmentId - } else { - this.queryParams.parentId = this.queryParamEquip.parentId - // this.queryParams.equipmentId = "" - } - this.AnalysisList = [] - //鑾峰彇鏌ヨ鏉′欢 - this.queryParam.parentId = this.queryParams.parentId - // this.queryParam.equipmentId = this.queryParams.equipmentId - this.queryParam.typeTree = this.queryParams.typeTree - getAction(this.url.comparativeAnalysis, this.queryParam).then((res) => { - if (res.success) { - this.AnalysisList = res.result - this.AnalysisBarList = res.result.graphics - this.AnalysisGauge = res.result.meters - this.AnalysisPie.push(res.result.pieCharts) - } else { - // this.$message.warning(res.message) - this.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }).finally(() => { - this.loading = false - }) - } else { - this.$notification.warning({ - message: '鎻愮ず', - description: '璇烽�夋嫨鏃堕棿' - }) - } + searchQuery() { + this.AnalysisList = [] + this.AnalysisBarList = [] + this.AnalysisGauge = [] + this.AnalysisPie = [] + if (this.queryParams.typeTree == '1') { + this.queryParams.parentId = this.queryParamEquip.parentId + // this.queryParams.equipmentId = this.queryParamEquip.equipmentId + } else { + this.queryParams.parentId = this.queryParamEquip.parentId + // this.queryParams.equipmentId = "" + } + this.AnalysisList = [] + //鑾峰彇鏌ヨ鏉′欢 + this.queryParam.parentId = this.queryParams.parentId + // this.queryParam.equipmentId = this.queryParams.equipmentId + this.queryParam.typeTree = this.queryParams.typeTree + getAction(this.url.comparativeAnalysis, this.queryParam).then((res) => { + if (res.success) { + this.AnalysisList = res.result + this.AnalysisBarList = res.result.graphics + this.AnalysisGauge = res.result.meters + this.AnalysisPie.push(res.result.pieCharts) + } else { + // this.$message.warning(res.message) + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + this.loading = false + }) }, + searchReset() { this.AnalysisList = [] this.AnalysisBarList = [] @@ -243,7 +230,11 @@ this.typeEquipment = this.queryParams.equipmentId this.queryParams = {} this.queryParam = {} - this.dates = [] + this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)] + this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') + this.queryParams.startTime = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') + this.queryParams.endTime = moment(this.dates[1]).format('YYYYMMDD') this.queryParams.typeTree = this.typeTree this.queryParams.parentId = this.typeParent if (this.queryParams.parentId != '') { @@ -262,7 +253,6 @@ this.AnalysisGauge = res.result.meters this.AnalysisPie.push(res.result.pieCharts) } else { - // this.$message.warning(res.message) this.$notification.warning({ message: '娑堟伅', description: res.message @@ -277,7 +267,11 @@ this.typeEquipment = this.queryParams.equipmentId this.queryParams = {} this.queryParam = {} - this.dates = [] + this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)] + this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') + this.queryParams.startTime = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') + this.queryParams.endTime = moment(this.dates[1]).format('YYYYMMDD') this.queryParams.typeTree = this.typeTree this.queryParams.parentId = this.typeParent if (this.queryParams.parentId != '') { @@ -296,7 +290,6 @@ this.AnalysisGauge = res.result.meters this.AnalysisPie.push(res.result.pieCharts) } else { - // this.$message.warning(res.message) this.$notification.warning({ message: '娑堟伅', description: res.message @@ -307,6 +300,7 @@ }) } }, + /** * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷 */ @@ -315,6 +309,7 @@ this.driveTypeList = res.result.map(item => item.value) }) }, + /** * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳� * @param input 杈撳叆鐨勫唴瀹� @@ -326,119 +321,8 @@ option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 ) }, - // onChange(value, dateString) { - // // console.log('Selected Time: ', value); - // // console.log('Formatted Selected Time: ', dateString); - // }, - // searchReset() { - // if(this.queryParams.typeTree == "1"){ - // this.typeTree = this.queryParams.typeTree - // this.typeParent = this.queryParams.parentId - // this.typeEquipment = this.queryParams.equipmentId - // this.queryParams = {} - // this.queryParam = {} - // this.dates = [] - // this.queryParams.typeTree = this.typeTree - // this.queryParams.parentId = this.typeParent - // if(this.queryParams.parentId != ""){ - // this.queryParams.equipmentId = "" - // }else{ - // if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){ - // this.queryParams.equipmentId = this.typeEquipment - // }else{ - // this.queryParams.equipmentId = this.queryParamEquip.equipmentId - // } - // - // } - // - // this.ipagination.current = 1 - // this.ResetloadData(); - // }else{ - // this.typeTree = this.queryParams.typeTree - // this.typeParent = this.queryParams.parentId - // // this.typeEquipment = this.queryParams.equipmentId - // this.queryParams = {} - // this.queryParam = {} - // this.dates = [] - // this.queryParams.typeTree = this.typeTree - // this.queryParams.parentId = this.typeParent - // // this.queryParams.equipmentId = this.typeEquipment - // this.ipagination.current = 1 - // this.ResetloadData(); - // } - // - // }, - // ResetloadData() { - // if(!this.url.list){ - // this.$message.error("璇疯缃畊rl.list灞炴��!") - // return - // } - // var params = {} - // params.typeTree = this.queryParams.typeTree - // params.parentId = this.queryParams.parentId - // params.equipmentId = this.queryParams.equipmentId - // this.loading = true; - // getAction(this.url.list, params).then((res) => { - // if (res.success) { - // this.dataSource = res.result.records||res.result; - // }else{ - // this.$message.warning(res.message) - // } - // }).finally(() => { - // this.loading = false - // }) - // }, - // searchQuery(){ - // if(this.queryParams.typeTree == "1"){ - // this.queryParams.parentId = this.queryParamEquip.parentId - // // this.queryParams.equipmentId = this.queryParamEquip.equipmentId - // - // }else{ - // this.queryParams.parentId = this.queryParamPeople.parentId - // - // // this.queryParams.equipmentId = "" - // } - // this.dataSource = []; - // //鑾峰彇鏌ヨ鏉′欢 - // let param = {} - // param.parentId = this.queryParams.parentId; - // param.equipmentId = this.queryParams.equipmentId; - // param.startTime = this.queryParam.startTime; - // param.driveType = this.queryParam.driveType; - // param.endTime = this.queryParam.endTime; - // getAction(this.url.list,param).then((res) => { - // if(res.success){ - // this.dataSource = res.result.records||res.result; - // }else{ - // this.$message.warning(res.message) - // } - // }).finally(() => { - // this.loading = false - // }) - // }, - // loadData() { - // if(!this.url.list){ - // this.$message.error("璇疯缃畊rl.list灞炴��!") - // return - // } - // //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 - // var params = {} - // this.loading = true; - // params.startTime = this.queryParam.startTime; - // params.endTime = this.queryParam.endTime; - // params.typeTree = this.queryParams.typeTree - // getAction(this.url.list, params).then((res) => { - // if (res.success) { - // this.dataSource = res.result.records||res.result; - // }else{ - // this.$message.warning(res.message) - // } - // }).finally(() => { - // this.loading = false - // }) - // }, + deviceSearch() { - console.log('瑙﹀彂') this.$refs.selectDeviceDrawer.visible = true this.$refs.selectDeviceDrawer.selectedRowKeys = [] this.$refs.selectDeviceDrawer.selectedRows = [] @@ -450,11 +334,6 @@ * @param data 宸查�夋嫨鐨勮澶� */ selectOK(data) { - // let params = {} - // params.equipmentIdList = [] - // for (var a = 0; a < data.length; a++) { - // params.equipmentIdList.push(data[a]) - // } console.log('data=', data) this.queryParam.equipmentId = data.join(',') console.log('queryParam', this.queryParam.equipmentId) diff --git a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue index a5ab8df..011b86f 100644 --- a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue +++ b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue @@ -82,7 +82,7 @@ <a-col :md="24" :sm="24" :xs="24" style="display: flex;justify-content: space-between;align-items: flex-start"> <div> - <a-space style="margin-right: 20px"> + <a-space style="margin-right: 20px;margin-bottom: 20px"> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button> @@ -137,12 +137,14 @@ <template v-for="(tableHead, index) in tableHeads"> <th v-if="checkedList.indexOf('lyl') > -1">鍒╃敤鐜�(%)</th> <th v-if="checkedList.indexOf('kjl') > -1">寮�鏈虹巼(%)</th> + <th v-if="checkedList.indexOf('gzl') > -1">鏁呴殰鐜�(%)</th> <th v-if="checkedList.indexOf('kjsj') > -1">寮�鏈烘椂闂�(灏忔椂)</th> <th v-if="checkedList.indexOf('jgsj') > -1">鍔犲伐鏃堕棿(灏忔椂)</th> + <th v-if="checkedList.indexOf('qcgz') > -1">鍔犲伐鏃堕棿(灏忔椂)锛堝幓闄ゆ晠闅滄椂闂达級</th> <th v-if="checkedList.indexOf('djsj') > -1">寰呮満鏃堕棿(灏忔椂)</th> <th v-if="checkedList.indexOf('gjsj') > -1">鍏虫満鏃堕棿(灏忔椂)</th> + <th v-if="checkedList.indexOf('gzsj') > -1">鏁呴殰鏃堕棿(灏忔椂)</th> </template> - </tr> </thead> <tbody> @@ -186,11 +188,17 @@ <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1"> {{tableHead.openRate | numFilter}} </td> + <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gzl') > -1"> + {{tableHead.faultRate | numFilter}} + </td> <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1"> {{tableHead.openLong | getFormattedTime}} </td> <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1"> {{tableHead.processLong | getFormattedTime}} + </td> + <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('qcgz') > -1"> + {{tableHead.removeFaultRunLong | getFormattedTime}} </td> <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1"> {{tableHead.waitLong | getFormattedTime}} @@ -198,13 +206,15 @@ <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1"> {{tableHead.closeLong | getFormattedTime}} </td> + <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gzsj') > -1"> + {{tableHead.faultLong | getFormattedTime}} + </td> </template> </tr> </tbody> </table> - </div> </div> </a-spin> @@ -228,8 +238,6 @@ typeTree: '', typeParent: 1, typeEquipment: 1, - TreeIDOne: 1, - TreeIDTwo: 2, deviceTypeDict: '', dates: [], equipmentTypeList: [], @@ -249,10 +257,13 @@ efficiencyOptions: [ { label: '鍒╃敤鐜�', value: 'lyl' }, { label: '寮�鏈虹巼', value: 'kjl' }, + { label: '鏁呴殰鐜�', value: 'gzl' }, { label: '寮�鏈烘椂闂�', value: 'kjsj' }, { label: '鍔犲伐鏃堕棿', value: 'jgsj' }, + { label: '鍔犲伐鏃堕棿锛堝幓闄ゆ晠闅滄椂闂达級', value: 'qcgz' }, { label: '寰呮満鏃堕棿', value: 'djsj' }, - { label: '鍏虫満鏃堕棿', value: 'gjsj' } + { label: '鍏虫満鏃堕棿', value: 'gjsj' }, + { label: '鏁呴殰鏃堕棿', value: 'gzsj' } ], checkedList: ['lyl'], dataList: [], @@ -263,12 +274,6 @@ }, tableHeads: [], distinguishColorList: [], - utilizationRateRowAverage: '', - openRateRowAverage: '', - openLongRowAverage: '', - processLongRowAverage: '', - waitLongRowAverage: '', - closeLongRowAverage: '', spinning: false } }, @@ -728,17 +733,10 @@ .dataContent { white-space: nowrap; - /*margin: 0;*/ - /*border: none;*/ border-collapse: separate; border-spacing: 0; - /*table-layout: fixed;*/ border: 1px solid #ccc; - /*border: 1px solid #ccc;*/ width: 100%; - /*height: 100%;*/ - /*overflow: hidden;*/ - /*overflow-y: auto;*/ text-align: center; } diff --git a/src/views/system/modules/SelectDeviceDrawer.vue b/src/views/system/modules/SelectDeviceDrawer.vue index cdd045b..ab5cc25 100644 --- a/src/views/system/modules/SelectDeviceDrawer.vue +++ b/src/views/system/modules/SelectDeviceDrawer.vue @@ -8,15 +8,24 @@ > <a-spin :spinning="loading"> - <!-- showLine --> - <a-form> - <a-form-item> - <a-input-search @search="handleSearch" style="width:100%;" placeholder="妫�绱� 绫诲埆缂栫爜/鍚嶇О" allowClear - v-model="searchInput" @change="handleChange"/> - </a-form-item> - <a-form-item label="杞﹂棿灞傜骇锛�"> + <div class="content-container"> + <a-form> + <a-form-item> + <a-input-search @search="handleSearch" style="width:100%;" placeholder="妫�绱� 绫诲埆缂栫爜/鍚嶇О" allowClear + v-model="searchInput" @change="handleChange"/> + </a-form-item> + + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <i class="anticon anticon-info-circle ant-alert-icon"></i>宸查�夋嫨 <a style="font-weight: 600">{{ + checkedKeys.length }}</a>椤� + <a style="margin-left: 24px" @click="checkedKeys=[]">娓呯┖</a> + </div> + </a-form> + + <div> <a-tree showLine ref="tree" :expandedKeys.sync="expandedKeys" :autoExpandParent="autoExpandParent" :treeData="treeDataSource" checkable @check="onCheck" v-model="checkedKeys" + @select="handleSelectChange" @expand="onExpand"> <template slot="title" slot-scope="{ title, parentId, entity, key}"> <span v-if="title.indexOf(searchValue) > -1">{{ title.substr(0, title.indexOf(searchValue)) }} @@ -26,9 +35,8 @@ <span v-else>{{ title }}</span> </template> </a-tree> - </a-form-item> - </a-form> - + </div> + </div> </a-spin> @@ -227,11 +235,20 @@ refreshTree() { this.queryTreeData() }, + + + /** + * 鑺傜偣琚�変腑鏃惰Е鍙戯紙鐐瑰嚮鍚嶇О锛� + * @param selectedKeys 閫変腑鐨勮妭鐐筴ey闆嗗悎 + * @param event 浜嬩欢瀵硅薄 + */ + handleSelectChange(selectedKeys, event) { + event.node.$el.childNodes[1].click() + }, + onCheck(value, obj) { this.checkedKeys = value - console.log('obj,', obj) this.deviceNodes = obj.checkedNodes.filter(item => item.data.props.equipmentId).map(item => item.data.props.equipmentId) - console.log(this.deviceNodes) }, handleCancel() { this.visible = false diff --git a/src/views/tms/InboundOrderList.vue b/src/views/tms/InboundOrderList.vue index 99bc473..adce8d0 100644 --- a/src/views/tms/InboundOrderList.vue +++ b/src/views/tms/InboundOrderList.vue @@ -190,20 +190,18 @@ return { on: { click: (e) => { - //灏嗗綋鍓嶉�変腑鐨勮褰曚紶鍒板瓙椤甸潰 - this.$bus.$emit('getToolingStorageData', record) - this.onSelectChange(record.id.split(","), [record]); + this.onSelectChange(record.id.split(","), [record]); //鐐瑰嚮褰撳墠琛屽彉鑹� - let oldList = document.querySelectorAll('.checked-td-of-add-table') - if (oldList) { - for (let j = 0; j < oldList.length; j++) { - oldList[j].classList.remove('checked-td-of-add-table') - } - } - let children = e.target.parentNode.children - for (let i = 0; i < children.length; i++) { - children[i].classList.add('checked-td-of-add-table') - } + // let oldList = document.querySelectorAll('.checked-td-of-add-table') + // if (oldList) { + // for (let j = 0; j < oldList.length; j++) { + // oldList[j].classList.remove('checked-td-of-add-table') + // } + // } + // let children = e.target.parentNode.children + // for (let i = 0; i < children.length; i++) { + // children[i].classList.add('checked-td-of-add-table') + // } }, }, } @@ -211,6 +209,8 @@ onSelectChange(selectedRowKeys, selectionRows) { this.selectedRowKeys = selectedRowKeys; this.selectionRows = selectionRows; + //灏嗗綋鍓嶉�変腑鐨勮褰曚紶鍒板瓙椤甸潰 + this.$bus.$emit('getToolingStorageData', this.selectionRows[0]) }, handleEdit: function (record) { this.$refs.modalForm.edit(record) diff --git a/src/views/tms/modules/inbound/InboundListRight.vue b/src/views/tms/modules/inbound/InboundListRight.vue index 247a0ab..2a56ce4 100644 --- a/src/views/tms/modules/inbound/InboundListRight.vue +++ b/src/views/tms/modules/inbound/InboundListRight.vue @@ -76,6 +76,7 @@ :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" class="j-table-force-nowrap" + :customRow="customRow" @change="handleTableChange"> <template slot="htmlSlot" slot-scope="text"> @@ -338,6 +339,16 @@ this.$bus.$emit('queryTreeData') //鍒锋柊宸︿晶鏍� }, + customRow(record) { + return { + on: { + click: () => { + this.onSelectChange(record.id.split(","), [record]); + } + } + } + }, + onSelectChange(selectedRowKeys) { this.selectedRowKeys = selectedRowKeys; //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� @@ -478,6 +489,9 @@ if (res.success) { this.dataSource = res.result.records; // 鏇存柊琛ㄦ牸鏁版嵁 this.ipagination.total = res.result.total + //榛樿閫変腑绗竴鏉℃暟鎹� + this.selectedRowKeys[0] = res.result.records[0].id + this.onSelectChange(this.selectedRowKeys) } else { this.$message.warning("璇烽�夋嫨鍙跺瓙鑺傜偣杩涜鏌ヨ"); this.ipagination.total = 0 diff --git a/src/views/tms/modules/inbound/InboundModel.vue b/src/views/tms/modules/inbound/InboundModel.vue index e2eda69..bbd4993 100644 --- a/src/views/tms/modules/inbound/InboundModel.vue +++ b/src/views/tms/modules/inbound/InboundModel.vue @@ -102,7 +102,15 @@ <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-tooling-modal> <j-select-return-list-modal ref="returnModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-return-list-modal> <j-select-sharpen-list-modal ref="sharpenModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-sharpen-list-modal> + + <div id="printArea" style="display: block;"> + <div v-for="(item, index) in qrList" :key="index" class="qrcode-item"> + <img :src="item.base64" alt="QR Code"> + <p>{{ item.content }}</p> + </div> + </div> </a-modal> + </template> <script> @@ -117,6 +125,7 @@ import { filterObj } from '@/utils/util' import JSelectReturnListModal from '.././inboundOrder/JSelectReturnListModal' import JSelectSharpenListModal from '.././inboundOrder/JSelectSharpenListModal' +import printJS from 'print-js'; export default { name: 'InboundModel', @@ -252,7 +261,8 @@ }, ], classifyId:'', - locationCodeOptions:[] + locationCodeOptions:[], + qrList: [] } }, created() { @@ -325,7 +335,15 @@ postAction(this.url.addInStorage, formData) .then((res) => { if (res.success) { - that.$message.success(res.message) + if(formData.inStorehouseType === '1'){ + this.qrList = res.result.map((content, i) => ({ + content:res.result[i].content, + base64: res.result[i].image + })); + this.handleBacthPrint(); + }else{ + that.$message.success("淇濆瓨鎴愬姛") + } that.$emit('ok', new Date()) } else { that.$message.warning(res.message) @@ -412,6 +430,25 @@ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ); }, + + // 鎵ц鎵撳嵃 + handleBacthPrint() { + this.$nextTick(() => { + printJS({ + printable: 'printArea', + type: 'html', + style: ` + .qrcode-item { + page-break-inside: avoid; + margin: 10px; + text-align: center; + } + img { width: 100px; height: 100px; } + `, + scanStyles: false + }); + }); + } }, watch: {}, mounted() { diff --git a/src/views/tms/modules/toolLedger/ToolLedgerListRight.vue b/src/views/tms/modules/toolLedger/ToolLedgerListRight.vue index e5e10e5..7c0a839 100644 --- a/src/views/tms/modules/toolLedger/ToolLedgerListRight.vue +++ b/src/views/tms/modules/toolLedger/ToolLedgerListRight.vue @@ -458,6 +458,9 @@ if (res.success) { this.dataSource = res.result.records; // 鏇存柊琛ㄦ牸鏁版嵁 this.ipagination.total = res.result.total + //榛樿閫変腑绗竴鏉℃暟鎹� + this.selectedRowKeys[0] = res.result.records[0].id + this.onSelectChange(this.selectedRowKeys) } else { this.$message.warning("璇烽�夋嫨鍙跺瓙鑺傜偣杩涜鏌ヨ"); this.ipagination.total = 0 diff --git a/yarn.lock b/yarn.lock index 4a998e4..920f21c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9559,6 +9559,11 @@ renderkid "^2.0.1" utila "~0.4" +print-js@^1.6.0: + version "1.6.0" + resolved "https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz#692b046cf31992b46afa6c6d8a9db1c69d431d1f" + integrity sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg== + private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.npmjs.org/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -9687,6 +9692,11 @@ resolved "https://registry.npmmirror.com/qrcode.vue/-/qrcode.vue-1.7.0.tgz#c54b2934f0650c10d92785d08aaad36c55e0fc56" integrity sha512-R7t6Y3fDDtcU7L4rtqwGUDP9xD64gJhIwpfjhRCTKmBoYF6SS49PIJHRJ048cse6OI7iwTwgyy2C46N9Ygoc6g== +qrcodejs2@0.0.2: + version "0.0.2" + resolved "https://registry.npmmirror.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz#465afe5e39f19facecb932c11f7a186109146ae1" + integrity sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA== + qs@6.7.0: version "6.7.0" resolved "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" -- Gitblit v1.9.3