1、设备管理页面设备种类字段改成重要程度字段;新增设备异常状态字段,若表格记录的设备状态不为正常时,则标红此表格记录
2、设备利用率、设备开动率、班次利用率以及设备综合效率分析新增按照重要程度字段查询表格数据;左侧树数据新增参数key,用来过滤异常状态设备
3、设备利用率页面新增设备型号字段
| | |
| | | |
| | | actions: { |
| | | // 产线树 |
| | | QueryProduction({ commit }) { |
| | | QueryProduction({ commit },key) { |
| | | return new Promise((resolve, reject) => { |
| | | getAction("/mdc/mdcEquipment/queryTreeListByProduction").then(response => { |
| | | getAction("/mdc/mdcEquipment/queryTreeListByProduction",{key}).then(response => { |
| | | if(response.success){ |
| | | const result = response.result |
| | | Vue.ls.set(SYS_PRODUCTION, result) |
| | |
| | | <a-col :md="5"> |
| | | <a-tabs :activeKey="activeKey" @change="tabChange"> |
| | | <a-tab-pane key="1" tab="车间层级" force-render> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | | <base-tree @getCurrSelected="changeSelectionNode" :filterAbnormalDeviceKey="'1'"></base-tree> |
| | | </a-tab-pane> |
| | | <a-tab-pane v-if="isDepartType == 0" key="2" tab="部门层级">, |
| | | <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> |
| | |
| | | <a-col :md="5"> |
| | | <a-tabs :activeKey="activeKey" @change="tabChange"> |
| | | <a-tab-pane key="1" tab="车间层级" force-render> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | | <base-tree @getCurrSelected="changeSelectionNode" :filterAbnormalDeviceKey="'1'"></base-tree> |
| | | </a-tab-pane> |
| | | <a-tab-pane v-if="isDepartType == 0" key="2" tab="部门层级">, |
| | | <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> |
| | |
| | | <a-col :md="5"> |
| | | <a-tabs :activeKey="activeKey" @change="tabChange"> |
| | | <a-tab-pane key="1" tab="车间层级" force-render> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | | <base-tree @getCurrSelected="changeSelectionNode" :filterAbnormalDeviceKey="'1'"></base-tree> |
| | | </a-tab-pane> |
| | | <a-tab-pane v-if="isDepartType == 0" key="2" tab="部门层级"> |
| | | <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> |
| | |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="设备编号"> |
| | | <a-input placeholder="请输入设备编号" v-model="queryParam.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="设备名称"> |
| | | <a-input placeholder="请输入设备名称" v-model="queryParam.equipmentName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="车间名称"> |
| | | <!--<a-input placeholder="请输入车间名称" v-model="queryParam.productionName"></a-input>--> |
| | | <a-tree-select v-model="queryParam.productionName" :treeData="workshopTreeData" placeholder="请选择车间" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="4" :sm="4"> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="设备级别"> |
| | | <j-dict-select-tag placeholder="请选择设备级别" dictCode="device_level" v-model="queryParam.deviceLevel" |
| | | allow-clear/> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="设备种类"> |
| | | <j-dict-select-tag placeholder="请选择设备种类" dictCode="device_category" v-model="queryParam.deviceCategory" |
| | | allow-clear/> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="异常状态"> |
| | | <j-dict-select-tag placeholder="请选择设备异常状态" dictCode="device_abnormal_status" |
| | | v-model="queryParam.deviceAbnormalStatus" |
| | | allow-clear/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | |
| | | <a-col :md="6" :sm="6"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
| | | <a |
| | | @click="toggleSearchStatus=!toggleSearchStatus" |
| | | style="margin-left: 8px" |
| | | > |
| | | {{ toggleSearchStatus ? '收起' : '展开' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <!-- 操作按钮区域· --> |
| | | <div class="table-operator" style="border-top: 5px"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">添加设备</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('设备信息')">导出</a-button> |
| | |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | <!--<template slot="equipmentId" slot-scope="text,record">--> |
| | | <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> |
| | | <!--</template>--> |
| | | <!--<template slot="equipmentName" slot-scope="text,record">--> |
| | | <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> |
| | | <!--</template>--> |
| | | <!--<template slot="productionName" slot-scope="text,record">--> |
| | | <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> |
| | | <!--</template>--> |
| | | <!--<template slot="equipmentType" slot-scope="text,record">--> |
| | | <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> |
| | | <!--</template>--> |
| | | <!--<template slot="driveType" slot-scope="text,record">--> |
| | | <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> |
| | | <!--</template>--> |
| | | <!--<template slot="equipmentIp" slot-scope="text,record">--> |
| | | <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> |
| | | <!--</template>--> |
| | | <!--<template slot="devicePower" slot-scope="text,record">--> |
| | | <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> |
| | | <!--</template>--> |
| | | <!--<template slot="systemVersion" slot-scope="text,record">--> |
| | | <!--<div :style="{color:record.deviceAbnormalStatus===1?null:'#f00'}">{{text}}</div>--> |
| | | <!--</template>--> |
| | | <template slot="deviceAbnormalStatus" slot-scope="text,record"> |
| | | <div :style="{color:text&&text!==1?'#f00':null}">{{record.deviceAbnormalStatus_dictText}}</div> |
| | | </template> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | |
| | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- table区域-end --> |
| | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { queryProductionTreeList } from '@/api/api' |
| | | import { mapActions } from 'vuex' |
| | | import Template1 from '../../jeecg/JVxeDemo/layout-demo/Template1' |
| | | |
| | | export default { |
| | | name: 'EquipmentList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | Template1, |
| | | UserModal |
| | | }, |
| | | data() { |
| | |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 200 |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | |
| | | { |
| | | title: '设备类型', |
| | | align: 'center', |
| | | width: 200, |
| | | width: 180, |
| | | dataIndex: 'equipmentType' |
| | | }, |
| | | |
| | | { |
| | | title: '驱动类型', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'driveType' |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '机床IP', |
| | |
| | | { |
| | | title: '设备功率', |
| | | align: 'center', |
| | | width: 200, |
| | | width: 150, |
| | | dataIndex: 'devicePower' |
| | | }, |
| | | { |
| | | title: '部门', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'orgCodeTxt' |
| | | }, |
| | | |
| | | // { |
| | | // title: '部门', |
| | | // align: "center", |
| | | // width: 200, |
| | | // dataIndex: 'orgCodeTxt' |
| | | // }, |
| | | { |
| | | title: '系统版本', |
| | | align: 'center', |
| | | width: 200, |
| | | width: 150, |
| | | dataIndex: 'systemVersion' |
| | | }, |
| | | { |
| | | title: '异常状态', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'deviceAbnormalStatus' |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | width: 150, |
| | | fixed: 'right' |
| | | } |
| | | |
| | | ], |
| | | url: { |
| | | list: '/mdc/mdcEquipment/list', |
| | |
| | | title: '设备编号', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 200 |
| | | width: 200, |
| | | scopedSlots: { customRender: 'equipmentId' } |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentName' |
| | | dataIndex: 'equipmentName', |
| | | scopedSlots: { customRender: 'equipmentName' } |
| | | }, |
| | | { |
| | | title: '车间', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'productionName' |
| | | dataIndex: 'productionName', |
| | | scopedSlots: { customRender: 'productionName' } |
| | | }, |
| | | { |
| | | title: '设备类型', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentType' |
| | | width: 180, |
| | | dataIndex: 'equipmentType', |
| | | scopedSlots: { customRender: 'equipmentType' } |
| | | }, |
| | | |
| | | { |
| | | title: '驱动类型', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'driveType' |
| | | dataIndex: 'driveType', |
| | | scopedSlots: { customRender: 'driveType' } |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '机床IP', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentIp' |
| | | dataIndex: 'equipmentIp', |
| | | scopedSlots: { customRender: 'equipmentIp' } |
| | | }, |
| | | { |
| | | title: '设备功率', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'devicePower' |
| | | width: 150, |
| | | dataIndex: 'devicePower', |
| | | scopedSlots: { customRender: 'devicePower' } |
| | | }, |
| | | // { |
| | | // title: '部门', |
| | |
| | | // width: 200, |
| | | // dataIndex: 'orgCodeTxt' |
| | | // }, |
| | | |
| | | { |
| | | title: '系统版本', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'systemVersion' |
| | | width: 150, |
| | | dataIndex: 'systemVersion', |
| | | scopedSlots: { customRender: 'systemVersion' } |
| | | }, |
| | | { |
| | | title: '异常状态', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'deviceAbnormalStatus', |
| | | scopedSlots: { customRender: 'deviceAbnormalStatus' } |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | <a-col :md="5"> |
| | | <a-tabs :activeKey="activeKey" @change="tabChange"> |
| | | <a-tab-pane key="1" tab="车间层级" force-render> |
| | | <base-tree @getCurrSelected="changeSelectionNode"></base-tree> |
| | | <base-tree @getCurrSelected="changeSelectionNode" :filterAbnormalDeviceKey="'1'"></base-tree> |
| | | </a-tab-pane> |
| | | <a-tab-pane v-if="isDepartType == 0" key="2" tab="部门层级"> |
| | | <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree> |
| | |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item v-if="isDepartType == 0" label="部门分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled"> |
| | | <j-select-equipment-depart :disabled="disableSubmit" v-model="model.selectedDeparts" :multi="false" @back="backDepartInfo" :backDepart="true" :treeOpera="true"></j-select-equipment-depart> |
| | | <a-form-model-item v-if="isDepartType == 0" label="部门分配" :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | v-show="!departDisabled"> |
| | | <j-select-equipment-depart :disabled="disableSubmit" v-model="model.selectedDeparts" :multi="false" |
| | | @back="backDepartInfo" :backDepart="true" |
| | | :treeOpera="true"></j-select-equipment-depart> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item v-if="isDepartType == -1" label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="车间分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled" ref="selectedProduction" prop="selectedProduction"> |
| | | <a-form-model-item label="车间分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled" |
| | | ref="selectedProduction" prop="selectedProduction"> |
| | | <!--<j-select-equipment-production v-decorator="['selectedProduction',{rules:[{required:true,message:'请选择车间!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>--> |
| | | <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production> |
| | | <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" |
| | | @back="backProductionInfo" :backProduction="true" |
| | | :treeProductOpera="true"></j-select-equipment-production> |
| | | </a-form-model-item> |
| | | |
| | | </a-col> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="系统类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="请选择系统类型" :triggerChange="true" dictCode="system_type" v-model="model.systemType" allow-clear/> |
| | | <j-dict-select-tag placeholder="请选择系统类型" :triggerChange="true" dictCode="system_type" |
| | | v-model="model.systemType" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设备级别" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="请选择设备级别" dictCode="device_level" v-model="model.deviceLevel" allow-clear/> |
| | | <a-form-model-item label="异常状态" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="请选择设备异常状态" dictCode="device_abnormal_status" |
| | | v-model="model.deviceAbnormalStatus" allow-clear :defaultValue="1"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <!--<a-col :span="12">--> |
| | | <!--<a-form-model-item label="设备种类" :labelCol="labelCol" :wrapperCol="wrapperCol">--> |
| | | <!--<j-dict-select-tag placeholder="请选择设备种类" dictCode="device_category" v-model="model.deviceCategory"--> |
| | | <!--allow-clear/>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--</a-col>--> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设备种类" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="请选择设备种类" dictCode="device_category" v-model="model.deviceCategory" allow-clear/> |
| | | <a-form-model-item label="设备级别" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag @change="handleDeviceLevelChange" placeholder="请选择设备级别" |
| | | dictCode="device_level" |
| | | v-model="model.deviceLevel" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-col :span="12" v-if="model.deviceLevel==='A'"> |
| | | <a-form-model-item label="重要程度" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="请选择设备重要程度" dictCode="device_importance_level" |
| | | v-model="model.deviceImportanceLevel" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" v-else> |
| | | <a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请输入排序" |
| | | v-model="model.sortNo" style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12" v-if="model.deviceLevel==='A'"> |
| | | <a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请输入排序" |
| | | v-model="model.sortNo" style="width: 100%"/> |
| | |
| | | import pick from 'lodash.pick' |
| | | import moment from 'moment' |
| | | import Vue from 'vue' |
| | | import { ACCESS_TOKEN } from "@/store/mutation-types" |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import { getAction } from '@/api/manage' |
| | | import { addEquipment,editEquipment,queryUserRole,queryall } from '@/api/api' |
| | | import { disabledAuthFilter } from "@/utils/authFilter" |
| | | import { disabledAuthFilter } from '@/utils/authFilter' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import JSelectEquipmentProduction from '../../../../../components/jeecgbiz/JSelectEquipmentProduction' |
| | | import JSelectProduction from '../../../../../components/jeecgbiz/JSelectProduction' |
| | | import DeviceListModel from './DeviceListModal' |
| | | import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart' |
| | | import AFormModelItem from 'ant-design-vue/es/form-model/FormItem' |
| | | import {mapActions} from 'vuex' |
| | | |
| | | export default { |
| | | name: "UserModal", |
| | | name: 'UserModal', |
| | | components: { |
| | | AFormModelItem, |
| | | JSelectProduction, |
| | | JSelectEquipmentDepart, |
| | | JSelectEquipmentProduction, |
| | |
| | | drawerWidth:700, |
| | | modaltoggleFlag:true, |
| | | confirmDirty: false, |
| | | userId:"", //保存用户id |
| | | userId: '', //保存用户id |
| | | // disableSubmit:false, |
| | | disableSubmit: true, |
| | | dateFormat:"YYYY-MM-DD", |
| | | dateFormat: 'YYYY-MM-DD', |
| | | form: this.$form.createForm(this), |
| | | |
| | | validatorRules:{ |
| | |
| | | [ |
| | | { |
| | | required: true, message: '请选择设备编号!' |
| | | }, |
| | | } |
| | | ], |
| | | equipmentName: |
| | | [ |
| | | { |
| | | required: true, message: '请输入设备名称!' |
| | | }, |
| | | } |
| | | ], |
| | | equipmentModel: |
| | | [ |
| | | { |
| | | required: true, message: '请输入设备型号!' |
| | | }, |
| | | } |
| | | ], |
| | | selectedProduction: |
| | | [ |
| | |
| | | |
| | | }, |
| | | departIdShow:false, |
| | | title:"操作", |
| | | title: '操作', |
| | | visible: false, |
| | | model: { |
| | | equipmentId: "", |
| | | equipmentName: "", |
| | | equipmentModel: "", |
| | | equipmentIp: "", |
| | | dataPort: "", |
| | | driveType: "", |
| | | systemType: "", |
| | | deviceLevel: "", |
| | | deviceCategory: "" |
| | | equipmentId: '', |
| | | equipmentName: '', |
| | | equipmentModel: '', |
| | | equipmentIp: '', |
| | | dataPort: '', |
| | | driveType: '', |
| | | systemType: '', |
| | | deviceLevel: '', |
| | | deviceAbnormalStatus: '' |
| | | // deviceCategory: '' |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 8 }, |
| | | sm: { span: 8 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | uploadLoading:false, |
| | | confirmLoading: false, |
| | | headers:{}, |
| | | url: { |
| | | fileUpload: window._CONFIG['domianURL']+"/sys/common/upload", |
| | | userWithDepart: "/mdc/mdcEquipment/equipmentDepartList", // 引入为指定用户查看部门信息需要的url |
| | | fileUpload: window._CONFIG['domianURL'] + '/sys/common/upload', |
| | | userWithDepart: '/mdc/mdcEquipment/equipmentDepartList', // 引入为指定用户查看部门信息需要的url |
| | | //引入为指定用户查看车间信息需要的url |
| | | userProductionList: '/mdc/mdcEquipment/equipmentProductionList', |
| | | userId:"/sys/user/generateUserId", // 引入生成添加用户情况下的url |
| | | syncUserByUserName:"/act/process/extActProcess/doSyncUserByUserName",//同步用户到工作流 |
| | | userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url |
| | | syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//同步用户到工作流 |
| | | queryTenantList: '/sys/tenant/queryList', |
| | | check:'/sys/duplicate/check', |
| | | queryEquipmentType:'/mdc/mdcEquipmentType/queryEquipmentType' |
| | |
| | | } |
| | | }, |
| | | created () { |
| | | const token = Vue.ls.get(ACCESS_TOKEN); |
| | | this.headers = {"X-Access-Token":token} |
| | | const token = Vue.ls.get(ACCESS_TOKEN) |
| | | this.headers = { 'X-Access-Token': token } |
| | | this.queryGroup() |
| | | this.queryTreeData() |
| | | // this.initRoleList() |
| | |
| | | }, |
| | | computed:{ |
| | | uploadAction:function () { |
| | | return this.url.fileUpload; |
| | | return this.url.fileUpload |
| | | } |
| | | }, |
| | | methods: { |
| | | moment, |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | }) |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | add () { |
| | | // this.form.resetFields() |
| | | // this.$refs.formModel.resetFields() |
| | | this.refresh(); |
| | | this.refresh() |
| | | |
| | | this.edit({activitiSync:'1',userIdentity:1,equipmentId:"",equipmentName:"",equipmentModel:"",equipmentIp:'',dataPort:"",driveType:"",controlSystem:"",saveTableName:""}); |
| | | this.edit({ |
| | | activitiSync: '1', |
| | | userIdentity: 1, |
| | | equipmentId: '', |
| | | equipmentName: '', |
| | | equipmentModel: '', |
| | | equipmentIp: '', |
| | | dataPort: '', |
| | | driveType: '', |
| | | controlSystem: '', |
| | | saveTableName: '', |
| | | deviceImportanceLevel: '', |
| | | deviceAbnormalStatus: 1 |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | let that = this; |
| | | that.visible = true; |
| | | let that = this |
| | | that.visible = true |
| | | //根据屏幕宽度自适应抽屉宽度 |
| | | this.resetScreenSize(); |
| | | this.resetScreenSize() |
| | | |
| | | // that.userId = record.id; |
| | | // console.log(record) |
| | | that.model = Object.assign({}, record); |
| | | that.model = Object.assign({}, record) |
| | | // that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record); |
| | | // this.model = Object.assign({}, record) |
| | | |
| | |
| | | this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedProduction', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort', |
| | | 'driveType', 'sortNo', 'remark','systemVersion','devicePower','controlSystem','saveTableName')) |
| | | }) |
| | | if(record.hasOwnProperty("id")){ |
| | | if (record.hasOwnProperty('id')) { |
| | | // that.getUserRoles(record.id); |
| | | that.getUserDeparts(record.id); |
| | | that.getUserDeparts(record.id) |
| | | } |
| | | // console.log('that.model=',that.model) |
| | | }, |
| | | isDisabledAuth(code){ |
| | | return disabledAuthFilter(code); |
| | | return disabledAuthFilter(code) |
| | | }, |
| | | //窗口最大化切换 |
| | | toggleScreen(){ |
| | | if(this.modaltoggleFlag){ |
| | | this.modalWidth = window.innerWidth; |
| | | this.modalWidth = window.innerWidth |
| | | }else{ |
| | | this.modalWidth = 800; |
| | | this.modalWidth = 800 |
| | | } |
| | | this.modaltoggleFlag = !this.modaltoggleFlag; |
| | | this.modaltoggleFlag = !this.modaltoggleFlag |
| | | }, |
| | | // 根据屏幕变化,设置抽屉尺寸 |
| | | resetScreenSize(){ |
| | | let screenWidth = document.body.clientWidth; |
| | | let screenWidth = document.body.clientWidth |
| | | if(screenWidth < 500){ |
| | | this.drawerWidth = screenWidth; |
| | | this.drawerWidth = screenWidth |
| | | }else{ |
| | | this.drawerWidth = 700; |
| | | this.drawerWidth = 700 |
| | | } |
| | | }, |
| | | getUserDeparts(userid){ |
| | | let that = this; |
| | | let that = this |
| | | //部门的url |
| | | getAction(that.url.userWithDepart,{equipmentId:userid}).then((res)=>{ |
| | | if(res.success){ |
| | | // console.log(res.result) |
| | | let departOptions=[]; |
| | | let departOptions = [] |
| | | let selectDepartKeys=[] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectDepartKeys.push(res.result[i].key); |
| | | selectDepartKeys.push(res.result[i].key) |
| | | //新增负责部门选择下拉框 |
| | | departOptions.push({ |
| | | value: res.result[i].key, |
| | |
| | | }) |
| | | } |
| | | |
| | | that.model.selectedDeparts = selectDepartKeys.join(",") |
| | | that.model.selectedDeparts = selectDepartKeys.join(',') |
| | | // that.model.selectedProduction = selectDepartKeys.join(",") |
| | | |
| | | that.nextDepartOptions=departOptions; |
| | | that.nextDepartOptions = departOptions |
| | | // console.log('that.nextDepartOptions=',that.nextDepartOptions) |
| | | } |
| | | }) |
| | |
| | | getAction(that.url.userProductionList,{equipmentId:userid}).then((res)=>{ |
| | | if(res.success){ |
| | | // console.log(res.result) |
| | | let ProductionOptions=[]; |
| | | let ProductionOptions = [] |
| | | let selectProductKeys=[] |
| | | // console.log(res.result) |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectProductKeys.push(res.result[i].key); |
| | | selectProductKeys.push(res.result[i].key) |
| | | //新增负责部门选择下拉框 |
| | | ProductionOptions.push({ |
| | | value: res.result[i].key, |
| | |
| | | }) |
| | | } |
| | | |
| | | that.model.selectedProduction = selectProductKeys.join(",") |
| | | that.model.selectedProduction = selectProductKeys.join(',') |
| | | |
| | | that.nextProductionOptions=ProductionOptions; |
| | | that.nextProductionOptions = ProductionOptions |
| | | // console.log('that.nextProductionOptions=',that.nextProductionOptions) |
| | | } |
| | | }) |
| | |
| | | }, |
| | | backDepartInfo(info) { |
| | | // console.log(info) |
| | | this.model.departIds = this.model.selectedDeparts; |
| | | this.model.departIds = this.model.selectedDeparts |
| | | this.nextDepartOptions = info.map((item,index,arr)=>{ |
| | | let c = {label:item.text, value: item.value+""} |
| | | return c; |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | // console.log(info) |
| | | this.model.productionIds = this.model.selectedProduction; |
| | | this.model.productionIds = this.model.selectedProduction |
| | | this.nextProductionOptions = info.map((item,index,arr)=>{ |
| | | let c = {label:item.text, value: item.value+""} |
| | | return c; |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | | }, |
| | | |
| | | refresh () { |
| | | this.userId="" |
| | | this.nextDepartOptions=[]; |
| | | this.nextProductionOptions = []; |
| | | this.departIdShow=false; |
| | | this.userId = '' |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.departIdShow = false |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.disableSubmit = false; |
| | | this.nextDepartOptions=[]; |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.disableSubmit = false |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.departIdShow=false; |
| | | this.departIdShow = false |
| | | // this.$refs.form.resetFields(); |
| | | }, |
| | | moment, |
| | | handleDeviceLevelChange() { |
| | | this.model.deviceImportanceLevel = '' |
| | | }, |
| | | handleSubmit () { |
| | | const that = this; |
| | | const that = this |
| | | // 触发表单验证 |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true; |
| | | that.confirmLoading = true |
| | | //如果是上级择传入departIds,否则为空 |
| | | // if(this.model.userIdentity!==2){ |
| | | // this.model.departIds=""; |
| | | // } |
| | | let obj; |
| | | let obj |
| | | if(!this.model.id){ |
| | | this.model.id = this.userId; |
| | | obj=addEquipment(this.model); |
| | | this.model.id = this.userId |
| | | obj = addEquipment(this.model) |
| | | }else{ |
| | | obj=editEquipment(this.model,{ |
| | | id: this.model.id |
| | | }); |
| | | }) |
| | | } |
| | | obj.then((res)=>{ |
| | | if(res.success){ |
| | |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok'); |
| | | }) |
| | | that.$emit('ok') |
| | | }else{ |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | }else{ |
| | | return false; |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | // handleSubmit () { |
| | | // const that = this; |
| | | // // 触发表单验证 |
| | | // this.form.validateFields((err,values) => { |
| | | // if (!err) { |
| | | // that.confirmLoading = true; |
| | | // let formData = Object.assign(this.model, values) |
| | | // let obj; |
| | | // if(!this.model.id){ |
| | | // // this.model.id = this.userId; |
| | | // this.form.resetFields() |
| | | // obj=addEquipment(formData); |
| | | // }else{ |
| | | // this.form.resetFields() |
| | | // obj=editEquipment(formData); |
| | | // // this.$nextTick(() => { |
| | | // // this.form.setFieldsValue(pick(this.model, 'tierType', 'parentName', 'tierNumber', 'tierName', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort', |
| | | // // 'driveType', 'controlSystem', 'sortNo', 'remark','systemVersion','devicePower')) |
| | | // // }) |
| | | // // obj=editEquipment(formData,{ |
| | | // // id: this.model.id |
| | | // // }); |
| | | // } |
| | | // obj.then((res)=>{ |
| | | // if(res.success){ |
| | | // that.$message.success(res.message); |
| | | // that.$emit('ok'); |
| | | // }else{ |
| | | // that.$message.warning(res.message); |
| | | // } |
| | | // }).finally(() => { |
| | | // that.confirmLoading = false; |
| | | // that.close(); |
| | | // }) |
| | | // }else{ |
| | | // return false; |
| | | // } |
| | | // }) |
| | | // }, |
| | | |
| | | // validatequipmentId(rule, value, callback){ |
| | | // if(!value){ |
| | | // callback() |
| | | // }else{ |
| | | // console.log(1111111111111111) |
| | | // var params = { |
| | | // tableName: 'mdc_equipment', |
| | | // fieldName: 'equipment_id', |
| | | // fieldVal: value, |
| | | // // dataId: this.userId |
| | | // }; |
| | | // duplicateCheck(params).then((res) => { |
| | | // if (res.success) { |
| | | // callback() |
| | | // } else { |
| | | // callback("设备编号已存在!") |
| | | // } |
| | | // }) |
| | | // |
| | | // } |
| | | // }, |
| | | |
| | | handleConfirmBlur(e) { |
| | | const value = e.target.value; |
| | | const value = e.target.value |
| | | this.confirmDirty = this.confirmDirty || !!value |
| | | }, |
| | | identityChange(e){ |
| | | if(e.target.value===1){ |
| | | this.departIdShow=false; |
| | | this.departIdShow = false |
| | | }else{ |
| | | this.departIdShow=true; |
| | | this.departIdShow = true |
| | | } |
| | | }, |
| | | /** |
| | |
| | | removeValidate(){ |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | }, |
| | | } |
| | | |
| | | } |
| | | </script> |
| | |
| | | width:104px; |
| | | height:104px; |
| | | } |
| | | |
| | | .ant-upload-select-picture-card i { |
| | | font-size: 49px; |
| | | color: #999; |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-col :md="6" :sm="6" :xs="6"> |
| | | <a-form-item label="驱动类型"> |
| | | <a-select |
| | | :value="queryParams.driveType" |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="设备级别"> |
| | | <a-select |
| | | :value="queryParams.deviceLevel" |
| | | mode="multiple" |
| | | placeholder="请选择设备级别" |
| | | allow-clear |
| | | :maxTagCount="1" |
| | | @change="selectChange($event,'deviceLevel')" |
| | | > |
| | | <a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index"> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="时间"> |
| | | <a-range-picker |
| | | :placeholder="['开始时间', '结束时间']" |
| | | format="YYYY-MM" |
| | | :value="dates" |
| | | :mode="['month', 'month']" |
| | | @panelChange="dateParamChange" |
| | | @change="handleDateChange" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2"> |
| | | <a |
| | | @click="toggleSearchStatus=!toggleSearchStatus" |
| | | @selectstart="$event.preventDefault()" |
| | | style="display: inline-block;height: 32px;line-height: 32px" |
| | | > |
| | | {{ toggleSearchStatus ? '收起' : '展开' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24" v-if="toggleSearchStatus"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="时间"> |
| | | <a-range-picker |
| | | :placeholder="['开始时间', '结束时间']" |
| | | format="YYYY-MM" |
| | | :value="dates" |
| | | :mode="['month', 'month']" |
| | | @panelChange="dateParamChange" |
| | | @change="handleDateChange" |
| | | /> |
| | | <a-form-item label="设备级别"> |
| | | <a-select |
| | | :value="queryParams.deviceLevel" |
| | | mode="multiple" |
| | | placeholder="请选择设备级别" |
| | | allow-clear |
| | | :maxTagCount="1" |
| | | @change="selectChange($event,'deviceLevel')" |
| | | > |
| | | <a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index"> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <!--<a-col :md="5" :sm="5" :xs="5">--> |
| | | <!--<a-form-item label="数据分布">--> |
| | | <!--<a-select--> |
| | | <!--:value="queryParams.deviceLevel"--> |
| | | <!--mode="multiple"--> |
| | | <!--placeholder="请选择数据分布"--> |
| | | <!--allow-clear--> |
| | | <!--:maxTagCount="1"--> |
| | | <!--@change="selectChange($event,'deviceLevel')"--> |
| | | <!-->--> |
| | | <!--<a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index">--> |
| | | <!--{{item.label}}--> |
| | | <!--</a-select-option>--> |
| | | <!--</a-select>--> |
| | | <!--</a-form-item>--> |
| | | <!--</a-col>--> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="重要程度"> |
| | | <a-select |
| | | :value="queryParams.deviceImportanceLevel" |
| | | mode="multiple" |
| | | placeholder="请选择设备重要程度" |
| | | allow-clear |
| | | :maxTagCount="1" |
| | | @change="selectChange($event,'deviceImportanceLevel')" |
| | | > |
| | | <a-select-option v-for="(item,index) in device_importance_level_list" :value="item.value" |
| | | :key="index"> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24" style="margin-bottom: 20px"> |
| | |
| | | equipmentType: [], |
| | | driveType: [], |
| | | deviceLevel: [], |
| | | deviceCategory: [] |
| | | deviceCategory: [], |
| | | deviceImportanceLevel: [] |
| | | }, |
| | | queryParamEquip: {}, |
| | | queryParamPeople: {}, |
| | |
| | | device_level_list: [], |
| | | device_category_list: [], |
| | | scrollY: 465, |
| | | tableLoading: false |
| | | tableLoading: false, |
| | | toggleSearchStatus: false |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | |
| | | this.queryGroup() |
| | | this.initDictData('device_level') |
| | | this.initDictData('device_category') |
| | | this.initDictData('device_importance_level') |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="驱动类型"> |
| | | <a-select |
| | | :value="queryParams.driveType" |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="时间"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates" :allowClear="false"/> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates" |
| | | :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设备种类"> |
| | | <a-select |
| | | :value="queryParams.deviceCategory" |
| | | mode="multiple" |
| | | placeholder="请选择设备种类" |
| | | allow-clear |
| | | :maxTagCount="1" |
| | | @change="selectChange($event,'deviceCategory')" |
| | | > |
| | | <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index"> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2"> |
| | | <a |
| | | @click="toggleSearchStatus=!toggleSearchStatus" |
| | | @selectstart="$event.preventDefault()" |
| | | style="display: inline-block;height: 32px;line-height: 32px" |
| | | > |
| | | {{ toggleSearchStatus ? '收起' : '展开' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24" v-if="toggleSearchStatus"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设备级别"> |
| | | <a-select |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="设备种类"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="重要程度"> |
| | | <a-select |
| | | :value="queryParams.deviceCategory" |
| | | :value="queryParams.deviceImportanceLevel" |
| | | mode="multiple" |
| | | placeholder="请选择设备种类" |
| | | placeholder="请选择设备重要程度" |
| | | allow-clear |
| | | :maxTagCount="1" |
| | | @change="selectChange($event,'deviceCategory')" |
| | | @change="selectChange($event,'deviceImportanceLevel')" |
| | | > |
| | | <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index"> |
| | | <a-select-option v-for="(item,index) in device_importance_level_list" :value="item.value" |
| | | :key="index"> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24" type="flex" align="middle"> |
| | | <a-col :md="24" :sm="24" :xs="24" |
| | | style="display: flex;justify-content: space-between;align-items: flex-start"> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <a-spin :spinning="spinning"> |
| | | <div class="container" id="EfficiencyPO" style="margin-top: 20px;" > |
| | | <div class="table2"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap" v-if="dataList.length>0"> |
| | | <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap" |
| | | v-if="dataList.length>0"> |
| | | <thead> |
| | | <tr class="thead fixed equipname"> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;height: 66px">公司</th> |
| | | <th class="thgu dong1 name" rowspan="2" |
| | | style="min-width: 50px; max-width: 50px;width: 50px;height: 66px">公司 |
| | | </th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">车间</th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">工段</th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备编号</th> |
| | | <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">设备名称</th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备类型</th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备编号 |
| | | </th> |
| | | <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">设备名称 |
| | | </th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备类型 |
| | | </th> |
| | | <!--<th rowspan="2">组别</th>--> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> |
| | |
| | | <tbody> |
| | | <tr class="mathData" v-for="(item, index) in dataList"> |
| | | <template v-if="item.level1!=='合计'&&item.level1!=='平均值'"> |
| | | <td class="tdgu kaitou" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis"> |
| | | <td class="tdgu kaitou" :rowspan="item.level1span" |
| | | :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis"> |
| | | <div class="wenzi"> |
| | | {{item.level1}} |
| | | </div> |
| | | </td> |
| | | <td class="tdgu1 kaitou" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis"> |
| | | <td class="tdgu1 kaitou" :rowspan="item.level2span" |
| | | :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis"> |
| | | <div class="wenzi"> |
| | | {{item.level2}} |
| | | </div> |
| | | </td> |
| | | <td class="tdgu2 kaitou" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis"> |
| | | <td class="tdgu2 kaitou" :rowspan="item.level3span" |
| | | :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis"> |
| | | <div class="wenzi"> |
| | | {{item.level3}} |
| | | </div> |
| | | </td> |
| | | <td class="tdgu3 kaitou">{{item.equipmentId}}</td> |
| | | <td style="min-width: 162px; max-width: 162px;width: 162px;" class="tdgu4 kaitou">{{item.equipmentName}}</td> |
| | | <td style="min-width: 162px; max-width: 162px;width: 162px;" class="tdgu4 kaitou"> |
| | | {{item.equipmentName}} |
| | | </td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | </template> |
| | | |
| | |
| | | <td colspan="6" class="tdgu kaitou">{{item.level1}}</td> |
| | | </template> |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('lyl') > -1">{{tableHead.startRate | numFilter}}</td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('lyl') > -1"> |
| | | {{tableHead.startRate | numFilter}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1"> |
| | | {{tableHead.openRate | numFilter}} |
| | | </td> |
| | |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | typeTree:"", |
| | | typeTree: '', |
| | | typeParent:1, |
| | | typeEquipment:1, |
| | | dates: [], |
| | |
| | | equipmentType: [], |
| | | driveType: [], |
| | | deviceLevel: [], |
| | | deviceCategory: [] |
| | | deviceCategory: [], |
| | | deviceImportanceLevel: [] |
| | | }, |
| | | queryParamEquip:{}, |
| | | queryParamPeople:{}, |
| | |
| | | queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' |
| | | }, |
| | | tableHeads: [], |
| | | spinning:false |
| | | spinning: false, |
| | | toggleSearchStatus: false |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type:'',nodePeople: ''}, |
| | |
| | | this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)] |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = "1" |
| | | this.queryParam.typeTree = '1' |
| | | this.loadData() |
| | | this.queryGroup() |
| | | this.getDriveTypeByApi() |
| | | this.initDictData('device_level') |
| | | this.initDictData('device_category') |
| | | this.initDictData('device_importance_level') |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | |
| | | }, |
| | | watch: { |
| | | Type(valmath){ |
| | | this.dataList = []; |
| | | this.dataList = [] |
| | | this.queryParam.typeTree = valmath |
| | | }, |
| | | nodeTree(val) { //监听currSelected 变化,将变化后的数值传递给 getCurrSelected 事件 |
| | |
| | | } else { |
| | | return '0' |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | initDictData(dictCode) { |
| | |
| | | this.queryParams[key] = value |
| | | }, |
| | | checkSameData(dataList){ |
| | | let cache = {}; //存储的是键是kclx 的值,值是kclx 在indeces中数组的下标 |
| | | let indices = []; //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标 |
| | | let cache = {} //存储的是键是kclx 的值,值是kclx 在indeces中数组的下标 |
| | | let indices = [] //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标 |
| | | dataList.map((item,index)=>{ |
| | | let level1 = item.level1; |
| | | let _index = cache[level1]; |
| | | let level1 = item.level1 |
| | | let _index = cache[level1] |
| | | if(_index!==undefined){ |
| | | indices[_index].push(index) |
| | | }else{ |
| | |
| | | indices.push([index]) |
| | | } |
| | | }) |
| | | let result = []; |
| | | let result = [] |
| | | indices.map((item)=>{ |
| | | item.map((index)=>{ |
| | | result.push(dataList[index]) |
| | |
| | | this.dataList = result |
| | | }, |
| | | checkSameData1(dataList){ |
| | | let cache = {}; //存储的是键是kclx 的值,值是kclx 在indeces中数组的下标 |
| | | let indices = []; //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标 |
| | | let cache = {} //存储的是键是kclx 的值,值是kclx 在indeces中数组的下标 |
| | | let indices = [] //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标 |
| | | dataList.map((item,index)=>{ |
| | | let level2 = item.level2; |
| | | let _index = cache[level2]; |
| | | let level2 = item.level2 |
| | | let _index = cache[level2] |
| | | if(_index!==undefined){ |
| | | indices[_index].push(index) |
| | | }else{ |
| | |
| | | indices.push([index]) |
| | | } |
| | | }) |
| | | let result = []; |
| | | let result = [] |
| | | indices.map((item)=>{ |
| | | item.map((index)=>{ |
| | | result.push(dataList[index]) |
| | |
| | | this.dataList = result |
| | | }, |
| | | checkSameData2(dataList){ |
| | | let cache = {}; //存储的是键是kclx 的值,值是kclx 在indeces中数组的下标 |
| | | let indices = []; //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标 |
| | | let cache = {} //存储的是键是kclx 的值,值是kclx 在indeces中数组的下标 |
| | | let indices = [] //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标 |
| | | dataList.map((item,index)=>{ |
| | | let level3 = item.level3; |
| | | let _index = cache[level3]; |
| | | let level3 = item.level3 |
| | | let _index = cache[level3] |
| | | if(_index!==undefined){ |
| | | indices[_index].push(index) |
| | | }else{ |
| | |
| | | indices.push([index]) |
| | | } |
| | | }) |
| | | let result = []; |
| | | let result = [] |
| | | indices.map((item)=>{ |
| | | item.map((index)=>{ |
| | | result.push(dataList[index]) |
| | |
| | | // 合并 |
| | | combineCell() { |
| | | console.log(this.dataList) |
| | | let list =this.dataList; |
| | | let list = this.dataList |
| | | for (let field in list[0]) { |
| | | var k = 0; |
| | | var k = 0 |
| | | while (k < list.length) { |
| | | list[k][field + 'span'] = 1; |
| | | list[k][field + 'dis'] = false; |
| | | list[k][field + 'span'] = 1 |
| | | list[k][field + 'dis'] = false |
| | | for (var i = k + 1; i <= list.length - 1; i++) { |
| | | if (list[k][field] == list[i][field] && list[k][field] != '') { |
| | | list[k][field + 'span']++; |
| | | list[k][field + 'dis'] = false; |
| | | list[i][field + 'span'] = 1; |
| | | list[i][field + 'dis'] = true; |
| | | list[k][field + 'span']++ |
| | | list[k][field + 'dis'] = false |
| | | list[i][field + 'span'] = 1 |
| | | list[i][field + 'dis'] = true |
| | | } else { |
| | | break; |
| | | break |
| | | } |
| | | } |
| | | k = i; |
| | | k = i |
| | | } |
| | | } |
| | | return list; |
| | | return list |
| | | }, |
| | | disabledDate(current){ |
| | | //Can not slect days before today and today |
| | | return current && current > moment().subtract('days', 1); |
| | | return current && current > moment().subtract('days', 1) |
| | | }, |
| | | initDeviceType(deviceList) { |
| | | let dictCode = 'mdc_equipmentType' |
| | |
| | | } |
| | | }, |
| | | exportExcel() { |
| | | $("#EfficiencyPO").table2excel({ |
| | | exclude: ".noExl", |
| | | name: "Excel Document Name", |
| | | filename: "设备开动率", |
| | | $('#EfficiencyPO').table2excel({ |
| | | exclude: '.noExl', |
| | | name: 'Excel Document Name', |
| | | filename: '设备开动率', |
| | | exclude_img: true, |
| | | fileext: ".xls", |
| | | fileext: '.xls', |
| | | exclude_links: true, |
| | | exclude_inputs: true |
| | | }); |
| | | }) |
| | | }, |
| | | showIdentifying() { |
| | | getAction(this.url.listByType, { type: 'kdl' }).then(res => { |
| | |
| | | this.checkedList = checkedList |
| | | }, |
| | | searchQuery() { |
| | | if(this.queryParam.typeTree == "1"){ |
| | | if (this.queryParam.typeTree == '1') { |
| | | this.queryParam.parentId = this.queryParamEquip.parentId |
| | | this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | }else{ |
| | | this.queryParam.parentId = this.queryParamPeople.parentId |
| | | this.queryParam.equipmentId = "" |
| | | this.queryParam.equipmentId = '' |
| | | } |
| | | Object.keys(this.queryParams).forEach(item => { |
| | | this.queryParam[item] = this.queryParams[item].join() |
| | |
| | | deviceLevel: [], |
| | | deviceCategory: [] |
| | | } |
| | | this.loadData(); |
| | | this.loadData() |
| | | }, |
| | | loadData() { |
| | | this.spinning=true |
| | |
| | | this.checkSameData(this.dataList) |
| | | this.checkSameData1(this.dataList) |
| | | this.checkSameData2(this.dataList) |
| | | this.combineCell(); |
| | | this.combineCell() |
| | | // this.initDeviceType(this.dataList) |
| | | } |
| | | }).finally(()=>{ |
| | |
| | | z-index: 5; |
| | | left: 50px; |
| | | } |
| | | |
| | | |
| | | .table2 thead .equipname .dong3{ |
| | | z-index: 5; |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="驱动类型"> |
| | | <a-select |
| | | :value="queryParams.driveType" |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="时间"> |
| | | <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" |
| | | v-model="dates" :allowClear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设备种类"> |
| | | <a-select |
| | | :value="queryParams.deviceCategory" |
| | | mode="multiple" |
| | | placeholder="请选择设备种类" |
| | | allow-clear |
| | | :maxTagCount="1" |
| | | @change="selectChange($event,'deviceCategory')" |
| | | > |
| | | <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index"> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2"> |
| | | <a |
| | | @click="toggleSearchStatus=!toggleSearchStatus" |
| | | @selectstart="$event.preventDefault()" |
| | | style="display: inline-block;height: 32px;line-height: 32px" |
| | | > |
| | | {{ toggleSearchStatus ? '收起' : '展开' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24" v-if="toggleSearchStatus"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设备级别"> |
| | | <a-select |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设备种类"> |
| | | <a-form-item label="重要程度"> |
| | | <a-select |
| | | :value="queryParams.deviceCategory" |
| | | :value="queryParams.deviceImportanceLevel" |
| | | mode="multiple" |
| | | placeholder="请选择设备种类" |
| | | placeholder="请选择设备重要程度" |
| | | allow-clear |
| | | :maxTagCount="1" |
| | | @change="selectChange($event,'deviceCategory')" |
| | | @change="selectChange($event,'deviceImportanceLevel')" |
| | | > |
| | | <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index"> |
| | | <a-select-option v-for="(item,index) in device_importance_level_list" :value="item.value" |
| | | :key="index"> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | |
| | | </th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备类型 |
| | | </th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备型号 |
| | | </th> |
| | | <!--<th rowspan="2">组别</th>--> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> |
| | |
| | | {{item.equipmentName}} |
| | | </td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentModel}}</td> |
| | | </template> |
| | | |
| | | <!--合计与平均值区域--> |
| | | <template v-else> |
| | | <td colspan="6" class="tdgu kaitou">{{item.level1}}</td> |
| | | <td colspan="7" class="tdgu kaitou">{{item.level1}}</td> |
| | | </template> |
| | | |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | |
| | | equipmentType: [], |
| | | driveType: [], |
| | | deviceLevel: [], |
| | | deviceCategory: [] |
| | | deviceCategory: [], |
| | | deviceImportanceLevel: [] |
| | | }, |
| | | queryParamEquip: {}, |
| | | queryParamPeople: {}, |
| | |
| | | processLongRowAverage: '', |
| | | waitLongRowAverage: '', |
| | | closeLongRowAverage: '', |
| | | spinning: false |
| | | spinning: false, |
| | | toggleSearchStatus: false |
| | | } |
| | | }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | |
| | | this.getDriveTypeByApi() |
| | | this.initDictData('device_level') |
| | | this.initDictData('device_category') |
| | | this.initDictData('device_importance_level') |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | |
| | | |
| | | <a-row :gutter="24" v-if="toggleSearchStatus"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设备种类"> |
| | | <a-select |
| | | :value="queryParams.deviceCategory" |
| | | mode="multiple" |
| | | placeholder="请选择设备种类" |
| | | allow-clear |
| | | :maxTagCount="1" |
| | | @change="selectChange($event,'deviceCategory')" |
| | | > |
| | | <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index"> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设备级别"> |
| | | <a-select |
| | | :value="queryParams.deviceLevel" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="设备种类"> |
| | | <a-form-item label="重要程度"> |
| | | <a-select |
| | | :value="queryParams.deviceCategory" |
| | | :value="queryParams.deviceImportanceLevel" |
| | | mode="multiple" |
| | | placeholder="请选择设备种类" |
| | | placeholder="请选择设备重要程度" |
| | | allow-clear |
| | | :maxTagCount="1" |
| | | @change="selectChange($event,'deviceCategory')" |
| | | @change="selectChange($event,'deviceImportanceLevel')" |
| | | > |
| | | <a-select-option v-for="(item,index) in device_category_list" :value="item.value" :key="index"> |
| | | <a-select-option v-for="(item,index) in device_importance_level_list" :value="item.value" |
| | | :key="index"> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | |
| | | </a-form> |
| | | </div> |
| | | </div> |
| | | |
| | | <a-spin :spinning="spinning"> |
| | | <div class="container" id="EfficiencyShift" style="margin-top: 20px;"> |
| | | <div class="table2"> |
| | |
| | | v-if="dataList.length>0"> |
| | | <thead> |
| | | <tr class="thead fixed equipname"> |
| | | <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;height: 66px">公司</th> |
| | | <th class="thgu dong1 name" rowspan="2" |
| | | style="min-width: 50px; max-width: 50px;width: 50px;height: 66px">公司 |
| | | </th> |
| | | <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">车间</th> |
| | | <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">工段</th> |
| | | <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备编号 |
| | |
| | | </template> |
| | | <!--<td>{{item.tierType}}</td>--> |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('lyl') > -1">{{tableHead.utilizationRate | numFilter}}</td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('lyl') > -1"> |
| | | {{tableHead.utilizationRate | numFilter}} |
| | | </td> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1"> |
| | | {{tableHead.openLong | getFormattedTime}} |
| | | </td> |
| | |
| | | driveTypeList: [], |
| | | device_level_list: [], |
| | | device_category_list: [], |
| | | device_importance_level_list: [], |
| | | identifying: [], |
| | | queryParam: {}, |
| | | queryParams: { |
| | | equipmentType: [], |
| | | driveType: [], |
| | | deviceLevel: [], |
| | | deviceCategory: [] |
| | | deviceCategory: [], |
| | | deviceImportanceLevel: [] |
| | | }, |
| | | queryParamEquip: {}, |
| | | queryParamPeople: {}, |
| | |
| | | this.getDriveTypeByApi() |
| | | this.initDictData('device_level') |
| | | this.initDictData('device_category') |
| | | this.initDictData('device_importance_level') |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | |
| | | default() { |
| | | return true |
| | | } |
| | | }, |
| | | filterAbnormalDeviceKey: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | queryTreeData() { |
| | | this.loading = true |
| | | this.cardLoading = true |
| | | this.QueryProduction().then(res => { |
| | | this.QueryProduction(this.filterAbnormalDeviceKey).then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |
| | | this.allTreeKeys = [] |
| | |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | description: '请选择一条记录' |
| | | }) |
| | | return |
| | | } else { |
| | | var that = this |
| | |
| | | deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.queryTreeData(); |
| | | that.queryTreeData() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | |
| | | } |
| | | }, |
| | | modalFormOk(val) { |
| | | console.log("mmm") |
| | | console.log('mmm') |
| | | // 新增/修改 成功时,重载列表 |
| | | this.queryTreeData() |
| | | // 新增/修改 成功时,重载列表 |
| | |
| | | watch: { |
| | | currSelected(val) { //监听currSelected 变化,将变化后的数值传递给 getCurrSelected 事件 |
| | | this.$emit('getCurrSelected', val) |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | height: 748px!important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px){ |
| | | .tree_con{ |
| | | height: 748px!important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px){ |
| | | .tree_con{ |
| | | height: 600px!important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px){ |
| | | .tree_con{ |
| | | height: 501px!important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (max-width: 1280px){ |
| | | .tree_con{ |
| | | height: 501px!important; |
| | |
| | | |
| | | devServer: { |
| | | port: 3000, |
| | | open: true, |
| | | proxy: { |
| | | /* '/api': { |
| | | target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro', //mock API接口系统 |