From 8e75a78f55d60565eb48b25eafd4eb07939ce2cc Mon Sep 17 00:00:00 2001 From: zenglf <18502938215@163.com> Date: 星期四, 28 九月 2023 14:09:05 +0800 Subject: [PATCH] Merge branch 'master' into develop --- public/static/计划停机.xls | 0 src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue | 352 + src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue | 163 src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue | 128 src/components/jeecgbiz/modal/JSelectEquipmentDepartModal.vue | 7 src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAdd.vue | 24 src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysisGauge.vue | 836 +++ src/views/system/modules/UserModal.vue | 23 src/views/mdc/base/modules/deviceRepair/DeviceRepairEditListModel.vue | 12 src/views/mdc/base/ProductionManager.vue | 42 src/views/mdc/base/modules/deviceLog/WorkHistoryModel.vue | 23 src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue | 458 + src/views/mdc/base/modules/mdcPassRate/mdcPassRateEdit.vue | 78 src/views/mdc/base/modules/ProductionManager/ProductionModal.vue | 12 src/views/mdc/base/modules/deviceLog/LogInfo.vue | 38 src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalEdit.vue | 21 src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue | 34 src/views/system/modules/DepartList/DepartDataruleModal.vue | 20 src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue | 81 src/views/mdc/base/modules/shift/ShiftInfoModel.vue | 44 src/views/mdc/base/DeviceBaseInfo.vue | 12 src/assets/yellow.png | 0 src/store/index.js | 6 src/views/mdc/base/modules/HourReports/ReportList.vue | 6 ip | 5 src/views/mdc/base/modules/DepartList/DepartListContent/DepartModel.vue | 13 src/views/system/RoleUserList.vue | 6 src/views/mdc/base/Torqueconfiguration.vue | 26 src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModal.vue | 14 public/static/加工数量.xls | 0 src/views/mdc/base/modules/deviceRepair/DeviceRepairModelAdd.vue | 24 src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue | 82 src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue | 91 src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue | 14 src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue | 20 public/static/假期管理.xls | 0 src/store/mutation-types.js | 4 src/views/system/modules/DeptUserInfo.vue | 6 src/views/mdc/base/modules/DepartList/DepartAuthModal.vue | 12 src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue | 14 src/views/mdc/base/modules/alarmManager/alarmManangerEqupment.vue | 18 public/static/加班管理.xls | 0 src/store/modules/Departs.js | 7 src/views/mdc/base/modules/DepartList/DepartListContent/TierModel.vue | 12 src/views/system/modules/QuartzJobModal.vue | 20 src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue | 20 src/views/mdc/base/EfficiencyReport.vue | 25 src/views/mdc/base/MdcUtilizationRateList.vue | 11 src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue | 550 ++ src/views/mdc/base/MdcplancloseList.vue | 18 src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue | 91 src/mixins/JeecgListMixin.js | 36 src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModalList.vue | 18 src/views/system/DepartList1.vue | 59 src/views/mdc/base/modules/deviceRepair/DeviceRepairModelEdit.vue | 42 public/static/非计划停机.xls | 0 src/components/jeecg/modal/JPopupOnlReport.vue | 12 src/views/mdc/base/modules/HolidayManagement/HolidayManagementForm.vue | 12 src/views/mdc/base/openRateFractionAnalysis.vue | 139 src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue | 292 src/views/mdc/base/mdcStandardProcessDuration.vue | 25 src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue | 14 src/views/mdc/base/modules/DepartList/DepartDataruleModal.vue | 12 src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue | 79 src/views/mdc/base/EquipmentList.vue | 201 src/views/mdc/base/modules/DepartList/DepartListTree/modules/DepartTree/TierModel.vue | 12 src/views/system/QuartzJobList.vue | 71 src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue | 128 src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysisBar.vue | 663 ++ src/views/mdc/base/modules/shift/ShiftInfo.vue | 24 src/views/mdc/base/mdcProcessQuantity.vue | 26 src/views/mdc/base/modules/EquipmentList/UserModal.vue | 67 src/views/mdc/base/ComparativeAnalysis.vue | 91 src/views/mdc/base/modules/DepartList/DepartListContent/DepartList.vue | 49 src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue | 91 src/views/system/DepartList.vue | 87 src/views/mdc/base/modules/MdcplancloseList/MdcplancloseForm.vue | 14 src/views/mdc/base/modules/deviceLog/WorkChartModel.vue | 18 src/views/mdc/base/EfficiencyPOReport.vue | 26 src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue | 362 src/views/system/modules/DepartList/DepartAuthModal.vue | 38 src/components/tools/UserMenu.vue | 8 src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue | 14 src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModalList.vue | 464 + src/store/modules/DepartTree.js | 53 src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue | 42 src/views/mdc/base/modules/deviceManager/TierModel.vue | 12 src/views/mdc/base/DeviceRepair.vue | 29 src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModalList.vue | 128 src/views/mdc/base/modules/comparativeAnalysis/conparativeAnalysisPie.vue | 153 src/views/mdc/base/OvertimeManagement.vue | 139 src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeForm.vue | 14 src/components/jeecgbiz/modal/SelectUserListModal.vue | 12 src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue | 12 src/views/mdc/base/equipmentAvailCompare.vue | 91 src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddTree.vue | 20 src/views/mdc/base/modules/equipmentAvailCompare/equipmentAvailCompareMain.vue | 512 ++ src/store/getters.js | 6 src/views/mdc/base/modules/equipmentDayAvail/equipmentDayAvailMain.vue | 517 ++ src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue | 558 ++ src/views/mdc/base/openRateTrendAnalysis.vue | 139 src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue | 128 src/views/mdc/base/modules/DepartList/DepartListContent/DepartListSeachList.vue | 6 src/views/mdc/base/modules/ProductionManager/ProductionEquipment.vue | 18 src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue | 31 src/views/mdc/base/modules/utilizationStatistics/UtilizationStatisticsList.vue | 18 src/views/mdc/base/modules/deviceLog/AlarmLogList.vue | 39 src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue | 67 src/views/mdc/base/modules/deviceLog/LogList.vue | 44 src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue | 724 +++ public/static/标准加工时间.xls | 0 src/views/mdc/base/DeviceCalendar.vue | 25 src/views/mdc/base/modules/mdcUtilizationRate/MdcUtilizationRateModel.vue | 12 src/views/mdc/base/UnplannedDowntimemManager.vue | 25 src/views/mdc/common/BaseTree.vue | 6 src/views/system/modules/DepartList/DepartModal.vue | 12 src/main.js | 18 src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalList.vue | 128 src/views/mdc/base/modules/deviceBaseInfo/EquipmentLayout.vue | 33 src/assets/gray.png | 0 src/views/system/modules/ProductionManager/ProductionEquipment.vue | 36 src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationEdit.vue | 14 src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue | 12 src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue | 24 src/components/jeecgbiz/modal/JSelectEquipmentProductionModal.vue | 6 src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue | 85 src/views/system/DepartListSync.vue | 10 src/views/mdc/base/mdcPassRate.vue | 27 src/views/mdc/base/modules/deviceLog/WorkLogList.vue | 41 src/views/mdc/base/modules/DepartList/DepartListTree/DepartTree.vue | 30 src/views/mdc/base/DepartList.vue | 6 src/views/system/modules/QuartzJobListModal.vue | 423 + src/views/mdc/base/alarmAnalysis.vue | 139 src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalEdit.vue | 14 src/assets/green.png | 0 src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue | 12 src/assets/red.png | 0 src/views/mdc/base/modules/shift/ShiftSystemModel.vue | 44 src/views/system/DepartList2.vue | 31 src/views/mdc/base/modules/mdcPassRate/mdcPassRateModalList.vue | 128 src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModelEdit.vue | 15 src/components/table2excel/table2excel.js | 377 src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModalEdit.vue | 419 + src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue | 48 src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue | 98 src/store/modules/Production.js | 1 src/views/mdc/base/AlarmManager.vue | 124 src/views/mdc/base/modules/deviceManager/DeviceList.vue | 41 src/views/system/ProductionManager.vue | 60 src/views/mdc/base/modules/deviceManager/DeviceModel.vue | 12 src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue | 6 public/static/合格率管理.xls | 0 src/views/mdc/base/RealTimeMonitoringEquipment.vue | 6 src/views/system/modules/ProductionManager/ProductionModal.vue | 12 src/views/system/modules/QuartzJobDetails.vue | 75 /dev/null | 84 src/views/system/UserList.vue | 215 src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue | 76 src/views/mdc/base/HolidayManagement.vue | 25 src/views/mdc/base/equipmentDayAvail.vue | 91 package.json | 4 src/views/mdc/base/EfficiencyShiftReport.vue | 25 src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue | 602 ++ src/views/mdc/base/modules/shift/ShiftSystem.vue | 41 164 files changed, 12,525 insertions(+), 1,502 deletions(-) diff --git a/ip b/ip index d2a836c..c7ef253 100644 --- a/ip +++ b/ip @@ -1,8 +1,5 @@ -娌堥: 172.19.128.73 鏈満: 127.0.0.1 -椋庡崕锛�10.103.1.7 - -椋庡崕2锛�10.16.120.13 +430:166.0.1.10 diff --git a/package.json b/package.json index 324ff1c..2e77700 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "viser-vue": "^2.4.8", "vue": "^2.6.10", "vue-area-linkage": "^5.1.0", + "vue-calendar-component": "^2.8.2", "vue-cropper": "^0.5.4", "vue-i18n": "^8.7.0", "vue-loader": "^15.7.0", @@ -65,6 +66,7 @@ "html-webpack-plugin": "^4.2.0", "less": "^3.9.0", "less-loader": "^4.1.0", + "mini-css-extract-plugin": "^2.7.6", "vue-template-compiler": "^2.6.10" }, "eslintConfig": { @@ -119,6 +121,6 @@ "browserslist": [ "> 1%", "last 2 versions", - "not ie <= 10" + "not ie <= 8" ] } diff --git "a/public/static/\345\201\207\346\234\237\347\256\241\347\220\206.xls" "b/public/static/\345\201\207\346\234\237\347\256\241\347\220\206.xls" new file mode 100644 index 0000000..20820c7 --- /dev/null +++ "b/public/static/\345\201\207\346\234\237\347\256\241\347\220\206.xls" Binary files differ diff --git "a/public/static/\345\212\240\345\267\245\346\225\260\351\207\217.xls" "b/public/static/\345\212\240\345\267\245\346\225\260\351\207\217.xls" new file mode 100644 index 0000000..20820c7 --- /dev/null +++ "b/public/static/\345\212\240\345\267\245\346\225\260\351\207\217.xls" Binary files differ diff --git "a/public/static/\345\212\240\347\217\255\347\256\241\347\220\206.xls" "b/public/static/\345\212\240\347\217\255\347\256\241\347\220\206.xls" new file mode 100644 index 0000000..e2a2671 --- /dev/null +++ "b/public/static/\345\212\240\347\217\255\347\256\241\347\220\206.xls" Binary files differ diff --git "a/public/static/\345\220\210\346\240\274\347\216\207\347\256\241\347\220\206.xls" "b/public/static/\345\220\210\346\240\274\347\216\207\347\256\241\347\220\206.xls" new file mode 100644 index 0000000..20820c7 --- /dev/null +++ "b/public/static/\345\220\210\346\240\274\347\216\207\347\256\241\347\220\206.xls" Binary files differ diff --git "a/public/static/\346\240\207\345\207\206\345\212\240\345\267\245\346\227\266\351\227\264.xls" "b/public/static/\346\240\207\345\207\206\345\212\240\345\267\245\346\227\266\351\227\264.xls" new file mode 100644 index 0000000..20820c7 --- /dev/null +++ "b/public/static/\346\240\207\345\207\206\345\212\240\345\267\245\346\227\266\351\227\264.xls" Binary files differ diff --git "a/public/static/\350\256\241\345\210\222\345\201\234\346\234\272.xls" "b/public/static/\350\256\241\345\210\222\345\201\234\346\234\272.xls" new file mode 100644 index 0000000..20820c7 --- /dev/null +++ "b/public/static/\350\256\241\345\210\222\345\201\234\346\234\272.xls" Binary files differ diff --git "a/public/static/\351\235\236\350\256\241\345\210\222\345\201\234\346\234\272.xls" "b/public/static/\351\235\236\350\256\241\345\210\222\345\201\234\346\234\272.xls" new file mode 100644 index 0000000..e2a2671 --- /dev/null +++ "b/public/static/\351\235\236\350\256\241\345\210\222\345\201\234\346\234\272.xls" Binary files differ diff --git a/src/assets/gray.png b/src/assets/gray.png new file mode 100644 index 0000000..6fcc712 --- /dev/null +++ b/src/assets/gray.png Binary files differ diff --git a/src/assets/green.png b/src/assets/green.png new file mode 100644 index 0000000..dfe2ace --- /dev/null +++ b/src/assets/green.png Binary files differ diff --git a/src/assets/red.png b/src/assets/red.png new file mode 100644 index 0000000..635645f --- /dev/null +++ b/src/assets/red.png Binary files differ diff --git a/src/assets/yellow.png b/src/assets/yellow.png new file mode 100644 index 0000000..e766aec --- /dev/null +++ b/src/assets/yellow.png Binary files differ diff --git a/src/components/jeecg/modal/JPopupOnlReport.vue b/src/components/jeecg/modal/JPopupOnlReport.vue index 5d14dc7..eb7b023 100644 --- a/src/components/jeecg/modal/JPopupOnlReport.vue +++ b/src/components/jeecg/modal/JPopupOnlReport.vue @@ -341,12 +341,20 @@ handleSubmit() { if(!this.multi){ if(this.table.selectionRows && this.table.selectionRows.length>1){ - this.$message.warning("璇烽�夋嫨涓�鏉¤褰�") + // this.$message.warning("璇烽�夋嫨涓�鏉¤褰�") + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return false } } if(!this.table.selectionRows || this.table.selectionRows.length==0){ - this.$message.warning("璇烽�夋嫨涓�鏉¤褰�") + // this.$message.warning("璇烽�夋嫨涓�鏉¤褰�") + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return false } this.$emit('ok', this.table.selectionRows); diff --git a/src/components/jeecgbiz/modal/JSelectEquipmentDepartModal.vue b/src/components/jeecgbiz/modal/JSelectEquipmentDepartModal.vue index 059fe5f..beca2c5 100644 --- a/src/components/jeecgbiz/modal/JSelectEquipmentDepartModal.vue +++ b/src/components/jeecgbiz/modal/JSelectEquipmentDepartModal.vue @@ -139,7 +139,12 @@ this.allTreeKeys = res.result this.loadDepart() } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } }).finally(() => { this.loading = false diff --git a/src/components/jeecgbiz/modal/JSelectEquipmentProductionModal.vue b/src/components/jeecgbiz/modal/JSelectEquipmentProductionModal.vue index 8f725ff..b85d3b1 100644 --- a/src/components/jeecgbiz/modal/JSelectEquipmentProductionModal.vue +++ b/src/components/jeecgbiz/modal/JSelectEquipmentProductionModal.vue @@ -106,7 +106,11 @@ this.allTreeKeys = res.result this.loadDepart() } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false diff --git a/src/components/jeecgbiz/modal/SelectUserListModal.vue b/src/components/jeecgbiz/modal/SelectUserListModal.vue index 1da0148..5882c4d 100644 --- a/src/components/jeecgbiz/modal/SelectUserListModal.vue +++ b/src/components/jeecgbiz/modal/SelectUserListModal.vue @@ -97,11 +97,19 @@ handleChange(info) { let file = info.file; if (file.response.success) { - this.$message.success(file.response.message); + // this.$message.success(file.response.message); + this.$notification.success({ + message:'娑堟伅', + description:file.response.message + }); this.$emit('ok'); this.close() } else { - this.$message.warn(file.response.message); + // this.$message.warn(file.response.message); + this.$notification.warning({ + message:'娑堟伅', + description:file.response.message + }); this.close() } diff --git a/src/components/table2excel/table2excel.js b/src/components/table2excel/table2excel.js index 1f375e0..0767353 100644 --- a/src/components/table2excel/table2excel.js +++ b/src/components/table2excel/table2excel.js @@ -1,184 +1,261 @@ -/* - * jQuery table2excel - v1.0.2 - * jQuery plugin to export an .xls file in browser from an HTML table - * https://github.com/rainabba/jquery-table2excel - * - * Made by rainabba - * Under MIT License - */ + //table2excel.js import jQuery from 'jquery' -;(function ( $, window, document, undefined ) { - var pluginName = "table2excel", +(function ( $, window, document, undefined ) { + var pluginName = "table2excel", - defaults = { - exclude: ".noExl", - name: "Table2Excel" - }; + defaults = { + exclude: ".noExl", + name: "Table2Excel", + filename: "table2excel", + fileext: ".xls", + exclude_img: true, + exclude_links: true, + exclude_inputs: true, + preserveColors: true + }; - // The actual plugin constructor - function Plugin ( element, options ) { - this.element = element; - // jQuery has an extend method which merges the contents of two or - // more objects, storing the result in the first object. The first object - // is generally empty as we don't want to alter the default options for - // future instances of the plugin - // - this.settings = $.extend( {}, defaults, options ); - this._defaults = defaults; - this._name = pluginName; - this.init(); - } + // The actual plugin constructor + function Plugin ( element, options ) { + this.element = element; + // jQuery has an extend method which merges the contents of two or + // more objects, storing the result in the first object. The first object + // is generally empty as we don't want to alter the default options for + // future instances of the plugin + // + this.settings = $.extend( {}, defaults, options ); + this._defaults = defaults; + this._name = pluginName; + this.init(); + } - Plugin.prototype = { - init: function () { - var e = this; + Plugin.prototype = { + init: function () { + var e = this; - e.template = { - head: "<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns=\"http://www.w3.org/TR/REC-html40\"><head><meta charset=\"UTF-8\"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets>", - sheet: { - head: "<x:ExcelWorksheet><x:Name>", - tail: "</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>" - }, - mid: "</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>", - table: { - head: "<table border='1'>", - tail: "</table>" - }, - foot: "</body></html>" - }; + var utf8Heading = "<meta http-equiv=\"content-type\" content=\"application/vnd.ms-excel; charset=UTF-8\">"; + e.template = { + head: "<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns=\"http://www.w3.org/TR/REC-html40\">" + utf8Heading + "<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets>", + sheet: { + head: "<x:ExcelWorksheet><x:Name>", + tail: "</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>" + }, + mid: "</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>", + table: { + head: "<table border='1'>", + tail: "</table>" + }, + foot: "</body></html>" + }; - e.tableRows = []; + e.tableRows = []; - // get contents of table except for exclude - $(e.element).each( function(i,o) { - var tempRows = ""; - $(o).find("tr").not(e.settings.exclude).each(function (i,o) { - tempRows += "<tr align='center' valign='center'>" + $(o).html() + "</tr>"; - }); - e.tableRows.push(tempRows); - }); + // Styling variables + var additionalStyles = ""; + var compStyle = null; - // exclude img tags - if(e.settings.exclude_img) { - e.tableRows[0] = exclude_img(e.tableRows[0]); + // get contents of table except for exclude + $(e.element).each( function(i,o) { + var tempRows = ""; + $(o).find("tr").not(e.settings.exclude).each(function (i,p) { + + // Reset for this row + additionalStyles = ""; + + // Preserve background and text colors on the row + if(e.settings.preserveColors){ + compStyle = getComputedStyle(p); + additionalStyles += (compStyle && compStyle.backgroundColor ? "background-color: " + compStyle.backgroundColor + ";" : ""); + additionalStyles += (compStyle && compStyle.color ? "color: " + compStyle.color + ";" : ""); + } + + // Create HTML for Row + tempRows += "<tr align='center' valign='center' style='" + additionalStyles + "'>"; + + // Loop through each TH and TD + $(p).find("td,th").not(e.settings.exclude).each(function (i,q) { // p did not exist, I corrected + + // Reset for this column + additionalStyles = ""; + + // Preserve background and text colors on the row + if(e.settings.preserveColors){ + compStyle = getComputedStyle(q); + additionalStyles += (compStyle && compStyle.backgroundColor ? "background-color: " + compStyle.backgroundColor + ";" : ""); + additionalStyles += (compStyle && compStyle.color ? "color: " + compStyle.color + ";" : ""); } - // exclude link tags - if(e.settings.exclude_links) { - e.tableRows[0] = exclude_links(e.tableRows[0]); + var rc = { + rows: $(this).attr("rowspan"), + cols: $(this).attr("colspan"), + flag: $(q).find(e.settings.exclude) + }; + + if( rc.flag.length > 0 ) { + tempRows += "<td> </td>"; // exclude it!! + } else { + tempRows += "<td"; + if( rc.rows > 0) { + tempRows += " rowspan='" + rc.rows + "' "; + } + if( rc.cols > 0) { + tempRows += " colspan='" + rc.cols + "' "; + } + if(additionalStyles){ + tempRows += " style='" + additionalStyles + "'"; + } + tempRows += ">" + $(q).html() + "</td>"; } + }); - // exclude input tags - if(e.settings.exclude_inputs) { - e.tableRows[0] = exclude_inputs(e.tableRows[0]) - } + tempRows += "</tr>"; - e.tableToExcel(e.tableRows, e.settings.name, e.settings.sheetName); - }, + }); + // exclude img tags + if(e.settings.exclude_img) { + tempRows = exclude_img(tempRows); + } - tableToExcel: function (table, name, sheetName) { - var e = this, fullTemplate="", i, link, a; + // exclude link tags + if(e.settings.exclude_links) { + tempRows = exclude_links(tempRows); + } - e.uri = "data:application/vnd.ms-excel;base64,"; - e.base64 = function (s) { - return window.btoa(unescape(encodeURIComponent(s))); - }; - e.format = function (s, c) { - return s.replace(/{(\w+)}/g, function (m, p) { - return c[p]; - }); - }; - e.ctx = { - worksheet: name || "Worksheet", - table: table - }; + // exclude input tags + if(e.settings.exclude_inputs) { + tempRows = exclude_inputs(tempRows); + } + e.tableRows.push(tempRows); + }); - fullTemplate= e.template.head; + e.tableToExcel(e.tableRows, e.settings.name, e.settings.sheetName); + }, - if ( $.isArray(table) ) { - for (i in table) { - //fullTemplate += e.template.sheet.head + "{worksheet" + i + "}" + e.template.sheet.tail; - fullTemplate += e.template.sheet.head + sheetName + e.template.sheet.tail; - } - } + tableToExcel: function (table, name, sheetName) { + var e = this, fullTemplate="", i, link, a; - fullTemplate += e.template.mid; + e.format = function (s, c) { + return s.replace(/{(\w+)}/g, function (m, p) { + return c[p]; + }); + }; - if ( $.isArray(table) ) { - for (i in table) { - fullTemplate += e.template.table.head + "{table" + i + "}" + e.template.table.tail; - } - } + sheetName = typeof sheetName === "undefined" ? "Sheet" : sheetName; - fullTemplate += e.template.foot; + e.ctx = { + worksheet: name || "Worksheet", + table: table, + sheetName: sheetName + }; - for (i in table) { - e.ctx["table" + i] = table[i]; - } - delete e.ctx.table; + fullTemplate= e.template.head; + if ( $.isArray(table) ) { + Object.keys(table).forEach(function(i){ + //fullTemplate += e.template.sheet.head + "{worksheet" + i + "}" + e.template.sheet.tail; + fullTemplate += e.template.sheet.head + sheetName + i + e.template.sheet.tail; + }); + } - if (typeof msie !== "undefined" && msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) // If Internet Explorer - { - if (typeof Blob !== "undefined") { - //use blobs if we can - fullTemplate = [fullTemplate]; - //convert to array - var blob1 = new Blob(fullTemplate, { type: "text/html" }); - window.navigator.msSaveBlob(blob1, getFileName(e.settings) ); - } else { - //otherwise use the iframe and save - //requires a blank iframe on page called txtArea1 - txtArea1.document.open("text/html", "replace"); - txtArea1.document.write(fullTemplate); - txtArea1.document.close(); - txtArea1.focus(); - sa = txtArea1.document.execCommand("SaveAs", true, getFileName(e.settings) ); - } + fullTemplate += e.template.mid; - } else { - link = e.uri + e.base64(e.format(fullTemplate, e.ctx)); - a = document.createElement("a"); - a.download = getFileName(e.settings); - a.href = link; - a.click(); - } + if ( $.isArray(table) ) { + Object.keys(table).forEach(function(i){ + fullTemplate += e.template.table.head + "{table" + i + "}" + e.template.table.tail; + }); + } - return true; + fullTemplate += e.template.foot; - } - }; + for (i in table) { + e.ctx["table" + i] = table[i]; + } + delete e.ctx.table; - function getFileName(settings) { - return ( settings.filename ? settings.filename : "table2excel") + ".xls"; - } + var isIE = navigator.appVersion.indexOf("MSIE 10") !== -1 || (navigator.userAgent.indexOf("Trident") !== -1 && navigator.userAgent.indexOf("rv:11") !== -1); // this works with IE10 and IE11 both :) + //if (typeof msie !== "undefined" && msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) // this works ONLY with IE 11!!! + if (isIE) { + if (typeof Blob !== "undefined") { + //use blobs if we can + fullTemplate = e.format(fullTemplate, e.ctx); // with this, works with IE + fullTemplate = [fullTemplate]; + //convert to array + var blob1 = new Blob(fullTemplate, { type: "text/html" }); + window.navigator.msSaveBlob(blob1, getFileName(e.settings) ); + } else { + //otherwise use the iframe and save + //requires a blank iframe on page called txtArea1 + txtArea1.document.open("text/html", "replace"); + txtArea1.document.write(e.format(fullTemplate, e.ctx)); + txtArea1.document.close(); + txtArea1.focus(); + sa = txtArea1.document.execCommand("SaveAs", true, getFileName(e.settings) ); + } - // Removes all img tags - function exclude_img(string) { - return string.replace(/<img[^>]*>/gi,""); - } + } else { + var blob = new Blob([e.format(fullTemplate, e.ctx)], {type: "application/vnd.ms-excel"}); + window.URL = window.URL || window.webkitURL; + link = window.URL.createObjectURL(blob); + a = document.createElement("a"); + a.download = getFileName(e.settings); + a.href = link; - // Removes all link tags - function exclude_links(string) { - return string.replace(/<A[^>]*>|<\/A>/g, ""); - } + document.body.appendChild(a); - // Removes input params - function exclude_inputs(string) { - return string.replace(/<input[^>]*>|<\/input>/gi, ""); - } + a.click(); - $.fn[ pluginName ] = function ( options ) { - var e = this; - e.each(function() { - if ( !$.data( e, "plugin_" + pluginName ) ) { - $.data( e, "plugin_" + pluginName, new Plugin( this, options ) ); - } - }); + document.body.removeChild(a); + } - // chain jQuery functions - return e; - }; + return true; + } + }; -})( jQuery, window, document ); + function getFileName(settings) { + return ( settings.filename ? settings.filename : "table2excel" ); + } + + // Removes all img tags + function exclude_img(string) { + var _patt = /(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i; + return string.replace(/<img[^>]*>/gi, function myFunction(x){ + var res = _patt.exec(x); + if (res !== null && res.length >=2) { + return res[2]; + } else { + return ""; + } + }); + } + + // Removes all link tags + function exclude_links(string) { + return string.replace(/<a[^>]*>|<\/a>/gi, ""); + } + + // Removes input params + function exclude_inputs(string) { + var _patt = /(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i; + return string.replace(/<input[^>]*>|<\/input>/gi, function myFunction(x){ + var res = _patt.exec(x); + if (res !== null && res.length >=2) { + return res[2]; + } else { + return ""; + } + }); + } + + $.fn[ pluginName ] = function ( options ) { + var e = this; + e.each(function() { + if ( !$.data( e, "plugin_" + pluginName ) ) { + $.data( e, "plugin_" + pluginName, new Plugin( this, options ) ); + } + }); + + // chain jQuery functions + return e; + }; + +})( jQuery, window, document ); \ No newline at end of file diff --git a/src/components/tools/UserMenu.vue b/src/components/tools/UserMenu.vue index 83f62a2..8f462d8 100644 --- a/src/components/tools/UserMenu.vue +++ b/src/components/tools/UserMenu.vue @@ -50,10 +50,10 @@ <!--<span>璐︽埛璁剧疆</span>--> <!--</router-link>--> <!--</a-menu-item>--> - <a-menu-item key="3" @click="systemSetting"> - <a-icon type="tool"/> - <span>绯荤粺璁剧疆</span> - </a-menu-item> + <!--<a-menu-item key="3" @click="systemSetting">--> + <!--<a-icon type="tool"/>--> + <!--<span>绯荤粺璁剧疆</span>--> + <!--</a-menu-item>--> <a-menu-item key="4" @click="updatePassword"> <a-icon type="setting"/> <span>瀵嗙爜淇敼</span> diff --git a/src/main.js b/src/main.js index f0c4cbe..d473f6d 100644 --- a/src/main.js +++ b/src/main.js @@ -51,6 +51,24 @@ import { rules } from '@/utils/rules' import * as echarts from 'echarts' import qs from 'qs' +// import VCalendar from 'v-calendar'; // 寮曞叆鏃ュ巻鎻掍欢 +// +// Vue.use(VCalendar, { +// componentPrefix: 'vc', +// }); + +//娉ㄥ叆鍏ㄥ眬灞炴��$message +import {message,notification } from 'ant-design-vue' +Vue.prototype.$message = message +Vue.prototype.$notification = notification +message.config({ +}) +notification.config({ + bottom:'20px', + right:'100px' +}) + + // import 'echarts-liquidfill' Vue.prototype.$echarts = echarts Vue.prototype.$qs = qs diff --git a/src/mixins/JeecgListMixin.js b/src/mixins/JeecgListMixin.js index 9067c9c..375daf9 100644 --- a/src/mixins/JeecgListMixin.js +++ b/src/mixins/JeecgListMixin.js @@ -175,7 +175,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -192,11 +196,19 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; @@ -215,10 +227,18 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(1) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadData(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); }, @@ -289,7 +309,11 @@ console.log("瀵煎嚭鍙傛暟",param) downFile(this.url.exportXlsUrl,param).then((data)=>{ if (!data) { - this.$message.warning("鏂囦欢涓嬭浇澶辫触") + // this.$message.warning("鏂囦欢涓嬭浇澶辫触") + this.$notification.warning({ + message:'娑堟伅', + description:"鏂囦欢涓嬭浇澶辫触" + }); return } if (typeof window.navigator.msSaveBlob !== 'undefined') { diff --git a/src/store/getters.js b/src/store/getters.js index cafecce..a43a210 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -1,5 +1,6 @@ import Vue from 'vue' import { USER_INFO, ENHANCE_PRE } from "@/store/mutation-types" +import DepartTree from './modules/DepartTree' const getters = { device: state => state.app.device, theme: state => state.app.theme, @@ -19,7 +20,10 @@ }, sysSafeMode: state => state.user.sysSafeMode, ProductionNode:state => state.Production.ProductionTree, - DepartNode:state => state.Depart.DepartTree + DepartNode:state => state.Departs.DepartTree, + + DepartTree:state => state.DepartTree.DepartTreeType + } export default getters diff --git a/src/store/index.js b/src/store/index.js index 6e1a279..9124886 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -11,7 +11,8 @@ import Production from './modules/Production' //閮ㄩ棬鏍� import Departs from './modules/Departs' - +//閮ㄩ棬鏍戞潈闄� +import DepartTree from './modules/DepartTree' Vue.use(Vuex) export default new Vuex.Store({ @@ -22,7 +23,8 @@ enhance, online, Production, - Departs + Departs, + DepartTree }, state: { diff --git a/src/store/modules/DepartTree.js b/src/store/modules/DepartTree.js new file mode 100644 index 0000000..b2a52a7 --- /dev/null +++ b/src/store/modules/DepartTree.js @@ -0,0 +1,53 @@ +import Vue from 'vue' +import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api' +import { SYS_DEPARTTREE } from "@/store/mutation-types" +import { getAction } from '@/api/manage' + +const DepartTree = { + state: { + token: '', + //閮ㄩ棬鏍戠殑鏉冮檺 + DepartTreeType:"" + + }, + + mutations: { + SET_TOKEN: (state, token) => { + state.token = token + }, + SET_DEPARTTREE:(state,DepartTreeType) => { + state.DepartTreeType = DepartTreeType + } + }, + + actions: { + // 浜х嚎鏍� + QueryDepartTree({ commit }) { + return new Promise((resolve, reject) => { + + //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁� + ajaxGetDictItems('depart_is', null).then((res) => { + if (res.success) { + const result = res.result + Vue.ls.set(SYS_DEPARTTREE, result) + commit('SET_DEPARTTREE', result) + resolve(res) + }else{ + resolve(res) + + } + }).catch(error => { + reject(error) + }) + + }) + }, + + + + + + } +} + +export default DepartTree \ No newline at end of file diff --git a/src/store/modules/Departs.js b/src/store/modules/Departs.js index f1835e5..2189cd2 100644 --- a/src/store/modules/Departs.js +++ b/src/store/modules/Departs.js @@ -2,9 +2,9 @@ import { queryTreeListByDepart } from "@/api/Tree" import { SYS_DEPART } from "@/store/mutation-types" import { getAction } from '@/api/manage' - -const Depart = { +const Departs = { state: { + token: '', //閮ㄩ棬鏍� DepartTree:[] @@ -25,7 +25,6 @@ QueryDepart({ commit }) { return new Promise((resolve, reject) => { getAction("/mdc/mdcEquipment/queryTreeListByDepart").then(response => { - console.log("----閮ㄩ棬鏍�--------",response); if(response.success){ const result = response.result Vue.ls.set(SYS_DEPART, result) @@ -44,4 +43,4 @@ } } -export default Depart \ No newline at end of file +export default Departs \ No newline at end of file diff --git a/src/store/modules/Production.js b/src/store/modules/Production.js index 9749cbd..fc21e70 100644 --- a/src/store/modules/Production.js +++ b/src/store/modules/Production.js @@ -25,7 +25,6 @@ QueryProduction({ commit }) { return new Promise((resolve, reject) => { getAction("/mdc/mdcEquipment/queryTreeListByProduction").then(response => { - console.log("----浜х嚎鏍�--------",response); if(response.success){ const result = response.result Vue.ls.set(SYS_PRODUCTION, result) diff --git a/src/store/mutation-types.js b/src/store/mutation-types.js index a32659d..fca9097 100644 --- a/src/store/mutation-types.js +++ b/src/store/mutation-types.js @@ -30,4 +30,6 @@ //浜х嚎鏍� export const SYS_PRODUCTION = 'SYS_PRODUCTION' //閮ㄩ棬鏍� -export const SYS_DEPART = 'SYS_DEPART' \ No newline at end of file +export const SYS_DEPART = 'SYS_DEPART' +//閮ㄩ棬鏍戞潈闄� +export const SYS_DEPARTTREE = 'SYS_DEPARTTREE' \ No newline at end of file diff --git a/src/views/mdc/base/AlarmManager.vue b/src/views/mdc/base/AlarmManager.vue index 2da413e..b8378ab 100644 --- a/src/views/mdc/base/AlarmManager.vue +++ b/src/views/mdc/base/AlarmManager.vue @@ -7,33 +7,46 @@ @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="4" - :lg="4" - :md="4" + :xl="6" + :lg="7" + :md="8" :sm="24" > - <a-form-item label="璁惧缂栧彿"> - <a-input - placeholder="璇疯緭鍏ヨ澶囩紪鍙�" - v-model="queryParam.equipmentId" - ></a-input> + <a-form-item label="鎺у埗绯荤粺绫诲瀷"> + <j-dict-select-tag + placeholder="璇烽�夋嫨鎺у埗绯荤粺绫诲瀷" + v-model="queryParam.driveType" + dictCode="mdc_driveType" + /> </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="4" :lg="4" @@ -53,10 +66,10 @@ :md="4" :sm="24" > - <a-form-item label="鎶ヨ鎻忚堪"> + <a-form-item label="鎶ヨ鍐呭"> <a-input - placeholder="璇疯緭鍏ユ姤璀︽弿杩�" - v-model="queryParam.alarmDescription" + placeholder="璇疯緭鍏ユ姤璀﹀唴瀹�" + v-model="queryParam.alarmContent" ></a-input> </a-form-item> </a-col> @@ -102,12 +115,12 @@ @click="handleAddTRype" type="primary" icon="plus" - >椹卞姩鏂板</a-button> - <a-button - @click="handleAdd" - type="primary" - icon="plus" - >璁惧鏂板</a-button> + >鏂板</a-button> + <!--<a-button--> + <!--@click="handleAdd"--> + <!--type="primary"--> + <!--icon="plus"--> + <!-->璁惧鏂板</a-button>--> <!--<a-upload--> <!--name="file"--> <!--:showUploadList="false"--> @@ -223,18 +236,18 @@ return parseInt(index) + 1; } }, - { - title: '璁惧缂栧彿', - align: "center", - // sorter: true, - dataIndex: 'equipmentId' - }, - { - title: '璁惧鍚嶇О', - align: "center", - // sorter: true, - dataIndex: 'equipmentName' - }, + // { + // title: '璁惧缂栧彿', + // align: "center", + // // sorter: true, + // dataIndex: 'equipmentId' + // }, + // { + // title: '璁惧鍚嶇О', + // align: "center", + // // sorter: true, + // dataIndex: 'equipmentName' + // }, { title: '鎶ヨ鍙�', align: "center", @@ -242,10 +255,10 @@ dataIndex: 'alarmCode' }, { - title: '鎶ヨ鎻忚堪', + title: '鎶ヨ鍐呭', align: "center", // sorter: true, - dataIndex: 'alarmDescription' + dataIndex: 'alarmContent' }, { @@ -254,11 +267,17 @@ // sorter: true, dataIndex: 'driveType' }, + // { + // title: '鏄惁杩囨护', + // align: "center", + // dataIndex: 'isUse', + // customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isUse'], text) : ''), + // }, { + dataIndex:'isUse_dictText', title: '鏄惁杩囨护', align: "center", - dataIndex: 'isUse', - customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isUse'], text) : ''), + // dictCode:'alarm_is_use' }, { title: '鎿嶄綔', @@ -270,9 +289,9 @@ } ], url: { - list: "/mdc/alarmInfo/page", - delete: "/mdc/alarmInfo/delete", - deleteBatch: "/mdc/alarmInfo/deleteBatch", + list: "/mdc/mdcAlarmInfo/list", + delete: "/mdc/mdcAlarmInfo/delete", + deleteBatch: "/mdc/mdcAlarmInfo/deleteBatch", importExcelUrl: "mdc/mdcDriveTypeParamConfig/importExcel", }, @@ -281,7 +300,7 @@ } }, created() { - this.$set(this.dictOptions, 'isUse', [{ text: '鏄�', value: '1' }, { text: '鍚�', value: '2' }]) + this.$set(this.dictOptions, 'isUse', [{ text: '鏄�', value: '0' }, { text: '鍚�', value: '-1' }]) this.getSuperFieldList(); }, computed: { @@ -305,9 +324,8 @@ }, getSuperFieldList() { let fieldList = []; - fieldList.push({ type: 'string', value: 'equipmentId', text: '璁惧缂栧彿', dictCode: '' }) fieldList.push({ type: 'string', value: 'alarmCode', text: '鎶ヨ鍙�', dictCode: '' }) - fieldList.push({ type: 'string', value: 'alarmDescription', text: '鎶ヨ鎻忚堪', dictCode: '' }) + fieldList.push({ type: 'string', value: 'alarmDescription', text: '鎶ヨ鍐呭', dictCode: '' }) fieldList.push({ type: 'int', value: 'driveType', text: '璁惧椹卞姩绫诲瀷', dictCode: '' }) fieldList.push({ type: 'switch', value: 'isUse', text: '鏄惁杩囨护' }) this.superFieldList = fieldList diff --git a/src/views/mdc/base/ComparativeAnalysis.vue b/src/views/mdc/base/ComparativeAnalysis.vue new file mode 100644 index 0000000..669c233 --- /dev/null +++ b/src/views/mdc/base/ComparativeAnalysis.vue @@ -0,0 +1,91 @@ +<template> + <a-card :bordered="false"> + <div style="width: 100%; height: 100%;overflow: hidden"> + <a-row type="flex" :gutter="16"> + <a-col :md="5"> + <a-tabs :activeKey="activeKey" @change="tabChange"> + <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> + <base-tree @getCurrSelected="changeSelectionNode"></base-tree> + </a-tab-pane> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇"> + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> + </a-tab-pane> + </a-tabs> + </a-col> + <a-col :md="24-5" :sm="24"> + <comparative-analysismain ref="comparativeAnalysismain" :nodeTree='selectEquement' :nodePeople='selectPeople' :Type="slectTypeTree"></comparative-analysismain> + </a-col> + </a-row> + </div> + </a-card> +</template> + +<script> + import BaseTree from '../common/BaseTree' + import comparativeAnalysismain from './modules/comparativeAnalysis/comparativeAnalysismain' + import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' + export default { + name: 'ComparativeAnalysis', + components:{ + BaseTree, + comparativeAnalysismain, + DepartTree + }, + data() { + return { + activeKey: '1', + description: '璁惧淇℃伅', + selectEquementId: '', + selectEquement: {}, + selectPeople:{}, + slectTypeTree: '', + url: { + equipmentStatistics: '/mdc/equipment/equipmentStatistics' + }, + isDepartType:'', + } + }, + created() { + this.queryTreeData() + }, + methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, + tabChange(val) { + // console.log(val) + this.activeKey = val + this.slectTypeTree = val + }, + /* changeSelection(val) { + this.selectEquementId = val + this.$refs.DeviceRepairList.pQuery(val) + },*/ + changeSelectionNode(val) { + this.selectEquement = val + this.slectTypeTree = '1' + }, + changeSelectionNodedd(val) { + this.selectPeople = val + this.slectTypeTree = '2' + } + } + } +</script> + +<style scoped> + +</style> \ No newline at end of file diff --git a/src/views/mdc/base/DepartList.vue b/src/views/mdc/base/DepartList.vue index 0bc5eb9..6e11b6e 100644 --- a/src/views/mdc/base/DepartList.vue +++ b/src/views/mdc/base/DepartList.vue @@ -295,7 +295,11 @@ batchDel: function () { console.log(this.checkedKeys) if (this.checkedKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + this.$notification.warning({ + message:'娑堟伅', + description:'璇烽�夋嫨涓�鏉¤褰�' + }); } else { var ids = '' for (var a = 0; a < this.checkedKeys.length; a++) { diff --git a/src/views/mdc/base/DeviceBaseInfo.vue b/src/views/mdc/base/DeviceBaseInfo.vue index cefd37b..3c7ccf1 100644 --- a/src/views/mdc/base/DeviceBaseInfo.vue +++ b/src/views/mdc/base/DeviceBaseInfo.vue @@ -117,10 +117,18 @@ } } }else{ - this.$message.warning("姝よ溅闂翠笅闈㈡棤璁惧锛侊紒") + // this.$message.warning("姝よ溅闂翠笅闈㈡棤璁惧锛侊紒") + this.$notification.warning({ + message:'娑堟伅', + description:"姝よ溅闂翠笅闈㈡棤璁惧锛侊紒" + }); } } else { - this.$message.warn(res.message) + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, diff --git a/src/views/mdc/base/DeviceCalendar.vue b/src/views/mdc/base/DeviceCalendar.vue index bdf53ca..1cbbdb8 100644 --- a/src/views/mdc/base/DeviceCalendar.vue +++ b/src/views/mdc/base/DeviceCalendar.vue @@ -7,9 +7,8 @@ <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇"> - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇"> + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> @@ -32,6 +31,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' export default { name: 'DeviceCalendar', components: { @@ -51,12 +51,29 @@ slectTypeTree: '', url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val) this.activeKey = val diff --git a/src/views/mdc/base/DeviceRepair.vue b/src/views/mdc/base/DeviceRepair.vue index 41f4a78..adc416c 100644 --- a/src/views/mdc/base/DeviceRepair.vue +++ b/src/views/mdc/base/DeviceRepair.vue @@ -2,17 +2,13 @@ <div style="width: 100%; height: 100%;"> <a-card :bordered="false"> <a-row type="flex" :gutter="16"> - <!--<a-col :md="5"> - <base-tree @getCurrSelected="changeSelectionNode"></base-tree> - </a-col>--> <a-col :md="5"> <a-tabs :activeKey="activeKey" @change="tabChange"> <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇"> - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇"> + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> @@ -36,6 +32,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' export default { name: 'DeviceRepair', @@ -57,12 +54,30 @@ slectTypeTree: '', url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val) this.activeKey = val diff --git a/src/views/mdc/base/EfficiencyPOReport.vue b/src/views/mdc/base/EfficiencyPOReport.vue index 67a3e1b..6ff308f 100644 --- a/src/views/mdc/base/EfficiencyPOReport.vue +++ b/src/views/mdc/base/EfficiencyPOReport.vue @@ -7,9 +7,8 @@ <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇">, - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> @@ -32,6 +31,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' +import {mapActions} from 'vuex' export default { name: 'EfficiencyPOReport', components: { @@ -52,12 +52,30 @@ slectTypeTree:"", url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val); this.activeKey = val diff --git a/src/views/mdc/base/EfficiencyReport.vue b/src/views/mdc/base/EfficiencyReport.vue index b438494..9b35e22 100644 --- a/src/views/mdc/base/EfficiencyReport.vue +++ b/src/views/mdc/base/EfficiencyReport.vue @@ -7,9 +7,8 @@ <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇">, - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> @@ -32,6 +31,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' +import {mapActions} from 'vuex' export default { name: 'EfficiencyPOReport', components: { @@ -52,12 +52,29 @@ slectTypeTree:"", url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val); this.activeKey = val diff --git a/src/views/mdc/base/EfficiencyShiftReport.vue b/src/views/mdc/base/EfficiencyShiftReport.vue index 2e90585..1a72217 100644 --- a/src/views/mdc/base/EfficiencyShiftReport.vue +++ b/src/views/mdc/base/EfficiencyShiftReport.vue @@ -7,9 +7,8 @@ <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇"> - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇"> + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> @@ -33,6 +32,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' export default { name: 'EfficiencyShiftReport', components: { @@ -53,12 +53,29 @@ selectPeople:{}, url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val); this.activeKey = val diff --git a/src/views/mdc/base/EquipmentList.vue b/src/views/mdc/base/EquipmentList.vue index c523877..78fc6ff 100644 --- a/src/views/mdc/base/EquipmentList.vue +++ b/src/views/mdc/base/EquipmentList.vue @@ -138,6 +138,7 @@ import UserRecycleBinModal from './modules/EquipmentList/UserRecycleBinModal' import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' + import {mapActions} from 'vuex' export default { name: "EquipmentList", @@ -248,6 +249,7 @@ // exportXlsUrl: "/sys/user/exportXls", // importExcelUrl: "sys/user/importExcel", }, + isDepartType:'' } }, computed: { @@ -255,7 +257,187 @@ // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; // } }, + created() { + this.queryTreeData() + }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + if(this.isDepartType == -1){ + this.columns=[ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title: '璁惧缂栧彿', + align: "center", + dataIndex: 'equipmentId', + width: 120, + // sorter: true + }, + { + title: '璁惧鍚嶇О', + align: "center", + width: 150, + dataIndex: 'equipmentName', + }, + { + title: '杞﹂棿', + align: "center", + width: 180, + dataIndex: 'productionName' + }, + { + title: '璁惧绫诲瀷', + align: "center", + width: 120, + dataIndex: 'equipmentType', + // scopedSlots: {customRender: "avatarslot"} + }, + + { + title: '椹卞姩绫诲瀷', + align: "center", + width: 80, + dataIndex: 'driveType', + // sorter: true + }, + { + title: '鏈哄簥IP', + align: "center", + width: 100, + dataIndex: 'equipmentIp' + }, + { + title: '璁惧鍔熺巼', + align: "center", + width: 100, + dataIndex: 'devicePower' + }, + // { + // title: '閮ㄩ棬', + // align: "center", + // width: 180, + // dataIndex: 'orgCodeTxt' + // }, + + { + title: '绯荤粺鐗堟湰', + align: "center", + width: 80, + dataIndex: 'systemVersion' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + scopedSlots: {customRender: 'action'}, + align: "center", + width: 120 + } + + ] + }else{ + this.columns=[ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title: '璁惧缂栧彿', + align: "center", + dataIndex: 'equipmentId', + width: 120, + // sorter: true + }, + { + title: '璁惧鍚嶇О', + align: "center", + width: 150, + dataIndex: 'equipmentName', + }, + { + title: '杞﹂棿', + align: "center", + width: 180, + dataIndex: 'productionName' + }, + { + title: '璁惧绫诲瀷', + align: "center", + width: 120, + dataIndex: 'equipmentType', + // scopedSlots: {customRender: "avatarslot"} + }, + + { + title: '椹卞姩绫诲瀷', + align: "center", + width: 80, + dataIndex: 'driveType', + // sorter: true + }, + { + title: '鏈哄簥IP', + align: "center", + width: 100, + dataIndex: 'equipmentIp' + }, + { + title: '璁惧鍔熺巼', + align: "center", + width: 100, + dataIndex: 'devicePower' + }, + { + title: '閮ㄩ棬', + align: "center", + width: 180, + dataIndex: 'orgCodeTxt' + }, + + { + title: '绯荤粺鐗堟湰', + align: "center", + width: 80, + dataIndex: 'systemVersion' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + scopedSlots: {customRender: 'action'}, + align: "center", + width: 120 + } + + ] + } + + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, handleEdit: function (record) { this.$refs.modalForm.edit(record); this.$refs.modalForm.title = "缂栬緫"; @@ -274,7 +456,11 @@ batchFrozen: function (status) { if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return false; } else { let ids = ""; @@ -298,11 +484,20 @@ onOk: function () { frozenBatch({ids: ids, status: status}).then((res) => { if (res.success) { - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } }); } diff --git a/src/views/mdc/base/HolidayManagement.vue b/src/views/mdc/base/HolidayManagement.vue index 443b7d3..e230736 100644 --- a/src/views/mdc/base/HolidayManagement.vue +++ b/src/views/mdc/base/HolidayManagement.vue @@ -7,9 +7,8 @@ <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇">, - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> @@ -32,6 +31,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' export default { name: 'HolidayManagement', components: { @@ -52,12 +52,29 @@ slectTypeTree:"", url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val); this.activeKey = val diff --git a/src/views/mdc/base/MdcUtilizationRateList.vue b/src/views/mdc/base/MdcUtilizationRateList.vue index 05a4055..f9293d0 100644 --- a/src/views/mdc/base/MdcUtilizationRateList.vue +++ b/src/views/mdc/base/MdcUtilizationRateList.vue @@ -35,6 +35,9 @@ <span slot="action" slot-scope="text, record"> <a href="javascript:;" @click="handleEdit(record)">缂栬緫</a> </span> + <!--<span slot="action1" slot-scope="text,record">--> + <!--<span><=</span>--> + <!--</span>--> </a-table> </div> <!-- table鍖哄煙-end --> @@ -96,6 +99,14 @@ align: 'center', dataIndex: 'minimumRange' }, + // { + // title:'', + // dataIndex:'action1', + // align:'center', + // scopedSlots: { + // customRender: 'action1' + // } + // }, { title: '鏈�澶ц寖鍥达紙鍗曚綅锛�%锛�', align: 'center', diff --git a/src/views/mdc/base/MdcplancloseList.vue b/src/views/mdc/base/MdcplancloseList.vue index ad95362..2305fcd 100644 --- a/src/views/mdc/base/MdcplancloseList.vue +++ b/src/views/mdc/base/MdcplancloseList.vue @@ -33,10 +33,11 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <!--<a-button type="primary" icon="download" @click="handleExportXls('mdcPlanClose')">瀵煎嚭</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-button type="primary" icon="download" @click="importTemplate('璁″垝鍋滄満妯℃澘')">瀵煎叆妯℃澘</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"> @@ -172,6 +173,15 @@ }, }, methods: { + importTemplate(fileName){ + var a = document.createElement("a"); + a.href = "/static/璁″垝鍋滄満.xls"; + a.download = "璁″垝鍋滄満.xls"; + a.style.display = "none"; + document.body.appendChild(a); + a.click(); + a.remove(); + }, initDictConfig(){ }, getSuperFieldList(){ diff --git a/src/views/mdc/base/OvertimeManagement.vue b/src/views/mdc/base/OvertimeManagement.vue new file mode 100644 index 0000000..3a116fc --- /dev/null +++ b/src/views/mdc/base/OvertimeManagement.vue @@ -0,0 +1,139 @@ +<template> + <div style="width: 100%; height: 100%;"> + <a-card :bordered="false"> + <a-row type="flex" :gutter="16"> + <a-col :md="4"> + <a-tabs :activeKey="activeKey" @change="tabChange"> + <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> + <base-tree @getCurrSelected="changeSelectionNode"></base-tree> + </a-tab-pane> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> + </a-tab-pane> + </a-tabs> + </a-col> + <a-col :md="20"> + <overtime-management-list ref="OvertimeManagementList" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></overtime-management-list> + </a-col> + </a-row> + </a-card> + </div> + +</template> + +<script> + import { putAction, getAction } from '@/api/manage' + import { frozenBatch } from '@/api/api' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import JInput from '@/components/jeecg/JInput' + import BaseTree from '../common/BaseTree' + import OvertimeManagementList from './modules/OvertimeManagement/OvertimeManagementList' + import JSuperQuery from '@/components/jeecg/JSuperQuery' + import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' + import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' + export default { + name: 'OvertimeManagement', + components: { + JThirdAppButton, + JInput, + BaseTree, + JSuperQuery, + DepartTree, + OvertimeManagementList + }, + data() { + return { + activeKey: '1', + description: '璁惧淇℃伅', + selectEquementId: '', + selectEquement: {}, + selectPeople:{}, + slectTypeTree:"", + url: { + equipmentStatistics: '/mdc/equipment/equipmentStatistics' + }, + isDepartType:'', + } + }, + created() { + this.queryTreeData() + }, + methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, + tabChange(val) { + // console.log(val); + this.activeKey = val + this.slectTypeTree = val + }, + // changeSelection(val) { + // this.selectEquementId = val + // this.$refs.efficiencyList.pQuery(val) + // this.$refs.efficiencyList.searchQuery() + // }, + changeSelectionNode(val) { + this.selectEquement = val + this.slectTypeTree = "1" + }, + changeSelectionNodedd(val) { + this.selectPeople = val + this.slectTypeTree = "2" + } + } + + } +</script> +<style scoped> + @import '~@assets/less/common.less'; + + .equipMessage { + width: 100%; + height: 10%; + } + + .equipMessage table { + width: 60%; + height: 100%; + line-height: 50%; + } + + .equipMessage table td { + text-align: center; + } + + .equipMessage table td span { + display: inline-block; + width: 15px; + height: 15px; + } + + .equipMessage table td .equipShutdown { + background-color: #808080; + } + + .equipMessage table td .equipStandby { + background-color: #ffbf37; + } + + .equipMessage table td .equipRun { + background-color: #19FE01; + } + + .equipMessage table td .equipAlarm { + background-color: #FD0008; + } +</style> \ No newline at end of file diff --git a/src/views/mdc/base/ProductionManager.vue b/src/views/mdc/base/ProductionManager.vue index df6690b..c1ea8b7 100644 --- a/src/views/mdc/base/ProductionManager.vue +++ b/src/views/mdc/base/ProductionManager.vue @@ -293,7 +293,11 @@ batchDel: function () { console.log(this.checkedKeys) if (this.checkedKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); } else { var ids = '' for (var a = 0; a < this.checkedKeys.length; a++) { @@ -306,11 +310,19 @@ onOk: function () { deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadTree() that.onClearSelected() } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } @@ -328,7 +340,11 @@ that.departTree.push(temp) } } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } else { @@ -400,16 +416,28 @@ this.$refs.form.validate(valid => { if (valid) { if (!this.currSelected.id) { - this.$message.warning('璇风偣鍑婚�夋嫨瑕佷慨鏀硅溅闂�!') + // this.$message.warning('璇风偣鍑婚�夋嫨瑕佷慨鏀硅溅闂�!') + this.$notification.warning({ + message:'娑堟伅', + description:'璇风偣鍑婚�夋嫨瑕佷慨鏀硅溅闂�!' + }); return } httpAction(this.url.edit, this.currSelected, 'put').then((res) => { if (res.success) { - this.$message.success('淇濆瓨鎴愬姛!') + // this.$message.success('淇濆瓨鎴愬姛!') + this.$notification.warning({ + message:'娑堟伅', + description:"淇濆瓨鎴愬姛" + }); this.loadTree() } else { - this.$message.error(res.message) + // this.$message.error(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/RealTimeMonitoringEquipment.vue b/src/views/mdc/base/RealTimeMonitoringEquipment.vue index 63b148b..d1a865a 100644 --- a/src/views/mdc/base/RealTimeMonitoringEquipment.vue +++ b/src/views/mdc/base/RealTimeMonitoringEquipment.vue @@ -172,7 +172,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false diff --git a/src/views/mdc/base/Torqueconfiguration.vue b/src/views/mdc/base/Torqueconfiguration.vue index 6196264..2aa13cc 100644 --- a/src/views/mdc/base/Torqueconfiguration.vue +++ b/src/views/mdc/base/Torqueconfiguration.vue @@ -7,14 +7,12 @@ <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇">, - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> <a-col :md="20"> - <!--<EfficiencyList ref="EfficiencyList" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></EfficiencyList>--> <torqueconfiguration-list ref="TorqueconfigurationList" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></torqueconfiguration-list> </a-col> </a-row> @@ -33,6 +31,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' export default { name: 'Torqueconfiguration', components: { @@ -53,12 +52,29 @@ slectTypeTree:"", url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val); this.activeKey = val diff --git a/src/views/mdc/base/UnplannedDowntimemManager.vue b/src/views/mdc/base/UnplannedDowntimemManager.vue index cba9b67..bfe20a2 100644 --- a/src/views/mdc/base/UnplannedDowntimemManager.vue +++ b/src/views/mdc/base/UnplannedDowntimemManager.vue @@ -7,9 +7,8 @@ <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇">, - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> @@ -32,6 +31,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' export default { name: 'UnplannedDowntimemManager', components: { @@ -52,12 +52,29 @@ slectTypeTree:"", url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val); this.activeKey = val diff --git a/src/views/mdc/base/alarmAnalysis.vue b/src/views/mdc/base/alarmAnalysis.vue new file mode 100644 index 0000000..c25bc0c --- /dev/null +++ b/src/views/mdc/base/alarmAnalysis.vue @@ -0,0 +1,139 @@ +<template> + <div style="width: 100%; height: 100%;"> + <a-card :bordered="false"> + <a-row type="flex" :gutter="16"> + <a-col :md="4"> + <a-tabs :activeKey="activeKey" @change="tabChange"> + <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> + <base-tree @getCurrSelected="changeSelectionNode"></base-tree> + </a-tab-pane> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> + </a-tab-pane> + </a-tabs> + </a-col> + <a-col :md="20"> + <alarm-analysis-main ref="alarmAnalysisMain" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></alarm-analysis-main> + </a-col> + </a-row> + </a-card> + </div> + +</template> + +<script> + import { putAction, getAction } from '@/api/manage' + import { frozenBatch } from '@/api/api' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import JInput from '@/components/jeecg/JInput' + import BaseTree from '../common/BaseTree' + import alarmAnalysisMain from './modules/alarmAnalysis/alarmAnalysisMain' + import JSuperQuery from '@/components/jeecg/JSuperQuery' + import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' + import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' + export default { + name: 'alarmAnalysis', + components: { + JThirdAppButton, + JInput, + BaseTree, + JSuperQuery, + DepartTree, + alarmAnalysisMain + }, + data() { + return { + activeKey: '1', + description: '璁惧淇℃伅', + selectEquementId: '', + selectEquement: {}, + selectPeople:{}, + slectTypeTree:"", + url: { + equipmentStatistics: '/mdc/equipment/equipmentStatistics' + }, + isDepartType:'', + } + }, + created() { + this.queryTreeData() + }, + methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, + tabChange(val) { + // console.log(val); + this.activeKey = val + this.slectTypeTree = val + }, + // changeSelection(val) { + // this.selectEquementId = val + // this.$refs.efficiencyList.pQuery(val) + // this.$refs.efficiencyList.searchQuery() + // }, + changeSelectionNode(val) { + this.selectEquement = val + this.slectTypeTree = "1" + }, + changeSelectionNodedd(val) { + this.selectPeople = val + this.slectTypeTree = "2" + } + } + + } +</script> +<style scoped> + @import '~@assets/less/common.less'; + + .equipMessage { + width: 100%; + height: 10%; + } + + .equipMessage table { + width: 60%; + height: 100%; + line-height: 50%; + } + + .equipMessage table td { + text-align: center; + } + + .equipMessage table td span { + display: inline-block; + width: 15px; + height: 15px; + } + + .equipMessage table td .equipShutdown { + background-color: #808080; + } + + .equipMessage table td .equipStandby { + background-color: #ffbf37; + } + + .equipMessage table td .equipRun { + background-color: #19FE01; + } + + .equipMessage table td .equipAlarm { + background-color: #FD0008; + } +</style> \ No newline at end of file diff --git a/src/views/mdc/base/equipmentAvailCompare.vue b/src/views/mdc/base/equipmentAvailCompare.vue new file mode 100644 index 0000000..6d1e9c5 --- /dev/null +++ b/src/views/mdc/base/equipmentAvailCompare.vue @@ -0,0 +1,91 @@ +<template> + <a-card :bordered="false"> + <div style="width: 100%; height: 100%;overflow: hidden"> + <a-row type="flex" :gutter="16"> + <a-col :md="5"> + <a-tabs :activeKey="activeKey" @change="tabChange"> + <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> + <base-tree @getCurrSelected="changeSelectionNode"></base-tree> + </a-tab-pane> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇"> + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> + </a-tab-pane> + </a-tabs> + </a-col> + <a-col :md="24-5" :sm="24"> + <equipment-avail-compare-main ref="equipmentDayAvailMain" :nodeTree='selectEquement' :nodePeople='selectPeople' :Type="slectTypeTree"></equipment-avail-compare-main> + </a-col> + </a-row> + </div> + </a-card> +</template> + +<script> + import BaseTree from '../common/BaseTree' + import equipmentAvailCompareMain from './modules/equipmentAvailCompare/equipmentAvailCompareMain' + import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' + export default { + name: 'equipmentAvailCompare', + components:{ + BaseTree, + equipmentAvailCompareMain, + DepartTree + }, + data() { + return { + activeKey: '1', + description: '璁惧淇℃伅', + selectEquementId: '', + selectEquement: {}, + selectPeople:{}, + slectTypeTree: '', + url: { + equipmentStatistics: '/mdc/equipment/equipmentStatistics' + }, + isDepartType:'', + } + }, + created() { + this.queryTreeData() + }, + methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, + tabChange(val) { + // console.log(val) + this.activeKey = val + this.slectTypeTree = val + }, + /* changeSelection(val) { + this.selectEquementId = val + this.$refs.DeviceRepairList.pQuery(val) + },*/ + changeSelectionNode(val) { + this.selectEquement = val + this.slectTypeTree = '1' + }, + changeSelectionNodedd(val) { + this.selectPeople = val + this.slectTypeTree = '2' + } + } + } +</script> + +<style scoped> + +</style> \ No newline at end of file diff --git a/src/views/mdc/base/equipmentDayAvail.vue b/src/views/mdc/base/equipmentDayAvail.vue new file mode 100644 index 0000000..71e28f8 --- /dev/null +++ b/src/views/mdc/base/equipmentDayAvail.vue @@ -0,0 +1,91 @@ +<template> + <a-card :bordered="false"> + <div style="width: 100%; height: 100%;overflow: hidden"> + <a-row type="flex" :gutter="16"> + <a-col :md="5"> + <a-tabs :activeKey="activeKey" @change="tabChange"> + <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> + <base-tree @getCurrSelected="changeSelectionNode"></base-tree> + </a-tab-pane> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇"> + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> + </a-tab-pane> + </a-tabs> + </a-col> + <a-col :md="24-5" :sm="24"> + <equipment-day-avail-main ref="equipmentDayAvailMain" :nodeTree='selectEquement' :nodePeople='selectPeople' :Type="slectTypeTree"></equipment-day-avail-main> + </a-col> + </a-row> + </div> + </a-card> +</template> + +<script> + import BaseTree from '../common/BaseTree' + import equipmentDayAvailMain from './modules/equipmentDayAvail/equipmentDayAvailMain' + import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' + export default { + name: 'equipmentDayAvail', + components:{ + BaseTree, + equipmentDayAvailMain, + DepartTree + }, + data() { + return { + activeKey: '1', + description: '璁惧淇℃伅', + selectEquementId: '', + selectEquement: {}, + selectPeople:{}, + slectTypeTree: '', + url: { + equipmentStatistics: '/mdc/equipment/equipmentStatistics' + }, + isDepartType:'', + } + }, + created() { + this.queryTreeData() + }, + methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, + tabChange(val) { + // console.log(val) + this.activeKey = val + this.slectTypeTree = val + }, + /* changeSelection(val) { + this.selectEquementId = val + this.$refs.DeviceRepairList.pQuery(val) + },*/ + changeSelectionNode(val) { + this.selectEquement = val + this.slectTypeTree = '1' + }, + changeSelectionNodedd(val) { + this.selectPeople = val + this.slectTypeTree = '2' + } + } + } +</script> + +<style scoped> + +</style> \ No newline at end of file diff --git a/src/views/mdc/base/mdcPassRate.vue b/src/views/mdc/base/mdcPassRate.vue index 16380a1..8d7feb0 100644 --- a/src/views/mdc/base/mdcPassRate.vue +++ b/src/views/mdc/base/mdcPassRate.vue @@ -7,14 +7,13 @@ <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇">, - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> <a-col :md="20"> - <mdc-pass-rate-list ref="MdcStandardProcessDurationList" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></mdc-pass-rate-list> + <mdc-pass-rate-list ref="MdcStandardProcessDurationList" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></mdc-pass-rate-list> </a-col> </a-row> </a-card> @@ -32,6 +31,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' export default { name: 'mdcPassRate', components: { @@ -52,12 +52,29 @@ slectTypeTree:"", url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val); this.activeKey = val diff --git a/src/views/mdc/base/mdcProcessQuantity.vue b/src/views/mdc/base/mdcProcessQuantity.vue index 605b07c..3dfdb35 100644 --- a/src/views/mdc/base/mdcProcessQuantity.vue +++ b/src/views/mdc/base/mdcProcessQuantity.vue @@ -7,9 +7,8 @@ <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇">, - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> @@ -32,6 +31,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' export default { name: 'mdcProcessQuantity', components: { @@ -52,12 +52,30 @@ slectTypeTree:"", url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val); this.activeKey = val diff --git a/src/views/mdc/base/mdcStandardProcessDuration.vue b/src/views/mdc/base/mdcStandardProcessDuration.vue index a7f2a69..7dc4fc9 100644 --- a/src/views/mdc/base/mdcStandardProcessDuration.vue +++ b/src/views/mdc/base/mdcStandardProcessDuration.vue @@ -7,9 +7,8 @@ <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> <base-tree @getCurrSelected="changeSelectionNode"></base-tree> </a-tab-pane> - <a-tab-pane key="2" tab="閮ㄩ棬灞傜骇">, - <depart-tree @getCurrSelectedDD="changeSelectionNodedd" - ></depart-tree> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> </a-tab-pane> </a-tabs> </a-col> @@ -32,6 +31,7 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' export default { name: 'mdcStandardProcessDuration', components: { @@ -52,12 +52,29 @@ slectTypeTree:"", url: { equipmentStatistics: '/mdc/equipment/equipmentStatistics' - } + }, + isDepartType:'', } }, created() { + this.queryTreeData() }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, tabChange(val) { // console.log(val); this.activeKey = val diff --git a/src/views/mdc/base/modules/DepartList/DepartAuthModal.vue b/src/views/mdc/base/modules/DepartList/DepartAuthModal.vue index 92aedf0..d629a37 100644 --- a/src/views/mdc/base/modules/DepartList/DepartAuthModal.vue +++ b/src/views/mdc/base/modules/DepartList/DepartAuthModal.vue @@ -136,11 +136,19 @@ that.loading = true; saveDepartPermission(params).then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loading = false; that.loadData(); }else { - that.$message.error(res.message); + // that.$message.error(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loading = false; } }) diff --git a/src/views/mdc/base/modules/DepartList/DepartDataruleModal.vue b/src/views/mdc/base/modules/DepartList/DepartDataruleModal.vue index 77298ac..b43f9d0 100644 --- a/src/views/mdc/base/modules/DepartList/DepartDataruleModal.vue +++ b/src/views/mdc/base/modules/DepartList/DepartDataruleModal.vue @@ -81,9 +81,17 @@ } postAction(this.url.datarule,params).then(res=>{ if(res.success){ - this.$message.success(res.message) + // this.$message.success(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); }else{ - this.$message.error(res.message) + // this.$message.error(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, diff --git a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartList.vue b/src/views/mdc/base/modules/DepartList/DepartListContent/DepartList.vue index d37ed2c..b41aca0 100644 --- a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartList.vue +++ b/src/views/mdc/base/modules/DepartList/DepartListContent/DepartList.vue @@ -334,7 +334,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -346,7 +350,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -363,12 +371,20 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); that.$emit('delectTree','') } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; @@ -387,12 +403,20 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(1) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); that.$emit('delectTree','') } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -406,12 +430,20 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(1) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData2(); // that.onClearSelected(); // that.$emit('delectTree','') } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -478,7 +510,6 @@ this.selectedRowKeys = [] }, handleEdit: function (record) { - console.log(record) if (record.id) { this.$refs.modalForm.title = '缂栬緫' this.$refs.modalForm.disableSubmit = false diff --git a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartListSeachList.vue b/src/views/mdc/base/modules/DepartList/DepartListContent/DepartListSeachList.vue index 78ca51f..78adfee 100644 --- a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartListSeachList.vue +++ b/src/views/mdc/base/modules/DepartList/DepartListContent/DepartListSeachList.vue @@ -216,7 +216,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false diff --git a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartModel.vue b/src/views/mdc/base/modules/DepartList/DepartListContent/DepartModel.vue index 51415b8..e6a8da8 100644 --- a/src/views/mdc/base/modules/DepartList/DepartListContent/DepartModel.vue +++ b/src/views/mdc/base/modules/DepartList/DepartListContent/DepartModel.vue @@ -155,11 +155,20 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/DepartList/DepartListContent/TierModel.vue b/src/views/mdc/base/modules/DepartList/DepartListContent/TierModel.vue index 898a87b..13d01c0 100644 --- a/src/views/mdc/base/modules/DepartList/DepartListContent/TierModel.vue +++ b/src/views/mdc/base/modules/DepartList/DepartListContent/TierModel.vue @@ -159,11 +159,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("鎴愬姛") + // that.$message.success("鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/DepartList/DepartListTree/DepartTree.vue b/src/views/mdc/base/modules/DepartList/DepartListTree/DepartTree.vue index 2941cbd..99dfe82 100644 --- a/src/views/mdc/base/modules/DepartList/DepartListTree/DepartTree.vue +++ b/src/views/mdc/base/modules/DepartList/DepartListTree/DepartTree.vue @@ -146,7 +146,11 @@ this.treeDataSource = res.result this.generateList(res.result) } else { - this.$message.warn(res.message) + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() =>{ this.loading = false @@ -247,12 +251,20 @@ }, batchDel: function(entity) { if (!this.url.deleteBatch) { - this.$message.error('璇疯缃畊rl.deleteBatch灞炴��!') + // this.$message.error('璇疯缃畊rl.deleteBatch灞炴��!') + this.$notification.warning({ + message:'娑堟伅', + description:"璇疯缃畊rl.deletBatch灞炴�э紒" + }); return } let ids = entity.id if (!ids) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return } else { var that = this @@ -263,10 +275,18 @@ that.loading = true deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.queryTreeData(); } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false diff --git a/src/views/mdc/base/modules/DepartList/DepartListTree/modules/DepartTree/TierModel.vue b/src/views/mdc/base/modules/DepartList/DepartListTree/modules/DepartTree/TierModel.vue index 20cceff..acbee7b 100644 --- a/src/views/mdc/base/modules/DepartList/DepartListTree/modules/DepartTree/TierModel.vue +++ b/src/views/mdc/base/modules/DepartList/DepartListTree/modules/DepartTree/TierModel.vue @@ -158,11 +158,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("缂栬緫鎴愬姛") + // that.$message.success("缂栬緫鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"缂栬緫鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue b/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue index 729b0e6..3f6b53b 100644 --- a/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue +++ b/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue @@ -190,7 +190,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false diff --git a/src/views/mdc/base/modules/EquipmentList/UserModal.vue b/src/views/mdc/base/modules/EquipmentList/UserModal.vue index e078ac0..8b6dc30 100644 --- a/src/views/mdc/base/modules/EquipmentList/UserModal.vue +++ b/src/views/mdc/base/modules/EquipmentList/UserModal.vue @@ -39,8 +39,18 @@ <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item label="閮ㄩ棬鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled"> + <a-form-model-item v-if="isDepartType == 0" label="閮ㄩ棬鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" 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" :readOnly="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷" + :triggerChange="true" + v-model="model.equipmentType"> + <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> + {{item.equipmentTypeName}} + </a-select-option> + </a-select> </a-form-model-item> </a-col> <a-col :span="12"> @@ -51,11 +61,16 @@ <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production> </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"> + <a-form-model-item v-if="isDepartType == -1" label="绯荤粺鐗堟湰鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input :disabled="disableSubmit" :readOnly="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-select :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷" :triggerChange="true" v-model="model.equipmentType"> @@ -113,7 +128,7 @@ </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label="绯荤粺鐗堟湰鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item v-if="isDepartType == 0" label="绯荤粺鐗堟湰鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ョ郴缁熺増鏈彿" v-model="model.systemVersion"/> </a-form-model-item> @@ -157,6 +172,7 @@ import DeviceListModel from './DeviceListModal' import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart' import AFormModelItem from 'ant-design-vue/es/form-model/FormItem' + import {mapActions} from 'vuex' export default { name: "UserModal", components: { @@ -240,13 +256,15 @@ rolesOptions:[], nextDepartOptions:[], nextProductionOptions:[], - selectList:[] + selectList:[], + isDepartType:'' } }, created () { const token = Vue.ls.get(ACCESS_TOKEN); this.headers = {"X-Access-Token":token} this.queryGroup() + this.queryTreeData() // this.initRoleList() // this.initTenantList() }, @@ -256,6 +274,21 @@ } }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, queryGroup() { getAction(this.url.queryEquipmentType).then(res => { if (res.success) { @@ -264,7 +297,11 @@ // return { label: item.id, value: item.equipmentTypeName + '' } // }) } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -274,10 +311,10 @@ console.log(val) if(val.equipmentid ){ this.model.equipmentId = val.equipmentid - this.model.equipmentName = val.equipmentname, - this.model.equipmentModel = val.equipmentmodel, - this.model.equipmentIp = val.equipmentip, - this.model.dataPort = val.dataport, + this.model.equipmentName = val.equipmentname + this.model.equipmentModel = val.equipmentmodel + this.model.equipmentIp = val.equipmentip + this.model.dataPort = val.dataport this.model.driveType = val.drivetype this.model.controlSystem = val.controlsystem this.model.saveTableName = val.savetablename @@ -453,10 +490,18 @@ } obj.then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok'); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false; diff --git a/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeForm.vue b/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeForm.vue index 37224d7..a51bb0c 100644 --- a/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeForm.vue +++ b/src/views/mdc/base/modules/EquipmentTypeList/MdcEquipmentTypeForm.vue @@ -101,16 +101,24 @@ } httpAction(httpurl,this.model,method).then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok'); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false; }) } - + }) }, } diff --git a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementForm.vue b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementForm.vue index 4973bac..37fe555 100644 --- a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementForm.vue +++ b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementForm.vue @@ -107,10 +107,18 @@ } httpAction(httpurl,this.model,method).then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok'); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false; diff --git a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue index 00efb4a..0be2eb3 100644 --- a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue +++ b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue @@ -25,9 +25,9 @@ <a-col :md="2" :sm="2" :xs="2"> <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> </a-col> - <!--<a-col :lg="2" :md="3" :sm="3" :xs="3">--> - <!--<a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>--> - <!--</a-col>--> + <a-col :lg="2" :md="3" :sm="3" :xs="3"> + <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button> + </a-col> </a-row> </a-form> </div> @@ -35,10 +35,12 @@ <div class="table-operator" style="display: inline;"> <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>--> + <a-button type="primary" icon="download" @click="importTemplate('鍋囨湡绠$悊妯℃澘')">瀵煎叆妯℃澘</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> + <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="batchDel"> @@ -301,7 +303,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -346,7 +352,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -384,7 +394,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -426,7 +440,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -460,7 +478,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -482,10 +504,18 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(1) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.searchQuery(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); }, @@ -495,7 +525,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -512,11 +546,19 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; @@ -524,6 +566,15 @@ } }); } + }, + importTemplate(fileName){ + var a = document.createElement("a"); + a.href = "/static/鍋囨湡绠$悊.xls"; + a.download = "鍋囨湡绠$悊.xls"; + a.style.display = "none"; + document.body.appendChild(a); + a.click(); + a.remove(); }, handleAdd() { this.$refs.modalForm.add(this.node) @@ -555,7 +606,11 @@ _this.equipment = res.result _this.searchQuery() } else { - _this.$message.warning('璇烽厤缃澶囷紒') + // _this.$message.warning('璇烽厤缃澶囷紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); } } }) diff --git a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue index bfb3282..17ef5f5 100644 --- a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue +++ b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue @@ -29,7 +29,7 @@ <a-row :gutter="24"> <a-col :span="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea v-decorator="['notes', validatorRules.notes]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" v-decorator="['notes', validatorRules.notes]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-col> </a-row> @@ -247,11 +247,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalEdit.vue b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalEdit.vue index 721902f..9283a4c 100644 --- a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalEdit.vue +++ b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalEdit.vue @@ -36,7 +36,7 @@ </a-row> <a-row :gutter="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea :disabled="disableSubmit" v-decorator="['notes', validatorRules.notes]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" :disabled="disableSubmit" v-decorator="['notes', validatorRules.notes]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-row> </a-form> @@ -255,11 +255,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("淇敼鎴愬姛") + // that.$message.success("淇敼鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"淇敼鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalList.vue b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalList.vue index 270c9d8..86d898c 100644 --- a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalList.vue +++ b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalList.vue @@ -1,13 +1,14 @@ + <template> - <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" + <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="6" :sm="6"> - <a-form-item label="閮ㄩ棬" > + <a-col :md="6" :sm="6" v-if="isDepartType == 0"> + <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0"> <!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />--> <a-tree-select v-model="value" @@ -17,16 +18,16 @@ placeholder="璇烽�夋嫨閮ㄩ棬" tree-default-expand-all > - <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> - <!--Child Node1 {{ value }}--> - <!--</span>--> + <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> + <!--Child Node1 {{ value }}--> + <!--</span>--> </a-tree-select> </a-form-item> </a-col> <a-col :md="6" :sm="6"> <a-form-item label="杞﹂棿" > - <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>--> + <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>--> <a-tree-select v-model="valueProduct" style="width: 100%" @@ -63,7 +64,7 @@ </div> <!-- table鍖哄煙-begin --> <div> - <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns" + <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> @@ -75,6 +76,7 @@ </template> <script> + import {mapActions} from 'vuex' import { ajaxGetSelectItems } from '@/api/api' @@ -95,7 +97,7 @@ import moment from 'moment' export default { - name: 'DeviceRepairListModel', + name: 'DeviceCalendarListModel', mixins: [JeecgListMixin], components: { JDictSelectTag, @@ -112,17 +114,30 @@ }, data() { return { - treeData:[], - readOnly:true, + isDepartType:'', + /*readOnly:true,*/ title:'', visible: false, - disableMixinCreated: true, - queryParam: {}, - columns: [{ - title: '璁惧缂栫爜', - align: 'center', - dataIndex: 'equipmentId', - }, + SelectedList:[], + treeData:[], + /*disableMixinCreated: true, + queryParam: {},*/ + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + },{ + + title: '璁惧缂栫爜', + align: 'center', + dataIndex: 'equipmentId', + }, { title: '璁惧鍚嶇О', align: 'center', @@ -131,13 +146,13 @@ { title: '椹卞姩绫诲瀷', align: 'center', - dataIndex: 'driveType', + dataIndex: 'driveType' }, { title: '鏁版帶绯荤粺', align: 'center', - dataIndex: 'controlSystem', - } + dataIndex: 'controlSystem' + }, ], sectionPData: [], sectionData: [], @@ -151,7 +166,7 @@ } }, created() { - + this.queryTreeData() }, watch: { value(value) { @@ -162,18 +177,21 @@ this.queryParam.productionId = value } }, - methods: { - openPage() { - this.visible = true - this.onClearSelected() - this.dataSource = []; - this.queryParam = { - status: this.status - }; - this.loadData(); - this.initOptions(); - this.initGroupOptions() + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) }, onSelectChange(selectedRowKeys, selectionRows) { // this.SelectedList.push(selectedRowKeys); @@ -181,6 +199,29 @@ this.selectionRows = selectionRows // this.SelectedList =[...this.SelectedList,...selectionRows]; // console.log(this.SelectedList); + }, + handleTableChange(pagination, filters, sorter) { + // this.onClearSelected() + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + this.loadData(); + }, + openPage() { + this.visible = true + this.onClearSelected() + this.dataSource = []; + this.queryParam = { + status: this.status + }; + + this.loadData(); + this.initOptions(); + this.initGroupOptions() }, loadData(arg) { if(!this.url.list){ @@ -211,7 +252,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -220,6 +265,7 @@ modalFormOk(val) { // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 this.loadData(); + this.selectedRowKeys = [val.id]; }, searchQuery() { @@ -241,6 +287,8 @@ this.close() }, handleOk() { + // this.selectionRows = this.SelectedList; + // console.log(this.selectionRows); this.$emit('sendSelectionRows', this.selectionRows) this.close() }, @@ -249,7 +297,11 @@ if (res.success) { this.treeData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -260,7 +312,11 @@ if (res.success) { this.sectionData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/modules/HourReports/ReportList.vue b/src/views/mdc/base/modules/HourReports/ReportList.vue index 3b075bb..3ca86b0 100644 --- a/src/views/mdc/base/modules/HourReports/ReportList.vue +++ b/src/views/mdc/base/modules/HourReports/ReportList.vue @@ -247,7 +247,11 @@ efficiencyOptionsOnChange(checkedList) { let index = checkedList.indexOf('gzl') if (index < 0) { - this.$message.warn('涓嶈兘鍙栨秷鏌ヨ鏁呴殰鐜�') + // this.$message.warn('涓嶈兘鍙栨秷鏌ヨ鏁呴殰鐜�') + this.$notification.warning({ + message:'娑堟伅', + description:"涓嶈兘鍙栨秷鏌ヨ鏁呴殰鐜�" + }); return false } this.checkedList = checkedList diff --git a/src/views/mdc/base/modules/MdcplancloseList/MdcplancloseForm.vue b/src/views/mdc/base/modules/MdcplancloseList/MdcplancloseForm.vue index 13395b2..2d78b50 100644 --- a/src/views/mdc/base/modules/MdcplancloseList/MdcplancloseForm.vue +++ b/src/views/mdc/base/modules/MdcplancloseList/MdcplancloseForm.vue @@ -28,7 +28,7 @@ </a-col> <a-col :span="24"> <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> - <a-textarea v-model="model.remark" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" v-model="model.remark" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-model-item> </a-col> </a-row> @@ -111,10 +111,18 @@ } httpAction(httpurl,this.model,method).then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok'); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false; diff --git a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue new file mode 100644 index 0000000..cc28f45 --- /dev/null +++ b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue @@ -0,0 +1,724 @@ +<template> + <a-card :bordered="false" class="device_list"> + <!-- 鏌ヨ鍖哄煙 --> + <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="7" :sm="7"> + <a-form-item label="鏃堕棿"> + <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD HH:mm:ss" showTime/> + </a-form-item> + </a-col> + <a-col :md="4" :sm="4"> + <a-form-item label="璁惧缂栧彿"> + <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" v-model="queryParams.equipmentId"></a-input> + </a-form-item> + </a-col> + <!--<a-col :md="4" :sm="4" :xs="4">--> + <!--<a-form-item label="璁惧鍚嶇О">--> + <!--<a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParams.equipmentName"></a-input>--> + <!--</a-form-item>--> + <!--</a-col>--> + <a-col :md="2" :sm="3" :xs="3"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </a-col> + <a-col :md="2" :sm="2" :xs="2"> + <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> + </a-col> + <!--<a-col :lg="2" :md="3" :sm="3" :xs="3">--> + <!--<a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>--> + <!--</a-col>--> + </a-row> + </a-form> + </div> + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator" style="display: inline;"> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板 + </a-button> + <!--<a-button type="primary" icon="download" @click="importTemplate('鍔犵彮绠$悊妯℃澘')">瀵煎叆妯℃澘</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>--> + <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> + </a-menu> + <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 + <a-icon type="down"/> + </a-button> + </a-dropdown> + </div> + + <!-- table鍖哄煙-begin --> + <div id="DeviceList"> + <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns" + :scroll="{x:1000}" :dataSource="dataSource" :pagination="ipagination" :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + @change="handleTableChange"> + <span slot="action" slot-scope="text, record"> + <a @click="handleEdit(record)">缂栬緫</a> + <a-divider type="vertical" /> + <a @click="handleDelete(record.id)">鍒犻櫎</a> + </span> + <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず--> + <span slot="num" slot-scope="text" style="font-weight: bold"> + <j-ellipsis :value="text" :length="8"/> + </span> + <span slot="name" slot-scope="text" style="font-weight: bold"> + <j-ellipsis :value="text" :length="8"/> + </span> + <span slot="model" slot-scope="text" style="font-weight: bold"> + <j-ellipsis :value="text" :length="8"/> + </span> + </a-table> + </div> + <!-- table鍖哄煙-end --> + <!--<device-repair-model></device-repair-model>--> + <torqueconfiguration-modal ref="modalForm" @ok="modalFormOk"></torqueconfiguration-modal> + <torqueconfiguration-modaledit ref="modalFormedit" @ok="modalFormOk">></torqueconfiguration-modaledit> + <!--<device-repair-model-add ref="modalFormadd" @ok="modalFormOk"></device-repair-model-add>--> + <!--<device-repair-model-edit ref="modalFormedit" @ok="modalFormOk"></device-repair-model-edit>--> + <!--<repair-model ref="repairModelFrom" @ok="modalFormOk"></repair-model>--> + + </a-card> +</template> + +<script> + import moment from 'moment' + import $ from 'jquery' + import JDictSelectTag from '@/components/dict/JDictSelectTag' + import JDate from '../../../../../components/jeecg/JDate' + import { + requestPut, + deleteAction, + getAction, + downFile, + getFileAccessHttpUrl + } from '@/api/manage' + import TorqueconfigurationModal from './OvertimeManagementModal' + import TorqueconfigurationModaledit from './OvertimeManagementModalEdit' + // import DeviceRepairModelAdd from './DeviceRepairModelAdd' + // import DeviceRepairModelEdit from './DeviceRepairModelEdit' + import '@/components/table2excel/table2excel' + 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 { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + export default { + name: 'OvertimeManagementList', + mixins: [JeecgListMixin], + components: { + Tooltip, + TorqueconfigurationModal, + TorqueconfigurationModaledit, + // DeviceRepairModelAdd, + // DeviceRepairModelEdit, + JDictSelectTag, + JInput, + JDate, + JEllipsis + }, + props: { nodeTree: '', Type:'',nodePeople: '' }, + data() { + return { + typeTree:"", + typeParent:1, + typeEquipment:1, + dates: [], + xianshi:"", + readOnly:true, + queryParam: {}, + queryParams:{}, + queryParamEquip:{}, + queryParamPeople:{}, + dataStartsoucre:[], + columns: [ + { + title: '璁惧缂栧彿', + align: 'center', + dataIndex: 'equipmentId' + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName', + // defaultSortOrder:'descend', + // sorter: (a, b) => {return a.equipmentName>b.equipmentName?1:-1} + }, + { + title: '鏃ユ湡', + align: 'center', + dataIndex: 'effectiveDate', + // scopedSlots:{customRender:'startTime'}, + // customRender:(text,row,index) => { + // return moment(text).format("YYYY-MM-DD HH:mm:ss") + // } + }, + { + title: '鐝寮�濮嬫椂闂�', + align: 'center', + dataIndex: 'startDate' + }, + { + title: '鐝缁撴潫鏃堕棿', + align: 'center', + dataIndex: 'endDate' + }, + { + title: '鍔犵彮寮�濮嬫椂闂�', + align: 'center', + dataIndex: 'startTime' + }, + { + title: '鍔犵彮缁撴潫鏃堕棿', + align: 'center', + dataIndex: 'endTime' + }, + { + title: '澶囨敞', + align: 'center', + dataIndex: 'remark' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + scopedSlots: {customRender: 'action'}, + align: "center", + width: 150 + } + ], + url: { + list: '/mdc/mdcEquipmentOvertime/list', + delete: '/mdc/mdcEquipmentOvertime/delete', + deleteBatch: '/mdc/mdcEquipmentOvertime/deleteBatch', + getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid', + exportXlsUrl: "/mdc/mdcEquipmentOvertime/exportXls", + importExcelUrl: "/mdc/mdcEquipmentOvertime/importExcel", + } + } + }, + watch:{ + Type(valmath){ + this.dataList = []; + this.queryParams.typeTree = valmath + // console.log(this.queryParams.typeTree) + }, + nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + if (JSON.stringify(val) != '{}') { + if (val.equipmentId) { + this.queryParamEquip.parentId = "" + this.queryParams.equipmentId = val.equipmentId + this.queryParamEquip.equipmentId = val.equipmentId + } else { + this.queryParamEquip.parentId = val.key + this.queryParams.equipmentId = '' + } + this.searchQuery() + } + }, + nodePeople(val){ + if (JSON.stringify(val) != '{}') { + if (val.equipmentId) { + this.queryParamEquip.parentId = "" + this.queryParams.equipmentId = val.equipmentId + this.queryParamEquip.equipmentId = val.equipmentId + } else { + this.queryParamPeople.parentId = val.key + this.queryParams.equipmentId = '' + } + this.searchQuery() + } + } + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + importTemplate(fileName){ + var a = document.createElement("a"); + a.href = "/static/鍔犵彮绠$悊.xls"; + a.download = "鍔犵彮绠$悊.xls"; + a.style.display = "none"; + document.body.appendChild(a); + a.click(); + a.remove(); + }, + dateParamChange(v1, v2) { + // console.log(v1,v2) + this.queryParam.startTime = v2[0] + this.queryParam.endTime = v2[1] + // console.log(v2[0],v2[1]) + }, + onChange(value, dateString) { + // console.log('Selected Time: ', value); + // console.log('Formatted Selected Time: ', dateString); + }, + onOk(value) { + console.log('onOk: ', value); + }, + 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 + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + var params = this.getQueryParams();//鏌ヨ鏉′欢 + if(!params){ + return false; + } + 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; + // this.initDeviceType(this.dataSource) + //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + // this.dataSource = res.result.records||res.result; + if(res.result.total) + { + this.ipagination.total = res.result.total; + }else{ + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + }else{ + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + this.loading = false + }) + }, + handleEdit: function (record) { + this.$refs.modalFormedit.edit(record); + this.$refs.modalFormedit.title = "缂栬緫"; + this.$refs.modalFormedit.disableSubmit = false; + }, + handleTableChange(pagination, filters, sorter) { + this.dataSource = [] + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + // console.log(pagination) + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + //鑾峰彇鏌ヨ鏉′欢 + let sqp = {} + if(this.superQueryParams){ + sqp['superQueryParams']=encodeURI(this.superQueryParams) + sqp['superQueryMatchType'] = this.superQueryMatchType + } + var param = Object.assign(sqp, this.queryParams, this.isorter ,this.filters); + param.pageNo = this.ipagination.current; + param.pageSize = this.ipagination.pageSize; + param.field = this.getQueryField(); + param.parentId = this.queryParams.parentId; + param.equipmentId = this.queryParams.equipmentId; + param.startTime = this.queryParam.startTime; + param.endTime = this.queryParam.endTime; + getAction(this.url.list,param).then((res) => { + if(res.success){ + this.dataSource = res.result.records||res.result; + if(res.result.total) + { + this.ipagination.total = res.result.total; + }else{ + this.ipagination.total = 0; + } + }else{ + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + this.loading = false + }) + }, + searchQueryEdit(){ + if(this.queryParams.typeTree == "1"){ + this.queryParams.parentId = this.queryParamEquip.parentId + }else{ + this.queryParams.parentId = this.queryParamPeople.parentId + this.queryParams.equipmentIds = "" + } + this.dataSource = []; + //鑾峰彇鏌ヨ鏉′欢 + let sqp = {} + if(this.superQueryParams){ + sqp['superQueryParams']=encodeURI(this.superQueryParams) + sqp['superQueryMatchType'] = this.superQueryMatchType + } + var param = Object.assign(sqp, this.queryParams, this.isorter ,this.filters); + param.pageNo = this.ipagination.current; + param.pageSize = this.ipagination.pageSize; + param.field = this.getQueryField(); + param.parentId = this.queryParams.parentId; + param.equipmentId = this.queryParams.equipmentId; + param.startTime = this.queryParam.startTime; + param.endTime = this.queryParam.endTime; + getAction(this.url.list,param).then((res) => { + if(res.success){ + this.dataSource = res.result.records||res.result; + if(res.result.total) + { + this.ipagination.total = res.result.total; + }else{ + this.ipagination.total = 0; + } + }else{ + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description: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 sqp = {} + if(this.superQueryParams){ + sqp['superQueryParams']=encodeURI(this.superQueryParams) + sqp['superQueryMatchType'] = this.superQueryMatchType + } + var param = Object.assign(sqp, this.queryParams, this.isorter ,this.filters); + param.pageNo = 1; + param.pageSize = this.ipagination.pageSize; + param.field = this.getQueryField(); + param.parentId = this.queryParams.parentId; + param.equipmentId = this.queryParams.equipmentId; + param.startTime = this.queryParam.startTime; + param.endTime = this.queryParam.endTime; + // console.log(param); + getAction(this.url.list,param).then((res) => { + if(res.success){ + this.dataSource = res.result.records||res.result; + if(res.result.total) + { + this.ipagination.total = res.result.total; + }else{ + this.ipagination.total = 0; + } + }else{ + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + + } + }).finally(() => { + this.loading = false + }) + }, + handleExportXls(fileName){ + if(!fileName || typeof fileName != "string"){ + fileName = "瀵煎嚭鏂囦欢" + } + let param = this.getQueryParams(); + if(this.selectedRowKeys && this.selectedRowKeys.length>0){ + param['selections'] = this.selectedRowKeys.join(",") + } + param.pageSize = this.ipagination.pageSize; + param.field = this.getQueryField(); + param.parentId = this.queryParams.parentId; + param.equipmentId = this.queryParams.equipmentId; + param.startTime = this.queryParam.startTime; + param.endTime = this.queryParam.endTime; + console.log("瀵煎嚭鍙傛暟",param) + downFile(this.url.exportXlsUrl,param).then((data)=>{ + if (!data) { + this.$message.warning("鏂囦欢涓嬭浇澶辫触") + return + } + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls') + }else{ + let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'})) + let link = document.createElement('a') + link.style.display = 'none' + link.href = url + link.setAttribute('download', fileName+'.xls') + document.body.appendChild(link) + link.click() + document.body.removeChild(link); //涓嬭浇瀹屾垚绉婚櫎鍏冪礌 + window.URL.revokeObjectURL(url); //閲婃斁鎺塨lob瀵硅薄 + } + }) + }, + 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) { + this.dataSource = res.result.records||res.result; + // this.initDeviceType(this.dataSource) + //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + // this.dataSource = res.result.records||res.result; + if(res.result.total) + { + this.ipagination.total = res.result.total; + }else{ + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + }else{ + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + this.loading = false + }) + }, + modalFormOk(val) { + // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 + this.searchQueryEdit(); + // this.$emit('openBasetree','') + this.selectedRowKeys = [] + }, + handleDelete: function (id) { + if(!this.url.delete){ + this.$message.error("璇疯缃畊rl.delete灞炴��!") + return + } + var that = this; + deleteAction(that.url.delete, {id: id}).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + that.reCalculatePage(1) + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); + that.searchQuery(); + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }); + }, + batchDel: function () { + if(!this.url.deleteBatch){ + this.$message.error("璇疯缃畊rl.deleteBatch灞炴��!") + return + } + if (this.selectedRowKeys.length <= 0) { + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); + return; + } 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; + deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + that.reCalculatePage(that.selectedRowKeys.length) + // that.$message.success(res.message); + 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; + }); + } + }); + } + }, + handleAdd() { + this.$refs.modalForm.add(this.node) + this.$refs.modalForm.title = '鏂板' + this.$refs.modalForm.disableSubmit = false + }, + handleAddXIU() { + this.$refs.modalFormadd.add() + this.$refs.modalFormadd.title = '鏂板' + this.$refs.modalFormadd.disableSubmit = false + }, + pQuery(parentId) { + this.queryParam.parentId = parentId[0] + if(this.selectedRowKeys.length >= 1) { + this.selectedRowKeys.length = 0 + } + this.loadData() + }, + onSelectChange(selectedRowKeys) { + this.selectedRowKeys = selectedRowKeys + }, + initEquipment(id) { + let _this = this + getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => { + if (res.success) { + if (res.result) { + _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName) + _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId) + _this.equipment = res.result + _this.searchQuery() + } else { + // _this.$message.warning('璇烽厤缃澶囷紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); + } + } + }) + }, + exportExcel() { + $("#DeviceList").table2excel({ + exclude: ".noExl", + name: "Excel Document Name", + filename: "鎵煩閰嶇疆", + exclude_img: true, + fileext: ".xls", + exclude_links: true, + exclude_inputs: true + }); + }, + }, + created() { + this.queryParam.typeTree = "1" + } + } +</script> + +<style lang="less" scoped> + @import '~@assets/less/common.less'; + + @media screen and (min-width: 1920px){ + .device_list{ + height: 811px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1680px) and (max-width: 1920px){ + .device_list{ + height: 811px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1400px) and (max-width: 1680px){ + .device_list{ + height: 663px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1280px) and (max-width: 1400px){ + .device_list{ + height: 564px!important; + overflow: scroll; + } + } + @media screen and (max-width: 1280px){ + .device_list{ + height: 564px!important; + overflow: scroll; + } + } +</style> diff --git a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue new file mode 100644 index 0000000..6d49fa1 --- /dev/null +++ b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue @@ -0,0 +1,352 @@ +<template> + <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" + :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> + <a-spin :spinning="confirmLoading"> + <a-form :form="form"> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-item label="鐝閫夋嫨" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-input-search :readOnly="true" v-decorator="['calendarId', validatorRules.calendarId]" + @search="deviceSearch" enter-button/> + </a-form-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-item label="鍔犵彮寮�濮嬫椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-time-picker :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear + v-decorator="['startTime',validatorRules.startTime]"/> + </a-form-item> + </a-col> + <a-col :span="12"> + <a-form-item label="鍔犵彮缁撴潫鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-time-picker :disabled="disableSubmit" :readOnly="disableSubmit" + v-decorator="['endTime',validatorRules.endTime]"/> + </a-form-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-textarea :maxLength="20" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + </a-form-item> + </a-col> + </a-row> + </a-form> + </a-spin> + <torqueconfiguration-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></torqueconfiguration-modal-list> + + </a-modal> +</template> + +<script> + import moment from 'moment' + import pick from 'lodash.pick' + import TorqueconfigurationModalList from './OvertimeManagementModalList' + // import JDate from './JDate' + import { + getAction, + postAction, + requestPut + } from '@/api/manage' + import { + duplicateCheck + } from '@/api/api' + + export default { + name: 'TorqueconfigurationModal', + components: {TorqueconfigurationModalList}, + props: {}, + data() { + return { + mesag:21, + readOnly:true, + title: '', + visible: false, + show: false, + model: {}, + checked: false, + startData:"", + endData:"", + labelCol: { + xs: { + span: 24 + }, + sm: { + span: 6 + } + }, + wrapperCol: { + xs: { + span: 24 + }, + sm: { + span: 18 + } + }, + labelColLong: { + xs: { + span: 24 + }, + sm: { + span: 3 + } + }, + wrapperColLong: { + xs: { + span: 24 + }, + sm: { + span: 21 + } + }, + confirmLoading: false, + form: this.$form.createForm(this), + validatorRules: { + equipmentIds:{ + rules:[ + { + required:true, + message: "璇烽�夋嫨璁惧" + }, + ], + }, + }, + + url: { + add: '/mdc/mdcEquipmentOvertime/add', + edit: '/mdc/mdcEquipmentOvertime/edit' + }, + + disableSubmit: true, + partCategoryCascade: [], + cascadeDefaultValue: [] + } + }, + created() { + }, + + methods: { + // disabledDate(current){ + // //Can not slect days before today and today + // // return current && current < moment().endOf("day"); + // return current < moment().subtract(+1, 'day')//浠婂ぉ涔嬪墠鐨勫勾鏈堟棩涓嶅彲閫夛紝涓嶅寘鎷粖澶� + // }, + moment, + // onChange(dates) { + // // console.log(111) + // // console.log(dates,dateStrings) + // // console.log('From: ', dates[0], ', to: ', dates[1]); + // // console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]); + // // this.startTime = dateStrings[0]; + // // this.endData = dateStrings[1]; + // // console.log(this.startData,this.endData); + // }, + onChangeEnd(dates, dateStrings){ + this.endTime = dateStrings[0]; + }, + getDeviceRows(val) { + var calendarId; + for(var i = 0;i<val.length;i++){ + if (i == 0) { + calendarId = val[i].id; + } else { + calendarId = calendarId + "," + val[i].id; + } + } + // console.log("========",equipmentIds); + this.form.setFieldsValue({ + calendarId: calendarId, + }) + // this.form.setFieldsValue({ + // equipmentId: val.equipmentId, + // equipmentName: val.equipmentName, + // equipmentModel: val.equipmentModel, + // equipmentIp: val.equipmentIp, + // dataPort: val.dataPort, + // driveType: val.driveType + // }) + }, + deviceSearch() { + this.$refs.deviceRepairListModel.openPage() + this.$refs.deviceRepairListModel.title = '閫夋嫨璁惧' + this.$refs.deviceRepairListModel.disableSubmit = false + }, + //绾ц仈妗唎nChange浜嬩欢 + // onChange(value) { + // + // }, + getParentIdsById(id) { + let that = this + getAction(this.url.getParentIdsById, { + id: id + }).then((res) => { + if (res.success) { + that.form.setFieldsValue({ + partCategoryId: res.result + }) + } + }) + }, + add(node) { + let _this = this + this.visible = true + this.form.resetFields() + this.model = {} + this.$nextTick(() => { + // _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title }) + // _this.model.parentId = node.key + }) + }, + edit(record) { + this.form.resetFields() + this.model = Object.assign({}, record) + this.visible = true + this.$nextTick(() => { + this.form.setFieldsValue(pick(this.model, 'equipmentIds', 'equipmentName', 'mdcRepairType', 'startTime', 'endTime', + )) + }) + }, + close() { + this.$emit('close') + this.visible = false + this.show = false + }, + fun(obj) { + if(obj){ + if (obj = obj.split("T")) { + var tim = obj[1]; + if(tim = tim.split(".")){ + var tim0 = tim[0]; + } + var dd = tim0 + return dd; + } + } + + }, + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.form.validateFields((err, values) => { + if (!err) { + that.confirmLoading = true + let formData = Object.assign(this.model, values) + let start = moment(formData.startTime).format('HH:mm:ss'); + let end = moment(formData.endTime).format('HH:mm:ss'); + let startOne = start.replace(/:/g,''); + let endOne = end.replace(/:/g,''); + // var data = new Date(); + // let stertDate = moment(data).format("HH:mm:ss"); + // let dataStart = stertDate.replace(/:/g,''); + // if(startOne < dataStart){ + // that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�") + // that.confirmLoading = false + // }else{ + if(startOne>=endOne){ + that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + // console.log(this.model) + // this.endTime = '' + that.confirmLoading = false + }else{ + let obj + + if (!this.model.id) { + formData.startTime = this.fun(JSON.stringify(formData.startTime)); + formData.endTime = this.fun(JSON.stringify(formData.endTime)) + obj = postAction(this.url.add, formData) + } else { + obj = requestPut(this.url.edit, formData, { + id: this.model.id + }) + } + obj.then((res) => { + if (res.success) { + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); + // that.$message.success(res.message) + that.$emit('ok', res.result) + } else { + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + that.confirmLoading = false + that.close() + }) + } + } + + // } + }) + }, + handleCancel() { + this.close() + }, + // loadCascade() { + // getAction(this.url.loadCascadeData).then((res) => { + // if (res.success) { + // this.partCategoryCascade = res.result + // } + // }) + // }, + onCascadeChange(value, selectedOptions) { + this.cascadeDefaultValue = [...value] + }, + filter(inputValue, path) { + return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1) + }, + //楠岃瘉 缂栫爜 + validateNum(rule, value, callback) { + var params = { + tableName: 'lxmes_base_part', + fieldName: 'num', + fieldVal: value, + dataId: this.model.id, + //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true + delFlag: 'true' + } + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback('瀛樿揣缂栫爜宸插瓨鍦�!') + } + }) + }, + checkboxChange(e) { + this.checked = e.target.checked + } + } + } +</script> + +<style scoped lang="less"> + .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; + } + /deep/ .ant-input-number{ + width: 100%!important; + } +</style> diff --git a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModalEdit.vue b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModalEdit.vue new file mode 100644 index 0000000..30d3d4b --- /dev/null +++ b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModalEdit.vue @@ -0,0 +1,419 @@ +<template> + <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" + :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> + <a-spin :spinning="confirmLoading"> + <a-form :form="form"> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="璇疯緭鍏ヨ澶囩紪鍙�" + v-decorator="['equipmentId',validatorRules.equipmentId]"/> + </a-form-item> + + </a-col> + <a-col :span="12"> + <a-form-item label="鍔犵彮寮�濮嬫椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-time-picker :disabled="disableSubmit" :readOnly="disableSubmit" @change="changeStartTime" + v-decorator="['startTime',validatorRules.startTime]"/> + </a-form-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="璇疯緭鍏ヨ澶囧悕绉�" + v-decorator="['equipmentName',validatorRules.equipmentName]"/> + </a-form-item> + </a-col> + + <a-col :span="12"> + <a-form-item label="鍔犵彮缁撴潫鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-time-picker :disabled="disableSubmit" :readOnly="disableSubmit" @change="changeEndTime" + v-decorator="['endTime',validatorRules.endTime]"/> + </a-form-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-textarea :maxLength="20" :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + </a-form-item> + </a-row> + </a-form> + </a-spin> + <!--<device-repair-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-repair-list-model>--> + <!--<device-repair-edit-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-repair-edit-list-model>--> + </a-modal> +</template> + +<script> + import moment from 'moment' + import pick from 'lodash.pick' + // import DeviceRepairListModel from './DeviceRepairListModel' + // import DeviceRepairEditListModel from './DeviceRepairEditListModel' + // import JDate from './JDate' + import { + getAction, + postAction, + requestPut + } from '@/api/manage' + import { + duplicateCheck + } from '@/api/api' + + export default { + name: 'TorqueconfigurationModalEdit', + // components: {DeviceRepairListModel,JDate,DeviceRepairEditListModel}, + props: {}, + data() { + return { + readOnly:true, + title: '', + visible: false, + show: false, + model: {}, + checked: false, + startData:"", + endData:"", + labelCol: { + xs: { + span: 24 + }, + sm: { + span: 6 + } + }, + wrapperCol: { + xs: { + span: 24 + }, + sm: { + span: 18 + } + }, + labelColLong: { + xs: { + span: 24 + }, + sm: { + span: 3 + } + }, + wrapperColLong: { + xs: { + span: 24 + }, + sm: { + span: 21 + } + }, + confirmLoading: false, + form: this.$form.createForm(this), + validatorRules: { + equipmentId:{ + rules:[ + { + required:true, + message: "" + }, + ], + }, + equipmentName:{ + rules:[ + { + required:true, + message: "" + }, + ], + }, + // mdcRepairType:{ + // rules:[ + // { + // required:true, + // message: "" + // }, + // ], + // initialValue: '浼戠彮' + // } + }, + + url: { + add: '/mdc/mdcEquipmentOvertime/add', + edit: '/mdc/mdcEquipmentOvertime/edit' + }, + + disableSubmit: true, + partCategoryCascade: [], + cascadeDefaultValue: [], + editStart:'', + endTimeSHI:'', + startTimeSHI:'', + startEdit:'', + endEdit:'' + } + }, + created() { + }, + + methods: { + changeStartTime(data,dataStrings){ + console.log(data); + console.log(dataStrings) + this.startTimeSHI = dataStrings + }, + changeEndTime(data,dataStrings){ + console.log(data); + console.log(dataStrings) + this.endTimeSHI = dataStrings + }, + + disabledDate(current){ + //Can not slect days before today and today + // return current && current < moment().endOf("day"); + return current < moment().subtract(+1, 'day')//浠婂ぉ涔嬪墠鐨勫勾鏈堟棩涓嶅彲閫夛紝涓嶅寘鎷粖澶� + }, + moment, + // onChange(dates) { + // console.log(111) + // console.log(dates,dateStrings) + // // console.log('From: ', dates[0], ', to: ', dates[1]); + // // console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]); + // // this.startTime = dateStrings[0]; + // // this.endData = dateStrings[1]; + // // console.log(this.startData,this.endData); + // }, + onChangeEnd(dates, dateStrings){ + this.endTime = dateStrings[0]; + }, + getDeviceRows(val) { + this.form.setFieldsValue({ + equipmentId: val.equipmentId, + equipmentName: val.equipmentName, + // // equipmentModel: val.equipmentModel, + // // equipmentIp: val.equipmentIp, + // // dataPort: val.dataPort, + // // driveType: val.driveType + }) + // var equipmentIds; + // for(var i = 0;i<val.length;i++){ + // if (i == 0) { + // equipmentIds = val[i].equipmentId; + // } else { + // equipmentIds = equipmentIds + "," + val[i].equipmentId; + // } + // } + // console.log("========",equipmentIds); + // this.form.setFieldsValue({ + // equipmentId: equipmentIds, + // }) + }, + deviceSearch() { + this.$refs.deviceRepairListModel.openPage() + this.$refs.deviceRepairListModel.title = '閫夋嫨璁惧' + this.$refs.deviceRepairListModel.disableSubmit = false + }, + //绾ц仈妗唎nChange浜嬩欢 + // onChange(value) { + // + // }, + getParentIdsById(id) { + let that = this + getAction(this.url.getParentIdsById, { + id: id + }).then((res) => { + if (res.success) { + that.form.setFieldsValue({ + partCategoryId: res.result + }) + } + }) + }, + add(node) { + let _this = this + this.visible = true + this.form.resetFields() + this.model = {} + this.$nextTick(() => { + // _this.form.setFieldsValue({ 'tierType': node.entity.tierType + 1, 'parentName': node.title }) + // _this.model.parentId = node.key + }) + }, + edit(record) { + console.log(record) + // record.endTime = moment(record.endTime).format("HH:mm:ss") + this.startEdit = record.startTime; + this.endEdit = record.endTime + this.form.resetFields() + this.model = Object.assign({}, record) + + // this.editStart = (this.model.startTime).replace(/:/g,''); + this.visible = true + this.$nextTick(() => { + this.form.setFieldsValue(pick(this.model,'equipmentId', 'equipmentName','startTime', 'endTime','remark' + )) + this.form.setFieldsValue({ + startTime: moment(this.model.startTime, 'HH:mm:ss'), + endTime: moment(this.model.endTime, 'HH:mm:ss') + }) + // console.log(this.model) + }) + }, + close() { + this.$emit('close') + this.visible = false + this.show = false + }, + fun(obj) { + if(obj){ + if (obj = obj.split("T")) { + var tim = obj[1]; + if(tim = tim.split(".")){ + var tim0 = tim[0]; + } + var dd = tim0 + return dd; + } + } + + }, + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.form.validateFields((err, values) => { + if (!err) { + that.confirmLoading = true + let formData = Object.assign(this.model, values) + if(this.startTimeSHI != ''){ + formData.startTime = this.startTimeSHI + }else{ + formData.startTime = this.startEdit + } + if(this.endTimeSHI != ''){ + formData.endTime = this.endTimeSHI + }else{ + formData.endTime = this.endEdit + } + + + console.log(formData) + // let start = moment(formData.startTime).format('HH:mm:ss'); + // let end = moment(formData.endTime).format('HH:mm:ss'); + let startOne = formData.startTime.replace(/:/g,''); + let endOne = formData.endTime.replace(/:/g,''); + // var data = new Date(); + // let stertDate = moment(data).format("HH:mm:ss"); + // let dataStart = stertDate.replace(/:/g,''); + // if(startOne < dataStart){ + // that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�") + // that.confirmLoading = false + // }else{ + if(startOne>=endOne){ + that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + // console.log(this.model) + // this.endTime = '' + that.confirmLoading = false + } + else{ + let obj + + if (!this.model.id) { + formData.startTime = this.fun(JSON.stringify(formData.startTime)); + formData.endTime = this.fun(JSON.stringify(formData.endTime)) + obj = postAction(this.url.add, formData) + } else { + console.log(1111) + // formData.startTime = this.fun(JSON.stringify(formData.startTime)); + // formData.endTime = this.fun(JSON.stringify(formData.endTime)) + obj = requestPut(this.url.edit, formData, { + id: this.model.id + }) + } + obj.then((res) => { + if (res.success) { + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"淇敼鎴愬姛" + }); + // that.$message.success(res.message) + that.$emit('ok', res.result) + } else { + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + that.confirmLoading = false + that.close() + }) + } + // } + + } + }) + }, + handleCancel() { + this.close() + }, + // loadCascade() { + // getAction(this.url.loadCascadeData).then((res) => { + // if (res.success) { + // this.partCategoryCascade = res.result + // } + // }) + // }, + onCascadeChange(value, selectedOptions) { + this.cascadeDefaultValue = [...value] + }, + filter(inputValue, path) { + return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1) + }, + //楠岃瘉 缂栫爜 + validateNum(rule, value, callback) { + var params = { + tableName: 'lxmes_base_part', + fieldName: 'num', + fieldVal: value, + dataId: this.model.id, + //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true + delFlag: 'true' + } + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback('瀛樿揣缂栫爜宸插瓨鍦�!') + } + }) + }, + checkboxChange(e) { + this.checked = e.target.checked + } + } + } +</script> + +<style scoped lang="less"> + .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; + } + /deep/ .ant-input-number{ + width: 100%!important; + } +</style> diff --git a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModalList.vue b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModalList.vue new file mode 100644 index 0000000..8339426 --- /dev/null +++ b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModalList.vue @@ -0,0 +1,464 @@ + +<template> + <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :md="8" :sm="8"> + <a-form-item label="鏃堕棿"> + <a-range-picker @change="dateParamChange" format="YYYYMMDD" v-model="dates"/> + </a-form-item> + </a-col> + <a-col :md="6" :sm="6"> + <a-form-item label="璁惧缂栫爜"> + <a-input placeholder="璇疯緭鍏ヨ澶囩紪鐮佹绱�" v-model="queryParam.equipmentId"></a-input> + </a-form-item> + </a-col> + + <a-col :md="6" :sm="6"> + <a-form-item label="璁惧鍚嶇О"> + <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentName"></a-input> + </a-form-item> + </a-col> + </a-row> + </a-form> + </div> + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <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> + <!-- table鍖哄煙-begin --> + <div> + <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns" + :dataSource="dataSource" :pagination="ipagination" :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + @change="handleTableChange"> + <span slot="isDaySpan" slot-scope="text, record"> + <span v-if="text == 'true'">鏄�</span> + <span v-if="text == 'false'">鍚�</span> + </span> + + </a-table> + </div> + <!-- table鍖哄煙-end --> + </a-card> + </a-modal> +</template> + +<script> + import {mapActions} from 'vuex' + import { filterObj } from '@/utils/util'; + import { + ajaxGetSelectItems + } from '@/api/api' + import JDictSelectTag from '@/components/dict/JDictSelectTag' + import { + deleteAction, + requestPut, + getAction, + postAction + } 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' + + export default { + name: 'DeviceCalendarListModel', + // mixins: [JeecgListMixin], + components: { + JDictSelectTag, + JEllipsis, + JInput, + Tooltip, + JDate + }, + props: { + status: { + type: Number, + default: 1 + } + }, + data() { + return{ + /* 鏌ヨ鏉′欢-璇蜂笉瑕佸湪queryParam涓0鏄庨潪瀛楃涓插�肩殑灞炴�� */ + queryParam: {}, + /* 鏁版嵁婧� */ + dataSource:[], + /* 鍒嗛〉鍙傛暟 */ + ipagination:{ + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + /* 鎺掑簭鍙傛暟 */ + isorter:{ + column: 'createTime', + order: 'desc', + }, + /* 绛涢�夊弬鏁� */ + filters: {}, + /* table鍔犺浇鐘舵�� */ + loading:false, + /* table閫変腑keys*/ + selectedRowKeys: [], + /* table閫変腑records*/ + selectionRows: [], + /* 鏌ヨ鎶樺彔 */ + toggleSearchStatus:false, + /* 楂樼骇鏌ヨ鏉′欢鐢熸晥鐘舵�� */ + superQueryFlag:false, + /* 楂樼骇鏌ヨ鏉′欢 */ + superQueryParams: '', + dates:[], + isDepartType:'', + /*readOnly:true,*/ + title:'', + visible: false, + SelectedList:[], + treeData:[], + /*disableMixinCreated: true, + queryParam: {},*/ + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, { + title: '鏃ユ湡', + align: 'center', + dataIndex: 'effectiveDate', + }, + { + title: '璁惧缂栧彿', + align: 'center', + dataIndex: 'equipmentId' + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName', + }, + { + title: '鐝埗', + align: 'center', + dataIndex: 'shiftName' + }, + { + title: '鐝', + align: 'center', + dataIndex: 'shiftSubName' + }, + { + title: '寮�濮嬫椂闂�', + align: 'center', + dataIndex: 'startDate' + }, + { + title: '缁撴潫鏃堕棿', + align: 'center', + dataIndex: 'endDate' + }, + { + title: '鏄惁璺ㄥぉ', + align: 'center', + dataIndex: 'isDaySpan', + scopedSlots: { customRender: 'isDaySpan' } + }, + { + title: '寮�濮嬩紤鎭椂闂�', + align: 'center', + dataIndex: 'sleepStartDate' + }, + { + title: '缁撴潫浼戞伅鏃堕棿', + align: 'center', + dataIndex: 'sleepEndDate' + } + ], + sectionPData: [], + sectionData: [], + url: { + list: '/mdc/mdcDeviceCalendar/list', + loadOptions: '/sys/sysDepart/loadDepartTreeOptions', + loadProductionOptions:'/mdc/mdcProduction/loadProductionTreeOptions' + }, + value:undefined, + valueProduct:undefined + } + }, + created(){ + // this.dates = [moment().subtract('days', 0), moment().subtract('days', 0)] + // this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') + // this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') + // this.queryTreeData() + this.loadData() + }, + watch: { + value(value) { + // console.log(value); + this.queryParam.departId = value + }, + valueProduct(value){ + this.queryParam.productionId = value + } + }, + methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, + getQueryParams() { + //鑾峰彇鏌ヨ鏉′欢 + let sqp = {} + if(this.superQueryParams){ + sqp['superQueryParams']=encodeURI(this.superQueryParams) + sqp['superQueryMatchType'] = this.superQueryMatchType + } + var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); + 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); + }, + getQueryField() { + //TODO 瀛楁鏉冮檺鎺у埗 + var str = "id,"; + this.columns.forEach(function (value) { + str += "," + value.dataIndex; + }); + return str; + }, + loadData(arg) { + this.dataSource = []; + 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; + } + params.startTime = this.queryParam.startTime; + params.endTime = this.queryParam.endTime; + params.orderByName = "ascend"; + 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; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + }else{ + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + dateParamChange(v1, v2) { + this.queryParam.startTime = v2[0] + this.queryParam.endTime = v2[1] + }, + onSelectChange(selectedRowKeys, selectionRows) { + // this.SelectedList.push(selectedRowKeys); + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows + // this.SelectedList =[...this.SelectedList,...selectionRows]; + // console.log(this.SelectedList); + }, + handleTableChange(pagination, filters, sorter) { + // this.onClearSelected() + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + this.loadData(); + }, + onClearSelected() { + this.selectedRowKeys = []; + this.selectionRows = []; + }, + openPage() { + this.visible = true + this.onClearSelected() + this.dataSource = []; + // this.queryParam = { + // status: this.status + // }; + + this.loadData(); + this.initOptions(); + this.initGroupOptions() + }, + 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; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + }else{ + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + this.loading = false + }) + }, + modalFormOk(val) { + // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 + this.loadData(); + + this.selectedRowKeys = [val.id]; + }, + searchQuery() { + this.loadData(); + this.onClearSelected() + }, + searchReset() { + // this.queryParam = { + // status: 1 + // }; + this.dates = [] + this.queryParam = {} + this.loadData(); + this.onClearSelected() + }, + close() { + this.$emit('close') + this.visible = false + }, + handleCancel() { + this.close() + }, + handleOk() { + // this.selectionRows = this.SelectedList; + // console.log(this.selectionRows); + this.$emit('sendSelectionRows', this.selectionRows) + this.close() + }, + initOptions() { + getAction(this.url.loadOptions).then(res => { + if (res.success) { + this.treeData = res.result + } else { + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }) + }, + + + initGroupOptions() { + getAction(this.url.loadProductionOptions).then(res => { + if (res.success) { + this.sectionData = res.result + } else { + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }) + } + }, + } +</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/ProductionManager/ProductionEquipment.vue b/src/views/mdc/base/modules/ProductionManager/ProductionEquipment.vue index a719848..420ad8d 100644 --- a/src/views/mdc/base/modules/ProductionManager/ProductionEquipment.vue +++ b/src/views/mdc/base/modules/ProductionManager/ProductionEquipment.vue @@ -124,7 +124,11 @@ handleSubmit() { let that = this; if(!that.departId){ - this.$message.warning('璇风偣鍑婚�夋嫨涓�涓儴闂�!') + // this.$message.warning('璇风偣鍑婚�夋嫨涓�涓儴闂�!') + this.$notification.warning({ + message:'娑堟伅', + description:"璇风偣鍑婚�夋嫨涓�涓儴闂�" + }); } let checkedKeys = [...that.checkedKeys, ...that.halfCheckedKeys] const permissionIds = checkedKeys.join(",") @@ -136,11 +140,19 @@ that.loading = true; saveDepartPermission(params).then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loading = false; that.loadData(); }else { - that.$message.error(res.message); + // that.$message.error(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loading = false; } }) diff --git a/src/views/mdc/base/modules/ProductionManager/ProductionModal.vue b/src/views/mdc/base/modules/ProductionManager/ProductionModal.vue index bcf3c17..27dcb45 100644 --- a/src/views/mdc/base/modules/ProductionManager/ProductionModal.vue +++ b/src/views/mdc/base/modules/ProductionManager/ProductionModal.vue @@ -136,11 +136,19 @@ that.confirmLoading = true; httpAction(this.url.add,this.model,"post").then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadTreeData(); that.$emit('ok'); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false; diff --git a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue index d5c8ead..bdfde0f 100644 --- a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue +++ b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue @@ -41,7 +41,7 @@ <div class="PowerOnRate_text" style="width: 8%"> <table width="85px;" align="center"> <tr> - <td align="right"><div style="width: 15px;height: 15px;background-color: #4169E1;position: static;"/></td> + <td align="right"><div style="width: 15px;height: 15px;background-color: #6496e9;position: static;"/></td> <td align="left">寮�鏈�</td> </tr> <tr> @@ -49,7 +49,7 @@ <td align="left">鍏虫満</td> </tr> <tr> - <td align="right"><div style="width: 15px;height: 15px;background-color: #00ee00"/></td> + <td align="right"><div style="width: 15px;height: 15px;background-color: #4ecee1"/></td> <td align="left">杩愯</td> </tr> <tr> @@ -63,19 +63,19 @@ <!--鍒╃敤鐜囧拰寮�鍔ㄧ巼--> <div class="UtilizationStartup"> <div class="Utilization Line-box"> - <!--<div class="title">--> + <div class="title"> <!--<div class="circle"></div>--> - <!--<div class="text">寮�鏈虹巼</div>--> - <!--</div>--> + <!--<div class="text"></div>--> + </div> <div class="Utilization-box box-bottom"> <div class="Utilization-right" ref="UtilizationLine" id="UtilizationLine"></div> </div> </div> <div class="Startup Line-box"> - <!--<div class="title">--> + <div class="title"> <!--<div class="circle"></div>--> - <!--<div class="text">寮�鍔ㄧ巼</div>--> - <!--</div>--> + <!--<div class="text"></div>--> + </div> <div class="Startup-box box-bottom"> <div class="Startup-right" ref="StartupLine" id="StartupLine"></div> </div> @@ -127,15 +127,10 @@ } }, created(){ - - let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD'); - - this.queryParams.collectTime = collectTime; - this.queryParams.dateTime = this.queryParams.collectTime.format('YYYYMMDD') - this.initEquipmentNode('-1') + this.initEquipmentNode() this.queryStatistical(); // this.getTime(37800); }, @@ -169,13 +164,13 @@ top: 60, containLabel: true }, - toolbox: { - show : true, - padding: 15, - feature : { - saveAsImage : {show: true,title:'淇濆瓨鍥剧墖',name :'璁惧鏁堢巼缁熻鎶ヨ〃'} - } - }, + // toolbox: { + // show : true, + // padding: 15, + // feature : { + // saveAsImage : {show: true,title:'淇濆瓨鍥剧墖',name :'璁惧鏁堢巼缁熻鎶ヨ〃'} + // } + // }, xAxis :{ type : 'category', data:['寮�鏈烘椂闀�','鍏虫満鏃堕暱','杩愯鏃堕暱','寰呮満鏃堕暱'], @@ -266,6 +261,7 @@ name:'鏌辩姸鍥�', type: 'bar', data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong], + // data:[22,3,4,5], barWidth: 25, label:{ show:true, @@ -280,9 +276,10 @@ color: function(params) { let colorList = [ ["#6496e9","#6bded3"], - ["#ffbb65","#fdc68b"], + ["#849db8","#b4b8cc"], ["#4fe1c5","#4ecee1"], - ["#9978fa","#88a1fa"], + // ["#9978fa","#88a1fa"], + ["#ffbb65","#fdc68b"], ]; // return colorList[params.dataIndex]; let colorItem = colorList[params.dataIndex]; @@ -304,18 +301,23 @@ //寮�鏈烘椂闂碶鍏虫満鏃堕棿 let UtilizationLine = this.$echarts.init(document.getElementById('UtilizationLine'), 'macarons'); let statChartPieOption1 = { - title: { - x: 'left', - subtext: '寮�鏈烘晥鐜�' - }, + // title: { + // x: 'left', + // subtext: '寮�鏈烘晥鐜�', + // textStyle: { + // color: '#268e80', + // fontSize: 20, + // + // }, + // }, tooltip: { trigger: 'item', formatter: "{a} <br/>{b} : {c} ({d}%)" }, legend: { orient: 'vertical', - x: 'left', - y: 'bottom', + x: '85%', + y: '50%', data: ['寮�鏈烘椂闂�', '鍏虫満鏃堕棿'] }, calculable: true, @@ -327,7 +329,7 @@ itemStyle: { normal: { color: function (params) { - let colorList = ['#4169E1', '#A8A8A8']; + let colorList = [ '#6496e9','#849db8']; return colorList[params.dataIndex] }, label: { @@ -346,18 +348,18 @@ //杩愯鏃堕棿\寰呮満鏃堕棿 let StartupLine = this.$echarts.init(document.getElementById('StartupLine'), 'macarons'); let statChartPieOption2 = { - title: { - x: 'left', - subtext: '杩愯鏁堢巼' - }, + // title: { + // x: 'left', + // subtext: '杩愯鏁堢巼' + // }, tooltip: { trigger: 'item', formatter: "{a} <br/>{b} : {c} ({d}%)" }, legend: { orient: 'vertical', - x: 'left', - y: 'bottom', + x: '85%', + y: '50%', data: ['杩愯鏃堕棿', '寰呮満鏃堕棿'] }, calculable: true, @@ -369,7 +371,7 @@ itemStyle: { normal: { color: function (params) { - var colorList = ['#00ee00', '#FCCE10']; + var colorList = ['#4ecee1', '#FCCE10']; return colorList[params.dataIndex] }, label: { @@ -387,7 +389,7 @@ }, queryStatistical(){ getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ - if(res.success){ + if(res.success) { // console.log(res); this.StatCharOpeningRate = res.result.openRate; //鍒╃敤鐜� @@ -402,6 +404,8 @@ this.closedLong = this.getTime(res.result.closeLong); this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong); this.draw(); + }else{ + this.draw() } }) }, @@ -411,14 +415,22 @@ this.queryParams.collectTime = val.format('YYYY-MM-DD'); }, - initEquipmentNode(id) { + initEquipmentNode() { let _this = this getAction(this.url.getBaseTree).then((res) => { if (res.success) { + if(res.result[0]){ + _this.$set(this.queryParam, 'tierName', res.result[0].title) + _this.$set(this.queryParams, 'parentId', res.result[0].key) + _this.queryStatistical() } // console.log(res.result[0].entity.tierName) - _this.$set(this.queryParam, 'tierName', res.result[0].title) + _this.queryStatistical() } else { - this.$message.warn(res.message) + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -455,11 +467,11 @@ this.$set(this.queryParam, 'tierName', val.title) this.$set(this.queryParam, 'equipmentId', val.equipmentId) this.queryParams.parentId = '' - this.queryParams.equipmentIds = val.equipmentId + this.queryParams.equipmentId = val.equipmentId this.searchQuery() }else{ this.queryParams.parentId = val.key - this.queryParams.equipmentIds = '' + this.queryParams.equipmentId = '' this.$set(this.queryParam, 'tierName', val.title) this.searchQuery() } diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue index 4444581..eec09ae 100644 --- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue +++ b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue @@ -230,26 +230,25 @@ containLabel: true }, legend:{ - //璁剧疆榛樿涓嶆樉绀� - selected:{ - "鏇茬嚎":false, - }, + // selected:{ + // "鏇茬嚎":false, + // }, top:'0', right:'10', //璁剧疆鍗曢�夊閫夋ā寮� - selectedMode:'single', + // selectedMode:'single', icon:"pin", data:[ - { - name:'鏇茬嚎', - textStyle:{ - padding:4, - color:'#e957ff', - // borderWidth:1, - fontSize:16, - // borderColor:'#50E6D7' - } - }, + // { + // name:'鏇茬嚎', + // textStyle:{ + // padding:4, + // color:'#e957ff', + // // borderWidth:1, + // fontSize:16, + // // borderColor:'#50E6D7' + // } + // }, { name:'鏌辩姸鍥�', textStyle:{ @@ -306,52 +305,53 @@ } }, series:[ - { - name:'鏇茬嚎', - type: 'line', - smooth:true, - symbol: 'circle', - symbolSize: 8, - label:{ - show:true, - position:"top", - textStyle:{ - color:'#000', - }, - formatter:"鏃堕暱锛歿c}H" - }, - itemStyle: { - color: "rgb(87, 120, 225)", - borderColor: "#fff", - borderWidth: 2, - shadowColor: 'rgba(0, 0, 0, .3)', - }, - lineStyle: { - normal: { - color:"rgb(87, 120, 225)", - shadowColor: 'rgba(87, 120, 225, .4)', - shadowBlur: 8, - shadowOffsetY: 10, - shadowOffsetX: 0, - }, - }, - areaStyle: { - normal: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ - offset: 0, - color: 'rgba(87, 120, 225, .6)' - }, { - offset: 1, - color: 'rgba(87, 120, 225, .3)' - }]), - } - }, - data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong], - }, + // { + // name:'鏇茬嚎', + // type: 'line', + // smooth:true, + // symbol: 'circle', + // symbolSize: 8, + // label:{ + // show:true, + // position:"top", + // textStyle:{ + // color:'#000', + // }, + // formatter:"鏃堕暱锛歿c}H" + // }, + // itemStyle: { + // color: "rgb(87, 120, 225)", + // borderColor: "#fff", + // borderWidth: 2, + // shadowColor: 'rgba(0, 0, 0, .3)', + // }, + // lineStyle: { + // normal: { + // color:"rgb(87, 120, 225)", + // shadowColor: 'rgba(87, 120, 225, .4)', + // shadowBlur: 8, + // shadowOffsetY: 10, + // shadowOffsetX: 0, + // }, + // }, + // areaStyle: { + // normal: { + // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + // offset: 0, + // color: 'rgba(87, 120, 225, .6)' + // }, { + // offset: 1, + // color: 'rgba(87, 120, 225, .3)' + // }]), + // } + // }, + // data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong], + // }, { name:'鏌辩姸鍥�', type: 'bar', data: [this.openingLong, this.closedLong, this.processLong,this.waitingLong], + // data:[22,3,5,6], barWidth: 25, label:{ show:true, @@ -366,9 +366,10 @@ color: function(params) { let colorList = [ ["#6496e9","#6bded3"], - ["#ffbb65","#fdc68b"], + ["#849db8","#b4b8cc"], ["#4fe1c5","#4ecee1"], - ["#9978fa","#88a1fa"], + // ["#9978fa","#88a1fa"], + ["#ffbb65","#fdc68b"], ]; // return colorList[params.dataIndex]; let colorItem = colorList[params.dataIndex]; @@ -447,13 +448,22 @@ { type: 'bar', data: [this.openingLong,this.totalLong], + // data:[22,22], barWidth: 25, + label:{ + show:true, + position:"top", + textStyle:{ + color:'#000', + }, + formatter:"鏃堕暱锛歿c}H" + }, itemStyle: { normal: { color: function(params) { let colorList = [ ["#6496e9","#6bded3"], - ["#ffbb65","#fdc68b"], + ["#9978fa","#88a1fa"], ]; // return colorList[params.dataIndex]; let colorItem = colorList[params.dataIndex]; @@ -531,13 +541,22 @@ series: [{ type: 'bar', data: [this.processLong,this.openingLong], + // data:[22,22], barWidth: 25, + label:{ + show:true, + position:"top", + textStyle:{ + color:'#000', + }, + formatter:"鏃堕暱锛歿c}H" + }, itemStyle: { normal: { color: function(params) { let colorList = [ ["#4fe1c5","#4ecee1"], - ["#9978fa","#88a1fa"], + ["#6496e9","#6bded3"], ]; // return colorList[params.dataIndex]; let colorItem = colorList[params.dataIndex]; @@ -564,13 +583,16 @@ this.StatCharOpeningRate = res.result.openRate; this.StatCharUsedRate = res.result.utilizationRate; this.UtilizationHeight = res.result.openRate; - this.StatCharUsedopeningRate = res.result.StartupHeight; - this.StartupHeight = res.result.StartupHeight; + this.StatCharUsedopeningRate = res.result.usedOpenRate; + this.StartupHeight = res.result.usedOpenRate; this.openingLong = this.getTime(res.result.openLong) this.waitingLong = this.getTime(res.result.waitLong); this.processLong = this.getTime(res.result.processLong); this.closedLong = this.getTime(res.result.closeLong); this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong); + this.draw(); + } + else{ this.draw(); } }) @@ -585,10 +607,17 @@ let _this = this getAction(this.url.getBaseTree).then((res) => { if (res.success) { + if(res.result[0]){ + _this.$set(this.queryParam, 'tierName', res.result[0].title) + } // console.log(res.result[0].entity.tierName) - _this.$set(this.queryParam, 'tierName', res.result[0].title) + } else { - this.$message.warn(res.message) + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -625,11 +654,11 @@ this.$set(this.queryParam, 'tierName', val.title) this.$set(this.queryParam, 'equipmentId', val.equipmentId) this.queryParams.parentId = '' - this.queryParams.equipmentIds = val.equipmentId + this.queryParams.equipmentId = val.equipmentId this.searchQuery() }else{ this.queryParams.parentId = val.key - this.queryParams.equipmentIds = '' + this.queryParams.equipmentId = '' this.$set(this.queryParam, 'tierName', val.title) this.searchQuery() } diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue index d86c1d4..09a6ffe 100644 --- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue +++ b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue @@ -306,7 +306,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -351,7 +355,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -389,7 +397,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -431,7 +443,12 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } }).finally(() => { this.loading = false @@ -500,7 +517,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -522,10 +543,18 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(1) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.searchQuery(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); }, @@ -535,7 +564,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -552,11 +585,19 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; @@ -595,7 +636,11 @@ _this.equipment = res.result _this.searchQuery() } else { - _this.$message.warning('璇烽厤缃澶囷紒') + // _this.$message.warning('璇烽厤缃澶囷紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); } } }) diff --git "a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.Style\043Drawer.vue" "b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.Style\043Drawer.vue" deleted file mode 100644 index 2f53353..0000000 --- "a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.Style\043Drawer.vue" +++ /dev/null @@ -1,84 +0,0 @@ -<template> - <a-drawer - :title="title" - :width="width" - placement="right" - :closable="false" - @close="close" - destroyOnClose - :visible="visible"> - <torqueconfiguration-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></torqueconfiguration-form> - <div class="drawer-footer"> - <a-button @click="handleCancel" style="margin-bottom: 0;">鍏抽棴</a-button> - <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">鎻愪氦</a-button> - </div> - </a-drawer> -</template> - -<script> - - import TorqueconfigurationForm from './TorqueconfigurationForm' - - export default { - name: 'TorqueconfigurationModal', - components: { - TorqueconfigurationForm - }, - data () { - return { - title:"鎿嶄綔", - width:800, - visible: false, - disableSubmit: false - } - }, - methods: { - add () { - this.visible=true - this.$nextTick(()=>{ - this.$refs.realForm.add(); - }) - }, - edit (record) { - this.visible=true - this.$nextTick(()=>{ - this.$refs.realForm.edit(record); - }); - }, - close () { - this.$emit('close'); - this.visible = false; - }, - submitCallback(){ - this.$emit('ok'); - this.visible = false; - }, - handleOk () { - this.$refs.realForm.submitForm(); - }, - handleCancel () { - this.close() - } - } - } -</script> - -<style lang="less" scoped> -/** Button鎸夐挳闂磋窛 */ - .ant-btn { - margin-left: 30px; - margin-bottom: 30px; - float: right; - } - .drawer-footer{ - position: absolute; - bottom: -8px; - width: 100%; - border-top: 1px solid #e8e8e8; - padding: 10px 16px; - text-align: right; - left: 0; - background: #fff; - border-radius: 0 0 2px 2px; - } -</style> \ No newline at end of file diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue index 214db00..53648ff 100644 --- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue +++ b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue @@ -28,7 +28,7 @@ <a-row :gutter="24"> <a-col :span="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea v-decorator="['notes', validatorRules.notes]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" v-decorator="['notes', validatorRules.notes]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-col> </a-row> @@ -246,11 +246,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue index acb880c..683850e 100644 --- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue +++ b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue @@ -35,7 +35,7 @@ </a-row> <a-row :gutter="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea :disabled="disableSubmit" v-decorator="['notes', validatorRules.notes]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" :disabled="disableSubmit" v-decorator="['notes', validatorRules.notes]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-row> </a-form> @@ -254,11 +254,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("淇敼鎴愬姛") + // that.$message.success("淇敼鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"淇敼鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue index 270c9d8..86d898c 100644 --- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue +++ b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue @@ -1,13 +1,14 @@ + <template> - <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" + <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="6" :sm="6"> - <a-form-item label="閮ㄩ棬" > + <a-col :md="6" :sm="6" v-if="isDepartType == 0"> + <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0"> <!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />--> <a-tree-select v-model="value" @@ -17,16 +18,16 @@ placeholder="璇烽�夋嫨閮ㄩ棬" tree-default-expand-all > - <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> - <!--Child Node1 {{ value }}--> - <!--</span>--> + <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> + <!--Child Node1 {{ value }}--> + <!--</span>--> </a-tree-select> </a-form-item> </a-col> <a-col :md="6" :sm="6"> <a-form-item label="杞﹂棿" > - <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>--> + <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>--> <a-tree-select v-model="valueProduct" style="width: 100%" @@ -63,7 +64,7 @@ </div> <!-- table鍖哄煙-begin --> <div> - <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns" + <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> @@ -75,6 +76,7 @@ </template> <script> + import {mapActions} from 'vuex' import { ajaxGetSelectItems } from '@/api/api' @@ -95,7 +97,7 @@ import moment from 'moment' export default { - name: 'DeviceRepairListModel', + name: 'DeviceCalendarListModel', mixins: [JeecgListMixin], components: { JDictSelectTag, @@ -112,17 +114,30 @@ }, data() { return { - treeData:[], - readOnly:true, + isDepartType:'', + /*readOnly:true,*/ title:'', visible: false, - disableMixinCreated: true, - queryParam: {}, - columns: [{ - title: '璁惧缂栫爜', - align: 'center', - dataIndex: 'equipmentId', - }, + SelectedList:[], + treeData:[], + /*disableMixinCreated: true, + queryParam: {},*/ + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + },{ + + title: '璁惧缂栫爜', + align: 'center', + dataIndex: 'equipmentId', + }, { title: '璁惧鍚嶇О', align: 'center', @@ -131,13 +146,13 @@ { title: '椹卞姩绫诲瀷', align: 'center', - dataIndex: 'driveType', + dataIndex: 'driveType' }, { title: '鏁版帶绯荤粺', align: 'center', - dataIndex: 'controlSystem', - } + dataIndex: 'controlSystem' + }, ], sectionPData: [], sectionData: [], @@ -151,7 +166,7 @@ } }, created() { - + this.queryTreeData() }, watch: { value(value) { @@ -162,18 +177,21 @@ this.queryParam.productionId = value } }, - methods: { - openPage() { - this.visible = true - this.onClearSelected() - this.dataSource = []; - this.queryParam = { - status: this.status - }; - this.loadData(); - this.initOptions(); - this.initGroupOptions() + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) }, onSelectChange(selectedRowKeys, selectionRows) { // this.SelectedList.push(selectedRowKeys); @@ -181,6 +199,29 @@ this.selectionRows = selectionRows // this.SelectedList =[...this.SelectedList,...selectionRows]; // console.log(this.SelectedList); + }, + handleTableChange(pagination, filters, sorter) { + // this.onClearSelected() + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + this.loadData(); + }, + openPage() { + this.visible = true + this.onClearSelected() + this.dataSource = []; + this.queryParam = { + status: this.status + }; + + this.loadData(); + this.initOptions(); + this.initGroupOptions() }, loadData(arg) { if(!this.url.list){ @@ -211,7 +252,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -220,6 +265,7 @@ modalFormOk(val) { // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 this.loadData(); + this.selectedRowKeys = [val.id]; }, searchQuery() { @@ -241,6 +287,8 @@ this.close() }, handleOk() { + // this.selectionRows = this.SelectedList; + // console.log(this.selectionRows); this.$emit('sendSelectionRows', this.selectionRows) this.close() }, @@ -249,7 +297,11 @@ if (res.success) { this.treeData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -260,7 +312,11 @@ if (res.success) { this.sectionData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue index e9e769d..be82f57 100644 --- a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue +++ b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue @@ -35,10 +35,11 @@ <div class="table-operator" style="display: inline;"> <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>--> + <a-button type="primary" icon="download" @click="importTemplate('闈炶鍒掑仠鏈烘ā鏉�')">瀵煎叆妯℃澘</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> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="batchDel"> @@ -239,6 +240,15 @@ }, }, methods: { + importTemplate(fileName){ + var a = document.createElement("a"); + a.href = "/static/闈炶鍒掑仠鏈�.xls"; + a.download = "闈炶鍒掑仠鏈�.xls"; + a.style.display = "none"; + document.body.appendChild(a); + a.click(); + a.remove(); + }, dateParamChange(v1, v2) { // console.log(v1,v2) this.queryParam.startTime = v2[0] @@ -318,7 +328,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -363,7 +377,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -401,7 +419,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -443,7 +465,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -477,7 +503,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -499,10 +529,18 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(1) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.searchQuery(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); }, @@ -512,7 +550,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -529,11 +571,19 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; @@ -572,7 +622,12 @@ _this.equipment = res.result _this.searchQuery() } else { - _this.$message.warning('璇烽厤缃澶囷紒') + // _this.$message.warning('璇烽厤缃澶囷紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); + } } }) diff --git a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue index 2e94e19..0ef247e 100644 --- a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue +++ b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue @@ -37,7 +37,7 @@ <a-row :gutter="24"> <a-col :span="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-col> </a-row> @@ -233,7 +233,11 @@ let startOne = start.replace(/:/g,''); let endOne = end.replace(/:/g,''); if(startOne>=endOne){ - that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + that.$notification.warning({ + message:'娑堟伅', + description:"缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�" + }); // console.log(this.model) // this.endTime = '' that.confirmLoading = false @@ -248,11 +252,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalEdit.vue b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalEdit.vue index f760b2f..a508e48 100644 --- a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalEdit.vue +++ b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalEdit.vue @@ -44,7 +44,7 @@ </a-row> <a-row :gutter="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-row> </a-form> @@ -260,7 +260,12 @@ let startOne = start.replace(/:/g,''); let endOne = end.replace(/:/g,''); if(startOne>=endOne){ - that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + that.$notification.warning({ + message:'娑堟伅', + description:"缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�" + }); + // console.log(this.model) // this.endTime = '' that.confirmLoading = false @@ -275,11 +280,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"淇敼鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue index 270c9d8..86d898c 100644 --- a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue +++ b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue @@ -1,13 +1,14 @@ + <template> - <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" + <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="6" :sm="6"> - <a-form-item label="閮ㄩ棬" > + <a-col :md="6" :sm="6" v-if="isDepartType == 0"> + <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0"> <!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />--> <a-tree-select v-model="value" @@ -17,16 +18,16 @@ placeholder="璇烽�夋嫨閮ㄩ棬" tree-default-expand-all > - <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> - <!--Child Node1 {{ value }}--> - <!--</span>--> + <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> + <!--Child Node1 {{ value }}--> + <!--</span>--> </a-tree-select> </a-form-item> </a-col> <a-col :md="6" :sm="6"> <a-form-item label="杞﹂棿" > - <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>--> + <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>--> <a-tree-select v-model="valueProduct" style="width: 100%" @@ -63,7 +64,7 @@ </div> <!-- table鍖哄煙-begin --> <div> - <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns" + <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> @@ -75,6 +76,7 @@ </template> <script> + import {mapActions} from 'vuex' import { ajaxGetSelectItems } from '@/api/api' @@ -95,7 +97,7 @@ import moment from 'moment' export default { - name: 'DeviceRepairListModel', + name: 'DeviceCalendarListModel', mixins: [JeecgListMixin], components: { JDictSelectTag, @@ -112,17 +114,30 @@ }, data() { return { - treeData:[], - readOnly:true, + isDepartType:'', + /*readOnly:true,*/ title:'', visible: false, - disableMixinCreated: true, - queryParam: {}, - columns: [{ - title: '璁惧缂栫爜', - align: 'center', - dataIndex: 'equipmentId', - }, + SelectedList:[], + treeData:[], + /*disableMixinCreated: true, + queryParam: {},*/ + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + },{ + + title: '璁惧缂栫爜', + align: 'center', + dataIndex: 'equipmentId', + }, { title: '璁惧鍚嶇О', align: 'center', @@ -131,13 +146,13 @@ { title: '椹卞姩绫诲瀷', align: 'center', - dataIndex: 'driveType', + dataIndex: 'driveType' }, { title: '鏁版帶绯荤粺', align: 'center', - dataIndex: 'controlSystem', - } + dataIndex: 'controlSystem' + }, ], sectionPData: [], sectionData: [], @@ -151,7 +166,7 @@ } }, created() { - + this.queryTreeData() }, watch: { value(value) { @@ -162,18 +177,21 @@ this.queryParam.productionId = value } }, - methods: { - openPage() { - this.visible = true - this.onClearSelected() - this.dataSource = []; - this.queryParam = { - status: this.status - }; - this.loadData(); - this.initOptions(); - this.initGroupOptions() + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) }, onSelectChange(selectedRowKeys, selectionRows) { // this.SelectedList.push(selectedRowKeys); @@ -181,6 +199,29 @@ this.selectionRows = selectionRows // this.SelectedList =[...this.SelectedList,...selectionRows]; // console.log(this.SelectedList); + }, + handleTableChange(pagination, filters, sorter) { + // this.onClearSelected() + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + this.loadData(); + }, + openPage() { + this.visible = true + this.onClearSelected() + this.dataSource = []; + this.queryParam = { + status: this.status + }; + + this.loadData(); + this.initOptions(); + this.initGroupOptions() }, loadData(arg) { if(!this.url.list){ @@ -211,7 +252,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -220,6 +265,7 @@ modalFormOk(val) { // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 this.loadData(); + this.selectedRowKeys = [val.id]; }, searchQuery() { @@ -241,6 +287,8 @@ this.close() }, handleOk() { + // this.selectionRows = this.SelectedList; + // console.log(this.selectionRows); this.$emit('sendSelectionRows', this.selectionRows) this.close() }, @@ -249,7 +297,11 @@ if (res.success) { this.treeData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -260,7 +312,11 @@ if (res.success) { this.sectionData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue new file mode 100644 index 0000000..fd7c515 --- /dev/null +++ b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue @@ -0,0 +1,602 @@ +<template> + <div class="efficiency_list" style="width: 100%;height: 100%;"> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :md="6" :sm="6"> + <a-form-item label="鏃堕棿"> + <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/> + </a-form-item> + </a-col> + <a-col :lg="2" :md="3" :sm="3" :xs="3"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </a-col> + </a-row> + </a-form> + </div> + <div id="DeviceList"> + <div class="openRateTrendDg"> + <div id="Efficiency" class="container" style="margin-top: 20px;"> + <div class="table2"> + <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap;text-align: left;"> + <thead> + <tr class="thead fixed equipname"> + <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">鎶ヨ鍙�</th> + <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">鍑虹幇娆℃暟</th> + <th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">鍚堣鎸佺画鏃堕棿锛堢锛�</th> + <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">鎶ヨ淇℃伅</th> + <!--<template v-for="(tableHead, index) in tableHeads">--> + <!--<th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>--> + <!--</template>--> + </tr> + </thead> + <tbody> + <tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)"> + <td class="tdgu kaitou">{{item.alarmCode}}</td> + <td class="tdgu1 kaitou">{{item.count}}</td> + <td class="tdgu2 kaitou">{{item.timeCount}}</td> + <td class="tdgu3 kaitou">{{item.alarmContent}}</td> + <!--<template v-for="(tableHead, index) in item.dataList">--> + <!--<td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>--> + <!--</template>--> + </tr> + </tbody> + </table> + </div> + </div> + </div> + <div style="width: 100%;height: 60%;display: flex;"> + <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div> + <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div> + </div> + </div> + </a-card> + </div> +</template> + +<script> + import moment from 'moment' + import { putAction, getAction } from '@/api/manage' + import $ from 'jquery' + import '@/components/table2excel/table2excel' + import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + import { + JeecgListMixin + } from '@/mixins/JeecgListMixin' + export default { + // mixins: [JeecgListMixin], + name: 'alarmAnalysisMain', + components: {}, + data() { + return { + dataSource: [], + /* table鍔犺浇鐘舵�� */ + loading: false, + typeTree: "", + typeParent: 1, + typeEquipment: 1, + TreeIDOne: 1, + TreeIDTwo: 2, + deviceTypeDict: '', + dates: [], + identifying: [], + queryParam: {}, + queryParams: {}, + queryParamEquip: {}, + queryParamPeople: {}, + efficiencyOptions: [ + { label: '鍒╃敤鐜�', value: 'lyl' }, + { label: '寮�鏈虹巼', value: 'kjl' }, + { label: '寮�鏈烘椂闂�', value: 'kjsj' }, + { label: '鍔犲伐鏃堕棿', value: 'jgsj' }, + { label: '寰呮満鏃堕棿', value: 'djsj' }, + { label: '鍏虫満鏃堕棿', value: 'gjsj' } + ], + checkedList: ['lyl'], + dataList: [], + url: { + efficiencyList: '/mdc/alarmAnalyze/alarmList', + listByType: '/mdc/MdcUtilizationRate/getByType', + alarmTrend: '/mdc/alarmAnalyze/alarmTrend' + }, + tableHeads: [], + pieDate:[0], + XData:[0], + YData:[0], + } + }, + props: { nodeTree: '', Type: '', nodePeople: '' }, + /** + * 鐢熷懡鍛ㄦ湡 鎸傝浇鍓� + * */ + created() { + this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)] + this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') + this.queryParam.typeTree = "1" + this.loadData1() + + }, + mounted(){ + this.drawWrin() + }, + watch: { + Type(valmath) { + this.dataList = []; + this.queryParam.typeTree = valmath + }, + nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + if (JSON.stringify(val) != '{}') { + if (val.equipmentId != null) { + this.queryParamEquip.parentId = '' + this.queryParamEquip.equipmentId = val.equipmentId + } else { + this.queryParamEquip.parentId = val.key + this.queryParamEquip.equipmentId = '' + } + /*杩欓噷浣犳槸鐩戝惉鍒版爲寰楀彉鍖� 鏄笉鏄姹備竴娆�*/ + this.searchQuery() + } + }, + nodePeople(val) { + if (JSON.stringify(val) != '{}') { + if (val.equipmentId != null) { + this.queryParamPeople.parentId = val.equipmentId + this.queryParamPeople.equipmentId = '' + } else { + this.queryParamPeople.parentId = val.key + this.queryParamPeople.equipmentId = '' + } + this.searchQuery() + } + } + }, + filters: { + numFilter(value) { + if (value) { + return parseFloat((value * 100).toFixed(2)) + } else { + return '0' + } + } + }, + methods: { + numBerTwo(value){ + if (value) { + return parseFloat((value * 100).toFixed(2)) + } else { + return '0' + } + }, + TableDraw(key,val) { + let that = this + that.queryParam.alarmCode = val.alarmCode + console.log(this.queryParam) + that.pieDate = [] + that.XData = [] + that.YData = [] + getAction(that.url.alarmTrend, that.queryParam).then(res => { + if (res.success) { + for (var i = 0;i<res.result.equipmentCountList.length;i++){ + that.pieDate.push({name:res.result.equipmentCountList[i].key,value:res.result.equipmentCountList[i].count}) + } + for (var j = 0;j<res.result.dateCountList.length;j++){ + that.XData.push(res.result.dateCountList[j].key) + that.YData.push(res.result.dateCountList[j].count) + } + // this.tableHeads = res.result.dates + // this.dataList = res.result + // this.draw() + // this.checkSameData(this.dataList) + // this.checkSameData1(this.dataList) + // this.checkSameData2(this.dataList) + // this.combineCell(); + // this.initDeviceType(this.dataList) + that.drawWrin() + } + }) + console.log(this.YData) + + }, + disabledDate(current) { + //Can not slect days before today and today + return current && current > moment().subtract('days', 1); + }, + initDeviceType(deviceList) { + let dictCode = 'mdc_equipmentType' + let items = [] + items = getDictItemsFromCache(dictCode) + if (deviceList && items.length > 0) { + for (let a = 0; a < deviceList.length; a++) { + if (items && items.length > 0) { + for (let i = 0; i < items.length; i++) { + if (deviceList[a].equipmentType == items[i].value) { + deviceList[a].equipmentType = items[i].title + } + } + } else { + ajaxGetDictItems(dictCode, null).then((res) => { + if (res.success) { + let items = res.result + for (let i = 0; i < items.length; i++) { + if (deviceList[a].equipmentType == items[i].value) { + deviceList[a].equipmentType = items[i].title + } + } + } + }) + } + } + } + }, + dateParamChange(v1, v2) { + this.queryParam.startDate = v2[0] + this.queryParam.endDate = v2[1] + }, + searchQuery() { + if (this.queryParam.typeTree == "1") { + this.queryParam.parentId = this.queryParamEquip.parentId + this.queryParam.equipmentId = this.queryParamEquip.equipmentId + } else { + this.queryParam.parentId = this.queryParamPeople.parentId + this.queryParam.equipmentId = "" + } + this.loadData1() + // this.onClearSelected() + }, + // searchReset() { + // this.typeTree = this.queryParam.typeTree + // this.typeParent = this.queryParam.parentId + // this.typeEquipment = this.queryParam.equipmentId + // this.queryParam = {} + // this.dates = [] + // this.queryParam.typeTree = this.typeTree + // this.queryParam.parentId = this.typeParent + // this.queryParam.equipmentId = this.typeEquipment + // // this.ipagination.current = 1 + // this.loadData1(); + // // this.queryParam = {} + // // this.dates = [] + // // this.loadData() + // // this.onClearSelected() + // }, + // loadData1() { + // let that = this + // that.columns=[ + // { + // title: '璁惧缂栧彿', + // align: 'center', + // dataIndex: 'equipmentId', + // width:'150px' + // }, + // { + // title: '璁惧鍚嶇О', + // align: 'center', + // dataIndex: 'equipmentName', + // width:'150px' + // }, + // ] + // that.tableHeads = [] + // that.dataList = [] + // getAction(this.url.efficiencyList, that.queryParam).then(res => { + // var tmp = {} + // console.log(res) + // if (res.success) + // + // that.dataSource = res.result.mdcEfficiencyList + // for(var k = 0;k<that.dataSource[0].dataList.length;k++){ + // that.columns.push( + // { + // title:that.dataSource[0].dataList.theDate, + // align: 'center', + // width:'120px', + // // dataIndex:'utilizationRate', + // } + // ) + // } + // for(var i = 0;i<that.dataSource.length;i++){ + // for (var j = 0; j < that.dataSource[i].dataList.length;j++){ + // // that.columns.push( + // // { + // // title:that.dataSource[0].dataList[j].theDate, + // // align: 'center', + // // width:'120px', + // // dataIndex:'utilizationRate', + // // } + // // ) + // } + // + // } + // console.log(that.columns) + // console.log(that.dataSource) + // // this.initDeviceType(this.dataList) + // this.draw() + // } + // } + loadData1() { + this.tableHeads = [] + this.dataList = [] + getAction(this.url.efficiencyList, this.queryParam).then(res => { + if (res.success) { + // this.tableHeads = res.result.dates + this.dataList = res.result + // this.draw() + // this.checkSameData(this.dataList) + // this.checkSameData1(this.dataList) + // this.checkSameData2(this.dataList) + // this.combineCell(); + // this.initDeviceType(this.dataList) + + } + }) + }, + drawWrin(){ + let equipmentWarningPie = this.$echarts.init(document.getElementById('MdcEquipmentWarningPie'), 'macarons'); + let equipmentWarningPieOption = { + title: { + text: '鍚勮澶囧嚭鐜版鎶ヨ鐨勬瘮渚�', + x: 'center', + y: 'bottom' + }, + tooltip: { + trigger: 'item', + formatter: "<br/>{b} : {c} ({d}%)" + }, + calculable: true, + series: [{ + type: 'pie', + radius: '60%', + center: ['55%', '55%'], + itemStyle: { + normal: { + /*color: function (params) { + var colorList = ['#4169E1', '#A8A8A8']; + return colorList[params.dataIndex] + },*/ + label: { + show: true, + position: 'top', + formatter: '{b}\n{c}' + } + } + }, + data:this.pieDate + // data:[{name:'jjjjjjj',value:'2'}] + }] + }; + equipmentWarningPie.setOption(equipmentWarningPieOption,true); + let equipmentWarningLine = this.$echarts.init(document.getElementById('MdcEquipmentWarningLine'), 'macarons'); + let equipmentWarningLineOption = { + title : { + text: '姣忓ぉ鍑虹幇姝ゆ姤璀︾殑鏁伴噺璧板娍', + x: 'center', + y: 'bottom' + }, + tooltip:{ + trigger: 'item' + }, + calculable: true, + xAxis: [ + { + type: 'category', + show: true, + data:this.XData + /*axisLabel :{ + interval:0 + }*/ + } + ], + yAxis: [ + { + type: 'value', + name: '娆℃暟' + } + ], + series: [ + { + name: '鎶ヨ鏁伴噺', + type: 'line', + data: this.YData, + markPoint : { + data : [ + {type : 'max', name: '鏈�澶у��'}, + {type : 'min', name: '鏈�灏忓��'} + ] + } + } + ] + }; + equipmentWarningLine.setOption(equipmentWarningLineOption,true); + } + } + } +</script> +<style scoped> + .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; + } + + /*.dataContent .fixed th {*/ + /*width: 50px;*/ + /*}*/ + + .dataContent .thead th { + background-color: #fafafa; + text-align: center; + height: 30px; + padding: 5px; + } + + .dataContent .notfixed th { + /*width: auto;*/ + } + + .dataContent tr td { + height: 35px; + } + .dataContent .mathData:hover td{ + background-color: #e6f7ff; + } + .dataContent .mathData td { + padding: 10px; + /*display: none;*/ + } + + .dataContent .mathData .td { + /*background-color: #ff9bd2;*/ + display: inline-block; + padding: 10px; + } + + .dataContent .mathData .tdd { + /*display: none;*/ + } + .table2{ + width: 100%; + height: 100%; + overflow: auto; + } + /*tr th {*/ + /*height: 50px!important;*/ + /*}*/ + /*tr td{*/ + /*height: 50px!important;*/ + /*}*/ + .table2 thead tr th:first-child, + .table tbody tr .tdgu{ + position: sticky; + left: 0; + z-index: 1; + } + .table tbody tr .kaitou{ + z-index: 1; + background-color: white; + } + .table tbody tr .tdgu1{ + position: sticky; + left: 150px; + z-index: 2; + } + .table tbody tr .tdgu2{ + position: sticky; + left: 300px; + z-index: 2; + } + .table tbody tr .tdgu3{ + position: sticky; + left: 450px; + z-index: 2; + } + .table tbody tr .tdgu4{ + position: sticky; + left: 550px; + z-index: 2; + } + .table tbody tr .tdgu5{ + position: sticky; + left: 700px; + z-index: 2; + } + .table2 thead tr .timeth, + .table2 thead tr .thgu { + position: sticky; + top:0; + z-index: 3; + } + .table2 thead .gudingth th{ + position: sticky; + top: 32px; + z-index: 6!important; + } + .table2 thead .equipname .name{ + z-index: 3; + } + .table2 thead .equipname .dong1{ + z-index: 4; + left: 0; + /*border: 1px solid #000;*/ + } + .table2 thead .equipname .dong2{ + z-index: 5; + left: 150px; + } + .table2 thead .equipname .dong3{ + z-index: 5; + left: 300px; + } + .table2 thead .equipname .dong4{ + z-index: 5; + left: 450px; + } + .table2 thead .equipname .dong5{ + z-index: 5; + left: 550px; + } + .table2 thead .equipname .dong6{ + z-index: 5; + left: 700px; + } + + @media screen and (min-width: 1920px){ + #Efficiency{ + height: 337px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1680px) and (max-width: 1920px){ + #Efficiency{ + height: 337px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1400px) and (max-width: 1680px){ + #Efficiency{ + height: 190px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1280px) and (max-width: 1400px){ + #Efficiency{ + height: 90px!important; + overflow: scroll; + } + } + @media screen and (max-width: 1280px){ + #Efficiency{ + height: 90px!important; + overflow: scroll; + } + } + #Efficiency .table_guding1{ + position: absolute; + overflow: hidden; + width: 500px; + } + #Efficiency .table_guding2{ + overflow-x: scroll; + width: 500px; + } + /deep/ .ant-card{ + height: 100%!important; + } + /deep/ .ant-card .ant-card-body{ + height: 100%!important; + } + .efficiency_list #DeviceList{ + height: 90%!important; + } +</style> \ No newline at end of file diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue index 4186f79..c269a76 100644 --- a/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue +++ b/src/views/mdc/base/modules/alarmManager/alarmManagerEdit.vue @@ -5,20 +5,20 @@ <a-spin :spinning="confirmLoading"> <a-form :form="form"> <a-row :gutter="24"> - <a-col :span="24"> - <a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <!--<a-input v-decorator="['equipmentId', validatorRules.equipmentId]">--> - <a-input :disabled='disabled' placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-decorator="['equipmentId', validatorRules.equipmentId]"></a-input> - </a-form-item> - </a-col> + <!--<a-col :span="24">--> + <!--<a-form-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol">--> + <!--<!–<a-input v-decorator="['equipmentId', validatorRules.equipmentId]">–>--> + <!--<a-input :disabled='disabled' placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-decorator="['equipmentId', validatorRules.equipmentId]"></a-input>--> + <!--</a-form-item>--> + <!--</a-col>--> <a-col :span="24"> <a-form-item label="鎶ヨ鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-input placeholder="璇疯緭鍏ユ姤璀﹀彿" v-decorator="['alarmCode', validatorRules.alarmCode]"></a-input> </a-form-item> </a-col> <a-col :span="24"> - <a-form-item label="鎶ヨ鎻忚堪" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-input placeholder="璇疯緭鍏ユ姤璀︽弿杩�" v-decorator="['alarmDescription', validatorRules.alarmDescription]"></a-input> + <a-form-item label="鎶ヨ鍐呭" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input placeholder="璇疯緭鍏ユ姤璀﹀唴瀹�" v-decorator="['alarmContent', validatorRules.alarmContent]"></a-input> </a-form-item> </a-col> <a-col :span='24'> @@ -106,7 +106,7 @@ }, url: { // add: '/mdc/alarmInfo/add', - edit: '/mdc/alarmInfo/edit', + edit: '/mdc/mdcAlarmInfo/edit', //椹卞姩绫诲瀷 initShiftList: '/mdc/mdcequipment/driveTypeSelected', }, @@ -124,7 +124,7 @@ this.model = Object.assign({}, record) this.visible = true this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model,'equipmentId', 'alarmCode', 'alarmDescription','driveType')) + this.form.setFieldsValue(pick(this.model, 'alarmCode', 'alarmContent','driveType')) }) }, initShiftList() { @@ -146,7 +146,7 @@ if (!err) { that.confirmLoading = true let formData = Object.assign(this.model, values) - formData.isUse = this.isUse ? "1" : "2" + formData.isUse = this.isUse ? "0" : "-1" let obj if (!this.model.id) { // obj = postAction(this.url.add, formData) @@ -157,11 +157,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue index 619644b..438c3e8 100644 --- a/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue +++ b/src/views/mdc/base/modules/alarmManager/alarmManagerForm.vue @@ -11,15 +11,20 @@ </a-form-item> </a-col> <a-col :span="24"> - <a-form-item label="鎶ヨ鎻忚堪" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-input placeholder="璇疯緭鍏ユ姤璀︽弿杩�" v-decorator="['alarmDescription', validatorRules.alarmDescription]"></a-input> + <a-form-item label="鎶ヨ鍐呭" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input placeholder="璇疯緭鍏ユ姤璀﹀唴瀹�" v-decorator="['alarmContent', validatorRules.alarmContent]"></a-input> </a-form-item> </a-col> <a-col :span='24'> <a-form-item label="椹卞姩绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select v-decorator="['driveType', validatorRules. driveType]" placeholder="璇烽�夋嫨椹卞姩绫诲瀷" - :options="shiftList"> - </a-select> + <!--<a-select v-decorator="['driveType', validatorRules. driveType]" placeholder="璇烽�夋嫨椹卞姩绫诲瀷"--> + <!--:options="shiftList">--> + <!--</a-select>--> + <j-dict-select-tag + placeholder="璇烽�夋嫨椹卞姩绫诲瀷" + v-decorator="['driveType', validatorRules.driveType]" + dictCode="mdc_driveType" + /> </a-form-item> </a-col> <a-col :span="24"> @@ -27,28 +32,28 @@ <a-switch :default-checked = 'showM' v-decorator="['isUse', validatorRules.isUse]"></a-switch> </a-form-item> </a-col> - <a-col :span='24'> - <a-form-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="鏂板鏂瑰紡" - hidden> - <a-input - v-decorator="[ - 'addWay', - { rules: - [ - { required: true, message: '' } - ], - initialValue: '2' - } - ]" - placeholder="璇疯緭鍏ユ柊澧炴柟寮�" - allowClear - > - </a-input> - </a-form-item> - </a-col> + <!--<a-col :span='24'>--> + <!--<a-form-item--> + <!--:labelCol="labelCol"--> + <!--:wrapperCol="wrapperCol"--> + <!--label="鏂板鏂瑰紡"--> + <!--hidden>--> + <!--<a-input--> + <!--v-decorator="[--> + <!--'addWay',--> + <!--{ rules:--> + <!--[--> + <!--{ required: true, message: '' }--> + <!--],--> + <!--initialValue: '2'--> + <!--}--> + <!--]"--> + <!--placeholder="璇疯緭鍏ユ柊澧炴柟寮�"--> + <!--allowClear--> + <!-->--> + <!--</a-input>--> + <!--</a-form-item>--> + <!--</a-col>--> </a-row> </a-form> </a-spin> @@ -100,11 +105,11 @@ }, confirmLoading: false, form: this.$form.createForm(this), validatorRules: { - driveType:{ - rules: [{ - required: true, message: '璇烽�夋嫨椹卞姩绫诲瀷!', - }], - }, + // driveType:{ + // rules: [{ + // required: true, message: '璇烽�夋嫨椹卞姩绫诲瀷!', + // }], + // }, // isUse:{ // rules: [{ // required: true, message: !', @@ -117,12 +122,12 @@ }, alarmDescription:{ rules: [{ - required: true, message: '璇疯緭鍏ユ姤璀︽弿杩�!', + required: true, message: '璇疯緭鍏ユ姤璀﹀唴瀹�!', }], }, }, url: { - add: '/mdc/alarmInfo/add', + add: '/mdc/mdcAlarmInfo/add', // edit:'/mdc/alarmInfo/edit', //椹卞姩绫诲瀷 initShiftList: '/mdc/mdcequipment/driveTypeSelected', @@ -150,7 +155,7 @@ this.visible = true this.form.resetFields() this.model = Object.assign({}, record) - this.initShiftList() + // this.initShiftList() this.$nextTick(() => { }) @@ -169,13 +174,21 @@ let formData = Object.assign(this.model, values) // console.log(formData) // formData.isUse = formData.isUse ? "1" : "2" - formData.isUse = formData.isUse == true || formData.isUse == undefined ? "1" : "2" - putAction(this.url.add, formData).then((res) => { + formData.isUse = formData.isUse == true || formData.isUse == undefined ? "0" : "-1" + postAction(this.url.add, formData).then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue b/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue index 06e4811..9156b7c 100644 --- a/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue +++ b/src/views/mdc/base/modules/alarmManager/alarmManagerModal.vue @@ -219,10 +219,18 @@ formData.isUse = formData.isUse == true || formData.isUse == undefined ? "1" : "2" putAction(this.url.add, formData).then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/alarmManager/alarmManangerEqupment.vue b/src/views/mdc/base/modules/alarmManager/alarmManangerEqupment.vue index 36b9e09..f7c53a9 100644 --- a/src/views/mdc/base/modules/alarmManager/alarmManangerEqupment.vue +++ b/src/views/mdc/base/modules/alarmManager/alarmManangerEqupment.vue @@ -198,7 +198,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -239,7 +243,11 @@ if (res.success) { this.sectionPData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -250,7 +258,11 @@ if (res.success) { this.sectionData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysisBar.vue b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysisBar.vue new file mode 100644 index 0000000..2cedc86 --- /dev/null +++ b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysisBar.vue @@ -0,0 +1,663 @@ +<template> + <div class="comparative_Bar" style="width: 100%;height: 900px;display: flex;flex-direction: column;overflow: scroll"> + <div id="compAnalBar1" style="flex: 1;"></div> + <div id="compAnalBar2" style="flex: 1;"></div> + </div> +</template> + +<script> + import * as echarts from 'echarts' + export default { + name: 'comparativeAnalysisBar', + props:{ + dataList:'' + + }, + data(){ + return{ + OpenCloseList:[], + openRate:[], + utilizationRate:[], + openLong:[], + closeLong:[], + equipmentList:[] + } + }, + created(){ + + }, + watch:{ + dataList(val){ + this.OpenCloseList = val + this.drawTu() + }, + }, + mounted() { + this.drawTu() + }, + methods:{ + drawTu(){ + let compAnalBar1 = this.$echarts.init(document.getElementById('compAnalBar1'), 'macarons'); + let compAnalBar2 = this.$echarts.init(document.getElementById('compAnalBar2'), 'macarons'); + let compAnalBarOption1 = { + tooltip: { + trigger: 'axis', + axisPointer: { + type: "shadow", + textStyle: { + color: "#fff" + } + + } + }, + legend: { + x: '4%', + top: '11%', + textStyle: { + color: '#90979c' + }, + color: ['#6496e9', '#4fe1c5'], + data: ['寮�鏈虹巼', '鍒╃敤鐜�'] + }, + toolbox: { + show : true, + feature : { + mark : {show: true}, + magicType : {show: true, type: ['line', 'bar']}, + restore : {show: true}, + saveAsImage : {show: true,name:'璁惧杩愯鏁堢巼瀵规瘮鍒嗘瀽鍥�'} + } + }, + calculable: true, + grid: { + borderWidth: 0, + top: 110, + bottom: 95, + textStyle: { + color: "#fff" + } + }, + xAxis: [ + { + type: 'category', + splitLine: { + "show": false + }, + axisTick: { + "show": false + }, + splitArea: { + show: false + }, + boundaryGap : true, + axisLabel : { + interval : 0, + rotate : 0, + show: true, + wigth:20, + splitNumber: 8, + textStyle: { + fontFamily: "寰蒋闆呴粦", + fontSize: 12 + } + }, + data : [0] + } + ], + yAxis: [ + { + type: 'value', + splitLine: { + show: false + }, + axisLine: { + lineStyle: { + color: '#90979c' + } + }, + axisTick: { + show: false + }, + axisLabel: { + interval: 0 + + }, + splitArea: { + show: false + } + } + ], + dataZoom: [{ + show: true, + height: 30, + xAxisIndex: [0], + bottom: 30, + start: 0, + end: 100, + handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z', + handleSize: '110%', + handleStyle: { + color: "#d3dee5" + }, + textStyle: { + color: "#fff" + }, + borderColor: "#90979c" + }, { + type: "inside", + show: true, + height: 15, + start: 1, + end: 35 + }], + series: [ + { + name: '寮�鏈虹巼', + type: 'bar', + //barWidth: 30, + barWidth: 25, + itemStyle: { + normal: { + color: function(params) { + let colorList = [ + ["#6496e9","#6bded3"], + // ["#849db8","#b4b8cc"], + // ["#4fe1c5","#4ecee1"], + // // ["#9978fa","#88a1fa"], + // ["#ffbb65","#fdc68b"], + ]; + // return colorList[params.dataIndex]; + let colorItem = colorList[params.dataIndex]; + return new echarts.graphic.LinearGradient(0,0,0,1,[{ + offset:0, + color:'#6496e9' + }, + { + offset:1, + color:"#6bded3" + }],false) + }, + barBorderRadius: [5, 5, 0, 0], + } + }, + data: [0], + // barCategoryGap: '20%', + // barGap : '-10%', + markPoint : { + data : [ + {type : 'max', name: '鏈�澶у��',symbolSize:70}, + {type : 'min', name: '鏈�灏忓��',symbolSize:70} + ] + }, + markLine : { + data : [ + {type : 'average', name: '骞冲潎鍊�'} + ] + } + }, + { + name: '鍒╃敤鐜�', + type: 'bar', + //barWidth: 30, + barWidth: 25, + // barCategoryGap: '20%', + // barGap : '-10%', + itemStyle: { + normal: { + color: function(params) { + let colorList = [ + // ["#6496e9","#6bded3"], + // ["#849db8","#b4b8cc"], + ["#4fe1c5","#4ecee1"], + // ["#9978fa","#88a1fa"], + // ["#ffbb65","#fdc68b"], + ]; + // return colorList[params.dataIndex]; + let colorItem = colorList[params.dataIndex]; + return new echarts.graphic.LinearGradient(0,0,0,1,[{ + offset:0, + color:"#4fe1c5" + }, + { + offset:1, + color:"#4ecee1" + }],false) + }, + barBorderRadius: [5, 5, 0, 0], + } + }, + data: [0], + markPoint : { + data : [ + {type : 'max', name: '鏈�澶у��',symbolSize:70}, + {type : 'min', name: '鏈�灏忓��',symbolSize:70} + ] + }, + markLine : { + data : [ + {type : 'average', name: '骞冲潎鍊�'} + ] + } + } + ] + }; + // let compAnalBarOption2 = { + // tooltip: { + // trigger: 'axis', + // axisPointer: { + // type: "shadow", + // textStyle: { + // color: "#fff" + // } + // + // } + // }, + // legend: { + // x: '4%', + // top: '11%', + // textStyle: { + // color: '#90979c' + // }, + // data: ['寮�鏈烘椂闂�', '鍏虫満鏃堕棿'], + // color:['#6496e9','#b4b8cc'] + // }, + // toolbox: { + // show : true, + // feature : { + // mark : {show: true}, + // magicType : {show: true, type: ['line', 'bar']}, + // restore : {show: true}, + // saveAsImage : {show: true,name:'璁惧杩愯鏃堕棿瀵规瘮鍒嗘瀽鍥�'} + // } + // }, + // calculable: true, + // grid: { + // borderWidth: 0, + // top: 110, + // bottom: 95, + // textStyle: { + // color: "#fff" + // } + // }, + // xAxis: [ + // { + // type: 'category', + // splitLine: { + // "show": false + // }, + // axisTick: { + // "show": false + // }, + // splitArea: { + // show: false + // }, + // boundaryGap : true, + // axisLabel : { + // interval : 0, + // rotate : 0, + // show: true, + // wigth:20, + // splitNumber: 8, + // textStyle: { + // fontFamily: "寰蒋闆呴粦", + // fontSize: 12 + // } + // }, + // data : [0] + // } + // ], + // yAxis: [ + // { + // type: 'value', + // splitLine: { + // show: false + // }, + // axisLine: { + // lineStyle: { + // color: '#90979c' + // } + // }, + // axisTick: { + // show: false + // }, + // axisLabel: { + // interval: 0 + // + // }, + // splitArea: { + // show: false + // } + // } + // ], + // dataZoom: [{ + // show: true, + // height: 30, + // xAxisIndex: [0], + // bottom: 30, + // start: 0, + // end: 100, + // handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z', + // handleSize: '110%', + // handleStyle: { + // color: "#d3dee5" + // }, + // textStyle: { + // color: "#fff" + // }, + // borderColor: "#90979c" + // }, { + // type: "inside", + // show: true, + // height: 15, + // start: 1, + // end: 35 + // }], + // series: [ + // { + // name: '寮�鏈烘椂闂�', + // type: 'bar', + // //barWidth: 30, + // barWidth: 25, + // // stack: 'sum', + // // barCategoryGap: '20%', + // itemStyle: { + // normal: { + // color: function(params) { + // let colorList = [ + // ["#6496e9","#6bded3"], + // // ["#849db8","#b4b8cc"], + // // ["#4fe1c5","#4ecee1"], + // // // ["#9978fa","#88a1fa"], + // // ["#ffbb65","#fdc68b"], + // ]; + // // return colorList[params.dataIndex]; + // let colorItem = colorList[params.dataIndex]; + // return new echarts.graphic.LinearGradient(0,0,0,1,[{ + // offset:0, + // color:'#6496e9' + // }, + // { + // offset:1, + // color:"#6bded3" + // }],false) + // }, + // barBorderRadius: [5, 5, 0, 0], + // } + // }, + // data: [0] + // }, + // { + // name: '鍏虫満鏃堕棿', + // type: 'bar', + // //barWidth: 30, + // barWidth: 25, + // // stack: 'sum', + // // barCategoryGap: '20%', + // itemStyle: { + // normal: { + // color: function(params) { + // let colorList = [ + // // ["#6496e9","#6bded3"], + // ["#849db8","#b4b8cc"], + // // ["#4fe1c5","#4ecee1"], + // // // ["#9978fa","#88a1fa"], + // // ["#ffbb65","#fdc68b"], + // ]; + // // return colorList[params.dataIndex]; + // let colorItem = colorList[params.dataIndex]; + // return new echarts.graphic.LinearGradient(0,0,0,1,[{ + // offset:0, + // color:'#849db8' + // }, + // { + // offset:1, + // color:"#b4b8cc" + // }],false) + // }, + // barBorderRadius: [5, 5, 0, 0], + // } + // }, + // data: [0] + // } + // ] + // }; + let compAnalBarOption2 = { + tooltip: { + trigger: 'axis', + axisPointer: { + type: "shadow", + textStyle: { + color: "#fff" + } + + } + }, + legend: { + x: '4%', + top: '11%', + textStyle: { + color: '#90979c' + }, + color:['#6496e9','#b4b8cc'], + data: ['寮�鏈烘椂闂�', '鍏虫満鏃堕棿'] + }, + toolbox: { + show : true, + feature : { + mark : {show: true}, + magicType : {show: true, type: ['line', 'bar']}, + restore : {show: true}, + saveAsImage : {show: true,name:'璁惧杩愯鏁堢巼瀵规瘮鍒嗘瀽鍥�'} + } + }, + calculable: true, + grid: { + borderWidth: 0, + top: 110, + bottom: 95, + textStyle: { + color: "#fff" + } + }, + xAxis: [ + { + type: 'category', + splitLine: { + "show": false + }, + axisTick: { + "show": false + }, + splitArea: { + show: false + }, + boundaryGap : true, + axisLabel : { + interval : 0, + rotate : 0, + show: true, + wigth:20, + splitNumber: 8, + textStyle: { + fontFamily: "寰蒋闆呴粦", + fontSize: 12 + } + }, + data : [0] + } + ], + yAxis: [ + { + type: 'value', + splitLine: { + show: false + }, + axisLine: { + lineStyle: { + color: '#90979c' + } + }, + axisTick: { + show: false + }, + axisLabel: { + interval: 0 + + }, + splitArea: { + show: false + } + } + ], + dataZoom: [{ + show: true, + height: 30, + xAxisIndex: [0], + bottom: 30, + start: 0, + end: 100, + handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z', + handleSize: '110%', + handleStyle: { + color: "#d3dee5" + }, + textStyle: { + color: "#fff" + }, + borderColor: "#90979c" + }, { + type: "inside", + show: true, + height: 15, + start: 1, + end: 35 + }], + series: [ + { + name: '寮�鏈烘椂闂�', + type: 'bar', + //barWidth: 30, + barWidth: 25, + itemStyle: { + normal: { + color: function(params) { + let colorList = [ + ["#6496e9","#6bded3"], + // ["#849db8","#b4b8cc"], + // ["#4fe1c5","#4ecee1"], + // // ["#9978fa","#88a1fa"], + // ["#ffbb65","#fdc68b"], + ]; + // return colorList[params.dataIndex]; + let colorItem = colorList[params.dataIndex]; + return new echarts.graphic.LinearGradient(0,0,0,1,[{ + offset:0, + color:'#6496e9' + }, + { + offset:1, + color:"#6bded3" + }],false) + }, + barBorderRadius: [5, 5, 0, 0], + } + }, + data: [0], + // barCategoryGap: '20%', + // barGap : '-10%', + markPoint : { + data : [ + {type : 'max', name: '鏈�澶у��',symbolSize:70}, + {type : 'min', name: '鏈�灏忓��',symbolSize:70} + ] + }, + markLine : { + data : [ + {type : 'average', name: '骞冲潎鍊�'} + ] + } + }, + { + name: '鍏虫満鏃堕棿', + type: 'bar', + //barWidth: 30, + barWidth: 25, + // barCategoryGap: '20%', + // barGap : '-10%', + itemStyle: { + normal: { + color: function(params) { + let colorList = [ + // ["#6496e9","#6bded3"], + ["#849db8","#b4b8cc"], + // ["#4fe1c5","#4ecee1"], + // ["#9978fa","#88a1fa"], + // ["#ffbb65","#fdc68b"], + ]; + // return colorList[params.dataIndex]; + let colorItem = colorList[params.dataIndex]; + return new echarts.graphic.LinearGradient(0,0,0,1,[{ + offset:0, + color:"#849db8" + }, + { + offset:1, + color:"#b4b8cc" + }],false) + }, + barBorderRadius: [5, 5, 0, 0], + } + }, + data: [0], + markPoint : { + data : [ + {type : 'max', name: '鏈�澶у��',symbolSize:70}, + {type : 'min', name: '鏈�灏忓��',symbolSize:70} + ] + }, + markLine : { + data : [ + {type : 'average', name: '骞冲潎鍊�'} + ] + } + } + ] + }; + if(this.OpenCloseList != null){ + this.equipmentList = [] + this.openRate =[] + this.utilizationRate =[] + this.openLong = [] + this.closeLong = [] + for(var i = 0;i<this.OpenCloseList.length;i++){ + this.equipmentList.push(this.OpenCloseList[i].equipmentId) + this.openRate.push((this.OpenCloseList[i].openRate*100).toFixed(2)) + // (this.openRate * 100).toFixed(2) + this.utilizationRate.push((this.OpenCloseList[i].utilizationRate*100).toFixed(2)) + this.openLong.push(this.OpenCloseList[i].openLong) + this.closeLong.push(this.OpenCloseList[i].closeLong) + } + compAnalBarOption1.xAxis[0].data = this.equipmentList + compAnalBarOption1.series[0].data = this.openRate + compAnalBarOption1.series[1].data = this.utilizationRate + compAnalBarOption2.xAxis[0].data = this.equipmentList + compAnalBarOption2.series[0].data = this.openLong + compAnalBarOption2.series[1].data = this.closeLong + compAnalBar1.setOption(compAnalBarOption1); + compAnalBar2.setOption(compAnalBarOption2); + }else{ + compAnalBar1.setOption(compAnalBarOption1); + compAnalBar2.setOption(compAnalBarOption2); + } + window.addEventListener('resize', function() { + compAnalBar1.resize() + compAnalBar2.resize() + }) + } + } + } +</script> + +<style scoped> + +</style> \ No newline at end of file diff --git a/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysisGauge.vue b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysisGauge.vue new file mode 100644 index 0000000..1fa304c --- /dev/null +++ b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysisGauge.vue @@ -0,0 +1,836 @@ +<template> + <div class="comparative_Gauge" style="width: 100%;height: 700px;display: flex;flex-direction: column;overflow: scroll"> + <div style="flex: 1;text-align:center;display: flex;flex-direction: column"> + <h3 style="height: 18px;margin: 0 auto;">鍒╃敤鐜� Top 5</h3> + + <div style="flex: 1;display: flex;"> + <div id="top1Gauge" class="div-inline"></div> + <div id="top2Gauge" class="div-inline"></div> + <div id="top3Gauge" class="div-inline"></div> + <div id="top4Gauge" class="div-inline"></div> + <div id="top5Gauge" class="div-inline"></div> + </div> + </div> + <div style="flex: 1;text-align:center;display: flex;flex-direction: column"> + <h3 style="height: 18px; margin: 0 auto;">鍒╃敤鐜� Last 5</h3> + + <div style="flex: 1;display: flex;"> + <div id="last1Gauge" class="div-inline"></div> + <div id="last2Gauge" class="div-inline"></div> + <div id="last3Gauge" class="div-inline"></div> + <div id="last4Gauge" class="div-inline"></div> + <div id="last5Gauge" class="div-inline"></div> + </div> + </div> + </div> +</template> + +<script> + import * as echarts from 'echarts' + export default { + name: 'comparativeAnalysisGauge', + props:{dataList:''}, + data(){ + return{ + utilizationRateTopOne:0, + utilizationRateTopOneEquipment:0, + utilizationRateTopTwo:0, + utilizationRateTopTwoEquipment:0, + utilizationRateTopThree:0, + utilizationRateTopThreeEquipment:0, + utilizationRateTopFour:0, + utilizationRateTopFourEquipment:0, + utilizationRateTopFive:0, + utilizationRateTopFiveEquipment:0, + utilizationRateLastOne:0, + utilizationRateLastOneEquipment:0, + utilizationRateLastTwo:0, + utilizationRateLastTwoEquipment:0, + utilizationRateLastThree:0, + utilizationRateLastThreeEquipment:0, + utilizationRateLastFour:0, + utilizationRateLastFourEquipment:0, + utilizationRateLastFive:0, + utilizationRateLastFiveEquipment:0, + TopLastList:[] + } + }, + watch:{ + dataList(val){ + console.log(val); + this.TopLastList = val + this.draw() + }, + }, + mounted(){ + this.draw(); + }, + methods:{ + draw(){ + let gaugeTopChart1 = this.$echarts.init(document.getElementById('top1Gauge'),'macarons'); + let gaugeTopChart2 = this.$echarts.init(document.getElementById('top2Gauge'),'macarons'); + let gaugeTopChart3 = this.$echarts.init(document.getElementById('top3Gauge'),'macarons'); + let gaugeTopChart4 = this.$echarts.init(document.getElementById('top4Gauge'),'macarons'); + let gaugeTopChart5 = this.$echarts.init(document.getElementById('top5Gauge'),'macarons'); + let gaugeLastChart1 = this.$echarts.init(document.getElementById('last1Gauge'),'macarons'); + let gaugeLastChart2 = this.$echarts.init(document.getElementById('last2Gauge'),'macarons'); + let gaugeLastChart3 = this.$echarts.init(document.getElementById('last3Gauge'),'macarons'); + let gaugeLastChart4 = this.$echarts.init(document.getElementById('last4Gauge'),'macarons'); + let gaugeLastChart5 = this.$echarts.init(document.getElementById('last5Gauge'),'macarons'); + let gaugeTopOption1 = { + title : { + x : 'center', + y : 'bottom', + text : 'TOP1' + }, + tooltip : { + formatter: "{a} <br/>{b} : {c}%" + }, + series : [ + { + name:'TOP1', + type:'gauge', + splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5 + axisLine: { // 鍧愭爣杞寸嚎 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']], + width: 8 + } + }, + axisTick: { // 鍧愭爣杞村皬鏍囪 + splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈� + length :12, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: 'auto' + } + }, + axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto' + } + }, + splitLine: { // 鍒嗛殧绾� + show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁 + length :30, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮� + color: 'auto' + } + }, + pointer : { + width : 5 + }, + title : { + show : false, + offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + fontWeight: 'bolder' + } + }, + detail : { + formatter:'{value}%', + offsetCenter: [0, '60%'], + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto', + fontWeight: 'bolder', + fontSize:20 + } + }, + data:[{value: 0, name: '鍒╃敤鐜�'}] + } + ] + }; + let gaugeTopOption2 = { + title : { + x : 'center', + y : 'bottom', + text : 'TOP2' + }, + tooltip : { + formatter: "{a} <br/>{b} : {c}%" + }, + series : [ + { + name:'TOP2', + type:'gauge', + splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5 + axisLine: { // 鍧愭爣杞寸嚎 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']], + width: 8 + } + }, + axisTick: { // 鍧愭爣杞村皬鏍囪 + splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈� + length :12, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: 'auto' + } + }, + axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto' + } + }, + splitLine: { // 鍒嗛殧绾� + show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁 + length :30, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮� + color: 'auto' + } + }, + pointer : { + width : 5 + }, + title : { + show : false, + offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + fontWeight: 'bolder' + } + }, + detail : { + formatter:'{value}%', + offsetCenter: [0, '60%'], + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto', + fontWeight: 'bolder', + fontSize:20 + } + }, + data:[{value: 0, name: '鍒╃敤鐜�'}] + } + ] + }; + let gaugeTopOption3 = { + title : { + x : 'center', + y : 'bottom', + text : 'TOP3' + }, + tooltip : { + formatter: "{a} <br/>{b} : {c}%" + }, + series : [ + { + name:'TOP3', + type:'gauge', + splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5 + axisLine: { // 鍧愭爣杞寸嚎 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']], + width: 8 + } + }, + axisTick: { // 鍧愭爣杞村皬鏍囪 + splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈� + length :12, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: 'auto' + } + }, + axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto' + } + }, + splitLine: { // 鍒嗛殧绾� + show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁 + length :30, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮� + color: 'auto' + } + }, + pointer : { + width : 5 + }, + title : { + show : false, + offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + fontWeight: 'bolder' + } + }, + detail : { + formatter:'{value}%', + offsetCenter: [0, '60%'], + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto', + fontWeight: 'bolder', + fontSize:20 + } + }, + data:[{value: 0, name: '鍒╃敤鐜�'}] + } + ] + }; + let gaugeTopOption4 = { + title : { + x : 'center', + y : 'bottom', + text : 'TOP4' + }, + tooltip : { + formatter: "{a} <br/>{b} : {c}%" + }, + series : [ + { + name:'TOP4', + type:'gauge', + splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5 + axisLine: { // 鍧愭爣杞寸嚎 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']], + width: 8 + } + }, + axisTick: { // 鍧愭爣杞村皬鏍囪 + splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈� + length :12, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: 'auto' + } + }, + axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto' + } + }, + splitLine: { // 鍒嗛殧绾� + show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁 + length :30, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮� + color: 'auto' + } + }, + pointer : { + width : 5 + }, + title : { + show : false, + offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + fontWeight: 'bolder' + } + }, + detail : { + formatter:'{value}%', + offsetCenter: [0, '60%'], + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto', + fontWeight: 'bolder', + fontSize:20 + } + }, + data:[{value: 0, name: '鍒╃敤鐜�'}] + } + ] + }; + let gaugeTopOption5 = { + title : { + x : 'center', + y : 'bottom', + text : 'TOP5' + }, + tooltip : { + formatter: "{a} <br/>{b} : {c}%" + }, + series : [ + { + name:'TOP5', + type:'gauge', + splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5 + axisLine: { // 鍧愭爣杞寸嚎 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']], + width: 8 + } + }, + axisTick: { // 鍧愭爣杞村皬鏍囪 + splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈� + length :12, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: 'auto' + } + }, + axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto' + } + }, + splitLine: { // 鍒嗛殧绾� + show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁 + length :30, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮� + color: 'auto' + } + }, + pointer : { + width : 5 + }, + title : { + show : false, + offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + fontWeight: 'bolder' + } + }, + detail : { + formatter:'{value}%', + offsetCenter: [0, '60%'], + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto', + fontWeight: 'bolder', + fontSize:20 + } + }, + data:[{value: 0, name: '鍒╃敤鐜�'}] + } + ] + }; + let gaugeLessOption1 = { + title : { + x : 'center', + y : 'bottom', + text : 'LAST1' + }, + tooltip : { + formatter: "{a} <br/>{b} : {c}%" + }, + series : [ + { + name:'LAST1', + type:'gauge', + splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5 + axisLine: { // 鍧愭爣杞寸嚎 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']], + width: 8 + } + }, + axisTick: { // 鍧愭爣杞村皬鏍囪 + splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈� + length :12, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: 'auto' + } + }, + axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto' + } + }, + splitLine: { // 鍒嗛殧绾� + show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁 + length :30, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮� + color: 'auto' + } + }, + pointer : { + width : 5 + }, + title : { + show : false, + offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + fontWeight: 'bolder' + } + }, + detail : { + formatter:'{value}%', + offsetCenter: [0, '60%'], + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto', + fontWeight: 'bolder', + fontSize:20 + } + }, + data:[{value: 0, name: '鍒╃敤鐜�'}] + } + ] + }; + let gaugeLessOption2 = { + title : { + x : 'center', + y : 'bottom', + text : 'LAST2' + }, + tooltip : { + formatter: "{a} <br/>{b} : {c}%" + }, + series : [ + { + name:'LAST2', + type:'gauge', + splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5 + axisLine: { // 鍧愭爣杞寸嚎 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']], + width: 8 + } + }, + axisTick: { // 鍧愭爣杞村皬鏍囪 + splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈� + length :12, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: 'auto' + } + }, + axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto' + } + }, + splitLine: { // 鍒嗛殧绾� + show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁 + length :30, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮� + color: 'auto' + } + }, + pointer : { + width : 5 + }, + title : { + show : false, + offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + fontWeight: 'bolder' + } + }, + detail : { + formatter:'{value}%', + offsetCenter: [0, '60%'], + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto', + fontWeight: 'bolder', + fontSize:20 + } + }, + data:[{value: 0, name: '鍒╃敤鐜�'}] + } + ] + }; + let gaugeLessOption3 = { + title : { + x : 'center', + y : 'bottom', + text : 'LAST3' + }, + tooltip : { + formatter: "{a} <br/>{b} : {c}%" + }, + series : [ + { + name:'LAST3', + type:'gauge', + splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5 + axisLine: { // 鍧愭爣杞寸嚎 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']], + width: 8 + } + }, + axisTick: { // 鍧愭爣杞村皬鏍囪 + splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈� + length :12, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: 'auto' + } + }, + axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto' + } + }, + splitLine: { // 鍒嗛殧绾� + show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁 + length :30, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮� + color: 'auto' + } + }, + pointer : { + width : 5 + }, + title : { + show : false, + offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + fontWeight: 'bolder' + } + }, + detail : { + formatter:'{value}%', + offsetCenter: [0, '60%'], + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto', + fontWeight: 'bolder', + fontSize:20 + } + }, + data:[{value: 0, name: '鍒╃敤鐜�'}] + } + ] + }; + let gaugeLessOption4 = { + title : { + x : 'center', + y : 'bottom', + text : 'LAST4' + }, + tooltip : { + formatter: "{a} <br/>{b} : {c}%" + }, + series : [ + { + name:'LAST4', + type:'gauge', + splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5 + axisLine: { // 鍧愭爣杞寸嚎 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']], + width: 8 + } + }, + axisTick: { // 鍧愭爣杞村皬鏍囪 + splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈� + length :12, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: 'auto' + } + }, + axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto' + } + }, + splitLine: { // 鍒嗛殧绾� + show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁 + length :30, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮� + color: 'auto' + } + }, + pointer : { + width : 5 + }, + title : { + show : false, + offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + fontWeight: 'bolder' + } + }, + detail : { + formatter:'{value}%', + offsetCenter: [0, '60%'], + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto', + fontWeight: 'bolder', + fontSize:20 + } + }, + data:[{value: 0, name: '鍒╃敤鐜�'}] + } + ] + }; + let gaugeLessOption5 = { + title : { + x : 'center', + y : 'bottom', + text : 'LAST5' + }, + tooltip : { + formatter: "{a} <br/>{b} : {c}%" + }, + series : [ + { + name:'LAST5', + type:'gauge', + splitNumber: 10, // 鍒嗗壊娈垫暟锛岄粯璁や负5 + axisLine: { // 鍧愭爣杞寸嚎 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']], + width: 8 + } + }, + axisTick: { // 鍧愭爣杞村皬鏍囪 + splitNumber: 10, // 姣忎唤split缁嗗垎澶氬皯娈� + length :12, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡 + color: 'auto' + } + }, + axisLabel: { // 鍧愭爣杞存枃鏈爣绛撅紝璇﹁axis.axisLabel + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto' + } + }, + splitLine: { // 鍒嗛殧绾� + show: true, // 榛樿鏄剧ず锛屽睘鎬how鎺у埗鏄剧ず涓庡惁 + length :30, // 灞炴�ength鎺у埗绾块暱 + lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮� + color: 'auto' + } + }, + pointer : { + width : 5 + }, + title : { + show : false, + offsetCenter: [0, '-40%'], // x, y锛屽崟浣峱x + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + fontWeight: 'bolder' + } + }, + detail : { + formatter:'{value}%', + offsetCenter: [0, '60%'], + textStyle: { // 鍏朵綑灞炴�ч粯璁や娇鐢ㄥ叏灞�鏂囨湰鏍峰紡锛岃瑙乀EXTSTYLE + color: 'auto', + fontWeight: 'bolder', + fontSize:20 + } + }, + data:[{value: 0, name: '鍒╃敤鐜�'}] + } + ] + }; + if(this.TopLastList != null){ + this.utilizationRateTopOne=0 + this.utilizationRateTopOneEquipment = 'TOP1' + this.utilizationRateTopTwo=0 + this.utilizationRateTopTwoEquipment = 'TOP2' + this.utilizationRateTopThree=0 + this.utilizationRateTopThreeEquipment = 'TOP3' + this.utilizationRateTopFour =0 + this.utilizationRateTopFourEquipment = 'TOP4' + this.utilizationRateTopFive=0 + this.utilizationRateTopFiveEquipment = 'TOP5' + this.utilizationRateLastOne=0 + this.utilizationRateLastOneEquipment = 'LAST1' + this.utilizationRateLastTwo=0 + this.utilizationRateLastTwoEquipment = 'LAST2' + this.utilizationRateLastThree=0 + this.utilizationRateLastThreeEquipment = 'LAST3' + this.utilizationRateLastFour=0 + this.utilizationRateLastFourEquipment = 'LAST4' + this.utilizationRateLastFive=0 + this.utilizationRateLastFiveEquipment = 'LAST5' + if(this.TopLastList.tops){ + for(var i = 0;i<this.TopLastList.tops.length;i++){ + if(i == 0){ + this.utilizationRateTopOneEquipment=this.TopLastList.tops[0].equipmentId + this.utilizationRateTopOne=this.TopLastList.tops[0].utilizationRate + }else if(i == 1){ + this.utilizationRateTopTwoEquipment=this.TopLastList.tops[1].equipmentId + this.utilizationRateTopTwo=this.TopLastList.tops[1].utilizationRate + }else if(i == 2){ + this.utilizationRateTopThreeEquipment=this.TopLastList.tops[2].equipmentId + this.utilizationRateTopThree=this.TopLastList.tops[2].utilizationRate + }else if(i == 3){ + this.utilizationRateTopFourEquipment=this.TopLastList.tops[3].equipmentId + this.utilizationRateTopFour=this.TopLastList.tops[3].utilizationRate + }else if(i == 4){ + this.utilizationRateTopFiveEquipment=this.TopLastList.tops[4].equipmentId + this.utilizationRateTopFive=this.TopLastList.tops[4].utilizationRate + } + } + } + if(this.TopLastList.lasts){ + for(var j = 0;j<this.TopLastList.lasts.length;j++){ + if(j == 0){ + this.utilizationRateLastOneEquipment=this.TopLastList.lasts[0].equipmentId + this.utilizationRateLastOne=this.TopLastList.lasts[0].utilizationRate + }else if(j == 1){ + this.utilizationRateLastTwoEquipment=this.TopLastList.lasts[1].equipmentId + this.utilizationRateLastTwo=this.TopLastList.lasts[1].utilizationRate + }else if(j == 2){ + this.utilizationRateLastThreeEquipment=this.TopLastList.lasts[2].equipmentId + this.utilizationRateLastThree=this.TopLastList.lasts[2].utilizationRate + }else if(j == 3){ + this.utilizationRateLastFourEquipment=this.TopLastList.lasts[3].equipmentId + this.utilizationRateLastFour=this.TopLastList.lasts[3].utilizationRate + }else if(j == 4){ + this.utilizationRateLastFiveEquipment=this.TopLastList.lasts[4].equipmentId + this.utilizationRateLastFive=this.TopLastList.lasts[4].utilizationRate + } + } + } + gaugeTopOption1.title.text = this.utilizationRateTopOneEquipment + gaugeTopOption1.series[0].data = [{value : (this.utilizationRateTopOne * 100).toFixed(2), name : '鍒╃敤鐜�'}]; + gaugeTopOption2.title.text = this.utilizationRateTopTwoEquipment + gaugeTopOption2.series[0].data = [{value : (this.utilizationRateTopTwo * 100).toFixed(2), name : '鍒╃敤鐜�'}]; + gaugeTopOption3.title.text = this.utilizationRateTopThreeEquipment + gaugeTopOption3.series[0].data = [{value : (this.utilizationRateTopThree * 100).toFixed(2), name : '鍒╃敤鐜�'}]; + gaugeTopOption4.title.text = this.utilizationRateTopFourEquipment + gaugeTopOption4.series[0].data = [{value : (this.utilizationRateTopFour * 100).toFixed(2), name : '鍒╃敤鐜�'}]; + gaugeTopOption5.title.text = this.utilizationRateTopFiveEquipment + gaugeTopOption5.series[0].data = [{value : (this.utilizationRateTopFive * 100).toFixed(2), name : '鍒╃敤鐜�'}]; + + gaugeLessOption1.title.text = this.utilizationRateLastOneEquipment + gaugeLessOption1.series[0].data = [{value : (this.utilizationRateLastOne * 100).toFixed(2), name : '鍒╃敤鐜�'}]; + gaugeLessOption2.title.text = this.utilizationRateLastTwoEquipment + gaugeLessOption2.series[0].data = [{value : (this.utilizationRateLastTwo * 100).toFixed(2), name : '鍒╃敤鐜�'}]; + gaugeLessOption3.title.text = this.utilizationRateLastThreeEquipment + gaugeLessOption3.series[0].data = [{value : (this.utilizationRateLastThree * 100).toFixed(2), name : '鍒╃敤鐜�'}]; + gaugeLessOption4.title.text = this.utilizationRateLastFourEquipment + gaugeLessOption4.series[0].data = [{value : (this.utilizationRateLastFour * 100).toFixed(2), name : '鍒╃敤鐜�'}]; + gaugeLessOption5.title.text = this.utilizationRateLastFiveEquipment + gaugeLessOption5.series[0].data = [{value : (this.utilizationRateLastFive * 100).toFixed(2), name : '鍒╃敤鐜�'}]; + gaugeTopChart1.setOption(gaugeTopOption1); + gaugeTopChart2.setOption(gaugeTopOption2); + gaugeTopChart3.setOption(gaugeTopOption3); + gaugeTopChart4.setOption(gaugeTopOption4); + gaugeTopChart5.setOption(gaugeTopOption5); + gaugeLastChart1.setOption(gaugeLessOption1); + gaugeLastChart2.setOption(gaugeLessOption2); + gaugeLastChart3.setOption(gaugeLessOption3); + gaugeLastChart4.setOption(gaugeLessOption4); + gaugeLastChart5.setOption(gaugeLessOption5); + }else{ + gaugeTopChart1.setOption(gaugeTopOption1); + gaugeTopChart2.setOption(gaugeTopOption2); + gaugeTopChart3.setOption(gaugeTopOption3); + gaugeTopChart4.setOption(gaugeTopOption4); + gaugeTopChart5.setOption(gaugeTopOption5); + gaugeLastChart1.setOption(gaugeLessOption1); + gaugeLastChart2.setOption(gaugeLessOption2); + gaugeLastChart3.setOption(gaugeLessOption3); + gaugeLastChart4.setOption(gaugeLessOption4); + gaugeLastChart5.setOption(gaugeLessOption5); + } + gaugeTopChart1.setOption(gaugeTopOption1); + gaugeTopChart2.setOption(gaugeTopOption2); + gaugeTopChart3.setOption(gaugeTopOption3); + gaugeTopChart4.setOption(gaugeTopOption4); + gaugeTopChart5.setOption(gaugeTopOption5); + gaugeLastChart1.setOption(gaugeLessOption1); + gaugeLastChart2.setOption(gaugeLessOption2); + gaugeLastChart3.setOption(gaugeLessOption3); + gaugeLastChart4.setOption(gaugeLessOption4); + gaugeLastChart5.setOption(gaugeLessOption5); + window.addEventListener('resize', function() { + gaugeTopChart1.resize() + gaugeTopChart2.resize() + gaugeTopChart3.resize() + gaugeTopChart4.resize() + gaugeTopChart5.resize() + gaugeLastChart1.resize() + gaugeLastChart2.resize() + gaugeLastChart3.resize() + gaugeLastChart4.resize() + gaugeLastChart5.resize() + }) + } + + } + } +</script> + +<style scoped> + .div-inline{ + flex: 1; + } +</style> \ No newline at end of file diff --git a/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue new file mode 100644 index 0000000..a948d79 --- /dev/null +++ b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue @@ -0,0 +1,458 @@ +<template> + <a-card :bordered="false" class="device_list"> + <div class="com_box"> + <!-- 鏌ヨ鍖哄煙 --> + <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="椹卞姩绫诲瀷"> + <j-dict-select-tag placeholder="璇烽�夋嫨椹卞姩绫诲瀷" + :triggerChange="true" dictCode="mdc_driveType" + v-model="queryParam.driveType" allow-clear/> + </a-form-item> + </a-col> + <a-col :md="9" :sm="9" :xs="4"> + <a-form-item label="鏃堕棿"> + <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/> + </a-form-item> + </a-col> + <a-col :md="2" :sm="3" :xs="3"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </a-col> + <a-col :md="2" :sm="2" :xs="2"> + <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> + </a-col> + </a-row> + </a-form> + </div> + <!-- table鍖哄煙-begin --> + <div id="DeviceList"> + <a-tabs :activeKey="activeKey" @change="tabChange" tabPosition="top"> + <a-tab-pane key="1" tab="鍥惧舰"> + <comparative-analysis-bar ref="AnalysisBar" :dataList='AnalysisBarList'></comparative-analysis-bar> + </a-tab-pane> + <a-tab-pane key="2" tab="浠〃" forceRender> + <comparative-analysis-gauge ref="AnalysisGauge" :dataList="AnalysisGauge"></comparative-analysis-gauge> + </a-tab-pane> + <a-tab-pane key="3" tab="楗煎浘" forceRender> + <conparative-analysis-pie ref="AnalysisPie" :dataList="AnalysisPie"></conparative-analysis-pie> + </a-tab-pane> + </a-tabs> + </div> + <!-- table鍖哄煙-end --> + </div> + </a-card> +</template> + +<script> + import moment from 'moment' + import $ from 'jquery' + import JDictSelectTag from '@/components/dict/JDictSelectTag' + import JDate from '../../../../../components/jeecg/JDate' + import { + requestPut, + deleteAction, + getAction + } from '@/api/manage' + import comparativeAnalysisBar from './comparativeAnalysisBar' + import comparativeAnalysisGauge from'./comparativeAnalysisGauge' + import conparativeAnalysisPie from './conparativeAnalysisPie' + import '@/components/table2excel/table2excel' + import JInput from '@/components/jeecg/JInput' + import JEllipsis from '@/components/jeecg/JEllipsis' + import Tooltip from 'ant-design-vue/es/tooltip' + import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + export default { + name: 'comparativeAnalysismain', + // mixins: [JeecgListMixin], + components: { + Tooltip, + comparativeAnalysisBar, + comparativeAnalysisGauge, + conparativeAnalysisPie, + JDictSelectTag, + JInput, + JDate, + JEllipsis + }, + props: { nodeTree: '', Type:'',nodePeople: '' }, + data() { + return { + activeKey: '1', + typeTree:"", + typeParent:1, + typeEquipment:1, + AnalysisBarList:[], + AnalysisGauge:[], + AnalysisPie:[], + dates: [], + xianshi:"", + readOnly:true, + queryParam: {}, + queryParams:{}, + queryParamEquip:{}, + queryParamPeople:{}, + dataStartsoucre:[], + url: { + comparativeAnalysis:'/mdc/efficiencyReport/comparativeAnalysis' + }, + AnalysisList:{} + } + }, + watch:{ + Type(valmath){ + this.dataList = []; + this.queryParams.typeTree = valmath + // console.log(this.queryParams.typeTree) + }, + nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + if (JSON.stringify(val) != '{}') { + if (val.equipmentId) { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = "" + this.queryParams.equipmentId = val.equipmentId + this.queryParamEquip.equipmentId = val.equipmentId + } else { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = val.key + this.queryParams.equipmentId = '' + } + this.searchQuery() + + } + }, + nodePeople(val){ + + if (JSON.stringify(val) != '{}') { + if (val.equipmentId) { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = "" + this.queryParams.equipmentId = val.equipmentId + this.queryParamEquip.equipmentId = val.equipmentId + } else { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = val.key + this.queryParams.equipmentId = '' + } + this.searchQuery() + } + } + }, + methods: { + 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) { + 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) + } + }).finally(() => { + this.loading = false + }) + }, + 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 = [] + this.AnalysisGauge = [] + this.AnalysisPie = [] + 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 + } + } + getAction(this.url.comparativeAnalysis,this.queryParams).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.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 + } + } + getAction(this.url.comparativeAnalysis,this.queryParams).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 + }) + } + + }, + // 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 + // }) + // }, + }, + created() { + this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)] + this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') + this.queryParam.typeTree = "1"; + this.loadAnalysis(); + } + } +</script> + +<style lang="less" scoped> + /*@import '~@assets/less/common.less';*/ + + @media screen and (min-width: 1920px){ + .device_list{ + height: 811px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1680px) and (max-width: 1920px){ + .device_list{ + height: 811px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1400px) and (max-width: 1680px){ + .device_list{ + height: 663px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1280px) and (max-width: 1400px){ + .device_list{ + height: 564px!important; + overflow: scroll; + } + } + @media screen and (max-width: 1280px){ + .device_list{ + height: 564px!important; + overflow: scroll; + } + } + /*.device_list{*/ + /*display: flex;*/ + /*}*/ + /*.device_list .table-page-search-wrapper{*/ + /**/ + /*}*/ + /deep/ .ant-card-body{ + height: 100%!important; + } + .device_list .com_box{ + display: flex!important; + height: 100%!important; + flex-direction: column!important; + } + .device_list .table-page-search-wrapper{ + height: 6%!important; + } + .device_list #DeviceList{ + height: 90%!important; + } +</style> diff --git a/src/views/mdc/base/modules/comparativeAnalysis/conparativeAnalysisPie.vue b/src/views/mdc/base/modules/comparativeAnalysis/conparativeAnalysisPie.vue new file mode 100644 index 0000000..70872cb --- /dev/null +++ b/src/views/mdc/base/modules/comparativeAnalysis/conparativeAnalysisPie.vue @@ -0,0 +1,153 @@ +<template> + <div class="comparative_pie" style="width: 100%;height: 600px;display: flex;overflow: scroll"> + <div id="compAnalPie1" style="flex: 1;"></div> + <div id="compAnalPie2" style="flex: 1;"></div> + </div> +</template> + +<script> + import * as echarts from 'echarts' + export default { + name: 'conparativeAnalysisPie', + props:{ dataList:''}, + data(){ + return{ + closeRate:0, + openRate:0, + usedRate:0, + waitRate:0, + RateList:[] + } + }, + created(){ + + }, + watch:{ + dataList(val){ + this.RateList = val + console.log(val) + this.drawTu() + }, + }, + mounted() { + this.drawTu() + }, + methods:{ + drawTu(){ + let pieCompChart1 = this.$echarts.init(document.getElementById('compAnalPie1'),'macarons'); + let pieCompChart2 = this.$echarts.init(document.getElementById('compAnalPie2'),'macarons'); + let pieCompChartOption1 = { + title: { + x: 'center', + subtext: '寮�鏈烘晥鐜�' + }, + tooltip: { + trigger: 'item', + formatter: "{a} <br/>{b} : {c} ({d}%)" + }, + legend: { + orient: 'vertical', + x: 'left', + y: 'bottom', + data: ['寮�鏈虹巼', '鍏虫満鐜�'] + }, + calculable: true, + series: [{ + name: '寮�鏈烘晥鐜�', + type: 'pie', + radius: '70%', + center: ['55%', '55%'], + itemStyle: { + normal: { + color: function (params) { + var colorList = ['#4169E1', '#A8A8A8']; + return colorList[params.dataIndex] + }, + label: { + show: true, + position: 'top', + formatter: '{b}\n{c}' + } + } + }, + data: [{value: 0, name: '寮�鏈虹巼'}, + {value: 0, name: '鍏虫満鐜�'}] + }] + }; + let pieCompChartOption2 = { + title: { + x: 'center', + subtext: '杩愯鏁堢巼' + }, + tooltip: { + trigger: 'item', + formatter: "{a} <br/>{b} : {c} ({d}%)" + }, + legend: { + orient: 'vertical', + x: 'left', + y: 'bottom', + data: ['鍔犲伐鐜�', '寰呮満鐜�', '鍏虫満鐜�'] + }, + calculable: true, + series: [{ + name: '杩愯鏁堢巼', + type: 'pie', + radius: '70%', + center: ['55%', '55%'], + itemStyle: { + normal: { + color: function (params) { + var colorList = ['#00ee00', '#FCCE10', '#A8A8A8']; + return colorList[params.dataIndex] + }, + label: { + show: true, + position: 'top', + formatter: '{b}\n{c}' + } + } + }, + data: [{value: 0, name: '鍔犲伐鐜�'}, + {value: 0, name: '寰呮満鐜�'}, + {value: 0, name: '鍏虫満鐜�'}] + }] + }; + if(this.RateList != null){ + this.closeRate =[] + this.openRate =[] + this.usedRate = [] + this.waitRate = [] + if(this.RateList.length>0){ + this.closeRate=this.RateList[0].closeRate + this.openRate=this.RateList[0].openRate + this.usedRate=this.RateList[0].processRate + this.waitRate=this.RateList[0].waitRate + pieCompChartOption1.series[0].data = [{value:(this.openRate * 100).toFixed(2), name:'寮�鏈虹巼'},{value:(this.closeRate * 100).toFixed(2), name:'鍏虫満鐜�'}]; + pieCompChartOption2.series[0].data = [{value:(this.usedRate * 100).toFixed(2), name:'鍔犲伐鐜�'},{value:(this.waitRate * 100).toFixed(2), name:'寰呮満鐜�'},{value:(this.closeRate * 100).toFixed(2), name:'鍏虫満鐜�'}]; + pieCompChart1.setOption(pieCompChartOption1); + pieCompChart2.setOption(pieCompChartOption2); + }else{ + pieCompChart1.setOption(pieCompChartOption1); + pieCompChart2.setOption(pieCompChartOption2); + } + + }else{ + pieCompChart1.setOption(pieCompChartOption1); + pieCompChart2.setOption(pieCompChartOption2); + } + + pieCompChart1.setOption(pieCompChartOption1); + pieCompChart2.setOption(pieCompChartOption2); + window.addEventListener('resize', function() { + pieCompChart1.resize() + pieCompChart2.resize() + }) + } + } + } +</script> + +<style scoped> + +</style> \ No newline at end of file diff --git a/src/views/mdc/base/modules/deviceBaseInfo/EquipmentLayout.vue b/src/views/mdc/base/modules/deviceBaseInfo/EquipmentLayout.vue index bca1e3b..b7d8c93 100644 --- a/src/views/mdc/base/modules/deviceBaseInfo/EquipmentLayout.vue +++ b/src/views/mdc/base/modules/deviceBaseInfo/EquipmentLayout.vue @@ -7,12 +7,12 @@ <div class="content_equipment" @click="openDetail(item)"> <div class="equipment_box"> <div> - <img class="orange" :style="'background-image:url('+ getBackgroundUrl(item.oporation) +')'" :src="getImgUrl(item.equipmentTypePictures)"> + <img style="width: 11%;" :src="getStatusImgUrl(item.oporation)" alt=""> + <img class="orange" :src="getImgUrl(item.equipmentTypePictures)"> </div> </div> </div> <p style="margin-top: 5px;"> - <!--<span ref="message">{{item.equipmentName}}</span>--> <span ref="message">{{item.equipmentName}}({{item.equipmentId}})</span> </p> </div> @@ -55,12 +55,31 @@ } 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"); + } + }, getBackgroundUrl(imgurl){ return require("../../../../../assets/"+imgurl+".gif"); }, openDetail(item) { if(item.oporation == 0){ - this.$message.warn("璁惧澶勪簬鍏虫満鐘舵�侊紒"); + // this.$message.warn("璁惧澶勪簬鍏虫満鐘舵�侊紒"); + this.$notification.warning({ + message:'娑堟伅', + description:"璁惧澶勪簬鍏虫満鐘舵�侊紒" + }); return false; } console.log(item); @@ -156,10 +175,10 @@ padding-top: 5%; } - .container_content .contnet img { - padding: 5%; - } - + /*.container_content .contnet img {*/ + /*padding: 5%;*/ + /*}*/ + /**/ .addclass { /*float: left;*/ /*position: absolute;*/ diff --git a/src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue b/src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue index fb27e33..e3506f2 100644 --- a/src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue +++ b/src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue @@ -225,6 +225,7 @@ <a-descriptions title="杩愯鏁版嵁" + v-show="mdcDriveTypeParamConfigList != null" v-if="driverType != 'PLC'" :column="4" > @@ -237,17 +238,18 @@ </a-descriptions> - <a-descriptions - title="鍧愭爣淇℃伅" - v-if="driverType != 'PLC'" - :column="4" - > - <a-descriptions-item - v-for="(item,id) in xyzAliasesList " - :key="item.id" - :label="item.title" - >{{item.value}}</a-descriptions-item> - </a-descriptions> + <!--<a-descriptions--> + <!--title="鍧愭爣淇℃伅"--> + <!--v-show="xyzAliasesList != null"--> + <!--v-if="driverType != 'PLC'"--> + <!--:column="4"--> + <!-->--> + <!--<a-descriptions-item--> + <!--v-for="(item,id) in xyzAliasesList "--> + <!--:key="item.id"--> + <!--:label="item.title"--> + <!-->{{item.value}}</a-descriptions-item>--> + <!--</a-descriptions>--> <a-descriptions title="鐗堟湰淇℃伅 for lsv2" @@ -1378,7 +1380,6 @@ getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => { if (res.success) { _this.resultData = res.result - console.log(_this.resultData) _this.driverType = res.result.deviceType _this.spindlebeilv = res.result.spindlebeilv _this.feedbeilv = res.result.feedbeilv @@ -1391,7 +1392,11 @@ }) // _this.initDeviceType(_this.resultData.deviceType) } else { - _this.$message.warn(res.message) + // _this.$message.warn(res.message) + _this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAdd.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAdd.vue index d89b2b2..ff78e6b 100644 --- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAdd.vue +++ b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAdd.vue @@ -256,7 +256,11 @@ this.treeDataSource = res.result this.generateList(res.result) } else { - this.$message.warn(res.message) + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -344,7 +348,11 @@ } let ids = entity.id if (!ids) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + this.$notification.warning({ + message:'娑堟伅', + description:'璇烽�夋嫨涓�鏉¤褰�' + }); return } else { var that = this @@ -355,10 +363,18 @@ that.loading = true deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.queryTreeData(); } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue index 3f64575..6f62998 100644 --- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue +++ b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue @@ -216,10 +216,18 @@ let formData = Object.assign(this.model, values) postAction(this.url.settingCalendar, formData).then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddTree.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddTree.vue index 2d6e8f6..fb238f0 100644 --- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddTree.vue +++ b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddTree.vue @@ -104,7 +104,11 @@ this.treeDataSource = res.result this.generateList(res.result) } else { - this.$message.warn(res.message) + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -189,16 +193,23 @@ lastpermissionIds:that.defaultCheckedKeys.join(","), }; that.loading = true; - console.log("璇锋眰鍙傛暟锛�",params); saveRolePermission(params).then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loading = false; if (exit) { that.close() } }else { - that.$message.error(res.message); + // that.$message.error(res.message); + that.$notification.error({ + message:'娑堟伅', + description:res.message + }); that.loading = false; if (exit) { that.close() @@ -215,7 +226,6 @@ this.checkedKeys = [...res.result]; this.defaultCheckedKeys = [...res.result]; this.expandedKeysss = this.allTreeKeys; - console.log(this.defaultCheckedKeys) }) }) } diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue index 9febbda..86d898c 100644 --- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue +++ b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue @@ -7,8 +7,8 @@ <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="6" :sm="6"> - <a-form-item label="閮ㄩ棬" > + <a-col :md="6" :sm="6" v-if="isDepartType == 0"> + <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0"> <!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />--> <a-tree-select v-model="value" @@ -76,6 +76,7 @@ </template> <script> + import {mapActions} from 'vuex' import { ajaxGetSelectItems } from '@/api/api' @@ -113,6 +114,7 @@ }, data() { return { + isDepartType:'', /*readOnly:true,*/ title:'', visible: false, @@ -164,7 +166,7 @@ } }, created() { - + this.queryTreeData() }, watch: { value(value) { @@ -176,6 +178,21 @@ } }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, onSelectChange(selectedRowKeys, selectionRows) { // this.SelectedList.push(selectedRowKeys); this.selectedRowKeys = selectedRowKeys; @@ -187,7 +204,6 @@ // this.onClearSelected() //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 //TODO 绛涢�� - console.log(pagination) if (Object.keys(sorter).length > 0) { this.isorter.column = sorter.field; this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" @@ -236,7 +252,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -277,7 +297,11 @@ if (res.success) { this.treeData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -288,7 +312,11 @@ if (res.success) { this.sectionData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue index 902b674..cb49c1c 100644 --- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue +++ b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue @@ -1,6 +1,6 @@ <template> <div ref="device"> - <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" :getContainer="() => this.$refs.device" + <a-modal :title="title" :width="900" :visible="visible" :confirmLoading="confirmLoading" :getContainer="() => this.$refs.device" :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> <a-spin :spinning="confirmLoading"> <a-form :form="form"> @@ -13,55 +13,9 @@ </a-col> </a-row> <a-row :gutter="24"> - <a-col :span="12"> - <a-form-item label="鐢熸晥鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-date-picker v-decorator="['takeEffectDate',validatorRules.takeEffectDate]" :disabled="disableSubmit" - :readOnly="disableSubmit" :disabledDate="disabledDate"/> - </a-form-item> - </a-col> - <a-col :span="12"> - <a-form-item label="澶辨晥鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-date-picker v-decorator="['invalidDate',validatorRules.invalidDate]" :disabled="disableSubmit" - :readOnly="disableSubmit" :disabledDate="disabledDateEnd"/> - </a-form-item> - </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span='12'> - <a-form-item label="鏄熸湡涓�" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select v-decorator="['monShiftId', validatorRules.monShiftId]" placeholder="璇烽�夋嫨鐝埗" - :allowClear='allowClear' @change="initShiftSubList"> - <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value"> - {{ em.label }} - </a-select-option> - </a-select> - </a-form-item> - </a-col> - <a-col :span="12"> - <a-form-item label="鏄熸湡浜�" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select v-decorator="['tueShiftId', validatorRules.tueShiftId]" placeholder="璇烽�夋嫨鐝埗" - :allowClear='allowClear' @change="initShiftSubList"> - <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value"> - {{ em.label }} - </a-select-option> - </a-select> - </a-form-item> - </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span='12'> - <a-form-item label="鏄熸湡涓�" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select v-decorator="['wedShiftId', validatorRules.wedShiftId]" placeholder="璇烽�夋嫨鐝埗" - :allowClear='allowClear' @change="initShiftSubList"> - <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value"> - {{ em.label }} - </a-select-option> - </a-select> - </a-form-item> - </a-col> - <a-col :span="12"> - <a-form-item label="鏄熸湡鍥�" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select v-decorator="['thuShiftId', validatorRules.thuShiftId]" placeholder="璇烽�夋嫨鐝埗" + <a-col :span="24"> + <a-form-item label="鐝埗" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-select v-decorator="['shiftId', validatorRules.shiftId]" placeholder="璇烽�夋嫨鐝埗" :allowClear='allowClear' @change="initShiftSubList"> <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value"> {{ em.label }} @@ -70,79 +24,23 @@ </a-form-item> </a-col> </a-row> + <a-row :gutter="24"> - <a-col :span='12'> - <a-form-item label="鏄熸湡浜�" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select v-decorator="['friShiftId', validatorRules.friShiftId]" placeholder="璇烽�夋嫨鐝埗" - :allowClear='allowClear' @change="initShiftSubList"> - <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value"> - {{ em.label }} - </a-select-option> - </a-select> - </a-form-item> - </a-col> - <a-col :span="12"> - <a-form-item label="鏄熸湡鍏�" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select v-decorator="['satShiftId', validatorRules.satShiftId]" placeholder="璇烽�夋嫨鐝埗" - :allowClear='allowClear' @change="initShiftSubList"> - <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value"> - {{ em.label }} - </a-select-option> - </a-select> - </a-form-item> + <a-col :span="24"> + <a-form-item label="鐢熸晥鏃堕棿" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <div class="mainBox"> + <Calendar + v-on:choseDay="clickDay" + v-on:changeMonth="changeDate" + v-on:isToday="clickToday" + :markDate = 'shiData' + :agoDayHide = 'value' + ></Calendar> + </div> + + </a-form-item> </a-col> </a-row> - <a-row :gutter="24"> - <a-col :span='12'> - <a-form-item label="鏄熸湡鏃�" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select v-decorator="['sunShiftId', validatorRules.sunShiftId]" placeholder="璇烽�夋嫨鐝埗" - :allowClear='allowClear' @change="initShiftSubList"> - <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value"> - {{ em.label }} - </a-select-option> - </a-select> - </a-form-item> - </a-col> - <a-col :span="12"> - </a-col> - </a-row> - <!--<a-row :gutter="24">--> - <!--<a-col :span="12">--> - <!--<a-form-item label="璁惧" :labelCol="labelCol" :wrapperCol="wrapperCol">--> - <!--<a-input v-decorator="['equmentName',validatorRules.equmentName]" :disabled="true" :readOnly="true"/>--> - <!--</a-form-item>--> - <!--</a-col>--> - <!--<a-col :span="12">--> - <!--<a-form-item label="鏄惁璺ㄥぉ" :labelCol="labelCol" :wrapperCol="wrapperCol">--> - <!--<a-switch v-model="isDaySpan" :disabled="true" checked-children="鏄�" un-checked-children="鍚�"/>--> - <!--</a-form-item>--> - <!--</a-col>--> - <!--</a-row>--> - <!--<a-row :gutter="24">--> - <!--<a-col :span="12">--> - <!--<a-form-item label="寮�濮嬫椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol">--> - <!--<a-input v-decorator="['startDate',validatorRules.startDate]" :disabled="true" :readOnly="true"/>--> - <!--</a-form-item>--> - <!--</a-col>--> - <!--<a-col :span="12">--> - <!--<a-form-item label="缁撴潫鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">--> - <!--<a-input v-decorator="['endDate',validatorRules.endDate]" :disabled="true" :readOnly="true"/>--> - <!--</a-form-item>--> - <!--</a-col>--> - <!--</a-row>--> - <!--<a-row :gutter="24">--> - <!--<a-col :span="12">--> - <!--<a-form-item label="寮�濮嬩紤鎭椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol">--> - <!--<a-input v-decorator="['sleepStartDate',validatorRules.sleepStartDate]" :disabled="true"--> - <!--:readOnly="true"/>--> - <!--</a-form-item>--> - <!--</a-col>--> - <!--<a-col :span="12">--> - <!--<a-form-item label="缁撴潫浼戞伅鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">--> - <!--<a-input v-decorator="['sleepEndDate',validatorRules.sleepEndDate]" :disabled="true" :readOnly="true"/>--> - <!--</a-form-item>--> - <!--</a-col>--> - <!--</a-row>--> </a-form> </a-spin> <device-calend-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-calend-list-model> @@ -163,12 +61,19 @@ duplicateCheck } from '@/api/api' + import Calendar from 'vue-calendar-component'; + export default { name: 'ShiftInfoModel', - components: {DeviceCalendListModel}, + components: {DeviceCalendListModel,Calendar}, props: {}, data() { return { + value:'', + date:'', + week:"", + selectDate: [], + // 褰撳墠鏃ユ湡 allowClear:true, title: '', isDaySpan: false, @@ -219,20 +124,113 @@ url: { add: '/mdc/mdcDeviceCalendar/add', edit: '/mdc/mdcshiftsub/edit', - initShiftList: '/mdc/mdcMdcShift/deleteShift', + initShiftList: '/mdc/mdcMdcShift/initShiftList', initShiftSubList: '/mdc/mdcshiftsub/initShiftSubList', getShiftSubById: '/mdc/mdcshiftsub/getShiftSubById', settingCalendar: '/mdc/mdcDeviceCalendar/add', }, shiftList: [], shiftSubList: [], - disableSubmit: true + disableSubmit: true, + calData:undefined, + shiData:[], + sendDte:[] } }, created() { + this.value = Math.round(new Date().getTime()/1000).toString() + var now = new Date(); + this.date = now.getDate();//寰楀埌鏃ユ湡 + var day = now.getDay();//寰楀埌鍛ㄥ嚑 + var arr_week = new Array("鏄熸湡鏃�", "鏄熸湡涓�", "鏄熸湡浜�", "鏄熸湡涓�", "鏄熸湡鍥�", "鏄熸湡浜�", "鏄熸湡鍏�"); + this.week = arr_week[day]; + this.getWorking() }, methods: { + // clickDay(data) { + // console.log(data); //閫変腑鏌愬ぉ + // }, + changeDate(data) { + // console.log(data); //宸﹀彸鐐瑰嚮鍒囨崲鏈堜唤 + }, + clickToday(data) { + //console.log(data); // 璺冲埌浜嗘湰鏈� + }, + // markChange(){ + // + // }, + getWorking(){//鑾峰彇褰撳墠鏈堝伐浣滄棩 + let myDate = new Date(); + let tY = myDate.getFullYear();//寰楀埌褰撳墠骞� + let tM = myDate.getMonth();//寰楀埌褰撳墠鏈�+1 + let tD = new Date(tY,tM+1,0); + let tT=tD.getDate();//寰楀埌褰撳墠鏈堢殑澶╂暟 + + for(var i=1;i<=tT;i++){ + let week =new Date(tY,tM,i).getDay() + if(week>=1&&week<=5){ + let dd = tY + "/" + (tM + 1) + "/" + i; + let temp={className: "mark1",date:dd} + this.selectDate.push(temp) + } + } +//console.log(JSON.stringify(this.selectDate)) + }, + resetSelect(){//閲嶇疆閫変腑鐨勬棩鏈� + this.selectDate=[] + this.shiData = [] + this.sendDte = [] + }, + fun(obj){ + console.log(obj) + if(obj){ + if(obj = obj.split("/")){ + var timShi = obj[1]; + var timFen = obj[2]; + if(timShi < 10){ + timShi = '0'+timShi + } + if(timFen < 10){ + timFen = '0'+timFen + } + var dd = (obj[0] + timShi +timFen) + return dd + } + } + }, + clickDay(today){//閫変腑鏃ユ湡 + let existDate = this.selectDate; + let isExist = true; + for (var i = 0; i < existDate.length; i++) { + if (existDate[i].date === today) { + this.selectDate.splice(i,1); + this.shiData.splice(i,1); + this.sendDte.splice(i,1) + isExist = false; + } + } + if (isExist) {//褰撳墠鏃ユ湡瀛樺湪绉婚櫎 + let tempDate = {date: today, className: "mark1"} + // let ddd = this.fun(today) + let ddd = today + let ccc = this.fun(today) + this.selectDate.push(tempDate) + this.shiData.push(ddd) + this.sendDte.push(ccc) + } + }, + onSelect(value) { + console.log(value); + let arr = [] + arr.push(value); + this.value = arr + // this.value = value; + // this.selectedValue = value; + }, + onPanelChange(value) { + this.value = value; + }, deviceSearch() { this.$refs.deviceRepairListModel.openPage() this.$refs.deviceRepairListModel.title = '閫夋嫨璁惧' @@ -276,16 +274,17 @@ // }) }, add(record) { + this.resetSelect() let _this = this this.visible = true this.form.resetFields() this.model = Object.assign({}, record) this.initShiftList() this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model, 'equmentName')) + this.form.setFieldsValue(pick(this.model)) this.form.setFieldsValue({ - takeEffectDate: moment(), - invalidDate: moment().endOf('month') + // takeEffectDate: moment(), + // invalidDate: moment().endOf('month') }) }) }, @@ -301,12 +300,22 @@ if (!err) { that.confirmLoading = true let formData = Object.assign(this.model, values) + + formData.dateList = this.sendDte postAction(this.url.settingCalendar, formData).then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false @@ -318,37 +327,14 @@ handleCancel() { this.close() }, - // shiftSubChange(val) { - // let _this = this - // getAction(this.url.getShiftSubById, { shiftSubId: val }).then((res) => { - // if (res.success) { - // if (res.result.isDaySpan == 'true') { - // _this.isDaySpan = true - // } else { - // _this.isDaySpan = false - // } - // _this.form.setFieldsValue({ - // startDate: res.result.startDate, - // endDate: res.result.endDate - // }) - // if (res.result.sleepStartDate) { - // _this.form.setFieldsValue({ - // sleepStartDate: res.result.sleepStartDate - // }) - // } - // if (res.result.sleepStartDate) { - // _this.form.setFieldsValue({ - // sleepEndDate: res.result.sleepEndDate - // }) - // } - // } - // }) - // } + } } </script> <style scoped lang="less"> + + /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)));*/ @@ -383,4 +369,72 @@ .ant-tabs-content .ant-form-item { margin-bottom: 0px; } + + /deep/ .mark1{ + color:white!important; + background-color: #1890ff!important; + border-radius: 50%; + } + /deep/.mainBox .wh_content_all{ + background-color: #ffffff; + border: 1px silver solid; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + } + /deep/ .mainBox .wh_content_all .wh_jiantou1{ + border-top: 2px solid #000000; + border-left: 2px solid #000000; + } + /deep/ .mainBox .wh_content_all .wh_jiantou2{ + border-top: 2px solid #000000; + border-right: 2px solid #000000; + } + /deep/ .mainBox .wh_content_all .wh_top_changge li{ + color: black; + } + /deep/ .mainBox .wh_content_all .wh_content_item{ + margin-top: 5px; + } + /deep/ .mainBox .wh_content_all .wh_content_item .wh_top_tag{ + color: #000000; + } + /deep/ .mainBox .wh_content_all .wh_content_item .wh_item_date { + color: #000000; + } + /deep/ .mainBox .wh_content_all .wh_content_item .wh_item_date:hover{ + color: #1890ff; + border:1px solid #1890ff; + border-radius: 50%; + } + /deep/ .mainBox .wh_content_all .wh_content_item .wh_other_dayhide{ + color: #bfbfbf!important; + } + /deep/ .mainBox .wh_content_all .wh_content_item .wh_want_dayhide{ + color: #bfbfbf!important; + } + /deep/ .mainBox .wh_content_all .wh_content_item .wh_chose_day{ + background: #ffffff; + color: #000000; + } + /deep/ .mainBox .wh_content_all .wh_content_item .wh_isMark { + /*color: #1890ff;*/ + /*border:1px solid #1890ff;*/ + /*border-radius: 50%;*/ + color: #ffffff; + background-color: blue; + } + /deep/ .mainBox .wh_content_all .wh_content_item .wh_isToday { + /*background: #33ad53;*/ + /*background: #ff4d4d!important;*/ + background-color: #ffffff; + color: #000000; + } + </style> + + + + + + diff --git a/src/views/mdc/base/modules/deviceLog/AlarmLogList.vue b/src/views/mdc/base/modules/deviceLog/AlarmLogList.vue index 87b2736..4aa3935 100644 --- a/src/views/mdc/base/modules/deviceLog/AlarmLogList.vue +++ b/src/views/mdc/base/modules/deviceLog/AlarmLogList.vue @@ -69,6 +69,45 @@ title: '鎸佺画鏃堕棿', align: 'center', dataIndex: 'duration', + customRender:(t,r,index) =>{ + // console.log(t) + 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 + '绉�' + } + } + // 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) + 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} }, diff --git a/src/views/mdc/base/modules/deviceLog/LogInfo.vue b/src/views/mdc/base/modules/deviceLog/LogInfo.vue index 2b990c8..0321998 100644 --- a/src/views/mdc/base/modules/deviceLog/LogInfo.vue +++ b/src/views/mdc/base/modules/deviceLog/LogInfo.vue @@ -15,7 +15,7 @@ </a-form-item> </a-col> <a-col :md="6" :sm="6"> - <a-form-item label="閲囬泦鏃堕棿"> + <a-form-item label="鏃ユ湡"> <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange" format='YYYY-MM-DD'/> </a-form-item> </a-col> @@ -329,7 +329,11 @@ this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') this.queryChart() }else{ - this.$message.warning("璇烽�夋嫨鏃堕棿") + // this.$message.warning("璇烽�夋嫨鏃堕棿") + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨鏃堕棿" + }); } // this.queryList() @@ -345,7 +349,11 @@ }, openWorkChart() { if(!this.equipment.equipmentId){ - this.$message.warning("璇烽�夋嫨璁惧杩涜鏌ヨ") + // this.$message.warning("璇烽�夋嫨璁惧杩涜鏌ヨ") + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨璁惧杩涜鏌ヨ" + }); }else{ this.$refs.workChartModel.add(this.equipment) this.$refs.workChartModel.title = '宸ヤ綔鏇茬嚎' @@ -355,7 +363,11 @@ openHistoryChart() { // console.log(this.equipment); if(!this.equipment.equipmentId){ - this.$message.warning("璇烽�夋嫨璁惧杩涜鏌ヨ") + // this.$message.warning("璇烽�夋嫨璁惧杩涜鏌ヨ") + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨璁惧杩涜鏌ヨ" + }); // console.log(1111) } else{ this.$refs.workHistoryModel.add(this.equipment) @@ -369,7 +381,11 @@ }, dataAfter() { if((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')){ - this.$message.warning("璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�") + // this.$message.warning("璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�") + this.$notification.warning({ + message:'娑堟伅', + description:'璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�' + }); }else{ this.queryParams.collectTime = moment(this.queryParams.collectTime.add(1, 'd'), 'YYYY-MM-DD') this.searchQuery() @@ -389,10 +405,18 @@ this.queryParams = {} // this.queryList() this.equipment = {} - _this.$message.warning('璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒') + // _this.$message.warning('璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + _this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/modules/deviceLog/LogList.vue b/src/views/mdc/base/modules/deviceLog/LogList.vue index 69a3f5e..a1a33bf 100644 --- a/src/views/mdc/base/modules/deviceLog/LogList.vue +++ b/src/views/mdc/base/modules/deviceLog/LogList.vue @@ -48,6 +48,9 @@ default: false } }, + watch:{ + + }, data() { return { statusName: '', @@ -90,13 +93,52 @@ title: '鎸佺画鏃堕棿', align: 'center', dataIndex: 'duration', + customRender:(t,r,index) =>{ + // console.log(t) + 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 + '绉�' + } + } + // 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) + 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: '绋嬪簭鍙�', align: 'center', - dataIndex: 'sequencenumber' + dataIndex: 'sequenceNumber' } ] } diff --git a/src/views/mdc/base/modules/deviceLog/WorkChartModel.vue b/src/views/mdc/base/modules/deviceLog/WorkChartModel.vue index 50aa166..dbc2ee2 100644 --- a/src/views/mdc/base/modules/deviceLog/WorkChartModel.vue +++ b/src/views/mdc/base/modules/deviceLog/WorkChartModel.vue @@ -129,10 +129,8 @@ return current && current > moment().endOf("day"); }, initPlainOptions(param) { - console.log(param) let that = this let equipment = param.equipmentId - console.log(equipment) getAction(this.url.initPlainOptions,{equipmentId:equipment}).then((res) => { if (res.success) { @@ -207,13 +205,19 @@ }) }, handleCancel() { - this.visible = false + this.visible = false; + this.stratOpen = false; + this.endOpen = false; }, checkboxOnChange(e) { if (e.length <= 3) { this.option = e } else { - this.$message.warn('鏈�澶氬彧鑳介�夋嫨3涓�') + // this.$message.warn('鏈�澶氬彧鑳介�夋嫨3涓�') + this.$notification.warning({ + message:'娑堟伅', + description:'鏈�澶氬彧鑳介�夋嫨涓変釜' + }); return false } }, @@ -337,7 +341,11 @@ } getAction(this.url.workChart, param).then((res) => { if(JSON.stringify(res.result) == '[]' || res.result == null){ - this.$message.warning('鏃犳暟鎹紒') + // this.$message.warning('鏃犳暟鎹紒') + this.$notification.warning({ + message:'娑堟伅', + description:'鏃犳暟鎹�!' + }); this.spinning = false; _this.workChart.setOption(option,true) }else{ diff --git a/src/views/mdc/base/modules/deviceLog/WorkHistoryModel.vue b/src/views/mdc/base/modules/deviceLog/WorkHistoryModel.vue index 107ff49..44f7cef 100644 --- a/src/views/mdc/base/modules/deviceLog/WorkHistoryModel.vue +++ b/src/views/mdc/base/modules/deviceLog/WorkHistoryModel.vue @@ -44,9 +44,9 @@ <span v-if="item.status == 23" :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span> </div> - <div v-if="item.status == 22" style="z-index: 999;" + <div 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 info.value.waring"> <span :style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span> </div> @@ -136,21 +136,24 @@ // console.log(tmp) if (tmp) { if (tmp.normal) { - for (let i = 0; i < tmp.normal.length; i++) { - tmp.normal[i].dateProportion = tmp.normal[i].duration / 86400 * 100 + '%' + 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 + '%' } } else { tmp.normal = [] } - /*if (tmp.waring) { - for (let i = 0; i < tmp.waring.length; i++) { - tmp.waring[i].dateProportion = tmp.waring[i].duration / 86400 * 100 + '%' - let leftTmp = (moment(tmp.waring[i].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 - tmp.waring[i].left = leftTmp / 86400 * 100 + '%' + 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 + '%' } } else { tmp.waring = [] - }*/ + } } else { res.result[i].value = { normal: [], waring: [] } } diff --git a/src/views/mdc/base/modules/deviceLog/WorkLogList.vue b/src/views/mdc/base/modules/deviceLog/WorkLogList.vue index 1e5b549..badd7f4 100644 --- a/src/views/mdc/base/modules/deviceLog/WorkLogList.vue +++ b/src/views/mdc/base/modules/deviceLog/WorkLogList.vue @@ -73,13 +73,52 @@ title: '鎸佺画鏃堕棿', align: 'center', dataIndex: 'duration', + customRender:(t,r,index) =>{ + // console.log(t) + 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 + '绉�' + } + } + // 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) + 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: '绋嬪簭鍙�', align: 'center', - dataIndex: 'sequencenumber' + dataIndex: 'sequenceNumber' } ] } diff --git a/src/views/mdc/base/modules/deviceManager/DeviceList.vue b/src/views/mdc/base/modules/deviceManager/DeviceList.vue index d4db87f..15ba2dc 100644 --- a/src/views/mdc/base/modules/deviceManager/DeviceList.vue +++ b/src/views/mdc/base/modules/deviceManager/DeviceList.vue @@ -244,7 +244,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -256,7 +260,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -273,12 +281,20 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); that.$emit('delectTree','') } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; @@ -322,21 +338,32 @@ // console.log(this.node); if(this.node.entity.equipmentId != null){ // alert('涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犺澶�') - this.$message.warning('涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犺澶囷紒') + // this.$message.warning('涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犺澶囷紒') + this.$notification.warning({ + message:'娑堟伅', + description:"涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犺澶囷紒" + }); }else{ this.$refs.modalForm.add(this.node) this.$refs.modalForm.title = '鏂板璁惧' this.$refs.modalForm.disableSubmit = false } } else { - this.$message.warning('璇烽�夋嫨鎵�灞炲眰绾э紒') + // this.$message.warning('璇烽�夋嫨鎵�灞炲眰绾э紒') + this.$notification.warning({ + message:'娑堟伅', + description:'璇烽�夋嫨鎵�灞炲眰绾э紒' + }); } }, handleAddTier() { if (this.node && JSON.stringify(this.node) != '{}') { if(this.node.entity.equipmentId != null){ // alert('涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犲眰绾�') - this.$message.warning('涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犲眰绾э紒') + this.$notification.warning({ + message:'娑堟伅', + description:"涓嶅彲鍦ㄦ灞傜骇涓嬪鍔犺澶囷紒" + }); }else{ this.$refs.tierModalForm.add(this.node) this.$refs.tierModalForm.title = '鏂板灞傜骇' diff --git a/src/views/mdc/base/modules/deviceManager/DeviceModel.vue b/src/views/mdc/base/modules/deviceManager/DeviceModel.vue index eb2838e..ceff71c 100644 --- a/src/views/mdc/base/modules/deviceManager/DeviceModel.vue +++ b/src/views/mdc/base/modules/deviceManager/DeviceModel.vue @@ -246,11 +246,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/deviceManager/TierModel.vue b/src/views/mdc/base/modules/deviceManager/TierModel.vue index cf45f9a..abb11e6 100644 --- a/src/views/mdc/base/modules/deviceManager/TierModel.vue +++ b/src/views/mdc/base/modules/deviceManager/TierModel.vue @@ -156,11 +156,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("鎴愬姛") + // that.$message.success("鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairEditListModel.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairEditListModel.vue index decbac8..4becb90 100644 --- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairEditListModel.vue +++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairEditListModel.vue @@ -150,7 +150,11 @@ }, loadData(arg) { if(!this.url.list){ - this.$message.error("璇疯缃畊rl.list灞炴��!") + // this.$message.error("璇疯缃畊rl.list灞炴��!") + this.$notification.error({ + message:'娑堟伅', + description:"璇疯缃畊rl.list灞炴��!" + }); return } //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 @@ -177,7 +181,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue index dc99816..2359b22 100644 --- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue +++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue @@ -279,7 +279,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -324,7 +328,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -362,7 +370,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -404,7 +416,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -438,7 +454,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -460,10 +480,18 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(1) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.searchQuery(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); }, @@ -497,7 +525,11 @@ _this.equipment = res.result _this.searchQuery() } else { - _this.$message.warning('璇烽厤缃澶囷紒') + // _this.$message.warning('璇烽厤缃澶囷紒') + _this.$notification.warning({ + message:'娑堟伅', + description:"璇烽厤缃澶�!" + }); } } }) diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue index 270c9d8..86d898c 100644 --- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue +++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue @@ -1,13 +1,14 @@ + <template> - <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" + <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="6" :sm="6"> - <a-form-item label="閮ㄩ棬" > + <a-col :md="6" :sm="6" v-if="isDepartType == 0"> + <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0"> <!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />--> <a-tree-select v-model="value" @@ -17,16 +18,16 @@ placeholder="璇烽�夋嫨閮ㄩ棬" tree-default-expand-all > - <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> - <!--Child Node1 {{ value }}--> - <!--</span>--> + <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> + <!--Child Node1 {{ value }}--> + <!--</span>--> </a-tree-select> </a-form-item> </a-col> <a-col :md="6" :sm="6"> <a-form-item label="杞﹂棿" > - <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>--> + <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>--> <a-tree-select v-model="valueProduct" style="width: 100%" @@ -63,7 +64,7 @@ </div> <!-- table鍖哄煙-begin --> <div> - <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns" + <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> @@ -75,6 +76,7 @@ </template> <script> + import {mapActions} from 'vuex' import { ajaxGetSelectItems } from '@/api/api' @@ -95,7 +97,7 @@ import moment from 'moment' export default { - name: 'DeviceRepairListModel', + name: 'DeviceCalendarListModel', mixins: [JeecgListMixin], components: { JDictSelectTag, @@ -112,17 +114,30 @@ }, data() { return { - treeData:[], - readOnly:true, + isDepartType:'', + /*readOnly:true,*/ title:'', visible: false, - disableMixinCreated: true, - queryParam: {}, - columns: [{ - title: '璁惧缂栫爜', - align: 'center', - dataIndex: 'equipmentId', - }, + SelectedList:[], + treeData:[], + /*disableMixinCreated: true, + queryParam: {},*/ + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + },{ + + title: '璁惧缂栫爜', + align: 'center', + dataIndex: 'equipmentId', + }, { title: '璁惧鍚嶇О', align: 'center', @@ -131,13 +146,13 @@ { title: '椹卞姩绫诲瀷', align: 'center', - dataIndex: 'driveType', + dataIndex: 'driveType' }, { title: '鏁版帶绯荤粺', align: 'center', - dataIndex: 'controlSystem', - } + dataIndex: 'controlSystem' + }, ], sectionPData: [], sectionData: [], @@ -151,7 +166,7 @@ } }, created() { - + this.queryTreeData() }, watch: { value(value) { @@ -162,18 +177,21 @@ this.queryParam.productionId = value } }, - methods: { - openPage() { - this.visible = true - this.onClearSelected() - this.dataSource = []; - this.queryParam = { - status: this.status - }; - this.loadData(); - this.initOptions(); - this.initGroupOptions() + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) }, onSelectChange(selectedRowKeys, selectionRows) { // this.SelectedList.push(selectedRowKeys); @@ -181,6 +199,29 @@ this.selectionRows = selectionRows // this.SelectedList =[...this.SelectedList,...selectionRows]; // console.log(this.SelectedList); + }, + handleTableChange(pagination, filters, sorter) { + // this.onClearSelected() + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + this.loadData(); + }, + openPage() { + this.visible = true + this.onClearSelected() + this.dataSource = []; + this.queryParam = { + status: this.status + }; + + this.loadData(); + this.initOptions(); + this.initGroupOptions() }, loadData(arg) { if(!this.url.list){ @@ -211,7 +252,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -220,6 +265,7 @@ modalFormOk(val) { // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 this.loadData(); + this.selectedRowKeys = [val.id]; }, searchQuery() { @@ -241,6 +287,8 @@ this.close() }, handleOk() { + // this.selectionRows = this.SelectedList; + // console.log(this.selectionRows); this.$emit('sendSelectionRows', this.selectionRows) this.close() }, @@ -249,7 +297,11 @@ if (res.success) { this.treeData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -260,7 +312,11 @@ if (res.success) { this.sectionData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue index da74220..bad7281 100644 --- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue +++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue @@ -260,11 +260,19 @@ let stertDate = moment(data).format("YYYY-MM-DD HH:mm:ss"); let dataStart = stertDate.replace(/:/g,''); if(startOne < dataStart){ - that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�") + // that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�") + that.$notification.warning({ + message:'娑堟伅', + description:"寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�" + }); that.confirmLoading = false }else{ if(startOne>=endOne){ - that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + that.$notification.warning({ + message:'娑堟伅', + description:"缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�" + }); // console.log(this.model) // this.endTime = '' that.confirmLoading = false @@ -279,11 +287,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelAdd.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelAdd.vue index 04db0bc..e7fda73 100644 --- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelAdd.vue +++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelAdd.vue @@ -275,11 +275,19 @@ let stertDate = moment(data).format("YYYY-MM-DD HH:mm:ss"); let dataStart = stertDate.replace(/:/g,''); if(startOne < dataStart) { - that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�") + // that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�") + that.$notification.warning({ + message:'娑堟伅', + description:"寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�" + }); that.confirmLoading = false }else{ if(startOne>=endOne){ - that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + that.$notification.warning({ + message:'娑堟伅', + description:"缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�" + }); // console.log(this.model) // this.endTime = '' that.confirmLoading = false @@ -294,11 +302,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelEdit.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelEdit.vue index 2e61fa6..32cf083 100644 --- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelEdit.vue +++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairModelEdit.vue @@ -248,11 +248,19 @@ let dataStart = stertDate.replace(/:/g,''); if(this.editStart != startOne){ if(startOne < dataStart) { - that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�") + // that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�") + that.$notification.warning({ + message:'娑堟伅', + description:"寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�" + }); that.confirmLoading = false }else{ if(startOne>=endOne){ - that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + that.$notification.warning({ + message:'娑堟伅', + description:"缁撴潫鏃堕棿涓嶈兘灏忎簬褰撳墠鏃堕棿" + }); // console.log(this.model) // this.endTime = '' that.confirmLoading = false @@ -272,10 +280,18 @@ obj.then((res) => { if (res.success) { // that.$message.success("淇敼鎴愬姛") - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false @@ -285,7 +301,11 @@ } }else{ if(startOne>=endOne){ - that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + that.$notification.warning({ + message:'娑堟伅', + description:"缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�" + }); // console.log(this.model) // this.endTime = '' that.confirmLoading = false @@ -305,10 +325,18 @@ obj.then((res) => { if (res.success) { // that.$message.success("淇敼鎴愬姛") - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue b/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue index 31c8a6e..15e6758 100644 --- a/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue +++ b/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue @@ -47,9 +47,9 @@ <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap"> <thead> <tr class="thead fixed equipname"> - <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;"></th> - <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;"></th> - <th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;"></th> + <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> + <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> + <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧缂栧彿</th> <th class="thgu dong5 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">璁惧鍚嶇О</th> <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧绫诲瀷</th> @@ -71,15 +71,15 @@ </thead> <tbody> <tr class="mathData" v-for="(item, index) in dataList"> - <td class="tdgu kaitou" :rowspan="item.level1span" :class="{hidden: item.level1dis}" v-show="!item.level1dis">{{item.level1}}</td> - <td class="tdgu1 kaitou" :rowspan="item.level2span" :class="{hidden: item.level2dis}" v-show="!item.level2dis">{{item.level2}}</td> - <td class="tdgu2 kaitou" :rowspan="item.level3span" :class="{hidden: item.level3dis}" v-show="!item.level3dis">{{item.level3}}</td> + <td class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">{{item.level1}}</td> + <td class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">{{item.level2}}</td> + <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">{{item.level3}}</td> <td class="tdgu3 kaitou">{{item.equipmentId}}</td> <td class="tdgu4 kaitou">{{item.equipmentName}}</td> <td class="tdgu5 kaitou">{{item.equipmentType}}</td> <!--<td>{{item.tierType}}</td>--> <template v-for="(tableHead, index) in item.dataList"> - <td :style="{background:tableHead.color }">{{tableHead.lyl | numFilter}}</td> + <td :style="{background:tableHead.color }">{{tableHead.startRate | numFilter}}</td> <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1"> {{tableHead.openRate | numFilter}} </td> @@ -157,24 +157,24 @@ }, nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 if (JSON.stringify(val) != '{}') { - if (val.entity.equipmentId) { + if (val.equipmentId != null) { this.queryParamEquip.parentId = '' - this.queryParamEquip.equipmentIds = val.entity.equipmentId + this.queryParamEquip.equipmentId = val.equipmentId } else { - this.queryParamEquip.parentId = val.entity.id - this.queryParamEquip.equipmentIds = '' + this.queryParamEquip.parentId = val.key + this.queryParamEquip.equipmentId = '' } this.searchQuery() } }, nodePeople(val){ if (JSON.stringify(val) != '{}') { - if (val.entity.equipmentId) { - this.queryParamPeople.parentId = val.entity.equipmentId - this.queryParamPeople.equipmentIds = '' + if (val.equipmentId != null) { + this.queryParamPeople.parentId = val.equipmentId + this.queryParamPeople.equipmentId = '' } else { - this.queryParamPeople.parentId = val.entity.id - this.queryParamPeople.equipmentIds = '' + this.queryParamPeople.parentId = val.key + this.queryParamPeople.equipmentId = '' } this.searchQuery() } @@ -333,7 +333,11 @@ efficiencyOptionsOnChange(checkedList) { let index = checkedList.indexOf('lyl') if (index < 0) { - this.$message.warn('涓嶈兘鍙栨秷鏌ヨ鍒╃敤鐜�') + // this.$message.warn('涓嶈兘鍙栨秷鏌ヨ鍒╃敤鐜�') + this.$notification.warning({ + message:'娑堟伅', + description:"涓嶈兘鍙栨秷鏌ヨ鍒╃敤鐜�" + }) return false } this.checkedList = checkedList @@ -341,10 +345,10 @@ searchQuery() { if(this.queryParam.typeTree == "1"){ this.queryParam.parentId = this.queryParamEquip.parentId - this.queryParam.equipmentIds = this.queryParamEquip.equipmentIds + this.queryParam.equipmentId = this.queryParamEquip.equipmentId }else{ this.queryParam.parentId = this.queryParamPeople.parentId - this.queryParam.equipmentIds = "" + this.queryParam.equipmentId = "" } this.loadData() // this.onClearSelected() @@ -352,12 +356,12 @@ searchReset() { this.typeTree = this.queryParam.typeTree this.typeParent = this.queryParam.parentId - this.typeEquipment = this.queryParam.equipmentIds + this.typeEquipment = this.queryParam.equipmentId this.queryParam = {} this.dates = [] this.queryParam.typeTree = this.typeTree this.queryParam.parentId = this.typeParent - this.queryParam.equipmentIds = this.typeEquipment + this.queryParam.equipmentId = this.typeEquipment // this.ipagination.current = 1 this.loadData(); // this.queryParam = {} @@ -377,7 +381,7 @@ this.checkSameData1(this.dataList) this.checkSameData2(this.dataList) this.combineCell(); - this.initDeviceType(this.dataList) + // this.initDeviceType(this.dataList) } }) } @@ -397,33 +401,40 @@ left: 0; z-index: 1; } +.table tbody tr .wenzi{ + /*writing-mode: vertical-lr;*/ + /*text-orientation: upright;*/ + transform: rotate(360deg); + writing-mode: vertical-lr; + letter-spacing: 2px; +} .table tbody tr .kaitou{ z-index: 1; background-color: white; } .table tbody tr .tdgu1{ position: sticky; - left: 150px; + left: 50px; z-index: 2; } .table tbody tr .tdgu2{ position: sticky; - left: 300px; + left: 100px; z-index: 2; } .table tbody tr .tdgu3{ position: sticky; - left: 450px; + left: 150px; z-index: 2; } .table tbody tr .tdgu4{ position: sticky; - left: 550px; + left: 250px; z-index: 2; } .table tbody tr .tdgu5{ position: sticky; - left: 700px; + left: 400px; z-index: 2; } @@ -448,23 +459,23 @@ } .table2 thead .equipname .dong2{ z-index: 5; - left: 150px; + left: 50px; } .table2 thead .equipname .dong3{ z-index: 5; - left: 300px; + left: 100px; } .table2 thead .equipname .dong4{ z-index: 5; - left: 450px; + left: 150px; } .table2 thead .equipname .dong5{ z-index: 5; - left: 550px; + left: 250px; } .table2 thead .equipname .dong6{ z-index: 5; - left: 700px; + left: 400px; } @@ -535,9 +546,9 @@ width: auto; } -.dataContent tr td { - height: 35px; -} +/*.dataContent tr td {*/ + /*height: 35px;*/ +/*}*/ .dataContent .mathData td { padding: 10px; diff --git a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue index dfccf0e..a42a1c8 100644 --- a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue +++ b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue @@ -50,9 +50,9 @@ <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap"> <thead> <tr class="thead fixed equipname"> - <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;"></th> - <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;"></th> - <th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;"></th> + <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> + <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> + <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧缂栧彿</th> <th class="thgu dong5 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">璁惧鍚嶇О</th> <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧绫诲瀷</th> @@ -74,9 +74,9 @@ </thead> <tbody> <tr class="mathData" v-for="(item, index) in dataList"> - <td class="tdgu kaitou" :rowspan="item.level1span" :class="{hidden: item.level1dis}" v-show="!item.level1dis">{{item.level1}}</td> - <td class="tdgu1 kaitou" :rowspan="item.level2span" :class="{hidden: item.level2dis}" v-show="!item.level2dis">{{item.level2}}</td> - <td class="tdgu2 kaitou" :rowspan="item.level3span" :class="{hidden: item.level3dis}" v-show="!item.level3dis">{{item.level3}}</td> + <td class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">{{item.level1}}</td> + <td class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">{{item.level2}}</td> + <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">{{item.level3}}</td> <td class="tdgu3 kaitou">{{item.equipmentId}}</td> <td class="tdgu4 kaitou">{{item.equipmentName}}</td> <td class="tdgu5 kaitou">{{item.equipmentType}}</td> @@ -323,7 +323,7 @@ exclude_img: true, fileext: ".xls", exclude_links: true, - exclude_inputs: true + exclude_inputs: false }); }, showIdentifying() { @@ -340,18 +340,44 @@ efficiencyOptionsOnChange(checkedList) { let index = checkedList.indexOf('lyl') if (index < 0) { - this.$message.warn('涓嶈兘鍙栨秷鏌ヨ鍒╃敤鐜�') + // this.$message.warn('涓嶈兘鍙栨秷鏌ヨ寮�鍔ㄧ巼') + this.$notification.warning({ + message:'娑堟伅', + description:"涓嶈兘鍙栨秷鏌ヨ寮�鍔ㄧ巼" + }) + return false } this.checkedList = checkedList }, + // searchQuery() { + // if(this.queryParam.typeTree == "1"){ + // // this.queryParam.TreeIDTwo = "" + // this.queryParam.parentId = this.queryParamEquip.parentId + // this.queryParam.equipmentId = this.queryParamEquip.equipmentId + // }else{ + // // this.queryParam.TreeIDOne = "" + // this.queryParam.parentId = this.queryParamPeople.parentId + // this.queryParam.equipmentId = "" + // } + // this.loadData() + // // this.onClearSelected() + // }, + // searchReset() { + // this.typeTree = this.queryParam.typeTree + // this.typeParent = this.queryParams.parentId + // this.queryParam = {} + // this.dates = [] + // this.queryParam.typeTree = this.typeTree + // this.queryParam.parentId = this.typeParent + // this.loadData() + // // this.onClearSelected() + // }, searchQuery() { if(this.queryParam.typeTree == "1"){ - // this.queryParam.TreeIDTwo = "" this.queryParam.parentId = this.queryParamEquip.parentId this.queryParam.equipmentId = this.queryParamEquip.equipmentId }else{ - // this.queryParam.TreeIDOne = "" this.queryParam.parentId = this.queryParamPeople.parentId this.queryParam.equipmentId = "" } @@ -360,12 +386,18 @@ }, searchReset() { this.typeTree = this.queryParam.typeTree - this.typeParent = this.queryParams.parentId + this.typeParent = this.queryParam.parentId + this.typeEquipment = this.queryParam.equipmentId this.queryParam = {} this.dates = [] this.queryParam.typeTree = this.typeTree this.queryParam.parentId = this.typeParent - this.loadData() + this.queryParam.equipmentId = this.typeEquipment + // this.ipagination.current = 1 + this.loadData(); + // this.queryParam = {} + // this.dates = [] + // this.loadData() // this.onClearSelected() }, loadData() { @@ -379,7 +411,7 @@ this.checkSameData1(this.dataList) this.checkSameData2(this.dataList) this.combineCell(); - this.initDeviceType(this.dataList) + // this.initDeviceType(this.dataList) } }) @@ -399,33 +431,40 @@ left: 0; z-index: 1; } +.table tbody tr .wenzi{ + /*writing-mode: vertical-lr;*/ + /*text-orientation: upright;*/ + transform: rotate(360deg); + writing-mode: vertical-lr; + letter-spacing: 2px; +} .table tbody tr .kaitou{ z-index: 1; background-color: white; } .table tbody tr .tdgu1{ position: sticky; - left: 150px; + left: 50px; z-index: 2; } .table tbody tr .tdgu2{ position: sticky; - left: 300px; + left: 100px; z-index: 2; } .table tbody tr .tdgu3{ position: sticky; - left: 450px; + left: 150px; z-index: 2; } .table tbody tr .tdgu4{ position: sticky; - left: 550px; + left: 250px; z-index: 2; } .table tbody tr .tdgu5{ position: sticky; - left: 700px; + left: 400px; z-index: 2; } .table2 thead tr .timeth, @@ -449,23 +488,23 @@ } .table2 thead .equipname .dong2{ z-index: 5; - left: 150px; + left: 50px; } .table2 thead .equipname .dong3{ z-index: 5; - left: 300px; + left: 100px; } .table2 thead .equipname .dong4{ z-index: 5; - left: 450px; + left: 150px; } .table2 thead .equipname .dong5{ z-index: 5; - left: 550px; + left: 250px; } .table2 thead .equipname .dong6{ z-index: 5; - left: 700px; + left: 400px; } @media screen and (min-width: 1920px){ @@ -544,9 +583,9 @@ /*width: auto;*/ } -.dataContent tr td { - height: 35px; -} +/*.dataContent tr td {*/ + /*height: 35px;*/ +/*}*/ .dataContent .mathData td { padding: 10px; diff --git a/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue b/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue index 0b92ec8..19f2705 100644 --- a/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue +++ b/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue @@ -15,8 +15,8 @@ <a-form-item label="鐝埗"> <a-select v-model="queryParam.shiftId" placeholder="璇烽�夋嫨鐝埗" @change="initShiftSubList" :allowClear = "allowClear"> - <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.id"> - {{ em.shiftName }} + <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value"> + {{ em.label }} </a-select-option> </a-select> </a-form-item> @@ -24,8 +24,8 @@ <a-col :md="6" :sm="6" :xs="6"> <a-form-item label="鐝"> <a-select v-model="queryParam.shiftSubId" placeholder="璇烽�夋嫨鐝" @change="initShiftSubListChange" :allowClear = "allowClearSu"> - <a-select-option v-for="(em,index) in shiftSubList" :key="index" :value="em.id"> - {{ em.shiftSubName }} + <a-select-option v-for="(em,index) in shiftSubList" :key="index" :value="em.value"> + {{ em.label }} </a-select-option> </a-select> </a-form-item> @@ -67,25 +67,32 @@ <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap"> <thead> <tr class="thead fixed equipname"> - <th class="thgu dong1 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧缂栧彿</th> - <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">璁惧鍚嶇О</th> - <th class="thgu dong3 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧绫诲瀷</th> - <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">鐝</th> + <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> + <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> + <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th> + <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧缂栧彿</th> + <th class="thgu dong5 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">璁惧鍚嶇О</th> + <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧绫诲瀷</th> + <th class="thgu dong7 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">鐝</th> <template v-for="(tableHead, index) in tableHeads"> <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> </template> <!--average--> - <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 150px;width: 150px;">骞冲潎鍊�(鐝鍒╃敤鐜�)</th> + <!--<th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 150px;width: 150px;">骞冲潎鍊�(鐝鍒╃敤鐜�)</th>--> </tr> <tr class="thead notfixed gudingth"> <template v-for="(tableHead, index) in tableHeads"> <th>鐝鍒╃敤鐜�(%)</th> - <th v-if="checkedList.indexOf('gzl') > -1">鏁呴殰鐜�(%)</th> - <th v-if="checkedList.indexOf('processingLong') > -1">杩愯鏃堕棿(s)</th> - <th v-if="checkedList.indexOf('totalLong') > -1">鏈夋晥鏃堕棿(s)</th> - <th v-if="checkedList.indexOf('faultLong') > -1">鏁呴殰鏃堕棿(s)</th> - <!--<th v-if="checkedList.indexOf('gjsj') > -1">鍏虫満鏃堕棿(s)</th>--> + <!--<th v-if="checkedList.indexOf('gzl') > -1">鏁呴殰鐜�(%)</th>--> + <!--<th v-if="checkedList.indexOf('processingLong') > -1">杩愯鏃堕棿(s)</th>--> + <!--<th v-if="checkedList.indexOf('totalLong') > -1">鏈夋晥鏃堕棿(s)</th>--> + <!--<th v-if="checkedList.indexOf('faultLong') > -1">鏁呴殰鏃堕棿(s)</th>--> + <!--<!–<th v-if="checkedList.indexOf('gjsj') > -1">鍏虫満鏃堕棿(s)</th>–>--> + <th v-if="checkedList.indexOf('kjsj') > -1">寮�鏈烘椂闂�(s)</th> + <th v-if="checkedList.indexOf('jgsj') > -1">鍔犲伐鏃堕棿(s)</th> + <th v-if="checkedList.indexOf('djsj') > -1">寰呮満鏃堕棿(s)</th> + <th v-if="checkedList.indexOf('gjsj') > -1">鍏虫満鏃堕棿(s)</th> </template> </tr> <!-- <tr>--> @@ -94,36 +101,43 @@ </thead> <tbody> <tr class="mathData" v-for="(item, index) in dataList"> - <td class="tdgu kaitou">{{item.equipmentId}}</td> - <td class="tdgu1 kaitou">{{item.equipmentName}}</td> - <td class="tdgu2 kaitou">{{item.equipmentType}}</td> - <td class="tdgu3 kaitou">{{item.shiftSubName}}</td> + <td class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">{{item.level1}}</td> + <td class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">{{item.level2}}</td> + <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">{{item.level3}}</td> + <td class="tdgu3 kaitou">{{item.equipmentId}}</td> + <td class="tdgu4 kaitou">{{item.equipmentName}}</td> + <td class="tdgu5 kaitou">{{item.equipmentType}}</td> + <td class="tdgu6 kaitou">{{item.shiftSubName}}</td> <!--<td>{{item.tierType}}</td>--> - <template v-for="(tableHead, index) in tableHeads"> - <td :style="{background:item[tableHead].color }" v-if='item[tableHead].lyl !== 0'>{{item[tableHead].lyl | numFilter}}</td> - <td :style="{background:item[tableHead].color }" v-if='item[tableHead].lyl == 0 && item[tableHead].status == 1'>缁翠慨</td> - <td :style="{background:item[tableHead].color }" v-if='item[tableHead].lyl == 0 && item[tableHead].status == 2'>浼戠彮</td> - <td :style="{background:item[tableHead].color }" v-if='item[tableHead].lyl == 0 && item[tableHead].status == 10'>{{item[tableHead].lyl | numFilter}}</td> - <td :style="{background:item[tableHead].color }" v-if='item[tableHead].lyl == 0 && item[tableHead].status == 11'>鏈绠�</td> - <td :style="{background:item[tableHead].color }" v-if='item[tableHead].lyl == 0 && item[tableHead].status == 12'>鏃犵彮娆�</td> - <td :style="{background:item[tableHead].color }" v-if="checkedList.indexOf('gzl') > -1"> - {{item[tableHead].gzl | numFilter}} + <template v-for="(tableHead, index) in item.dataList"> + <!--<td :style="{background:tableHead.color }" v-if='tableHead.utilizationRate !== 0'>{{tableHead.utilizationRate | numFilter}}</td>--> + <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 1'>缁翠慨</td>--> + <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 2'>浼戠彮</td>--> + <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 10'>{{tableHead.lyl | numFilter}}</td>--> + <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 11'>鏈绠�</td>--> + <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 12'>鏃犵彮娆�</td>--> + <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td> + <!--<td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gzl') > -1">--> + <!--{{tableHead.gzl | numFilter}}--> + <!--</td>--> + <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1"> + {{tableHead.openLong}} </td> - <td :style="{background:item[tableHead].color }" v-if="checkedList.indexOf('processingLong') > -1"> - {{item[tableHead].processingLong}} + <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1"> + {{tableHead.processLong}} </td> - <td :style="{background:item[tableHead].color }" v-if="checkedList.indexOf('totalLong') > -1"> - {{item[tableHead].totalLong}} + <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1"> + {{tableHead.waitLong}} </td> - <td :style="{background:item[tableHead].color }" v-if="checkedList.indexOf('faultLong') > -1"> - {{item[tableHead].faultLong}} + <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1"> + {{tableHead.closeLong}} </td> <!--<td :style="{background:item[tableHead].color }" v-if="checkedList.indexOf('gjsj') > -1">--> <!--{{item[tableHead].gjsj}}--> <!--</td>--> </template> - <td :style="{background:item.average.color }" >{{item.average.lyl | numFilter}}</td> + <!--<td :style="{background:item.average.color }" >{{item.average.lyl | numFilter}}</td>--> </tr> </tbody> </table> @@ -156,19 +170,23 @@ queryParamPeople:{}, efficiencyOptions: [ { label: '鐝鍒╃敤鐜�', value: 'lyl' }, - { label: '鏁呴殰鐜�', value: 'gzl' }, - { label: '杩愯鏃堕棿', value: 'processingLong' }, - { label: '鏈夋晥鏃堕棿', value: 'totalLong' }, - { label: '鏁呴殰鏃堕棿', value: 'faultLong' }, + // { label: '鏁呴殰鐜�', value: 'gzl' }, + // { label: '杩愯鏃堕棿', value: 'processingLong' }, + // { label: '鏈夋晥鏃堕棿', value: 'totalLong' }, + // { label: '鏁呴殰鏃堕棿', value: 'faultLong' }, // { label: '鍏虫満鏃堕棿', value: 'gjsj' } + { label: '寮�鏈烘椂闂�', value: 'kjsj' }, + { label: '鍔犲伐鏃堕棿', value: 'jgsj' }, + { label: '寰呮満鏃堕棿', value: 'djsj' }, + { label: '鍏虫満鏃堕棿', value: 'gjsj' } ], checkedList: ['lyl'], dataList: [], url: { list: '/mdc/efficiencyReport/efficiencyShiftList', - listByType: '/mdc/MdcUtilizationRate/listByType', - initShiftList: '/mdc/mdcshift/initShiftList', - initShiftSubList: '/mdc/mdcshiftsub/initShiftSubList' + listByType: '/mdc/MdcUtilizationRate/getByType', + initShiftList: '/mdc/mdcMdcShift/initShiftList', + initShiftSubList: '/mdc/mdcShiftSub/initShiftSubList' }, tableHeads: [], shiftList: [], @@ -187,35 +205,30 @@ }, watch: { Type(valmath){ - // console.log(valmath); - // this.rightcolval = 0 this.dataList = []; - // this.selectedRowKeys1 = [] - // this.selectionRows1 = [] this.queryParam.typeTree = valmath - // this.rightcolval = 0 - }, nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + console.log(val); if (JSON.stringify(val) != '{}') { - if (val.entity.equipmentId) { + if (val.equipmentId != null) { this.queryParamEquip.parentId = '' - this.queryParamEquip.equipmentIds = val.entity.equipmentId + this.queryParamEquip.equipmentId = val.equipmentId } else { - this.queryParamEquip.parentId = val.entity.id - this.queryParamEquip.equipmentIds = '' + this.queryParamEquip.parentId = val.key + this.queryParamEquip.equipmentId = '' } this.searchQuery() } }, nodePeople(val){ if (JSON.stringify(val) != '{}') { - if (val.entity.equipmentId) { - this.queryParamPeople.parentId = '' - this.queryParamPeople.equipmentIds = val.entity.equipmentId + if (val.equipmentId != null) { + this.queryParamPeople.parentId = val.equipmentId + this.queryParamPeople.equipmentId = '' } else { - this.queryParamPeople.parentId = val.entity.id - this.queryParamPeople.equipmentIds = '' + this.queryParamPeople.parentId = val.key + this.queryParamPeople.equipmentId = '' } this.searchQuery() } @@ -231,6 +244,93 @@ } }, methods: { + checkSameData(dataList){ + let cache = {}; //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣 + let indices = []; //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍� + dataList.map((item,index)=>{ + let level1 = item.level1; + let _index = cache[level1]; + if(_index!==undefined){ + indices[_index].push(index) + }else{ + cache[level1] = indices.length + indices.push([index]) + } + }) + let result = []; + indices.map((item)=>{ + item.map((index)=>{ + result.push(dataList[index]) + }) + }) + this.dataList = result + }, + checkSameData1(dataList){ + let cache = {}; //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣 + let indices = []; //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍� + dataList.map((item,index)=>{ + let level2 = item.level2; + let _index = cache[level2]; + if(_index!==undefined){ + indices[_index].push(index) + }else{ + cache[level2] = indices.length + indices.push([index]) + } + }) + let result = []; + indices.map((item)=>{ + item.map((index)=>{ + result.push(dataList[index]) + }) + }) + this.dataList = result + }, + checkSameData2(dataList){ + let cache = {}; //瀛樺偍鐨勬槸閿槸kclx 鐨勫�硷紝鍊兼槸kclx 鍦╥ndeces涓暟缁勭殑涓嬫爣 + let indices = []; //鏁扮粍涓瘡涓�涓�兼槸涓�涓暟缁勶紝鏁扮粍涓殑姣忎竴涓厓绱犳槸鍘熸暟缁勪腑鐩稿悓kclx鐨勪笅鏍� + dataList.map((item,index)=>{ + let level3 = item.level3; + let _index = cache[level3]; + if(_index!==undefined){ + indices[_index].push(index) + }else{ + cache[level3] = indices.length + indices.push([index]) + } + }) + let result = []; + indices.map((item)=>{ + item.map((index)=>{ + result.push(dataList[index]) + }) + }) + this.dataList = result + }, + // 鍚堝苟 + combineCell() { + console.log(this.dataList) + let list =this.dataList; + for (let field in list[0]) { + var k = 0; + while (k < list.length) { + list[k][field + 'span'] = 1; + list[k][field + 'dis'] = false; + for (var i = k + 1; i <= list.length - 1; i++) { + if (list[k][field] == list[i][field] && list[k][field] != '') { + list[k][field + 'span']++; + list[k][field + 'dis'] = false; + list[i][field + 'span'] = 1; + list[i][field + 'dis'] = true; + } else { + break; + } + } + k = i; + } + } + return list; + }, disabledDate(current){ //Can not slect days before today and today return current && current > moment().subtract('days', 1); @@ -310,7 +410,11 @@ efficiencyOptionsOnChange(checkedList) { let index = checkedList.indexOf('lyl') if (index < 0) { - this.$message.warn('涓嶈兘鍙栨秷鏌ヨ鍒╃敤鐜�') + // this.$message.warn('涓嶈兘鍙栨秷鏌ヨ鍒╃敤鐜�') + this.$notification.warning({ + message:'娑堟伅', + description:"涓嶈兘鍙栨秷鏌ヨ鐝鍒╃敤鐜�" + }) return false } this.checkedList = checkedList @@ -318,10 +422,10 @@ searchQuery() { if(this.queryParam.typeTree == "1"){ this.queryParam.parentId = this.queryParamEquip.parentId - this.queryParam.equipmentIds = this.queryParamEquip.equipmentIds + this.queryParam.equipmentId = this.queryParamEquip.equipmentId }else{ this.queryParam.parentId = this.queryParamPeople.parentId - this.queryParam.equipmentIds = "" + this.queryParam.equipmentId = "" } this.loadData() // this.onClearSelected() @@ -329,21 +433,27 @@ searchReset() { this.typeTree = this.queryParam.typeTree this.typeParent = this.queryParam.parentId - this.typeEquipment = this.queryParam.equipmentIds + this.typeEquipment = this.queryParam.equipmentId this.queryParam = {} this.dates = [] this.queryParam.typeTree = this.typeTree this.queryParam.parentId = this.typeParent - this.queryParam.equipmentIds = this.typeEquipment + this.queryParam.equipmentId = this.typeEquipment this.loadData() // this.onClearSelected() }, loadData() { + this.tableHeads = [] + this.dataList = [] getAction(this.url.list, this.queryParam).then(res => { if (res.success) { this.tableHeads = res.result.dates - this.dataList = res.result.list - this.initDeviceType(this.dataList) + this.dataList = res.result.mdcEfficiencyList + this.checkSameData(this.dataList) + this.checkSameData1(this.dataList) + this.checkSameData2(this.dataList) + this.combineCell(); + // this.initDeviceType(this.dataList) } }) } @@ -362,25 +472,48 @@ left: 0; z-index: 1; } + .table tbody tr .wenzi{ + /*writing-mode: vertical-lr;*/ + /*text-orientation: upright;*/ + transform: rotate(360deg); + writing-mode: vertical-lr; + letter-spacing: 2px; + } .table tbody tr .kaitou{ z-index: 1; background-color: white; } .table tbody tr .tdgu1{ position: sticky; - left: 100px; + left: 50px; z-index: 2; } .table tbody tr .tdgu2{ position: sticky; - left: 250px; + left: 100px; z-index: 2; } .table tbody tr .tdgu3{ position: sticky; - left: 350px; + left: 150px; z-index: 2; } + .table tbody tr .tdgu4{ + position: sticky; + left: 250px; + z-index: 2; + } + .table tbody tr .tdgu5{ + position: sticky; + left: 400px; + z-index: 2; + } + .table tbody tr .tdgu6{ + position: sticky; + left: 500px; + z-index: 2; + } + .table2 thead tr .timeth, .table2 thead tr .thgu { position: sticky; @@ -402,16 +535,29 @@ } .table2 thead .equipname .dong2{ z-index: 5; - left: 100px; + left: 50px; } .table2 thead .equipname .dong3{ z-index: 5; - left: 250px; + left: 100px; } .table2 thead .equipname .dong4{ z-index: 5; - left: 350px; + left: 150px; } + .table2 thead .equipname .dong5{ + z-index: 5; + left: 250px; + } + .table2 thead .equipname .dong6{ + z-index: 5; + left: 400px; + } + .table2 thead .equipname .dong7{ + z-index: 6; + left: 500px; + } + @media screen and (min-width: 1920px){ #EfficiencyShift{ height: 670px!important; @@ -452,7 +598,7 @@ .dataContent { white-space: nowrap; /*margin: 0;*/ - border: none; + /*border: none;*/ border-collapse: separate; border-spacing: 0; /*table-layout: fixed;*/ @@ -480,9 +626,9 @@ width: auto; } - .dataContent tr td { - height: 35px - } + /*.dataContent tr td {*/ + /*height: 35px*/ + /*}*/ .dataContent .mathData td { padding: 10px; diff --git a/src/views/mdc/base/modules/equipmentAvailCompare/equipmentAvailCompareMain.vue b/src/views/mdc/base/modules/equipmentAvailCompare/equipmentAvailCompareMain.vue new file mode 100644 index 0000000..fd413b7 --- /dev/null +++ b/src/views/mdc/base/modules/equipmentAvailCompare/equipmentAvailCompareMain.vue @@ -0,0 +1,512 @@ +<template> + <a-card :bordered="false" class="device_list"> + <div class="com_box"> + <!-- 鏌ヨ鍖哄煙 --> + <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="4" :sm="4"> + <a-form-item label="璁惧缂栧彿"> + <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input> + </a-form-item> + </a-col> + <a-col :md="4" :sm="4"> + <a-form-item label="璁惧鍚嶇О"> + <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input> + </a-form-item> + </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-form-item> + </a-col> + <a-col :md="7" :sm="7" :xs="7"> + <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('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd" /> + </a-form-item> + </a-col> + <a-col :md="2" :sm="3" :xs="3"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </a-col> + <!--<a-col :md="2" :sm="2" :xs="2">--> + <!--<a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>--> + <!--</a-col>--> + </a-row> + </a-form> + </div> + <!-- table鍖哄煙-begin --> + <div id="DeviceList"> + + <div style="padding: 5px;width: 100%;height: 100%"> + <div style="width: 100%;height: 100%" id="dayAvailBar"></div> + <!--<div id="dayAvailLine"></div>--> + </div> + </div> + <!-- table鍖哄煙-end --> + </div> + </a-card> +</template> + +<script> + import moment from 'moment' + import $ from 'jquery' + import JDictSelectTag from '@/components/dict/JDictSelectTag' + import JDate from '../../../../../components/jeecg/JDate' + import { + requestPut, + deleteAction, + getAction + } from '@/api/manage' + // import comparativeAnalysisBar from './comparativeAnalysisBar' + // import comparativeAnalysisGauge from'./comparativeAnalysisGauge' + // import conparativeAnalysisPie from './conparativeAnalysisPie' + import '@/components/table2excel/table2excel' + import JInput from '@/components/jeecg/JInput' + import JEllipsis from '@/components/jeecg/JEllipsis' + import Tooltip from 'ant-design-vue/es/tooltip' + import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + import AFormItem from 'ant-design-vue/es/form/FormItem' + export default { + name: 'equipmentAvailCompareMain', + // mixins: [JeecgListMixin], + components: { + AFormItem, + Tooltip, + // comparativeAnalysisBar, + // comparativeAnalysisGauge, + // conparativeAnalysisPie, + JDictSelectTag, + JInput, + JDate, + JEllipsis + }, + props: { nodeTree: '', Type:'',nodePeople: '' }, + data() { + return { + activeKey: '1', + typeTree:"", + typeParent:1, + typeEquipment:1, + spaceTime:[], + useingRates:[], + dates: [], + xianshi:"", + readOnly:true, + queryParam: { + // dateTime:undefined, + // timeType:'2' + }, + queryParams:{}, + queryParamEquip:{}, + queryParamPeople:{}, + dataStartsoucre:[], + url: { + dayUtilizationRateContrast:'/mdc/efficiencyReport/dayUtilizationRateContrast', + getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid', + getEquipmentByDepPid:'/mdc/mdcEquipment/getEquipmentByDepPid' + }, + AnalysisList:{} + } + }, + watch:{ + Type(valmath){ + this.dataList = []; + this.queryParams.typeTree = valmath + // console.log(this.queryParams.typeTree) + }, + nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + if (JSON.stringify(val) != '{}') { + if (val.equipmentId) { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = "" + this.queryParams.equipmentId = val.equipmentId + this.queryParamEquip.equipmentId = val.equipmentId + this.searchQuery() + } else { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = val.key + this.queryParams.equipmentId = '' + this.initEquipment(val.key) + } + + + } + }, + nodePeople(val){ + if (JSON.stringify(val) != '{}') { + if (val.equipmentId) { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = "" + this.queryParams.equipmentId = val.equipmentId + this.queryParamEquip.equipmentId = val.equipmentId + this.searchQuery() + } else { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = val.key + this.queryParams.equipmentId = '' + this.initEquipmentDep(val.key) + } + + } + } + }, + methods: { + drawTu(){ + let dayAvailBar = this.$echarts.init(document.getElementById('dayAvailBar'), 'macarons'); + //dayAvailLine = echarts.init(document.getElementById('dayAvailLine')); + let dayAvailBarOption = { + title: { + text: '璁惧鏃ュ埄鐢ㄧ巼鍥�', + x: 'center', + textStyle: { + fontSize: 18, + fontWeight: 'bolder', + color: "#151414" + } + }, + tooltip: { + trigger: 'axis', + formatter: "{a} <br/>{b} :({c}%)" + }, + toolbox: { + show: true, + feature: { + mark: {show: true}, + dataView: {show: true, readOnly: false}, + magicType: {show: true, type: ['line', 'bar']}, + restore: {show: true}, + saveAsImage: {show: true} + } + }, + calculable: true, //鏄惁鍚敤鎷栨嫿閲嶈绠楃壒鎬� + xAxis: [ + { + type: 'category', + name: '鏃堕棿鍒嗘', + boundaryGap: true, + data: this.spaceTime + } + ], + yAxis: [ + { + type: 'value', + name: '鍒╃敤鐜�' + } + ], + series: [ + { + name: '鍒╃敤鐜�', + type: 'line', + barWidth: 50, + itemStyle: { + normal: { + color: '#4169E1' + } + }, + data: this.useingRates, + markPoint: { + data: [ + {type: 'max', name: '鏈�澶у��', symbolSize: 70}, + {type: 'min', name: '鏈�灏忓��', symbolSize: 70} + ] + } + } + ] + }; + dayAvailBar.setOption(dayAvailBarOption); + }, + moment, + onChangeStart(time, timeString) { + this.queryParam.startTime = timeString + // console.log(time, timeString); + }, + onChangeEnd(time, timeString) { + this.queryParam.endTime = timeString + // console.log(time, timeString); + }, + disabledDate(current){ + //Can not slect days before today and today + return current && current > moment().subtract('days', 1); + }, + dataChange(val) { + this.queryParam.dateTime = val.format('YYYYMMDD') + }, + handleChange(value) { + this.queryParam.timeType = value + // console.log(this.queryParam.timeType) + }, + tabChange(val) { + this.activeKey = val + }, + dateParamChange(v1, v2) { + // console.log(v1,v2) + this.queryParam.startDate = v2[0] + this.queryParam.endDate = v2[1] + // console.log(v2[0],v2[1]) + }, + loadAnalysis(){ + getAction(this.url.dayUtilizationRateContrast,this.queryParam).then(res => { + if (res.success) { + this.spaceTime.push(res.result.dataList) + for(let i = 0;i<res.result.dayRateDto.length;i++){ + this.useingRates.push(res.result.dayRateDto[i].utilizationRate) + } + this.drawTu() + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + numFilter(value) { + if (value) { + return parseFloat((value * 100).toFixed(2)) + } else { + return '0' + } + }, + searchQuery(){ + this.spaceTime = [] + this.useingRates = [] + 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.useingRates.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.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.dayUtilizationRateContrast,this.queryParams).then((res) => { + if(res.success){ + this.spaceTime=res.result.dateList + for(let i = 0;i<res.result.dayRateDto.length;i++){ + this.useingRates.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.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.dayUtilizationRateContrast,this.queryParams).then((res) => { + if(res.success){ + this.spaceTime=res.result.dateList + for(let i = 0;i<res.result.dayRateDto.length;i++){ + this.useingRates.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 + }) + } + + }, + initEquipment(id) { + let _this = this + getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => { + if (res.success) { + if (res.result != null) { + _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName) + _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId) + _this.$set(this.queryParam, 'equipmentId', res.result.equipmentId) + _this.equipment = res.result + _this.searchQuery() + } else { + this.queryParams = {} + // this.queryList() + this.equipment = {} + // _this.$message.warning('璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); + } + }else{ + // this.$message.warning(res.message) + _this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }) + }, + initEquipmentDep(id) { + let _this = this + getAction(this.url.getEquipmentByDepPid, { pid: id }).then((res) => { + if (res.success) { + if (res.result != null) { + _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName) + _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId) + _this.$set(this.queryParam, 'equipmentId', res.result.equipmentId) + _this.equipment = res.result + _this.searchQuery() + } else { + this.queryParams = {} + // this.queryList() + this.equipment = {} + // _this.$message.warning('璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); + } + }else{ + // this.$message.warning(res.message) + _this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }) + } + }, + created() { + this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)] + this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') + this.queryParam.startTime = '00:00' + this.queryParam.endTime = "08:00" + this.queryParams.typeTree = "1"; + + + }, + mounted() { + this.initEquipment() + }, + } +</script> + +<style lang="less" scoped> + /*@import '~@assets/less/common.less';*/ + + @media screen and (min-width: 1920px){ + .device_list{ + height: 811px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1680px) and (max-width: 1920px){ + .device_list{ + height: 811px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1400px) and (max-width: 1680px){ + .device_list{ + height: 663px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1280px) and (max-width: 1400px){ + .device_list{ + height: 564px!important; + overflow: scroll; + } + } + @media screen and (max-width: 1280px){ + .device_list{ + height: 564px!important; + overflow: scroll; + } + } + /*.device_list{*/ + /*display: flex;*/ + /*}*/ + /*.device_list .table-page-search-wrapper{*/ + /**/ + /*}*/ + /deep/ .ant-card-body{ + height: 100%!important; + } + .device_list .com_box{ + display: flex!important; + height: 100%!important; + flex-direction: column!important; + } + .device_list .table-page-search-wrapper{ + height: 6%!important; + } + .device_list #DeviceList{ + height: 90%!important; + } +</style> diff --git a/src/views/mdc/base/modules/equipmentDayAvail/equipmentDayAvailMain.vue b/src/views/mdc/base/modules/equipmentDayAvail/equipmentDayAvailMain.vue new file mode 100644 index 0000000..1f9b37a --- /dev/null +++ b/src/views/mdc/base/modules/equipmentDayAvail/equipmentDayAvailMain.vue @@ -0,0 +1,517 @@ +<template> + <a-card :bordered="false" class="device_list"> + <div class="com_box"> + <!-- 鏌ヨ鍖哄煙 --> + <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="4" :sm="4"> + <a-form-item label="璁惧缂栧彿"> + <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input> + </a-form-item> + </a-col> + <a-col :md="4" :sm="4"> + <a-form-item label="璁惧鍚嶇О"> + <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input> + </a-form-item> + </a-col> + <a-col :md="5" :sm="5" :xs="5"> + <a-form-item label="鏃ユ湡"> + <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD' @change="dataChange"/> + </a-form-item> + </a-col> + <a-col :md="4" :sm="4" :xs="4"> + <a-form-item label="闂撮殧"> + <a-select default-value="2" style="width: 80px" v-model="queryParam.timeType"> + <a-select-option :value="2"> + 2 + </a-select-option> + <a-select-option :value="3"> + 3 + </a-select-option> + <a-select-option :value="4"> + 4 + </a-select-option> + <a-select-option :value="6"> + 6 + </a-select-option> + </a-select>灏忔椂 + </a-form-item> + </a-col> + <a-col :md="2" :sm="3" :xs="3"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </a-col> + <!--<a-col :md="2" :sm="2" :xs="2">--> + <!--<a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>--> + <!--</a-col>--> + </a-row> + </a-form> + </div> + <!-- table鍖哄煙-begin --> + <div id="DeviceList"> + + <div style="padding: 5px;width: 100%;height: 100%"> + <div style="width: 100%;height: 100%" id="dayAvailBar"></div> + <!--<div id="dayAvailLine"></div>--> + </div> + </div> + <!-- table鍖哄煙-end --> + </div> + </a-card> +</template> + +<script> + import moment from 'moment' + import $ from 'jquery' + import JDictSelectTag from '@/components/dict/JDictSelectTag' + import JDate from '../../../../../components/jeecg/JDate' + import { + requestPut, + deleteAction, + getAction + } from '@/api/manage' + // import comparativeAnalysisBar from './comparativeAnalysisBar' + // import comparativeAnalysisGauge from'./comparativeAnalysisGauge' + // import conparativeAnalysisPie from './conparativeAnalysisPie' + import '@/components/table2excel/table2excel' + import JInput from '@/components/jeecg/JInput' + import JEllipsis from '@/components/jeecg/JEllipsis' + import Tooltip from 'ant-design-vue/es/tooltip' + import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + export default { + name: 'equipmentDayAvailMain', + // mixins: [JeecgListMixin], + components: { + Tooltip, + // comparativeAnalysisBar, + // comparativeAnalysisGauge, + // conparativeAnalysisPie, + JDictSelectTag, + JInput, + JDate, + JEllipsis + }, + props: { nodeTree: '', Type:'',nodePeople: '' }, + data() { + return { + activeKey: '1', + typeTree:"", + typeParent:1, + typeEquipment:1, + spaceTime:[], + useingRates:[], + dates: [], + xianshi:"", + readOnly:true, + queryParam: { + dateTime:undefined, + timeType:'2' + }, + queryParams:{}, + queryParamEquip:{}, + queryParamPeople:{}, + dataStartsoucre:[], + url: { + comparativeAnalysis:'/mdc/efficiencyReport/comparativeAnalysis', + dayUtilizationRate:'/mdc/efficiencyReport/dayUtilizationRate', + getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid', + getEquipmentByDepPid:'/mdc/mdcEquipment/getEquipmentByDepPid' + }, + AnalysisList:{} + } + }, + watch:{ + Type(valmath){ + this.dataList = []; + this.queryParams.typeTree = valmath + // console.log(this.queryParams.typeTree) + }, + nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + if (JSON.stringify(val) != '{}') { + if (val.equipmentId) { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = "" + this.queryParams.equipmentId = val.equipmentId + this.queryParamEquip.equipmentId = val.equipmentId + this.searchQuery() + } else { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = val.key + this.queryParams.equipmentId = '' + this.initEquipment(val.key) + } + + + } + }, + nodePeople(val){ + if (JSON.stringify(val) != '{}') { + if (val.equipmentId) { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = "" + this.queryParams.equipmentId = val.equipmentId + this.queryParamEquip.equipmentId = val.equipmentId + this.searchQuery() + } else { + // this.$set(this.queryParam, 'tierName', val.title) + this.queryParamEquip.parentId = val.key + this.queryParams.equipmentId = '' + this.initEquipmentDep(val.key) + } + + } + } + }, + methods: { + moment, + drawTu(){ + let dayAvailBar = this.$echarts.init(document.getElementById('dayAvailBar'), 'macarons'); + //dayAvailLine = echarts.init(document.getElementById('dayAvailLine')); + let dayAvailBarOption = { + title: { + text: '璁惧鏃ュ埄鐢ㄧ巼鍥�', + x: 'center', + textStyle: { + fontSize: 18, + fontWeight: 'bolder', + color: "#151414" + } + }, + tooltip: { + trigger: 'axis', + formatter: "{a} <br/>{b} :({c}%)" + }, + toolbox: { + show: true, + feature: { + mark: {show: true}, + dataView: {show: true, readOnly: false}, + magicType: {show: true, type: ['line', 'bar']}, + restore: {show: true}, + saveAsImage: {show: true} + } + }, + calculable: true, //鏄惁鍚敤鎷栨嫿閲嶈绠楃壒鎬� + xAxis: [ + { + type: 'category', + name: '鏃堕棿鍒嗘', + boundaryGap: true, + data: this.spaceTime + } + ], + yAxis: [ + { + type: 'value', + name: '鍒╃敤鐜�' + } + ], + series: [ + { + name: '鍒╃敤鐜�', + type: 'line', + barWidth: 50, + itemStyle: { + normal: { + color: '#4169E1' + } + }, + data: this.useingRates, + markPoint: { + data: [ + {type: 'max', name: '鏈�澶у��', symbolSize: 70}, + {type: 'min', name: '鏈�灏忓��', symbolSize: 70} + ] + } + } + ] + }; + dayAvailBar.setOption(dayAvailBarOption); + }, + disabledDate(current){ + //Can not slect days before today and today + return current && current > moment().subtract('days', 1); + }, + dataChange(val) { + this.queryParam.dateTime = val.format('YYYYMMDD') + }, + handleChange(value) { + this.queryParam.timeType = value + // console.log(this.queryParam.timeType) + }, + 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.dayUtilizationRate,this.queryParam).then(res => { + if (res.success) { + this.spaceTime.push(res.result.dataList) + for(var i = 0;i<res.result.dayRateDto.length;i++){ + this.useingRates.push(res.result.dayRateDto[i].utilizationRate) + } + // console.log(this,spaceTime) + this.drawTu() + } else { + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + this.loading = false + }) + }, + numFilter(value) { + if (value) { + return parseFloat((value * 100).toFixed(2)) + } else { + return '0' + } + }, + searchQuery(){ + this.spaceTime = [] + this.useingRates = [] + 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.dayUtilizationRate,this.queryParam).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.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + this.loading = false + }) + }, + 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.$message.warning(res.message) + 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.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + this.loading = false + }) + } + + }, + initEquipment(id) { + let _this = this + getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => { + if (res.success) { + if (res.result != null) { + _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName) + _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId) + _this.$set(this.queryParam, 'equipmentId', res.result.equipmentId) + _this.equipment = res.result + _this.searchQuery() + } else { + this.queryParams = {} + // this.queryList() + this.equipment = {} + // _this.$message.warning('璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); + } + }else{ + // this.$message.warning(res.message) + _this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + + } + }) + }, + initEquipmentDep(id) { + let _this = this + getAction(this.url.getEquipmentByDepPid, { pid: id }).then((res) => { + if (res.success) { + if (res.result != null) { + _this.$set(this.queryParams, 'equipmentName', res.result.equipmentName) + _this.$set(this.queryParams, 'equipmentId', res.result.equipmentId) + _this.$set(this.queryParam, 'equipmentId', res.result.equipmentId) + _this.equipment = res.result + _this.searchQuery() + } else { + this.queryParams = {} + // this.queryList() + this.equipment = {} + // _this.$message.warning('璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); + } + }else{ + // this.$message.warning(res.message) + _this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }) + } + }, + 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() + + }, + } +</script> + +<style lang="less" scoped> + /*@import '~@assets/less/common.less';*/ + + @media screen and (min-width: 1920px){ + .device_list{ + height: 811px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1680px) and (max-width: 1920px){ + .device_list{ + height: 811px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1400px) and (max-width: 1680px){ + .device_list{ + height: 663px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1280px) and (max-width: 1400px){ + .device_list{ + height: 564px!important; + overflow: scroll; + } + } + @media screen and (max-width: 1280px){ + .device_list{ + height: 564px!important; + overflow: scroll; + } + } + /*.device_list{*/ + /*display: flex;*/ + /*}*/ + /*.device_list .table-page-search-wrapper{*/ + /**/ + /*}*/ + /deep/ .ant-card-body{ + height: 100%!important; + } + .device_list .com_box{ + display: flex!important; + height: 100%!important; + flex-direction: column!important; + } + .device_list .table-page-search-wrapper{ + height: 6%!important; + } + .device_list #DeviceList{ + height: 90%!important; + } +</style> diff --git a/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue b/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue index e186541..b7191fc 100644 --- a/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue +++ b/src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue @@ -180,10 +180,18 @@ } httpAction(httpurl, this.model, method).then((res) => { if (res.success) { - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok'); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false; diff --git a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateEdit.vue b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateEdit.vue index 822fc8c..8828b41 100644 --- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateEdit.vue +++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateEdit.vue @@ -33,7 +33,7 @@ </a-row> <a-row :gutter="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-row> </a-form> @@ -242,27 +242,67 @@ if (!err) { that.confirmLoading = true let formData = Object.assign(this.model, values) - let obj - if (!this.model.id) { - obj = postAction(this.url.add, formData) - } else { - obj = requestPut(this.url.edit, formData, { - id: this.model.id + let stat = formData.processQuantity + let end = formData.unqualifiedQuantity + if(end>stat){ + // that.$message.warning("涓嶅悎鏍兼暟閲忓繀椤诲皬浜庣瓑浜庡姞宸ユ暟閲�"); + that.$notification.warning({ + message:'娑堟伅', + description:"涓嶅悎鏍兼暟閲忓繀椤诲皬浜庣瓑浜庡姞宸ユ暟閲�" + }); + that.confirmLoading = false + }else{ + let obj + if (!this.model.id) { + obj = postAction(this.url.add, formData) + } else { + obj = requestPut(this.url.edit, formData, { + id: this.model.id + }) + } + obj.then((res) => { + if (res.success) { + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); + // that.$message.success(res.message) + that.$emit('ok', res.result) + } else { + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + that.confirmLoading = false + that.close() }) } - obj.then((res) => { - if (res.success) { - that.$message.success("淇敼鎴愬姛") - // that.$message.success(res.message) - that.$emit('ok', res.result) - } else { - that.$message.warning(res.message) - } - }).finally(() => { - that.confirmLoading = false - that.close() - }) + // let start = moment(formData.startTime).format('YYYY-MM-DD HH:mm:ss'); + // let end = moment(formData.endTime).format('YYYY-MM-DD HH:mm:ss'); + // let startOne = start.replace(/:/g,''); + // let endOne = end.replace(/:/g,''); + // var data = new Date(); + // let stertDate = moment(data).format("YYYY-MM-DD HH:mm:ss"); + // let dataStart = stertDate.replace(/:/g,''); + // if(startOne < dataStart){ + // that.$message.warning("寮�濮嬫椂闂翠笉鑳藉皬浜庡綋鍓嶆椂闂�") + // that.confirmLoading = false + // }else{ + // if(startOne>=endOne){ + // that.$message.warning("缁撴潫鏃堕棿涓嶈兘灏忎簬寮�濮嬫椂闂�"); + // // console.log(this.model) + // // this.endTime = '' + // that.confirmLoading = false + // }else{ + } + // } + + // } }) }, handleCancel() { diff --git a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue index 03de38d..3b6c3a4 100644 --- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue +++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue @@ -35,6 +35,7 @@ <div class="table-operator" style="display: inline;"> <a-button @click="handleAdd" type="primary" icon="plus">鏂板 </a-button> + <a-button type="primary" icon="download" @click="importTemplate('鍚堟牸鐜囨ā鏉�')">瀵煎叆妯℃澘</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> @@ -195,8 +196,8 @@ delete: '/mdc/mdcPassRate/delete', deleteBatch: '/mdc/mdcPassRate/deleteBatch', getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid', - exportXlsUrl: "/mdc/mdcStandardProcessDuration/exportXls", - importExcelUrl: "/mdc/mdcStandardProcessDuration/importExcel", + exportXlsUrl: "/mdc/mdcPassRate/exportXls", + importExcelUrl: "/mdc/mdcPassRate/importExcel", } } }, @@ -239,6 +240,15 @@ }, }, methods: { + importTemplate(fileName){ + var a = document.createElement("a"); + a.href = "/static/鍚堟牸鐜囩鐞�.xls"; + a.download = "鍚堟牸鐜囩鐞�.xls"; + a.style.display = "none"; + document.body.appendChild(a); + a.click(); + a.remove(); + }, dateParamChange(v1, v2) { // console.log(v1,v2) this.queryParam.startTime = v2[0] @@ -318,7 +328,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -363,7 +377,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -401,7 +419,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -443,7 +465,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -477,7 +503,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -499,10 +529,18 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(1) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.searchQuery(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); }, @@ -512,7 +550,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -529,11 +571,19 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; @@ -572,7 +622,11 @@ _this.equipment = res.result _this.searchQuery() } else { - _this.$message.warning('璇烽厤缃澶囷紒') + // _this.$message.warning('璇烽厤缃澶囷紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); } } }) @@ -591,7 +645,7 @@ param.equipmentId = this.queryParams.equipmentId; param.startTime = this.queryParam.startTime; param.endTime = this.queryParam.endTime; - console.log("瀵煎嚭鍙傛暟",param) + // console.log("瀵煎嚭鍙傛暟",param) downFile(this.url.exportXlsUrl,param).then((data)=>{ if (!data) { this.$message.warning("鏂囦欢涓嬭浇澶辫触") diff --git a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue index 352001c..09d01ed 100644 --- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue +++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue @@ -33,7 +33,7 @@ <a-row :gutter="24"> <a-col :span="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" :maxLength ="20" ></a-textarea> </a-form-item> </a-col> </a-row> @@ -227,7 +227,11 @@ let stat = formData.processQuantity let end = formData.unqualifiedQuantity if(end>stat){ - that.$message.warning("涓嶅悎鏍兼暟閲忓繀椤诲皬浜庣瓑浜庡姞宸ユ暟閲�"); + // that.$message.warning("涓嶅悎鏍兼暟閲忓繀椤诲皬浜庣瓑浜庡姞宸ユ暟閲�"); + that.$notification.warning({ + message:'娑堟伅', + description:"涓嶅悎鏍兼暟閲忓繀椤诲皬浜庣瓑浜庡姞宸ユ暟閲�" + }); that.confirmLoading = false }else{ let obj @@ -240,11 +244,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModalList.vue b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModalList.vue index 270c9d8..86d898c 100644 --- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModalList.vue +++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModalList.vue @@ -1,13 +1,14 @@ + <template> - <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" + <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="6" :sm="6"> - <a-form-item label="閮ㄩ棬" > + <a-col :md="6" :sm="6" v-if="isDepartType == 0"> + <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0"> <!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />--> <a-tree-select v-model="value" @@ -17,16 +18,16 @@ placeholder="璇烽�夋嫨閮ㄩ棬" tree-default-expand-all > - <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> - <!--Child Node1 {{ value }}--> - <!--</span>--> + <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> + <!--Child Node1 {{ value }}--> + <!--</span>--> </a-tree-select> </a-form-item> </a-col> <a-col :md="6" :sm="6"> <a-form-item label="杞﹂棿" > - <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>--> + <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>--> <a-tree-select v-model="valueProduct" style="width: 100%" @@ -63,7 +64,7 @@ </div> <!-- table鍖哄煙-begin --> <div> - <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns" + <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> @@ -75,6 +76,7 @@ </template> <script> + import {mapActions} from 'vuex' import { ajaxGetSelectItems } from '@/api/api' @@ -95,7 +97,7 @@ import moment from 'moment' export default { - name: 'DeviceRepairListModel', + name: 'DeviceCalendarListModel', mixins: [JeecgListMixin], components: { JDictSelectTag, @@ -112,17 +114,30 @@ }, data() { return { - treeData:[], - readOnly:true, + isDepartType:'', + /*readOnly:true,*/ title:'', visible: false, - disableMixinCreated: true, - queryParam: {}, - columns: [{ - title: '璁惧缂栫爜', - align: 'center', - dataIndex: 'equipmentId', - }, + SelectedList:[], + treeData:[], + /*disableMixinCreated: true, + queryParam: {},*/ + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + },{ + + title: '璁惧缂栫爜', + align: 'center', + dataIndex: 'equipmentId', + }, { title: '璁惧鍚嶇О', align: 'center', @@ -131,13 +146,13 @@ { title: '椹卞姩绫诲瀷', align: 'center', - dataIndex: 'driveType', + dataIndex: 'driveType' }, { title: '鏁版帶绯荤粺', align: 'center', - dataIndex: 'controlSystem', - } + dataIndex: 'controlSystem' + }, ], sectionPData: [], sectionData: [], @@ -151,7 +166,7 @@ } }, created() { - + this.queryTreeData() }, watch: { value(value) { @@ -162,18 +177,21 @@ this.queryParam.productionId = value } }, - methods: { - openPage() { - this.visible = true - this.onClearSelected() - this.dataSource = []; - this.queryParam = { - status: this.status - }; - this.loadData(); - this.initOptions(); - this.initGroupOptions() + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) }, onSelectChange(selectedRowKeys, selectionRows) { // this.SelectedList.push(selectedRowKeys); @@ -181,6 +199,29 @@ this.selectionRows = selectionRows // this.SelectedList =[...this.SelectedList,...selectionRows]; // console.log(this.SelectedList); + }, + handleTableChange(pagination, filters, sorter) { + // this.onClearSelected() + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + this.loadData(); + }, + openPage() { + this.visible = true + this.onClearSelected() + this.dataSource = []; + this.queryParam = { + status: this.status + }; + + this.loadData(); + this.initOptions(); + this.initGroupOptions() }, loadData(arg) { if(!this.url.list){ @@ -211,7 +252,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -220,6 +265,7 @@ modalFormOk(val) { // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 this.loadData(); + this.selectedRowKeys = [val.id]; }, searchQuery() { @@ -241,6 +287,8 @@ this.close() }, handleOk() { + // this.selectionRows = this.SelectedList; + // console.log(this.selectionRows); this.$emit('sendSelectionRows', this.selectionRows) this.close() }, @@ -249,7 +297,11 @@ if (res.success) { this.treeData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -260,7 +312,11 @@ if (res.success) { this.sectionData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue index ee36381..27b1b18 100644 --- a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue +++ b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue @@ -35,6 +35,7 @@ <div class="table-operator" style="display: inline;"> <a-button @click="handleAdd" type="primary" icon="plus">鏂板 </a-button> + <a-button type="primary" icon="download" @click="importTemplate('鍔犲伐鏁伴噺妯℃澘')">瀵煎叆妯℃澘</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> @@ -243,6 +244,15 @@ }, }, methods: { + importTemplate(fileName){ + var a = document.createElement("a"); + a.href = "/static/鍔犲伐鏁伴噺.xls"; + a.download = "鍔犲伐鏁伴噺.xls"; + a.style.display = "none"; + document.body.appendChild(a); + a.click(); + a.remove(); + }, dateParamChange(v1, v2) { // console.log(v1,v2) this.queryParam.startTime = v2[0] @@ -322,7 +332,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -367,7 +381,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -405,7 +423,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -447,7 +469,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -481,7 +507,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -503,10 +533,18 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(1) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.searchQuery(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); }, @@ -516,7 +554,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -533,11 +575,19 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; @@ -576,8 +626,13 @@ _this.equipment = res.result _this.searchQuery() } else { - _this.$message.warning('璇烽厤缃澶囷紒') + // _this.$message.warning('璇烽厤缃澶囷紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); } + } }) }, @@ -595,7 +650,7 @@ param.equipmentId = this.queryParams.equipmentId; param.startTime = this.queryParam.startTime; param.endTime = this.queryParam.endTime; - console.log("瀵煎嚭鍙傛暟",param) + // console.log("瀵煎嚭鍙傛暟",param) downFile(this.url.exportXlsUrl,param).then((data)=>{ if (!data) { this.$message.warning("鏂囦欢涓嬭浇澶辫触") diff --git a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModal.vue b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModal.vue index 604401a..7a54404 100644 --- a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModal.vue +++ b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModal.vue @@ -57,7 +57,7 @@ <a-row :gutter="24"> <a-col :span="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong1" :wrapperCol="wrapperColLong1"> - <a-textarea v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-col> </a-row> @@ -274,11 +274,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModalList.vue b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModalList.vue index c6a7d67..1e142d7 100644 --- a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModalList.vue +++ b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModalList.vue @@ -230,7 +230,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -268,7 +272,11 @@ if (res.success) { this.treeData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -279,7 +287,11 @@ if (res.success) { this.sectionData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModelEdit.vue b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModelEdit.vue index 657c7d6..c342b4e 100644 --- a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModelEdit.vue +++ b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityModelEdit.vue @@ -60,7 +60,7 @@ <a-row :gutter="24"> <a-col :span="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-col> </a-row> @@ -281,11 +281,20 @@ } obj.then((res) => { if (res.success) { - that.$message.success("淇敼鎴愬姛") + + // that.$message.success("淇敼鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"淇敼鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationEdit.vue b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationEdit.vue index 884826a..d55c64e 100644 --- a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationEdit.vue +++ b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationEdit.vue @@ -44,7 +44,7 @@ </a-row> <a-row :gutter="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-row> </a-form> @@ -263,11 +263,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("淇敼鎴愬姛") + // that.$message.success("淇敼鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"淇敼鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue index be6a8f5..7f40144 100644 --- a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue +++ b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue @@ -35,6 +35,7 @@ <div class="table-operator" style="display: inline;"> <a-button @click="handleAdd" type="primary" icon="plus">鏂板 </a-button> + <a-button type="primary" icon="download" @click="importTemplate('鏍囧噯鍔犲伐鏃堕棿妯℃澘')">瀵煎叆妯℃澘</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> @@ -233,6 +234,15 @@ }, }, methods: { + importTemplate(fileName){ + var a = document.createElement("a"); + a.href = "/static/鏍囧噯鍔犲伐鏃堕棿.xls"; + a.download = "鏍囧噯鍔犲伐鏃堕棿.xls"; + a.style.display = "none"; + document.body.appendChild(a); + a.click(); + a.remove(); + }, dateParamChange(v1, v2) { // console.log(v1,v2) this.queryParam.startTime = v2[0] @@ -312,7 +322,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -357,7 +371,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -395,7 +413,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -437,7 +459,11 @@ this.ipagination.total = 0; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -471,7 +497,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -493,10 +523,18 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(1) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.searchQuery(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); }, @@ -506,7 +544,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -523,11 +565,19 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; @@ -566,7 +616,11 @@ _this.equipment = res.result _this.searchQuery() } else { - _this.$message.warning('璇烽厤缃澶囷紒') + // _this.$message.warning('璇烽厤缃澶囷紒') + _this.$notification.warning({ + message:'娑堟伅', + description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒' + }); } } }) diff --git a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue index 9dfbc82..a72a331 100644 --- a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue +++ b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue @@ -38,7 +38,7 @@ <a-row :gutter="24"> <a-col :span="24"> <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + <a-textarea :maxLength="20" v-decorator="['remark', validatorRules.remark]" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> </a-form-item> </a-col> </a-row> @@ -256,11 +256,19 @@ } obj.then((res) => { if (res.success) { - that.$message.success("娣诲姞鎴愬姛") + // that.$message.success("娣诲姞鎴愬姛") + that.$notification.success({ + message:'娑堟伅', + description:"娣诲姞鎴愬姛" + }); // that.$message.success(res.message) that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModalList.vue b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModalList.vue index 270c9d8..86d898c 100644 --- a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModalList.vue +++ b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModalList.vue @@ -1,13 +1,14 @@ + <template> - <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" + <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="6" :sm="6"> - <a-form-item label="閮ㄩ棬" > + <a-col :md="6" :sm="6" v-if="isDepartType == 0"> + <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0"> <!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />--> <a-tree-select v-model="value" @@ -17,16 +18,16 @@ placeholder="璇烽�夋嫨閮ㄩ棬" tree-default-expand-all > - <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> - <!--Child Node1 {{ value }}--> - <!--</span>--> + <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> + <!--Child Node1 {{ value }}--> + <!--</span>--> </a-tree-select> </a-form-item> </a-col> <a-col :md="6" :sm="6"> <a-form-item label="杞﹂棿" > - <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>--> + <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>--> <a-tree-select v-model="valueProduct" style="width: 100%" @@ -63,7 +64,7 @@ </div> <!-- table鍖哄煙-begin --> <div> - <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns" + <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> @@ -75,6 +76,7 @@ </template> <script> + import {mapActions} from 'vuex' import { ajaxGetSelectItems } from '@/api/api' @@ -95,7 +97,7 @@ import moment from 'moment' export default { - name: 'DeviceRepairListModel', + name: 'DeviceCalendarListModel', mixins: [JeecgListMixin], components: { JDictSelectTag, @@ -112,17 +114,30 @@ }, data() { return { - treeData:[], - readOnly:true, + isDepartType:'', + /*readOnly:true,*/ title:'', visible: false, - disableMixinCreated: true, - queryParam: {}, - columns: [{ - title: '璁惧缂栫爜', - align: 'center', - dataIndex: 'equipmentId', - }, + SelectedList:[], + treeData:[], + /*disableMixinCreated: true, + queryParam: {},*/ + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + },{ + + title: '璁惧缂栫爜', + align: 'center', + dataIndex: 'equipmentId', + }, { title: '璁惧鍚嶇О', align: 'center', @@ -131,13 +146,13 @@ { title: '椹卞姩绫诲瀷', align: 'center', - dataIndex: 'driveType', + dataIndex: 'driveType' }, { title: '鏁版帶绯荤粺', align: 'center', - dataIndex: 'controlSystem', - } + dataIndex: 'controlSystem' + }, ], sectionPData: [], sectionData: [], @@ -151,7 +166,7 @@ } }, created() { - + this.queryTreeData() }, watch: { value(value) { @@ -162,18 +177,21 @@ this.queryParam.productionId = value } }, - methods: { - openPage() { - this.visible = true - this.onClearSelected() - this.dataSource = []; - this.queryParam = { - status: this.status - }; - this.loadData(); - this.initOptions(); - this.initGroupOptions() + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) }, onSelectChange(selectedRowKeys, selectionRows) { // this.SelectedList.push(selectedRowKeys); @@ -181,6 +199,29 @@ this.selectionRows = selectionRows // this.SelectedList =[...this.SelectedList,...selectionRows]; // console.log(this.SelectedList); + }, + handleTableChange(pagination, filters, sorter) { + // this.onClearSelected() + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + this.loadData(); + }, + openPage() { + this.visible = true + this.onClearSelected() + this.dataSource = []; + this.queryParam = { + status: this.status + }; + + this.loadData(); + this.initOptions(); + this.initGroupOptions() }, loadData(arg) { if(!this.url.list){ @@ -211,7 +252,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -220,6 +265,7 @@ modalFormOk(val) { // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 this.loadData(); + this.selectedRowKeys = [val.id]; }, searchQuery() { @@ -241,6 +287,8 @@ this.close() }, handleOk() { + // this.selectionRows = this.SelectedList; + // console.log(this.selectionRows); this.$emit('sendSelectionRows', this.selectionRows) this.close() }, @@ -249,7 +297,11 @@ if (res.success) { this.treeData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, @@ -260,7 +312,11 @@ if (res.success) { this.sectionData = res.result } else { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } diff --git a/src/views/mdc/base/modules/mdcUtilizationRate/MdcUtilizationRateModel.vue b/src/views/mdc/base/modules/mdcUtilizationRate/MdcUtilizationRateModel.vue index 7150b82..9a6d8f9 100644 --- a/src/views/mdc/base/modules/mdcUtilizationRate/MdcUtilizationRateModel.vue +++ b/src/views/mdc/base/modules/mdcUtilizationRate/MdcUtilizationRateModel.vue @@ -114,10 +114,18 @@ id: this.model.id }).then((res) => { if (res.success) { - that.$message.success("淇濆瓨鎴愬姛") + // that.$message.success("淇濆瓨鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"淇濆瓨鎴愬姛" + }); that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue b/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue new file mode 100644 index 0000000..0fe423b --- /dev/null +++ b/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue @@ -0,0 +1,550 @@ +<template> + <div class="efficiency_list" style="width: 100%;height: 100%;"> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :md="6" :sm="6"> + <a-form-item label="鏃堕棿"> + <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/> + </a-form-item> + </a-col> + <a-col :md="7" :sm="7" :xs="7"> + <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('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd" /> + </a-form-item> + </a-col> + <a-col :lg="2" :md="3" :sm="3" :xs="3"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </a-col> + </a-row> + </a-form> + </div> + <div id="DeviceList"> + <div class="openRateTrendDg"> + <div id="Efficiency" class="container" style="margin-top: 20px;"> + <div class="table2"> + <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap;text-align: center;"> + <thead> + <tr class="thead fixed equipname"> + <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">璁惧缂栧彿</th> + <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">璁惧鍚嶇О</th> + <th class="thgu dong3 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧绫诲瀷</th> + <template v-for="(tableHead, index) in tableHeads"> + <th class="timeth">{{tableHead}}</th> + </template> + </tr> + </thead> + <tbody> + <tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)"> + <td class="tdgu kaitou">{{item.equipmentId}}</td> + <td class="tdgu1 kaitou">{{item.equipmentName}}</td> + <td class="tdgu2 kaitou">{{item.equipmentType}}</td> + <template v-for="(tableHead, index) in item.dataList"> + <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td> + </template> + </tr> + </tbody> + </table> + </div> + </div> + </div> + <div id="openRateTrendChart" style="width: 100%;height: 60%"></div> + </div> + </a-card> + </div> +</template> + +<script> + import moment from 'moment' + import { putAction, getAction } from '@/api/manage' + import $ from 'jquery' + import '@/components/table2excel/table2excel' + import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + import { + JeecgListMixin + } from '@/mixins/JeecgListMixin' + export default { + // mixins: [JeecgListMixin], + name: 'openRateFractionAnalysisMain', + components: {}, + data() { + return { + dataSource: [], + /* table鍔犺浇鐘舵�� */ + loading: false, + typeTree: "", + typeParent: 1, + typeEquipment: 1, + TreeIDOne: 1, + TreeIDTwo: 2, + deviceTypeDict: '', + dates: [], + identifying: [], + queryParam: {}, + queryParams: {}, + queryParamEquip: {}, + queryParamPeople: {}, + efficiencyOptions: [ + { label: '鍒╃敤鐜�', value: 'lyl' }, + { label: '寮�鏈虹巼', value: 'kjl' }, + { label: '寮�鏈烘椂闂�', value: 'kjsj' }, + { label: '鍔犲伐鏃堕棿', value: 'jgsj' }, + { label: '寰呮満鏃堕棿', value: 'djsj' }, + { label: '鍏虫満鏃堕棿', value: 'gjsj' } + ], + checkedList: ['lyl'], + dataList: [], + url: { + efficiencyList: '/mdc/efficiencyReport/utilizationRateSectionAnalyze', + listByType: '/mdc/MdcUtilizationRate/getByType' + }, + tableHeads: [], + XData:[0], + YData:[0], + } + }, + props: { nodeTree: '', Type: '', nodePeople: '' }, + /** + * 鐢熷懡鍛ㄦ湡 鎸傝浇鍓� + * */ + created() { + this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)] + this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') + this.queryParam.startTime = '00:00' + this.queryParam.endTime = "08:00" + this.queryParam.typeTree = "1" + this.loadData1() + + }, + watch: { + Type(valmath) { + this.dataList = []; + this.queryParam.typeTree = valmath + }, + nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + if (JSON.stringify(val) != '{}') { + if (val.equipmentId != null) { + this.queryParamEquip.parentId = '' + this.queryParamEquip.equipmentId = val.equipmentId + } else { + this.queryParamEquip.parentId = val.key + this.queryParamEquip.equipmentId = '' + } + /*杩欓噷浣犳槸鐩戝惉鍒版爲寰楀彉鍖� 鏄笉鏄姹備竴娆�*/ + this.searchQuery() + } + }, + nodePeople(val) { + if (JSON.stringify(val) != '{}') { + if (val.equipmentId != null) { + this.queryParamPeople.parentId = val.equipmentId + this.queryParamPeople.equipmentId = '' + } else { + this.queryParamPeople.parentId = val.key + this.queryParamPeople.equipmentId = '' + } + this.searchQuery() + } + } + }, + filters: { + numFilter(value) { + if (value) { + return parseFloat((value * 100).toFixed(2)) + } else { + return '0' + } + } + }, + methods: { + moment, + onChangeStart(time, timeString) { + this.queryParam.startTime = timeString + // console.log(time, timeString); + }, + onChangeEnd(time, timeString) { + this.queryParam.endTime = timeString + // console.log(time, timeString); + }, + numBerTwo(value){ + if (value) { + return parseFloat((value * 100).toFixed(2)) + } else { + return '0' + } + }, + TableDraw(key,val) { + this.XData=[0] + this.YData[0] + var Xarr = [] + var Yarr = [] + for (var i = 0; i < val.dataList.length; i++) { + Xarr.push(val.dataList[i].theDate) + Yarr.push(this.numBerTwo(val.dataList[i].utilizationRate)) + } + this.XData=Xarr + this.YData=Yarr + // if(this.openRateTrendAnalysisChart !=null && this.openRateTrendAnalysisChart != '' && this.openRateTrendAnalysisChart != undefined){ + // this.openRateTrendAnalysisChart.dispose() + // } + + this.draw() + }, + //Can not slect days before today and today + disabledDate(current) { + return current && current > moment().subtract('days', 1); + }, + dateParamChange(v1, v2) { + this.queryParam.startDate = v2[0] + this.queryParam.endDate = v2[1] + }, + searchQuery() { + if (this.queryParam.typeTree == "1") { + this.queryParam.parentId = this.queryParamEquip.parentId + this.queryParam.equipmentId = this.queryParamEquip.equipmentId + } else { + this.queryParam.parentId = this.queryParamPeople.parentId + this.queryParam.equipmentId = "" + } + this.loadData1() + // this.onClearSelected() + }, + // searchReset() { + // this.typeTree = this.queryParam.typeTree + // this.typeParent = this.queryParam.parentId + // this.typeEquipment = this.queryParam.equipmentId + // this.queryParam = {} + // this.dates = [] + // this.queryParam.typeTree = this.typeTree + // this.queryParam.parentId = this.typeParent + // this.queryParam.equipmentId = this.typeEquipment + // // this.ipagination.current = 1 + // this.loadData1(); + // // this.queryParam = {} + // // this.dates = [] + // // this.loadData() + // // this.onClearSelected() + // }, + // loadData1() { + // let that = this + // that.columns=[ + // { + // title: '璁惧缂栧彿', + // align: 'center', + // dataIndex: 'equipmentId', + // width:'150px' + // }, + // { + // title: '璁惧鍚嶇О', + // align: 'center', + // dataIndex: 'equipmentName', + // width:'150px' + // }, + // ] + // that.tableHeads = [] + // that.dataList = [] + // getAction(this.url.efficiencyList, that.queryParam).then(res => { + // var tmp = {} + // console.log(res) + // if (res.success) + // + // that.dataSource = res.result.mdcEfficiencyList + // for(var k = 0;k<that.dataSource[0].dataList.length;k++){ + // that.columns.push( + // { + // title:that.dataSource[0].dataList.theDate, + // align: 'center', + // width:'120px', + // // dataIndex:'utilizationRate', + // } + // ) + // } + // for(var i = 0;i<that.dataSource.length;i++){ + // for (var j = 0; j < that.dataSource[i].dataList.length;j++){ + // // that.columns.push( + // // { + // // title:that.dataSource[0].dataList[j].theDate, + // // align: 'center', + // // width:'120px', + // // dataIndex:'utilizationRate', + // // } + // // ) + // } + // + // } + // console.log(that.columns) + // console.log(that.dataSource) + // // this.initDeviceType(this.dataList) + // this.draw() + // } + // } + loadData1() { + this.tableHeads = [] + this.dataList = [] + getAction(this.url.efficiencyList, this.queryParam).then(res => { + if (res.success) { + this.tableHeads = res.result.dates + this.dataList = res.result.mdcEfficiencyList + this.draw() + // this.checkSameData(this.dataList) + // this.checkSameData1(this.dataList) + // this.checkSameData2(this.dataList) + // this.combineCell(); + // this.initDeviceType(this.dataList) + + } + }) + }, + draw(){ + let openRateTrendAnalysisChart = this.$echarts.init(document.getElementById('openRateTrendChart'), 'macarons'); + let openRateTrendChartOptions = { + title: { + text: '鍒╃敤鐜囪蛋鍔垮垎鏋�', + x: 'center', + textStyle: { + fontSize: 18, + fontWeight: 'bolder', + color: "#151414" + } + }, + tooltip: { + trigger: 'axis' + }, + toolbox: { + show: true, + feature: { + mark: { show: true }, + dataView: { show: true, readOnly: false }, + magicType: { show: true, type: ['line', 'bar'] }, + restore: { show: true }, + saveAsImage: { show: true } + } + }, + calculable: true, + xAxis: [ + { + type: 'category', + data: this.XData + } + ], + yAxis: [ + { + type: 'value' + } + ], + series: [ + { + name: '鍒╃敤鐜�', + type: 'line', + data: this.YData, + markPoint: { + data: [ + { type: 'max', name: '鏈�澶у��', symbolSize: 70 }, + { type: 'min', name: '鏈�灏忓��', symbolSize: 70 } + ] + }, + markLine: { + data: [ + { type: 'average', name: '骞冲潎鍊�' } + ] + } + } + ] + }; + openRateTrendAnalysisChart.setOption(openRateTrendChartOptions,true); + } + } + } +</script> +<style scoped> + .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; + } + + /*.dataContent .fixed th {*/ + /*width: 50px;*/ + /*}*/ + + .dataContent .thead th { + background-color: #fafafa; + text-align: center; + height: 30px; + padding: 5px; + } + + .dataContent .notfixed th { + /*width: auto;*/ + } + + .dataContent tr td { + height: 35px; + } + + .dataContent .mathData td { + padding: 10px; + /*display: none;*/ + } + .dataContent .mathData:hover td{ + background-color: #e6f7ff; + } + .dataContent .mathData .td { + /*background-color: #ff9bd2;*/ + display: inline-block; + padding: 10px; + } + + .dataContent .mathData .tdd { + /*display: none;*/ + } + .table2{ + width: 100%; + height: 100%; + overflow: auto; + } + /*tr th {*/ + /*height: 50px!important;*/ + /*}*/ + /*tr td{*/ + /*height: 50px!important;*/ + /*}*/ + .table2 thead tr th:first-child, + .table tbody tr .tdgu{ + position: sticky; + left: 0; + z-index: 1; + } + .table tbody tr .kaitou{ + z-index: 1; + background-color: white; + } + .table tbody tr .tdgu1{ + position: sticky; + left: 150px; + z-index: 2; + } + .table tbody tr .tdgu2{ + position: sticky; + left: 300px; + z-index: 2; + } + .table tbody tr .tdgu3{ + position: sticky; + left: 450px; + z-index: 2; + } + .table tbody tr .tdgu4{ + position: sticky; + left: 550px; + z-index: 2; + } + .table tbody tr .tdgu5{ + position: sticky; + left: 700px; + z-index: 2; + } + .table2 thead tr .timeth, + .table2 thead tr .thgu { + position: sticky; + top:0; + z-index: 3; + } + .table2 thead .gudingth th{ + position: sticky; + top: 32px; + z-index: 6!important; + } + .table2 thead .equipname .name{ + z-index: 3; + } + .table2 thead .equipname .dong1{ + z-index: 4; + left: 0; + /*border: 1px solid #000;*/ + } + .table2 thead .equipname .dong2{ + z-index: 5; + left: 150px; + } + .table2 thead .equipname .dong3{ + z-index: 5; + left: 300px; + } + .table2 thead .equipname .dong4{ + z-index: 5; + left: 450px; + } + .table2 thead .equipname .dong5{ + z-index: 5; + left: 550px; + } + .table2 thead .equipname .dong6{ + z-index: 5; + left: 700px; + } + + @media screen and (min-width: 1920px){ + #Efficiency{ + height: 337px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1680px) and (max-width: 1920px){ + #Efficiency{ + height: 337px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1400px) and (max-width: 1680px){ + #Efficiency{ + height: 190px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1280px) and (max-width: 1400px){ + #Efficiency{ + height: 90px!important; + overflow: scroll; + } + } + @media screen and (max-width: 1280px){ + #Efficiency{ + height: 90px!important; + overflow: scroll; + } + } + #Efficiency .table_guding1{ + position: absolute; + overflow: hidden; + width: 500px; + } + #Efficiency .table_guding2{ + overflow-x: scroll; + width: 500px; + } + /deep/ .ant-card{ + height: 100%!important; + } + /deep/ .ant-card .ant-card-body{ + height: 100%!important; + } + .efficiency_list #DeviceList{ + height: 90%!important; + } +</style> \ No newline at end of file diff --git a/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue b/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue new file mode 100644 index 0000000..56024fc --- /dev/null +++ b/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue @@ -0,0 +1,558 @@ +<template> + <div class="efficiency_list" style="width: 100%;height: 100%;"> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :md="6" :sm="6"> + <a-form-item label="鏃堕棿"> + <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/> + </a-form-item> + </a-col> + <a-col :lg="2" :md="3" :sm="3" :xs="3"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </a-col> + </a-row> + </a-form> + </div> + <div id="DeviceList"> + <div class="openRateTrendDg"> + <div id="Efficiency" class="container" style="margin-top: 20px;"> + <div class="table2"> + <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap;text-align: center;"> + <thead> + <tr class="thead fixed equipname"> + <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">璁惧缂栧彿</th> + <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">璁惧鍚嶇О</th> + <th class="thgu dong3 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">璁惧绫诲瀷</th> + <template v-for="(tableHead, index) in tableHeads"> + <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> + </template> + </tr> + </thead> + <tbody> + <tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)"> + <td class="tdgu kaitou">{{item.equipmentId}}</td> + <td class="tdgu1 kaitou">{{item.equipmentName}}</td> + <td class="tdgu2 kaitou">{{item.equipmentType}}</td> + <template v-for="(tableHead, index) in item.dataList"> + <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td> + </template> + </tr> + </tbody> + </table> + </div> + </div> + </div> + <div id="openRateTrendChart" style="width: 100%;height: 60%"></div> + </div> + </a-card> + </div> +</template> + +<script> + import moment from 'moment' + import { putAction, getAction } from '@/api/manage' + import $ from 'jquery' + import '@/components/table2excel/table2excel' + import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + import { + JeecgListMixin + } from '@/mixins/JeecgListMixin' + export default { + // mixins: [JeecgListMixin], + name: 'openRateTrendAnalysisMain', + components: {}, + data() { + return { + dataSource: [], + /* table鍔犺浇鐘舵�� */ + loading: false, + typeTree: "", + typeParent: 1, + typeEquipment: 1, + TreeIDOne: 1, + TreeIDTwo: 2, + deviceTypeDict: '', + dates: [], + identifying: [], + queryParam: {}, + queryParams: {}, + queryParamEquip: {}, + queryParamPeople: {}, + efficiencyOptions: [ + { label: '鍒╃敤鐜�', value: 'lyl' }, + { label: '寮�鏈虹巼', value: 'kjl' }, + { label: '寮�鏈烘椂闂�', value: 'kjsj' }, + { label: '鍔犲伐鏃堕棿', value: 'jgsj' }, + { label: '寰呮満鏃堕棿', value: 'djsj' }, + { label: '鍏虫満鏃堕棿', value: 'gjsj' } + ], + checkedList: ['lyl'], + dataList: [], + url: { + efficiencyList: '/mdc/efficiencyReport/utilizationRateTrendAnalyze', + listByType: '/mdc/MdcUtilizationRate/getByType' + }, + tableHeads: [], + XData:[0], + YData:[0], + } + }, + props: { nodeTree: '', Type: '', nodePeople: '' }, + /** + * 鐢熷懡鍛ㄦ湡 鎸傝浇鍓� + * */ + created() { + this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)] + this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') + this.queryParam.typeTree = "1" + this.loadData1() + }, + watch: { + Type(valmath) { + this.dataList = []; + this.queryParam.typeTree = valmath + }, + nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + if (JSON.stringify(val) != '{}') { + if (val.equipmentId != null) { + this.queryParamEquip.parentId = '' + this.queryParamEquip.equipmentId = val.equipmentId + } else { + this.queryParamEquip.parentId = val.key + this.queryParamEquip.equipmentId = '' + } + /*杩欓噷浣犳槸鐩戝惉鍒版爲寰楀彉鍖� 鏄笉鏄姹備竴娆�*/ + this.searchQuery() + } + }, + nodePeople(val) { + if (JSON.stringify(val) != '{}') { + if (val.equipmentId != null) { + this.queryParamPeople.parentId = val.equipmentId + this.queryParamPeople.equipmentId = '' + } else { + this.queryParamPeople.parentId = val.key + this.queryParamPeople.equipmentId = '' + } + this.searchQuery() + } + } + }, + filters: { + numFilter(value) { + if (value) { + return parseFloat((value * 100).toFixed(2)) + } else { + return '0' + } + } + }, + methods: { + numBerTwo(value){ + if (value) { + return parseFloat((value * 100).toFixed(2)) + } else { + return '0' + } + }, + TableDraw(key,val) { + this.XData=[0] + this.YData[0] + var Xarr = [] + var Yarr = [] + for (var i = 0; i < val.dataList.length; i++) { + Xarr.push(val.dataList[i].theDate) + Yarr.push(this.numBerTwo(val.dataList[i].utilizationRate)) + } + this.XData=Xarr + this.YData=Yarr + // if(this.openRateTrendAnalysisChart !=null && this.openRateTrendAnalysisChart != '' && this.openRateTrendAnalysisChart != undefined){ + // this.openRateTrendAnalysisChart.dispose() + // } + + this.draw() + }, + disabledDate(current) { + //Can not slect days before today and today + return current && current > moment().subtract('days', 1); + }, + initDeviceType(deviceList) { + let dictCode = 'mdc_equipmentType' + let items = [] + items = getDictItemsFromCache(dictCode) + if (deviceList && items.length > 0) { + for (let a = 0; a < deviceList.length; a++) { + if (items && items.length > 0) { + for (let i = 0; i < items.length; i++) { + if (deviceList[a].equipmentType == items[i].value) { + deviceList[a].equipmentType = items[i].title + } + } + } else { + ajaxGetDictItems(dictCode, null).then((res) => { + if (res.success) { + let items = res.result + for (let i = 0; i < items.length; i++) { + if (deviceList[a].equipmentType == items[i].value) { + deviceList[a].equipmentType = items[i].title + } + } + } + }) + } + } + } + }, + dateParamChange(v1, v2) { + this.queryParam.startDate = v2[0] + this.queryParam.endDate = v2[1] + }, + searchQuery() { + if (this.queryParam.typeTree == "1") { + this.queryParam.parentId = this.queryParamEquip.parentId + this.queryParam.equipmentId = this.queryParamEquip.equipmentId + } else { + this.queryParam.parentId = this.queryParamPeople.parentId + this.queryParam.equipmentId = "" + } + this.loadData1() + // this.onClearSelected() + }, + // searchReset() { + // this.typeTree = this.queryParam.typeTree + // this.typeParent = this.queryParam.parentId + // this.typeEquipment = this.queryParam.equipmentId + // this.queryParam = {} + // this.dates = [] + // this.queryParam.typeTree = this.typeTree + // this.queryParam.parentId = this.typeParent + // this.queryParam.equipmentId = this.typeEquipment + // // this.ipagination.current = 1 + // this.loadData1(); + // // this.queryParam = {} + // // this.dates = [] + // // this.loadData() + // // this.onClearSelected() + // }, + // loadData1() { + // let that = this + // that.columns=[ + // { + // title: '璁惧缂栧彿', + // align: 'center', + // dataIndex: 'equipmentId', + // width:'150px' + // }, + // { + // title: '璁惧鍚嶇О', + // align: 'center', + // dataIndex: 'equipmentName', + // width:'150px' + // }, + // ] + // that.tableHeads = [] + // that.dataList = [] + // getAction(this.url.efficiencyList, that.queryParam).then(res => { + // var tmp = {} + // console.log(res) + // if (res.success) + // + // that.dataSource = res.result.mdcEfficiencyList + // for(var k = 0;k<that.dataSource[0].dataList.length;k++){ + // that.columns.push( + // { + // title:that.dataSource[0].dataList.theDate, + // align: 'center', + // width:'120px', + // // dataIndex:'utilizationRate', + // } + // ) + // } + // for(var i = 0;i<that.dataSource.length;i++){ + // for (var j = 0; j < that.dataSource[i].dataList.length;j++){ + // // that.columns.push( + // // { + // // title:that.dataSource[0].dataList[j].theDate, + // // align: 'center', + // // width:'120px', + // // dataIndex:'utilizationRate', + // // } + // // ) + // } + // + // } + // console.log(that.columns) + // console.log(that.dataSource) + // // this.initDeviceType(this.dataList) + // this.draw() + // } + // } + loadData1() { + this.tableHeads = [] + this.dataList = [] + getAction(this.url.efficiencyList, this.queryParam).then(res => { + if (res.success) { + this.tableHeads = res.result.dates + this.dataList = res.result.mdcEfficiencyList + this.draw() + // this.checkSameData(this.dataList) + // this.checkSameData1(this.dataList) + // this.checkSameData2(this.dataList) + // this.combineCell(); + // this.initDeviceType(this.dataList) + + } + }) + }, + draw(){ + let openRateTrendAnalysisChart = this.$echarts.init(document.getElementById('openRateTrendChart'), 'macarons'); + let openRateTrendChartOptions = { + title: { + text: '鍒╃敤鐜囪蛋鍔垮垎鏋�', + x: 'center', + textStyle: { + fontSize: 18, + fontWeight: 'bolder', + color: "#151414" + } + }, + tooltip: { + trigger: 'axis' + }, + toolbox: { + show: true, + feature: { + mark: { show: true }, + dataView: { show: true, readOnly: false }, + magicType: { show: true, type: ['line', 'bar'] }, + restore: { show: true }, + saveAsImage: { show: true } + } + }, + calculable: true, + xAxis: [ + { + type: 'category', + data: this.XData + } + ], + yAxis: [ + { + type: 'value' + } + ], + series: [ + { + name: '鍒╃敤鐜�', + type: 'line', + data: this.YData, + markPoint: { + data: [ + { type: 'max', name: '鏈�澶у��', symbolSize: 70 }, + { type: 'min', name: '鏈�灏忓��', symbolSize: 70 } + ] + }, + markLine: { + data: [ + { type: 'average', name: '骞冲潎鍊�' } + ] + } + } + ] + }; + openRateTrendAnalysisChart.setOption(openRateTrendChartOptions,true); + } + } + } +</script> +<style scoped> + .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; + } + + /*.dataContent .fixed th {*/ + /*width: 50px;*/ + /*}*/ + + .dataContent .thead th { + background-color: #fafafa; + text-align: center; + height: 30px; + padding: 5px; + } + + .dataContent .notfixed th { + /*width: auto;*/ + } + + .dataContent tr td { + height: 35px; + } + + .dataContent .mathData td { + padding: 10px; + /*display: none;*/ + } + .dataContent .mathData:hover td{ + background-color: #e6f7ff; + } + .dataContent .mathData .td { + /*background-color: #ff9bd2;*/ + display: inline-block; + padding: 10px; + } + + .dataContent .mathData .tdd { + /*display: none;*/ + } + .table2{ + width: 100%; + height: 100%; + overflow: auto; + } + /*tr th {*/ + /*height: 50px!important;*/ + /*}*/ + /*tr td{*/ + /*height: 50px!important;*/ + /*}*/ + .table2 thead tr th:first-child, + .table tbody tr .tdgu{ + position: sticky; + left: 0; + z-index: 1; + } + .table tbody tr .kaitou{ + z-index: 1; + background-color: white; + } + .table tbody tr .tdgu1{ + position: sticky; + left: 150px; + z-index: 2; + } + .table tbody tr .tdgu2{ + position: sticky; + left: 300px; + z-index: 2; + } + .table tbody tr .tdgu3{ + position: sticky; + left: 450px; + z-index: 2; + } + .table tbody tr .tdgu4{ + position: sticky; + left: 550px; + z-index: 2; + } + .table tbody tr .tdgu5{ + position: sticky; + left: 700px; + z-index: 2; + } + .table2 thead tr .timeth, + .table2 thead tr .thgu { + position: sticky; + top:0; + z-index: 3; + } + .table2 thead .gudingth th{ + position: sticky; + top: 32px; + z-index: 6!important; + } + .table2 thead .equipname .name{ + z-index: 3; + } + .table2 thead .equipname .dong1{ + z-index: 4; + left: 0; + /*border: 1px solid #000;*/ + } + .table2 thead .equipname .dong2{ + z-index: 5; + left: 150px; + } + .table2 thead .equipname .dong3{ + z-index: 5; + left: 300px; + } + .table2 thead .equipname .dong4{ + z-index: 5; + left: 450px; + } + .table2 thead .equipname .dong5{ + z-index: 5; + left: 550px; + } + .table2 thead .equipname .dong6{ + z-index: 5; + left: 700px; + } + + @media screen and (min-width: 1920px){ + #Efficiency{ + height: 337px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1680px) and (max-width: 1920px){ + #Efficiency{ + height: 337px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1400px) and (max-width: 1680px){ + #Efficiency{ + height: 190px!important; + overflow: scroll; + } + } + @media screen and (min-width: 1280px) and (max-width: 1400px){ + #Efficiency{ + height: 90px!important; + overflow: scroll; + } + } + @media screen and (max-width: 1280px){ + #Efficiency{ + height: 90px!important; + overflow: scroll; + } + } + #Efficiency .table_guding1{ + position: absolute; + overflow: hidden; + width: 500px; + } + #Efficiency .table_guding2{ + overflow-x: scroll; + width: 500px; + } + /deep/ .ant-card{ + height: 100%!important; + } + /deep/ .ant-card .ant-card-body{ + height: 100%!important; + } + .efficiency_list #DeviceList{ + height: 90%!important; + } +</style> \ No newline at end of file diff --git a/src/views/mdc/base/modules/shift/ShiftInfo.vue b/src/views/mdc/base/modules/shift/ShiftInfo.vue index c5634c4..7d80453 100644 --- a/src/views/mdc/base/modules/shift/ShiftInfo.vue +++ b/src/views/mdc/base/modules/shift/ShiftInfo.vue @@ -153,10 +153,18 @@ var that = this; deleteAction(that.url.deleteBatch, {id: record}).then((res) => { if (res.success) { - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); }, @@ -164,10 +172,18 @@ let _this = this putAction(this.url.changeStatus, { id: id, status: status }).then((res) => { if (res.success) { - _this.$message.success('鎿嶄綔鎴愬姛锛�') + // _this.$message.success('鎿嶄綔鎴愬姛锛�') + _this.$notification.warning({ + message:'娑堟伅', + description:"鎿嶄綔鎴愬姛" + }); _this.loadData() } else { - that.$message.warning('鎿嶄綔澶辫触锛�') + // _this.$message.warning('鎿嶄綔澶辫触锛�') + _this.$notification.warning({ + message:'娑堟伅', + description:"鎿嶄綔澶辫触" + }); } }) }, diff --git a/src/views/mdc/base/modules/shift/ShiftInfoModel.vue b/src/views/mdc/base/modules/shift/ShiftInfoModel.vue index 8a7d69c..ed99075 100644 --- a/src/views/mdc/base/modules/shift/ShiftInfoModel.vue +++ b/src/views/mdc/base/modules/shift/ShiftInfoModel.vue @@ -169,7 +169,11 @@ // } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -221,7 +225,6 @@ const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 this.form.validateFields((err, values) => { - console.log(values); if (!err) { // debugger that.confirmLoading = true @@ -234,8 +237,17 @@ let startTimeOne = startTime.replace(/:/g,''); let endTimeOne = endTime.replace(/:/g,''); if(startTimeOne>endTimeOne){ - that.$message.warning("闈炶法澶╃彮娆$粨鏉熸椂闂翠笉鑳藉皬浜庣瓑浜庡紑濮嬫椂闂达紒") - that.$message.success("淇濆瓨澶辫触") + // that.$message.warning("闈炶法澶╃彮娆$粨鏉熸椂闂翠笉鑳藉皬浜庣瓑浜庡紑濮嬫椂闂达紒") + that.$notification.warning({ + message:'娑堟伅', + description:"闈炶法澶╃彮娆$粨鏉熸椂闂翠笉鑳藉皬浜庣瓑浜庡紑濮嬫椂闂达紒" + }); + // that.$message.success("淇濆瓨澶辫触") + that.$notification.error({ + message:'娑堟伅', + description:"淇濆瓨澶辫触锛�" + }); + that.confirmLoading = false that.close() }else{ formData.shiftSubStatus = 1 @@ -249,10 +261,18 @@ } obj.then((res) => { if (res.success) { - that.$message.success("淇濆瓨鎴愬姛") + // that.$message.success("淇濆瓨鎴愬姛") + that.$notification.warning({ + message:'娑堟伅', + description:"淇濆瓨鎴愬姛" + }); that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false @@ -271,10 +291,18 @@ } obj.then((res) => { if (res.success) { - that.$message.success("淇濆瓨鎴愬姛") + // that.$message.success + that.$notification.warning({ + message:'娑堟伅', + description:"淇濆瓨鎴愬姛" + }); that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/shift/ShiftSystem.vue b/src/views/mdc/base/modules/shift/ShiftSystem.vue index bc4d4a7..c813c22 100644 --- a/src/views/mdc/base/modules/shift/ShiftSystem.vue +++ b/src/views/mdc/base/modules/shift/ShiftSystem.vue @@ -33,6 +33,9 @@ <a-icon type="down"/> </a> <a-menu slot="overlay"> + <a-menu-item v-if="record.shiftStatus == 1"> + <a key="0" @click="handleDefault(record)">璁剧疆涓洪粯璁�</a> + </a-menu-item> <a-menu-item v-if="record.shiftStatus == 1"> <a key="1" @click="handleEdit(record)">缂栬緫</a> </a-menu-item> @@ -56,8 +59,9 @@ </template> <script> + import qs from 'qs' import { - requestPut, putAction, deleteAction + requestPut, putAction, deleteAction,postAction } from '@/api/manage' import { JeecgListMixin @@ -78,7 +82,8 @@ url: { list: '/mdc/mdcMdcShift/queryPageList', changeStatus: '/mdc/mdcMdcShift/changeStatus', - deleteBatch:'/mdc/mdcMdcShift/deleteShift' + deleteBatch:'/mdc/mdcMdcShift/deleteShift', + changeDefaultShift: '/mdc/mdcMdcShift/changeDefaultShift' }, columns: [ { @@ -115,7 +120,7 @@ _this.$message.success('鎿嶄綔鎴愬姛锛�') _this.loadData() } else { - that.$message.warning('鎿嶄綔澶辫触锛�') + _this.$message.warning('鎿嶄綔澶辫触锛�') } }) }, @@ -123,6 +128,24 @@ this.$refs.modalForm.add() this.$refs.modalForm.title = '鐝埗閰嶇疆' this.$refs.modalForm.disableSubmit = false + }, + handleDefault:function(record){ + postAction(this.url.changeDefaultShift,qs.stringify({id:record.id})).then((res) =>{ + if(res.success){ + // this.$message.success(res.message); + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + this.loadData() + }else{ + // this.$message.success(res.message); + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }) }, handleDelete: function(record){ if(!this.url.deleteBatch){ @@ -132,10 +155,18 @@ var that = this; deleteAction(that.url.deleteBatch, {id: record}).then((res) => { if (res.success) { - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); }, diff --git a/src/views/mdc/base/modules/shift/ShiftSystemModel.vue b/src/views/mdc/base/modules/shift/ShiftSystemModel.vue index 7d7b66c..83bce49 100644 --- a/src/views/mdc/base/modules/shift/ShiftSystemModel.vue +++ b/src/views/mdc/base/modules/shift/ShiftSystemModel.vue @@ -1,20 +1,20 @@ <template> - <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" + <a-modal :title="title" :width="500" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> <a-spin :spinning="confirmLoading"> <a-form :form="form"> <a-row :gutter="24"> - <a-col :span="12"> + <a-col :span="24"> <a-form-item label="鐝埗鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-input allow-clear placeholder="璇疯緭鍏ョ彮鍒跺悕绉�" v-decorator="['shiftName',validatorRules.shiftName]"/> </a-form-item> </a-col> - <a-col :span="12"> - <a-form-item label="鏄惁榛樿鐝埗" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-switch v-model="defaultShift" checked-children="鏄�" un-checked-children="鍚�"/> - </a-form-item> - </a-col> + <!--<a-col :span="12">--> + <!--<a-form-item label="鏄惁榛樿鐝埗" :labelCol="labelCol" :wrapperCol="wrapperCol">--> + <!--<a-switch v-model="defaultShift" checked-children="鏄�" un-checked-children="鍚�"/>--> + <!--</a-form-item>--> + <!--</a-col>--> </a-row> </a-form> @@ -50,7 +50,7 @@ span: 24 }, sm: { - span: 6 + span: 4 } }, wrapperCol: { @@ -58,7 +58,7 @@ span: 24 }, sm: { - span: 18 + span: 20 } }, confirmLoading: false, @@ -90,11 +90,11 @@ this.visible = true this.$nextTick(() => { this.form.setFieldsValue(pick(this.model, 'shiftName')) - if (record.defaultShift == 'true') { - this.defaultShift = true - } else { - this.defaultShift = false - } + // if (record.defaultShift == 'true') { + // this.defaultShift = true + // } else { + // this.defaultShift = false + // } }) }, close() { @@ -109,8 +109,8 @@ if (!err) { that.confirmLoading = true let formData = Object.assign(this.model, values) - formData.shiftStatus = 1 - formData.defaultShift = that.defaultShift + // formData.shiftStatus = 1 + // formData.defaultShift = that.defaultShift let obj if (!this.model.id) { obj = postAction(this.url.add, formData) @@ -121,10 +121,18 @@ } obj.then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok', res.result) } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false diff --git a/src/views/mdc/base/modules/utilizationStatistics/UtilizationStatisticsList.vue b/src/views/mdc/base/modules/utilizationStatistics/UtilizationStatisticsList.vue index 322ef24..9bf2db1 100644 --- a/src/views/mdc/base/modules/utilizationStatistics/UtilizationStatisticsList.vue +++ b/src/views/mdc/base/modules/utilizationStatistics/UtilizationStatisticsList.vue @@ -330,7 +330,11 @@ this.onClearSelected1() } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -409,7 +413,11 @@ this.dataSource = res.result; } }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -430,7 +438,11 @@ if(res.success){ this.loadData2() }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false diff --git a/src/views/mdc/base/openRateFractionAnalysis.vue b/src/views/mdc/base/openRateFractionAnalysis.vue new file mode 100644 index 0000000..3d0ce5c --- /dev/null +++ b/src/views/mdc/base/openRateFractionAnalysis.vue @@ -0,0 +1,139 @@ +<template> + <div style="width: 100%; height: 100%;"> + <a-card :bordered="false"> + <a-row type="flex" :gutter="16"> + <a-col :md="4"> + <a-tabs :activeKey="activeKey" @change="tabChange"> + <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> + <base-tree @getCurrSelected="changeSelectionNode"></base-tree> + </a-tab-pane> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> + </a-tab-pane> + </a-tabs> + </a-col> + <a-col :md="20"> + <open-rate-fraction-analysis-main ref="openRateFractionAnalysisMain" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></open-rate-fraction-analysis-main> + </a-col> + </a-row> + </a-card> + </div> + +</template> + +<script> + import { putAction, getAction } from '@/api/manage' + import { frozenBatch } from '@/api/api' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import JInput from '@/components/jeecg/JInput' + import BaseTree from '../common/BaseTree' + import openRateFractionAnalysisMain from './modules/openRateFractionAnalysis/openRateFractionAnalysisMain' + import JSuperQuery from '@/components/jeecg/JSuperQuery' + import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' + import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' + export default { + name: 'openRateFractionAnalysis', + components: { + JThirdAppButton, + JInput, + BaseTree, + JSuperQuery, + DepartTree, + openRateFractionAnalysisMain + }, + data() { + return { + activeKey: '1', + description: '璁惧淇℃伅', + selectEquementId: '', + selectEquement: {}, + selectPeople:{}, + slectTypeTree:"", + url: { + equipmentStatistics: '/mdc/equipment/equipmentStatistics' + }, + isDepartType:'', + } + }, + created() { + this.queryTreeData() + }, + methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, + tabChange(val) { + // console.log(val); + this.activeKey = val + this.slectTypeTree = val + }, + // changeSelection(val) { + // this.selectEquementId = val + // this.$refs.efficiencyList.pQuery(val) + // this.$refs.efficiencyList.searchQuery() + // }, + changeSelectionNode(val) { + this.selectEquement = val + this.slectTypeTree = "1" + }, + changeSelectionNodedd(val) { + this.selectPeople = val + this.slectTypeTree = "2" + } + } + + } +</script> +<style scoped> + @import '~@assets/less/common.less'; + + .equipMessage { + width: 100%; + height: 10%; + } + + .equipMessage table { + width: 60%; + height: 100%; + line-height: 50%; + } + + .equipMessage table td { + text-align: center; + } + + .equipMessage table td span { + display: inline-block; + width: 15px; + height: 15px; + } + + .equipMessage table td .equipShutdown { + background-color: #808080; + } + + .equipMessage table td .equipStandby { + background-color: #ffbf37; + } + + .equipMessage table td .equipRun { + background-color: #19FE01; + } + + .equipMessage table td .equipAlarm { + background-color: #FD0008; + } +</style> \ No newline at end of file diff --git a/src/views/mdc/base/openRateTrendAnalysis.vue b/src/views/mdc/base/openRateTrendAnalysis.vue new file mode 100644 index 0000000..027b1b4 --- /dev/null +++ b/src/views/mdc/base/openRateTrendAnalysis.vue @@ -0,0 +1,139 @@ +<template> + <div style="width: 100%; height: 100%;"> + <a-card :bordered="false"> + <a-row type="flex" :gutter="16"> + <a-col :md="4"> + <a-tabs :activeKey="activeKey" @change="tabChange"> + <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render> + <base-tree @getCurrSelected="changeSelectionNode"></base-tree> + </a-tab-pane> + <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">, + <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> + </a-tab-pane> + </a-tabs> + </a-col> + <a-col :md="20"> + <open-rate-trend-analysis-main ref="EfficiencyList" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></open-rate-trend-analysis-main> + </a-col> + </a-row> + </a-card> + </div> + +</template> + +<script> + import { putAction, getAction } from '@/api/manage' + import { frozenBatch } from '@/api/api' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import JInput from '@/components/jeecg/JInput' + import BaseTree from '../common/BaseTree' + import openRateTrendAnalysisMain from './modules/openRateTrendAnalysis/openRateTrendAnalysisMain' + import JSuperQuery from '@/components/jeecg/JSuperQuery' + import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' + import DepartTree from './modules/DepartList/DepartListTree/DepartTree' + import {mapActions} from 'vuex' + export default { + name: 'openRateTrendAnalysis', + components: { + JThirdAppButton, + JInput, + BaseTree, + JSuperQuery, + DepartTree, + openRateTrendAnalysisMain + }, + data() { + return { + activeKey: '1', + description: '璁惧淇℃伅', + selectEquementId: '', + selectEquement: {}, + selectPeople:{}, + slectTypeTree:"", + url: { + equipmentStatistics: '/mdc/equipment/equipmentStatistics' + }, + isDepartType:'', + } + }, + created() { + this.queryTreeData() + }, + methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, + tabChange(val) { + // console.log(val); + this.activeKey = val + this.slectTypeTree = val + }, + // changeSelection(val) { + // this.selectEquementId = val + // this.$refs.efficiencyList.pQuery(val) + // this.$refs.efficiencyList.searchQuery() + // }, + changeSelectionNode(val) { + this.selectEquement = val + this.slectTypeTree = "1" + }, + changeSelectionNodedd(val) { + this.selectPeople = val + this.slectTypeTree = "2" + } + } + + } +</script> +<style scoped> + @import '~@assets/less/common.less'; + + .equipMessage { + width: 100%; + height: 10%; + } + + .equipMessage table { + width: 60%; + height: 100%; + line-height: 50%; + } + + .equipMessage table td { + text-align: center; + } + + .equipMessage table td span { + display: inline-block; + width: 15px; + height: 15px; + } + + .equipMessage table td .equipShutdown { + background-color: #808080; + } + + .equipMessage table td .equipStandby { + background-color: #ffbf37; + } + + .equipMessage table td .equipRun { + background-color: #19FE01; + } + + .equipMessage table td .equipAlarm { + background-color: #FD0008; + } +</style> \ No newline at end of file diff --git a/src/views/mdc/common/BaseTree.vue b/src/views/mdc/common/BaseTree.vue index 4582463..0aab780 100644 --- a/src/views/mdc/common/BaseTree.vue +++ b/src/views/mdc/common/BaseTree.vue @@ -255,7 +255,11 @@ } let ids = entity.id if (!ids) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return } else { var that = this diff --git a/src/views/system/DepartList.vue b/src/views/system/DepartList.vue index 25b23eb..c9446ce 100644 --- a/src/views/system/DepartList.vue +++ b/src/views/system/DepartList.vue @@ -106,10 +106,11 @@ </a-empty> </a-card> </a-tab-pane> - <!--<a-tab-pane tab="閮ㄩ棬鏉冮檺" key="2" forceRender>--> + <a-tab-pane tab="閮ㄩ棬鏉冮檺" key="2" forceRender> <!--<depart-auth-modal ref="departAuth"/>--> - <!--</a-tab-pane>--> - <a-tab-pane tab="璁惧鍒楄〃" key="2" forceRender> + <depart-m-auth-modal ref="departMAuth"></depart-m-auth-modal> + </a-tab-pane> + <a-tab-pane v-if="isDepartType == 0" tab="璁惧鍒楄〃" key="3" forceRender> <depart-auth-modal ref="departAuth"/> </a-tab-pane> </a-tabs> @@ -119,11 +120,15 @@ </a-row> </template> <script> + import {mapActions} from 'vuex' + import DepartMModal from './modules/DepartModal' import DepartModal from './modules/DepartList/DepartModal' import {queryDepartTreeList, searchByKeywords, deleteByDepartId} from '@/api/api' import {httpAction, deleteAction} from '@/api/manage' import {JeecgListMixin} from '@/mixins/JeecgListMixin' import DepartAuthModal from './modules/DepartList/DepartAuthModal' + import DepartMAuthModal from './modules/DepartAuthModal' + // 琛ㄥご const columns = [ { @@ -168,10 +173,13 @@ mixins: [JeecgListMixin], components: { DepartAuthModal, - DepartModal + DepartModal, + DepartMModal, + DepartMAuthModal }, data() { return { + isDepartType:"", iExpandedKeys: [], loading: false, autoExpandParent: true, @@ -229,6 +237,21 @@ } }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, loadData() { this.refresh(); }, @@ -293,9 +316,12 @@ this.$refs.nodeModal.add(this.currFlowId, '') }, batchDel: function () { - console.log(this.checkedKeys) if (this.checkedKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); } else { var ids = '' for (var a = 0; a < this.checkedKeys.length; a++) { @@ -308,11 +334,19 @@ onOk: function () { deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadTree() that.onClearSelected() } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } @@ -330,7 +364,11 @@ that.departTree.push(temp) } } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } else { @@ -368,7 +406,11 @@ this.selectedKeys = [record.key] this.model.parentId = record.parentId this.setValuesToForm(record) - this.$refs.departAuth.show(record.id); + if(this.isDepartType == 0){ + this.$refs.departAuth.show(record.id); + } + + this.$refs.departMAuth.show(record.id) }, // 瑙﹀彂onSelect浜嬩欢鏃�,涓洪儴闂ㄦ爲鍙充晶鐨刦orm琛ㄥ崟璧嬪�� @@ -387,7 +429,11 @@ this.checkedKeys = [] this.currSelected = {} this.selectedKeys = [] - this.$refs.departAuth.departId = '' + if(this.isDepartType == 0){ + this.$refs.departAuth.departId = '' + + } + this.$refs.departMAuth.departId = '' }, handleNodeTypeChange(val) { this.currSelected.nodeType = val @@ -402,16 +448,28 @@ this.$refs.form.validate(valid => { if (valid) { if (!this.currSelected.id) { - this.$message.warning('璇风偣鍑婚�夋嫨瑕佷慨鏀归儴闂�!') + // this.$message.warning('璇风偣鍑婚�夋嫨瑕佷慨鏀归儴闂�!') + this.$notification.warning({ + message:'娑堟伅', + description:"璇风偣鍑婚�夋嫨瑕佷慨鏀归儴闂�" + }); return } httpAction(this.url.edit, this.currSelected, 'put').then((res) => { if (res.success) { - this.$message.success('淇濆瓨鎴愬姛!') + // this.$message.success('淇濆瓨鎴愬姛!') + this.$notification.warning({ + message:'娑堟伅', + description:"淇濆瓨鎴愬姛" + }); this.loadTree() } else { - this.$message.error(res.message) + // this.$message.error(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } @@ -529,6 +587,7 @@ }, created() { + this.queryTreeData() this.currFlowId = this.$route.params.id this.currFlowName = this.$route.params.name // this.loadTree() diff --git a/src/views/system/DepartList1.vue b/src/views/system/DepartList1.vue index b6ce4d7..de37e4c 100644 --- a/src/views/system/DepartList1.vue +++ b/src/views/system/DepartList1.vue @@ -320,7 +320,11 @@ batchDel: function () { console.log(this.checkedKeys) if (this.checkedKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); } else { var ids = '' for (var a = 0; a < this.checkedKeys.length; a++) { @@ -333,11 +337,19 @@ onOk: function () { deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadTree() that.onClearSelected() } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } @@ -355,7 +367,11 @@ that.departTree.push(temp) } } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } else { @@ -427,16 +443,25 @@ this.$refs.form.validate(valid => { if (valid) { if (!this.currSelected.id) { - this.$message.warning('璇风偣鍑婚�夋嫨瑕佷慨鏀归儴闂�!') + this.$notification.warning({ + message:'娑堟伅', + description:"璇风偣鍑婚�夋嫨瑕佷慨鏀归儴闂�" + }); return } httpAction(this.url.edit, this.currSelected, 'put').then((res) => { if (res.success) { - this.$message.success('淇濆瓨鎴愬姛!') + this.$notification.warning({ + message:'娑堟伅', + description:"淇濆瓨鎴愬姛" + }); this.loadTree() } else { - this.$message.error(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } @@ -463,7 +488,11 @@ } else if (num == 2) { let key = this.currSelected.key if (!key) { - this.$message.warning('璇峰厛鐐瑰嚮閫変腑涓婄骇閮ㄩ棬锛�') + // this.$message.warning('璇峰厛鐐瑰嚮閫変腑涓婄骇閮ㄩ棬锛�') + this.$notification.warning({ + message:'娑堟伅', + description:"璇峰厛鐐瑰嚮閫変腑涓婄骇閮ㄩ棬锛�" + }); return false } this.$refs.departModal.add(this.selectedKeys) @@ -483,7 +512,11 @@ if (resp.success) { //鍒犻櫎鎴愬姛鍚庯紝鍘婚櫎宸查�変腑涓殑鏁版嵁 that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1); - that.$message.success('鍒犻櫎鎴愬姛!') + // that.$message.success('鍒犻櫎鎴愬姛!') + that.$notification.success({ + message:'娑堟伅', + description:"鍒犻櫎鎴愬姛" + }); that.loadTree() //鍒犻櫎鍚庡悓姝ユ竻绌哄彸渚у熀鏈俊鎭唴瀹� let orgCode=that.model.orgCode; @@ -491,7 +524,11 @@ that.onClearSelected() } } else { - that.$message.warning('鍒犻櫎澶辫触!') + // that.$message.warning('鍒犻櫎澶辫触!') + this.$notification.warning({ + message:'娑堟伅', + description:"鍒犻櫎澶辫触" + }); } }) } @@ -550,7 +587,7 @@ } } //---- author:os_chengtgen -- date:20190827 -- for:鍒囨崲鐖跺瓙鍕鹃�夋ā寮� =======------ - + }, created() { this.currFlowId = this.$route.params.id diff --git a/src/views/system/DepartList2.vue b/src/views/system/DepartList2.vue index 09939ed..e08181f 100644 --- a/src/views/system/DepartList2.vue +++ b/src/views/system/DepartList2.vue @@ -190,10 +190,19 @@ var that = this; deleteAction(that.url.delete, {id: id}).then((res) => { if (res.success) { - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } }); }, @@ -204,7 +213,11 @@ }, batchDel: function () { if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -218,11 +231,19 @@ onOk: function () { deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { if (res.success) { - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); } diff --git a/src/views/system/DepartListSync.vue b/src/views/system/DepartListSync.vue index c412836..834b469 100644 --- a/src/views/system/DepartListSync.vue +++ b/src/views/system/DepartListSync.vue @@ -269,9 +269,9 @@ that.departTree = [] //鎵�鏈夌殑鏍戣妭鐐筴ey淇℃伅 that.allIds = [] - + that.iExpandedKeys = [] - + that.loading = false queryDepartTreeSync().then((res) => { if (res.success) { @@ -356,7 +356,11 @@ batchDel: function () { console.log(this.checkedKeys) if (this.checkedKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); } else { var ids = '' for (var a = 0; a < this.checkedKeys.length; a++) { diff --git a/src/views/system/ProductionManager.vue b/src/views/system/ProductionManager.vue index a0ac3eb..b60c346 100644 --- a/src/views/system/ProductionManager.vue +++ b/src/views/system/ProductionManager.vue @@ -293,7 +293,11 @@ batchDel: function () { console.log(this.checkedKeys) if (this.checkedKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); } else { var ids = '' for (var a = 0; a < this.checkedKeys.length; a++) { @@ -306,11 +310,19 @@ onOk: function () { deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { if (res.success) { - that.$message.success(res.message) + // that.$message.success(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadTree() that.onClearSelected() } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } @@ -328,7 +340,11 @@ that.departTree.push(temp) } } else { - that.$message.warning(res.message) + // that.$message.warning(res.message) + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } else { @@ -400,16 +416,28 @@ this.$refs.form.validate(valid => { if (valid) { if (!this.currSelected.id) { - this.$message.warning('璇风偣鍑婚�夋嫨瑕佷慨鏀硅溅闂�!') + // this.$message.warning('璇风偣鍑婚�夋嫨瑕佷慨鏀硅溅闂�!') + this.$notification.warning({ + message:'娑堟伅', + description:"璇风偣鍑婚�夋嫨瑕佷慨鏀硅溅闂达紒" + }); return } httpAction(this.url.edit, this.currSelected, 'put').then((res) => { if (res.success) { - this.$message.success('淇濆瓨鎴愬姛!') + // this.$message.success('淇濆瓨鎴愬姛!') + this.$notification.warning({ + message:'娑堟伅', + description:"淇濆瓨鎴愬姛" + }); this.loadTree() } else { - this.$message.error(res.message) + // this.$message.error(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) } @@ -437,7 +465,11 @@ console.log(this.currSelected) let key = this.currSelected.key if (!key) { - this.$message.warning('璇峰厛鐐瑰嚮閫変腑涓婄骇杞﹂棿锛�') + // this.$message.warning('璇峰厛鐐瑰嚮閫変腑涓婄骇杞﹂棿锛�') + this.$notification.warning({ + message:'娑堟伅', + description:"璇峰厛鐐瑰嚮閫変腑涓婄骇杞﹂棿锛�" + }); return false } this.$refs.departModal.add(this.selectedKeys) @@ -457,7 +489,11 @@ if (resp.success) { //鍒犻櫎鎴愬姛鍚庯紝鍘婚櫎宸查�変腑涓殑鏁版嵁 that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1); - that.$message.success('鍒犻櫎鎴愬姛!') + // that.$message.success('鍒犻櫎鎴愬姛!') + that.$notification.success({ + message:'娑堟伅', + description:"鍒犻櫎鎴愬姛" + }); that.loadTree() //鍒犻櫎鍚庡悓姝ユ竻绌哄彸渚у熀鏈俊鎭唴瀹� // let orgCode=that.model.orgCode; @@ -465,7 +501,11 @@ that.onClearSelected() // } } else { - that.$message.warning('鍒犻櫎澶辫触!') + // that.$message.warning('鍒犻櫎澶辫触!') + that.$notification.warning({ + message:'娑堟伅', + description:"鍒犻櫎澶辫触" + }); } }) } diff --git a/src/views/system/QuartzJobList.vue b/src/views/system/QuartzJobList.vue index ed57aa3..4e89a3d 100644 --- a/src/views/system/QuartzJobList.vue +++ b/src/views/system/QuartzJobList.vue @@ -7,8 +7,8 @@ <a-row :gutter="24"> <a-col :md="6" :sm="10"> - <a-form-model-item label="浠诲姟绫诲悕" prop="jobClassName"> - <a-input placeholder="璇疯緭鍏ヤ换鍔$被鍚�" v-model="queryParam.jobClassName"></a-input> + <a-form-model-item label="浠诲姟鍚嶇О" prop="jobClassName"> + <a-input placeholder="璇疯緭鍏ヤ换鍔″悕绉�" v-model="queryParam.jobName"></a-input> </a-form-model-item> </a-col> <a-col :md="6" :sm="10"> @@ -76,14 +76,19 @@ <span slot="action" slot-scope="text, record"> - <a @click="resumeJob(record)" v-if="record.status==-1">鍚姩</a> - <a @click="pauseJob(record)" v-if="record.status==0">鍋滄</a> + <a @click="executeImmediately(record)">绔嬪嵆鎵ц</a> <a-divider type="vertical" /> + <a @click="handlequartzLog(record)">鏃ュ織</a> + <a-divider type="vertical" /> <a-dropdown> <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> <a-menu slot="overlay"> - <a-menu-item><a @click="executeImmediately(record)">绔嬪嵆鎵ц</a></a-menu-item> + <a-menu-item> + <a @click="resumeJob(record)" v-if="record.status==-1">鍚姩</a> + <a @click="pauseJob(record)" v-if="record.status==0">鍋滄</a> + + </a-menu-item> <a-menu-item><a @click="handleEdit(record)">缂栬緫</a></a-menu-item> <a-menu-item> <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> @@ -105,11 +110,15 @@ <!-- 琛ㄥ崟鍖哄煙 --> <quartzJob-modal ref="modalForm" @ok="modalFormOk"></quartzJob-modal> + + <!--鏃ュ織--> + <quartz-job-list-modal ref="modalFormList" @ok="modalFormOk"></quartz-job-list-modal> </a-card> </template> <script> import QuartzJobModal from './modules/QuartzJobModal' + import QuartzJobListModal from './modules/QuartzJobListModal' import { getAction } from '@/api/manage' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import JEllipsis from "@/components/jeecg/JEllipsis"; @@ -119,6 +128,7 @@ mixins:[JeecgListMixin], components: { QuartzJobModal, + QuartzJobListModal, JEllipsis }, data () { @@ -139,9 +149,9 @@ } }, { - title: '浠诲姟绫诲悕', + title: '浠诲姟鍚嶇О', align:"center", - dataIndex: 'jobClassName', + dataIndex: 'jobName', sorter: true, /* customRender:function (text) { return "*"+text.substring(9,text.length); @@ -160,9 +170,8 @@ scopedSlots: {customRender: 'parameterRender'}, }, { - title: '鎻忚堪', + title: '璇存槑', align:"center", - width: 250, dataIndex: 'description', scopedSlots: {customRender: 'description'}, }, @@ -204,7 +213,11 @@ }, methods: { - + handlequartzLog: function (record) { + this.$refs.modalFormList.openPage(record); + this.$refs.modalFormList.title = "鎵ц鏃ュ織"; + this.$refs.modalFormList.disableSubmit = false; + }, //绛涢�夐渶瑕侀噸鍐檋andleTableChange handleTableChange(pagination, filters, sorter) { //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 @@ -214,7 +227,7 @@ this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" } //杩欑绛涢�夋柟寮忓彧鏀寔鍗曢�� - + // update-begin-author:liusq date:20210624 for:鍓嶅彴瀹氭椂浠诲姟鏃犳硶缈婚〉 #2666 if(filters && Object.keys(filters).length>0 && filters.status){ this.filters.status = filters.status[0]; @@ -232,11 +245,19 @@ onOk: function(){ getAction(that.url.pause,{id:record.id}).then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); } @@ -252,11 +273,19 @@ onOk: function(){ getAction(that.url.resume,{id:record.id}).then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); } @@ -271,11 +300,19 @@ onOk: function(){ getAction(that.url.execute,{id:record.id}).then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadData(); that.onClearSelected(); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }); } diff --git a/src/views/system/RoleUserList.vue b/src/views/system/RoleUserList.vue index 9e8c80d..cb70ae8 100644 --- a/src/views/system/RoleUserList.vue +++ b/src/views/system/RoleUserList.vue @@ -442,7 +442,11 @@ return } if (this.selectedRowKeys2.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒') + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return } else { var ids = '' diff --git a/src/views/system/UserList.vue b/src/views/system/UserList.vue index 9ed704d..47e9d00 100644 --- a/src/views/system/UserList.vue +++ b/src/views/system/UserList.vue @@ -189,6 +189,7 @@ import UserRecycleBinModal from './modules/UserRecycleBinModal' import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' + import {mapActions} from 'vuex' export default { name: "UserList", @@ -234,40 +235,40 @@ { title: '澶村儚', align: "center", - width: 120, + width: 80, dataIndex: 'avatar', scopedSlots: {customRender: "avatarslot"} }, - { - title: '鎬у埆', - align: "center", - width: 80, - dataIndex: 'sex_dictText', - sorter: true - }, - { - title: '鐢熸棩', - align: "center", - width: 100, - dataIndex: 'birthday' - }, - { - title: '鎵嬫満鍙风爜', - align: "center", - width: 100, - dataIndex: 'phone' - }, + // { + // title: '鎬у埆', + // align: "center", + // width: 80, + // dataIndex: 'sex_dictText', + // sorter: true + // }, + // { + // title: '鐢熸棩', + // align: "center", + // width: 100, + // dataIndex: 'birthday' + // }, + // { + // title: '鎵嬫満鍙风爜', + // align: "center", + // width: 100, + // dataIndex: 'phone' + // }, { title: '閮ㄩ棬', align: "center", - width: 180, + width: 240, dataIndex: 'orgCodeTxt' }, { title: '杞﹂棿', align: "center", - width: 180, + width: 240, dataIndex: 'productionName' }, { @@ -279,12 +280,14 @@ { title: '鎿嶄綔', dataIndex: 'action', - scopedSlots: {customRender: 'action'}, + scopedSlots: { customRender: 'action' }, align: "center", - width: 170 - } + width: 80 + }, + ], + isDepartType:'', superQueryFieldList: [ { type: 'input', value: 'username', text: '鐢ㄦ埛璐﹀彿', }, { type: 'input', value: 'realname', text: '鐢ㄦ埛濮撳悕', }, @@ -305,14 +308,172 @@ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; } }, - methods: { + created() { + this.queryTreeData() + }, + methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + if(this.isDepartType == -1){ + this.columns=[ + { + title: '鐢ㄦ埛璐﹀彿', + align: "center", + dataIndex: 'username', + width: 120, + sorter: true + }, + { + title: '鐢ㄦ埛濮撳悕', + align: "center", + width: 100, + dataIndex: 'realname', + }, + { + title: '澶村儚', + align: "center", + width: 80, + dataIndex: 'avatar', + scopedSlots: {customRender: "avatarslot"} + }, + + // { + // title: '鎬у埆', + // align: "center", + // width: 80, + // dataIndex: 'sex_dictText', + // sorter: true + // }, + // { + // title: '鐢熸棩', + // align: "center", + // width: 100, + // dataIndex: 'birthday' + // }, + // { + // title: '鎵嬫満鍙风爜', + // align: "center", + // width: 100, + // dataIndex: 'phone' + // }, + { + title: '杞﹂棿', + align: "center", + width: 240, + dataIndex: 'productionName' + }, + { + title: '鐘舵��', + align: "center", + width: 80, + dataIndex: 'status_dictText' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + scopedSlots: { customRender: 'action' }, + align: "center", + width: 80 + }, + + + ] + }else{ + this.columns= [ + { + title: '鐢ㄦ埛璐﹀彿', + align: "center", + dataIndex: 'username', + width: 120, + sorter: true + }, + { + title: '鐢ㄦ埛濮撳悕', + align: "center", + width: 100, + dataIndex: 'realname', + }, + { + title: '澶村儚', + align: "center", + width: 80, + dataIndex: 'avatar', + scopedSlots: {customRender: "avatarslot"} + }, + + // { + // title: '鎬у埆', + // align: "center", + // width: 80, + // dataIndex: 'sex_dictText', + // sorter: true + // }, + // { + // title: '鐢熸棩', + // align: "center", + // width: 100, + // dataIndex: 'birthday' + // }, + // { + // title: '鎵嬫満鍙风爜', + // align: "center", + // width: 100, + // dataIndex: 'phone' + // }, + { + title: '閮ㄩ棬', + align: "center", + width: 240, + dataIndex: 'orgCodeTxt' + }, + { + title: '杞﹂棿', + align: "center", + width: 240, + dataIndex: 'productionName' + }, + { + title: '鐘舵��', + align: "center", + width: 80, + dataIndex: 'status_dictText' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + scopedSlots: { customRender: 'action' }, + align: "center", + width: 80 + } + + + ] + } + + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, getAvatarView: function (avatar) { return getFileAccessHttpUrl(avatar) }, batchFrozen: function (status) { if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return false; } else { let ids = ""; diff --git a/src/views/system/modules/DepartList/DepartAuthModal.vue b/src/views/system/modules/DepartList/DepartAuthModal.vue index 4b7d210..a4d88ad 100644 --- a/src/views/system/modules/DepartList/DepartAuthModal.vue +++ b/src/views/system/modules/DepartList/DepartAuthModal.vue @@ -216,7 +216,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -248,10 +252,20 @@ postAction(this.url.removeEquipmentForDepart,qs.stringify({departId:this.departId,equipmentId:equipmentId})).then((res)=>{ if (res.success) { - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.success({ + message:'娑堟伅', + description:res.message + }); + this.loadData(this.departId); }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } }).finally(() => { @@ -268,7 +282,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -285,11 +303,19 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadData(that.departId); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; diff --git a/src/views/system/modules/DepartList/DepartDataruleModal.vue b/src/views/system/modules/DepartList/DepartDataruleModal.vue index 77298ac..03db081 100644 --- a/src/views/system/modules/DepartList/DepartDataruleModal.vue +++ b/src/views/system/modules/DepartList/DepartDataruleModal.vue @@ -72,7 +72,11 @@ }, saveDataruleForRole(){ if(!this.dataruleChecked || this.dataruleChecked.length==0){ - this.$message.warning("璇锋敞鎰忥紝鐜版湭鍕鹃�変换浣曟暟鎹潈闄�!") + // this.$message.warning("璇锋敞鎰忥紝鐜版湭鍕鹃�変换浣曟暟鎹潈闄�!") + this.$notification.warning({ + message:'娑堟伅', + description:"璇锋敞鎰忥紝鐜版湭鍕鹃�変换浣曟暟鎹潈闄�!" + }); } let params = { permissionId:this.functionId, @@ -81,9 +85,19 @@ } postAction(this.url.datarule,params).then(res=>{ if(res.success){ - this.$message.success(res.message) + // this.$message.success(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + }else{ - this.$message.error(res.message) + + // this.$message.error(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }) }, diff --git a/src/views/system/modules/DepartList/DepartModal.vue b/src/views/system/modules/DepartList/DepartModal.vue index 0d280a6..697ec7c 100644 --- a/src/views/system/modules/DepartList/DepartModal.vue +++ b/src/views/system/modules/DepartList/DepartModal.vue @@ -189,11 +189,19 @@ that.confirmLoading = true; httpAction(this.url.add,this.model,"post").then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadTreeData(); that.$emit('ok'); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false; diff --git a/src/views/system/modules/DeptUserInfo.vue b/src/views/system/modules/DeptUserInfo.vue index bd80510..73976ff 100644 --- a/src/views/system/modules/DeptUserInfo.vue +++ b/src/views/system/modules/DeptUserInfo.vue @@ -199,7 +199,11 @@ } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; diff --git a/src/views/system/modules/ProductionManager/ProductionEquipment.vue b/src/views/system/modules/ProductionManager/ProductionEquipment.vue index d4b06a3..975697a 100644 --- a/src/views/system/modules/ProductionManager/ProductionEquipment.vue +++ b/src/views/system/modules/ProductionManager/ProductionEquipment.vue @@ -174,7 +174,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -214,7 +218,11 @@ } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { this.loading = false @@ -249,7 +257,11 @@ this.$message.warning(res.message) this.loadData(this.productionId); }else{ - this.$message.warning(res.message) + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { @@ -266,7 +278,11 @@ return } if (this.selectedRowKeys.length <= 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); return; } else { var ids = ""; @@ -283,11 +299,19 @@ if (res.success) { //閲嶆柊璁$畻鍒嗛〉闂 that.reCalculatePage(that.selectedRowKeys.length) - that.$message.success(res.message); + // that.$message.success(res.message); + this.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.loadData(that.productionId); that.onClearSelected(); } else { - that.$message.warning(res.message); + // that.$message.warning(res.message); + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.loading = false; diff --git a/src/views/system/modules/ProductionManager/ProductionModal.vue b/src/views/system/modules/ProductionManager/ProductionModal.vue index 9cd1124..e131e7e 100644 --- a/src/views/system/modules/ProductionManager/ProductionModal.vue +++ b/src/views/system/modules/ProductionManager/ProductionModal.vue @@ -136,11 +136,19 @@ that.confirmLoading = true; httpAction(this.url.add,this.model,"post").then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); that.loadTreeData(); that.$emit('ok'); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false; diff --git a/src/views/system/modules/QuartzJobDetails.vue b/src/views/system/modules/QuartzJobDetails.vue new file mode 100644 index 0000000..d96e548 --- /dev/null +++ b/src/views/system/modules/QuartzJobDetails.vue @@ -0,0 +1,75 @@ + +<template> + <a-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-card :bordered="false"> + <div> + <pre> + {{textContent}} + </pre> + + </div> + </a-card> + </a-modal> +</template> + +<script> + + + export default { + name: 'QuartzJobDetails', + // mixins: [JeecgListMixin], + components: { + + }, + props: { + + }, + data() { + return { + title:'', + visible:false, + textContent:'', + + } + }, + created() { + + }, + watch: { + + }, + methods: { + showDetails(record){ + // console.log(record) + this.visible = true + this.textContent = record.exceptionDetail + }, + close() { + this.$emit('close') + this.visible = false + }, + handleCancel() { + this.close() + }, + handleOk() { + this.close() + }, + }, + } +</script> +<style> + @import '~@assets/less/common.less'; + + .frozenRowClass { + color: #c9c9c9; + } + + .success { + color: green; + } + + .error { + color: red; + } +</style> diff --git a/src/views/system/modules/QuartzJobListModal.vue b/src/views/system/modules/QuartzJobListModal.vue new file mode 100644 index 0000000..3910b90 --- /dev/null +++ b/src/views/system/modules/QuartzJobListModal.vue @@ -0,0 +1,423 @@ + +<template> + <a-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + + <a-col :md="6" :sm="6"> + <a-form-item label="浠诲姟鍚嶇О"> + <a-input placeholder="璇疯緭鍏ヤ换鍔″悕绉�" v-model="queryParam.jobName"></a-input> + </a-form-item> + </a-col> + + <a-col :md="6" :sm="6"> + <a-form-item label="鏃堕棿"> + <a-range-picker show-time @change="dateParamChange" :disabledDate="disabledDate" format="YYYY-MM-DD HH:mm:ss" v-model="dates"/> + </a-form-item> + </a-col> + <a-col :md="4" :sm="4"> + <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-col> + <a-col :md="2" :sm="2"> + <a-button type="primary" icon="download" @click="handleExportXls('鎵ц鏃ュ織瀵煎嚭')">瀵煎嚭</a-button> + </a-col> + </a-row> + </a-form> + </div> + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + + <!--<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>--> + </div> + <!-- table鍖哄煙-begin --> + <div> + <a-table ref="table" size="middle" bordered rowKey="index" :scroll="{聽 y: 400聽}" :columns="columns" + :dataSource="dataSource" :pagination="ipagination" :loading="loading" + @change="handleTableChange"> + <!-- 鐘舵�佹覆鏌撴ā鏉� --> + <template slot="customRenderStatus" slot-scope="isSuccess"> + <a-tag v-if="isSuccess==0" color="green">鎴愬姛</a-tag> + <a-tag v-if="isSuccess==-1" color="red">澶辫触</a-tag> + </template> + <span slot="action" slot-scope="text, record"> + + <a v-if="record.isSuccess == -1" @click="executeImmediately(record)">鏌ョ湅璇︽儏</a> + + </span> + </a-table> + </div> + <!-- table鍖哄煙-end --> + <quartz-job-details ref="modalForm"></quartz-job-details> + + </a-card> + </a-modal> +</template> + +<script> + import { filterObj } from '@/utils/util'; + import { + ajaxGetSelectItems + } from '@/api/api' + import JDictSelectTag from '@/components/dict/JDictSelectTag' + import { + deleteAction, + requestPut, + getAction, + downFile, + postAction + } 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 QuartzJobDetails from './QuartzJobDetails' + export default { + name: 'QuartzJobListModal', + // mixins: [JeecgListMixin], + components: { + JDictSelectTag, + JEllipsis, + JInput, + Tooltip, + JDate, + QuartzJobDetails + }, + props: { + status: { + type: Number, + default: 1 + } + }, + data() { + return { + title:'', + visible:false, + /* 鏌ヨ鏉′欢-璇蜂笉瑕佸湪queryParam涓0鏄庨潪瀛楃涓插�肩殑灞炴�� */ + queryParam: {}, + /* 鏁版嵁婧� */ + dataSource:[], + /* 鍒嗛〉鍙傛暟 */ + ipagination:{ + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + /* 鎺掑簭鍙傛暟 */ + isorter:{ + column: 'createTime', + order: 'desc', + }, + /* 绛涢�夊弬鏁� */ + filters: {}, + /* table鍔犺浇鐘舵�� */ + loading:false, + /* table閫変腑keys*/ + selectedRowKeys: [], + /* table閫変腑records*/ + selectionRows: [], + /* 鏌ヨ鎶樺彔 */ + toggleSearchStatus:false, + /* 楂樼骇鏌ヨ鏉′欢鐢熸晥鐘舵�� */ + superQueryFlag:false, + /* 楂樼骇鏌ヨ鏉′欢 */ + superQueryParams: '', + /** 楂樼骇鏌ヨ鎷兼帴鏂瑰紡 */ + superQueryMatchType: 'and', + + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + // { + // title: '浠诲姟鍚嶇О', + // align: 'center', + // dataIndex: 'jobClassName', + // }, + // { + // title: 'cron琛ㄨ揪寮�', + // align: 'center', + // dataIndex: 'cronExpression', + // }, + { + title: '浠诲姟鍚嶇О', + align: 'center', + dataIndex: 'jobName' + }, + { + title: '鍙傛暟', + align: 'center', + dataIndex: 'parameter' + }, + + { + title: '鎶ラ敊淇℃伅', + dataIndex: 'action', + align:"center", + scopedSlots: { customRender: 'action' }, + }, + { + title: '鎴愬姛鏍囧織', + align: 'center', + dataIndex: 'isSuccess', + scopedSlots: { customRender: 'customRenderStatus' }, + filterMultiple: false, + filters: [ + { text: '鎴愬姛', value: '0' }, + { text: '澶辫触', value: '-1' }, + ] + }, + { + title: '鎵ц鏃堕棿锛堟绉掞級', + align: 'center', + dataIndex: 'executionTime', + customRender:(t,r,index) =>{ + var milliseconds = parseInt(t) + let hours = Math.floor(milliseconds / 3600000); + milliseconds = milliseconds % 3600000; + let minutes = Math.floor(milliseconds / 60000); + milliseconds = milliseconds % 60000; + let seconds = Math.floor(milliseconds / 1000); + milliseconds = milliseconds % 1000; + if(hours == 0){ + if(minutes == 0){ + if(seconds == 0) { + return `${milliseconds}姣` + }else{ + return `${seconds}绉� ${milliseconds}姣` + } + }else{ + return `${minutes}鍒嗛挓 ${seconds}绉� ${milliseconds}姣`; + } + }else{ + return `${hours}灏忔椂 ${minutes}鍒嗛挓 ${seconds}绉� ${milliseconds}姣`; + } + + } + + }, + { + title: '浠诲姟鎵ц鏃堕棿', + align: 'center', + dataIndex: 'createTime' + }, + ], + sectionPData: [], + sectionData: [], + url: { + list: '/sys/quartzLog/list', + exportXlsUrl:'/sys/quartzLog/exportXls' + }, + value:undefined, + valueProduct:undefined, + dates: [], + } + }, + created() { + + }, + watch: { + + }, + methods: { + searchReset() { + let id = this.queryParam.jobId + this.queryParam = {} + this.dates = [] + this.queryParam.jobId = id + this.loadData(1); + }, + executeImmediately:function (record) { + this.$refs.modalForm.showDetails(record); + this.$refs.modalForm.title = "鎶ラ敊淇℃伅"; + this.$refs.modalForm.disableSubmit = false; + }, + handleExportXls(fileName){ + if(!fileName || typeof fileName != "string"){ + fileName = "瀵煎嚭鏂囦欢" + } + let param = this.getQueryParams(); + if(this.selectedRowKeys && this.selectedRowKeys.length>0){ + param['selections'] = this.selectedRowKeys.join(",") + } + console.log("瀵煎嚭鍙傛暟",param) + downFile(this.url.exportXlsUrl,param).then((data)=>{ + if (!data) { + this.$message.warning("鏂囦欢涓嬭浇澶辫触") + return + } + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls') + }else{ + let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'})) + let link = document.createElement('a') + link.style.display = 'none' + link.href = url + link.setAttribute('download', fileName+'.xls') + document.body.appendChild(link) + link.click() + document.body.removeChild(link); //涓嬭浇瀹屾垚绉婚櫎鍏冪礌 + window.URL.revokeObjectURL(url); //閲婃斁鎺塨lob瀵硅薄 + } + }) + }, + disabledDate(current) { + return current && current > moment().subtract('days', 1); + }, + dateParamChange(v1, v2) { + this.queryParam.startTime = v2[0] + this.queryParam.endTime = v2[1] + }, + handleTableChange(pagination, filters, sorter) { + // this.onClearSelected() + //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 + //TODO 绛涢�� + console.log(pagination) + if (Object.keys(sorter).length > 0) { + this.isorter.column = sorter.field; + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + } + this.ipagination = pagination; + this.loadData(); + }, + openPage(record) { + // console.log(record) + this.visible = true + this.dataSource = []; + this.queryParam = { + jobId: record.id + }; + + this.loadData(); + }, + getQueryParams() { + //鑾峰彇鏌ヨ鏉′欢 + let sqp = {} + if(this.superQueryParams){ + sqp['superQueryParams']=encodeURI(this.superQueryParams) + sqp['superQueryMatchType'] = this.superQueryMatchType + } + var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); + param.field = this.getQueryField(); + param.pageNo = this.ipagination.current; + param.pageSize = this.ipagination.pageSize; + param.jobId = this.queryParam.jobId; + param.startTime = this.queryParam.startTime; + param.endTime = this.queryParam.endTime; + //鑾峰彇鐢ㄦ埛瀹氬埗鐨勫弬鏁板睘鎬� + // if (this.getCustomQueryParams) { + // param = this.getCustomQueryParams(param); + // if(!param){ + // return false; + // } + // } + + return filterObj(param); + }, + getQueryField() { + //TODO 瀛楁鏉冮檺鎺у埗 + var str = "id,"; + this.columns.forEach(function (value) { + str += "," + value.dataIndex; + }); + return str; + }, + 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; + // params.id = this.queryParam.id + 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; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + }else{ + // this.$message.warning(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + this.loading = false + }) + }, + modalFormOk(val) { + // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 + this.loadData(); + + this.selectedRowKeys = [val.id]; + }, + searchQuery() { + this.loadData(); + }, + close() { + this.$emit('close') + this.visible = false + }, + handleCancel() { + this.close() + }, + handleOk() { + this.close() + }, + }, + } +</script> +<style> + @import '~@assets/less/common.less'; + + .frozenRowClass { + color: #c9c9c9; + } + + .success { + color: green; + } + + .error { + color: red; + } +</style> diff --git a/src/views/system/modules/QuartzJobModal.vue b/src/views/system/modules/QuartzJobModal.vue index c27c6aa..d55163e 100644 --- a/src/views/system/modules/QuartzJobModal.vue +++ b/src/views/system/modules/QuartzJobModal.vue @@ -12,8 +12,8 @@ <a-spin :spinning="confirmLoading"> <a-form-model ref="form" :model="model" :rules="validatorRules"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="浠诲姟绫诲悕" prop="jobClassName" hasFeedback > - <a-input placeholder="璇疯緭鍏ヤ换鍔$被鍚�" v-model="model.jobClassName" /> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="浠诲姟鍚嶇О" prop="jobName" hasFeedback > + <a-input placeholder="璇疯緭鍏ヤ换鍔″悕绉�" v-model="model.jobName" /> </a-form-model-item> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="Cron琛ㄨ揪寮�" prop="cronExpression"> <!-- <j-cron v-model="model.cronExpression"/>--> @@ -22,8 +22,8 @@ <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="鍙傛暟" prop="parameter" > <a-textarea placeholder="璇疯緭鍏ュ弬鏁�" :rows="5" v-model="model.parameter" /> </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="鎻忚堪" prop="description"> - <a-textarea placeholder="璇疯緭鍏ユ弿杩�" :rows="3" v-model="model.description" /> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="璇存槑" prop="description"> + <a-textarea placeholder="璇疯緭鍏ヨ鏄�" :rows="3" v-model="model.description" /> </a-form-model-item> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="鐘舵��" prop="status"> <j-dict-select-tag type="radioButton" v-model="model.status" dictCode="quartz_status"/> @@ -115,11 +115,19 @@ console.log('鎻愪氦鍙傛暟',this.model) httpAction(httpurl,this.model,method).then((res)=>{ if(res.success){ - that.$message.success(res.message); + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); that.$emit('ok'); that.close(); }else{ - that.$message.warning(res.message); + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); } }).finally(() => { that.confirmLoading = false; diff --git a/src/views/system/modules/UserModal.vue b/src/views/system/modules/UserModal.vue index 2abe65b..ce46390 100644 --- a/src/views/system/modules/UserModal.vue +++ b/src/views/system/modules/UserModal.vue @@ -58,7 +58,7 @@ </a-form-model-item> <!--閮ㄩ棬鍒嗛厤--> - <a-form-model-item label="閮ㄩ棬鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled"> + <a-form-model-item v-if="isDepartType== 0" label="閮ㄩ棬鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled"> <j-select-depart v-model="model.selecteddeparts" :multi="true" @back="backDepartInfo" :backDepart="true" :treeOpera="true">></j-select-depart> </a-form-model-item> @@ -134,6 +134,7 @@ import { disabledAuthFilter } from "@/utils/authFilter" import { duplicateCheck } from '@/api/api' import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction' + import {mapActions} from 'vuex' export default { name: "UserModal", @@ -194,7 +195,9 @@ tenantsOptions: [], rolesOptions:[], nextDepartOptions:[], - nextProductionOptions:[] + nextProductionOptions:[], + isDepartType:'', + } }, created () { @@ -202,6 +205,7 @@ this.headers = {"X-Access-Token":token} this.initRoleList() this.initTenantList() + this.queryTreeData() }, computed:{ uploadAction:function () { @@ -209,6 +213,21 @@ } }, methods: { + ...mapActions(['QueryDepartTree']), + queryTreeData() { + this.QueryDepartTree().then(res => { + if (res.success) { + this.isDepartType = res.result[0].value + } else { + // this.$message.warn(res.message) + this.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() =>{ + }) + }, add () { this.refresh(); this.edit({activitiSync:'1',userIdentity:1}); -- Gitblit v1.9.3