{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\modle\\EquipStatuslog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\modle\\EquipStatuslog.vue","mtime":1669110583769},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { TableMixin } from '@/mixins/tableMixin';\nimport equipmentManage from '@/api/device/equipmentManage.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport EquipStatuslogDialog from \"./EquipStatuslogDialog.vue\";\nexport default {\n name: 'EquipStatuslog',\n components: {\n EquipStatuslogDialog: EquipStatuslogDialog\n },\n mixins: [TableMixin],\n props: {\n parameter: {\n type: Object,\n default: function _default() {\n return;\n }\n }\n },\n data: function data() {\n return {\n url: {\n delete: '/deviceStatusLog/v1/'\n },\n // 删除状态日志\n deviceStatusList: [],\n //设备状态字段\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'deviceCode',\n relation: 'AND',\n value: this.parameter.code\n }],\n queryParam: {\n sorter: [{\n direction: 'DESC',\n property: 'startTime'\n } // {\n // direction: 'DESC',\n // property: 'endTime',\n // },\n ]\n }\n };\n },\n created: function created() {\n this.deviceStatusList = dictUtils.getDictItemsFromCache('sbzt');\n },\n mounted: function mounted() {},\n methods: {\n handleRefresh: function handleRefresh() {\n this.loadData(1);\n },\n handleAdd: function handleAdd() {\n this.$refs.formModal.add(this.parameter);\n },\n loadData: function loadData(page) {\n var _this = this;\n\n if (page) {\n this.queryParam.pageBean.page = page;\n }\n\n this.loading = true;\n this.tableData = [];\n this.queryParam.querys = [];\n\n if (this.querys[0] && this.querys[0].value) {\n this.queryParam.querys.push(this.querys[0]);\n }\n\n equipmentManage.loadLog(this.queryParam, function (res) {\n _this.total = res.total;\n _this.loading = false;\n res.rows.forEach(function (item) {\n _this.deviceStatusList.forEach(function (val) {\n if (item.deviceStatus == val.value) {\n item['deviceStatusName'] = val.name;\n }\n });\n\n item.timeLength = _this.formatMinite(item.timeLength);\n });\n _this.tableData = res.rows;\n\n _this.$set(_this.tableData);\n });\n },\n formatMinite: function formatMinite(value) {\n var unit1 = '',\n unit2 = '',\n unit3 = '',\n day = 0,\n hour = 0,\n minite = 0,\n result = '';\n\n if (value === 0) {\n result = value + '分钟';\n } else if (value < 120) {\n unit1 = '分钟';\n result = value + unit1;\n } else if (value >= 120 && value < 24 * 60 * 2) {\n unit1 = '小时';\n unit2 = '分钟';\n hour = parseInt(value / 60);\n minite = value % 60;\n result = hour + unit1 + (minite > 0 ? minite + unit2 : '');\n } else if (value >= 24 * 60 * 2) {\n unit1 = '天';\n unit2 = '小时';\n unit3 = '分钟';\n day = parseInt(value / (24 * 60));\n hour = parseInt((value - 24 * 60 * 2) / 60);\n minite = value % 60;\n result = day + unit1 + (hour > 0 ? hour + unit2 : '') + (minite > 0 ? minite + unit3 : '');\n } else {\n result = value;\n }\n\n return result;\n }\n }\n};",null]}