From a22a69946912221dab4d32987dda6c4c8ba3c5d8 Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期二, 24 六月 2025 17:43:24 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue | 2 src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentAssignModal.vue | 543 ++++++++++ src/views/mdc/base/GroupUtilizationRateChart.vue | 442 ++++---- src/views/mdc/base/modules/deviceCalendar/DeviceCalendarList.vue | 11 src/views/mdc/base/GroupUtilizationRateCompareChart.vue | 345 +++--- src/views/dnc/common/TableContextMenu.vue | 7 src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue | 2 src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue | 47 src/views/mdc/base/GroupEquipmentUtilizationRateChart.vue | 444 ++++---- src/views/mdc/base/DeviceParamThresholdManagement.vue | 2 src/views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue | 392 +++++++ src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue | 14 src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentTableList.vue | 19 src/views/mdc/base/DeliveryGroupUtilizationRateChart.vue | 504 ++++---- src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchForm.vue | 5 src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue | 2 src/api/dnc.js | 10 src/views/dnc/base/modules/ProductStructure/Document/NcDocumentAssignModal.vue | 4 src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue | 5 src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue | 2 src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue | 43 src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue | 31 src/views/flowable/workflow/FlowTodo.vue | 34 src/views/mdc/base/modules/DeviceLog/LogInfo.vue | 159 +- 24 files changed, 1,989 insertions(+), 1,080 deletions(-) diff --git a/src/api/dnc.js b/src/api/dnc.js index aae51bc..c10c525 100644 --- a/src/api/dnc.js +++ b/src/api/dnc.js @@ -28,13 +28,13 @@ // 鎸囨淳鏂囨。鍒拌澶� assignDocumentToDeviceApi: params => postAction('/nc/activit/assign/file/apply', params), // 鎻愬彇鍒�鍏� - extractToolsApi: ({ docId,attributionType, attributionId}) => getAction(`/nc/cutter/extractCutterInfo/${docId}/${attributionType}/${attributionId}`), + extractToolsApi: ({ docId, attributionType, attributionId }) => getAction(`/nc/cutter/extractCutterInfo/${docId}/${attributionType}/${attributionId}`), // 鍙戦�佸垁鍏风郴缁� - sendToolsApi: ({ docId,attributionType, attributionId}) => getAction(`/nc/cutter/sendCutterInfo/${docId}/${attributionType}/${attributionId}`), + sendToolsApi: ({ docId, attributionType, attributionId }) => getAction(`/nc/cutter/sendCutterInfo/${docId}/${attributionType}/${attributionId}`), // 涓嬭浇鏂囨。 downloadDocumentApi: ({ docId, docName }) => requestGetDownLoad(`/nc/doc/download/${docId}`, docName), // 鍒犻櫎鏂囨。 - deleteDocumentApi: ({ docId,attributionType, attributionId}) => deleteAction(`/nc/doc/delete/${docId}/${attributionType}/${attributionId}`), + deleteDocumentApi: ({ docId, attributionType, attributionId }) => deleteAction(`/nc/doc/delete/${docId}/${attributionType}/${attributionId}`), // 鏂囨。鍑哄簱 documentOutboundApi: ({ docId, docName }) => requestGetDownLoad(`/nc/doc/pull/${docId}`, docName), // 鏂囨。鍙栨秷鍑哄簱 @@ -85,6 +85,10 @@ //-------------------------璁惧缁撴瀯鏍�------------------------------------------------ // 鑾峰彇璁惧鏍� getDeviceTreeDataApi: () => getAction('/nc/device/queryTreeListByProduction'), + // 鑾峰彇浜у搧缁撴瀯鏍戝畬鏁村眰绾у埌NC鏂囦欢 + getAllProductTreeDataApi: () => getAction('/nc/product/getAllTree'), + // 鎸囨淳鍒颁骇鍝� + assignNcToProductApi: params => postAction('/dncFlow/assignEquipmentFileStream/savaFlow', params), // 鍒犻櫎鏂囨。 deleteDeviceRelativeDocumentApi: ({ docId, attributionId }) => deleteAction(`doc/relative/delete/device/${docId}/${attributionId}`), // 鑾峰彇鏈夋潈闄愮殑鐢ㄦ埛鍒楄〃 diff --git a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue index bb21be2..31fc780 100644 --- a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue +++ b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue @@ -47,7 +47,7 @@ currentRightClickedTableRowInfo: {}, hasLoadedDataTabKeyArray: [], url:{ - submitProccess:'/dncFlow/dispatchFile/submitProccess' + } } }, @@ -166,47 +166,6 @@ description: res.message }) } - }) - .finally(() => { - that.$destroyAll() - }) - }, - onCancel: () => { - that.$destroyAll() - } - }) - }, - handleAppoint(){ - const that = this - const { docId, param, attributionId,attributionType,publishFileId } = this.currentRightClickedTableRowInfo - that.$confirm({ - title: '鎻愮ず', - content: `纭瀹氬瀷鍚楋紵`, - okText: '纭', - cancelText: '鍙栨秷', - onOk: () => { - let dispatchFile = { - 'docId':docId, - 'attributionId':attributionId, - 'attributionType':attributionType, - 'fileId':publishFileId - } - postAction(this.url.submitProccess,dispatchFile) - .then(res => { - if (res.success) { - this.$message.success('娴佺▼鍙戣捣鎴愬姛') - } else { - that.$notification.error({ - message: '娑堟伅', - description: res.message - }) - } - }) - .catch(err => { - that.$notification.error({ - message: '娑堟伅', - description: err.message - }) }) .finally(() => { that.$destroyAll() diff --git a/src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentAssignModal.vue b/src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentAssignModal.vue new file mode 100644 index 0000000..f640e40 --- /dev/null +++ b/src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentAssignModal.vue @@ -0,0 +1,543 @@ +<template> + <j-modal width="85%" :title="title" :visible="visible" @cancel="handleCancel" :maskClosable="false" centered + @ok="handleAssignDocumentToDevice" :confirmLoading="confirmLoading"> + <div class="tabs-container"> + <div style="width: 72%"> + <a-tabs> + <a-tab-pane tab="鏂囨。鍒楄〃"> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :md="7" :sm="7"> + <a-form-item label="鏂囦欢鍚嶇О"> + <a-input placeholder="璇疯緭鍏ユ枃浠跺悕绉�" v-model="queryParam.docName" allow-clear></a-input> + </a-form-item> + </a-col> + + <a-col :md="9" :sm="9"> + <a-form-item label="涓婁紶鏃堕棿"> + <a-range-picker v-model="date" value-format="YYYY-MM-DD" + @change="handleDateChange" allow-clear></a-range-picker> + </a-form-item> + </a-col> + + <a-col :md="4" :sm="4"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </a-col> + </a-row> + </a-form> + </div> + + + <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys,selectedRows:selectionRows, onChange: onSelectChange,type:'radio'}" + @change="handleTableChange" :customRow="customRow" + :scroll="{y:456}" :size="size" rowKey="docId"> + + <!-- 瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず--> + <span slot="docName" slot-scope="text"> + <j-ellipsis :value="text"/> + </span> + </a-table> + </a-tab-pane> + </a-tabs> + </div> + + <div style="width: 26%"> + <a-tabs> + <a-tab-pane tab="璁惧鍒楄〃"> + <a-spin :spinning="spinning"> + <div style="display: flex;flex-direction: column;"> + <div style="display: flex"> + <a-input placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�" allowClear v-model="searchInput" + @change="handleSearchInputChange"/> + <a-button type="primary" @click="isExpandAllTreeNode=!isExpandAllTreeNode" style="margin: 0 8px"> + 灞曞紑/鎶樺彔 + </a-button> + </div> + + <!--浜у搧缁撴瀯鏍�--> + <div style="overflow:auto;margin-top: 10px;height: 400px"> + <a-tree blockNode checkable :checkedKeys="checkedKeys" :expandedKeys.sync="expandedKeys" + :autoExpandParent="autoExpandParent" @select="handleTreeNodeSelect" checkStrictly + :treeData="treeDataSource" @check="handleTreeNodeCheck" @expand="handleTreeNodeExpand"> + <template slot="title" slot-scope="{ label, parentId, entity, key:treeKey,type}"> + <a-tooltip :title="label" v-if="type==99"> + <span v-if="label.indexOf(searchValue) > -1"> + {{ label.substr(0, label.indexOf(searchValue)) }} + <span class="replaceSearch">{{searchValue}}</span> + {{ label.substr(label.indexOf(searchValue) + searchValue.length) }} + </span> + <span v-else>{{ label }}</span> + </a-tooltip> + <template v-else> + <span v-if="label.indexOf(searchValue) > -1"> + {{ label.substr(0, label.indexOf(searchValue)) }} + <span class="replaceSearch">{{searchValue}}</span> + {{ label.substr(label.indexOf(searchValue) + searchValue.length) }} + </span> + <span v-else>{{ label }}</span> + </template> + </template> + </a-tree> + </div> + + <a-form-model ref="form" :rules="validateRules" :model="queryParam"> + <a-form-model-item label="鎸囨淳鍘熷洜" prop="applyReason"> + <a-textarea placeholder="璇疯緭鍏ユ寚娲惧師鍥�" v-model="queryParam.applyReason" rows="3" style="resize: none"/> + </a-form-model-item> + </a-form-model> + </div> + </a-spin> + </a-tab-pane> + </a-tabs> + </div> + </div> + </j-modal> +</template> + +<script> + import { getAction } from '@/api/manage' + import dncApi from '@/api/dnc' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + + export default { + name: 'HasReceivedDocumentAssignModal', + components: {}, + mixins: [JeecgListMixin], + props: { + currentDocumentInfo: { + type: Object + }, + currentTreeNodeInfo: { + type: Object + }, + size: { + type: String + } + }, + data() { + return { + disableMixinCreated: true, + visible: false, + title: '', + columns: [ + { + title: '搴忓彿', + dataIndex: 'rowIndex', + key: 'rowIndex', + width: 65, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '鏂囦欢鍚嶇О', + dataIndex: 'docName', + key: 'docName', + align: 'center', + scopedSlots: { customRender: 'docName' }, + sorter: true + }, + { title: '璁惧缂栧彿', dataIndex: 'docCode', align: 'center' }, + { + title: '鍑哄簱鐘舵��', + dataIndex: 'pullStatus_dictText', + key: 'pullStatus', + align: 'center', + filters: [ + { text: '鏈嚭搴�', value: 1 }, + { text: '宸插嚭搴�', value: 2 } + ] + }, + { + title: '鐘� 鎬�', + dataIndex: 'docDispatchStatus_dictText', + key: 'docDispatchStatus', + align: 'center', + filters: [ + { text: '缂栧埗', value: 1 }, + { text: '鏍″', value: 2 }, + { text: '鎵瑰噯', value: 3 }, + { text: '璇曞垏', value: 4 }, + { text: '瀹氬瀷', value: 5 } + ] + }, + { + title: '鍒涘缓鏃堕棿', + dataIndex: 'createTime', + align: 'center', + width: 200, + sorter: true + } + ], + validateRules: { + applyReason: [ + { required: true, message: '璇疯緭鍏ユ寚娲惧師鍥�' } + ] + }, + searchValue: '', + searchInput: '', + spinning: false, + treeDataSource: [], + allTreeKeys: [], + checkedKeys: [], + expandedKeys: [], + autoExpandParent: true, + isExpandAllTreeNode: false, + confirmLoading: false, + date: [], + url: { + list: '/nc/doc/find/list' + } + } + }, + watch: { + visible: { + handler(value) { + if (value) { + this.resetData() + this.loadData() + this.getDocumentAssignDeviceTreeByApi() + } + } + }, + isExpandAllTreeNode: { + handler(value) { + if (value) this.expandedKeys = this.allTreeKeys + else this.expandedKeys = [] + } + } + }, + created() { + this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) + }, + beforeDestroy() { + this.$bus.$off('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) + }, + methods: { + // 璁惧鏍戝彸閿彍鍗曟寚娲惧埌浜у搧寮圭獥 + handleDeviceRecAssign() { + this.visible = true + }, + + // 鑾峰彇褰撳墠宸ュ簭鎴栧伐姝ュ搴旀枃妗e垪琛� + loadData() { + this.dataSource = [] + if (!this.url.list) { + this.$message.error('璇疯缃畊rl.list灞炴��!') + return + } + var params = this.getQueryParams()//鏌ヨ鏉′欢 + if (!params) return false + let paramType, paramId + if (this.currentTreeNodeInfo) { + const { key, type } = this.currentTreeNodeInfo + paramType = type + paramId = key + } else if (this.currentDocumentInfo) { + const { attributionType, attributionId } = this.currentDocumentInfo + paramType = attributionType + paramId = attributionId + } + + params.attributionType = paramType + params.attributionId = paramId + params.docClassCode = 'REC' + this.loading = true + getAction(this.url.list, params) + .then((res) => { + if (res.success) this.dataSource = res.result + else this.$message.warning(res.message) + }).finally(() => { + this.loading = false + }) + }, + + /** + * 鑷畾涔夎〃鏍艰 + * @param record 琛ㄦ牸琛岃褰� + */ + customRow(record) { + return { + style: { + cursor: 'pointer' + }, + on: { + click: () => { + this.onSelectChange([record.docId], [record]) + } + } + } + }, + + // 鑾峰彇DNC浜у搧鏍� + getDocumentAssignDeviceTreeByApi() { + this.spinning = true + this.treeDataSource = [] + dncApi.getAllProductTreeDataApi() + .then(res => { + if (res.success) { + this.dataList = [] + this.allTreeKeys = [] + this.treeDataSource = res.result + console.log('treeDataSource', res.result) + this.generateList(this.treeDataSource) + this.expandedKeys = [this.treeDataSource[0].id] + } else { + this.$message.warn(res.message) + } + }) + .finally(() => { + this.spinning = false + }) + }, + + // 鏃堕棿閫夋嫨鍣ㄩ�夋嫨瀹屾垚鍚庤Е鍙� + handleDateChange(value) { + this.queryParam.startTime = value[0] + this.queryParam.endTime = value[1] + }, + + /** + * 琛ㄦ牸鍒嗛〉銆佹帓搴忔敼鍙樸�佺瓫閫夋椂瑙﹀彂 + * @param pagination 鍒嗛〉鍣ㄩ�夐」 + * @param filters 绛涢�夐�夐」 + * @param sorter 鎺掑簭閫夐」 + */ + handleTableChange(pagination, filters, sorter) { + if (sorter.order) { + this.isorter.column = sorter.field + this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc' + } else { + this.isorter.column = 'createTime' + this.isorter.order = 'desc' + } + for (let key in filters) { + this.filters[key] = filters[key].join(',') + } + this.loadData() + }, + + // 鎸囨淳鍒颁骇鍝佺獥鍙g偣鍑荤‘瀹氭寚娲捐澶囧悗瑙﹀彂 + handleAssignDocumentToDevice() { + const { checkedKeys, selectionRows, selectedRowKeys, $confirm, $notification, queryParam: { applyReason }, $destroyAll, handleCancel } = this + + if (checkedKeys.length === 0 || selectedRowKeys.length === 0) { + $notification.warning({ + message: '娑堟伅', + description: '璇烽�夋嫨璁惧鎴栨枃妗�' + }) + return + } + + const that = this + this.$refs.form.validate(valid => { + if (valid) { + const { docId, attributionId, publishFileId } = selectionRows[0] + const params = { + docId: checkedKeys[0], + equipmentDocId: docId, + equipmentId: attributionId, + equipmentFileId: publishFileId, + applyReason + } + + $confirm({ + title: '鎻愮ず', + content: `纭鎻愪氦鍚楋紵`, + okText: '纭', + cancelText: '鍙栨秷', + onOk: () => { + that.confirmLoading = true + dncApi.assignNcToProductApi(params) + .then(res => { + if (res.success) { + handleCancel() + $notification.success({ + message: '娑堟伅', + description: res.message + }) + } else { + $notification.error({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + $destroyAll() + that.confirmLoading = false + }) + }, + onCancel: () => { + $destroyAll() + } + }) + } else { + return false + } + }) + }, + + /* 杈撳叆鏌ヨ鍐呭鍙樺寲鏃惰Е鍙� */ + handleSearchInputChange() { + let search = this.searchInput + let expandedKeys = this.dataList + .map(item => { + if (item.title != null) { + if (item.title.indexOf(search) > -1) { + return this.getParentKey(item.key, this.treeDataSource) + } + return null + } + }) + .filter((item, i, self) => item && self.indexOf(item) === i) + Object.assign(this, { + expandedKeys, + searchValue: search, + autoExpandParent: true + }) + }, + + /** + * 鏍戣妭鐐瑰睍寮�鍚堝苟鏃惰Е鍙� + * @param expandedKeys 灞曞紑椤筴ey + */ + handleTreeNodeExpand(expandedKeys) { + this.expandedKeys = expandedKeys + this.autoExpandParent = false + }, + + /** + * 鏍戣妭鐐瑰閫夋閫変腑鏃惰Е鍙� + * @param selectedKeys 閫変腑鑺傜偣key + * @param {node} node 鑺傜偣瀵硅薄 + */ + handleTreeNodeCheck(checkedObj, { node }) { + console.log('checkedObj', checkedObj) + console.log('node', node.dataRef) + let record = node.dataRef + if (record.type !== 99) return + this.checkedKeys = checkedObj.checked.slice(-1) + }, + + /** + * 鏍戣妭鐐归�変腑鏃惰Е鍙戯紙妯℃嫙鏍戣妭鐐瑰閫夋閫変腑鏃剁殑鏁堟灉锛� + * @param selectedKeys 閫変腑鑺傜偣key + * @param {node} node 鑺傜偣瀵硅薄 + */ + handleTreeNodeSelect(selectedKeys, { node }) { + node.$el.childNodes[1].click() + }, + + /** + * 閫掑綊鑾峰緱杈撳叆椤圭殑鐖剁骇key + * @param key 瀛愰」key + * @param tree 瀛愰」 + */ + getParentKey(key, tree) { + let parentKey + for (let i = 0; i < tree.length; i++) { + const node = tree[i] + if (node.children) { + if (node.children.some(item => item.key === key)) { + parentKey = node.key + } else if ( + this.getParentKey(key, node.children)) { + parentKey = this.getParentKey(key, node.children) + } + } + } + return parentKey + }, + + /** + * 閫掑綊鑾峰緱鎵�鏈夋爲鑺傜偣key + * @param data 璁惧鏍戞暟鎹� + */ + generateList(data) { + for (let i = 0; i < data.length; i++) { + data[i].key = data[i].id + const node = data[i] + const key = node.id + const title = node.label + this.dataList.push({ key, title }) + this.allTreeKeys.push(key) + this.setTreeNodeIcon(node) + if (node.children) this.generateList(node.children) + } + }, + + /** + * 璁剧疆鏍戣妭鐐瑰浘鏍� + * @param treeNode + */ + setTreeNodeIcon(treeNode) { + switch (+treeNode.type) { + case 1: + treeNode.slots = { icon: 'product' } + break + case 2: + treeNode.slots = { icon: 'component' } + break + case 3: + treeNode.slots = { icon: 'part' } + break + case 4: + treeNode.slots = { icon: 'processSpecVersion' } + break + case 5: + treeNode.slots = { icon: 'process' } + break + case 6: + treeNode.slots = { icon: 'processStep' } + break + default: + } + }, + + resetData() { + this.searchInput = this.searchValue = '' + this.expandedKeys = [] + this.selectedRowKeys = [] + this.selectionRows = {} + this.checkedKeys = [] + this.filters = {} + this.isorter = Object.assign({}, this.defaultSorter) + }, + + handleCancel() { + this.visible = false + }, + + triggerCorrespondingMethod({ methodName, modalTitle }) { + if (this[methodName]) { + this[methodName]() + this.title = modalTitle + } + } + } + } +</script> + +<style scoped lang="less"> + /deep/ .ant-modal { + .tabs-container { + display: flex; + justify-content: space-between; + + .replaceSearch { + color: #40a9ff; + font-weight: bold; + background-color: rgb(204, 204, 204); + } + } + + } + + ::-webkit-scrollbar { + width: 8px; + } +</style> \ No newline at end of file diff --git a/src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentTableList.vue b/src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentTableList.vue index 2fad9dd..e8efdee 100644 --- a/src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentTableList.vue +++ b/src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentTableList.vue @@ -9,6 +9,9 @@ </a-table> <DocumentModal ref="modalForm" @ok="modalFormOk"/> + + <has-received-document-assign-modal :size="size" ref="documentAssignModalRef" + :currentDocumentInfo="currentRightClickedDocumentInfo"/> </div> </template> @@ -16,17 +19,18 @@ import { getAction } from '@/api/manage' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import DocumentModal from '../../../../common/DocumentModal.vue' + import HasReceivedDocumentAssignModal from './HasReceivedDocumentAssignModal' export default { name: 'HasReceivedDocumentTableList', - components: { DocumentModal }, + components: { HasReceivedDocumentAssignModal, DocumentModal }, mixins: [JeecgListMixin], props: { currentTreeNodeInfo: { type: Object }, - currentTypeOfDevice:{ - type:Number + currentTypeOfDevice: { + type: Number }, size: { type: String @@ -51,7 +55,7 @@ dataIndex: 'docName', key: 'docName', align: 'center', - scopedSlots: {customRender: 'docName'}, + scopedSlots: { customRender: 'docName' }, width: 300, sorter: true }, @@ -185,7 +189,12 @@ this.$refs.modalForm.title = modalTitle }, - handleDocumentAssign(record, modalTitle) { + /** + * 鎺у埗鎸囨淳鍒颁骇鍝佸脊绐� + * @param record 琛ㄦ牸琛屼俊鎭� + * @param modalTitle 寮圭獥鏍囬 + */ + handleDocumentRecAssign(record, modalTitle) { this.$refs.documentAssignModalRef.title = modalTitle this.$refs.documentAssignModalRef.visible = true }, diff --git a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentAssignModal.vue b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentAssignModal.vue index a46a233..0788c06 100644 --- a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentAssignModal.vue +++ b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentAssignModal.vue @@ -56,7 +56,7 @@ </a-button> </div> - <!--浜у搧缁撴瀯鏍�--> + <!--璁惧缁撴瀯鏍�--> <div style="overflow:auto;margin-top: 10px;height: 400px"> <a-tree blockNode checkable :checkedKeys="checkedKeys" :expandedKeys.sync="expandedKeys" :autoExpandParent="autoExpandParent" @select="handleTreeNodeSelect" @@ -436,7 +436,7 @@ }, resetData() { - this.searchInput = '' + this.searchInput = this.searchValue = '' this.expandedKeys = [] this.selectedRowKeys = [] this.selectionRows = {} diff --git a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue index c3c709f..b5ee82a 100644 --- a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue +++ b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue @@ -17,7 +17,7 @@ </template> <script> - import { getAction } from '@/api/manage' +import { getAction, postAction } from '@/api/manage' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import DocumentModal from '../../../../common/DocumentModal' import NcDocumentAssignModal from './NcDocumentAssignModal' @@ -96,7 +96,8 @@ currentRightClickedDocumentInfo: {}, currentClickedDocumentInfo: {}, url: { - list: '/nc/doc/find/page' + list: '/nc/doc/find/page', + submitProccess:'/dncFlow/dispatchFile/submitProccess' } } }, @@ -213,6 +214,48 @@ this.$refs.documentAssignModalRef.visible = true }, + handleAppoint(record){ + const that = this + console.log("sssss",record) + that.$confirm({ + title: '鎻愮ず', + content: `纭瀹氬瀷鍚楋紵`, + okText: '纭', + cancelText: '鍙栨秷', + onOk: () => { + let dispatchFile = { + 'docId':record.docId, + 'attributionId':record.attributionId, + 'attributionType':record.attributionType, + 'fileId':record.publishFileId + } + postAction(this.url.submitProccess,dispatchFile) + .then(res => { + if (res.success) { + this.$message.success('娴佺▼鍙戣捣鎴愬姛') + } else { + that.$notification.error({ + message: '娑堟伅', + description: res.message + }) + } + }) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: err.message + }) + }) + .finally(() => { + that.$destroyAll() + }) + }, + onCancel: () => { + that.$destroyAll() + } + }) + }, + handleDocumentExtract(record) { const that = this const { docId, attributionId, attributionType } = record diff --git a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchForm.vue b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchForm.vue index b859014..f367676 100644 --- a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchForm.vue +++ b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchForm.vue @@ -99,6 +99,11 @@ </a-form-model-item> </a-col> <a-col :span="24"> + <a-form-model-item label="棣栨鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionOpinion"> + <a-textarea v-model="model.inspectionOpinion" rows="4" placeholder="璇疯緭鍏ラ妫�鎰忚" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> <a-form-model-item label="瀹℃壒浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approver"> <a-input v-model="model.approver" placeholder="璇疯緭鍏ュ鎵逛汉" ></a-input> </a-form-model-item> diff --git a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue index 13c7147..9de5595 100644 --- a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue +++ b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue @@ -67,9 +67,9 @@ <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">涓婁紶/淇敼淇℃伅</a> + <a v-if="record.flowStatus === '0'" @click="handleEdit(record)">涓婁紶/淇敼淇℃伅</a> - <a-divider type="vertical" /> + <a-divider v-if="record.flowStatus === '0'" type="vertical" /> <a @click="handleOpenPrintGuideCardModal(record)">鐢熸垚鏁版帶鍔犲伐绋嬪簭纭琛�</a> @@ -325,6 +325,7 @@ }) .finally(() => { that.$destroyAll() + this.loadData(1) }) }, onCancel: () => { diff --git a/src/views/dnc/common/TableContextMenu.vue b/src/views/dnc/common/TableContextMenu.vue index 544e46d..b6bda8c 100644 --- a/src/views/dnc/common/TableContextMenu.vue +++ b/src/views/dnc/common/TableContextMenu.vue @@ -42,10 +42,10 @@ currentMenuLevel: '', defaultContextMenuList: { //璁惧绫� - deviceCustomType:[ + deviceCustomType: [ { label: '缂栬緫璁惧绫讳俊鎭�', code: 'type_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, { label: '鍒犻櫎', code: 'type_delete', subMenu: [], icon: 'delete', isCommonMethod: false }, - { label: '瀵煎叆NC绋嬪簭', code: 'type_nc_import', subMenu: [], icon: 'import', isCommonMethod: true }, + { label: '瀵煎叆NC绋嬪簭', code: 'type_nc_import', subMenu: [], icon: 'import', isCommonMethod: true } ], //NC鏂囨。 NC: [ @@ -56,6 +56,7 @@ { label: '涓嬭浇', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, { label: '鍒犻櫎', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, { label: '鎵归噺鍒犻櫎', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, + { label: '瀹氬瀷', code: 'document_appoint', subMenu: [], icon: 'swap-right', isCommonMethod: true }, { label: '鐢熷懡鍛ㄦ湡', subMenu: [ @@ -96,7 +97,6 @@ { label: '涓嬭浇', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, { label: '鍒犻櫎', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, { label: '鎵归噺鍒犻櫎', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, - { label: '瀹氬瀷', code: 'document_appoint', subMenu: [], icon: 'swap-right', isCommonMethod: true }, { label: '鐢熷懡鍛ㄦ湡', subMenu: [ @@ -117,6 +117,7 @@ { label: '涓嬭浇', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, { label: '鍒犻櫎', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, { label: '鎵归噺鍒犻櫎', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, + { label: '鎸囨淳鍒颁骇鍝�', code: 'document_rec_assign', subMenu: [], icon: 'cluster', isCommonMethod: false }, { label: '鐢熷懡鍛ㄦ湡', subMenu: [ diff --git a/src/views/flowable/workflow/FlowTodo.vue b/src/views/flowable/workflow/FlowTodo.vue index 1e8d371..e70779b 100644 --- a/src/views/flowable/workflow/FlowTodo.vue +++ b/src/views/flowable/workflow/FlowTodo.vue @@ -280,6 +280,11 @@ :selectShenpiData='selectGuideCardData' @searchReset='searchReset' ></guide-card-batch-handle> + <AssignEquipmentFileStreamHandle + ref='assignEquipmentFileStreamHandle' + :selectShenpiData='selectEquipmentSealUpData' + @searchReset='searchReset' + ></AssignEquipmentFileStreamHandle> </a-card> </template> @@ -292,7 +297,6 @@ import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' import RepairOrderApprovalModal from '@views/flowable/workflow/repairOrder/RepairOrderApprovalModal' import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue' - import { getAction } from '@api/manage' import InspectionOrderBatchHandle from './InspectionOrder/InspectionOrderBatchHandle' import WeekMaintenanceBatchApprovalModal from './weekMaintenance/WeekMaintenanceBatchApprovalModal' @@ -300,10 +304,10 @@ import DispatchFileHandle from '@views/flowable/workflow/dispatchFile/DispatchFileHandle.vue' import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue' import GuideCardBatchHandle from '@views/flowable/workflow/guideCardBatch/GuideCardBatchHandle.vue' +import AssignEquipmentFileStreamHandle from '@views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue' import OutBoundOrderHandle from '@views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue' import EquipmentLeanOutApprovalModal from '@views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue' -import SecondMaintenanceApprovalModal - from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue' +import SecondMaintenanceApprovalModal from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue' import ThirdMaintenanceApprovalModal from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue' import EquipmentSealUpApprovalModal from '@views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue' import EquipmentTransferApprovalModal from '@views/flowable/workflow/transfer/EquipmentTransferApprovalModal.vue' @@ -339,7 +343,8 @@ EquipmentScrapApprovalModal, SparePartApplyHandle, StandardizedProcessHandle, - GuideCardBatchHandle + GuideCardBatchHandle, + AssignEquipmentFileStreamHandle }, data() { return { @@ -428,6 +433,8 @@ selectInboundOrderData: {}, selectSparePartApplyData: {}, selectGuideCardData:{}, + selectEquipmentAssignProductData:{}, + selectEquipmentSealUpData:{}, //涓氬姟淇℃伅ID dataId: undefined } @@ -490,7 +497,7 @@ case 'ggApproval': this.handDispatchFileDetial(item) break - case 'standardized_approval': + case 'ncFileSettingProcessApproval': this.handStandardizedDetial(item) break case 'sbdjApproval': @@ -538,6 +545,9 @@ case 'programConfirmApproval': this.handleGuideCardApproval(item) break + case 'equipmentAssignProductApproval': + this.handleEquipmentAssignProductApproval(item) + break default: alert('娌℃壘鍒拌娴佺▼') } @@ -578,20 +588,20 @@ let result = parts[0] return result }, - + //DNC-鎸囨淳NC绋嬪簭鑷宠澶� handDrDetial(item) { this.selectShenpiData = item this.$refs.modalFormApproval.clearTableSource() this.$refs.modalFormApproval.getAllApproveData(item) }, - + //DNC-NC绋嬪簭绛炬淳 handDispatchFileDetial(item) { console.log('item----->', item) this.selectDispatchFileXqData = item this.$refs.modalFormDispatchFileXq.clearTableSource() this.$refs.modalFormDispatchFileXq.getAllApproveData(item) }, - //瀹氬瀷瀹℃壒椤甸潰 + //DNC-瀹氬瀷瀹℃壒椤甸潰 handStandardizedDetial(item){ this.selectDispatchFileXqData = item this.$refs.StandardizedProcessHandle.clearTableSource() @@ -708,12 +718,20 @@ this.$refs.sparePartApplyModal.getAllApproveData(item) } }, + //DNC-绋嬪簭纭琛ㄦ祦绋� handleGuideCardApproval(item) { console.log('item----->', item) this.selectGuideCardData = item this.$refs.guideCardBatchHandle.clearTableSource() this.$refs.guideCardBatchHandle.getAllApproveData(item) }, + //DNC-璁惧缁撴瀯鏍戞寚娲句骇鍝佺粨鏋勬爲 + handleEquipmentAssignProductApproval(item){ + console.log('item----->', item) + this.selectEquipmentSealUpData = item + this.$refs.assignEquipmentFileStreamHandle.clearTableSource() + this.$refs.assignEquipmentFileStreamHandle.getAllApproveData(item) + } } } </script> diff --git a/src/views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue b/src/views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue new file mode 100644 index 0000000..36b9386 --- /dev/null +++ b/src/views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue @@ -0,0 +1,392 @@ +<!-- + Description: 宸ヤ綔娴�-DNC-璁惧缁撴瀯鏍戞寚娲句骇鍝佺粨鏋勬爲澶勭悊椤甸潰 List + Author: 浣滆�� liuyh + Date: 2025-02-27 +--> +<template> + <a-modal + :title="title" + :width="width" + :visible="visible" + :footer="null" + @cancel="handCancel" + > + <a-card :bordered="false"> + <div> + <b>{{ selectShenpiData.description }}</b> + <br> + <br> + <a-tag color="blue"> + 褰撳墠澶勭悊浜� {{ selectShenpiData.assignee_dictText }} + </a-tag> + <a-tag color="blue"> + 浠诲姟鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} + </a-tag> + <br> + <br> + <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button> + <div v-if="imageSrc"> + <img :src="imageSrc" alt="Fetched Image" /> + </div> + <hr class="shallow-hr"> + </div> + <div> + <b>瀹$璇︽儏</b> + <br> + <a-form :form='form'> + <a-spin :spinning="spinning"> + <a-tabs default-active-key='1' @change='callback'> + <a-tab-pane key='1' tab='鍩烘湰淇℃伅'> + <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> + <a-row> + <a-col :span='span'> + <a-form-model-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId_dictText"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.equipmentId_dictText" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="璁惧绋嬪簭鏂囦欢鍚�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentDocId_dictText"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.equipmentDocId_dictText" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span='span'> + <a-form-model-item label="浜у搧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productId_dictText"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.productId_dictText" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="閮ㄤ欢鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="componentId_dictText"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.componentId_dictText" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span='span'> + <a-form-model-item label="闆朵欢鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsId_dictText"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.partsId_dictText"></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="宸ヨ壓瑙勭▼鐗堟湰鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="psvId_dictText"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.psvId_dictText" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span='span'> + <a-form-model-item label="宸ュ簭鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processId_dictText"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.processId_dictText" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="宸ユ鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stepId_dictText"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.stepId_dictText" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span='span'> + <a-form-model-item label="鏁版帶绯荤粺绫诲埆" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deviceTypeName"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.deviceTypeName" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="绋嬪簭鏂囦欢鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="docName"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.docName" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-tab-pane> + <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> + <a-card> + <a-timeline style="padding:0 1% 0 12%" > + <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1"> + <div class="bottom"> + <p>澶勭悊浜猴細{{item.assignee_dictText}}</p> + <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p> + <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p> + <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p> + <div class="left_qiu"><span>{{item.taskName}}</span></div> + </div> + </a-timeline-item> + </a-timeline> + </a-card> + </a-tab-pane> + </a-tabs> + </a-spin> + </a-form> + </div> + <div> + <hr class="shallow-hr"> + <br> + <b>瀹℃壒璇︽儏</b> + <br> + <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> + <a-row> + <a-col ::span='span' class="btxx"> + <a-form-model-item label="澶勭悊绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='status'> + <j-dict-select-tag type='list' v-model='assignFileStream.auditType' dictCode='nc_sq_handle_type' placeholder="璇烽�夋嫨澶勭悊绫诲瀷" /> + </a-form-model-item > + </a-col> + <a-col :span="24" class="btxx"> + <a-form-model-item label="澶勭悊鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-textarea v-model="assignFileStream.approveContent" rows="4" placeholder="璇疯緭鍏ュ鐞嗘剰瑙�"/> + </a-form-model-item > + </a-col> + + </a-row> + <div class="table-operator" style="text-align: right;"> + <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button> + <a-button @click="submitForm">鎻� 浜�</a-button> + </div> + </a-form-model> + </div> + </a-card> + + + </a-modal> +</template> + +<script> + +import '@assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' +export default { + name: 'FlowShenPi', + mixins: [mixinDevice], + props: { + selectShenpiData: { + type: Object, + required: true + } + }, + + data() { + return { + form: this.$form.createForm(this), + span: 12, + span1: 8, + coldisabled: true, + spinning: false, + tableRowRecord: {}, + assignFileStream:{}, + tableDataSource: [], + usageDataSource: [], + hitaskDataSource:[], + bomForm: {}, + imageSrc: null, + drawerVisible: true, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 30 }, + sm: { span: 16 } + }, + validatorRules: { + status: { + rules: [ + { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, + ] + }, + }, + approveData: {}, + flowData: {}, + title: '璇︽儏椤甸潰', + width: 1000, + visible: false, + // 琛ㄥご + url: { + queryBomDataById: '/dncFlow/assignEquipmentFileStream/selectVoById', + diagramView: '/assign/flow/diagramView', + queryHisTaskList:'/dncFlow/dispatchFile/queryHisTaskList', + auditGuideCardBatch:"/dncFlow/assignEquipmentFileStream/audit", + }, + dictOptions: {}, + superFieldList: [], + workflowSource: [] + } + }, + created() { + }, + computed: {}, + methods: { + callback() { + }, + handCancel() { + this.visible = false + }, + clearTableSource() { + this.tableDataSource = [] + this.usageDataSource = [] + }, + fetchAndShowBmp() { + console.log('flowData----->', this.flowData) + try { + let parm = { + processDefinitionId: this.flowData.processDefinitionId, + processInstanceId:this.flowData.processInstanceId, + TaskDefinitionKey:this.flowData.processDefinitionKey + } + downFile(this.url.diagramView,parm,'get').then((res=>{ + console.log('Pica------>',res) + const urlObject = window.URL.createObjectURL(new Blob([res])) + this.imageSrc = urlObject + })) + } catch (error) { + console.error('Error fetching image blob:', error) + alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�') + } + }, + handleQueXiaoTask(){ + this.visible = false + this.routeReload() + }, + submitForm () { + const that = this; + if (!that.assignFileStream.auditType==null || that.assignFileStream.auditType===undefined){ + this.$message.warning('璇烽�夋嫨澶勭悊绫诲瀷锛�') + return false; + } + if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) { + this.$message.warning('璇疯緭鍏ュ鐞嗘剰瑙侊紒') + return false; + } + if ((!that.selectShenpiData.inspectionOpinion==null || that.selectShenpiData.taskDefKey===undefined)&&that.selectShenpiData.taskDefKey==="proofread") { + this.$message.warning('璇疯緭鍏ラ妫�鎰忚锛�') + } + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.form.validateFields((err, values) => { + if (!err) { + that.confirmLoading = true; + let url=this.url.auditGuideCardBatch + let method = 'post'; + let flowTaskVo = {} + flowTaskVo.comment =that.assignFileStream.approveContent; + flowTaskVo.dataId = this.selectShenpiData.dataId + flowTaskVo.taskId = this.selectShenpiData.id + flowTaskVo.userId = this.selectShenpiData.assignee + flowTaskVo.instanceId = this.selectShenpiData.procInstId + flowTaskVo.values = this.selectShenpiData.variables + flowTaskVo.inspectionOpinion=that.assignFileStream.inspectionOpinion + flowTaskVo.auditType = that.assignFileStream.auditType + console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) + httpAction(url,flowTaskVo,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.visible = false + //鍒锋柊琛ㄦ牸 + that.$emit('searchReset') + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + }) + }, + getAllApproveData(item) { + console.log('selectShenpiData----->', this.selectShenpiData) + this.flowData = item + let param = { + 'id': item.dataId + } + let parmhis={ + 'procInstId': item.procInstId + } + getAction(this.url.queryHisTaskList,parmhis).then(res=>{ + this.hitaskDataSource=res.result + getAction(this.url.queryBomDataById, param).then((res => { + if (res.success) { + this.tableRowRecord = res.result[0] + console.log('this.tableRowRecord----->', this.tableRowRecord) + } + })) + }).finally( + this.visible = true, + console.log('this.approveData---->', this.approveData) + ) + } + } +} +</script> +<style scoped> +.shallow-hr { + border: 0; + height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ + background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ + margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ +} +.btn-custom { + background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ + color: white; /* 鐧借壊鏂囧瓧 */ + border: none; /* 鏃犺竟妗� */ + padding: 5px 15px; /* 鍐呰竟璺� */ + text-align: center; /* 鏂囧瓧灞呬腑 */ + text-decoration: none; /* 鏃犱笅鍒掔嚎 */ + display: inline-block; /* 琛屽唴鍧楀厓绱� */ + font-size: 12px; /* 瀛椾綋澶у皬 */ + margin: 4px 2px; /* 澶栬竟璺� */ + cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */ + border-radius: 4px; /* 鍦嗚杈规 */ +} + +.bold-large-label { + font-weight: bold; + font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ +} +.left_qiu{ + position: absolute; + left: -74px; + top: 0; + width:54px; + border-radius: 50%; + height:54px; + font-size: 13px; + margin: auto; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + background: #0099ff; + transform: translate(0, 0); +} +/deep/ .ant-timeline-item-tail{ + left: -29px !important; +} +.left_qiu span{ + width: 3em; + display: block; + color: #fff; + text-align: center; +} +.img{ + width: 75%; +} + +.wrap{ + clear: both; + width: 100%; + display: flex; + height: 50px; + border: 1px solid #ccc; + /* background-color: aqua; */ +} +.box{ + width:21%; + height:50px; + border-right: 1px solid #ccc; + line-height: 50px; + /* background: red; */ + text-align:center; + margin: auto; +} + +@import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/mdc/base/DeliveryGroupUtilizationRateChart.vue b/src/views/mdc/base/DeliveryGroupUtilizationRateChart.vue index b07adcc..7fa62f0 100644 --- a/src/views/mdc/base/DeliveryGroupUtilizationRateChart.vue +++ b/src/views/mdc/base/DeliveryGroupUtilizationRateChart.vue @@ -28,7 +28,7 @@ <a-col :md="8" :sm="8"> <a-form-item label="閰嶉�佸皬缁�"> - <a-select v-model="teamCodes" placeholder="璇烽�夋嫨閰嶉�佸皬缁�" mode="multiple" :maxTagCount="3" + <a-select :value="teamCodes" placeholder="璇烽�夋嫨閰嶉�佸皬缁�" mode="multiple" :maxTagCount="3" @change="handleDeliverGroupSelectChange" allowClear> <a-select-option v-for="item in deliveryGroupList" :key="item.key">{{ item.title }}</a-select-option> </a-select> @@ -45,7 +45,6 @@ <a-col :md="2" :sm="2"> <a-space> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <!-- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>--> </a-space> </a-col> </a-row> @@ -57,271 +56,264 @@ </template> <script> -import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import moment from 'moment/moment' -import mdcApi from '@api/mdc' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import moment from 'moment/moment' + import mdcApi from '@api/mdc' -export default { - name: 'DeliveryGroupUtilizationRateChart', - components: {}, - mixins: [JeecgListMixin], - data() { - return { - disableMixinCreated: true, - queryParam: { - month: moment().subtract('1', 'month').format('YYYYMM') - }, - productionIds: [],//鐝粍 - teamCodes: [],//閰嶉�佸皬缁� - centerList: [], - groupList: [], - deliveryGroupList: [] - } - }, - mounted() { - window.addEventListener('resize', this.handleWindowResize) - this.getCenterListByApi() - this.handleWindowResize() - }, - methods: { - loadData() { - this.chartContainer = this.$echarts.init(document.getElementById('chart-container')) - this.initChart({}) - this.chartContainer.showLoading({ - text: '鏁版嵁鍔犺浇涓� ...', - color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#0696e1' - }) - const that = this - mdcApi.getDeliveryGroupChartDataApi(this.queryParam) - .then(res => { - if (res.success) { - if (Object.keys(res.result).length === 0 || res.result.teamCodeList.length === 0) { + export default { + name: 'DeliveryGroupUtilizationRateChart', + components: {}, + mixins: [JeecgListMixin], + data() { + return { + disableMixinCreated: true, + queryParam: { + month: moment().subtract('1', 'month').format('YYYYMM') + }, + productionIds: [],//鐝粍 + teamCodes: [],//閰嶉�佸皬缁� + centerList: [],//涓績鍒楄〃 + groupList: [],//鐝粍鍒楄〃 + deliveryGroupList: []//閰嶉�佸皬缁勫垪琛� + } + }, + mounted() { + window.addEventListener('resize', this.handleWindowResize) + this.getCenterListByApi() + this.handleWindowResize() + }, + methods: { + loadData() { + this.chartContainer = this.$echarts.init(document.getElementById('chart-container')) + this.initChart({}) + this.chartContainer.showLoading({ + text: '鏁版嵁鍔犺浇涓� ...', + color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 + textColor: '#0696e1' + }) + const that = this + mdcApi.getDeliveryGroupChartDataApi(this.queryParam) + .then(res => { + if (res.success) { + if (Object.keys(res.result).length === 0 || res.result.teamCodeList.length === 0) { + that.$notification.warning({ + message: '娑堟伅', + description: '鏆傛棤鏁版嵁' + }) + // 姝ゅ鏈猺eturn鏄负淇濊瘉鍥捐〃鏁版嵁鑳借娓呴櫎骞跺睍绀虹┖鍥捐〃 + } + that.initChart(res.result) + } else { that.$notification.warning({ message: '娑堟伅', - description: '鏆傛棤鏁版嵁' + description: res.message }) - // 姝ゅ鏈猺eturn鏄负淇濊瘉鍥捐〃鏁版嵁鑳借娓呴櫎骞跺睍绀虹┖鍥捐〃 } - that.initChart(res.result) - } else { - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - .catch(err => { - that.$notification.error({ - message: '娑堟伅', - description: err.message }) - }) - }, - - /** - * 鍒濆鍖栧浘琛� - * @param chartDataObj 鏁版嵁瀵硅薄 Object - */ - initChart(chartDataObj) { - const option = { - title: { - text: (this.queryParam.month.slice(-2) >= 10 ? this.queryParam.month.slice(-2) : this.queryParam.month.slice(-1)) + '鏈堥厤閫佸皬缁勭患鍚堝埄鐢ㄧ巼', - left: 'center', - top: 0, - textStyle: { - fontSize: 22 - } - }, - grid: { - top: '12%', - left: '1%', - right: '1%', - bottom: '8%', - containLabel: true - }, - legend: { - top: '6%', - right: 'center', - itemGap: 20, - data: ['24h缁煎悎鍒╃敤鐜�', '鍘婚櫎鏁呴殰璁惧鏃堕棿24h缁煎悎鍒╃敤鐜�', '鐝鍒╃敤鐜�'] - }, - tooltip: { - show: true, - trigger: 'axis' - }, - xAxis: { - type: 'category', - data: chartDataObj.teamCodeList ? chartDataObj.teamCodeList : [] - // data: ['鏉庢湁涓虹粍', '涓佺孩鐕曠粍', '鍞愪笢缁�', '鏈卞皬纾婄粍', '寮犲缁�', '瀹嬪畤鍧ょ粍', '缃楀啗缁�', '寮犲弻杩涚粍', '甯告尟鍕囩粍', '钁涘簲榫欑粍', '璧靛箍娑涚粍', '浜庡崕浜粍', '闄堝郴缁�', '鐜嬬户宄扮粍', '鐜嬫檽鏄庣粍', '闄堟灄缁�', '鍚村悏骞崇粍'] - }, - yAxis: [ - { - type: 'value', - name: '鍒╃敤鐜�(%)', - axisLine: { - show: true - }, - axisLabel: { - formatter: '{value}%' - } - } - ], - series: [ - { - type: 'bar', - name: '24h缁煎悎鍒╃敤鐜�', - // barWidth: '40%', - // data: [85, 32, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 85, 63, 74, 11, 58] - data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.utilizationRate) : [] - }, - { - type: 'bar', - name: '鍘婚櫎鏁呴殰璁惧鏃堕棿24h缁煎悎鍒╃敤鐜�', - // barWidth: '40%', - // data: [24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 64, 34, 85, 54], - data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.amendUtilizationRate) : [] - }, - { - type: 'bar', - name: '鐝鍒╃敤鐜�', - // barWidth: '40%', - // data: [24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 64, 34, 85, 54], - data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.shiftUtilizationRate) : [] - } - ], - dataZoom: [ - { - type: 'slider', - show: true, - xAxisIndex: 0, - startValue: 0, - endValue: 19, - // 鏄惁鏄剧ずdetail锛屽嵆鎷栨嫿鏃跺�欐樉绀鸿缁嗘暟鍊间俊鎭� - showDetail: false, - // empty锛氬綋鍓嶆暟鎹獥鍙e鐨勬暟鎹紝琚缃负绌恒�� - // 鍗充笉浼氬奖鍝嶅叾浠栬酱鐨勬暟鎹寖鍥� - filterMode: 'empty', - // 鎺у埗鎵嬫焺鐨勫昂瀵� - // handleSize: 0, - // 鏄惁閿佸畾閫夋嫨鍖哄煙锛堟垨鍙仛鏁版嵁绐楀彛锛夌殑澶у皬 - zoomLock: true, - brushSelect: false - }, - { - // 娌℃湁涓嬮潰杩欏潡鐨勮瘽锛屽彧鑳芥嫋鍔ㄦ粴鍔ㄦ潯锛� - // 榧犳爣婊氳疆鍦ㄥ尯鍩熷唴涓嶈兘鎺у埗澶栭儴婊氬姩鏉� - type: 'inside', - show: true, - // 鎺у埗鍝釜杞达紝濡傛灉鏄痭umber琛ㄧず鎺у埗涓�涓酱锛� - xAxisIndex: 0, - // 婊氳疆鏄惁瑙﹀彂缂╂斁 - zoomOnMouseWheel: false, - // 榧犳爣绉诲姩鑳藉惁瑙﹀彂骞崇Щ - moveOnMouseMove: true, - // 榧犳爣婊氳疆鑳藉惁瑙﹀彂骞崇Щ - moveOnMouseWheel: true - } - ] - } - this.chartContainer.setOption(option, true) - this.chartContainer.hideLoading() - }, - - // 鑾峰彇涓績鍒楄〃 - getCenterListByApi() { - const that = this - mdcApi.getCenterOrGroupListApi() - .then(res => { - if (res.success) { - that.centerList = res.result - that.queryParam.productionId = res.result[0].value - that.getGroupListByApi(res.result[0].value, true) - } - }) - }, - - /** - * 鑾峰彇鐝粍鍒楄〃 - * @param productionId 涓績Id - * @param isInitLoad 鏄惁涓哄垵濮嬪寲鍔犺浇 - */ - getGroupListByApi(productionId, isInitLoad = false) { - const that = this - mdcApi.getCenterOrGroupListApi(productionId) - .then(res => { - if (res.success) { - that.groupList = res.result - if (!isInitLoad) return - that.handleGroupSelectChange([res.result[0].value]) - that.loadData() - } - }) - }, - - /** - * 鑾峰彇閰嶉�佸皬缁勫垪琛� - * @param productionId 鐝粍Id - * @param isReduceSelectOption 鏄惁鍑忓皯鐝粍閫変腑椤� - */ - getDeliveryGroupListByApi(productionId, isReduceSelectOption = false) { - const that = this - mdcApi.getDeliveryGroupListApi(productionId) - .then(res => { - if (res.success) { - that.deliveryGroupList = res.result - - if (!isReduceSelectOption) return - that.teamCodes.forEach((key, keyIndex, self) => { - // 濡傛灉灏嗗敮涓�涓�缁勫寘鍚�変腑閰嶉�佸皬缁勯」鐨勭彮缁勫彇娑堝嬀閫夊悗搴斿皢宸插嬀閫夌殑閰嶉�佸皬缁勪竴骞跺彇娑堝嬀閫� - if (that.deliveryGroupList.findIndex(item => item.key === key) === -1) self.splice(keyIndex, 1) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: err.message }) - } - }) - }, + }) + }, - /** - * 涓績鏀瑰彉鏃惰Е鍙� - * @param value 鏀瑰彉鍚庣殑涓績Id - */ - handleCenterSelectChange(value) { - if (this.productionIds.length > 0) { + /** + * 鍒濆鍖栧浘琛� + * @param chartDataObj 鏁版嵁瀵硅薄 Object + */ + initChart(chartDataObj) { + const option = { + title: { + text: (this.queryParam.month.slice(-2) >= 10 ? this.queryParam.month.slice(-2) : this.queryParam.month.slice(-1)) + '鏈堥厤閫佸皬缁勭患鍚堝埄鐢ㄧ巼', + left: 'center', + top: 0, + textStyle: { + fontSize: 22 + } + }, + grid: { + top: '12%', + left: '1%', + right: '1%', + bottom: '8%', + containLabel: true + }, + legend: { + top: '6%', + right: 'center', + itemGap: 20, + data: ['24h缁煎悎鍒╃敤鐜�', '鍘婚櫎鏁呴殰璁惧鏃堕棿24h缁煎悎鍒╃敤鐜�', '鐝鍒╃敤鐜�'] + }, + tooltip: { + show: true, + trigger: 'axis' + }, + xAxis: { + type: 'category', + data: chartDataObj.teamCodeList ? chartDataObj.teamCodeList : [] + // data: ['鏉庢湁涓虹粍', '涓佺孩鐕曠粍', '鍞愪笢缁�', '鏈卞皬纾婄粍', '寮犲缁�', '瀹嬪畤鍧ょ粍', '缃楀啗缁�', '寮犲弻杩涚粍', '甯告尟鍕囩粍', '钁涘簲榫欑粍', '璧靛箍娑涚粍', '浜庡崕浜粍', '闄堝郴缁�', '鐜嬬户宄扮粍', '鐜嬫檽鏄庣粍', '闄堟灄缁�', '鍚村悏骞崇粍'] + }, + yAxis: [ + { + type: 'value', + name: '鍒╃敤鐜�(%)', + axisLine: { + show: true + }, + axisLabel: { + formatter: '{value}%' + } + } + ], + series: [ + { + type: 'bar', + name: '24h缁煎悎鍒╃敤鐜�', + // barWidth: '40%', + // data: [85, 32, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 85, 63, 74, 11, 58] + data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.utilizationRate) : [] + }, + { + type: 'bar', + name: '鍘婚櫎鏁呴殰璁惧鏃堕棿24h缁煎悎鍒╃敤鐜�', + // barWidth: '40%', + // data: [24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 64, 34, 85, 54], + data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.amendUtilizationRate) : [] + }, + { + type: 'bar', + name: '鐝鍒╃敤鐜�', + // barWidth: '40%', + // data: [24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 64, 34, 85, 54], + data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.shiftUtilizationRate) : [] + } + ], + dataZoom: [ + { + type: 'slider', + show: true, + xAxisIndex: 0, + startValue: 0, + endValue: 19, + // 鏄惁鏄剧ずdetail锛屽嵆鎷栨嫿鏃跺�欐樉绀鸿缁嗘暟鍊间俊鎭� + showDetail: false, + // empty锛氬綋鍓嶆暟鎹獥鍙e鐨勬暟鎹紝琚缃负绌恒�� + // 鍗充笉浼氬奖鍝嶅叾浠栬酱鐨勬暟鎹寖鍥� + filterMode: 'empty', + // 鎺у埗鎵嬫焺鐨勫昂瀵� + // handleSize: 0, + // 鏄惁閿佸畾閫夋嫨鍖哄煙锛堟垨鍙仛鏁版嵁绐楀彛锛夌殑澶у皬 + zoomLock: true, + brushSelect: false + }, + { + // 娌℃湁涓嬮潰杩欏潡鐨勮瘽锛屽彧鑳芥嫋鍔ㄦ粴鍔ㄦ潯锛� + // 榧犳爣婊氳疆鍦ㄥ尯鍩熷唴涓嶈兘鎺у埗澶栭儴婊氬姩鏉� + type: 'inside', + show: true, + // 鎺у埗鍝釜杞达紝濡傛灉鏄痭umber琛ㄧず鎺у埗涓�涓酱锛� + xAxisIndex: 0, + // 婊氳疆鏄惁瑙﹀彂缂╂斁 + zoomOnMouseWheel: false, + // 榧犳爣绉诲姩鑳藉惁瑙﹀彂骞崇Щ + moveOnMouseMove: true, + // 榧犳爣婊氳疆鑳藉惁瑙﹀彂骞崇Щ + moveOnMouseWheel: true + } + ] + } + this.chartContainer.setOption(option, true) + this.chartContainer.hideLoading() + }, + + // 鑾峰彇涓績鍒楄〃 + getCenterListByApi() { + const that = this + mdcApi.getCenterOrGroupListApi() + .then(res => { + if (res.success) { + that.centerList = res.result + that.queryParam.productionId = res.result[0].value + that.getGroupListByApi(res.result[0].value, true) + } + }) + }, + + /** + * 鑾峰彇鐝粍鍒楄〃 + * @param productionId 涓績Id + * @param isInitLoad 鏄惁涓哄垵濮嬪寲鍔犺浇 + */ + getGroupListByApi(productionId, isInitLoad = false) { this.groupList = [] - this.productionIds = [] - delete this.queryParam.productionIds - } - if (this.teamCodes.length > 0) { + const that = this + mdcApi.getCenterOrGroupListApi(productionId) + .then(res => { + if (res.success) { + that.groupList = res.result ? res.result : [] + that.handleGroupSelectChange(res.result && res.result.length > 0 && isInitLoad ? [res.result[0].value] : []) + if (!isInitLoad) return + that.loadData() + } + }) + }, + + /** + * 鑾峰彇閰嶉�佸皬缁勫垪琛� + * @param productionId 鐝粍Id + * @param isReduceSelectOption 鏄惁鍑忓皯鐝粍閫変腑椤� + */ + getDeliveryGroupListByApi(productionId, isReduceSelectOption = false) { this.deliveryGroupList = [] - this.teamCodes = [] - delete this.queryParam.teamCodes + const that = this + mdcApi.getDeliveryGroupListApi(productionId) + .then(res => { + if (res.success) { + that.deliveryGroupList = res.result ? res.result : [] + + // 浠呭噺灏戝嬀閫夐」鏃舵墠杩涜涓嬩竴姝� + if (!isReduceSelectOption) return + // 淇濈暀鏀瑰彉鍚庣殑閰嶉�佸皬缁勫垪琛ㄤ腑涔嬪墠宸插嬀閫夌殑閰嶉�佸皬缁� + const filterTeamCodes = that.teamCodes.filter(item => that.deliveryGroupList.map(item => item.key).includes(item)) + that.handleDeliverGroupSelectChange(filterTeamCodes) + } + }) + }, + + /** + * 涓績鏀瑰彉鏃惰Е鍙� + * @param value 鏀瑰彉鍚庣殑涓績Id + */ + handleCenterSelectChange(value) { + this.getGroupListByApi(value) + }, + + /** + * 鐝粍鏀瑰彉鏃惰Е鍙� + * @param value 鏀瑰彉鍚庣殑鐝粍Id + */ + handleGroupSelectChange(value) { + let isReduceSelectOption + if (value.length > this.productionIds.length) isReduceSelectOption = false //澧炲姞鍕鹃�夐」 + else isReduceSelectOption = true // 鍑忓皯鍕鹃�夐」 + this.productionIds = value + this.queryParam.productionIds = value.join(',') + this.getDeliveryGroupListByApi(value.join(','), isReduceSelectOption) + }, + + /** + * 閰嶉�佸皬缁勫彂鐢熸敼鍙樻椂瑙﹀彂 + * @param value 鏀瑰彉鍚庣殑閰嶉�佸皬缁処d + */ + handleDeliverGroupSelectChange(value) { + this.teamCodes = value + this.queryParam.teamCodes = value.join(',') + }, + + handleWindowResize() { + if (this.chartContainer) this.chartContainer.resize() } - this.getGroupListByApi(value) - }, - - /** - * 鐝粍鏀瑰彉鏃惰Е鍙� - * @param value 鏀瑰彉鍚庣殑鐝粍Id - */ - handleGroupSelectChange(value) { - let isReduceSelectOption - if (value.length > this.productionIds.length) isReduceSelectOption = false //澧炲姞鍕鹃�夐」 - else isReduceSelectOption = true // 鍑忓皯鍕鹃�夐」 - this.productionIds = value - this.queryParam.productionIds = value.join(',') - this.getDeliveryGroupListByApi(value.join(','), isReduceSelectOption) - }, - - /** - * 閰嶉�佸皬缁勫彂鐢熸敼鍙樻椂瑙﹀彂 - * @param value 鏀瑰彉鍚庣殑閰嶉�佸皬缁処d - */ - handleDeliverGroupSelectChange(value) { - this.queryParam.teamCodes = value.join(',') - }, - - handleWindowResize() { - if (this.chartContainer) this.chartContainer.resize() } } -} </script> \ No newline at end of file diff --git a/src/views/mdc/base/DeviceParamThresholdManagement.vue b/src/views/mdc/base/DeviceParamThresholdManagement.vue index 2ed2a2d..b331e95 100644 --- a/src/views/mdc/base/DeviceParamThresholdManagement.vue +++ b/src/views/mdc/base/DeviceParamThresholdManagement.vue @@ -40,7 +40,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-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" @click="handleMenuClick"> <a-menu-item key="1"> diff --git a/src/views/mdc/base/GroupEquipmentUtilizationRateChart.vue b/src/views/mdc/base/GroupEquipmentUtilizationRateChart.vue index 8e3d7cb..2c25d68 100644 --- a/src/views/mdc/base/GroupEquipmentUtilizationRateChart.vue +++ b/src/views/mdc/base/GroupEquipmentUtilizationRateChart.vue @@ -34,7 +34,6 @@ <a-col :md="5" :sm="5"> <a-space> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <!-- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>--> </a-space> </a-col> </a-row> @@ -46,246 +45,237 @@ </template> <script> -import mdcApi from '@api/mdc' -import moment from 'moment' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import mdcApi from '@api/mdc' + import moment from 'moment' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' -export default { - name: 'GroupEquipmentUtilizationRateChart', - components: {}, - mixins: [JeecgListMixin], - data() { - return { - disableMixinCreated: true, - productionIds: [],//鐝粍 - centerList: [], - groupList: [], - queryParam: { - month: moment().subtract('1', 'month').format('YYYYMM') + export default { + name: 'GroupEquipmentUtilizationRateChart', + components: {}, + mixins: [JeecgListMixin], + data() { + return { + disableMixinCreated: true, + productionIds: [],//鐝粍 + centerList: [], + groupList: [], + queryParam: { + month: moment().subtract('1', 'month').format('YYYYMM') + } } - } - }, - mounted() { - window.addEventListener('resize', this.handleWindowResize) - this.handleWindowResize() - this.getCenterListByApi() - }, - methods: { - loadData() { - this.chartContainer = this.$echarts.init(document.getElementById('chart-container')) - this.initChart({}) - this.chartContainer.showLoading({ - text: '鏁版嵁鍔犺浇涓� ...', - color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#0696e1' - }) - const that = this - mdcApi.getGroupEquipmentChartDataApi(this.queryParam) - .then(res => { - if (res.success) { - if (Object.keys(res.result).length === 0 || res.result.equipmentNameList.length === 0) { + }, + mounted() { + window.addEventListener('resize', this.handleWindowResize) + this.handleWindowResize() + this.getCenterListByApi() + }, + methods: { + loadData() { + this.chartContainer = this.$echarts.init(document.getElementById('chart-container')) + this.initChart({}) + this.chartContainer.showLoading({ + text: '鏁版嵁鍔犺浇涓� ...', + color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 + textColor: '#0696e1' + }) + const that = this + mdcApi.getGroupEquipmentChartDataApi(this.queryParam) + .then(res => { + if (res.success) { + if (Object.keys(res.result).length === 0 || res.result.equipmentNameList.length === 0) { + that.$notification.warning({ + message: '娑堟伅', + description: '鏆傛棤鏁版嵁' + }) + // 姝ゅ鏈猺eturn鏄负淇濊瘉鍥捐〃鏁版嵁鑳借娓呴櫎骞跺睍绀虹┖鍥捐〃 + } + that.initChart(res.result) + } else { that.$notification.warning({ message: '娑堟伅', - description: '鏆傛棤鏁版嵁' + description: res.message }) - // 姝ゅ鏈猺eturn鏄负淇濊瘉鍥捐〃鏁版嵁鑳借娓呴櫎骞跺睍绀虹┖鍥捐〃 } - that.initChart(res.result) - } else { - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - .catch(err => { - that.$notification.error({ - message: '娑堟伅', - description: err.message }) - }) - }, + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: err.message + }) + }) + }, - /** - * 鍒濆鍖栧浘琛� - * @param chartDataObj 鏁版嵁瀵硅薄 Object - */ - initChart(chartDataObj) { - const option = { - title: { - text: '璁惧缁煎悎鍒╃敤鐜囷紙' + (this.queryParam.month.slice(-2) >= 10 ? this.queryParam.month.slice(-2) : this.queryParam.month.slice(-1)) + '鏈堬級', - left: 'center', - top: 0, - textStyle: { - fontSize: 22 - } - }, - grid: { - top: '12%', - left: '1%', - right: '1%', - bottom: '8%', - containLabel: true - }, - legend: { - top: '6%', - right: 'center', - itemGap: 20, - data: ['24h缁煎悎鍒╃敤鐜�', '24h鍘婚櫎鏁呴殰', '璁″垝宸ヤ綔鏃堕棿缁煎悎鍒╃敤鐜�'] - }, - tooltip: { - show: true, - trigger: 'axis' - }, - xAxis: { - type: 'category', - // data: ['绔嬪姞u1000-3', '浜旇酱125P', '浜斿潗鏍囧姞宸ヤ腑蹇僄S1000', 'A杞�1000PLUS', '姊у窞80P_2', '闆曞埢鏈�800TE', '鍥涘潗鏍囩珛鍔�104V', '绔嬪姞u1000-4', '绔嬪姞GX710_1', '涓夊潗鏍囩珛鍔�1350', '鍗у姞H5000-1', '绔嬪姞u1000-2', '绔嬪姞1000HS_1', '绔嬪姞1160_1', '绔嬪姞GX710_2', '绔嬪姞u1000-3', '浜旇酱125P', '浜斿潗鏍囧姞宸ヤ腑蹇僄S1000', 'A杞�1000PLUS', '姊у窞80P_2', '闆曞埢鏈�800TE', '鍥涘潗鏍囩珛鍔�104V', '绔嬪姞u1000-4', '绔嬪姞GX710_1', '涓夊潗鏍囩珛鍔�1350', '鍗у姞H5000-1', '绔嬪姞u1000-2', '绔嬪姞1000HS_1', '绔嬪姞1160_1', '绔嬪姞GX710_2', '绔嬪姞u1000-3', '浜旇酱125P', '浜斿潗鏍囧姞宸ヤ腑蹇僄S1000', 'A杞�1000PLUS', '姊у窞80P_2', '闆曞埢鏈�800TE', '鍥涘潗鏍囩珛鍔�104V'], - data: chartDataObj.equipmentNameList ? chartDataObj.equipmentNameList : [], - axisLabel: { - interval: 0, // 鍧愭爣杞村埢搴︽爣绛剧殑鏄剧ず闂撮殧锛屽湪绫荤洰杞翠腑鏈夋晥锛涢粯璁や細閲囩敤鏍囩涓嶉噸鍙犵殑绛栫暐闂撮殧鏄剧ず鏍囩锛涘彲浠ヨ缃垚0寮哄埗鏄剧ず鎵�鏈夋爣绛撅紱濡傛灉璁剧疆涓�1锛岃〃绀恒�庨殧涓�涓爣绛炬樉绀轰竴涓爣绛俱�忥紝濡傛灉鍊间负2锛岃〃绀洪殧涓や釜鏍囩鏄剧ず涓�涓爣绛撅紝浠ユ绫绘帹銆� - rotate: 45, // 鍒诲害鏍囩鏃嬭浆鐨勮搴︼紝鍦ㄧ被鐩酱鐨勭被鐩爣绛炬樉绀轰笉涓嬬殑鏃跺�欏彲浠ラ�氳繃鏃嬭浆闃叉鏍囩涔嬮棿閲嶅彔锛涙棆杞殑瑙掑害浠�-90搴﹀埌90搴� - inside: false, // 鍒诲害鏍囩鏄惁鏈濆唴锛岄粯璁ゆ湞澶� - margin: 15, // 鍒诲害鏍囩涓庤酱绾夸箣闂寸殑璺濈 - fontSize: 14, - color: '#000' - } - }, - yAxis: [ - { - type: 'value', - name: '鍒╃敤鐜�(%)', - axisLine: { - show: true - }, - axisLabel: { - formatter: '{value}%' + /** + * 鍒濆鍖栧浘琛� + * @param chartDataObj 鏁版嵁瀵硅薄 Object + */ + initChart(chartDataObj) { + const option = { + title: { + text: '璁惧缁煎悎鍒╃敤鐜囷紙' + (this.queryParam.month.slice(-2) >= 10 ? this.queryParam.month.slice(-2) : this.queryParam.month.slice(-1)) + '鏈堬級', + left: 'center', + top: 0, + textStyle: { + fontSize: 22 } - } - ], - series: [ - { - type: 'bar', - name: '24h缁煎悎鍒╃敤鐜�', - // data: [53.28, 32.22, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 23, 56, 24, 85, 32, 23, 56, 24, 85, 32, 85, 32, 23, 56, 24, 85, 32] - data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.utilizationRate) : [] - // label: { - // show: true, - // position: 'top', - // formatter: '{c}%', - // avoidLabelOverlap: true - // } }, - { - type: 'bar', - name: '24h鍘婚櫎鏁呴殰', - data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.amendUtilizationRate) : [] - // data: [53.28, 32.22, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 23, 56, 24, 85, 32, 23, 56, 24, 85, 32, 85, 32, 23, 56, 24, 85, 32] + grid: { + top: '12%', + left: '1%', + right: '1%', + bottom: '8%', + containLabel: true }, - { - type: 'bar', - name: '璁″垝宸ヤ綔鏃堕棿缁煎悎鍒╃敤鐜�', - data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.shiftUtilizationRate) : [] - // data: [63.25, 32.22, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 85, 32, 85, 32, 23, 56, 24, 85, 32] - } - ], - dataZoom: [ - { - type: 'slider', + legend: { + top: '6%', + right: 'center', + itemGap: 20, + data: ['24h缁煎悎鍒╃敤鐜�', '24h鍘婚櫎鏁呴殰', '璁″垝宸ヤ綔鏃堕棿缁煎悎鍒╃敤鐜�'] + }, + tooltip: { show: true, - xAxisIndex: 0, - startValue: 0, - endValue: 19, - // 鏄惁鏄剧ずdetail锛屽嵆鎷栨嫿鏃跺�欐樉绀鸿缁嗘暟鍊间俊鎭� - showDetail: false, - // empty锛氬綋鍓嶆暟鎹獥鍙e鐨勬暟鎹紝琚缃负绌恒�� - // 鍗充笉浼氬奖鍝嶅叾浠栬酱鐨勬暟鎹寖鍥� - filterMode: 'empty', - // 鎺у埗鎵嬫焺鐨勫昂瀵� - // handleSize: 0, - // 鏄惁閿佸畾閫夋嫨鍖哄煙锛堟垨鍙仛鏁版嵁绐楀彛锛夌殑澶у皬 - zoomLock: true, - brushSelect: false + trigger: 'axis' }, - { - // 娌℃湁涓嬮潰杩欏潡鐨勮瘽锛屽彧鑳芥嫋鍔ㄦ粴鍔ㄦ潯锛� - // 榧犳爣婊氳疆鍦ㄥ尯鍩熷唴涓嶈兘鎺у埗澶栭儴婊氬姩鏉� - type: 'inside', - show: true, - // 鎺у埗鍝釜杞达紝濡傛灉鏄痭umber琛ㄧず鎺у埗涓�涓酱锛� - xAxisIndex: 0, - // 婊氳疆鏄惁瑙﹀彂缂╂斁 - zoomOnMouseWheel: false, - // 榧犳爣绉诲姩鑳藉惁瑙﹀彂骞崇Щ - moveOnMouseMove: true, - // 榧犳爣婊氳疆鑳藉惁瑙﹀彂骞崇Щ - moveOnMouseWheel: true - } - ] + xAxis: { + type: 'category', + // data: ['绔嬪姞u1000-3', '浜旇酱125P', '浜斿潗鏍囧姞宸ヤ腑蹇僄S1000', 'A杞�1000PLUS', '姊у窞80P_2', '闆曞埢鏈�800TE', '鍥涘潗鏍囩珛鍔�104V', '绔嬪姞u1000-4', '绔嬪姞GX710_1', '涓夊潗鏍囩珛鍔�1350', '鍗у姞H5000-1', '绔嬪姞u1000-2', '绔嬪姞1000HS_1', '绔嬪姞1160_1', '绔嬪姞GX710_2', '绔嬪姞u1000-3', '浜旇酱125P', '浜斿潗鏍囧姞宸ヤ腑蹇僄S1000', 'A杞�1000PLUS', '姊у窞80P_2', '闆曞埢鏈�800TE', '鍥涘潗鏍囩珛鍔�104V', '绔嬪姞u1000-4', '绔嬪姞GX710_1', '涓夊潗鏍囩珛鍔�1350', '鍗у姞H5000-1', '绔嬪姞u1000-2', '绔嬪姞1000HS_1', '绔嬪姞1160_1', '绔嬪姞GX710_2', '绔嬪姞u1000-3', '浜旇酱125P', '浜斿潗鏍囧姞宸ヤ腑蹇僄S1000', 'A杞�1000PLUS', '姊у窞80P_2', '闆曞埢鏈�800TE', '鍥涘潗鏍囩珛鍔�104V'], + data: chartDataObj.equipmentNameList ? chartDataObj.equipmentNameList : [], + axisLabel: { + interval: 0, // 鍧愭爣杞村埢搴︽爣绛剧殑鏄剧ず闂撮殧锛屽湪绫荤洰杞翠腑鏈夋晥锛涢粯璁や細閲囩敤鏍囩涓嶉噸鍙犵殑绛栫暐闂撮殧鏄剧ず鏍囩锛涘彲浠ヨ缃垚0寮哄埗鏄剧ず鎵�鏈夋爣绛撅紱濡傛灉璁剧疆涓�1锛岃〃绀恒�庨殧涓�涓爣绛炬樉绀轰竴涓爣绛俱�忥紝濡傛灉鍊间负2锛岃〃绀洪殧涓や釜鏍囩鏄剧ず涓�涓爣绛撅紝浠ユ绫绘帹銆� + rotate: 45, // 鍒诲害鏍囩鏃嬭浆鐨勮搴︼紝鍦ㄧ被鐩酱鐨勭被鐩爣绛炬樉绀轰笉涓嬬殑鏃跺�欏彲浠ラ�氳繃鏃嬭浆闃叉鏍囩涔嬮棿閲嶅彔锛涙棆杞殑瑙掑害浠�-90搴﹀埌90搴� + inside: false, // 鍒诲害鏍囩鏄惁鏈濆唴锛岄粯璁ゆ湞澶� + margin: 15, // 鍒诲害鏍囩涓庤酱绾夸箣闂寸殑璺濈 + fontSize: 14, + color: '#000' + } + }, + yAxis: [ + { + type: 'value', + name: '鍒╃敤鐜�(%)', + axisLine: { + show: true + }, + axisLabel: { + formatter: '{value}%' + } + } + ], + series: [ + { + type: 'bar', + name: '24h缁煎悎鍒╃敤鐜�', + // data: [53.28, 32.22, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 23, 56, 24, 85, 32, 23, 56, 24, 85, 32, 85, 32, 23, 56, 24, 85, 32] + data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.utilizationRate) : [] + // label: { + // show: true, + // position: 'top', + // formatter: '{c}%', + // avoidLabelOverlap: true + // } + }, + { + type: 'bar', + name: '24h鍘婚櫎鏁呴殰', + data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.amendUtilizationRate) : [] + // data: [53.28, 32.22, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 23, 56, 24, 85, 32, 23, 56, 24, 85, 32, 85, 32, 23, 56, 24, 85, 32] + }, + { + type: 'bar', + name: '璁″垝宸ヤ綔鏃堕棿缁煎悎鍒╃敤鐜�', + data: chartDataObj.dataList ? chartDataObj.dataList.map(item => item.shiftUtilizationRate) : [] + // data: [63.25, 32.22, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 64, 34, 85, 32, 23, 56, 24, 85, 32, 23, 56, 24, 85, 32, 85, 32, 23, 56, 24, 85, 32] + } + ], + dataZoom: [ + { + type: 'slider', + show: true, + xAxisIndex: 0, + startValue: 0, + endValue: 19, + // 鏄惁鏄剧ずdetail锛屽嵆鎷栨嫿鏃跺�欐樉绀鸿缁嗘暟鍊间俊鎭� + showDetail: false, + // empty锛氬綋鍓嶆暟鎹獥鍙e鐨勬暟鎹紝琚缃负绌恒�� + // 鍗充笉浼氬奖鍝嶅叾浠栬酱鐨勬暟鎹寖鍥� + filterMode: 'empty', + // 鎺у埗鎵嬫焺鐨勫昂瀵� + // handleSize: 0, + // 鏄惁閿佸畾閫夋嫨鍖哄煙锛堟垨鍙仛鏁版嵁绐楀彛锛夌殑澶у皬 + zoomLock: true, + brushSelect: false + }, + { + // 娌℃湁涓嬮潰杩欏潡鐨勮瘽锛屽彧鑳芥嫋鍔ㄦ粴鍔ㄦ潯锛� + // 榧犳爣婊氳疆鍦ㄥ尯鍩熷唴涓嶈兘鎺у埗澶栭儴婊氬姩鏉� + type: 'inside', + show: true, + // 鎺у埗鍝釜杞达紝濡傛灉鏄痭umber琛ㄧず鎺у埗涓�涓酱锛� + xAxisIndex: 0, + // 婊氳疆鏄惁瑙﹀彂缂╂斁 + zoomOnMouseWheel: false, + // 榧犳爣绉诲姩鑳藉惁瑙﹀彂骞崇Щ + moveOnMouseMove: true, + // 榧犳爣婊氳疆鑳藉惁瑙﹀彂骞崇Щ + moveOnMouseWheel: true + } + ] + } + this.chartContainer.setOption(option, true) + this.chartContainer.hideLoading() + }, + + // 鑾峰彇涓績鍒楄〃 + getCenterListByApi() { + const that = this + mdcApi.getCenterOrGroupListApi() + .then(res => { + if (res.success) { + that.centerList = res.result + that.queryParam.productionId = res.result[0].value + that.getGroupListByApi(res.result[0].value, true) + } + }) + }, + + /** + * 鑾峰彇鐝粍鍒楄〃 + * @param productionId 涓績Id + * @param isInitLoad 鏄惁涓哄垵濮嬪寲鍔犺浇 + */ + getGroupListByApi(productionId, isInitLoad = false) { + const that = this + mdcApi.getCenterOrGroupListApi(productionId) + .then(res => { + if (res.success) { + that.groupList = res.result + that.handleGroupSelectChange(res.result && res.result.length > 0 && isInitLoad ? [res.result[0].value] : []) + if (!isInitLoad) return + that.loadData() + } + }) + }, + + /** + * 涓績鏀瑰彉鏃惰Е鍙� + * @param value 鏀瑰彉鍚庣殑涓績Id + */ + handleCenterSelectChange(value) { + this.getGroupListByApi(value) + }, + + /** + * 鐝粍鍙戠敓鏀瑰彉鏃惰Е鍙� + * @param value 鏀瑰彉鍚庣殑鐝粍Id + */ + handleGroupSelectChange(value) { + this.productionIds = value + this.queryParam.productionIds = value.join(',') + }, + + handleWindowResize() { + if (this.chartContainer) this.chartContainer.resize() } - this.chartContainer.setOption(option, true) - this.chartContainer.hideLoading() - }, - - // 鑾峰彇涓績鍒楄〃 - getCenterListByApi() { - const that = this - mdcApi.getCenterOrGroupListApi() - .then(res => { - if (res.success) { - that.centerList = res.result - that.queryParam.productionId = res.result[0].value - that.getGroupListByApi(res.result[0].value, true) - } - }) - }, - - /** - * 鑾峰彇鐝粍鍒楄〃 - * @param productionId 涓績Id - * @param isInitLoad 鏄惁涓哄垵濮嬪寲鍔犺浇 - */ - getGroupListByApi(productionId, isInitLoad = false) { - const that = this - mdcApi.getCenterOrGroupListApi(productionId) - .then(res => { - if (res.success) { - that.groupList = res.result - if (!isInitLoad) return - that.handleGroupSelectChange([res.result[0].value]) - that.loadData() - } - }) - }, - - /** - * 涓績鏀瑰彉鏃惰Е鍙� - * @param value 鏀瑰彉鍚庣殑涓績Id - */ - handleCenterSelectChange(value) { - if (this.productionIds.length > 0) { - this.groupList = [] - this.productionIds = [] - delete this.queryParam.productionIds - } - this.getGroupListByApi(value) - }, - - /** - * 鐝粍鍙戠敓鏀瑰彉鏃惰Е鍙� - * @param value 鏀瑰彉鍚庣殑鐝粍Id - */ - handleGroupSelectChange(value) { - this.productionIds = value - if (value.length === 0) { - delete this.queryParam.productionIds - return - } - this.queryParam.productionIds = value.join(',') - }, - - handleWindowResize() { - if (this.chartContainer) this.chartContainer.resize() } } -} </script> \ No newline at end of file diff --git a/src/views/mdc/base/GroupUtilizationRateChart.vue b/src/views/mdc/base/GroupUtilizationRateChart.vue index a7f005b..269eb21 100644 --- a/src/views/mdc/base/GroupUtilizationRateChart.vue +++ b/src/views/mdc/base/GroupUtilizationRateChart.vue @@ -5,7 +5,7 @@ <a-row :gutter="24"> <a-col :md="3" :sm="3"> <a-form-item label="涓績"> - <a-select v-model="queryParam.productionId" placeholder="璇烽�夋嫨涓績"> + <a-select v-model="queryParam.productionId" placeholder="璇烽�夋嫨涓績" @change="handleCenterSelectChange"> <a-select-option v-for="item in centerList" :key="item.key"> {{ item.title }} </a-select-option> @@ -44,21 +44,9 @@ </a-form-item> </a-col> - - <!-- <a-col :md="5" :sm="5">--> - <!-- <a-form-item label="鐝">--> - <!-- <a-select v-model="queryParam.workTime" placeholder="璇烽�夋嫨鐝" mode="multiple" :maxTagCount="2">--> - <!-- <a-select-option key="123">涓�鐝�</a-select-option>--> - <!-- <a-select-option key="234">浜岀彮</a-select-option>--> - <!-- <a-select-option key="345">涓夌彮</a-select-option>--> - <!-- </a-select>--> - <!-- </a-form-item>--> - <!-- </a-col>--> - <a-col :md="2" :sm="2"> <a-space> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <!-- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>--> </a-space> </a-col> </a-row> @@ -70,225 +58,237 @@ </template> <script> -import mdcApi from '@api/mdc' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import mdcApi from '@api/mdc' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' -export default { - name: 'GroupUtilizationRateChart', - components: {}, - mixins: [JeecgListMixin], - data() { - return { - disableMixinCreated: true, - queryParam: {}, - productionIds: [],//鐝粍 - centerList: [], - groupList: [], - equipmentTypeList: [], - shiftList: [] - } - }, - mounted() { - window.addEventListener('resize', this.handleWindowResize) - this.handleWindowResize() - this.getCenterListByApi() - this.getEquipmentTypeListApi() - this.getShiftListByApi() - }, - methods: { - // 鑾峰彇鏁版嵁 - loadData() { - this.chartContainer = this.$echarts.init(document.getElementById('chart-container')) - this.initChart({}) - this.chartContainer.showLoading({ - text: '鏁版嵁鍔犺浇涓� ...', - color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#0696e1' - }) - const that = this - - mdcApi.getGroupChartDataApi(this.queryParam) - .then(res => { - if (res.success) { - if (!res.result.dataList || (res.result.dataList && res.result.dataList.length === 0)) { - that.$notification.warning({ - message: '娑堟伅', - description: '鏆傛棤鏁版嵁' - }) - } - that.initChart(res.result) - } - }) + export default { + name: 'GroupUtilizationRateChart', + components: {}, + mixins: [JeecgListMixin], + data() { + return { + disableMixinCreated: true, + queryParam: {}, + productionIds: [],//鐝粍 + centerList: [], + groupList: [], + equipmentTypeList: [], + shiftList: [] + } }, + mounted() { + window.addEventListener('resize', this.handleWindowResize) + this.handleWindowResize() + this.getCenterListByApi() + this.getEquipmentTypeListApi() + this.getShiftListByApi() + }, + methods: { + // 鑾峰彇鏁版嵁 + loadData() { + this.chartContainer = this.$echarts.init(document.getElementById('chart-container')) + this.initChart({}) + this.chartContainer.showLoading({ + text: '鏁版嵁鍔犺浇涓� ...', + color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 + textColor: '#0696e1' + }) + const that = this - /** - * 鍒濆鍖栧浘琛� - * @param dataList 鍥捐〃鏁版嵁婧� - * @param dateList 鏃ユ湡鍒楄〃 - * @param shiftSubList 鐝鏍囬鍒楄〃 - * @param shiftDataList 鐝鏁版嵁鍒楄〃 - */ - initChart({ dataList, dateList, shiftSubList, shiftDataList }) { - const defaultLegendData = ['24灏忔椂', '24灏忔椂锛堝幓闄ゆ晠闅滄椂闂达級', '鐝', '绱杩愯鏃堕棿(h)'] - const defaultSeries = [ - { - type: 'line', - name: '24灏忔椂', - yAxisIndex: 0, - data: dataList ? dataList.map(item => item.utilizationRate) : [] - }, - { - type: 'line', - name: '24灏忔椂锛堝幓闄ゆ晠闅滄椂闂达級', - yAxisIndex: 0, - data: dataList ? dataList.map(item => item.amendUtilizationRate) : [] - }, - { - type: 'line', - name: '鐝', - yAxisIndex: 0, - data: dataList ? dataList.map(item => item.shiftUtilizationRate) : [] - }, - { - type: 'bar', - name: '绱杩愯鏃堕棿(h)', - yAxisIndex: 1, - barWidth: '30%', - data: dataList ? dataList.map(item => item.processLong) : [] - } - ] - const option = { - title: { - text: '璁惧缁煎悎鍒╃敤鐜�', - left: 'center', - top: 0, - textStyle: { - fontSize: 22 - } - }, - grid: { - top: '12%', - left: '1%', - right: '1%', - bottom: '1%', - containLabel: true - }, - legend: { - top: '6%', - right: 'center', - itemGap: 20, - data: defaultLegendData - }, - tooltip: { - show: true, - trigger: 'axis' - }, - xAxis: { - type: 'category', - data: dateList ? dateList : [] - }, - yAxis: [ - { - type: 'value', - name: '鍒╃敤鐜�(%)', - axisLine: { - show: true - }, - axisLabel: { - formatter: '{value}%' + mdcApi.getGroupChartDataApi(this.queryParam) + .then(res => { + if (res.success) { + if (!res.result.dataList || (res.result.dataList && res.result.dataList.length === 0)) { + that.$notification.warning({ + message: '娑堟伅', + description: '鏆傛棤鏁版嵁' + }) + } + that.initChart(res.result) } + }) + }, + + /** + * 鍒濆鍖栧浘琛� + * @param dataList 鍥捐〃鏁版嵁婧� + * @param dateList 鏃ユ湡鍒楄〃 + * @param shiftSubList 鐝鏍囬鍒楄〃 + * @param shiftDataList 鐝鏁版嵁鍒楄〃 + */ + initChart({ dataList, dateList, shiftSubList, shiftDataList }) { + const defaultLegendData = ['24灏忔椂', '24灏忔椂锛堝幓闄ゆ晠闅滄椂闂达級', '鐝', '绱杩愯鏃堕棿(h)'] + const defaultSeries = [ + { + type: 'line', + name: '24灏忔椂', + yAxisIndex: 0, + data: dataList ? dataList.map(item => item.utilizationRate) : [] }, { - type: 'value', - name: '杩愯鏃堕棿(h)', - axisLine: { - show: true - } - } - ], - series: defaultSeries - } - if (shiftSubList) { - option.legend.data = defaultLegendData.concat(shiftSubList) - const newSeriesData = shiftDataList.map(item => { - return { type: 'line', - name: item.shiftSubName, + name: '24灏忔椂锛堝幓闄ゆ晠闅滄椂闂达級', yAxisIndex: 0, - data: item.dataList ? item.dataList.map(item => item.utilizationRate) : [] + data: dataList ? dataList.map(item => item.amendUtilizationRate) : [] + }, + { + type: 'line', + name: '鐝', + yAxisIndex: 0, + data: dataList ? dataList.map(item => item.shiftUtilizationRate) : [] + }, + { + type: 'bar', + name: '绱杩愯鏃堕棿(h)', + yAxisIndex: 1, + barWidth: '30%', + data: dataList ? dataList.map(item => item.processLong) : [] } - }) + ] + const option = { + title: { + text: '璁惧缁煎悎鍒╃敤鐜�', + left: 'center', + top: 0, + textStyle: { + fontSize: 22 + } + }, + grid: { + top: '12%', + left: '1%', + right: '1%', + bottom: '1%', + containLabel: true + }, + legend: { + top: '6%', + right: 'center', + itemGap: 20, + data: defaultLegendData + }, + tooltip: { + show: true, + trigger: 'axis' + }, + xAxis: { + type: 'category', + data: dateList ? dateList : [] + }, + yAxis: [ + { + type: 'value', + name: '鍒╃敤鐜�(%)', + axisLine: { + show: true + }, + axisLabel: { + formatter: '{value}%' + } + }, + { + type: 'value', + name: '杩愯鏃堕棿(h)', + axisLine: { + show: true + } + } + ], + series: defaultSeries + } + if (shiftSubList) { + option.legend.data = defaultLegendData.concat(shiftSubList) + const newSeriesData = shiftDataList.map(item => { + return { + type: 'line', + name: item.shiftSubName, + yAxisIndex: 0, + data: item.dataList ? item.dataList.map(item => item.utilizationRate) : [] + } + }) - option.series = defaultSeries.concat(newSeriesData) + option.series = defaultSeries.concat(newSeriesData) + } + + this.chartContainer.setOption(option, true) + this.chartContainer.hideLoading() + }, + + // 鑾峰彇涓績鍒楄〃 + getCenterListByApi() { + this.centerList = [] + const that = this + mdcApi.getCenterOrGroupListApi() + .then(res => { + if (res.success) { + that.centerList = res.result + that.queryParam.productionId = res.result[0].value + that.handleCenterSelectChange(res.result[0].value, { isInitLoad: true }) + } + }) + }, + + /** + * 鑾峰彇鐝粍鍒楄〃 + * @param productionId 涓績Id + */ + getGroupListByApi(productionId, isInitLoad) { + this.groupList = [] + const that = this + mdcApi.getCenterOrGroupListApi(productionId) + .then(res => { + if (res.success) { + that.groupList = res.result + that.handleGroupSelectChange(res.result && res.result.length > 0 && isInitLoad ? [res.result[0].value] : []) + if (!isInitLoad) return + that.loadData() + } + }) + }, + + /** + * 涓績鍙戠敓鏀瑰彉鏃惰Е鍙� + * @param value 鏀瑰彉鍚庣殑鍊� + * @param isInitLoad 鏄惁涓哄垵濮嬪寲鍔犺浇 + */ + handleCenterSelectChange(value, { isInitLoad }) { + this.getGroupListByApi(value, isInitLoad) + }, + + /** + * 鐝粍鍙戠敓鏀瑰彉鏃惰Е鍙� + * @param value 鏀瑰彉鍚庣殑鍊� + */ + handleGroupSelectChange(value) { + this.productionIds = value + this.queryParam.productionIds = value.join(',') + }, + + // 鑾峰彇璁惧绫诲瀷鍒楄〃 + getEquipmentTypeListApi() { + const that = this + mdcApi.getEquipmentTypeListApi() + .then(res => { + if (res.success) { + that.equipmentTypeList = res.result + } + }) + }, + + // 鑾峰彇鐝埗鍒楄〃 + getShiftListByApi() { + const that = this + mdcApi.getShiftListApi() + .then(res => { + if (res.success) { + that.shiftList = res.result + } + }) + }, + + handleWindowResize() { + if (this.chartContainer) this.chartContainer.resize() } - - this.chartContainer.setOption(option, true) - this.chartContainer.hideLoading() - }, - - // 鑾峰彇涓績鍒楄〃 - getCenterListByApi() { - const that = this - mdcApi.getCenterOrGroupListApi() - .then(res => { - if (res.success) { - that.centerList = res.result - that.queryParam.productionId = res.result[0].value - that.getGroupListByApi(res.result[0].value) - } - }) - }, - - /** - * 鑾峰彇鐝粍鍒楄〃 - * @param productionId 涓績Id - */ - getGroupListByApi(productionId) { - const that = this - mdcApi.getCenterOrGroupListApi(productionId) - .then(res => { - if (res.success) { - that.groupList = res.result - that.handleGroupSelectChange([res.result[0].value]) - that.loadData() - } - }) - }, - - /** - * 鐝粍鍙戠敓鏀瑰彉鏃惰Е鍙� - * @param value 鏀瑰彉鍚庣殑鍊� - */ - handleGroupSelectChange(value) { - this.productionIds = value - this.queryParam.productionIds = value.join(',') - }, - - // 鑾峰彇璁惧绫诲瀷鍒楄〃 - getEquipmentTypeListApi() { - const that = this - mdcApi.getEquipmentTypeListApi() - .then(res => { - if (res.success) { - that.equipmentTypeList = res.result - } - }) - }, - - // 鑾峰彇鐝埗鍒楄〃 - getShiftListByApi() { - const that = this - mdcApi.getShiftListApi() - .then(res => { - if (res.success) { - that.shiftList = res.result - } - }) - }, - - handleWindowResize() { - if (this.chartContainer) this.chartContainer.resize() } } -} </script> \ No newline at end of file diff --git a/src/views/mdc/base/GroupUtilizationRateCompareChart.vue b/src/views/mdc/base/GroupUtilizationRateCompareChart.vue index 5ab96c8..c016c8f 100644 --- a/src/views/mdc/base/GroupUtilizationRateCompareChart.vue +++ b/src/views/mdc/base/GroupUtilizationRateCompareChart.vue @@ -16,7 +16,6 @@ <a-col :md="5" :sm="5"> <a-space> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <!-- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>--> </a-space> </a-col> </a-row> @@ -32,186 +31,188 @@ </template> <script> -import mdcApi from '@api/mdc' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import mdcApi from '@api/mdc' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' -export default { - name: 'GroupUtilizationRateCompareChart', - components: {}, - mixins: [JeecgListMixin], - data() { - return { - disableMixinCreated: true, - centerList: [], - chartsOptionList: [ - { - position: 'left', - title: '鐝粍璁惧缁煎悎鍒╃敤鐜囷紙24h锛�', - property: 'utilizationRateList' - }, - { - position: 'middle', - title: '鐝粍璁惧缁煎悎鍒╃敤鐜囷紙24h鍘婚櫎鏁呴殰鏃堕棿锛�', - property: 'amendUtilizationRateList' - }, - { - position: 'right', - title: '鐝粍璁惧缁煎悎鍒╃敤鐜囷紙璁″垝宸ヤ綔鏃堕棿锛�', - property: 'shiftUtilizationRateList' - } - ], - leftChartContainer: null, - middleChartContainer: null, - rightChartContainer: null - } - }, - - mounted() { - window.addEventListener('resize', this.handleWindowResize) - this.getCenterListByApi() - this.handleWindowResize() - }, - methods: { - // 鑾峰彇鍥捐〃鏁版嵁 - loadData() { - const that = this - this.chartsOptionList.forEach(item => { - that.initChart(item.position) - that.chartSetOption(item.position, item.title, [], [], false) - }) - mdcApi.getGroupRateCompareChartDataApi(this.queryParam.productionId) - .then(res => { - if (res.success) { - that.chartsOptionList.forEach(item => this.chartSetOption(item.position, item.title, res.result[item.property], res.result.dateList)) - } else { - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - .catch(err => { - that.$notification.error({ - message: '娑堟伅', - description: err.message - }) - }) - }, - - /** - * 鍒濆鍖栧浘琛� - * @param position 鍥捐〃浣嶇疆 String - */ - initChart(position) { - this[position + 'ChartContainer'] = this.$echarts.init(document.getElementById(`chart-container-${position}`)) - this[position + 'ChartContainer'].showLoading({ - text: '鏁版嵁鍔犺浇涓� ...', - color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#0696e1' - }) - }, - - /** - * 璁剧疆鍥炬爣閫夐」 - * @param position 鍥捐〃浣嶇疆 String - * @param title 鍥捐〃鏍囬 String - * @param dataList 鍥捐〃鏁版嵁婧� Array - * @param dateList 鍥捐〃妯潗鏍囨湀浠� Array - * @param isHideLoading 鏄惁鍏抽棴鍔犺浇鍥炬爣 Boolean - */ - chartSetOption(position, title, dataList, dateList, isHideLoading = true) { - const option = { - title: { - text: title, - left: 'center', - top: 0, - textStyle: { - fontSize: 22 - } - }, - grid: { - top: '10%', - left: '1%', - right: '1%', - bottom: '12%', - containLabel: true - }, - legend: { - bottom: '3%', - right: 'center', - data: dataList.map(item => item.productionName) - }, - tooltip: { - show: true, - trigger: 'axis' - }, - xAxis: { - type: 'category', - data: dateList - }, - yAxis: [ + export default { + name: 'GroupUtilizationRateCompareChart', + components: {}, + mixins: [JeecgListMixin], + data() { + return { + disableMixinCreated: true, + centerList: [], + chartsOptionList: [ { - type: 'value', - name: '鍒╃敤鐜�(%)', - axisLine: { - show: true - }, - axisLabel: { - formatter: '{value}%' - } + position: 'left', + title: '鐝粍璁惧缁煎悎鍒╃敤鐜囷紙24h锛�', + property: 'utilizationRateList' + }, + { + position: 'middle', + title: '鐝粍璁惧缁煎悎鍒╃敤鐜囷紙24h鍘婚櫎鏁呴殰鏃堕棿锛�', + property: 'amendUtilizationRateList' + }, + { + position: 'right', + title: '鐝粍璁惧缁煎悎鍒╃敤鐜囷紙璁″垝宸ヤ綔鏃堕棿锛�', + property: 'shiftUtilizationRateList' } ], - series: dataList.map(item => { - return { - type: 'line', - name: item.productionName, - data: item.dataList.map(item => item.utilizationRate) - } - }) - // series: [ - // { - // type: 'line', - // name: '鏁伴摚涓�鐝�', - // data: [85, 32, 23, 56, 24, 64] - // }, - // { - // type: 'line', - // name: '鏁伴摚浜岀彮', - // data: [23, 42, 76, 54, 87, 34] - // }, - // { - // type: 'line', - // name: '鏁伴摚涓夌彮', - // data: [10, 84, 21, 42, 53, 57] - // }, - // { - // type: 'line', - // name: '鏁拌溅鐝�', - // data: [23, 32, 42, 35, 64, 53] - // } - // ] + leftChartContainer: null, + middleChartContainer: null, + rightChartContainer: null } - this[position + 'ChartContainer'].setOption(option, true) - if (isHideLoading) this[position + 'ChartContainer'].hideLoading() }, - // 鑾峰彇涓績鍒楄〃 - getCenterListByApi() { - mdcApi.getCenterOrGroupListApi() - .then(res => { - if (res.success) { - this.centerList = res.result - this.queryParam.productionId = res.result[0].value - this.loadData() - } + mounted() { + window.addEventListener('resize', this.handleWindowResize) + this.getCenterListByApi() + this.handleWindowResize() + }, + methods: { + // 鑾峰彇鍥捐〃鏁版嵁 + loadData() { + const that = this + this.chartsOptionList.forEach(item => { + that.initChart(item.position) + that.chartSetOption(item.position, item.title, [], [], false) }) - }, + mdcApi.getGroupRateCompareChartDataApi(this.queryParam.productionId) + .then(res => { + if (res.success) { + that.chartsOptionList.forEach(item => this.chartSetOption(item.position, item.title, res.result[item.property], res.result.dateList)) + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: err.message + }) + }) + }, - handleWindowResize() { - if (this.leftChartContainer) this.leftChartContainer.resize() - if (this.middleChartContainer) this.middleChartContainer.resize() - if (this.rightChartContainer) this.rightChartContainer.resize() + /** + * 鍒濆鍖栧浘琛� + * @param position 鍥捐〃浣嶇疆 String + */ + initChart(position) { + this[position + 'ChartContainer'] = this.$echarts.init(document.getElementById(`chart-container-${position}`)) + this[position + 'ChartContainer'].showLoading({ + text: '鏁版嵁鍔犺浇涓� ...', + color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 + textColor: '#0696e1' + }) + }, + + /** + * 璁剧疆鍥炬爣閫夐」 + * @param position 鍥捐〃浣嶇疆 String + * @param title 鍥捐〃鏍囬 String + * @param dataList 鍥捐〃鏁版嵁婧� Array + * @param dateList 鍥捐〃妯潗鏍囨湀浠� Array + * @param isHideLoading 鏄惁鍏抽棴鍔犺浇鍥炬爣 Boolean + */ + chartSetOption(position, title, dataList, dateList, isHideLoading = true) { + const option = { + title: { + text: title, + left: 'center', + top: 0, + textStyle: { + fontSize: 22 + } + }, + grid: { + top: '10%', + left: '1%', + right: '1%', + bottom: '12%', + containLabel: true + }, + legend: { + bottom: '3%', + right: 'center', + data: dataList.map(item => item.productionName) + }, + tooltip: { + show: true, + trigger: 'axis' + }, + xAxis: { + type: 'category', + data: dateList + }, + yAxis: [ + { + type: 'value', + name: '鍒╃敤鐜�(%)', + axisLine: { + show: true + }, + axisLabel: { + formatter: '{value}%' + } + } + ], + series: dataList.map(item => { + return { + type: 'line', + name: item.productionName, + data: item.dataList.map(item => item.utilizationRate) + } + }) + // series: [ + // { + // type: 'line', + // name: '鏁伴摚涓�鐝�', + // data: [85, 32, 23, 56, 24, 64] + // }, + // { + // type: 'line', + // name: '鏁伴摚浜岀彮', + // data: [23, 42, 76, 54, 87, 34] + // }, + // { + // type: 'line', + // name: '鏁伴摚涓夌彮', + // data: [10, 84, 21, 42, 53, 57] + // }, + // { + // type: 'line', + // name: '鏁拌溅鐝�', + // data: [23, 32, 42, 35, 64, 53] + // } + // ] + } + this[position + 'ChartContainer'].setOption(option, true) + if (isHideLoading) this[position + 'ChartContainer'].hideLoading() + }, + + // 鑾峰彇涓績鍒楄〃 + getCenterListByApi() { + this.centerList = [] + const that = this + mdcApi.getCenterOrGroupListApi() + .then(res => { + if (res.success) { + that.centerList = res.result + that.$set(that.queryParam, 'productionId', res.result[0].value) + that.loadData() + } + }) + }, + + handleWindowResize() { + if (this.leftChartContainer) this.leftChartContainer.resize() + if (this.middleChartContainer) this.middleChartContainer.resize() + if (this.rightChartContainer) this.rightChartContainer.resize() + } } } -} </script> \ No newline at end of file diff --git a/src/views/mdc/base/modules/DeviceLog/LogInfo.vue b/src/views/mdc/base/modules/DeviceLog/LogInfo.vue index 9b03a2c..051eadd 100644 --- a/src/views/mdc/base/modules/DeviceLog/LogInfo.vue +++ b/src/views/mdc/base/modules/DeviceLog/LogInfo.vue @@ -31,87 +31,52 @@ </div> <div> - <table cellpadding="0" cellspacing="0" width="100%"> - <tr> - <td> - <table width="100%"> - <tr style="word-break: keep-all;"> - <td align="right"><a id="btnMdcLogWline" href="#"> - <div style="padding-top: 15px;" @click="openWorkChart"> - <img src="../../../../../assets/image/linechart.png" alt=""> - <p>宸ヤ綔鏇茬嚎</p> - </div> - </a></td> - <td width="100%" height="100%"> - <table width="100%" height="100%" align="center" cellpadding="0" cellspacing="0"> - <tr> - <td style="word-break: keep-all;" align="left"> - <div - style="width: 100%; height: 62px;border: 1px solid;border-color: #9d9d9d;position: relative;overflow: hidden"> - <div class="mdcLogShowOne" - :style='{display: "inline-block",width:item.dateProportion, height: "100%"}' - v-for="item in normal"> - <span v-if="item.status == 0" - :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#A8A8A8",position:"absolute",top:"0"}'></span> - <span v-if="item.status == 1" - :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span> - <span v-if="item.status == 2" - :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span> - <span v-if="item.status == 3" - :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",top:"0"}'></span> - <span v-if="item.status == 23" - :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span> - </div> - <div v-if="item.status == 22" style="z-index: 999;" - :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' - v-for="item in warning"> + <div class="equipment-status-container"> + <a href="#" @click="openWorkChart"> + <img src="@/assets/image/linechart.png" alt=""> + <div>宸ヤ綔鏇茬嚎</div> + </a> + + <div> + <div :style='{display: "inline-block",width:item.dateProportion, height: "100%"}' v-for="item in normal"> + <span v-if="item.status == 0" + :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#A8A8A8",position:"absolute",top:"0"}'></span> + <span v-if="item.status == 1" + :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span> + <span v-if="item.status == 2" + :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#fffc5c",position:"absolute",top:"0"}'></span> + <span v-if="item.status == 3" + :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",top:"0"}'></span> + <span v-if="item.status == 23" + :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span> + </div> + <div v-if="item.status == 22" + :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' + v-for="item in warning"> <span :style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span> - </div> - <div v-if="item.status == 25" style="z-index: 1000;" - :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' - v-for="item in fault"> + </div> + <div v-if="item.status == 25" + :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' + v-for="item in fault"> <span :style='{display: "inline-block",width:"100%", left:0, height: "50%", background: "#C11900",position:"absolute",bottom:"0"}'></span> - </div> - </div> - </td> - </tr> - </table> - </td> - <td align="left"><a id="btnMdcLogBar" href="#"> - <div style="padding-top: 15px;" @click="openHistoryChart"> - <img src="../../../../../assets/image/Histogram.png" alt=""> - <p>鍘嗗彶璁板綍</p> - </div> - </a></td> - </tr> - <tr> - <td align="right">0</td> - <td width="100%"> - <table width="100%;" cellpadding="0" cellspacing="0"> - <tr align="right" style="word-break: keep-all;"> - <td>02:00</td> - <td>04:00</td> - <td>06:00</td> - <td>08:00</td> - <td>10:00</td> - <td>12:00</td> - <td>14:00</td> - <td>16:00</td> - <td>18:00</td> - <td>20:00</td> - <td>22:00</td> - <td>24:00</td> - </tr> - </table> - </td> - <td></td> - </tr> - </table> - </td> - </tr> - </table> + </div> + </div> + + <a href="#" @click="openHistoryChart"> + <img src="@/assets/image/Histogram.png" alt=""> + <div>鍘嗗彶璁板綍</div> + </a> + </div> + + <div class="time-container"> + <div>0</div> + <div> + <div v-for="item in 12">{{('0'+item*2).slice(-2)}}:00</div> + </div> + <div></div> + </div> <a-space class="date-change-container"> <img @click="dataBefore" src="@/assets/image/left.png" alt=""> @@ -342,6 +307,46 @@ </script> <style scoped="scoped" lang="less"> + @image-container-width: 58px; + + .equipment-status-container { + display: flex; + + > a { + display: inline-block; + text-align: center; + width: @image-container-width + } + + > div { + height: 62px; + border: 1px solid #9d9d9d; + position: relative; + overflow: hidden; + flex: 1 + } + } + + .time-container { + display: flex; + align-items: center; + + > div:not(:nth-child(2)) { + width: @image-container-width; + text-align: right; + } + + > div:nth-child(2) { + width: calc(100% - @image-container-width * 2); + display: flex; + + div { + width: calc(100% / 12); + text-align: right; + } + } + } + .date-change-container { display: flex; align-items: center; diff --git a/src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue b/src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue index e1401a5..a66a14f 100644 --- a/src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue +++ b/src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue @@ -5,7 +5,7 @@ <a-row> <a-col :span="24"> <a-form-model-item label="璁惧缁�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentIds"> - <a-input-search :readOnly="true" v-model="model.equipmentIds" + <a-input-search :readOnly="true" v-model="model.equipmentIds" @click="deviceSearch" @search="deviceSearch" :disabled="disableSelectDevice" enter-button placeholder="璇烽�夋嫨璁惧"></a-input-search> </a-form-model-item> diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue index e9f6724..95e33a7 100644 --- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue +++ b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue @@ -25,15 +25,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> @@ -82,13 +73,8 @@ </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>--> - </div> </template> diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue index ee2f506..09a25ca 100644 --- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue +++ b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue @@ -7,7 +7,7 @@ <a-col :span="12"> <a-form-item label="璁惧缁�" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]" - @search="deviceSearch" enter-button placeholder="璇烽�夋嫨璁惧"/> + @search="deviceSearch" @click="deviceSearch" enter-button placeholder="璇烽�夋嫨璁惧"/> </a-form-item> </a-col> <a-col :span="12"> diff --git a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue b/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue index effe2c4..e04a1b7 100644 --- a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue +++ b/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue @@ -7,7 +7,7 @@ <a-row :gutter="24"> <a-col :md="5" :sm="5"> <a-form-item label="璁惧"> - <a-input-search :readOnly="true" v-model="queryParam.equipmentId" @search="deviceSearch" + <a-input-search :readOnly="true" v-model="queryParam.equipmentId" @search="deviceSearch" @click="deviceSearch" placeholder='璇烽�夋嫨璁惧'/> </a-form-item> </a-col> diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarList.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarList.vue index 250d167..5a5ff50 100644 --- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarList.vue +++ b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarList.vue @@ -16,17 +16,6 @@ <a-button v-has="'user.disposition'" type="primary" @click="handleAdd" icon="plus">閰嶇疆</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">--> - <!--<!–//娌堥–>--> - <!--<a-button v-has="'user.disposition'" type="primary" @click="handleAdd" icon="plus">閰嶇疆</a-button>--> - - <!--<!–<a-button type="primary" @click="handleAdd" icon="plus">閰嶇疆</a-button>–>--> - <!--</a-col>--> - - </a-row> </a-form> </div> diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue index 477b7cb..f4121ea 100644 --- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue +++ b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue @@ -10,7 +10,7 @@ <a-col :span="24"> <a-form-item label="璁惧缁�" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> <a-input-search :readOnly="true" v-decorator="['equipmentId', validatorRules.equipmentId]" - @search="deviceSearch" enter-button placeholder="璇烽�夋嫨璁惧"/> + @search="deviceSearch" @click="deviceSearch" enter-button placeholder="璇烽�夋嫨璁惧"/> </a-form-item> </a-col> </a-row> @@ -341,35 +341,6 @@ </script> <style scoped lang="less"> - - /deep/ .ant-modal-close { - color: #1191b0; - font-size: 24px; - } - - /deep/ .ant-modal-close-x { - font-size: 24px; - } - - .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/ .mark1 { color: white !important; background-color: #1890ff !important; diff --git a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue index 011b86f..390d213 100644 --- a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue +++ b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue @@ -189,7 +189,7 @@ {{tableHead.openRate | numFilter}} </td> <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gzl') > -1"> - {{tableHead.faultRate | numFilter}} + {{tableHead.faultRate }} </td> <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1"> {{tableHead.openLong | getFormattedTime}} -- Gitblit v1.9.3