From 301df333c4dc0c28cee67a8579784bd1c3b85abe Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 22 二月 2024 15:07:51 +0800 Subject: [PATCH] 1、标准加工时间页面取消按照时间查询 2、设备利用率、设备开动率以及班次利用率页面查询区域日期被删除后因查询不到数据时表格中不会出现任何数据且无提示,故增加提示及禁止删除日期 3、设备综合效率分析页面和设备加工工件报表页面时间被手动清空与点击重置按钮清空后的查询条件不同,调整为时间为空时则查询除时间限定内所有数据 4、利用率走势分析、利用率分段分析以及报警分析页面简化页面查询功能,禁止删除日期 5、优化假期管理、加工数量管理以及合格率管理页面手动清空日期后无法正常查询数据 6、统计分析与统计图表页面调整重置按钮功能为重置名称为第一级车间以及日期为当日前一天,且无法手动清空日期 7、对比分析页面调整重置按钮功能为重置日期为当日前一周,且无法手动清空日期 --- src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue | 4 src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue | 27 src/views/mdc/base/EquipmentList.vue | 362 +++++------------- src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue | 74 +-- src/views/mdc/base/MdcUtilizationRateList.vue | 3 src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue | 6 src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue | 12 src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue | 104 ---- src/views/mdc/base/DeviceBaseInfo.vue | 119 ++++- src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue | 50 +- src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue | 34 - src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue | 75 +-- src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue | 2 src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue | 12 src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue | 48 -- src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue | 36 src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue | 12 src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue | 34 src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue | 92 ---- src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue | 12 20 files changed, 414 insertions(+), 704 deletions(-) diff --git a/src/views/mdc/base/DeviceBaseInfo.vue b/src/views/mdc/base/DeviceBaseInfo.vue index b697ecf..cded000 100644 --- a/src/views/mdc/base/DeviceBaseInfo.vue +++ b/src/views/mdc/base/DeviceBaseInfo.vue @@ -5,31 +5,45 @@ <base-tree @sendSelectBaseTree="changeSelection" @getCurrSelected="changeSelectionNode"></base-tree> </a-col> <a-col :md="24-5" :sm="24"> - <div class="equipMessage"> - <table> - <tr> - <td>鍏虫満 - <span class="equipShutdown"></span> - </td> - <td>{{offNumber}}</td> - <td>寰呮満 - <span class="standbyNumber"></span> - </td> - <td>{{standbyNumber}}</td> - <td>杩愯 - <span class="equipRun"></span> - </td> - <td>{{workNumber}}</td> - <td>鎶ヨ - <span class="equipAlarm"></span> - </td> - <td>{{warningNumber}}</td> - <td>鎬绘暟</td> - <td>{{allNumber}}</td> - </tr> - </table> + <!--<div class="equipMessage">--> + <!--<table>--> + <!--<tr>--> + <!--<td>鍏虫満--> + <!--<span class="equipShutdown"></span>--> + <!--</td>--> + <!--<td>{{offNumber}}</td>--> + <!--<td>寰呮満--> + <!--<span class="standbyNumber"></span>--> + <!--</td>--> + <!--<td>{{standbyNumber}}</td>--> + <!--<td>杩愯--> + <!--<span class="equipRun"></span>--> + <!--</td>--> + <!--<td>{{workNumber}}</td>--> + <!--<td>鎶ヨ--> + <!--<span class="equipAlarm"></span>--> + <!--</td>--> + <!--<td>{{warningNumber}}</td>--> + <!--<td>鎬绘暟</td>--> + <!--<td>{{allNumber}}</td>--> + <!--</tr>--> + <!--</table>--> + <!--</div>--> + <div class="device-status-info"> + <a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info"> + <template v-if="item.value!=99"> + <div>{{ item.label }}</div> + <div class="status-square" :style="{ backgroundColor: item.color }"></div> + <div>{{getDeviceNumberByStatus(item.value) }}</div> + </template> + <template v-else> + <div>{{ item.label }}</div> + <div>{{getDeviceNumberByStatus(item.value) }}</div> + </template> + </a-space> </div> + <div> <a-tabs default-active-key="1"> <a-tab-pane key="1" tab="甯冨眬鍥�"> @@ -86,7 +100,34 @@ }, param:{}, timer:null, - timerzhun:null + timerzhun:null, + deviceStatusList: [ + { + label: '鍏虫満', + value: 0, + color: '#A8A8A8' + }, + { + label: '寰呮満', + value: 2, + color: '#FFFF00' + }, + { + label: '杩愯', + value: 3, + color: '#00EE00' + }, + { + label: '鎶ヨ', + value: 22, + color: '#FF0000' + }, + { + label: '鎬绘暟', + value: 99, + color: '#fff' + } + ],// 璁惧鐘舵�佹寚绀虹伅鍒楄〃锛� } }, created() { @@ -197,7 +238,17 @@ description:err.message }); }) - } + }, + + /** + * 鏍规嵁璁惧鐘舵�佸�艰幏鍙栧搴旇澶囨暟閲� + * @param value 璁惧鐘舵�佸�� + * @returns {number} 璁惧鏁伴噺 + */ + getDeviceNumberByStatus(value) { + if (value === 99) return this.dataList.length + return this.dataList.filter((item) => item.oporation === 1 && value === 2 || item.oporation === value).length + }, }, mounted(){ this.equipmentStatistics() @@ -211,7 +262,7 @@ } } </script> -<style scoped> +<style scoped lang="less"> @import '~@assets/less/common.less'; .equipMessage { @@ -251,4 +302,20 @@ .equipMessage table td .equipAlarm { background-color: #FD0008; } + + .device-status-info { + display: flex; + justify-content: flex-end; + align-items: center; + + .single-status-info { + margin: 10px; + .status-square { + width: 20px; + height: 20px; + border: 1px solid #ddd; + border-radius: 3px; + } + } + } </style> \ No newline at end of file diff --git a/src/views/mdc/base/EquipmentList.vue b/src/views/mdc/base/EquipmentList.vue index cee4b26..2a5815b 100644 --- a/src/views/mdc/base/EquipmentList.vue +++ b/src/views/mdc/base/EquipmentList.vue @@ -8,14 +8,12 @@ <a-col :md="6" :sm="12"> <a-form-item label="璁惧缂栧彿"> - <!--<a-input placeholder="璇疯緭鍏ヨ处鍙锋煡璇�" v-model="queryParam.username"></a-input>--> <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"></a-input> </a-form-item> </a-col> <a-col :md="6" :sm="8"> <a-form-item label="璁惧鍚嶇О"> - <!--<a-input placeholder="璇疯緭鍏ヨ处鍙锋煡璇�" v-model="queryParam.username"></a-input>--> <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉�" v-model="queryParam.equipmentName"></a-input> </a-form-item> </a-col> @@ -23,7 +21,8 @@ <a-col :md="6" :sm="8"> <a-form-item label="杞﹂棿鍚嶇О"> <!--<a-input placeholder="璇疯緭鍏ヨ溅闂村悕绉�" v-model="queryParam.productionName"></a-input>--> - <a-tree-select v-model="queryParam.productionName" :treeData="workshopTreeData" placeholder="璇烽�夋嫨杞﹂棿" tree-default-expand-all></a-tree-select> + <a-tree-select v-model="queryParam.productionName" :treeData="workshopTreeData" placeholder="璇烽�夋嫨杞﹂棿" + :treeDefaultExpandedKeys="treeDefaultExpandedKeys"></a-tree-select> </a-form-item> </a-col> @@ -37,7 +36,7 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" style="border-top: 5px"> - <a-button @click="handleAdd" type="primary" icon="plus" >娣诲姞璁惧</a-button> + <a-button @click="handleAdd" type="primary" icon="plus">娣诲姞璁惧</a-button> <a-button type="primary" icon="download" @click="handleExportXls('璁惧淇℃伅')">瀵煎嚭</a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" @click="handleMenuClick"> @@ -56,7 +55,8 @@ <!-- table鍖哄煙-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i>宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <i class="anticon anticon-info-circle ant-alert-icon"></i>宸查�夋嫨 <a style="font-weight: 600">{{ + selectedRowKeys.length }}</a>椤� <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> </div> @@ -72,17 +72,10 @@ :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> - - <template slot="avatarslot" slot-scope="text, record, index"> - <div class="anty-img-wrap"> - <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/> - </div> - </template> - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)" >缂栬緫</a> + <a @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical" /> + <a-divider type="vertical"/> <a-dropdown> <a class="ant-dropdown-link"> @@ -93,28 +86,11 @@ <a href="javascript:;" @click="handleDetail(record)">璇︽儏</a> </a-menu-item> - <!--<a-menu-item>--> - <!--<a href="javascript:;" @click="handleChangePassword(record.username)">瀵嗙爜</a>--> - <!--</a-menu-item>--> - <a-menu-item> <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> <a>鍒犻櫎</a> </a-popconfirm> </a-menu-item> - - <!--<a-menu-item v-if="record.status==1">--> - <!--<a-popconfirm title="纭畾鍐荤粨鍚�?" @confirm="() => handleFrozen(record.id,2,record.username)">--> - <!--<a>鍐荤粨</a>--> - <!--</a-popconfirm>--> - <!--</a-menu-item>--> - - <!--<a-menu-item v-if="record.status==2">--> - <!--<a-popconfirm title="纭畾瑙e喕鍚�?" @confirm="() => handleFrozen(record.id,1,record.username)">--> - <!--<a>瑙e喕</a>--> - <!--</a-popconfirm>--> - <!--</a-menu-item>--> - </a-menu> </a-dropdown> </span> @@ -125,43 +101,21 @@ <!-- table鍖哄煙-end --> <user-modal ref="modalForm" @ok="modalFormOk"></user-modal> - - <password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal> - - <sys-user-agent-modal ref="sysUserAgentModal"></sys-user-agent-modal> - - <!-- 鐢ㄦ埛鍥炴敹绔� --> - <user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/> - </a-card> </template> <script> import UserModal from './modules/EquipmentList/UserModal' - import PasswordModal from './modules/EquipmentList/PasswordModal' - import {putAction,getFileAccessHttpUrl} from '@/api/manage'; - import {frozenBatch} from '@/api/api' - import {JeecgListMixin} from '@/mixins/JeecgListMixin' - import SysUserAgentModal from "./modules/EquipmentList/SysUserAgentModal"; - import JInput from '@/components/jeecg/JInput' - import UserRecycleBinModal from './modules/EquipmentList/UserRecycleBinModal' - import JSuperQuery from '@/components/jeecg/JSuperQuery' - import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { queryProductionTreeList } from '@/api/api' - import {mapActions} from 'vuex' + import { mapActions } from 'vuex' export default { - name: "EquipmentList", + name: 'EquipmentList', mixins: [JeecgListMixin], components: { - JThirdAppButton, - SysUserAgentModal, UserModal, - PasswordModal, - JInput, - UserRecycleBinModal, - JSuperQuery }, data() { return { @@ -172,103 +126,88 @@ { title: '#', dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, { title: '璁惧缂栧彿', - align: "center", + align: 'center', dataIndex: 'equipmentId', - width: 200, - // sorter: true + width: 200 }, { title: '璁惧鍚嶇О', - align: "center", + align: 'center', width: 200, - dataIndex: 'equipmentName', + dataIndex: 'equipmentName' }, { title: '杞﹂棿', - align: "center", + align: 'center', width: 200, dataIndex: 'productionName' }, { title: '璁惧绫诲瀷', - align: "center", + align: 'center', width: 200, - dataIndex: 'equipmentType', - // scopedSlots: {customRender: "avatarslot"} + dataIndex: 'equipmentType' }, - { title: '椹卞姩绫诲瀷', - align: "center", + align: 'center', width: 200, - dataIndex: 'driveType', - // sorter: true + dataIndex: 'driveType' }, { title: '鏈哄簥IP', - align: "center", + align: 'center', width: 200, dataIndex: 'equipmentIp' }, { title: '璁惧鍔熺巼', - align: "center", + align: 'center', width: 200, dataIndex: 'devicePower' }, { title: '閮ㄩ棬', - align: "center", + align: 'center', width: 200, dataIndex: 'orgCodeTxt' }, { title: '绯荤粺鐗堟湰', - align: "center", + align: 'center', width: 200, dataIndex: 'systemVersion' }, { title: '鎿嶄綔', dataIndex: 'action', - scopedSlots: {customRender: 'action'}, - align: "center", + scopedSlots: { customRender: 'action' }, + align: 'center', width: 150, - fixed:'right' + fixed: 'right' } ], - // superQueryFieldList: [ - // { type: 'input', value: 'username', text: '鐢ㄦ埛璐﹀彿', }, - // { type: 'input', value: 'realname', text: '鐢ㄦ埛濮撳悕', }, - // { type: 'select', value: 'sex', dbType: 'int', text: '鎬у埆', dictCode: 'sex' }, - // ], url: { - syncUser: "/act/process/extActProcess/doSyncUser", - list: "/mdc/mdcEquipment/list", - delete: "/mdc/mdcEquipment/delete", - deleteBatch: "/mdc/mdcEquipment/deleteBatch", - exportXlsUrl: "/mdc/mdcEquipment/exportXls", - // importExcelUrl: "sys/user/importExcel", + list: '/mdc/mdcEquipment/list', + delete: '/mdc/mdcEquipment/delete', + deleteBatch: '/mdc/mdcEquipment/deleteBatch', + exportXlsUrl: '/mdc/mdcEquipment/exportXls' }, - isDepartType:'', - workshopTreeData:[] + isDepartType: '', + workshopTreeData: [], + treeDefaultExpandedKeys: [] } - }, - computed: { - // importExcelUrl: function(){ - // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - // } }, created() { this.queryTreeData() @@ -280,61 +219,60 @@ this.QueryDepartTree().then(res => { if (res.success) { this.isDepartType = res.result[0].value - if(this.isDepartType == -1){ - this.columns=[ + if (this.isDepartType == -1) { + this.columns = [ { title: '#', dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, { title: '璁惧缂栧彿', - align: "center", + align: 'center', dataIndex: 'equipmentId', - width: 200, + width: 200 // sorter: true }, { title: '璁惧鍚嶇О', - align: "center", + align: 'center', width: 200, - dataIndex: 'equipmentName', + dataIndex: 'equipmentName' }, { title: '杞﹂棿', - align: "center", + align: 'center', width: 200, dataIndex: 'productionName' }, { title: '璁惧绫诲瀷', - align: "center", + align: 'center', width: 200, - dataIndex: 'equipmentType', - // scopedSlots: {customRender: "avatarslot"} + dataIndex: 'equipmentType' }, { title: '椹卞姩绫诲瀷', - align: "center", + align: 'center', width: 200, - dataIndex: 'driveType', + dataIndex: 'driveType' // sorter: true }, { title: '鏈哄簥IP', - align: "center", + align: 'center', width: 200, dataIndex: 'equipmentIp' }, { title: '璁惧鍔熺巼', - align: "center", + align: 'center', width: 200, dataIndex: 'devicePower' }, @@ -347,98 +285,97 @@ { title: '绯荤粺鐗堟湰', - align: "center", + align: 'center', width: 200, dataIndex: 'systemVersion' }, { title: '鎿嶄綔', dataIndex: 'action', - scopedSlots: {customRender: 'action'}, - align: "center", + scopedSlots: { customRender: 'action' }, + align: 'center', width: 150, - fixed:'right' + fixed: 'right' } ] - }else{ - this.columns=[ + } else { + this.columns = [ { title: '#', dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, { title: '璁惧缂栧彿', - align: "center", + align: 'center', dataIndex: 'equipmentId', - width: 200, + width: 200 // sorter: true }, { title: '璁惧鍚嶇О', - align: "center", + align: 'center', width: 200, - dataIndex: 'equipmentName', + dataIndex: 'equipmentName' }, { title: '杞﹂棿', - align: "center", + align: 'center', width: 200, dataIndex: 'productionName' }, { title: '璁惧绫诲瀷', - align: "center", + align: 'center', width: 200, - dataIndex: 'equipmentType', - // scopedSlots: {customRender: "avatarslot"} + dataIndex: 'equipmentType' }, { title: '椹卞姩绫诲瀷', - align: "center", + align: 'center', width: 200, - dataIndex: 'driveType', + dataIndex: 'driveType' // sorter: true }, { title: '鏈哄簥IP', - align: "center", + align: 'center', width: 200, dataIndex: 'equipmentIp' }, { title: '璁惧鍔熺巼', - align: "center", + align: 'center', width: 200, dataIndex: 'devicePower' }, { title: '閮ㄩ棬', - align: "center", + align: 'center', width: 200, dataIndex: 'orgCodeTxt' }, { title: '绯荤粺鐗堟湰', - align: "center", + align: 'center', width: 200, dataIndex: 'systemVersion' }, { title: '鎿嶄綔', dataIndex: 'action', - scopedSlots: {customRender: 'action'}, - align: "center", + scopedSlots: { customRender: 'action' }, + align: 'center', width: 150, - fixed:'right' + fixed: 'right' } ] @@ -447,125 +384,44 @@ } else { // this.$message.warn(res.message) this.$notification.warning({ - message:'娑堟伅', - description:res.message - }); + message: '娑堟伅', + description: res.message + }) } - }).finally(() =>{ + }).finally(() => { }) }, - handleEdit: function (record) { - this.$refs.modalForm.edit(record); - this.$refs.modalForm.title = "缂栬緫"; - this.$refs.modalForm.disableSubmit = false; - this.$refs.modalForm.disSeach = true; + /** + * 璋冪敤鎺ュ彛鑾峰彇鏌ヨ鍖哄煙杞﹂棿鏍戝垪琛� + */ + getWorkshopListByApi() { + queryProductionTreeList().then(res => { + if (res.success) { + this.workshopTreeData = res.result + this.treeDefaultExpandedKeys = [...res.result].map(item => item.key) + } + }) + }, + handleEdit: function(record) { + this.$refs.modalForm.edit(record) + this.$refs.modalForm.title = '缂栬緫' + this.$refs.modalForm.disableSubmit = false + this.$refs.modalForm.disSeach = true // 璋冪敤鎶藉眽琛ㄥ崟缁勪欢涓殑娓呴櫎琛ㄥ崟楠岃瘉鏂规硶 this.$refs.modalForm.removeValidate() }, - handleAdd: function () { - this.$refs.modalForm.add(); - this.$refs.modalForm.title = "鏂板"; - this.$refs.modalForm.disableSubmit = false; - this.$refs.modalForm.disSeach = false; - }, - getAvatarView: function (avatar) { - return getFileAccessHttpUrl(avatar) - }, - batchFrozen: function (status) { - if (this.selectedRowKeys.length <= 0) { - // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); - this.$notification.warning({ - message:'娑堟伅', - description:"璇烽�夋嫨涓�鏉¤褰�" - }); - return false; - } else { - let ids = ""; - let that = this; - let isAdmin = false; - that.selectionRows.forEach(function (row) { - if (row.username == 'admin') { - isAdmin = true; - } - }); - if (isAdmin) { - that.$message.warning('绠$悊鍛樿处鍙蜂笉鍏佽姝ゆ搷浣�,璇烽噸鏂伴�夋嫨锛�'); - return; - } - that.selectedRowKeys.forEach(function (val) { - ids += val + ","; - }); - that.$confirm({ - title: "纭鎿嶄綔", - content: "鏄惁" + (status == 1 ? "瑙e喕" : "鍐荤粨") + "閫変腑璐﹀彿?", - onOk: function () { - frozenBatch({ids: ids, status: status}).then((res) => { - if (res.success) { - // 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 - }); - - } - }); - } - }); - } + handleAdd: function() { + this.$refs.modalForm.add() + this.$refs.modalForm.title = '鏂板' + this.$refs.modalForm.disableSubmit = false + this.$refs.modalForm.disSeach = false }, handleMenuClick(e) { if (e.key == 1) { - this.batchDel(); - } else if (e.key == 2) { - this.batchFrozen(2); - } else if (e.key == 3) { - this.batchFrozen(1); + this.batchDel() } }, - // handleFrozen: function (id, status, username) { - // let that = this; - // //TODO 鍚庡彴鏍¢獙绠$悊鍛樿鑹� - // if ('admin' == username) { - // that.$message.warning('绠$悊鍛樿处鍙蜂笉鍏佽姝ゆ搷浣滐紒'); - // return; - // } - // frozenBatch({ids: id, status: status}).then((res) => { - // if (res.success) { - // that.$message.success(res.message); - // that.loadData(); - // } else { - // that.$message.warning(res.message); - // } - // }); - // }, - // handleChangePassword(username) { - // this.$refs.passwordmodal.show(username); - // }, - passwordModalOk() { - //TODO 瀵嗙爜淇敼瀹屾垚 涓嶉渶瑕佸埛鏂伴〉闈紝鍙互鎶奷atasource涓殑鏁版嵁鏇存柊涓�涓� - }, - onSyncFinally({isToLocal}) { - // 鍚屾鍒版湰鍦版椂鍒锋柊涓嬫暟鎹� - if (isToLocal) { - this.loadData() - } - }, - - getWorkshopListByApi(){ - queryProductionTreeList().then(res=>{ - if(res.success) this.workshopTreeData=res.result - }) - } } - } </script> <style scoped> diff --git a/src/views/mdc/base/MdcUtilizationRateList.vue b/src/views/mdc/base/MdcUtilizationRateList.vue index 3ed3fa0..e1c0abe 100644 --- a/src/views/mdc/base/MdcUtilizationRateList.vue +++ b/src/views/mdc/base/MdcUtilizationRateList.vue @@ -9,7 +9,8 @@ <a-input placeholder="璇疯緭鍏ョ被鍒�" v-model="queryParam.rateParameterCategory"></a-input> </a-form-item> </a-col> - <a-col> + + <a-col :md="6" :sm="8"> <a-space> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> diff --git a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue index f301ebf..f6ae0f2 100644 --- a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue +++ b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue @@ -12,6 +12,7 @@ :data-source="driveTypeList" placeholder="璇烽�夋嫨椹卞姩绫诲瀷" :filter-option="filterOption" + allowClear /> </a-form-item> </a-col> @@ -209,9 +210,13 @@ methods: { dateParamChange(value) { this.dates = value - console.log('value', value) - this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') - this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') + if(!value.length) { + delete this.queryParam.startTime + delete this.queryParam.endTime + }else{ + this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') + } }, exportExcel() { @@ -227,24 +232,15 @@ }, searchQuery() { - if (this.dates != '') { - 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.queryParam.pageNo = 1 - this.loadData() + if (this.queryParam.typeTree == '1') { + this.queryParam.parentId = this.queryParamEquip.parentId + this.queryParam.equipmentId = this.queryParamEquip.equipmentId } else { - // this.$message.warning("璇烽�夋嫨鏃堕棿") - this.$notification.warning({ - message: '娑堟伅', - description: '璇烽�夋嫨鏃堕棿' - }) + this.queryParam.parentId = this.queryParamPeople.parentId + this.queryParam.equipmentId = '' } - // this.onClearSelected() + this.queryParam.pageNo = 1 + this.loadData() }, searchReset() { diff --git a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue index 184f6bd..6a2918f 100644 --- a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue +++ b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue @@ -3,7 +3,7 @@ <!-- 鏌ヨ鍖哄煙 --> <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-row :gutter="24" style="width: 100%;"> <a-col :md="7" :sm="7"> <a-form-item label="鏃堕棿"> <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD"/> @@ -235,7 +235,7 @@ }, methods: { dateParamChange(v1, v2) { - // console.log(v1,v2) + console.log(v1,v2) this.queryParam.startTime = v2[0] this.queryParam.endTime = v2[1] // console.log(v2[0],v2[1]) @@ -350,8 +350,6 @@ 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; @@ -437,8 +435,10 @@ param.field = this.getQueryField(); param.parentId = this.queryParams.parentId; param.equipmentId = this.queryParams.equipmentId; - param.startTime = this.queryParam.startTime; - param.endTime = this.queryParam.endTime; + if(this.queryParam.startTime && this.queryParam.endTime){ + param.startTime = this.queryParam.startTime; + param.endTime = this.queryParam.endTime; + } // console.log(param); getAction(this.url.list,param).then((res) => { if(res.success){ diff --git a/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue b/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue index e9fec71..38aced3 100644 --- a/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue +++ b/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue @@ -23,6 +23,7 @@ :value="dates" :mode="['month', 'month']" @panelChange="dateParamChange" + @change="handleDateChange" /> </a-form-item> </a-col> @@ -40,7 +41,7 @@ </div> <div id="EfficiencyShift" style="flex:1;overflow: hidden"> - <a-table :columns="columns" rowKey="equipmentId" :dataSource="dataSource.records" :pagination="false" :scroll="{x:'max-content',y:scrollY}" bordered></a-table> + <a-table :columns="columns" rowKey="id" :dataSource="dataSource.records" :pagination="false" :scroll="{x:'max-content',y:scrollY}" bordered></a-table> </div> <!--<div class="pagination">--> <!--<a-pagination--> @@ -329,11 +330,19 @@ }, methods: { dateParamChange(value) { + console.log('dateParamChangeValue',value) this.dates = value this.queryParam.startTime = moment(this.dates[0]).format('YYYY-MM') this.queryParam.endTime = moment(this.dates[1]).format('YYYY-MM') }, - + handleDateChange(value){ + console.log('handleDateChangeValue',value) + if(!value.length) { + delete this.queryParam.startTime + delete this.queryParam.endTime + this.dates = [] + } + }, initShiftList() { getAction(this.url.initShiftList).then((res) => { if (res.success) { @@ -373,24 +382,15 @@ }, searchQuery() { - if (this.dates != '') { - 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.queryParam.pageNo = 1 - this.loadData() + if (this.queryParam.typeTree == '1') { + this.queryParam.parentId = this.queryParamEquip.parentId + this.queryParam.equipmentId = this.queryParamEquip.equipmentId } else { - // this.$message.warning("璇烽�夋嫨鏃堕棿") - this.$notification.warning({ - message: '娑堟伅', - description: '璇烽�夋嫨鏃堕棿' - }) + this.queryParam.parentId = this.queryParamPeople.parentId + this.queryParam.equipmentId = '' } - // this.onClearSelected() + this.queryParam.pageNo = 1 + this.loadData() }, searchReset() { diff --git a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue index f04727f..2486fc5 100644 --- a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue +++ b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue @@ -3,7 +3,7 @@ <!-- 鏌ヨ鍖哄煙 --> <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-row :gutter="24" style="width: 100%;"> <a-col :md="7" :sm="7"> <a-form-item label="鏃堕棿"> <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/> diff --git a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue index fb2e168..6185aa3 100644 --- a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue +++ b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue @@ -11,7 +11,7 @@ </a-col> <a-col :md="4" :sm="4" :xs="4"> <a-form-item label="鏃ユ湡"> - <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange"/> + <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange" :allowClear="false"/> </a-form-item> </a-col> <a-col :md="2" :sm="2" :xs="2"> @@ -20,12 +20,6 @@ <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> </a-space> </a-col> - <!--<a-col :md="2" :sm="2" :xs="2">--> - <!--<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> @@ -94,14 +88,9 @@ import moment from 'moment' import { putAction, getAction } from '@/api/manage' import $ from 'jquery' - import AFormItem from 'ant-design-vue/es/form/FormItem' import * as echarts from 'echarts' export default { name: 'StatisticalAnalysisMain', - components:{ - AFormItem - - }, props: { equip: {} }, data(){ return{ @@ -121,7 +110,7 @@ dates: [], queryParam: {}, queryParams:{ - collectTime:undefined, + collectTime:null, }, shiftSubList: [], shiftList: [], @@ -133,11 +122,11 @@ } }, created(){ - let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD'); - this.queryParams.collectTime = collectTime; - this.queryParams.dateTime = this.queryParams.collectTime.format('YYYYMMDD') + // let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD'); + this.queryParams.collectTime = moment().add(-1,'d').format('YYYY-MM-DD') + this.queryParams.dateTime = moment().add(-1,'d').format('YYYYMMDD') this.initEquipmentNode() - this.queryStatistical(); + // this.queryStatistical(); // this.getTime(37800); }, @@ -414,31 +403,24 @@ StartupLine.setOption(statChartPieOption2); }, queryStatistical(){ - if(this.queryParams.collectTime){ - getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ - if(res.success) { - // console.log(res); - 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.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.$notification.warning({ - message:'娑堟伅', - description:'璇烽�夋嫨鏃堕棿' - }) - } + getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ + if(res.success) { + // console.log(res); + 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.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(); + } + }) }, dataChange(val) { this.queryParam.collectTime1 = ""; @@ -454,7 +436,7 @@ 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.queryStatistical() } else { @@ -483,7 +465,11 @@ }, searchReset() { this.queryParam = {} - this.queryParams = {} + this.queryParams = { + collectTime:moment().add(-1,'d').format('YYYY-MM-DD'), + dateTime:moment().add(-1,'d').format('YYYYMMDD') + } + this.initEquipmentNode() // this.dates = [] // this.queryStatistical() // this.onClearSelected() diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue index ecbcaae..b65eec2 100644 --- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue +++ b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue @@ -11,7 +11,7 @@ </a-col> <a-col :md="4" :sm="4" :xs="4"> <a-form-item label="鏃ユ湡"> - <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange"/> + <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange" :allowClear="false"/> </a-form-item> </a-col> <a-col :md="2" :sm="2" :xs="2"> @@ -20,12 +20,6 @@ <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> </a-space> </a-col> - <!--<a-col :md="2" :sm="2" :xs="2">--> - <!--<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> @@ -97,14 +91,9 @@ import moment from 'moment' import { putAction, getAction } from '@/api/manage' import $ from 'jquery' - import AFormItem from 'ant-design-vue/es/form/FormItem' import * as echarts from 'echarts' export default { name: 'StatisticsLegend', - components:{ - AFormItem - - }, props: { equip: {} }, data(){ return{ @@ -136,16 +125,11 @@ } }, 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.queryStatistical(); + this.queryParams.collectTime = moment().add(-1,'d').format('YYYY-MM-DD') + this.queryParams.dateTime = moment().add(-1,'d').format('YYYYMMDD') + this.initEquipmentNode() + // this.queryStatistical(); // this.getTime(37800); }, @@ -595,45 +579,38 @@ StartupLine.setOption(StartupLine_option); }, queryStatistical(){ - if(this.queryParams.collectTime){ - getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ - if(res.success){ - this.StatCharOpeningRate = res.result.openRate; - this.StatCharUsedRate = res.result.utilizationRate; - this.UtilizationHeight = res.result.openRate; - 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.$notification.warning({ - message:'娑堟伅', - description:'璇烽�夋嫨鏃堕棿' - }) - } + getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ + if(res.success){ + this.StatCharOpeningRate = res.result.openRate; + this.StatCharUsedRate = res.result.utilizationRate; + this.UtilizationHeight = res.result.openRate; + 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(); + } + }) }, dataChange(val) { - this.queryParam.collectTime1 = ""; if(val){ this.queryParams.dateTime = val.format('YYYYMMDD') 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) - } else { // this.$message.warn(res.message) this.$notification.warning({ @@ -660,7 +637,11 @@ }, searchReset() { this.queryParam = {} - this.queryParams = {} + this.queryParams = { + collectTime:moment().add(-1,'d').format('YYYY-MM-DD'), + dateTime:moment().add(-1,'d').format('YYYYMMDD') + } + this.initEquipmentNode() // this.dates = [] // this.queryStatistical() // this.onClearSelected() diff --git a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue index 172ff2b..9e81036 100644 --- a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue +++ b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue @@ -3,18 +3,18 @@ <!-- 鏌ヨ鍖哄煙 --> <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-row :gutter="24" style="width: 100%;"> <a-col :md="7" :sm="7"> <a-form-item label="鏃堕棿"> <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD HH:mm"/> </a-form-item> </a-col> - <a-col :md="4" :sm="4"> + <a-col :md="5" :sm="5"> <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-col :md="5" :sm="5" :xs="5"> <a-form-item label="璁惧鍚嶇О"> <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParams.equipmentName"></a-input> </a-form-item> diff --git a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue index da98855..8ee1144 100644 --- a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue +++ b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue @@ -8,7 +8,7 @@ <a-col :md="7" :sm="7"> <a-form-item label="鏃堕棿"> <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" - v-model="dates"/> + v-model="dates" :allowClear="false"/> </a-form-item> </a-col> <a-col :lg="2" :md="2" :sm="2" :xs="2"> @@ -311,93 +311,15 @@ this.queryParam.endDate = v2[1] }, searchQuery() { - if (this.dates && this.dates.length > 0) { - 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() + if (this.queryParam.typeTree == '1') { + this.queryParam.parentId = this.queryParamEquip.parentId + this.queryParam.equipmentId = this.queryParamEquip.equipmentId } else { - this.$notification.warning({ - message: '鎻愮ず', - description: '璇烽�夋嫨鏃堕棿' - }) + this.queryParam.parentId = this.queryParamPeople.parentId + this.queryParam.equipmentId = '' } - - // this.onClearSelected() + this.loadData1() }, - // 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.outerDataLoading = true this.tableHeads = [] diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue index d187ef1..25fbb93 100644 --- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue +++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue @@ -9,12 +9,12 @@ <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD HH:mm:ss"/> </a-form-item> </a-col> - <a-col :md="4" :sm="4"> + <a-col :md="5" :sm="5"> <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-col :md="5" :sm="5" :xs="5"> <a-form-item label="璁惧鍚嶇О"> <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParams.equipmentName"></a-input> </a-form-item> diff --git a/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue b/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue index be9c4d5..e216471 100644 --- a/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue +++ b/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue @@ -16,7 +16,7 @@ </a-col> <a-col :md="6" :sm="6"> <a-form-item label="鏃堕棿"> - <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/> + <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates" :allowClear="false"/> </a-form-item> </a-col> <a-col :md="14" :sm="14" style="display: flex;align-items: flex-start;-webkit-align-items: flex-start;justify-content: space-between;"> @@ -423,10 +423,12 @@ 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.dates = [moment().subtract('days', 8), moment().subtract('days', 1)] + this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') // this.ipagination.current = 1 this.loadData(); // this.queryParam = {} @@ -443,6 +445,12 @@ // console.log(res.result) this.tableHeads = res.result.dates this.dataList = res.result.mdcEfficiencyList + if (res.result.mdcEfficiencyList && !res.result.mdcEfficiencyList.length) { + this.$notification.info({ + message: '娑堟伅', + description: '鏆傛棤璇ヨ澶囩被鍨嬫暟鎹�' + }) + } this.checkSameData(this.dataList) this.checkSameData1(this.dataList) this.checkSameData2(this.dataList) diff --git a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue index 9e2abec..ca32e54 100644 --- a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue +++ b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue @@ -19,15 +19,17 @@ <a-col :md="6" :sm="6"> <a-form-item label="鏃堕棿"> <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" - v-model="dates"/> + v-model="dates" :allowClear="false"/> </a-form-item> </a-col> - <a-col :md="14" :sm="14" style="display: flex;align-items: flex-start;-webkit-align-items: flex-start;justify-content: space-between;"> + <a-col :md="14" :sm="14" + style="display: flex;align-items: flex-start;-webkit-align-items: flex-start;justify-content: space-between;"> <a-space> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button> - <a-button type="primary" icon="printer" v-print="'#Efficiency'" v-has="'efficiency:print'">鎵撳嵃</a-button> + <a-button type="primary" icon="printer" v-print="'#Efficiency'" v-has="'efficiency:print'">鎵撳嵃 + </a-button> </a-space> <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;margin-left: 24px"> <tr> @@ -52,18 +54,18 @@ </a-form> </div> <!--<div style="width: 530px;position: absolute;top: 0; right: 1.5%;">--> - <!--<table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">--> - <!--<tr>--> - <!--<td v-for="(item, index) in identifying">{{item.title}}</td>--> - <!--</tr>--> - <!--<tr>--> - <!--<td style="text-align:center;" v-for="(item, index) in identifying">--> - <!--<div class="identifyingclass" :style="{background: item.color}"></div>--> - <!--</td>--> - <!--<!–<td style="text-align:center;"><div style="width: 55px;height: 15px;background-color: #e8ff37;display:inline-block"></div></td>–>--> - <!--<!–<td style="text-align:center;"><div style="width: 55px;height: 15px;background-color: #99ff4e;display:inline-block"></div></td>–>--> - <!--</tr>--> - <!--</table>--> + <!--<table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">--> + <!--<tr>--> + <!--<td v-for="(item, index) in identifying">{{item.title}}</td>--> + <!--</tr>--> + <!--<tr>--> + <!--<td style="text-align:center;" v-for="(item, index) in identifying">--> + <!--<div class="identifyingclass" :style="{background: item.color}"></div>--> + <!--</td>--> + <!--<!–<td style="text-align:center;"><div style="width: 55px;height: 15px;background-color: #e8ff37;display:inline-block"></div></td>–>--> + <!--<!–<td style="text-align:center;"><div style="width: 55px;height: 15px;background-color: #99ff4e;display:inline-block"></div></td>–>--> + <!--</tr>--> + <!--</table>--> <!--</div>--> </div> @@ -123,7 +125,9 @@ </div> </td> <td class="tdgu3 kaitou">{{item.equipmentId}}</td> - <td class="tdgu4 kaitou" style="min-width: 162px; max-width: 162px;width: 162px;">{{item.equipmentName}}</td> + <td class="tdgu4 kaitou" style="min-width: 162px; max-width: 162px;width: 162px;"> + {{item.equipmentName}} + </td> <td class="tdgu5 kaitou">{{item.equipmentType}}</td> </template> @@ -480,10 +484,12 @@ 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.dates = [moment().subtract('days', 8), moment().subtract('days', 1)] + this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') // this.ipagination.current = 1 this.loadData() // this.queryParam = {} @@ -499,6 +505,12 @@ if (res.success) { this.tableHeads = res.result.dates this.dataList = res.result.mdcEfficiencyList + if (res.result.mdcEfficiencyList && !res.result.mdcEfficiencyList.length) { + this.$notification.info({ + message: '娑堟伅', + description: '鏆傛棤璇ヨ澶囩被鍨嬫暟鎹�' + }) + } this.distinguishColorList = res.result.utilizationRateList this.checkSameData(this.dataList) this.checkSameData1(this.dataList) @@ -528,7 +540,7 @@ }).finally(() => { this.loading = false }) - }, + } } } </script> @@ -636,7 +648,7 @@ left: 412px; } - #Efficiency{ + #Efficiency { overflow: hidden; } diff --git a/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue b/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue index c7adad0..b1cbfa5 100644 --- a/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue +++ b/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue @@ -17,7 +17,7 @@ </a-col> <a-col :md="5" :sm="5" :xs="5"> <a-form-item label="鏃堕棿"> - <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/> + <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates" :allowClear="false"/> </a-form-item> </a-col> <a-col :md="4" :sm="4" :xs="4"> @@ -455,7 +455,7 @@ this.queryParam.startTime = v2[0] this.queryParam.endTime = v2[1] // 鐐瑰嚮鏃堕棿閫夋嫨鍣ㄧ殑娓呯┖鎸夐挳鏃朵細瑙﹀彂姝ゅ垽鏂�(鐐瑰嚮閲嶇疆鎸夐挳涓嶄細瑙﹀彂)锛屽疄鐜伴噸缃垪琛ㄥ姛鑳斤紝鍒囧疄鏀瑰彉鍒楄〃鏄剧ず鏁堟灉 - if(!this.queryParam.startTime&&!this.queryParam.endTime)this.searchReset() + // if(!this.queryParam.startTime&&!this.queryParam.endTime)this.searchReset() }, efficiencyOptionsOnChange(checkedList) { let index = checkedList.indexOf('lyl') @@ -470,22 +470,14 @@ this.checkedList = checkedList }, searchQuery() { - if(this.dates != ''){ - 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.loadData() + if(this.queryParam.typeTree == "1"){ + this.queryParam.parentId = this.queryParamEquip.parentId + this.queryParam.equipmentId = this.queryParamEquip.equipmentId }else{ - // this.$message.warning("璇烽�夋嫨鏃堕棿") - this.$notification.warning({ - message:'娑堟伅', - description:"璇烽�夋嫨鏃堕棿" - }); + this.queryParam.parentId = this.queryParamPeople.parentId + this.queryParam.equipmentId = "" } + this.loadData() // this.onClearSelected() }, searchReset() { @@ -493,7 +485,9 @@ this.typeParent = this.queryParam.parentId this.typeEquipment = this.queryParam.equipmentId this.queryParam = {} - this.dates = [] + this.dates = [moment().subtract('days', 7), moment().subtract('days', 1)] + this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') this.queryParam.typeTree = this.typeTree this.queryParam.parentId = this.typeParent this.queryParam.equipmentId = this.typeEquipment @@ -508,6 +502,12 @@ if (res.success) { this.tableHeads = res.result.dates this.dataList = res.result.mdcEfficiencyList + if (res.result.mdcEfficiencyList && !res.result.mdcEfficiencyList.length) { + this.$notification.info({ + message: '娑堟伅', + description: '鏆傛棤璇ヨ澶囩被鍨嬫暟鎹�' + }) + } this.checkSameData(this.dataList) this.checkSameData1(this.dataList) this.checkSameData2(this.dataList) diff --git a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue index 8505d58..f466042 100644 --- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue +++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue @@ -3,18 +3,18 @@ <!-- 鏌ヨ鍖哄煙 --> <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-row :gutter="24" style="width: 100%;"> <a-col :md="7" :sm="7"> <a-form-item label="鏃堕棿"> <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD"/> </a-form-item> </a-col> - <a-col :md="4" :sm="4"> + <a-col :md="5" :sm="5"> <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-col :md="5" :sm="5" :xs="5"> <a-form-item label="璁惧鍚嶇О"> <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParams.equipmentName"></a-input> </a-form-item> @@ -464,8 +464,10 @@ param.field = this.getQueryField(); param.parentId = this.queryParams.parentId; param.equipmentId = this.queryParams.equipmentId; - param.startTime = this.queryParam.startTime; - param.endTime = this.queryParam.endTime; + if(this.queryParam.startTime && this.queryParam.endTime){ + param.startTime = this.queryParam.startTime; + param.endTime = this.queryParam.endTime; + } // console.log(param); getAction(this.url.list,param).then((res) => { if(res.success){ diff --git a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue index 3cae1f0..5892c14 100644 --- a/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue +++ b/src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue @@ -3,18 +3,18 @@ <!-- 鏌ヨ鍖哄煙 --> <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-row :gutter="24" style="width: 100%;"> <a-col :md="7" :sm="7"> <a-form-item label="鏃堕棿"> <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD"/> </a-form-item> </a-col> - <a-col :md="4" :sm="4"> + <a-col :md="5" :sm="5"> <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-col :md="5" :sm="5" :xs="5"> <a-form-item label="璁惧鍚嶇О"> <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParams.equipmentName"></a-input> </a-form-item> @@ -473,8 +473,10 @@ param.field = this.getQueryField(); param.parentId = this.queryParams.parentId; param.equipmentId = this.queryParams.equipmentId; - param.startTime = this.queryParam.startTime; - param.endTime = this.queryParam.endTime; + if(this.queryParam.startTime && this.queryParam.endTime){ + param.startTime = this.queryParam.startTime; + param.endTime = this.queryParam.endTime; + } // console.log(param); getAction(this.url.list,param).then((res) => { if(res.success){ diff --git a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue index 8a6bdcf..41f7c37 100644 --- a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue +++ b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue @@ -3,18 +3,13 @@ <!-- 鏌ヨ鍖哄煙 --> <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"/> - </a-form-item> - </a-col> - <a-col :md="4" :sm="4"> + <a-row :gutter="24" style="width: 100%;"> + <a-col :md="5" :sm="5"> <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-col :md="5" :sm="5" :xs="5"> <a-form-item label="璁惧鍚嶇О"> <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParams.equipmentName"></a-input> </a-form-item> @@ -25,15 +20,6 @@ <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> </a-space> </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> @@ -63,7 +49,7 @@ <div id="DeviceList" style="flex: 1;overflow: hidden"> <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns" :scroll="{x:'max-content',y:scrollY}" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :rowSelection="{selectedRowKeys: selectedRowKeys}" @change="handleTableChange"> <span slot="action" slot-scope="text, record"> <a @click="handleEdit(record)">缂栬緫</a> @@ -91,7 +77,6 @@ </template> <script> - import moment from 'moment' import $ from 'jquery' import JDictSelectTag from '@/components/dict/JDictSelectTag' import JDate from '../../../../../components/jeecg/JDate' @@ -103,8 +88,6 @@ } from '@/api/manage' import MdcStandardProcessDurationModal from './MdcStandardProcessDurationModal' import MdcStandardProcessDurationEdit from './MdcStandardProcessDurationEdit' - // import DeviceRepairModelAdd from './DeviceRepairModelAdd' - // import DeviceRepairModelEdit from './DeviceRepairModelEdit' import '@/components/table2excel/table2excel' import { JeecgListMixin @@ -120,8 +103,6 @@ Tooltip, MdcStandardProcessDurationModal, MdcStandardProcessDurationEdit, - // DeviceRepairModelAdd, - // DeviceRepairModelEdit, JDictSelectTag, JInput, JDate, @@ -133,7 +114,6 @@ typeTree:"", typeParent:1, typeEquipment:1, - dates: [], xianshi:"", readOnly:true, queryParam: {}, @@ -154,18 +134,12 @@ align: 'center', dataIndex: 'equipmentName', width:200 - // defaultSortOrder:'descend', - // sorter: (a, b) => {return a.equipmentName>b.equipmentName?1:-1} }, { title: '闆朵欢鍙�', align: 'center', dataIndex: 'partsCode', width:150 - // scopedSlots:{customRender:'startTime'}, - // customRender:(text,row,index) => { - // return moment(text).format("YYYY-MM-DD HH:mm:ss") - // } }, { title: '鎵规鍙�', @@ -214,7 +188,6 @@ Type(valmath){ this.dataList = []; this.queryParams.typeTree = valmath - // console.log(this.queryParams.typeTree) }, nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 if (JSON.stringify(val) != '{}') { @@ -257,19 +230,6 @@ 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"){ diff --git a/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue b/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue index 630964f..0f05931 100644 --- a/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue +++ b/src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue @@ -5,18 +5,18 @@ <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-col :md="7" :sm="7"> <a-form-item label="鏃堕棿"> <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" - v-model="dates"/> + v-model="dates" :allowClear="false"/> </a-form-item> </a-col> <a-col :md="17" :sm="17" :xs="17"> <a-form-item label="鏃堕棿娈�"> <a-space> - <a-time-picker :default-value="moment('00:00', 'HH:mm')" format="HH:mm" @change="onChangeStart"/> + <a-time-picker :default-value="moment('00:00', 'HH:mm')" format="HH:mm" @change="onChangeStart" :allowClear="false"/> 鑷� - <a-time-picker :default-value="moment('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd"/> + <a-time-picker :default-value="moment('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd" :allowClear="false"/> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> </a-space> </a-form-item> @@ -225,96 +225,20 @@ this.dates = [v1[0], v1[1]] }, searchQuery() { + // 鍥犺Е搴曞埛鏂颁細淇敼鍙傛暟鏃堕棿鍊硷紝鏁呭湪姝ょ敤鏃堕棿閫夋嫨鍣ㄧ殑鏃堕棿鍊煎鍙傛暟鏃堕棿鍊煎啀娆¤祴鍊硷紝鑻ヤ笉杩欐牱鍋氬垯鍙傛暟鏃堕棿鍊煎垯浼氫笌鏃堕棿閫夋嫨鍣ㄤ笂鐨勬椂闂村�间笉涓�鑷� this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD') this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') - if (this.queryParam.startTime && this.queryParam.endTime && this.dates[0] && this.dates[1]) { - 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.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1 - this.loadData1() - } else { - this.$notification.warning({ - message: '鎻愮ず', - description: '璇烽�夋嫨鏃堕棿鎴栨椂闂存' - }) - } - // this.onClearSelected() + 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.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1 + this.loadData1() }, - // 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.loading = true this.tableHeads = [] diff --git a/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue b/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue index 6f33288..8b4bcfd 100644 --- a/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue +++ b/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue @@ -8,7 +8,7 @@ <a-col :md="7" :sm="7"> <a-form-item label="鏃堕棿"> <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" - v-model="dates"/> + v-model="dates" :allowClear="false"/> </a-form-item> </a-col> <a-col :lg="2" :md="3" :sm="3" :xs="3"> @@ -237,26 +237,19 @@ this.dates = [v1[0], v1[1]] }, searchQuery() { - console.log('dates', this.dates) + // 鍥犺Е搴曞埛鏂颁細淇敼鍙傛暟鏃堕棿鍊硷紝鏁呭湪姝ょ敤鏃堕棿閫夋嫨鍣ㄧ殑鏃堕棿鍊煎鍙傛暟鏃堕棿鍊煎啀娆¤祴鍊硷紝鑻ヤ笉杩欐牱鍋氬垯鍙傛暟鏃堕棿鍊煎垯浼氫笌鏃堕棿閫夋嫨鍣ㄤ笂鐨勬椂闂村�间笉涓�鑷� this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD') this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') - if (this.dates[0] && this.dates[1]) { - 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.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1 - this.loadData1() + + if (this.queryParam.typeTree == '1') { + this.queryParam.parentId = this.queryParamEquip.parentId + this.queryParam.equipmentId = this.queryParamEquip.equipmentId } else { - this.$notification.warning({ - message: '鎻愮ず', - description: '璇烽�夋嫨鏃堕棿' - }) + this.queryParam.parentId = this.queryParamPeople.parentId + this.queryParam.equipmentId = '' } - // this.onClearSelected() + this.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1 + this.loadData1() }, // searchReset() { // this.typeTree = this.queryParam.typeTree -- Gitblit v1.9.3