diff --git a/src/api/kanban/equipment.js b/src/api/kanban/equipment.js new file mode 100644 index 0000000..5c2ad63 --- /dev/null +++ b/src/api/kanban/equipment.js @@ -0,0 +1,56 @@ +import request from '@/utils/request' +// 获取工厂下拉列表 +export function getBoardFactory(data) { + return request({ + url: 'http://192.168.202.34:30000/prod-api/mes/wcsInterface/getBoardFactory', + method: 'post', + data: data + }); +} +// 获取班次 +export function getBoardShifts(data) { + return request({ + url: '/mes/wcsInterface/getBoardShifts', + method: 'post', + data: data + }); +} +// 获取待维修的维修工单接口 +export function getRepairWorkOrder(data) { + return request({ + url: '/device/deviceInterface/getRepairWorkOrder', + method: 'get', + params: data, + }); +} +// 获取设备信息接口 +export function getEquipmentInfo(data) { + return request({ + url: '/device/deviceInterface/getEquipmentInfo', + method: 'get', + params: data + }); +} +// 获取维修质量信息TOP10接口 +export function getRepairQuantity(data) { + return request({ + url: '/device/deviceInterface/getRepairQuantity', + method: 'get', + params: data + }); +} +// 完好设备占比 +export function equipmentIntactRate(data) { + return request({ + url: '/device/deviceInterface/equipmentIntactRate', + method: 'get', + params: data + }); +}// 设备稳定性 +export function equipmentStability(data) { + return request({ + url: '/device/deviceInterface/equipmentStability', + method: 'get', + params: data + }); +} \ No newline at end of file diff --git a/src/utils/request.js b/src/utils/request.js index 884f139..59f0874 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -24,6 +24,7 @@ const service = axios.create({ service.interceptors.request.use(config => { if(localStorage.getItem('USER_POOL_NAME_CURRENT')){ config.headers['poolName'] = localStorage.getItem('USER_POOL_NAME_CURRENT'); + console.log(localStorage.getItem('USER_POOL_NAME_CURRENT')) } // 是否需要设置 token const isToken = (config.headers || {}).isToken === false @@ -34,6 +35,9 @@ service.interceptors.request.use(config => { } // get请求映射params参数 if (config.method === 'get' && config.params) { + if(config.params.poolName){ + config.headers['poolName'] = config.params.poolName; + } let url = config.url + '?' + tansParams(config.params); url = url.slice(0, -1); config.params = {}; diff --git a/src/views/dashboard/LineChart.vue b/src/views/dashboard/LineChart.vue index 129f9e1..410572b 100644 --- a/src/views/dashboard/LineChart.vue +++ b/src/views/dashboard/LineChart.vue @@ -117,6 +117,24 @@ restore: {}, saveAsImage: {} } + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + formatter: function (params) { + let result=""; + for (let i = 0; i < params.length; i++) { + if(params[i].data!=0){ + result+=params[i].marker + params[i].seriesName + ':' + params[i].data + '
' + } + } + return params[0].name + '
' + + result + + } + } }) } diff --git a/src/views/kanban/equipment/index.vue b/src/views/kanban/equipment/index.vue index 7ac077e..72d77be 100644 --- a/src/views/kanban/equipment/index.vue +++ b/src/views/kanban/equipment/index.vue @@ -22,14 +22,13 @@ -
+ -
+ -->
@@ -58,13 +57,13 @@ - - - - - - + v-for="(n, index) in equipmentlist"> + + + + + +
1测试设备测试部门1在用10%90%{{index+1}}{{n.equipmentName}}{{n.department}}{{n.equipmentStatus}}{{n.failureRate !=null ?n.failureRate+'%':'--'}}{{n.utilizationRatio !=null?n.utilizationRatio+'%':'--'}}
@@ -95,15 +94,15 @@ - - - - - - - - + v-for="(n, index) in repairlist"> + + + + + + + +
1测试设备BM000001位置1故障原因1维修组2023-11-07 08:30:33{{index+1}}{{n.equipmentName}}{{n.equipmentCode}}{{n.equipmentLocation}}{{n.workFaultDesc}}{{n.teamName}}{{n.workHandle}}{{n.workPlanTime}}
@@ -122,7 +121,7 @@
- 24 + {{equipmentinfo.totalEquipment}} 台 @@ -134,22 +133,22 @@
- - 24 + + {{equipmentinfo.faultEquipment}}
- 设备总数 + 故障总数
-
+
-
-
+ -->
设备稳定性
@@ -197,10 +194,10 @@ - - - + v-for="(n, index) in equipmentstabilizelist"> + + +
1测试设备88%{{index+1}}{{n.equipmentCode}}{{n.mtbf !=null ?n.mtbf+'%':'--'}}
@@ -226,10 +223,10 @@ - - - + v-for="(n, index) in equipmentrepairlist"> + + +
1测试设备88%{{index+1}}{{n.equipmentName}}{{n.rapairQuantity !=null ?n.rapairQuantity+'%':'--'}}
@@ -249,7 +246,12 @@ import { getBoardFactory, getMesBoardEquProductionToday, getBoardShifts, -} from "@/api/kanban/dailyoutput"; + getRepairWorkOrder, + getEquipmentInfo, + getRepairQuantity, + equipmentIntactRate, + equipmentStability, +} from "@/api/kanban/equipment"; import * as echarts from "echarts"; import moment from "moment"; // import Echarts3D from "./echarts3d.vue"; @@ -302,8 +304,193 @@ export default { }, { -}, + }, ], + repairlist: [], + equipmentlist: [], + equipmentrepairlist: [], + equipmentstabilizelist: [], + equipmentinfo: [], + // { + // "createBy": null, + // "createTime": null, + // "updateBy": null, + // "updateTime": null, + // "remark": null, + // "poolName": null, + // "deptId": null, + // "parentId": null, + // "ancestors": null, + // "deptName": "中山恒阳工厂", + // "orderNum": null, + // "leader": null, + // "phone": null, + // "email": null, + // "status": null, + // "delFlag": null, + // "parentName": "999", + // "children": [] + // }, + // { + // "createBy": null, + // "createTime": null, + // "updateBy": null, + // "updateTime": null, + // "remark": null, + // "poolName": null, + // "deptId": null, + // "parentId": null, + // "ancestors": null, + // "deptName": "中山小榄工厂", + // "orderNum": null, + // "leader": null, + // "phone": null, + // "email": null, + // "status": null, + // "delFlag": null, + // "parentName": "1000", + // "children": [] + // }, + // { + // "createBy": null, + // "createTime": null, + // "updateBy": null, + // "updateTime": null, + // "remark": null, + // "poolName": null, + // "deptId": null, + // "parentId": null, + // "ancestors": null, + // "deptName": "内委虚拟工厂", + // "orderNum": null, + // "leader": null, + // "phone": null, + // "email": null, + // "status": null, + // "delFlag": null, + // "parentName": "1001", + // "children": [] + // }, + // { + // "createBy": null, + // "createTime": null, + // "updateBy": null, + // "updateTime": null, + // "remark": null, + // "poolName": null, + // "deptId": null, + // "parentId": null, + // "ancestors": null, + // "deptName": "中山雅黛工厂", + // "orderNum": null, + // "leader": null, + // "phone": null, + // "email": null, + // "status": null, + // "delFlag": null, + // "parentName": "1010", + // "children": [] + // }, + // { + // "createBy": null, + // "createTime": null, + // "updateBy": null, + // "updateTime": null, + // "remark": null, + // "poolName": null, + // "deptId": null, + // "parentId": null, + // "ancestors": null, + // "deptName": "中山雅黛工厂(OEM业务)", + // "orderNum": null, + // "leader": null, + // "phone": null, + // "email": null, + // "status": null, + // "delFlag": null, + // "parentName": "1011", + // "children": [] + // }, + // { + // "createBy": null, + // "createTime": null, + // "updateBy": null, + // "updateTime": null, + // "remark": null, + // "poolName": null, + // "deptId": null, + // "parentId": null, + // "ancestors": null, + // "deptName": "重庆榄菊工厂", + // "orderNum": null, + // "leader": null, + // "phone": null, + // "email": null, + // "status": null, + // "delFlag": null, + // "parentName": "1020", + // "children": [] + // }, + // { + // "createBy": null, + // "createTime": null, + // "updateBy": null, + // "updateTime": null, + // "remark": null, + // "poolName": null, + // "deptId": null, + // "parentId": null, + // "ancestors": null, + // "deptName": "江西榄菊工厂", + // "orderNum": null, + // "leader": null, + // "phone": null, + // "email": null, + // "status": null, + // "delFlag": null, + // "parentName": "1030", + // "children": [] + // }, + // { + // "createBy": null, + // "createTime": null, + // "updateBy": null, + // "updateTime": null, + // "remark": null, + // "poolName": null, + // "deptId": null, + // "parentId": null, + // "ancestors": null, + // "deptName": "安徽榄菊工厂", + // "orderNum": null, + // "leader": null, + // "phone": null, + // "email": null, + // "status": null, + // "delFlag": null, + // "parentName": "1040", + // "children": [] + // }, + // { + // "createBy": null, + // "createTime": null, + // "updateBy": null, + // "updateTime": null, + // "remark": null, + // "poolName": null, + // "deptId": null, + // "parentId": null, + // "ancestors": null, + // "deptName": "安徽榄菊工厂(OEM业务)", + // "orderNum": null, + // "leader": null, + // "phone": null, + // "email": null, + // "status": null, + // "delFlag": null, + // "parentName": "1041", + // "children": [] + // }, }; }, created() { }, @@ -313,10 +500,10 @@ export default { }, mounted() { // this.datetime = moment().subtract(2, "day").format("yyyy-MM-DD"); - //console.log('zhuanhuahou',this.dateRangeone) + //console.log('zhuanhuahou',this.dateRangeone) + // this.getdatalist(this.selectxt) this.selectFactorylist(); this.gettime(); - this.initChart1(); }, methods: { back() { @@ -336,27 +523,61 @@ export default { if (response.data) { _this.getLineList = response.data; _this.selectxt = _this.getLineList[0].parentName; - getBoardShifts({ - factory: _this.selectxt, - }).then((response) => { - if (response.data) { - console.log(response.data); - _this.classesList = response.data; - _this.selectxtclasses = _this.classesList[0].shiftId; - _this.initChart1(); - _this.time1 = setInterval(() => { - _this.initChart1(); - }, 1000 * 60 * 1); - } + _this.getdatalist(_this.selectxt) + } + }); + }, + getdatalist(Name) { + const _this = this; + let poolName = 'ds_' + Name + getRepairWorkOrder({ + poolName: poolName, + }).then((response) => { + if(response.data){ + response.data.forEach((item) => { + item.workPlanTime = moment(item.workPlanTime).format('YYYY-MM-DD HH:mm:ss') }); + _this.repairlist = response.data + } + }); + getEquipmentInfo({ + poolName: poolName, + }).then((response) => { + if(response.data){ + _this.equipmentlist = response.data + } + }); + getRepairQuantity({ + poolName: poolName, + }).then((response) => { + if(response.data){ + _this.equipmentrepairlist = response.data + } + }); + equipmentIntactRate({ + poolName: poolName, + }).then((response) => { + if(response.data){ + _this.equipmentinfo = response.data + _this.initChart1() + } + }); + equipmentStability({ + poolName: poolName, + }).then((response) => { + if(response.data){ + _this.equipmentstabilizelist = response.data } - - - }); }, initChart1() { - + const _this = this + let intactRate = 0 + let numberAngle = 180 + if(_this.equipmentinfo.intactRate){ + intactRate = _this.equipmentinfo.intactRate + numberAngle = parseInt(_this.equipmentinfo.intactRate)*1.8 - 180 + } var myChart1 = echarts.init(document.querySelector("#echart1")); var option1 = { //提示框组件。开发实际中去掉了指针,提示框可以不用设置。 @@ -517,7 +738,7 @@ export default { //半径 radius: 115, //起始角度。圆心 正右手侧为0度,正上方为90度,正左手侧为180度。 - startAngle: 18, + startAngle: numberAngle, //结束角度。 endAngle: 0, center: ["50%", "100%"], @@ -579,7 +800,6 @@ export default { show: false, }, }, - { //类型 color: "#fff", @@ -671,7 +891,7 @@ export default { }, data: [ { - value: 10, + value: intactRate, }, ], @@ -686,20 +906,9 @@ export default { this.optionDatalist2 = []; this.optionDatalist3 = []; this.optionDatalist4 = []; - getBoardShifts({ - factory: _this.selectxt, - }).then((response) => { - if (response.data) { - console.log(response.data); - _this.classesList = response.data; - _this.selectxtclasses = _this.classesList[0].shiftId; - _this.initChart1(); - } - }); - }, - selectline2() { - this.initChart1(); + _this.getdatalist(_this.selectxt) }, + //左侧第一个选择类型下拉框 回调函数 }, }; @@ -827,6 +1036,7 @@ export default { // width: 1775px; margin: auto; overflow-y: scroll; + table { width: 100%; @@ -928,6 +1138,7 @@ export default { margin-top: 19px; display: flex; justify-content: space-around; + .item-table { width: 610px; height: 292px; @@ -938,7 +1149,7 @@ export default { box-sizing: border-box; .table-thead { - width: 1197px; + width: 100%; height: 44px; margin: auto; background: #0A1A33; @@ -978,13 +1189,18 @@ export default { } } + .item-table1:first-child { + margin-right: 10px; + } + .item-table1 { + flex: 1; margin-top: 20px; padding-top: 19px; - .table-thead { - width: 565.01px; - } + // .table-thead { + // width: 565.01px; + // } .table-tbody { height: 144px; @@ -1026,7 +1242,7 @@ export default { display: flex; align-items: center; justify-content: space-around; - width: 310px; + width: 350px; margin-left: 50px; } @@ -1140,6 +1356,7 @@ export default { .active2 { // background-color: #04060E; } + ::-webkit-scrollbar { width: 3px; height: 0px; @@ -1158,5 +1375,4 @@ export default { border-radius: 8px; -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); background-color: #0091ff; -} - +} diff --git a/src/views/quality/checkTypeProject/MaterialGroupAdd.vue b/src/views/quality/checkTypeProject/MaterialGroupAdd.vue index 241869d..de43968 100644 --- a/src/views/quality/checkTypeProject/MaterialGroupAdd.vue +++ b/src/views/quality/checkTypeProject/MaterialGroupAdd.vue @@ -7,7 +7,7 @@
+