设备配置中关于部门的权限处理;设备工作日历界面的配置弹窗中的日历选中效果修改;设备日志界面的历史记录界面不显示报警信息显示的问题处理;设备日志界面的工作曲线的时间的选择弹窗关闭的问题处理;设备统计分析界面的饼图的开机率关机率的问题处理;统计图表界面的样式调整
| | |
| | | import UserRecycleBinModal from './modules/EquipmentList/UserRecycleBinModal' |
| | | import JSuperQuery from '@/components/jeecg/JSuperQuery' |
| | | import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' |
| | | import {mapActions} from 'vuex' |
| | | |
| | | export default { |
| | | name: "EquipmentList", |
| | |
| | | // exportXlsUrl: "/sys/user/exportXls", |
| | | // importExcelUrl: "sys/user/importExcel", |
| | | }, |
| | | isDepartType:'' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | // } |
| | | }, |
| | | created() { |
| | | this.queryTreeData() |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | if(this.isDepartType == -1){ |
| | | this.columns=[ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: '设备编号', |
| | | align: "center", |
| | | dataIndex: 'equipmentId', |
| | | width: 120, |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: '车间', |
| | | align: "center", |
| | | width: 180, |
| | | dataIndex: 'productionName' |
| | | }, |
| | | { |
| | | title: '设备类型', |
| | | align: "center", |
| | | width: 120, |
| | | dataIndex: 'equipmentType', |
| | | // scopedSlots: {customRender: "avatarslot"} |
| | | }, |
| | | |
| | | { |
| | | title: '驱动类型', |
| | | align: "center", |
| | | width: 80, |
| | | dataIndex: 'driveType', |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '机床IP', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'equipmentIp' |
| | | }, |
| | | { |
| | | title: '设备功率', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'devicePower' |
| | | }, |
| | | // { |
| | | // title: '部门', |
| | | // align: "center", |
| | | // width: 180, |
| | | // dataIndex: 'orgCodeTxt' |
| | | // }, |
| | | |
| | | { |
| | | title: '系统版本', |
| | | align: "center", |
| | | width: 80, |
| | | dataIndex: 'systemVersion' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | scopedSlots: {customRender: 'action'}, |
| | | align: "center", |
| | | width: 120 |
| | | } |
| | | |
| | | ] |
| | | }else{ |
| | | this.columns=[ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: '设备编号', |
| | | align: "center", |
| | | dataIndex: 'equipmentId', |
| | | width: 120, |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: '车间', |
| | | align: "center", |
| | | width: 180, |
| | | dataIndex: 'productionName' |
| | | }, |
| | | { |
| | | title: '设备类型', |
| | | align: "center", |
| | | width: 120, |
| | | dataIndex: 'equipmentType', |
| | | // scopedSlots: {customRender: "avatarslot"} |
| | | }, |
| | | |
| | | { |
| | | title: '驱动类型', |
| | | align: "center", |
| | | width: 80, |
| | | dataIndex: 'driveType', |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '机床IP', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'equipmentIp' |
| | | }, |
| | | { |
| | | title: '设备功率', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'devicePower' |
| | | }, |
| | | { |
| | | title: '部门', |
| | | align: "center", |
| | | width: 180, |
| | | dataIndex: 'orgCodeTxt' |
| | | }, |
| | | |
| | | { |
| | | title: '系统版本', |
| | | align: "center", |
| | | width: 80, |
| | | dataIndex: 'systemVersion' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | scopedSlots: {customRender: 'action'}, |
| | | align: "center", |
| | | width: 120 |
| | | } |
| | | |
| | | ] |
| | | } |
| | | |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | | }, |
| | | handleEdit: function (record) { |
| | | this.$refs.modalForm.edit(record); |
| | | this.$refs.modalForm.title = "编辑"; |
| | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a href="javascript:;" @click="handleEdit(record)">编辑</a> |
| | | </span> |
| | | <span slot="action1" slot-scope="text,record"> |
| | | <span><=</span> |
| | | </span> |
| | | <!--<span slot="action1" slot-scope="text,record">--> |
| | | <!--<span><=</span>--> |
| | | <!--</span>--> |
| | | </a-table> |
| | | </div> |
| | | <!-- table区域-end --> |
| | |
| | | align: 'center', |
| | | dataIndex: 'minimumRange' |
| | | }, |
| | | { |
| | | title:'', |
| | | dataIndex:'action1', |
| | | align:'center', |
| | | scopedSlots: { |
| | | customRender: 'action1' |
| | | } |
| | | }, |
| | | // { |
| | | // title:'', |
| | | // dataIndex:'action1', |
| | | // align:'center', |
| | | // scopedSlots: { |
| | | // customRender: 'action1' |
| | | // } |
| | | // }, |
| | | { |
| | | title: '最大范围(单位:%)', |
| | | align: 'center', |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="车间分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled" ref="selectedProduction" prop="selectedProduction"> |
| | | <a-form-model-item v-if="isDepartType == 0" label="车间分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled" ref="selectedProduction" prop="selectedProduction"> |
| | | <!--<j-select-equipment-production v-decorator="['selectedProduction',{rules:[{required:true,message:'请选择车间!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>--> |
| | | |
| | | |
| | | |
| | | <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production> |
| | | </a-form-model-item> |
| | | <a-form-model-item v-if="isDepartType == -1" label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-select :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请选择设备类型" |
| | | :triggerChange="true" |
| | | v-model="model.equipmentType"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | | {{item.equipmentTypeName}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-form-model-item v-if="isDepartType == -1" label="系统版本号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请输入系统版本号" |
| | | v-model="model.systemVersion"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item v-if="isDepartType == 0" label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-select :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请选择设备类型" |
| | | :triggerChange="true" |
| | | v-model="model.equipmentType"> |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label="系统版本号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-form-model-item v-if="isDepartType == 0" label="系统版本号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请输入系统版本号" |
| | | v-model="model.systemVersion"/> |
| | | </a-form-model-item> |
| | |
| | | import DeviceListModel from './DeviceListModal' |
| | | import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart' |
| | | import AFormModelItem from 'ant-design-vue/es/form-model/FormItem' |
| | | import {mapActions} from 'vuex' |
| | | export default { |
| | | name: "UserModal", |
| | | components: { |
| | |
| | | rolesOptions:[], |
| | | nextDepartOptions:[], |
| | | nextProductionOptions:[], |
| | | selectList:[] |
| | | selectList:[], |
| | | isDepartType:'' |
| | | } |
| | | }, |
| | | created () { |
| | | const token = Vue.ls.get(ACCESS_TOKEN); |
| | | this.headers = {"X-Access-Token":token} |
| | | this.queryGroup() |
| | | this.queryTreeData() |
| | | // this.initRoleList() |
| | | // this.initTenantList() |
| | | }, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | | }, |
| | | queryGroup() { |
| | | getAction(this.url.queryEquipmentType).then(res => { |
| | | if (res.success) { |
| | |
| | | <!--利用率和开动率--> |
| | | <div class="UtilizationStartup"> |
| | | <div class="Utilization Line-box"> |
| | | <!--<div class="title">--> |
| | | <!--<div class="circle"></div>--> |
| | | <!--<div class="text">开机率</div>--> |
| | | <!--</div>--> |
| | | <div class="title"> |
| | | <div class="circle"></div> |
| | | <div class="text">运行效率</div> |
| | | </div> |
| | | <div class="Utilization-box box-bottom"> |
| | | <div class="Utilization-right" ref="UtilizationLine" id="UtilizationLine"></div> |
| | | </div> |
| | | </div> |
| | | <div class="Startup Line-box"> |
| | | <!--<div class="title">--> |
| | | <!--<div class="circle"></div>--> |
| | | <!--<div class="text">开动率</div>--> |
| | | <!--</div>--> |
| | | <div class="title"> |
| | | <div class="circle"></div> |
| | | <div class="text">运行效率</div> |
| | | </div> |
| | | <div class="Startup-box box-bottom"> |
| | | <div class="Startup-right" ref="StartupLine" id="StartupLine"></div> |
| | | </div> |
| | |
| | | //开机时间\关机时间 |
| | | let UtilizationLine = this.$echarts.init(document.getElementById('UtilizationLine'), 'macarons'); |
| | | let statChartPieOption1 = { |
| | | title: { |
| | | x: 'left', |
| | | subtext: '开机效率' |
| | | }, |
| | | // title: { |
| | | // x: 'left', |
| | | // subtext: '开机效率', |
| | | // textStyle: { |
| | | // color: '#268e80', |
| | | // fontSize: 20, |
| | | // |
| | | // }, |
| | | // }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: "{a} <br/>{b} : {c} ({d}%)" |
| | |
| | | //运行时间\待机时间 |
| | | let StartupLine = this.$echarts.init(document.getElementById('StartupLine'), 'macarons'); |
| | | let statChartPieOption2 = { |
| | | title: { |
| | | x: 'left', |
| | | subtext: '运行效率' |
| | | }, |
| | | // title: { |
| | | // x: 'left', |
| | | // subtext: '运行效率' |
| | | // }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: "{a} <br/>{b} : {c} ({d}%)" |
| | |
| | | this.openRate=this.RateList[0].openRate |
| | | this.usedRate=this.RateList[0].processRate |
| | | this.waitRate=this.RateList[0].waitRate |
| | | pieCompChartOption1.series[0].data = [{value:this.openRate, name:'开机率'},{value:this.closeRate, name:'关机率'}]; |
| | | pieCompChartOption1.series[0].data = [{value:(this.openRate * 100).toFixed(2), name:'开机率'},{value:(this.closeRate * 100).toFixed(2), name:'关机率'}]; |
| | | pieCompChartOption2.series[0].data = [{value:(this.usedRate * 100).toFixed(2), name:'加工率'},{value:(this.waitRate * 100).toFixed(2), name:'待机率'},{value:(this.closeRate * 100).toFixed(2), name:'关机率'}]; |
| | | pieCompChart1.setOption(pieCompChartOption1); |
| | | pieCompChart2.setOption(pieCompChartOption2); |
| | |
| | | color: #000000; |
| | | } |
| | | /deep/ .mainBox .wh_content_all .wh_content_item .wh_isMark { |
| | | color: #1890ff; |
| | | border:1px solid #1890ff; |
| | | border-radius: 50%; |
| | | /*color: #1890ff;*/ |
| | | /*border:1px solid #1890ff;*/ |
| | | /*border-radius: 50%;*/ |
| | | color: #ffffff; |
| | | background-color: blue; |
| | | } |
| | | /deep/ .mainBox .wh_content_all .wh_content_item .wh_isToday { |
| | | /*background: #33ad53;*/ |
| | |
| | | |
| | | </style> |
| | | |
| | | <!--<style lang="scss">--> |
| | | |
| | | <!--.mark1 {--> |
| | | <!--color: white !important;--> |
| | | <!--background: #1890ff !important;--> |
| | | <!--border-radius: 50%;--> |
| | | <!--}--> |
| | | |
| | | <!--.mainBox {--> |
| | | <!--.wh_content_all { /*主体*/--> |
| | | <!--background-color: #ffffff;--> |
| | | <!--border: 1px silver solid;--> |
| | | <!--border-radius: 5px;--> |
| | | <!--.wh_jiantou1{/*左箭头*/--> |
| | | <!--border-top: 2px solid #000000;--> |
| | | <!--border-left: 2px solid #000000;--> |
| | | <!--}--> |
| | | <!--.wh_jiantou2{/*右箭头*/--> |
| | | <!--border-top: 2px solid #000000;--> |
| | | <!--border-right: 2px solid #000000;--> |
| | | <!--}--> |
| | | <!--.wh_top_changge li { /*当前年月标题*/--> |
| | | <!--color: black;--> |
| | | <!--}--> |
| | | <!--.wh_content_item {--> |
| | | <!--margin-top: 5px;--> |
| | | <!--.wh_top_tag{/*星期标题*/--> |
| | | <!--color: #000000;--> |
| | | <!--}--> |
| | | <!--.wh_item_date {/*当前月*/--> |
| | | <!--color: #000000;--> |
| | | <!--}--> |
| | | <!--.wh_item_date:hover { //悬浮--> |
| | | <!--color: #1890ff;--> |
| | | <!--background: #ffffff;--> |
| | | <!--border-radius: 50%;--> |
| | | <!--}--> |
| | | <!--.wh_other_dayhide { /*上月和下月时间*/--> |
| | | <!--color: #bfbfbf;--> |
| | | <!--}--> |
| | | <!--.wh_chose_day { //选中--> |
| | | <!--background: #ffffff;--> |
| | | <!--color: #000000;--> |
| | | <!--}--> |
| | | <!--.wh_isToday { /*当前天*/--> |
| | | <!--/*background: #33ad53;*/--> |
| | | <!--background: #ff4d4d;--> |
| | | <!--color: #ffffff;--> |
| | | <!--}--> |
| | | <!--}--> |
| | | |
| | | <!--}--> |
| | | <!--}--> |
| | | <!--</style>--> |
| | | |
| | | |
| | | |
| | |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.visible = false |
| | | this.visible = false; |
| | | this.stratOpen = false; |
| | | this.endOpen = false; |
| | | }, |
| | | checkboxOnChange(e) { |
| | | if (e.length <= 3) { |
| | |
| | | <span v-if="item.status == 23" |
| | | :style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span> |
| | | </div> |
| | | <div v-if="item.status == 22" style="z-index: 999;" |
| | | <div style="z-index: 999;" |
| | | :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}' |
| | | v-for="item in waring"> |
| | | v-for="item in info.value.waring"> |
| | | <span |
| | | :style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span> |
| | | </div> |
| | |
| | | // console.log(tmp) |
| | | if (tmp) { |
| | | if (tmp.normal) { |
| | | for (let i = 0; i < tmp.normal.length; i++) { |
| | | tmp.normal[i].dateProportion = tmp.normal[i].duration / 86400 * 100 + '%' |
| | | for (let k = 0; k < tmp.normal.length; k++) { |
| | | tmp.normal[k].dateProportion = tmp.normal[k].duration / 86400 * 100 + '%' |
| | | // let leftTmp = (moment(tmp.normal[i].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 |
| | | // tmp.normal[i].left = leftTmp / 86400 * 100 + '%' |
| | | } |
| | | } else { |
| | | tmp.normal = [] |
| | | } |
| | | /*if (tmp.waring) { |
| | | for (let i = 0; i < tmp.waring.length; i++) { |
| | | tmp.waring[i].dateProportion = tmp.waring[i].duration / 86400 * 100 + '%' |
| | | let leftTmp = (moment(tmp.waring[i].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 |
| | | tmp.waring[i].left = leftTmp / 86400 * 100 + '%' |
| | | if (tmp.waring) { |
| | | // console.log("测试判断") |
| | | for (let j = 0; j < tmp.waring.length; j++) { |
| | | tmp.waring[j].dateProportion = tmp.waring[j].duration / 86400 * 100 + '%' |
| | | let leftTmp = (moment(tmp.waring[j].startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() - 57600000) / 1000 % 86400 |
| | | tmp.waring[j].left = leftTmp / 86400 * 100 + '%' |
| | | } |
| | | } else { |
| | | tmp.waring = [] |
| | | }*/ |
| | | } |
| | | } else { |
| | | res.result[i].value = { normal: [], waring: [] } |
| | | } |
| | |
| | | <a @click="pauseJob(record)" v-if="record.status==0">停止</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a @click="handlequartzLog(record)">日志</a> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item><a @click="executeImmediately(record)">立即执行</a></a-menu-item> |
| | | <a-menu-item><a @click="handleEdit(record)">编辑</a></a-menu-item> |
| | | <a-menu-item><a @click="handlequartzLog(record)">日志</a></a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
| | | <a>删除</a> |