1、全局树组件多选设备抽屉组件增加点击树节点名称也可以选中当前节点
2、设备监控页面布局图查看设备详情时首次进入清空上一次设备信息(由于数据为定时刷新不能每次获取数据均清空)
3、设备类型管理页面调整设备类型图片尺寸以解决表格错行问题
4、设备管理页面添加或编辑设备弹窗选择设备时增加点击行即可选中
| | |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="设备组编号" :labelCol="labelColLong" :wrapperCol="wrapperColLong" |
| | | prop="equipmentIds"> |
| | | <a-input-search v-model="model.equipmentIds" :disabled="!model.productionId" @search="deviceSearch" |
| | | <a-input-search v-model="model.equipmentIds" readOnly :disabled="!model.productionId" @search="deviceSearch" |
| | | enter-button :placeholder='!model.productionId?"请选择车间":"请选择设备组编号"'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | ], |
| | | equipmentIds: [ |
| | | { |
| | | required: true, message: '请选择设备编号!' |
| | | required: true, message: '请选择设备编号!',trigger:'change' |
| | | } |
| | | ] |
| | | }, |
| | |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys,selectedRows:selectionRows, onChange: onSelectChange}" |
| | | @change="handleTableChange" :customRow="customRow" |
| | | :scroll="{y:456}" :size="size" rowKey="docId"> |
| | | :scroll="{y:52*7}" :size="size" rowKey="docId"> |
| | | |
| | | <!-- 字符串超长截取省略号显示--> |
| | | <span slot="docName" slot-scope="text"> |
| | |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <!--<a-col--> |
| | | <!--:xl="4"--> |
| | | <!--:lg="4"--> |
| | | <!--:md="4"--> |
| | | <!--:sm="24"--> |
| | | <!-->--> |
| | | <!--<a-form-item label="设备编号">--> |
| | | <!--<a-input--> |
| | | <!--placeholder="请输入设备编号"--> |
| | | <!--v-model="queryParam.equipmentId"--> |
| | | <!--></a-input>--> |
| | | <!--</a-form-item>--> |
| | | <!--</a-col>--> |
| | | <!--<a-col--> |
| | | <!--:xl="4"--> |
| | | <!--:lg="4"--> |
| | | <!--:md="4"--> |
| | | <!--:sm="24"--> |
| | | <!-->--> |
| | | <!--<a-form-item label="设备名称">--> |
| | | <!--<a-input--> |
| | | <!--placeholder="请输入设备名称"--> |
| | | <!--v-model="queryParam.equipmentName"--> |
| | | <!--></a-input>--> |
| | | <!--</a-form-item>--> |
| | | <!--</a-col>--> |
| | | <a-col |
| | | :xl="6" |
| | | :lg="7" |
| | |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="控制系统类型"> |
| | | <!--<j-dict-select-tag--> |
| | | <!--placeholder="请选择控制系统类型"--> |
| | | <!--v-model="queryParam.driveType"--> |
| | | <!--dictCode="mdc_driveType"--> |
| | | <!--/>--> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >重置</a-button> |
| | | <!--<a--> |
| | | <!--@click="handleToggleSearch"--> |
| | | <!--style="margin-left: 8px"--> |
| | | <!-->--> |
| | | <!--{{ toggleSearchStatus ? '收起' : '展开' }}--> |
| | | <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'" />--> |
| | | <!--</a>--> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | type="primary" |
| | | icon="plus" |
| | | >新增</a-button> |
| | | <!--<a-button--> |
| | | <!--@click="handleAdd"--> |
| | | <!--type="primary"--> |
| | | <!--icon="plus"--> |
| | | <!-->设备新增</a-button>--> |
| | | <!--<a-upload--> |
| | | <!--name="file"--> |
| | | <!--:showUploadList="false"--> |
| | | <!--:multiple="false"--> |
| | | <!--:headers="tokenHeader"--> |
| | | <!--:action="importExcelUrl"--> |
| | | <!--@change="handleImportExcel"--> |
| | | <!-->--> |
| | | <!--<a-button--> |
| | | <!--type="primary"--> |
| | | <!--icon="import"--> |
| | | <!-->导入</a-button>--> |
| | | <!--</a-upload>--> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item |
| | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <!--<alarm-manager-modal ref="modalForm" @ok="modalFormOk"></alarm-manager-modal>--> |
| | | <alarm-manager-form ref="modalFormType" @ok="modalFormOk" :driveTypeList="driveTypeList" :filterOption="filterOption"></alarm-manager-form> |
| | | <alarm-manager-edit ref="modalFormEdit" @ok="modalFormOk"></alarm-manager-edit> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | // import MdcDriveTypeParamConfigModal from './modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigModal' |
| | | import AlarmManagerModal from './modules/alarmManager/alarmManagerModal' |
| | | import AlarmManagerForm from './modules/alarmManager/alarmManagerForm' |
| | | import AlarmManagerEdit from './modules/alarmManager/alarmManagerEdit' |
| | |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | // { |
| | | // title: '设备编号', |
| | | // align: "center", |
| | | // // sorter: true, |
| | | // dataIndex: 'equipmentId' |
| | | // }, |
| | | // { |
| | | // title: '设备名称', |
| | | // align: "center", |
| | | // // sorter: true, |
| | | // dataIndex: 'equipmentName' |
| | | // }, |
| | | { |
| | | title: '报警号', |
| | | align: "center", |
| | | // sorter: true, |
| | | dataIndex: 'alarmCode', |
| | | width:400 |
| | | }, |
| | | { |
| | | title: '报警内容', |
| | | align: "center", |
| | | // sorter: true, |
| | | dataIndex: 'alarmContent', |
| | | width:400 |
| | | }, |
| | |
| | | { |
| | | title: '设备驱动类型', |
| | | align: "center", |
| | | // sorter: true, |
| | | dataIndex: 'driveType', |
| | | width:400 |
| | | }, |
| | | // { |
| | | // title: '是否过滤', |
| | | // align: "center", |
| | | // dataIndex: 'isUse', |
| | | // customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isUse'], text) : ''), |
| | | // }, |
| | | { |
| | | dataIndex:'isUse_dictText', |
| | | title: '是否启用', |
| | | align: "center", |
| | | width:380 |
| | | // dictCode:'alarm_is_use' |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | this.getSuperFieldList(); |
| | | this.getDriveTypeByApi() |
| | | }, |
| | | computed: { |
| | | // importExcelUrl: function () { |
| | | // return `${window._CONFIG['domianURL']}${this.url.importExcelUrl}`; |
| | | // }, |
| | | }, |
| | | methods: { |
| | | handleEdit: function (record) { |
| | | this.$refs.modalFormEdit.edit(record); |
| | |
| | | this.$refs.modalFormType.add(); |
| | | this.$refs.modalFormType.title = "新增"; |
| | | this.$refs.modalFormType.disableSubmit = false |
| | | }, |
| | | initDictConfig() { |
| | | }, |
| | | getSuperFieldList() { |
| | | let fieldList = []; |
| | |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :scroll="{x:'max-content',y:465}" |
| | | :columns="columns" |
| | |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <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="handleToggleSearch" style="margin-left: 8px">--> |
| | | <!--{{ toggleSearchStatus ? '收起' : '展开' }}--> |
| | | <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>--> |
| | | <!--</a>--> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <!--<a-button type="primary" icon="download" @click="handleExportXls('设备类型')">导出</a-button>--> |
| | | <!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> |
| | | <!--<a-button type="primary" icon="import">导入</a-button>--> |
| | | <!--</a-upload>--> |
| | | <!-- 高级查询区域 --> |
| | | <!--<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> |
| | |
| | | @change="handleTableChange" |
| | | :scroll="{x:'max-content',y:465}" |
| | | > |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text,record"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | 下载 |
| | | </a-button> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="20" alt="" style="max-width:80px;"/> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | |
| | | |
| | | <a-descriptions |
| | | title="运行数据" |
| | | v-show="runData" |
| | | v-if="resultData.driveType != 'PLC'" |
| | | v-if="runData&&runData.length>0&&resultData.driveType != 'PLC'" |
| | | :column="4" |
| | | class="operationData" |
| | | > |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getAction, |
| | | postAction |
| | | } from '@/api/manage' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | import { |
| | | getAction, |
| | | postAction |
| | | } from '@/api/manage' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | | name: 'EquipmentDetailModal', |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | runData: [], |
| | | // xyzAliasesList: [], |
| | | //主轴倍率 |
| | | spindlebeilv: 0, |
| | | //进给倍率 |
| | | feedbeilv: 0, |
| | | // 主轴负荷 |
| | | spindleload: 0, |
| | | //快速进给倍率 |
| | | rapidfeed: 0, |
| | | visible: false, |
| | | resultData: {}, |
| | | url: { |
| | | mdcEquipmentDetailedInfo: '/mdc/mdcEquipment/mdcEquipmentDetailedInfo' |
| | | export default { |
| | | name: 'EquipmentDetailModal', |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | runData: [], |
| | | // xyzAliasesList: [], |
| | | //主轴倍率 |
| | | spindlebeilv: null, |
| | | //进给倍率 |
| | | feedbeilv: null, |
| | | // 主轴负荷 |
| | | spindleload: null, |
| | | //快速进给倍率 |
| | | rapidfeed: null, |
| | | visible: false, |
| | | resultData: {}, |
| | | url: { |
| | | mdcEquipmentDetailedInfo: '/mdc/mdcEquipment/mdcEquipmentDetailedInfo' |
| | | }, |
| | | modalTimer: null, |
| | | xyzList: null |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.modalTimer) |
| | | this.modalTimer = null |
| | | }, |
| | | methods: { |
| | | drawLine() { |
| | | let _this = this |
| | | if (_this.spindlebeilv) { |
| | | //基于准备好的dom,初始化echarts实例 |
| | | let mdcEquiMoniGauge1 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge1'), 'macarons') |
| | | let mdcEquiMoniGaugeOption1 = { |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | |
| | | series: [{ |
| | | name: '外部线', |
| | | type: 'gauge', |
| | | radius: '65%', // 动态 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#31F3FF'] // 动态 |
| | | ], |
| | | width: 1 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { //标题 |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '外部刻度', |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | min: 0, //最小刻度 |
| | | max: 300, //最大刻度 |
| | | splitNumber: 10, //刻度数量 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: [ |
| | | [1, 'rgba(0,0,0,0)'] |
| | | ] |
| | | } |
| | | }, //仪表盘轴线 |
| | | axisLabel: { |
| | | show: true, |
| | | color: '#31F3FF', |
| | | fontSize: 10, // 动态 |
| | | distance: -20 // 动态 |
| | | |
| | | }, //刻度标签。 |
| | | axisTick: { |
| | | show: false |
| | | }, //刻度样式 |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部宽线条', |
| | | type: 'gauge', |
| | | radius: '55%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部细线条', |
| | | type: 'gauge', |
| | | radius: '40%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 3 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '间隔条形', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 4, |
| | | splitNumber: 35, |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | opacity: 0 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | | color: '#122B3C', |
| | | width: 1 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '数据', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 3, |
| | | startAngle: 225, |
| | | max: 300, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [_this.spindlebeilv / 300, '#31F3FF'], // 动态 |
| | | [1, '#185363'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: true, |
| | | fontWeight: 'bold', |
| | | fontSize: 12, |
| | | color: '#fff' |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | | value: _this.spindlebeilv |
| | | }] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环', |
| | | 'type': 'pie', |
| | | 'radius': ['4%', '2%'], |
| | | 'hoverAnimation': false, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | cursor: 'default', |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环2', |
| | | 'type': 'pie', |
| | | 'radius': '2%', |
| | | 'hoverAnimation': false, |
| | | cursor: 'default', |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#31F3FF' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | } |
| | | ] |
| | | } |
| | | mdcEquiMoniGauge1.setOption(mdcEquiMoniGaugeOption1) |
| | | } |
| | | if (_this.feedbeilv) { |
| | | let mdcEquiMoniGauge2 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge2'), 'macarons') |
| | | let mdcEquiMoniGaugeOption2 = { |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | |
| | | series: [{ |
| | | name: '外部线', |
| | | type: 'gauge', |
| | | radius: '65%', // 动态 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#31F3FF'] // 动态 |
| | | ], |
| | | width: 1 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { //标题 |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '外部刻度', |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | min: 0, //最小刻度 |
| | | max: 300, //最大刻度 |
| | | splitNumber: 10, //刻度数量 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: [ |
| | | [1, 'rgba(0,0,0,0)'] |
| | | ] |
| | | } |
| | | }, //仪表盘轴线 |
| | | axisLabel: { |
| | | show: true, |
| | | color: '#31F3FF', |
| | | fontSize: 10, // 动态 |
| | | distance: -20 // 动态 |
| | | |
| | | }, //刻度标签。 |
| | | axisTick: { |
| | | show: false |
| | | }, //刻度样式 |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部宽线条', |
| | | type: 'gauge', |
| | | radius: '55%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部细线条', |
| | | type: 'gauge', |
| | | radius: '40%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 3 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '间隔条形', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 4, |
| | | splitNumber: 35, |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | opacity: 0 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | | color: '#122B3C', |
| | | width: 1 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '数据', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 3, |
| | | startAngle: 225, |
| | | max: 300, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [_this.feedbeilv / 300, '#31F3FF'], // 动态 |
| | | [1, '#185363'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: true, |
| | | fontWeight: 'bold', |
| | | fontSize: 12, |
| | | color: '#fff' |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | | value: _this.feedbeilv |
| | | }] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环', |
| | | 'type': 'pie', |
| | | 'radius': ['4%', '2%'], |
| | | 'hoverAnimation': false, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | cursor: 'default', |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环2', |
| | | 'type': 'pie', |
| | | 'radius': '2%', |
| | | 'hoverAnimation': false, |
| | | cursor: 'default', |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#31F3FF' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | } |
| | | ] |
| | | } |
| | | mdcEquiMoniGauge2.setOption(mdcEquiMoniGaugeOption2) |
| | | } |
| | | if (_this.spindleload) { |
| | | let mdcEquiMoniGauge3 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge3'), 'macarons') |
| | | let mdcEquiMoniGaugeOption3 = { |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | |
| | | series: [{ |
| | | name: '外部线', |
| | | type: 'gauge', |
| | | radius: '65%', // 动态 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#31F3FF'] // 动态 |
| | | ], |
| | | width: 1 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { //标题 |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '外部刻度', |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | min: 0, //最小刻度 |
| | | max: 100, //最大刻度 |
| | | splitNumber: 10, //刻度数量 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: [ |
| | | [1, 'rgba(0,0,0,0)'] |
| | | ] |
| | | } |
| | | }, //仪表盘轴线 |
| | | axisLabel: { |
| | | show: true, |
| | | color: '#31F3FF', |
| | | fontSize: 10, // 动态 |
| | | distance: -20 // 动态 |
| | | |
| | | }, //刻度标签。 |
| | | axisTick: { |
| | | show: false |
| | | }, //刻度样式 |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部宽线条', |
| | | type: 'gauge', |
| | | radius: '55%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部细线条', |
| | | type: 'gauge', |
| | | radius: '40%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 3 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '间隔条形', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 4, |
| | | splitNumber: 35, |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | opacity: 0 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | | color: '#122B3C', |
| | | width: 1 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '数据', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 3, |
| | | startAngle: 225, |
| | | max: 100, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [_this.spindleload / 100, '#31F3FF'], // 动态 |
| | | [1, '#185363'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: true, |
| | | fontWeight: 'bold', |
| | | fontSize: 12, |
| | | color: '#fff' |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | | value: _this.spindleload |
| | | }] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环', |
| | | 'type': 'pie', |
| | | 'radius': ['4%', '2%'], |
| | | 'hoverAnimation': false, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | cursor: 'default', |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环2', |
| | | 'type': 'pie', |
| | | 'radius': '2%', |
| | | 'hoverAnimation': false, |
| | | cursor: 'default', |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#31F3FF' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | } |
| | | ] |
| | | } |
| | | mdcEquiMoniGauge3.setOption(mdcEquiMoniGaugeOption3) |
| | | } |
| | | if (_this.rapidfeed) { |
| | | let mdcEquiMoniGauge4 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge4'), 'macarons') |
| | | let mdcEquiMoniGaugeOption4 = { |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | |
| | | series: [{ |
| | | name: '外部线', |
| | | type: 'gauge', |
| | | radius: '65%', // 动态 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#31F3FF'] // 动态 |
| | | ], |
| | | width: 1 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { //标题 |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '外部刻度', |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | min: 0, //最小刻度 |
| | | max: 300, //最大刻度 |
| | | splitNumber: 10, //刻度数量 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: [ |
| | | [1, 'rgba(0,0,0,0)'] |
| | | ] |
| | | } |
| | | }, //仪表盘轴线 |
| | | axisLabel: { |
| | | show: true, |
| | | color: '#31F3FF', |
| | | fontSize: 10, // 动态 |
| | | distance: -20 // 动态 |
| | | |
| | | }, //刻度标签。 |
| | | axisTick: { |
| | | show: false |
| | | }, //刻度样式 |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部宽线条', |
| | | type: 'gauge', |
| | | radius: '55%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部细线条', |
| | | type: 'gauge', |
| | | radius: '40%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 3 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '间隔条形', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 4, |
| | | splitNumber: 35, |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | opacity: 0 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | | color: '#122B3C', |
| | | width: 1 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '数据', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 3, |
| | | startAngle: 225, |
| | | max: 300, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [_this.rapidfeed / 300, '#31F3FF'], // 动态 |
| | | [1, '#185363'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: true, |
| | | fontWeight: 'bold', |
| | | fontSize: 12, |
| | | color: '#fff' |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | | value: _this.rapidfeed |
| | | }] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环', |
| | | 'type': 'pie', |
| | | 'radius': ['4%', '2%'], |
| | | 'hoverAnimation': false, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | cursor: 'default', |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环2', |
| | | 'type': 'pie', |
| | | 'radius': '2%', |
| | | 'hoverAnimation': false, |
| | | cursor: 'default', |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#31F3FF' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | } |
| | | ] |
| | | } |
| | | mdcEquiMoniGauge4.setOption(mdcEquiMoniGaugeOption4) |
| | | } |
| | | }, |
| | | modalTimer: null, |
| | | xyzList: null |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.modalTimer) |
| | | this.modalTimer = null |
| | | }, |
| | | methods: { |
| | | drawLine() { |
| | | let _this = this |
| | | if (_this.spindlebeilv) { |
| | | //基于准备好的dom,初始化echarts实例 |
| | | let mdcEquiMoniGauge1 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge1'), 'macarons') |
| | | let mdcEquiMoniGaugeOption1 = { |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | clearInterval(this.modalTimer) |
| | | this.modalTimer = null |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | clearInterval(this.modalTimer) |
| | | this.modalTimer = null |
| | | }, |
| | | timerModel(id) { |
| | | this.modalTimer = setInterval(() => { |
| | | setTimeout(this.initData(id), 0) |
| | | }, 1000 * 4) |
| | | }, |
| | | |
| | | series: [{ |
| | | name: '外部线', |
| | | type: 'gauge', |
| | | radius: '65%', // 动态 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#31F3FF'] // 动态 |
| | | ], |
| | | width: 1 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { //标题 |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '外部刻度', |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | min: 0, //最小刻度 |
| | | max: 300, //最大刻度 |
| | | splitNumber: 10, //刻度数量 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: [ |
| | | [1, 'rgba(0,0,0,0)'] |
| | | ] |
| | | } |
| | | }, //仪表盘轴线 |
| | | axisLabel: { |
| | | show: true, |
| | | color: '#31F3FF', |
| | | fontSize: 10, // 动态 |
| | | distance: -20 // 动态 |
| | | initData(id) { |
| | | let _this = this |
| | | this.visible = true |
| | | getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | _this.resultData = res.result.equipment |
| | | _this.spindlebeilv = res.result.spindlebeilv |
| | | _this.feedbeilv = res.result.feedbeilv |
| | | _this.spindleload = res.result.spindleload |
| | | _this.rapidfeed = res.result.rapidfeed |
| | | _this.runData = res.result.runData |
| | | _this.xyzList = res.result.xyzList |
| | | |
| | | }, //刻度标签。 |
| | | axisTick: { |
| | | show: false |
| | | }, //刻度样式 |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部宽线条', |
| | | type: 'gauge', |
| | | radius: '55%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部细线条', |
| | | type: 'gauge', |
| | | radius: '40%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 3 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '间隔条形', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 4, |
| | | splitNumber: 35, |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | opacity: 0 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | | color: '#122B3C', |
| | | width: 1 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '数据', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 3, |
| | | startAngle: 225, |
| | | max: 300, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [_this.spindlebeilv / 300, '#31F3FF'], // 动态 |
| | | [1, '#185363'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: true, |
| | | fontWeight: 'bold', |
| | | fontSize: 12, |
| | | color: '#fff' |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | | value: _this.spindlebeilv |
| | | }] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环', |
| | | 'type': 'pie', |
| | | 'radius': ['4%', '2%'], |
| | | 'hoverAnimation': false, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | cursor: 'default', |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环2', |
| | | 'type': 'pie', |
| | | 'radius': '2%', |
| | | 'hoverAnimation': false, |
| | | cursor: 'default', |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#31F3FF' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | } |
| | | ] |
| | | // _this.xyzAliasesList = res.result.xyzAliasesList |
| | | this.$nextTick(() => { |
| | | _this.drawLine() |
| | | }) |
| | | } else { |
| | | _this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | resetData() { |
| | | this.resultData = {} |
| | | this.spindlebeilv = null |
| | | this.feedbeilv = null |
| | | this.spindleload = null |
| | | this.rapidfeed = null |
| | | this.runData = [] |
| | | this.xyzList = null |
| | | }, |
| | | |
| | | mouseEnterItem(e) { |
| | | console.log(e, e.target, e.target.clientWidth, e.target.scrollWidth) |
| | | if (e.target.clientWidth >= e.target.scrollWidth) { |
| | | e.target.style.pointerEvents = 'none' // 阻止鼠标事件 pointer-events 属性用于设置元素是否对鼠标事件做出反应。 |
| | | } |
| | | mdcEquiMoniGauge1.setOption(mdcEquiMoniGaugeOption1) |
| | | } |
| | | if (_this.feedbeilv) { |
| | | let mdcEquiMoniGauge2 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge2'), 'macarons') |
| | | let mdcEquiMoniGaugeOption2 = { |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | |
| | | series: [{ |
| | | name: '外部线', |
| | | type: 'gauge', |
| | | radius: '65%', // 动态 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#31F3FF'] // 动态 |
| | | ], |
| | | width: 1 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { //标题 |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '外部刻度', |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | min: 0, //最小刻度 |
| | | max: 300, //最大刻度 |
| | | splitNumber: 10, //刻度数量 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: [ |
| | | [1, 'rgba(0,0,0,0)'] |
| | | ] |
| | | } |
| | | }, //仪表盘轴线 |
| | | axisLabel: { |
| | | show: true, |
| | | color: '#31F3FF', |
| | | fontSize: 10, // 动态 |
| | | distance: -20 // 动态 |
| | | |
| | | }, //刻度标签。 |
| | | axisTick: { |
| | | show: false |
| | | }, //刻度样式 |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部宽线条', |
| | | type: 'gauge', |
| | | radius: '55%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部细线条', |
| | | type: 'gauge', |
| | | radius: '40%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 3 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '间隔条形', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 4, |
| | | splitNumber: 35, |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | opacity: 0 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | | color: '#122B3C', |
| | | width: 1 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '数据', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 3, |
| | | startAngle: 225, |
| | | max: 300, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [_this.feedbeilv / 300, '#31F3FF'], // 动态 |
| | | [1, '#185363'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: true, |
| | | fontWeight: 'bold', |
| | | fontSize: 12, |
| | | color: '#fff' |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | | value: _this.feedbeilv |
| | | }] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环', |
| | | 'type': 'pie', |
| | | 'radius': ['4%', '2%'], |
| | | 'hoverAnimation': false, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | cursor: 'default', |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环2', |
| | | 'type': 'pie', |
| | | 'radius': '2%', |
| | | 'hoverAnimation': false, |
| | | cursor: 'default', |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#31F3FF' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | } |
| | | ] |
| | | } |
| | | mdcEquiMoniGauge2.setOption(mdcEquiMoniGaugeOption2) |
| | | } |
| | | if (_this.spindleload) { |
| | | let mdcEquiMoniGauge3 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge3'), 'macarons') |
| | | let mdcEquiMoniGaugeOption3 = { |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | |
| | | series: [{ |
| | | name: '外部线', |
| | | type: 'gauge', |
| | | radius: '65%', // 动态 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#31F3FF'] // 动态 |
| | | ], |
| | | width: 1 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { //标题 |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '外部刻度', |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | min: 0, //最小刻度 |
| | | max: 100, //最大刻度 |
| | | splitNumber: 10, //刻度数量 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: [ |
| | | [1, 'rgba(0,0,0,0)'] |
| | | ] |
| | | } |
| | | }, //仪表盘轴线 |
| | | axisLabel: { |
| | | show: true, |
| | | color: '#31F3FF', |
| | | fontSize: 10, // 动态 |
| | | distance: -20 // 动态 |
| | | |
| | | }, //刻度标签。 |
| | | axisTick: { |
| | | show: false |
| | | }, //刻度样式 |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部宽线条', |
| | | type: 'gauge', |
| | | radius: '55%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部细线条', |
| | | type: 'gauge', |
| | | radius: '40%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 3 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '间隔条形', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 4, |
| | | splitNumber: 35, |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | opacity: 0 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | | color: '#122B3C', |
| | | width: 1 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '数据', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 3, |
| | | startAngle: 225, |
| | | max: 100, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [_this.spindleload / 100, '#31F3FF'], // 动态 |
| | | [1, '#185363'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: true, |
| | | fontWeight: 'bold', |
| | | fontSize: 12, |
| | | color: '#fff' |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | | value: _this.spindleload |
| | | }] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环', |
| | | 'type': 'pie', |
| | | 'radius': ['4%', '2%'], |
| | | 'hoverAnimation': false, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | cursor: 'default', |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环2', |
| | | 'type': 'pie', |
| | | 'radius': '2%', |
| | | 'hoverAnimation': false, |
| | | cursor: 'default', |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#31F3FF' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | } |
| | | ] |
| | | } |
| | | mdcEquiMoniGauge3.setOption(mdcEquiMoniGaugeOption3) |
| | | } |
| | | if (_this.rapidfeed) { |
| | | let mdcEquiMoniGauge4 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge4'), 'macarons') |
| | | let mdcEquiMoniGaugeOption4 = { |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | |
| | | series: [{ |
| | | name: '外部线', |
| | | type: 'gauge', |
| | | radius: '65%', // 动态 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#31F3FF'] // 动态 |
| | | ], |
| | | width: 1 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { //标题 |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '外部刻度', |
| | | type: 'gauge', |
| | | radius: '80%', |
| | | min: 0, //最小刻度 |
| | | max: 300, //最大刻度 |
| | | splitNumber: 10, //刻度数量 |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: [ |
| | | [1, 'rgba(0,0,0,0)'] |
| | | ] |
| | | } |
| | | }, //仪表盘轴线 |
| | | axisLabel: { |
| | | show: true, |
| | | color: '#31F3FF', |
| | | fontSize: 10, // 动态 |
| | | distance: -20 // 动态 |
| | | |
| | | }, //刻度标签。 |
| | | axisTick: { |
| | | show: false |
| | | }, //刻度样式 |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部宽线条', |
| | | type: 'gauge', |
| | | radius: '55%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '内部细线条', |
| | | type: 'gauge', |
| | | radius: '40%', |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [1, '#122B3C'] |
| | | ], |
| | | width: 3 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '间隔条形', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 4, |
| | | splitNumber: 35, |
| | | startAngle: 225, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | opacity: 0 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | length: 20, |
| | | splitNumber: 1, |
| | | lineStyle: { |
| | | color: '#122B3C', |
| | | width: 1 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: false |
| | | }, |
| | | title: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: '数据', |
| | | type: 'gauge', |
| | | radius: '52.5%', |
| | | z: 3, |
| | | startAngle: 225, |
| | | max: 300, |
| | | endAngle: -45, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [_this.rapidfeed / 300, '#31F3FF'], // 动态 |
| | | [1, '#185363'] |
| | | ], |
| | | width: 4 |
| | | } |
| | | }, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | detail: { |
| | | show: true, |
| | | fontWeight: 'bold', |
| | | fontSize: 12, |
| | | color: '#fff' |
| | | }, |
| | | pointer: { |
| | | show: true, |
| | | width: 3, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | data: [{ |
| | | name: '', |
| | | value: _this.rapidfeed |
| | | }] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环', |
| | | 'type': 'pie', |
| | | 'radius': ['4%', '2%'], |
| | | 'hoverAnimation': false, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | cursor: 'default', |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#fff' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | }, |
| | | // 内圆 |
| | | { |
| | | 'name': '内圆环2', |
| | | 'type': 'pie', |
| | | 'radius': '2%', |
| | | 'hoverAnimation': false, |
| | | cursor: 'default', |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | 'labelLine': { |
| | | 'normal': { |
| | | 'show': false |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#31F3FF' |
| | | }, |
| | | animation: false, |
| | | 'data': [1] |
| | | } |
| | | ] |
| | | } |
| | | mdcEquiMoniGauge4.setOption(mdcEquiMoniGaugeOption4) |
| | | } |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | clearInterval(this.modalTimer) |
| | | this.modalTimer = null |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | clearInterval(this.modalTimer) |
| | | this.modalTimer = null |
| | | }, |
| | | timerModel(id) { |
| | | this.modalTimer = setInterval(() => { |
| | | setTimeout(this.initData(id), 0) |
| | | }, 1000 * 4) |
| | | }, |
| | | |
| | | initData(id) { |
| | | let _this = this |
| | | this.visible = true |
| | | getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | _this.resultData = res.result.equipment |
| | | _this.spindlebeilv = res.result.spindlebeilv |
| | | _this.feedbeilv = res.result.feedbeilv |
| | | _this.spindleload = res.result.spindleload |
| | | _this.rapidfeed = res.result.rapidfeed |
| | | _this.runData = res.result.runData |
| | | _this.xyzList = res.result.xyzList |
| | | |
| | | // _this.xyzAliasesList = res.result.xyzAliasesList |
| | | this.$nextTick(() => { |
| | | _this.drawLine() |
| | | }) |
| | | } else { |
| | | _this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | mouseEnterItem(e) { |
| | | console.log(e, e.target, e.target.clientWidth, e.target.scrollWidth) |
| | | if (e.target.clientWidth >= e.target.scrollWidth) { |
| | | e.target.style.pointerEvents = 'none' // 阻止鼠标事件 pointer-events 属性用于设置元素是否对鼠标事件做出反应。 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | body { |
| | | overflow-y: hidden !important; |
| | | } |
| | | |
| | | .full-modal { |
| | | .ant-modal { |
| | | top: 0; |
| | | padding-bottom: 0; |
| | | margin: 0; |
| | | background-color: #4a4a48 !important; |
| | | opacity: 0.5; |
| | | body { |
| | | overflow-y: hidden !important; |
| | | } |
| | | |
| | | .full-modal { |
| | | .ant-modal { |
| | | top: 0; |
| | | padding-bottom: 0; |
| | | margin: 0; |
| | | background-color: #4a4a48 !important; |
| | | opacity: 0.5; |
| | | } |
| | | /deep/ .ant-modal-content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | background-color: #4a4a48; |
| | | } |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | /deep/ .ant-modal-content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | background-color: #4a4a48; |
| | | background-color: #312c2c; |
| | | opacity: 0.9; |
| | | } |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | |
| | | /deep/ .ant-modal-close { |
| | | color: #1191b0; |
| | | font-size: 24px; |
| | | } |
| | | } |
| | | |
| | | /deep/ .ant-modal-content { |
| | | background-color: #312c2c; |
| | | opacity: 0.9; |
| | | } |
| | | /deep/ .ant-modal-close-x { |
| | | font-size: 24px; |
| | | } |
| | | |
| | | /deep/ .ant-modal-close { |
| | | color: #1191b0; |
| | | font-size: 24px; |
| | | } |
| | | /deep/ .ant-modal-footer { |
| | | border-top: none; |
| | | } |
| | | |
| | | /deep/ .ant-modal-close-x { |
| | | font-size: 24px; |
| | | } |
| | | /deep/ .ant-descriptions { |
| | | border: 1px solid #16738d; |
| | | margin: 10px 0; |
| | | } |
| | | |
| | | /deep/ .ant-modal-footer { |
| | | border-top: none; |
| | | } |
| | | /deep/ .ant-descriptions-title { |
| | | color: #fff; |
| | | padding: 10px; |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions { |
| | | border: 1px solid #16738d; |
| | | margin: 10px 0; |
| | | } |
| | | /deep/ .ant-descriptions-view { |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-title { |
| | | color: #fff; |
| | | padding: 10px; |
| | | margin-bottom: 0; |
| | | } |
| | | /deep/ .ant-descriptions-view .ant-descriptions-row .ant-descriptions-item { |
| | | padding-bottom: 5px; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-view { |
| | | padding: 0 20px; |
| | | } |
| | | /deep/ .ant-descriptions-item-colon { |
| | | color: #fff; |
| | | width: 5.1vw; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-view .ant-descriptions-row .ant-descriptions-item { |
| | | padding-bottom: 5px; |
| | | } |
| | | /deep/ .ant-descriptions-item-content { |
| | | color: #fff; |
| | | border: 1px solid #4bcfc8; |
| | | padding: 0 10px; |
| | | width: auto; |
| | | min-width: 130px; |
| | | /*max-width: 300px;*/ |
| | | height: 25px; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-item-colon { |
| | | color: #fff; |
| | | width: 5.1vw; |
| | | } |
| | | .mdcEquipMon { |
| | | color: #fff; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-item-content { |
| | | color: #fff; |
| | | border: 1px solid #4bcfc8; |
| | | padding: 0 10px; |
| | | width: auto; |
| | | min-width: 130px; |
| | | /*max-width: 300px;*/ |
| | | height: 25px; |
| | | } |
| | | fieldset { |
| | | border: 1px solid #16738d; |
| | | padding: 17px; |
| | | margin: 14px; |
| | | } |
| | | |
| | | .mdcEquipMon { |
| | | color: #fff; |
| | | } |
| | | fieldset legend { |
| | | display: inline; |
| | | width: 88px; |
| | | } |
| | | |
| | | fieldset { |
| | | border: 1px solid #16738d; |
| | | padding: 17px; |
| | | margin: 14px; |
| | | } |
| | | table tr td { |
| | | text-align: left; |
| | | color: #fff; |
| | | } |
| | | |
| | | fieldset legend { |
| | | display: inline; |
| | | width: 88px; |
| | | } |
| | | table tr td input { |
| | | border: 1px solid #a6eff9; |
| | | } |
| | | |
| | | table tr td { |
| | | text-align: left; |
| | | color: #fff; |
| | | } |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | color: #fff !important; |
| | | background-color: #1191b0; |
| | | border: none; |
| | | } |
| | | |
| | | table tr td input { |
| | | border: 1px solid #a6eff9; |
| | | } |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | color: #fff !important; |
| | | background-color: #1191b0; |
| | | border: none; |
| | | } |
| | | /** 主表单行间距 */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | /** Tab页面行间距 */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | |
| | | /** 主表单行间距 */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | /deep/ .ant-descriptions-item-label { |
| | | width: 6.7vw; |
| | | text-align: right; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | /** Tab页面行间距 */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | /deep/ .operationData .ant-descriptions-item-content { |
| | | width: 130px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-item-label { |
| | | width: 6.7vw; |
| | | text-align: right; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | /deep/ .operationData .ant-descriptions-item-content { |
| | | width: 130px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .description-item-class { |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | .description-item-class { |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | </style> |
| | |
| | | }) |
| | | return false |
| | | } |
| | | this.$refs.equipmentDetailModal.resetData() |
| | | this.$refs.equipmentDetailModal.initData(item.id) |
| | | this.$refs.equipmentDetailModal.timerModel(item.id) |
| | | } |
| | |
| | | minThreshold: '', |
| | | maxThreshold: '' |
| | | } |
| | | console.log('driveType',this.driveTypeList) |
| | | console.log('driveType', this.driveTypeList) |
| | | this.handleDriveTypeChange(this.driveTypeList[0]) |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'controlSystemType', 'chineseName', 'minThreshold', 'maxThreshold')) |
| | |
| | | * @param value 驱动参数类型选中项 |
| | | */ |
| | | handleDriveTypeChange(value) { |
| | | this.paramList = [] |
| | | api.getParamListByDriveTypeApi(value) |
| | | .then(res => { |
| | | if (res.success) { |
| | |
| | | </a-col> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="时间"> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD" :allow-clear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="6" :xs="6"> |
| | | <a-form-item label="时间段"> |
| | | <a-time-picker :default-value="moment('00:00', 'HH:mm')" format="HH:mm" @change="onChangeStart"/> |
| | | <a-time-picker :default-value="moment('00:00', 'HH:mm')" format="HH:mm" @change="onChangeStart" :allow-clear="false"/> |
| | | 至 |
| | | <a-time-picker :default-value="moment('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd"/> |
| | | <a-time-picker :default-value="moment('08:00', 'HH:mm')" format="HH:mm" @change="onChangeEnd" :allow-clear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="3" :xs="3"> |
| | |
| | | } |
| | | }, |
| | | searchQuery() { |
| | | if (this.queryParam.startTime && this.queryParam.endTime && this.dates && this.dates.length > 0) { |
| | | this.loading = true |
| | | this.spaceTime = [] |
| | | this.usingRates = [] |
| | | if (this.queryParams.typeTree == '1') { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | this.loading = true |
| | | this.spaceTime = [] |
| | | this.usingRates = [] |
| | | if (this.queryParams.typeTree == '1') { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | |
| | | } else { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = "" |
| | | } |
| | | this.AnalysisList = [] |
| | | //获取查询条件 |
| | | this.queryParam.parentId = this.queryParams.parentId |
| | | this.queryParam.equipmentId = this.queryParams.equipmentId |
| | | this.queryParam.typeTree = this.queryParams.typeTree |
| | | getAction(this.url.dayUtilizationRateContrast, this.queryParam).then((res) => { |
| | | if (res.success) { |
| | | this.spaceTime = res.result.dateList |
| | | for (let i = 0; i < res.result.dayRateDto.length; i++) { |
| | | // res.result[i].useRateDayShift = this.numFilter(res.result[i].useRateDayShift) |
| | | this.usingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) |
| | | } |
| | | this.drawTu() |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: '请选择时间或时间段' |
| | | }) |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = "" |
| | | } |
| | | this.AnalysisList = [] |
| | | //获取查询条件 |
| | | this.queryParam.parentId = this.queryParams.parentId |
| | | this.queryParam.equipmentId = this.queryParams.equipmentId |
| | | this.queryParam.typeTree = this.queryParams.typeTree |
| | | getAction(this.url.dayUtilizationRateContrast, this.queryParam).then((res) => { |
| | | if (res.success) { |
| | | this.spaceTime = res.result.dateList |
| | | for (let i = 0; i < res.result.dayRateDto.length; i++) { |
| | | // res.result[i].useRateDayShift = this.numFilter(res.result[i].useRateDayShift) |
| | | this.usingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) |
| | | } |
| | | this.drawTu() |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.loading = true |
| | |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="日期"> |
| | | <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD' |
| | | <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD' :allow-clear="false" |
| | | @change="dataChange"/> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | }) |
| | | } |
| | | }, |
| | | searchReset() { |
| | | this.spaceTime = [] |
| | | this.useingRates = [] |
| | | if (this.queryParams.typeTree == '1') { |
| | | this.typeTree = this.queryParams.typeTree |
| | | this.typeParent = this.queryParams.parentId |
| | | this.typeEquipment = this.queryParams.equipmentId |
| | | this.queryParams = {} |
| | | this.queryParam = {} |
| | | this.queryParams.typeTree = this.typeTree |
| | | this.queryParams.parentId = this.typeParent |
| | | if (this.queryParams.parentId != '') { |
| | | this.queryParams.equipmentId = '' |
| | | this.initEquipment() |
| | | } else { |
| | | if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) { |
| | | this.queryParams.equipmentId = this.typeEquipment |
| | | } else { |
| | | this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | } |
| | | } |
| | | getAction(this.url.dayUtilizationRate, this.queryParams).then((res) => { |
| | | if (res.success) { |
| | | this.spaceTime = res.result.dateList |
| | | for (var i = 0; i < res.result.dayRateDto.length; i++) { |
| | | this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) |
| | | } |
| | | this.drawTu() |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } else { |
| | | this.typeTree = this.queryParams.typeTree |
| | | this.typeParent = this.queryParams.parentId |
| | | this.typeEquipment = this.queryParams.equipmentId |
| | | this.queryParams = {} |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.queryParams.typeTree = this.typeTree |
| | | this.queryParams.parentId = this.typeParent |
| | | if (this.queryParams.parentId != '') { |
| | | this.queryParams.equipmentId = '' |
| | | this.initEquipment() |
| | | } else { |
| | | if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) { |
| | | this.queryParams.equipmentId = this.typeEquipment |
| | | } else { |
| | | this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | } |
| | | } |
| | | getAction(this.url.dayUtilizationRate, this.queryParams).then((res) => { |
| | | if (res.success) { |
| | | this.spaceTime = res.result.dateList |
| | | for (var i = 0; i < res.result.dayRateDto.length; i++) { |
| | | this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate)) |
| | | } |
| | | this.drawTu() |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | initEquipment(id) { |
| | | let _this = this |
| | | getAction(this.url.getEquipmentByPid, { pid: id }).then((res) => { |
| | |
| | | }, |
| | | created() { |
| | | let collectTime = moment(moment().add(-1, 'd'), 'YYYY-MM-DD') |
| | | |
| | | this.queryParams.collectTime = collectTime |
| | | |
| | | this.queryParam.dateTime = this.queryParams.collectTime.format('YYYYMMDD') |
| | | this.queryParams.typeTree = '1' |
| | | this.initEquipment() |
| | |
| | | <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-col :md="9" :sm="9"> |
| | | <a-form-item label="统一编码"> |
| | | <a-input placeholder="请输入统一编码检索" v-model="queryParam.equipmentid"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="7" :sm="7"> |
| | | <a-col :md="9" :sm="9"> |
| | | <a-form-item label="设备名称"> |
| | | <a-input placeholder="请输入设备名称检索" v-model="queryParam.equipmentname"></a-input> |
| | | </a-form-item> |
| | |
| | | <a-col :md="3" :sm="3"> |
| | | <a-space> |
| | | <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-button type="primary" @click="searchReset" icon="reload">重置</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | |
| | | <!-- table区域-begin --> |
| | | <div> |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{ y: 300 }" :columns="columns" |
| | | :dataSource="dataSource" :pagination="ipagination" :loading="loading" |
| | | <a-table bordered rowKey="equipmentid" :scroll="{ y: 300 }" :columns="columns" |
| | | :dataSource="dataSource" :pagination="ipagination" :loading="loading" :customRow="customRow" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" |
| | | @change="handleTableChange"> |
| | | </a-table> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | ajaxGetSelectItems |
| | | } from '@/api/api' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | import { |
| | | deleteAction, |
| | | requestPut, |
| | | getAction |
| | | } from '@/api/manage' |
| | | import { |
| | | JeecgListMixin |
| | | } from '@/mixins/JeecgListMixin' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import JDate from '@/components/jeecg/JDate' |
| | | import moment from 'moment' |
| | | import { filterObj } from '@/utils/util'; |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: 'DeviceListModel', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JDictSelectTag, |
| | | JEllipsis, |
| | | JInput, |
| | | Tooltip, |
| | | JDate |
| | | }, |
| | | props: { |
| | | status: { |
| | | type: Number, |
| | | default: 1 |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | title: '', |
| | | visible: false, |
| | | disableMixinCreated: true, |
| | | queryParam: {}, |
| | | columns: [{ |
| | | title: '统一编码', |
| | | align: 'center', |
| | | dataIndex: 'equipmentid', |
| | | }, |
| | | columns: [ |
| | | { |
| | | title: '统一编码', |
| | | align: 'center', |
| | | dataIndex: 'equipmentid' |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: 'center', |
| | | dataIndex: 'equipmentname', |
| | | dataIndex: 'equipmentname' |
| | | }, |
| | | { |
| | | title: '设备型号', |
| | | align: 'center', |
| | | dataIndex: 'equipmentmodel', |
| | | dataIndex: 'equipmentmodel' |
| | | }, |
| | | // { |
| | | // title: '设备类型', |
| | | // align: 'center', |
| | | // dataIndex: 'equipmentType', |
| | | // }, |
| | | { |
| | | title: '机床IP', |
| | | align: 'center', |
| | | dataIndex: 'equipmentip', |
| | | dataIndex: 'equipmentip' |
| | | }, |
| | | { |
| | | title: '驱动类型', |
| | | align: 'center', |
| | | dataIndex: 'drivetype', |
| | | dataIndex: 'drivetype' |
| | | }, |
| | | { |
| | | title: '端口', |
| | | align: 'center', |
| | | dataIndex: 'dataport', |
| | | dataIndex: 'dataport' |
| | | }, |
| | | { |
| | | title: '数控系统', |
| | | align: 'center', |
| | | dataIndex: 'controlsystem', |
| | | dataIndex: 'controlsystem' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/mdc/equipment/list', |
| | | /* 排序参数 */ |
| | | isorter: { |
| | | column: '', |
| | | order: '' |
| | | }, |
| | | |
| | | url: { |
| | | list: '/mdc/equipment/list' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | openPage() { |
| | | this.visible = true |
| | | this.onClearSelected() |
| | | this.dataSource = []; |
| | | // this.queryParam = { |
| | | // status: this.status |
| | | // }; |
| | | this.loadData(); |
| | | this.dataSource = [] |
| | | this.loadData() |
| | | }, |
| | | getQueryParams() { |
| | | //获取查询条件 |
| | | let sqp = {} |
| | | if(this.superQueryParams){ |
| | | sqp['superQueryParams']=encodeURI(this.superQueryParams) |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam); |
| | | // param.field = this.getQueryField(); |
| | | param.pageNo = this.ipagination.current; |
| | | param.pageSize = this.ipagination.pageSize; |
| | | //获取用户定制的参数属性 |
| | | // if (this.getCustomQueryParams) { |
| | | // param = this.getCustomQueryParams(param); |
| | | // if(!param){ |
| | | // return false; |
| | | // } |
| | | // } |
| | | |
| | | return filterObj(param); |
| | | }, |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list属性!") |
| | | return |
| | | } |
| | | //加载数据 若传入参数1则加载第一页的内容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//查询条件 |
| | | |
| | | if(!params){ |
| | | return false; |
| | | } |
| | | |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | this.dataSource = res.result.records||res.result; |
| | | if(res.result.total) |
| | | { |
| | | this.ipagination.total = res.result.total; |
| | | }else{ |
| | | this.ipagination.total = 0; |
| | | /** |
| | | * 自定义表格行 |
| | | * @param record 表格行信息 |
| | | * @returns {{style: {cursor: string}, on: {click: on.click}}} |
| | | */ |
| | | customRow(record) { |
| | | return { |
| | | style: { |
| | | cursor: 'pointer' |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange([record.equipmentid], [record]) |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | }, |
| | | getQueryField() { |
| | | //TODO 字段权限控制 |
| | | // var str = ""; |
| | | // this.columns.forEach(function (value) { |
| | | // str += value.dataIndex +"," ; |
| | | // }); |
| | | // return str; |
| | | }, |
| | | modalFormOk(val) { |
| | | // 新增/修改 成功时,重载列表 |
| | | this.loadData(); |
| | | this.selectedRowKeys = [val.id]; |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(); |
| | | this.onClearSelected() |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(); |
| | | this.onClearSelected() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | handleOk() { |
| | | this.$emit('sendSelectionRows', this.selectionRows[0]) |
| | | this.close() |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | |
| | | .success { |
| | | color: green; |
| | | } |
| | | |
| | | .error { |
| | | color: red; |
| | | } |
| | | </style> |
| | |
| | | <a-select :disabled="disableSubmit" placeholder="请选择设备类型" allow-clear |
| | | :triggerChange="true" |
| | | v-model="model.equipmentType"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | | <a-select-option v-for='item in equipmentTypeList' :key='item.id' :value='item.equipmentTypeName'> |
| | | {{item.equipmentTypeName}} |
| | | </a-select-option> |
| | | </a-select> |
| | |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="车间分配" 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" |
| | | @back="backProductionInfo" :backProduction="true" :allowClear="false" |
| | | :treeProductOpera="true"></j-select-equipment-production> |
| | | </a-form-model-item> |
| | | |
| | |
| | | <a-select :disabled="disableSubmit" placeholder="请选择设备类型" |
| | | :triggerChange="true" |
| | | v-model="model.equipmentType"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | | <a-select-option v-for='item in equipmentTypeList' :key='item.id' :value='item.equipmentTypeName'> |
| | | {{item.equipmentTypeName}} |
| | | </a-select-option> |
| | | </a-select> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import moment from 'moment' |
| | | import Vue from 'vue' |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import { getAction } from '@/api/manage' |
| | | import { addEquipment, editEquipment } from '@/api/api' |
| | | 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 { mapActions } from 'vuex' |
| | |
| | | export default { |
| | | name: 'UserModal', |
| | | components: { |
| | | JSelectProduction, |
| | | JSelectEquipmentDepart, |
| | | JSelectEquipmentProduction, |
| | | DeviceListModel |
| | |
| | | productionDisabled: false, //是否是我的车间调用该页面 |
| | | roleDisabled: false, //是否是角色维护调用该页面 |
| | | modalWidth: 900, |
| | | confirmDirty: false, |
| | | userId: '', //保存用户id |
| | | disableSubmit: true, |
| | | dateFormat: 'YYYY-MM-DD', |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | equipmentId: [{ required: true, message: '请选择设备编号!' }], |
| | | equipmentId: [{ required: true, message: '请选择设备编号!', trigger: 'change' }], |
| | | selectedProduction: [{ required: true, message: '请选择车间' }], |
| | | teamCode: [{ required: true, message: '请选择配送小组' }] |
| | | }, |
| | |
| | | xs: { span: 24 }, |
| | | sm: { span: 19 } |
| | | }, |
| | | uploadLoading: false, |
| | | confirmLoading: false, |
| | | headers: {}, |
| | | systemType: false, |
| | | systemValue: '3', |
| | | 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',//同步用户到工作流 |
| | | queryTenantList: '/sys/tenant/queryList', |
| | | check: '/sys/duplicate/check', |
| | | queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' |
| | | }, |
| | | tenantsOptions: [], |
| | | rolesOptions: [], |
| | | nextDepartOptions: [], |
| | | nextProductionOptions: [], |
| | | selectList: [], |
| | | equipmentTypeList: [], |
| | | isDepartType: '' |
| | | } |
| | | }, |
| | | created() { |
| | | const token = Vue.ls.get(ACCESS_TOKEN) |
| | | this.headers = { 'X-Access-Token': token } |
| | | this.queryGroup() |
| | | this.queryTreeData() |
| | | this.getAppPlatformName() |
| | | }, |
| | | computed: { |
| | | uploadAction: function() { |
| | | return this.url.fileUpload |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | }) |
| | | }, |
| | | getAppPlatformName() { |
| | |
| | | queryGroup() { |
| | | getAction(this.url.queryEquipmentType).then(res => { |
| | | if (res.success) { |
| | | this.selectList = res.result |
| | | this.equipmentTypeList = res.result |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | |
| | | }) |
| | | }, |
| | | getDeviceRows(val) { |
| | | console.log(val) |
| | | if (val.equipmentid) { |
| | | this.model.equipmentId = val.equipmentid |
| | | this.model.equipmentName = val.equipmentname |
| | |
| | | if (record.hasOwnProperty('id')) { |
| | | that.getUserDeparts(record.id) |
| | | } |
| | | }, |
| | | isDisabledAuth(code) { |
| | | return disabledAuthFilter(code) |
| | | }, |
| | | // 根据屏幕变化,设置抽屉尺寸 |
| | | resetScreenSize() { |
| | |
| | | this.nextProductionOptions = [] |
| | | this.departIdShow = false |
| | | }, |
| | | moment, |
| | | handleSubmit() { |
| | | const that = this |
| | | // 触发表单验证 |
| | |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleConfirmBlur(e) { |
| | | const value = e.target.value |
| | | this.confirmDirty = this.confirmDirty || !!value |
| | | }, |
| | | identityChange(e) { |
| | | if (e.target.value === 1) { |
| | | this.departIdShow = false |
| | | } else { |
| | | this.departIdShow = true |
| | | } |
| | | }, |
| | | /** |
| | | * 编辑或查看详情数据时清除抽屉表单验证 |
| | |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="theDate"> |
| | | <a-date-picker v-model="model.theDate" :disabled="disabled" format="YYYY-MM-DD" |
| | | <a-date-picker v-model="model.theDate" :disabled="disabled" format="YYYY-MM-DD" :allow-clear="false" |
| | | value-format="YYYY-MM-DD" style="width: 100%"></a-date-picker> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | equipmentIds: [ |
| | | { required: true, message: '请选择设备!' } |
| | | { required: true, message: '请选择设备!', trigger: 'change' } |
| | | ], |
| | | partId: [ |
| | | { required: true, message: '请输入零件号!' } |
| | |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, { equipmentIds: record.equipmentId }, record) |
| | | console.log('model', this.model) |
| | | this.visible = true |
| | | }, |
| | | inputNumberChange() { |
| | |
| | | */ |
| | | selectOK(data) { |
| | | this.$set(this.model, 'equipmentIds', data.join(',')) |
| | | if (this.model.equipmentIds) this.$refs.form.clearValidate('equipmentIds') |
| | | } |
| | | } |
| | | } |
| | |
| | | span: 24 |
| | | }, |
| | | sm: { |
| | | span: 6 |
| | | span: 4 |
| | | } |
| | | }, |
| | | wrapperCol: { |
| | |
| | | span: 24 |
| | | }, |
| | | sm: { |
| | | span: 6 |
| | | span: 4 |
| | | } |
| | | }, |
| | | wrapperCol: { |
| | |
| | | <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <!--<a-col :md="5" :sm="5">--> |
| | | <!--<a-form-item label="名称">--> |
| | | <!--<a-input placeholder="输入设备名称查询" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>--> |
| | | <!--</a-form-item>--> |
| | | <!--</a-col>--> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设备"> |
| | | <a-input-search :readOnly="true" v-model="queryParam.equipmentId" @search="deviceSearch" |
| | |
| | | |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="驱动类型"> |
| | | <!--<j-dict-select-tag placeholder="请选择驱动类型"--> |
| | | <!--:triggerChange="true" dictCode="mdc_driveType"--> |
| | | <!--v-model="queryParam.driveType" allow-clear/>--> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | |
| | | </a-col> |
| | | <a-col :md="6" :sm="6" :xs="6"> |
| | | <a-form-item label="时间"> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/> |
| | | <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD" :allow-clear="false"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col> |
| | | <a-col :md="3" :sm="3" :xs="3"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">重置</a-button> |
| | |
| | | |
| | | export default { |
| | | name: 'ComparativeAnalysisMain', |
| | | // mixins: [JeecgListMixin], |
| | | components: { |
| | | Tooltip, |
| | | ComparativeAnalysisBar, |
| | |
| | | tabChange(val) { |
| | | this.activeKey = val |
| | | }, |
| | | |
| | | dateParamChange(v1, v2) { |
| | | // console.log(v1,v2) |
| | | this.queryParam.startTime = v2[0] |
| | | this.queryParam.endTime = v2[1] |
| | | console.log(v2[0], v2[1]) |
| | | }, |
| | | |
| | | loadAnalysis() { |
| | | getAction(this.url.comparativeAnalysis, this.queryParam).then(res => { |
| | | if (res.success) { |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | searchQuery() { |
| | | if (this.dates && this.dates.length > 0) { |
| | | this.AnalysisList = [] |
| | | this.AnalysisBarList = [] |
| | | this.AnalysisGauge = [] |
| | | this.AnalysisPie = [] |
| | | if (this.queryParams.typeTree == '1') { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | } else { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = "" |
| | | } |
| | | this.AnalysisList = [] |
| | | //获取查询条件 |
| | | this.queryParam.parentId = this.queryParams.parentId |
| | | // this.queryParam.equipmentId = this.queryParams.equipmentId |
| | | this.queryParam.typeTree = this.queryParams.typeTree |
| | | getAction(this.url.comparativeAnalysis, this.queryParam).then((res) => { |
| | | if (res.success) { |
| | | this.AnalysisList = res.result |
| | | this.AnalysisBarList = res.result.graphics |
| | | this.AnalysisGauge = res.result.meters |
| | | this.AnalysisPie.push(res.result.pieCharts) |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: '提示', |
| | | description: '请选择时间' |
| | | }) |
| | | } |
| | | |
| | | searchQuery() { |
| | | this.AnalysisList = [] |
| | | this.AnalysisBarList = [] |
| | | this.AnalysisGauge = [] |
| | | this.AnalysisPie = [] |
| | | if (this.queryParams.typeTree == '1') { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | } else { |
| | | this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // this.queryParams.equipmentId = "" |
| | | } |
| | | this.AnalysisList = [] |
| | | //获取查询条件 |
| | | this.queryParam.parentId = this.queryParams.parentId |
| | | // this.queryParam.equipmentId = this.queryParams.equipmentId |
| | | this.queryParam.typeTree = this.queryParams.typeTree |
| | | getAction(this.url.comparativeAnalysis, this.queryParam).then((res) => { |
| | | if (res.success) { |
| | | this.AnalysisList = res.result |
| | | this.AnalysisBarList = res.result.graphics |
| | | this.AnalysisGauge = res.result.meters |
| | | this.AnalysisPie.push(res.result.pieCharts) |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.AnalysisList = [] |
| | | this.AnalysisBarList = [] |
| | |
| | | this.typeEquipment = this.queryParams.equipmentId |
| | | this.queryParams = {} |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)] |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParams.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParams.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParams.typeTree = this.typeTree |
| | | this.queryParams.parentId = this.typeParent |
| | | if (this.queryParams.parentId != '') { |
| | |
| | | this.AnalysisGauge = res.result.meters |
| | | this.AnalysisPie.push(res.result.pieCharts) |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | |
| | | this.typeEquipment = this.queryParams.equipmentId |
| | | this.queryParams = {} |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)] |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParams.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParams.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParams.typeTree = this.typeTree |
| | | this.queryParams.parentId = this.typeParent |
| | | if (this.queryParams.parentId != '') { |
| | |
| | | this.AnalysisGauge = res.result.meters |
| | | this.AnalysisPie.push(res.result.pieCharts) |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 调用接口获取控制系统类型 |
| | | */ |
| | |
| | | this.driveTypeList = res.result.map(item => item.value) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 联想输入框筛选功能 |
| | | * @param input 输入的内容 |
| | |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ) |
| | | }, |
| | | // onChange(value, dateString) { |
| | | // // console.log('Selected Time: ', value); |
| | | // // console.log('Formatted Selected Time: ', dateString); |
| | | // }, |
| | | // searchReset() { |
| | | // if(this.queryParams.typeTree == "1"){ |
| | | // this.typeTree = this.queryParams.typeTree |
| | | // this.typeParent = this.queryParams.parentId |
| | | // this.typeEquipment = this.queryParams.equipmentId |
| | | // this.queryParams = {} |
| | | // this.queryParam = {} |
| | | // this.dates = [] |
| | | // this.queryParams.typeTree = this.typeTree |
| | | // this.queryParams.parentId = this.typeParent |
| | | // if(this.queryParams.parentId != ""){ |
| | | // this.queryParams.equipmentId = "" |
| | | // }else{ |
| | | // if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){ |
| | | // this.queryParams.equipmentId = this.typeEquipment |
| | | // }else{ |
| | | // this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | // } |
| | | // |
| | | // } |
| | | // |
| | | // this.ipagination.current = 1 |
| | | // this.ResetloadData(); |
| | | // }else{ |
| | | // this.typeTree = this.queryParams.typeTree |
| | | // this.typeParent = this.queryParams.parentId |
| | | // // this.typeEquipment = this.queryParams.equipmentId |
| | | // this.queryParams = {} |
| | | // this.queryParam = {} |
| | | // this.dates = [] |
| | | // this.queryParams.typeTree = this.typeTree |
| | | // this.queryParams.parentId = this.typeParent |
| | | // // this.queryParams.equipmentId = this.typeEquipment |
| | | // this.ipagination.current = 1 |
| | | // this.ResetloadData(); |
| | | // } |
| | | // |
| | | // }, |
| | | // ResetloadData() { |
| | | // if(!this.url.list){ |
| | | // this.$message.error("请设置url.list属性!") |
| | | // return |
| | | // } |
| | | // var params = {} |
| | | // params.typeTree = this.queryParams.typeTree |
| | | // params.parentId = this.queryParams.parentId |
| | | // params.equipmentId = this.queryParams.equipmentId |
| | | // this.loading = true; |
| | | // getAction(this.url.list, params).then((res) => { |
| | | // if (res.success) { |
| | | // this.dataSource = res.result.records||res.result; |
| | | // }else{ |
| | | // this.$message.warning(res.message) |
| | | // } |
| | | // }).finally(() => { |
| | | // this.loading = false |
| | | // }) |
| | | // }, |
| | | // searchQuery(){ |
| | | // if(this.queryParams.typeTree == "1"){ |
| | | // this.queryParams.parentId = this.queryParamEquip.parentId |
| | | // // this.queryParams.equipmentId = this.queryParamEquip.equipmentId |
| | | // |
| | | // }else{ |
| | | // this.queryParams.parentId = this.queryParamPeople.parentId |
| | | // |
| | | // // this.queryParams.equipmentId = "" |
| | | // } |
| | | // this.dataSource = []; |
| | | // //获取查询条件 |
| | | // let param = {} |
| | | // param.parentId = this.queryParams.parentId; |
| | | // param.equipmentId = this.queryParams.equipmentId; |
| | | // param.startTime = this.queryParam.startTime; |
| | | // param.driveType = this.queryParam.driveType; |
| | | // param.endTime = this.queryParam.endTime; |
| | | // getAction(this.url.list,param).then((res) => { |
| | | // if(res.success){ |
| | | // this.dataSource = res.result.records||res.result; |
| | | // }else{ |
| | | // this.$message.warning(res.message) |
| | | // } |
| | | // }).finally(() => { |
| | | // this.loading = false |
| | | // }) |
| | | // }, |
| | | // loadData() { |
| | | // if(!this.url.list){ |
| | | // this.$message.error("请设置url.list属性!") |
| | | // return |
| | | // } |
| | | // //加载数据 若传入参数1则加载第一页的内容 |
| | | // var params = {} |
| | | // this.loading = true; |
| | | // params.startTime = this.queryParam.startTime; |
| | | // params.endTime = this.queryParam.endTime; |
| | | // params.typeTree = this.queryParams.typeTree |
| | | // getAction(this.url.list, params).then((res) => { |
| | | // if (res.success) { |
| | | // this.dataSource = res.result.records||res.result; |
| | | // }else{ |
| | | // this.$message.warning(res.message) |
| | | // } |
| | | // }).finally(() => { |
| | | // this.loading = false |
| | | // }) |
| | | // }, |
| | | |
| | | deviceSearch() { |
| | | console.log('触发') |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | |
| | | * @param data 已选择的设备 |
| | | */ |
| | | selectOK(data) { |
| | | // let params = {} |
| | | // params.equipmentIdList = [] |
| | | // for (var a = 0; a < data.length; a++) { |
| | | // params.equipmentIdList.push(data[a]) |
| | | // } |
| | | console.log('data=', data) |
| | | this.queryParam.equipmentId = data.join(',') |
| | | console.log('queryParam', this.queryParam.equipmentId) |
| | |
| | | > |
| | | |
| | | <a-spin :spinning="loading"> |
| | | <!-- showLine --> |
| | | <a-form> |
| | | <a-form-item> |
| | | <a-input-search @search="handleSearch" style="width:100%;" placeholder="检索 类别编码/名称" allowClear |
| | | v-model="searchInput" @change="handleChange"/> |
| | | </a-form-item> |
| | | <a-form-item label="车间层级:"> |
| | | <div class="content-container"> |
| | | <a-form> |
| | | <a-form-item> |
| | | <a-input-search @search="handleSearch" style="width:100%;" placeholder="检索 类别编码/名称" allowClear |
| | | v-model="searchInput" @change="handleChange"/> |
| | | </a-form-item> |
| | | |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择 <a style="font-weight: 600">{{ |
| | | checkedKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="checkedKeys=[]">清空</a> |
| | | </div> |
| | | </a-form> |
| | | |
| | | <div> |
| | | <a-tree showLine ref="tree" :expandedKeys.sync="expandedKeys" :autoExpandParent="autoExpandParent" |
| | | :treeData="treeDataSource" checkable @check="onCheck" v-model="checkedKeys" |
| | | @select="handleSelectChange" |
| | | @expand="onExpand"> |
| | | <template slot="title" slot-scope="{ title, parentId, entity, key}"> |
| | | <span v-if="title.indexOf(searchValue) > -1">{{ title.substr(0, title.indexOf(searchValue)) }} |
| | |
| | | <span v-else>{{ title }}</span> |
| | | </template> |
| | | </a-tree> |
| | | </a-form-item> |
| | | </a-form> |
| | | |
| | | </div> |
| | | </div> |
| | | </a-spin> |
| | | |
| | | |
| | |
| | | refreshTree() { |
| | | this.queryTreeData() |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * 节点被选中时触发(点击名称) |
| | | * @param selectedKeys 选中的节点key集合 |
| | | * @param event 事件对象 |
| | | */ |
| | | handleSelectChange(selectedKeys, event) { |
| | | event.node.$el.childNodes[1].click() |
| | | }, |
| | | |
| | | onCheck(value, obj) { |
| | | this.checkedKeys = value |
| | | console.log('obj,', obj) |
| | | this.deviceNodes = obj.checkedNodes.filter(item => item.data.props.equipmentId).map(item => item.data.props.equipmentId) |
| | | console.log(this.deviceNodes) |
| | | }, |
| | | handleCancel() { |
| | | this.visible = false |