diff --git a/package.json b/package.json index 079a768..0864fc6 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "dev": "vue-cli-service serve", "local": "vue-cli-service serve --mode local", "server": "vue-cli-service serve --mode server", + "test": "vue-cli-service serve --mode test", "lint": "eslint --ext .js,.vue src", "build:test": "vue-cli-service build --mode test", "build:prod": "vue-cli-service build", diff --git a/src/views/zyjhzx/components/search.js b/src/views/zyjhzx/components/search.js index ecc9417..b6bca9b 100644 --- a/src/views/zyjhzx/components/search.js +++ b/src/views/zyjhzx/components/search.js @@ -11,7 +11,7 @@ const search=function (){ fill:'#ffffff', width: 110, height:20, - stroke:'black', + stroke:'white', strokeWidth:1, }) group.add(selectRect) @@ -21,7 +21,7 @@ const search=function (){ fill:'#ffffff', width: 110, height:20, - stroke:'black', + stroke:'white', strokeWidth:1, }) group.add(plRect) @@ -32,7 +32,7 @@ const search=function (){ fill:'#ffffff', width: 110, height:20, - stroke:'black', + stroke:'white', strokeWidth:1, }) group.add(fdRect) @@ -43,7 +43,7 @@ const search=function (){ // fill:'#ffffff', // width: 115, // height:20, - // stroke:'black', + // stroke:'white', // strokeWidth:1, // }) // group.add(sljhrqRect) diff --git a/src/views/zyjhzx/hxianfkui/comps/baifang.js b/src/views/zyjhzx/hxianfkui/comps/baifang.js index f92d7ff..3dbe7e3 100644 --- a/src/views/zyjhzx/hxianfkui/comps/baifang.js +++ b/src/views/zyjhzx/hxianfkui/comps/baifang.js @@ -207,7 +207,7 @@ const baifang=function (option={}) { y:0, width:40, height:40, - stroke:'black', + stroke:'white', strokeWidth:1, }) //group.add(indexRect) @@ -217,7 +217,7 @@ const baifang=function (option={}) { y:0, width:40, height:40, - fill:'black', + fill:'white', text:index, align:'center', verticalAlign:'middle', @@ -242,7 +242,7 @@ const baifang=function (option={}) { y: 0, width: imgSize, height:40, - fill:'black', + fill:'white', text:`${item.wph||''},${item.wpgg}`, align:'center', verticalAlign:'middle', @@ -255,7 +255,7 @@ const baifang=function (option={}) { y: 0, width: imgSize-20, height:40, - fill:'black', + fill:'white', text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`, align:'center', verticalAlign:'middle', diff --git a/src/views/zyjhzx/hxianfkui/comps/sb.js b/src/views/zyjhzx/hxianfkui/comps/sb.js index 4aa29ee..13dab91 100644 --- a/src/views/zyjhzx/hxianfkui/comps/sb.js +++ b/src/views/zyjhzx/hxianfkui/comps/sb.js @@ -29,7 +29,7 @@ export default function (width,height){ y: 0, width: _width, height:_height, - fill:'black', + fill:'white', text:'划线设备', align:'center', verticalAlign:'middle', diff --git a/src/views/zyjhzx/lliaofkui/comps/baifang.js b/src/views/zyjhzx/lliaofkui/comps/baifang.js index aef5a73..aac5183 100644 --- a/src/views/zyjhzx/lliaofkui/comps/baifang.js +++ b/src/views/zyjhzx/lliaofkui/comps/baifang.js @@ -126,7 +126,7 @@ const baifang=function (option={}) { y:0, width:40, height:40, - stroke:'black', + stroke:'white', strokeWidth:1, }) //group.add(indexRect) @@ -136,7 +136,7 @@ const baifang=function (option={}) { y:0, width:40, height:40, - fill:'black', + fill:'white', text:index, align:'center', verticalAlign:'middle', @@ -161,7 +161,7 @@ const baifang=function (option={}) { y: 0, width: imgSize, height:40, - fill:'black', + fill:'white', text:`${item.wph||''},${item.wpgg}`, align:'center', verticalAlign:'middle', @@ -174,7 +174,7 @@ const baifang=function (option={}) { y: 0, width: imgSize-20, height:40, - fill:'black', + fill:'white', text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`, align:'center', verticalAlign:'middle', diff --git a/src/views/zyjhzx/lliaofkui/comps/sljh.js b/src/views/zyjhzx/lliaofkui/comps/sljh.js index 5c94f9e..2273d3c 100644 --- a/src/views/zyjhzx/lliaofkui/comps/sljh.js +++ b/src/views/zyjhzx/lliaofkui/comps/sljh.js @@ -1,5 +1,4 @@ import Konva from "konva"; -import {shangLiao} from "@/api/zyjh"; export const sljh=function (width,height){ diff --git a/src/views/zyjhzx/pwanfkui/comps/baifang.js b/src/views/zyjhzx/pwanfkui/comps/baifang.js index e86e306..7fe651e 100644 --- a/src/views/zyjhzx/pwanfkui/comps/baifang.js +++ b/src/views/zyjhzx/pwanfkui/comps/baifang.js @@ -213,7 +213,7 @@ const baifang=function (option={}) { y:0, width:40, height:40, - fill:'black', + fill:'white', text:index, align:'center', verticalAlign:'middle', @@ -238,7 +238,7 @@ const baifang=function (option={}) { y: 0, width: imgSize, height:40, - fill:'black', + fill:'white', text:`${item.wph||''},${item.wpgg}`, align:'center', verticalAlign:'middle', @@ -251,7 +251,7 @@ const baifang=function (option={}) { y: 0, width: imgSize-20, height:40, - fill:'black', + fill:'white', text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`, align:'center', verticalAlign:'middle', diff --git a/src/views/zyjhzx/pwanfkui/comps/pgdTable.js b/src/views/zyjhzx/pwanfkui/comps/pgdTable.js index cc58fe2..cc2b7a8 100644 --- a/src/views/zyjhzx/pwanfkui/comps/pgdTable.js +++ b/src/views/zyjhzx/pwanfkui/comps/pgdTable.js @@ -1,7 +1,13 @@ export default function () { + let height=window.innerHeight + if (height > 1024) { + height = window.innerHeight*0.13 + }else{ + height = window.innerHeight*0.275 + } const options={ - height:250, + height:height, align:'center', border: true, resizable: true, diff --git a/src/views/zyjhzx/pwanpgong/comps/PwanPgd.vue b/src/views/zyjhzx/pwanpgong/comps/PwanPgd.vue index cfa3e0e..126f135 100644 --- a/src/views/zyjhzx/pwanpgong/comps/PwanPgd.vue +++ b/src/views/zyjhzx/pwanpgong/comps/PwanPgd.vue @@ -10,6 +10,10 @@ import {bgControl, getDw, getPgd, getPgd2, zx} from "@/api/zyjh"; export default { name:'PwanPgd', props:{ + height:{ + type:Number, + default:0 + }, worker:{ type:Function, default:function (){} @@ -30,7 +34,7 @@ export default { }, created(){ this.deviceId=this.$route.query.deviceId||'' - const {options,columns,setExt}=paoWanPgdConfig() + const {options,columns,setExt}=paoWanPgdConfig(this.$props.height) this.setExt=setExt this.gridOptions=options this.gridOptions.columns=columns @@ -40,11 +44,9 @@ export default { }, sockets:{ zyjhzx(data){ - console.log(data) if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始派工'){ return } - console.log(123) //工单号尾号长度 const djhWhLengh=3 const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber) @@ -54,7 +56,6 @@ export default { return } - console.log(111,tmpList) for (const item of this.list) { if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){ const worker=this.$props.worker() @@ -99,25 +100,33 @@ export default { this.initData() }, checkboxAll({checked}){ - const worker=this.$props.worker() - if (!worker){ - this.$message.warning('请选择操作人') - return; + if (!this.privateCheck(checked)){ + this.$refs.vxeGrid.setAllCheckboxRow(!checked); + return } if (checked){ + const worker=this.$props.worker() this.paigong(worker) } }, checkboxChange({checked}){ - const worker=this.$props.worker() - if (!worker){ - this.$message.warning('请选择操作人') - return; + if (!this.privateCheck(checked)){ + this.$refs.vxeGrid.setAllCheckboxRow(!checked); + return } if (checked){ + const worker=this.$props.worker() this.paigong(worker) } }, + privateCheck(){ + const worker=this.$props.worker() + if (!worker){ + this.$message.warning('请选择操作人') + return false; + } + return true + }, paigong(worker){ const list=this.$refs.vxeGrid.getCheckboxRecords() const tmpArr=[] diff --git a/src/views/zyjhzx/pwanpgong/comps/pgd.js b/src/views/zyjhzx/pwanpgong/comps/pgd.js index d81a77c..5757940 100644 --- a/src/views/zyjhzx/pwanpgong/comps/pgd.js +++ b/src/views/zyjhzx/pwanpgong/comps/pgd.js @@ -470,7 +470,7 @@ export default function (width,height){ const generateQRCode=function (text='',group) { const imgSize=118 const rect=new Konva.Rect({ - x:385, + x:_width-189, y:0, width:128.7, height:120, @@ -485,7 +485,7 @@ export default function (width,height){ imageObj.onload = function () { const shape = new Konva.Image({ - x: 390, + x: _width-183, y: 1, width: imgSize, height: imgSize, diff --git a/src/views/zyjhzx/pwanpgong/comps/pgdTable.js b/src/views/zyjhzx/pwanpgong/comps/pgdTable.js index 71f9663..32989ae 100644 --- a/src/views/zyjhzx/pwanpgong/comps/pgdTable.js +++ b/src/views/zyjhzx/pwanpgong/comps/pgdTable.js @@ -1,7 +1,12 @@ - export default function () { + let height=window.innerHeight + if (height > 1024) { + height = window.innerHeight*0.88 + }else{ + height = window.innerHeight*0.78 + } const options={ - height:715, + height:height, align:'center', border: true, resizable: true, diff --git a/src/views/zyjhzx/pwanpgong/index.vue b/src/views/zyjhzx/pwanpgong/index.vue index 048f025..7dd0e45 100644 --- a/src/views/zyjhzx/pwanpgong/index.vue +++ b/src/views/zyjhzx/pwanpgong/index.vue @@ -1,7 +1,7 @@