diff --git a/src/api/model/cms.js b/src/api/model/cms.js new file mode 100644 index 00000000..8cb76e4d --- /dev/null +++ b/src/api/model/cms.js @@ -0,0 +1,64 @@ +import config from "@/config" +import http from "@/utils/request" +/*公告视频接口*/ +export default { + article: { + list: { + name: "获取列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/cms/article/`, + data + ); + } + }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/cms/article/${id}/` + ); + } + }, + cquery: { + name: "复杂查询", + req: async function(data){ + return await http.post( + `${config.API_URL}/cms/article/cquery/`, + data); + } + }, + update: { + name: "编辑更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/cms/article/${id}/`, + data); + } + }, + create: { + name: "新增", + req: async function(data){ + return await http.post( + `${config.API_URL}/cms/article/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/cms/article/${id}/`); + } + }, + toggle_top: { + name: "文章置顶/取消", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/cms/article/${id}/toggle_top/`, + data); + } + }, + + }, +} diff --git a/src/components/scEcharts/index.vue b/src/components/scEcharts/index.vue index 9e2112c4..793ef653 100644 --- a/src/components/scEcharts/index.vue +++ b/src/components/scEcharts/index.vue @@ -27,7 +27,15 @@ option: { deep:true, handler (v) { - unwarp(this.myChart).setOption(v); + let that = this; + if(that.myChart!==null){ + that.myChart.setOption(v); + }else{ + let myChart = echarts.init(that.$refs.scEcharts, 'T'); + myChart.setOption(v); + that.myChart = myChart; + } + // unwarp(this.myChart).setOption(v); } } }, diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue index 61bd7604..1ba1973b 100644 --- a/src/components/scTable/index.vue +++ b/src/components/scTable/index.vue @@ -92,6 +92,7 @@ export default { tableName: { type: String, default: "" }, apiObj: { type: Object, default: () => { } }, params: { type: Object, default: () => ({}) }, + query: { type: Object, default: () => ({}) }, data: { type: Object, default: () => { } }, height: { type: [String, Number], default: "100%" }, size: { type: String, default: "default" }, @@ -123,9 +124,16 @@ export default { this.total = this.tableData.length; }, apiObj() { - // this.tableParams = this.params; + this.tableParams = this.params; this.refresh(); }, + // query 暂时不监听手动调用 + // query: { + // handler() { + // this.refresh(); + // }, + // deep: true + // } }, computed: { _height() { @@ -210,7 +218,7 @@ export default { // delete reqData[config.request.page] // delete reqData[config.request.pageSize] } - var c = Object.assign({}, this.tableParams, reqData) + var c = Object.assign({}, this.query, this.tableParams, reqData) try { if (this.apiObj) { var res = await this.apiObj.req(c); diff --git a/src/components/xtSelect/index.vue b/src/components/xtSelect/index.vue index ba10a0ef..cc7d1c3d 100644 --- a/src/components/xtSelect/index.vue +++ b/src/components/xtSelect/index.vue @@ -75,7 +75,7 @@ const props = defineProps({ edit: { type: Boolean, default: true }, hidePagination: { type: Boolean, default: false }, tableWidth: { type: Number, default: 600 }, - tableHeight: { type: Number, default: 400 }, + tableHeight: { type: Number, default: 300 }, apiObj: { type: Object, default: null }, params: { type: Object, default: () => {} }, label: { type: [String, Number, Array], default: "" }, @@ -126,7 +126,7 @@ onMounted(() => { selectLabel.value = selectedOption ? selectedOption[props.labelField] : ""; - } else { + } else if (props.obj) { selectLabel.value = props.obj[props.labelField]; } } diff --git a/src/config/route.js b/src/config/route.js index 953fafa5..c20b2c11 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -142,6 +142,15 @@ const routes = [ }, component: "home/event", }, + { + name: "articles", + path: "/articles", + meta: { + title: "公告视频", + perms: ["articles"], + }, + component: "home/articles", + }, ], }, //审批 @@ -3350,6 +3359,17 @@ const routes = [ }, component: "statistics/statistics_inm.vue", }, + //返工统计——光芯 + { + path: "/rework_gx", + name: "rework_gx", + meta: { + title: "返工统计", + icon: "el-icon-trend-charts", + perms: ["rework_gx"], + }, + component: "statistics/rework_gx.vue", + }, //过程检验统计——光芯 { path: "/process_check_gx", @@ -3372,6 +3392,17 @@ const routes = [ }, component: "statistics/good_check_gx.vue", }, + //成品检验记录——光芯 + { + path: "/check_record_gx", + name: "check_record_gx", + meta: { + title: "成品检验记录", + icon: "el-icon-trend-charts", + perms: ["check_record_gx"], + }, + component: "statistics/check_record_gx.vue", + }, //扫边车间数据汇总——光芯 // { // path: "/statistics_saobian", diff --git a/src/main.js b/src/main.js index 295fa29b..e55fa8bb 100644 --- a/src/main.js +++ b/src/main.js @@ -3,7 +3,7 @@ import ElementPlus from "element-plus"; import "element-plus/dist/index.css"; import "element-plus/theme-chalk/display.css"; import scui from "./scui"; -import xui from "./xui"; +import xtui from "./xtui"; import i18n from "./locales"; import router from "./router"; import store from "./store"; @@ -26,7 +26,7 @@ app.use(ElementPlus); app.use(Cesium); app.use(i18n); app.use(scui); -app.use(xui); +app.use(xtui); app.use(preventReClick); app.use(Print); app.use(Xlsx); diff --git a/src/utils/tool.js b/src/utils/tool.js index 0e44a085..d92ef2fc 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -173,6 +173,7 @@ tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') { } return fmt; } +// YYYY-MM-DD hh:mm:ss tool.dateFormat1 = function (date) { date = new Date(date); let newDate = ''; @@ -190,7 +191,7 @@ tool.dateFormat1 = function (date) { newDate = year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second; return newDate; } -// 格式化某一天 +// YYYY-MM-DD 格式化某一天 tool.dateFormat2 = function (date) { date = new Date(date); let newDate = ''; @@ -203,7 +204,7 @@ tool.dateFormat2 = function (date) { return newDate; } // 格式化某一月 -tool.dateFormat2 = function (date) { +tool.monthFormat = function (date) { date = new Date(date); let first = ''; let lastDate = '',year2 = '',month2 = ''; diff --git a/src/views/am/audio.vue b/src/views/am/audio.vue index f5658919..39872f70 100644 --- a/src/views/am/audio.vue +++ b/src/views/am/audio.vue @@ -91,7 +91,8 @@ export default { mounted(){ let that = this; let host = window.location.host; - let jsUrl = host.indexOf('localhost')>-1?'http://222.222.144.147:6013/jsmap/jsmap.js':host+'/jsmap/jsmap.js'; + let jsUrl = host.indexOf('localhost')>-1?'http://222.222.144.147:6013/jsmap/jsmap.js':window.location.protocol + "//" + host+'/jsmap/jsmap.js'; + console.log(jsUrl) that.loadScript('mapId',jsUrl, () => { that.canUseMap = true; }) diff --git a/src/views/am/monitor.vue b/src/views/am/monitor.vue index 5f70cbcd..823e9e89 100644 --- a/src/views/am/monitor.vue +++ b/src/views/am/monitor.vue @@ -154,7 +154,7 @@ export default { this.getArea(); let that = this; let host = window.location.host; - let jsUrl = host.indexOf('localhost') > -1 ? 'http://222.222.144.147:6013/jsmap/jsmap.js' : host + '/jsmap/jsmap.js'; + let jsUrl = host.indexOf('localhost') > -1 ? 'http://222.222.144.147:6013/jsmap/jsmap.js' : window.location.protocol + "//" + host+'/jsmap/jsmap.js'; that.loadScript('mapId', jsUrl, () => { that.canUseMap = true; }) diff --git a/src/views/bigScreen/index_gx.vue b/src/views/bigScreen/index_gx.vue index 9e910cb8..57c09b3d 100644 --- a/src/views/bigScreen/index_gx.vue +++ b/src/views/bigScreen/index_gx.vue @@ -16,7 +16,6 @@
-
任务产量
-
+
日产量 @@ -68,7 +67,7 @@
-
+
周产量 @@ -82,7 +81,7 @@
-
+
月产量 @@ -105,8 +104,7 @@
设备运转状态
- -
+
@@ -130,14 +128,12 @@ @@ -148,15 +144,13 @@
质量分析
-
-
- - - - - +
+ + + + +
-
@@ -166,18 +160,18 @@
实时视频
-
-
+
宣传公告
-
+
@@ -194,12 +188,20 @@
+
-
+ +
-
-
白片抛
-
-
- -
-
-
-
-
扫边A
-
-
- -
-
-
-
-
黑化
-
-
- -
-
-
-
-
退火
-
-
- -
-
-
-
-
减薄A
-
-
- -
-
-
-
-
减薄B
-
-
- -
-
-
-
-
平磨
-
-
- -
-
-
-
-
精雕
-
-
- -
-
-
-
-
一次抛
-
-
- -
-
-
-
-
扫边B
-
-
- -
-
-
-
-
成品抛
-
-
- -
-
-
-
-
倒角
-
-
- -
-
-
-
-
一次超洗
-
-
- -
-
-
-
-
二次超洗
-
-
- -
-
-
-
-
三次超洗
-
-
- -
-
-
-
-
切片
-
-
+
切片
+
+
-
+
-
-
白片抛
-
-
- -
-
-
-
-
扫边A
-
-
+
扫边A
+
+
-
+
-
-
黑化
-
-
+
黑化
+
+
-
+
-
-
退火
-
-
+
退火
+
+
-
+
-
-
减薄A
-
-
+
减薄A
+
+
-
+
-
-
减薄B
-
-
+
减薄B
+
+
-
+
-
-
平磨
-
-
- -
-
-
-
-
精雕
-
-
+
精雕
+
+
-
+
-
-
一次抛
-
-
+
一次抛
+
+
-
+
-
-
扫边B
-
-
+
扫边B
+
+
-
+
-
-
成品抛
-
-
+
成品抛
+
+
-
+
-
-
倒角
-
-
+
倒角
+
+
-
+
-
-
一次超洗
-
-
+
一次超洗
+
+
-
+
-
-
二次超洗
-
-
+
二次超洗
+
+
-
+
-
-
三次超洗
-
-
+
三次超洗
+
+
-
+
+
+
切片
+
+ + +
+
@@ -604,41 +384,162 @@ BABYLON.DracoCompression.Configuration.decoder.fallbackUrl = import "babylonjs-loaders"; import "animate.css"; const configData={ - header : ['物料批次','未加工','进行中','已完成'], + header : ['物料批次','未加工','进行中','已完成','合格数'], headerBGC : '#0a3f44', - rowNum : 8, + rowNum : 3, headerHeight : 35, align : 'center', - waitTime : 1500, - columnWidth: [160,80,80,80], + waitTime : 150000, + columnWidth: [110,68,68,68,68], data : [], } +const baseOption={ + color: ['rgb(255,160,0)','rgb(64,158,255)','rgb(54,256,158)'], + tooltip: { + trigger: 'item', + }, + grid:{ + top: '10%', + bottom: '10%', + }, + xAxis:{ + type: 'category', + axisLine: { + lineStyle: { + color: '#fff', + } + }, + axisLabel: { + interval: 0, + rotate: 40, + fontSize: 10, + color: '#fff', + }, + data:[1,2,3,4,5,6,7] + }, + yAxis:[ + { + type: 'value', + name: '数量', + axisLine: { + lineStyle: { + color: '#fff', + } + }, + axisLabel: { + fontSize: 10, + color: '#fff', + }, + + }, + { + type: "value", + name: "合格率", + position: "right", + alignTicks: true, + offset: 0, + axisLine: { + show: true, + lineStyle: { + fontSize: 8, + color: "rgb(54,256,158)", + }, + }, + axisLabel: { + formatter: "{value}", + }, + } + ], + legend: { + itemWidth: 12, + itemHeight: 12, + left: 'center', + bottom: '0.5%', + textStyle: { + color: '#fff', + fontSize: 10, + }, + }, + series: [ + { + name:'生产数', + type: 'bar', + barWidth: 10, + yAxisIndex: 0, + itemStyle: { + borderRadius: [ 5, 5, 0,0] + }, + data: [0,0,0,0,0,0,0] + }, + { + name: '合格数', + type: 'bar', + barWidth: 10, + yAxisIndex: 0, + itemStyle: { + borderRadius: [ 5, 5, 0,0] + }, + data: [0,0,0,0,0,0,0] + }, + { + name: '合格率', + type: 'line', + yAxisIndex: 1, + data: [0,0,0,0,0,0,0] + } + ] +} +const baseOption2= { + title: { + text: '总计', + left: 'center', + textStyle:{ + fontSize: 16, + color: '#fff', + } + }, + tooltip: { + trigger: 'item', + }, + legend: { + itemWidth: 12, + itemHeight: 12, + left: 'center', + bottom: '1%', + textStyle: { + color: '#fff', + fontSize: 10, + }, + }, + series: [{ + type: 'pie', + radius: ['40%', '70%'], + center: ['50%', '50%'], + label: false, + itemStyle: { + borderRadius: 5 + }, + data: [ + {value: 0, name: '合格'}, + {value: 0, name: '不合格'}, + ] + }] +} export default { components: { scEcharts }, data() { return { - colors: [ - { color: "#f95050", percentage: 20 }, - { color: "#e6a23c", percentage: 40 }, - { color: "#1989fa", percentage: 60 }, - { color: "#02f5f2", percentage: 80 }, - { color: "#5cb87a", percentage: 100 }, - ], - factoryName: "", - initialAlpha: -Math.PI / 4.5, - initialBeta: Math.PI / 2, - initialRadius: 2.5, + initialAlpha: Math.PI / 2, + initialBeta: Math.PI / 5, + initialRadius: 2.3, initialTarget: null, resizeTimeout: null, loadedPercent: 0, - currentLightMesh: null, - infoVisibel: false, - clickVisible: false, - eqChartShow:false, percentage: 25, updateTime: "2023-08-17 16:00:00", + //当前时间 currentTime: "", currentWeek: "", currentYear: "", @@ -648,177 +549,49 @@ export default { timerTime: null, start_date: "", end_date: "", - dialogData: { - deptName: "", - }, - currentData: { - deptName: "", - }, - deptName: "入窑生料", heightTimer: null, - count_shuliao: 0, - count_meihao: 0, - count_elec: 0, - blockTableHeight: 0, count_day:0, count_week:0, count_month:0, cprrws:0, - seriesData: [], + myChart: null, sectionNames: { - 石灰石破碎筛分生产系统: "石灰石破碎", - 原料磨: "原料磨", - 回转窑: "回转窑", - 煤磨: "煤磨", - 余热发电: "余热发电", - }, - options: { - title: { - text: '总计', - textStyle:{ - color: '#fff', - } - - }, - grid: { - top: '5%' - }, - tooltip: { - trigger: 'item', - }, - series: [{ - type: 'pie', - radius: ['40%', '70%'], - center: ['50%', '60%'], - label: false, - itemStyle: { - borderRadius: 5 - }, - data: [ - {value: 860, name: '合格'}, - {value: 10, name: '不合格'}, - ] - }] - }, - option1: { - title: { - text: '尺寸早班', - textStyle:{ - color: '#fff', - } - }, - grid: { - top: '5%' - }, - tooltip: { - trigger: 'item', - }, - series: [{ - type: 'pie', - radius: ['40%', '70%'], - center: ['50%', '60%'], - label: false, - itemStyle: { - borderRadius: 5 - }, - data: [ - {value: 860, name: '合格'}, - {value: 10, name: '不合格'}, - ] - }] - }, - option2: { - title: { - text: '尺寸晚班', - textStyle:{ - color: '#fff', - } - }, - grid: { - top: '5%' - }, - tooltip: { - trigger: 'item', - }, - series: [{ - type: 'pie', - radius: ['40%', '70%'], - center: ['50%', '60%'], - label: false, - itemStyle: { - borderRadius: 5 - }, - data: [ - {value: 860, name: '合格'}, - {value: 10, name: '不合格'}, - ] - }] - }, - option3: { - title: { - text: '外观早班', - textStyle:{ - color: '#fff', - } - }, - grid: { - top: '5%' - }, - tooltip: { - trigger: 'item', - }, - series: [{ - type: 'pie', - radius: ['40%', '70%'], - center: ['50%', '60%'], - label: false, - itemStyle: { - borderRadius: 5 - }, - data: [ - {value: 860, name: '合格'}, - {value: 10, name: '不合格'}, - ] - }] - }, - option4: { - title: { - text: '外观晚班', - textStyle:{ - color: '#fff', - } - }, - grid: { - top: '5%' - }, - tooltip: { - trigger: 'item', - }, - series: [{ - type: 'pie', - radius: ['40%', '70%'], - center: ['50%', '60%'], - label: false, - itemStyle: { - borderRadius: 5 - }, - data: [ - {value: 860, name: '合格'}, - {value: 10, name: '不合格'}, - ] - }] + // '立方体.010':'一层', + '地面': "一层",// + '一层地面': "一层",// 地面 + '地面.001': "二层",// 地面 + '二层地面': "二层",//地面.001 }, + // 质量分析饼状图option + options: {}, + option1: {}, + option2: {}, + option3: {}, + option4: {}, + //设备状态饼状图option option_eq: { color: ['rgb(145,204,117)', '#ffa500 ', 'rgb(250,200,88)', 'rgb(215,102,97)', 'rgb(185,51,46)' ], tooltip: { trigger: 'item', }, legend: { + show:true, + selected: { + '正常': true, + '限用': true, + '维修': true, + '禁用': true, + '报废': true, + }, + data: ['正常', '限用','维修', '禁用', '报废'], // 确保包括所有的系列名 // orient: 'vertical', left: 'center', bottom: '0', textStyle:{ color:"#ffffff" + }, + formatter: function (name) { + return name; // 或者根据需要调整显示内容 } }, series:{ @@ -845,7 +618,7 @@ export default { } }, data: [ - {value: 0, name: '正常'}, + {value: 173, name: '正常'}, {value: 0, name: '限用'}, {value: 0, name: '维修'}, {value: 0, name: '禁用'}, @@ -853,6 +626,7 @@ export default { ] } }, + //成品table数据 configDataProd:{ header:['物料名称','物料批次','物料数量'], headerBGC:'#0a3f44', @@ -860,17 +634,21 @@ export default { align:'center', data:[], rowNum : 3, - waitTime:1000, + waitTime:3000, + columnWidth: [260,260,100], }, + //原料table数据 configData30:{ - header:['物料批次','未加工','进行中','已完成'], + header:['物料名称','物料批次','物料数量'], headerBGC:'#0a3f44', headerHeight:35, align:'center', data:[], rowNum : 3, - waitTime:1000, + waitTime:3000, + columnWidth: [260,260,100], }, + //工序库存table数据 configData0:{}, configData1:{}, configData2:{}, @@ -889,6 +667,25 @@ export default { configData15:{}, scrollNum:0, scrollInterval:null, + //近七天日数组 + dayArr:[], + //工序柱状图option + options0:{}, + options1:{}, + options2:{}, + options3:{}, + options4:{}, + options5:{}, + options6:{}, + options7:{}, + options8:{}, + options9:{}, + options10:{}, + options11:{}, + options12:{}, + options13:{}, + options14:{}, + options15:{}, }; }, mounted() { @@ -903,33 +700,113 @@ export default { let month = nowDate.getMonth() + 1; let day = nowDate.getDate(); that.days = new Date(year, month, 0).getDate(); - // month = month < 10 ? "0" + month : month; that.currentYear = year; that.currentMonth = month; that.currentDay = day; + let dayArr = []; + for(let i=6;i>-1;i--){ + let date = new Date(nowDate.getTime()-i*24*60*60*1000); + let day = date.getDate(); + dayArr.push(day); + } + // dayArr.push(day); + that.dayArr = dayArr; that.getEquipments(); that.getMaterials(); that.getMgroup(); - that.getProcessData(); that.getTaskNumber(); that.addListener(); that.setIntervalFun(); - let myChart = echarts.init(document.getElementById('eqPieChart')); - myChart.setOption(that.option_eq); + that.getQulity(); + that.myChart = echarts.init(document.getElementById('eqPieChart')); + that.myChart.setOption(that.option_eq); + let index2 = 0; + this.chartInterval2 = setInterval(function () { + if (index2 < that.option_eq.series.data.length) { + that.myChart.dispatchAction({ + type: "downplay", + seriesIndex: 0, + }); + that.myChart.dispatchAction({ + type: "highlight", + seriesIndex: 0, + dataIndex: index2, + }); + that.myChart.dispatchAction({ + type: "showTip", + seriesIndex: 0, + dataIndex: index2, + }); + index2++; + } else { + index2 = 0; + } + }, 3000); }, methods: { + getQulity(){ + let that = this; + let month = that.currentMonth>9?that.currentMonth:'0'+that.currentMonth; + let day = that.currentDay>9?that.currentDay:'0'+that.currentDay; + let current_date = that.currentYear+'-'+month+'-'+day; + that.options = that.deepCopy(baseOption2); + that.option1 = that.deepCopy(baseOption2); + that.option1.title.text = '早班尺寸'; + that.option2 = that.deepCopy(baseOption2); + that.option2.title.text = '晚班尺寸'; + that.option3 = that.deepCopy(baseOption2); + that.option3.title.text = '早班外观'; + that.option4 = that.deepCopy(baseOption2); + that.option4.title.text = '晚班外观'; + let obj = { + query:{ + "fw_type":"prod", + "end_date":current_date, + "start_date":current_date, + "group_by_dept": ", dept.id", + "group_by_shift": ", shift.id", + "select_col_dept": ", dept.name as 部门", + "select_col_shift": ", shift.name as 班次" + }, + }; + that.$API.bi.dataset.exec.req('ftestDay2', obj).then((res) => { + if(res.data2.ds0){ + let lists = res.data2.ds0; + //根据工段名称分组 + if(lists.length>0){ + let count_ok = 0,count_notok=0; + lists.forEach((item) => { + count_ok += item.合格数; + count_notok += item.不合格数; + let index = 1; + if(item.班次=='早班'&&item.部门=='尺寸检测'){ + index = 1; + }else if(item.班次=='晚班'&&item.部门=='尺寸检测'){ + index = 2; + }else if(item.班次=='早班'&&item.部门=='外观检测'){ + index = 3; + }else if(item.班次=='晚班'&&item.部门=='外观检测'){ + index = 4; + } + let key = 'option'+index; + that[key].series.data[0].value = item.合格数; + that[key].series.data[1].value = item.不合格数; + }) + that.options.series.data[0].value = count_ok; + that.options.series.data[1].value = count_notok; + } + } + }); + }, setIntervalFun(){ let that = this; that.scrollInterval = setInterval(() => { - if(that.scrollNum>14){ - // console.log('清零'); + if(that.scrollNum>8){ that.scrollNum = 0; }else{ - // console.log('++++'); that.scrollNum++; } - // console.log('that.scrollNum',that.scrollNum); - let nums = that.scrollNum * 356; + let nums = that.scrollNum * 384; let lefts = 0-nums; document.getElementById("scroll").style.left = lefts +'px'; },6000) @@ -967,7 +844,6 @@ export default { var model = document.getElementsByClassName("model")[0]; if (windowWidth > 960) { container.style.overflow = "hidden"; - // container.style.height = windowHeight + "px"; model.style.position = "absolute"; model.style.height = windowHeight - 3 + "px"; model.style.top = 0; @@ -997,13 +873,13 @@ export default { let current_date = that.currentYear+'-'+month+'-'+day; let obj = {query:{current_date:current_date}}; that.$API.bi.dataset.exec.req('cprrws', obj).then((res) => { - if(res.data2.ds0){ + if(res.data2.ds0&&res.data2.ds0.length>0){ that.cprrws = res.data2.ds0[0].日任务数; } }); let objDay = {query:{start_date:current_date,end_date:current_date,mgroup_name:'三次超洗'}}; that.$API.bi.dataset.exec.req('lineDay_m2', objDay).then((res0) => { - if(res0.data2.ds0){ + if(res0.data2.ds0&&res0.data2.ds0.length>0){ that.count_day = res0.data2.ds0[0].生产数; } }); @@ -1020,7 +896,7 @@ export default { select_cols_date:', EXTRACT ( MONTH FROM mlog.work_end_time) AS 月,EXTRACT(WEEK FROM mlog.work_end_time) AS 周' }}; that.$API.bi.dataset.exec.req('lineDay_m2', objWeek).then((res1) => { - if(res1.data2.ds0){ + if(res1.data2.ds0&&res1.data2.ds0.length>0){ that.count_week = res1.data2.ds0[0].生产数; } }); @@ -1032,7 +908,7 @@ export default { select_cols_date:', EXTRACT ( MONTH FROM mlog.work_end_time) AS 月' }}; that.$API.bi.dataset.exec.req('lineDay_m2', objMonth).then((res2) => { - if(res2.data2.ds0){ + if(res2.data2.ds0&&res2.data2.ds0.length>0){ that.count_month = res2.data2.ds0[0].生产数; } }); @@ -1041,13 +917,12 @@ export default { getEquipments(){ let that = this; that.$API.em.equipment.count_running_state.req().then((res) => { - that.option_eq.series.data[0] = res.count_ok; - that.option_eq.series.data[1] =res.count_limit; - that.option_eq.series.data[2] =res.count_fix; - that.option_eq.series.data[3] =res.count_disable; - that.option_eq.series.data[4] =res.count_scrap; - that.seriesData = that.option_eq.series.data; - that.eqChartShow = true; + that.option_eq.series.data[0].value = res.count_ok; + that.option_eq.series.data[1].value =res.count_limit; + that.option_eq.series.data[2].value =res.count_fix; + that.option_eq.series.data[3].value =res.count_disable; + that.option_eq.series.data[4].value =res.count_scrap; + that.myChart.setOption({series:{data:that.option_eq.series.data}}); }) }, //库存统计列表(原料30库库存和成品10库库存) @@ -1106,7 +981,7 @@ export default { camera.attachControl(canvas, true); camera.maxZ = 1000; // 调整适当的值 // 相机限制 - camera.lowerRadiusLimit = 27; + camera.lowerRadiusLimit = 29; camera.upperRadiusLimit = 50; camera.useAutoRotationBehavior = true; // 灯光 @@ -1122,51 +997,42 @@ export default { "myUI" ); that.myui = advancedTexture; - // 创建一个高亮层 - const highlightLayer = new BABYLON.HighlightLayer( - "highlightLayer", - scene - ); // 主控制区 var control_main = new BABYLON_GUI.StackPanel(); control_main.isVertical = false; control_main.top = "40%"; control_main.left = "-15%"; advancedTexture.addControl(control_main); - - // var button_main = BABYLON_GUI.Button.CreateSimpleButton( - // "button_main", - // "主视角" - // ); - // button_main.width = "80px"; - // button_main.height = "30px"; - // button_main.color = "white"; - // button_main.cornerRadius = 20; - // button_main.background = "green"; - // control_main.addControl(button_main); - // button_main.onPointerClickObservable.add(() => { - // that.flyToMesh(); - // }); - - // 高亮显示mesh名 - const mesh_rect = new BABYLON_GUI.Rectangle("mesh_rect"); - mesh_rect.width = "100px"; - mesh_rect.height = "25px"; - mesh_rect.background = "orange"; - mesh_rect.alpha = 0.6; - mesh_rect.isVisible = false; - advancedTexture.addControl(mesh_rect); - - var mesh_name = new BABYLON_GUI.TextBlock("mesh_name"); - mesh_name.text = ""; - mesh_name.color = "white"; - mesh_name.fontSize = "14px"; - mesh_rect.addControl(mesh_name); var remoteGlbUrl = config.HOST_URL + "/media/model/gx.glb"; BABYLON.SceneLoader.Append( remoteGlbUrl, "", scene, + function(scene){ + for (let key in that.sectionNames) { + let value = that.sectionNames[key]; + let mesh = scene.getMeshByName(key); + if (mesh) { + let rect1 = new BABYLON_GUI.Rectangle(); + rect1.width = "100px"; + rect1.height = "40px"; + rect1.cornerRadius = 20; + rect1.color = "rgba(255,160,0,.7)"; + rect1.thickness = 4; + rect1.background = "rgba(255,160,0,.7)"; + + let label = new BABYLON_GUI.TextBlock(); + label.text = value; + label.color = "#ffffff"; + rect1.addControl(label); + + that.myui.addControl(rect1); + rect1.linkWithMesh(mesh); + rect1.linkOffsetY = -10; + } + } + engine.hideLoadingUI(); + }, function (evt) { var loadedPercent = 0; if (evt.lengthComputable) { @@ -1182,7 +1048,6 @@ export default { ); return scene; }; - const scene = createScene(); //Call the createScene function engine.runRenderLoop(function () { scene.render(); @@ -1203,28 +1068,10 @@ export default { for(let i=0;i { - // let keys = 'configData'+index; - // that[keys] = that.deepCopy(configData); - // that[keys].data = []; - // if(res.length>0){ - // res.forEach((item) => { - // let arr = []; - // arr[0] = item.batch; - // arr[1] = item.count_cando; - // arr[2] = item.count_working; - // arr[3] = item.count-item.count_cando-item.count_working; - // that[keys].data.push(arr); - // }) - // } - // }) - // }, getProcessDatas(name,index){ let that = this; let month = that.currentMonth>9?that.currentMonth:'0'+that.currentMonth; @@ -1233,20 +1080,50 @@ export default { let obj = {query:{current_date:current_date,mgroup_name:name}}; that.$API.bi.dataset.exec.req('batch_search', obj).then((res) => { if(res.data2.ds0){ - let lists = res.data2.ds0[0]; + let lists = res.data2.ds0; //根据工段名称分组 let keys = 'configData'+index; that[keys] = that.deepCopy(configData); that[keys].data = []; - lists.forEach((item) => { - let arr = []; - arr[0] = item.批次号; - arr[1] = item.待加工产物数; - arr[2] = item.加工中产物领用数; - arr[3] = item.今日合格数; - // arr[4] = Math.round((item.今日合格数/item.今日合格数)*100)+'%'; - that[keys].data.push(arr); - }) + if(lists.length>0){ + lists.forEach((item) => { + let arr = []; + arr[0] = item.批次号; + arr[1] = item.待加工产物数; + arr[2] = item.加工中产物领用数; + arr[3] = item.今日生产数; + arr[3] = item.今日合格数; + that[keys].data.push(arr); + }) + } + } + }); + }, + getProcessCount(name,index){ + let that = this; + let optionKey = 'options'+index; + that[optionKey] = that.deepCopy(baseOption); + that[optionKey].xAxis.data =that.dayArr; + let nowDate = new Date(); + let end_date = that.$TOOL.dateFormat2(nowDate); + let start_date = that.$TOOL.dateFormat2(new Date(nowDate.getTime()-6*24*60*60*1000)); + let obj = {query:{end_date:end_date,start_date:start_date,mgroup_name:name}}; + that.$API.bi.dataset.exec.req('lineDay_m2', obj).then((res) => { + if(res.data2.ds0){ + let lists = res.data2.ds0; + if(lists.length>0){ + let data0=[],data1=[],data2=[]; + lists.forEach((item) => { + let index = that.dayArr.indexOf(item.日); + data0[index] = item.生产数; + data1[index] = item.合格数; + data2[index] = item.合格率; + }) + that[optionKey].series[0].data = data0; + that[optionKey].series[1].data = data1; + that[optionKey].series[2].data = data2; + console.log(that[optionKey]); + } } }); }, @@ -1255,13 +1132,17 @@ export default { let that = this; this.scene = null; clearInterval(that.timerTime); + clearInterval(that.scrollInterval); that.timerTime = null; + that.scrollInterval = null; }, beforeDestoryed() { let that = this; this.scene = null; clearInterval(that.timerTime); + clearInterval(that.scrollInterval); that.timerTime = null; + that.scrollInterval = null; }, }; @@ -1274,21 +1155,19 @@ export default { } .container { - background: url("/public/img/gx/gx_bj.jpg") no-repeat; + /* background: url("/public/img/gx/gx_bj.jpg") no-repeat; */ background-size: cover; - /* height: 888px; - width: 2136px; */ - height: 1184px; - width: 2848px; + height: 1080px; + width: 1920px; position: relative; } /* header-start */ .pageHeader { z-index: 100; - height: 74px; - width: 100%; + height: 70px; + width: 1920px; padding: 0 20px; - line-height:74px; + line-height:70px; color: #ffffff; position: absolute; text-align: center; @@ -1297,19 +1176,19 @@ export default { /* border-bottom: 1px solid rgba(54, 217, 187, 0.3); */ } .header_left{ - position: absolute;top: 0;left: 10px;font-size: 20px; + position: absolute;top: 0;left: 10px;font-size: 18px; } .header_center_text{ - font-family: myfont;letter-spacing: 0.2em; font-size: 50px;line-height:53px;z-index: 100; + font-family: myfont;letter-spacing: 0.2em; font-size: 38px;line-height:53px;z-index: 100; } .header_right{ - position: absolute;top: 0;right: 10px;font-size: 20px; + position: absolute;top: 0;right: 10px;font-size: 18px; } .header_bg{ - z-index: -1;position: absolute;top:0;left:0;width: 100%;height: 100%; + z-index: -1;position: absolute;top:0;left:0;width:1920px;height:70px; } .header_line{ - top:75px; + top:65px; height: 1px; position: absolute; background: rgb(54,217,187); @@ -1329,96 +1208,94 @@ export default { .left_block2, .right_block{ top:74px; - width:355px; + width:320px; z-index: 10; display: flex; position:absolute; overflow:hidden; flex-direction: column; - padding: 0 10px ; + padding: 0 5px; height: 320px; + box-sizing: border-box; background: rgba(9, 31, 43, 0.5); } .left_block3{ - top:400px; + top:340px; left: 0; - width:710px; + width:640px; display: flex; position:absolute; overflow:hidden; flex-direction: column; - padding: 0 20px 0 20px; - height: 390px; + padding: 0 5px; + height: 400px; background: rgba(9, 31, 43, 0.5); } +.left_block3 .flexItem{ + width:630px; +} .left_block { left: 0; + height: 270px; } .right_block { right: 0; - width:710px; - height: 740px; + width:640px; + height: 670px; } .left_block2{ - left: 355px; + left: 320px; + height: 270px; + padding: 0 5px; } -.bottom_block{ - width: 100%; - position: absolute; - bottom: 0; - left: 0; - height: 370px; - overflow: hidden; +.left_block2 .flexItem{ + width:310px; } -.bottom_block2{ - width: 400%; - position: absolute; - bottom: 0; - left: 0; - height: 370px; - display: flex; - transition: left 2s ease; -} -.flexItem { - height: 370px; -} -.flexItem3 { - width: 356px; - height: 370px; - background: rgba(0,0,0,.8); +.flexItem{ + width: 310px; } .videoFlexItem{ - height: 470px; + width: 630px; + height: 400px; } +.newsFlexItem{ + width: 620px; + height: 270px; +} +/* //短标题 */ +.itemTitle{ + color: #fff; + height:45px; + padding-left: 1.5em; + font-size: 16px; + line-height: 40px; + background-size: 100% 100%; + background-image: url("/public/img/gx/title_bg2.png"); +} +/* //长标题 */ .itemTitle2 { color: #fff; - height:50px; + height:45px; padding-left: 1.5em; - font-size: 20px; - line-height: 44px; + font-size: 16px; + line-height: 40px; background: url("/public/img/gx/title_bg.png") ; background-size: 100% 100%; display: flex; position: relative; } -.itemTitle{ - color: #fff; - height:50px; - padding-left: 1.5em; - font-size: 20px; - line-height: 44px; - background-size: 100% 100%; - background-image: url("/public/img/gx/title_bg2.png"); -} +/* 下面的工序表格标题 */ + .itemTitle_b{ - height: 42px; - line-height: 42px; - width: 350px; + height: 40px; + line-height: 40px; + width: 370px; font-size: 14px; padding-left: 2.5em; } + .block1NumberWrap{ - width:48%; + width:135px; border: 1px solid rgba(54, 217, 187, 0.3); padding: 3px; text-align: center; @@ -1426,7 +1303,7 @@ export default { .block1Numberinner{ background: rgba(54, 217, 187, 0.3); color: #fff; - height:80px; + height:64px; line-height:80px; position: relative; } @@ -1448,10 +1325,7 @@ export default { .itemBody { width: 100%; border-radius: 20px; - margin-top: 5px; -} -.flexItem3>.itemBody{ - margin-top: 0; + /* margin-top: 5px; */ } .itemBody1{ display: flex; @@ -1467,45 +1341,105 @@ export default { } .boxmain{ height: 140px; + width:100%; + margin:auto; } +/* 下面的工序表模块 */ +.bottom_block{ + width: 100%; + position: absolute; + bottom: 0; + left: 0; + height: 340px; + overflow: hidden; +} +.bottom_block2{ + width: 300%; + position: absolute; + bottom: 0; + left: 0; + height: 340px; + display: flex; + transition: left 2s ease; +} + +.flexItem3 { + width: 384px; + height: 340px; + position: relative; + background: rgba(9, 31, 43, 0.5) +} +.flexItem3_title{ + left: 50%; + width: 150px; + height: 30px; + line-height: 28px; + font-size: 16px; + color: #00ffff; + text-align: center; + border: 1px solid #00ffff; + border-radius: 5px; + box-shadow: inset 0 0 5px 5px rgb(0 255 255 / 32%); + z-index: 99; + position: absolute; + top: 0; + transform: translateX(-50%); + background: rgb(4 50 83); +} +.flexItem3Body{ + width: 380px; + height: 315px; + padding-top: 25px; + border: 1px solid #00ffff; + border-radius: 5px; + position: absolute; + top: 15px; + box-shadow: inset 0 0 15px 5px rgb(0 255 255 / 32%); +} + .inmBoxmain{ flex: 1; - height: 320px; - box-shadow: 0 0 10px 10px rgb(255 255 255 / 5%); + height:140px; + width:98%; + margin:auto; + /* border-left: 2px solid #0f5b8e; */ + box-shadow: -4px 0px 4px -1px #0f5b8e; } .itemBody3{ display: flex; - justify-content: space-around; } -#pieCharts,#pieChart1,#pieChart2, -#pieChart3,#pieChart4{ - width: 11vh; - height: 13vh; -} -.bodyList { - width: 200px; - height: 100%; +.viewsItem { color: #ffffff; - display: flex; + width: 620px; + height: 100px; + font-size: 15px; + display: inline-block; + margin-bottom: 10px; +} +.viewsItem_wrap { + height: 100px; flex-direction: column; - justify-content: space-around; + border-left: 5px solid rgba(28, 169, 231, 0.81); + padding-left: 10px; + border-radius: 5px; } -.bodyListItem { - font-size: 1vh; - border: 1px solid #02f5f2; - height: 16%; - border-radius: 15px; - text-align: center; +.viewsItem_img{ + width: 85px; + margin-top: 10px; } -.bodyListItemBg { - background: rgba(2, 245, 242, 0.18); +article{ + margin-top: 5px; + text-indent: 2em; } -#scrollTable > .hader { - background: rgb(10, 63, 68) !important; - background-color: #0a3f44 !important; +/deep/ .header-item{ + padding: 0 5px!important; + font-size: 12px!important; +} +/deep/ .dv-scroll-board .rows .ceil { + font-size: 12px!important; + padding: 0 5px!important; } - .model { top: 0; width: 100%; @@ -1537,214 +1471,5 @@ export default { font-size: 12px; } -#dashbordProcess .el-progress-circle { - height: 60px !important; - width: 60px !important; -} -.el-progress--circle .el-progress__text { - display: block; - margin-top: 1px; - color: #fff; - font-size: 20px !important; - font-weight: bold !important; -} - -.inforBlock { - left: 60%; - top: 30%; - width: 420px; - height: 150px; - position: absolute; - font-weight: 500; - color: #fff; - padding: 20px; - font-size: 14px; - box-sizing: border-box; - background: linear-gradient( - to bottom left, - rgba(25, 154, 118, 0.5), - rgba(31, 44, 50, 0.5) - ); -} - -.inforBlock.clickBlock { - left: 50%; - width: 520px; - height: 225px; - padding: 40px; - font-size: 16px; - transform: translateX(-50%); -} - -.inforBlock > .border_corner { - z-index: 2500; - position: absolute; - width: 10px; - height: 10px; - background: rgba(0, 0, 0, 0); - border: 2px solid rgba(54, 217, 187, 1); -} - -.inforBlock > .border_left_top { - top: 0; - left: 0; - border-right: none; - border-bottom: none; -} - -.inforBlock > .border_right_top { - top: 0; - right: 0; - border-left: none; - border-bottom: none; -} - -.inforBlock > .border_left_bottom { - bottom: 0; - left: 0; - border-right: none; - border-top: none; -} - -.inforBlock > .border_right_bottom { - bottom: 0; - right: 0; - border-left: none; - border-top: none; -} - -.inforBlock > .title { - font-size: 20px; - font-weight: 600; - position: absolute; - top: -45px; - text-align: center; - width: 100%; - left: 0; -} - -.inforBlock > .infoCantier { - display: flex; -} - -.infoCantier > .leftBlock { - width: 100px; - display: flex; - flex-direction: column; - margin-right: 30px; -} - -.infoCantier > .rightBlock { - display: flex; - flex-direction: column; - justify-content: space-between; -} - -.infoCantier > .rightBlock > .countWrap { - display: flex; - justify-content: space-between; - width: 280px; - margin-top: 10px; -} - -.percentage-value { - display: block; - margin-top: 6px; - font-size: 1.5vh; - color: #02f5f2; - font-weight: bold; -} -.percentage-label { - color: #ffffff; - font-size: 1.2vh; -} -.circle_bottom_text { - color: #02f5f2; - font-size: 0.8vw; -} - -.viewsItem { - color: #ffffff; - font-size: 20px; - width: 650px; - height: 85px; - font-size: 1.2vh; - display: inline-block; - margin-bottom: 20px; -} -.viewsItem_wrap { - height: 85px; - /* display: flex; */ - flex-direction: column; - border-left: 5px solid rgba(53, 156, 193, 0.66); - padding-left: 10px; - border-radius: 5px; -} -.viewsItem_img{ - width: 85px; - /* height: 50px; */ -} -article{ - text-indent: 2em; -} -/* .elec_number { - color: rgb(2, 245, 242); - font-weight: bold; - font-size: 1.4vh; - padding-top: 5px; -} */ -/* // 表格——el-table 去除背景颜色*/ -/deep/ .el-table, -.el-table__body, -/deep/ .el-table .el-table__body-wrapper { - background: transparent !important; -} -/deep/ .el-table .el-table__header-wrapper { - background: rgba(32, 93, 74, 0.83) !important; -} -/deep/ .el-table .el-table__body-wrapper { - background: rgba(46, 139, 155, 0.48) !important; -} -/deep/ .el-table th { - background-color: transparent !important; -} -/deep/ .el-table tr { - background-color: transparent !important; -} -/deep/ .el-table tr :hover { - background-color: transparent !important; -} -/deep/ - .el-table--enable-row-hover - .el-table__body - tr:hover - > td.el-table__cell { - background-color: transparent !important; -} -/* //清除鼠标移入效果 */ -/deep/.el-table__body tr.hover-row > td { - background-color: transparent !important; -} -/* // 行底边线 */ -/deep/ .el-table .el-table__body-wrapper /deep/ .el-table td.el-table__cell, -.el-table th.el-table__cell.is-leaf { - background: transparent !important; -} -/deep/ .el-table td.el-table__cell, -/deep/ .el-table th.el-table__cell.is-leaf { - border-bottom: 1px solid rgb(25, 111, 115, 0.82) !important; -} -/* 改变radio选中时的样式 */ -/deep/ .el-radio.elRadio > .el-radio__label { - color: #ffffff; -} -/deep/ .el-radio__input.is-checked .el-radio__inner { - background: #13f1df; - border-color: #13f1df; -} -/deep/ .el-table__inner-wrapper:before { - background-color: rgba(0, 0, 0, 0) !important; -} -/* 改变radio选中时的样式 */ diff --git a/src/views/em/equipment.vue b/src/views/em/equipment.vue index 55f512b5..e8f06114 100644 --- a/src/views/em/equipment.vue +++ b/src/views/em/equipment.vue @@ -17,6 +17,16 @@ --> + + + +
diff --git a/src/views/em/equipment_form.vue b/src/views/em/equipment_form.vue index 596eae91..e129be98 100644 --- a/src/views/em/equipment_form.vue +++ b/src/views/em/equipment_form.vue @@ -53,7 +53,7 @@ - + @@ -61,13 +61,18 @@ - + + + + + + diff --git a/src/views/em/equipmentjc.vue b/src/views/em/equipmentjc.vue index f1f65989..24e9bba7 100644 --- a/src/views/em/equipmentjc.vue +++ b/src/views/em/equipmentjc.vue @@ -17,6 +17,16 @@ --> + + + +
diff --git a/src/views/em/equipmentjk.vue b/src/views/em/equipmentjk.vue index e8b5825d..1e35dcfd 100644 --- a/src/views/em/equipmentjk.vue +++ b/src/views/em/equipmentjk.vue @@ -17,6 +17,16 @@ --> + + + + diff --git a/src/views/em/equipmentjl.vue b/src/views/em/equipmentjl.vue index f93fe51d..da05a704 100644 --- a/src/views/em/equipmentjl.vue +++ b/src/views/em/equipmentjl.vue @@ -5,7 +5,17 @@ 新增
- + + + + +
diff --git a/src/views/em/equipmentzl.vue b/src/views/em/equipmentzl.vue index f01b2e2a..023b62af 100644 --- a/src/views/em/equipmentzl.vue +++ b/src/views/em/equipmentzl.vue @@ -17,6 +17,16 @@ --> + + + + diff --git a/src/views/home/articles.vue b/src/views/home/articles.vue new file mode 100644 index 00000000..7eca93c6 --- /dev/null +++ b/src/views/home/articles.vue @@ -0,0 +1,269 @@ + + + diff --git a/src/views/qm/product.vue b/src/views/qm/product.vue index 9ebbb4f9..6b92508e 100644 --- a/src/views/qm/product.vue +++ b/src/views/qm/product.vue @@ -38,6 +38,7 @@ + @@ -86,7 +87,7 @@ v-if="dialog.check" :materialCate="materialCate" :ftestWork="ftestWork" - @closed="dialog.check = false" + @closed="handleCheckClose" > @@ -169,6 +170,10 @@ export default { handleQuery() { this.$refs.table.queryData(this.query); }, + handleCheckClose() { + this.dialog.check = false; + this.$refs.table.refresh(); + }, resetQuery() { this.query = {}; }, diff --git a/src/views/qm/productCheck.vue b/src/views/qm/productCheck.vue index f73b0c96..7bafed5d 100644 --- a/src/views/qm/productCheck.vue +++ b/src/views/qm/productCheck.vue @@ -32,7 +32,7 @@ workObj.count_sampling }} - {{item.batch}}、 + {{item.batch}}; -