diff --git a/package.json b/package.json index e44eccb..079a768 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "vue-count-to": "1.0.13", "vue-print-nb": "^1.7.5", "vue-router": "3.0.2", + "vue-socket.io": "^3.0.10", "vue-splitpane": "1.0.4", "vue-worker": "^1.2.1", "vuedraggable": "2.20.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 435577f..45f81bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -107,6 +107,9 @@ dependencies: vue-router: specifier: 3.0.2 version: 3.0.2(vue@2.6.10) + vue-socket.io: + specifier: ^3.0.10 + version: 3.0.10 vue-splitpane: specifier: 1.0.4 version: 1.0.4 @@ -2735,6 +2738,10 @@ packages: engines: {node: '>=0.8'} dev: false + /after@0.8.2: + resolution: {integrity: sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==} + dev: false + /aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -3012,6 +3019,10 @@ packages: is-string: 1.0.7 dev: true + /arraybuffer.slice@0.0.7: + resolution: {integrity: sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==} + dev: false + /arrify@1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} @@ -3412,9 +3423,18 @@ packages: hasBin: true dev: true + /backo2@1.0.2: + resolution: {integrity: sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==} + dev: false + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + /base64-arraybuffer@0.1.4: + resolution: {integrity: sha512-a1eIFi4R9ySrbiMuyTGx5e92uRH5tQY6kArNcFaKBUleIoLjdjBg7Zxm3Mqm3Kmkf27HLR/1fnxX9q8GQ7Iavg==} + engines: {node: '>= 0.6.0'} + dev: false + /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -3496,6 +3516,10 @@ packages: readable-stream: 3.6.2 dev: false + /blob@0.0.5: + resolution: {integrity: sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==} + dev: false + /bluebird@3.4.7: resolution: {integrity: sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==} dev: false @@ -4333,9 +4357,17 @@ packages: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: true + /component-bind@1.0.0: + resolution: {integrity: sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==} + dev: false + /component-emitter@1.3.0: resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} + /component-inherit@0.0.3: + resolution: {integrity: sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==} + dev: false + /compress-commons@4.1.2: resolution: {integrity: sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==} engines: {node: '>= 10'} @@ -5530,6 +5562,36 @@ packages: dependencies: once: 1.4.0 + /engine.io-client@3.5.4: + resolution: {integrity: sha512-ydc8uuMMDxC5KCKNJN3zZKYJk2sgyTuTZQ7Aj1DJSsLKAcizA/PzWivw8fZMIjJVBo2CJOYzntv4FSjY/Lr//g==} + dependencies: + component-emitter: 1.3.0 + component-inherit: 0.0.3 + debug: 3.1.0 + engine.io-parser: 2.2.1 + has-cors: 1.1.0 + indexof: 0.0.1 + parseqs: 0.0.6 + parseuri: 0.0.6 + ws: 7.5.10 + xmlhttprequest-ssl: 1.6.3 + yeast: 0.1.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /engine.io-parser@2.2.1: + resolution: {integrity: sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==} + dependencies: + after: 0.8.2 + arraybuffer.slice: 0.0.7 + base64-arraybuffer: 0.1.4 + blob: 0.0.5 + has-binary2: 1.0.3 + dev: false + /enhanced-resolve@4.5.0: resolution: {integrity: sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==} engines: {node: '>=6.9.0'} @@ -6815,11 +6877,21 @@ packages: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true + /has-binary2@1.0.3: + resolution: {integrity: sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==} + dependencies: + isarray: 2.0.1 + dev: false + /has-color@0.1.7: resolution: {integrity: sha512-kaNz5OTAYYmt646Hkqw50/qyxP2vFnTVu5AQ1Zmk22Kk5+4Qx6BpO8+u7IKsML5fOsFk0ZT0AcCJNYwcvaLBvw==} engines: {node: '>=0.10.0'} dev: false + /has-cors@1.1.0: + resolution: {integrity: sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==} + dev: false + /has-flag@1.0.0: resolution: {integrity: sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==} engines: {node: '>=0.10.0'} @@ -7222,6 +7294,10 @@ packages: resolution: {integrity: sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA==} dev: true + /indexof@0.0.1: + resolution: {integrity: sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==} + dev: false + /infer-owner@1.0.4: resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} dev: true @@ -7819,6 +7895,10 @@ packages: /isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + /isarray@2.0.1: + resolution: {integrity: sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==} + dev: false + /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true @@ -10172,6 +10252,14 @@ packages: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} dev: true + /parseqs@0.0.6: + resolution: {integrity: sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==} + dev: false + + /parseuri@0.0.6: + resolution: {integrity: sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==} + dev: false + /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -11954,6 +12042,36 @@ packages: transitivePeerDependencies: - supports-color + /socket.io-client@2.5.0: + resolution: {integrity: sha512-lOO9clmdgssDykiOmVQQitwBAF3I6mYcQAo7hQ7AM6Ny5X7fp8hIJ3HcQs3Rjz4SoggoxA1OgrQyY8EgTbcPYw==} + dependencies: + backo2: 1.0.2 + component-bind: 1.0.0 + component-emitter: 1.3.0 + debug: 3.1.0 + engine.io-client: 3.5.4 + has-binary2: 1.0.3 + indexof: 0.0.1 + parseqs: 0.0.6 + parseuri: 0.0.6 + socket.io-parser: 3.3.4 + to-array: 0.1.4 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /socket.io-parser@3.3.4: + resolution: {integrity: sha512-z/pFQB3x+EZldRRzORYW1vwVO8m/3ILkswtnpoeU6Ve3cbMWkmHEWDAVJn4QJtchiiFTo5j7UG2QvwxvaA9vow==} + dependencies: + component-emitter: 1.3.0 + debug: 3.1.0 + isarray: 2.0.1 + transitivePeerDependencies: + - supports-color + dev: false + /sockjs-client@1.6.1(supports-color@6.1.0): resolution: {integrity: sha512-2g0tjOR+fRs0amxENLi/q5TiJTqY+WXFOzb5UwXndlK6TO3U/mirZznpx6w34HVMoc3g7cY24yC/ZMIYnDlfkw==} engines: {node: '>=12'} @@ -12704,6 +12822,10 @@ packages: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} dev: true + /to-array@0.1.4: + resolution: {integrity: sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==} + dev: false + /to-arraybuffer@1.0.1: resolution: {integrity: sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==} dev: true @@ -13361,6 +13483,16 @@ packages: vue: 2.6.10 dev: false + /vue-socket.io@3.0.10: + resolution: {integrity: sha512-XGYjD30Q9xAeHpBnp2SU+ljEe59qpGKaAQe4VOO9ezuly09MlzrT2ZZPJu3BVFpQwKdjQDz1I2fV9r4YjlZDCA==} + dependencies: + socket.io-client: 2.5.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + /vue-splitpane@1.0.4: resolution: {integrity: sha512-aSLmwNyqWCtn4q/JlEXa/UB9/zP1SLODfmMJof+qitL91Rz6g13cJKGmNEHJtBp6ivsk6p74fGfXUJUB3Izuig==} dev: false @@ -13833,6 +13965,19 @@ packages: async-limiter: 1.0.1 dev: true + /ws@7.5.10: + resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: false + /ws@7.5.9: resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} engines: {node: '>=8.3.0'} @@ -13875,6 +14020,11 @@ packages: /xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + /xmlhttprequest-ssl@1.6.3: + resolution: {integrity: sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==} + engines: {node: '>=0.4.0'} + dev: false + /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} @@ -13971,6 +14121,10 @@ packages: yargs-parser: 20.2.9 dev: true + /yeast@0.1.2: + resolution: {integrity: sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==} + dev: false + /yorkie@2.0.0: resolution: {integrity: sha512-jcKpkthap6x63MB4TxwCyuIGkV0oYP/YRyuQU5UO0Yz/E/ZAu+653/uov+phdmO54n6BcvFRyyt0RRrWdN2mpw==} engines: {node: '>=4'} diff --git a/src/api/zyjh.js b/src/api/zyjh.js index 9291ed9..8e7dd42 100644 --- a/src/api/zyjh.js +++ b/src/api/zyjh.js @@ -1,5 +1,21 @@ import request from '@/utils/request' +export const daoduo=function(data){ + return request({ + url: '/zyjh/daoduo', + method: 'post', + data: data + }) +} + +export const shangLiao=function(data){ + return request({ + url: '/zyjh/sl', + method: 'post', + data: data + }) +} + export const getSljhPgd=function(){ return request({ url: '/zyjh/sljh', diff --git a/src/main.js b/src/main.js index 0d21c8f..eb4c452 100644 --- a/src/main.js +++ b/src/main.js @@ -29,6 +29,7 @@ import cal from './utils/calculation' import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx' import VXETablePluginRenderer from 'vxe-table-plugin-renderer' import 'vxe-table-plugin-renderer/dist/style.css' +import VueSocketIO from 'vue-socket.io' VXETable.use(VXETablePluginExportXLSX) VXETable.use(VXETablePluginRenderer) @@ -93,6 +94,12 @@ Object.keys(filters).forEach(key => { Vue.filter(key, filters[key]) }) +Vue.use(new VueSocketIO({ + debug: true, + connection: 'http://127.0.0.1:23456', // + options: { autoConnect:false,path: "",transports: ['websocket', 'xhr-polling', 'jsonp-polling'], } //Optional options +})) + new Vue({ el: '#app', router, diff --git a/src/views/jhzx/qfqrGL.vue b/src/views/jhzx/qfqrGL.vue index d3f56cc..6a492e3 100644 --- a/src/views/jhzx/qfqrGL.vue +++ b/src/views/jhzx/qfqrGL.vue @@ -87,6 +87,7 @@ export default { dwList:[], bfwzList:[], projectData:[], + projectData1:[], request:{ dcCh:'', dcPl:'', @@ -138,6 +139,7 @@ export default { initProject(){ getCzplBase({}).then(res=>{ this.projectData=res.data.cbbm + this.projectData1=res.data.cbbm }) }, cellClickEvent({row}){ diff --git a/src/views/jhzx/qfxqCX.vue b/src/views/jhzx/qfxqCX.vue index f444efd..81e7de9 100644 --- a/src/views/jhzx/qfxqCX.vue +++ b/src/views/jhzx/qfxqCX.vue @@ -266,7 +266,7 @@ export default { if (this.queryParam.dcch) { - this.projectData = this.projectData1.filter(row => row.project.indexOf(this.queryParam.dcch.toUpperCase()) > -1) + this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.queryParam.dcch.toUpperCase()) > -1) } else { this.projectData = this.projectData1.slice(0) } diff --git a/src/views/jhzx/qfxqSH.vue b/src/views/jhzx/qfxqSH.vue index c66a8a4..50e22c5 100644 --- a/src/views/jhzx/qfxqSH.vue +++ b/src/views/jhzx/qfxqSH.vue @@ -225,7 +225,7 @@ export default { if (this.queryParam.dcch) { - this.projectData = this.projectData1.filter(row => row.project.indexOf(this.queryParam.dcch.toUpperCase()) > -1) + this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.queryParam.dcch.toUpperCase()) > -1) } else { this.projectData = this.projectData1.slice(0) } diff --git a/src/views/jhzx/qfxqwh.vue b/src/views/jhzx/qfxqwh.vue index 96dfa0a..7856335 100644 --- a/src/views/jhzx/qfxqwh.vue +++ b/src/views/jhzx/qfxqwh.vue @@ -277,7 +277,7 @@ export default { }, keyupEvent4() { if (this.queryParam.dcch) { - this.projectData = this.projectData1.filter(row => row.project.indexOf(this.queryParam.dcch.toUpperCase()) > -1) + this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.queryParam.dcch.toUpperCase()) > -1) } else { this.projectData = this.projectData1.slice(0) } diff --git a/src/views/jhzx/qfzxGL.vue b/src/views/jhzx/qfzxGL.vue index 12845ac..846027c 100644 --- a/src/views/jhzx/qfzxGL.vue +++ b/src/views/jhzx/qfzxGL.vue @@ -90,6 +90,7 @@ export default { dwList:[], bfwzList:[], projectData:[], + projectData1:[], request:{ dcCh:'', dcPl:'', @@ -140,6 +141,7 @@ export default { initProject(){ getCzplBase({}).then(res=>{ this.projectData=res.data.cbbm + this.projectData1=res.data.cbbm }) }, cellClickEvent({row}){ @@ -151,6 +153,7 @@ export default { }, keyupEvent4(){ if (this.request.dcCh) { + console.log(this.pr) this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.request.dcCh.toUpperCase()) > -1) } else { this.projectData = this.projectData1.slice(0) diff --git a/src/views/jhzx/ydjhzxCX.vue b/src/views/jhzx/ydjhzxCX.vue index d01a33c..1d53639 100644 --- a/src/views/jhzx/ydjhzxCX.vue +++ b/src/views/jhzx/ydjhzxCX.vue @@ -273,8 +273,8 @@ export default { var Y = date.getFullYear() + "/"; var M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1)+ "/"; var D = date.getDate()<10? "0" +date.getDate():date.getDate(); - this.queryParam.yf = Y + M + D; - + // this.queryParam.yf = Y + M + D; + this.queryParam.yf= XEUtils.toDateString(XEUtils.getWhatMonth(new Date(), 0, 'first'),'yyyy/MM/dd') }, //初始化表1 数据 initList() { diff --git a/src/views/jhzx/ydjhzxGL.vue b/src/views/jhzx/ydjhzxGL.vue index 27a8f36..b2c40bc 100644 --- a/src/views/jhzx/ydjhzxGL.vue +++ b/src/views/jhzx/ydjhzxGL.vue @@ -2,10 +2,10 @@ - + - + @@ -269,7 +269,7 @@ export default { { field: 'qgcdKc', title: '切割空程长度(米)',width: 100, filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filterRender: { name: 'FilterCombination', }}, - { field: 'slrq', title: '上料计划日期',width: 100, + { field: 'sljhrq', title: '上料计划日期',width: 100, filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filterRender: { name: 'FilterCombination', }}, { field: 'pwrq', title: '抛丸计划日期',width: 100, diff --git a/src/views/jhzx/ydjhzxXF.vue b/src/views/jhzx/ydjhzxXF.vue index 098ba7e..e4a122f 100644 --- a/src/views/jhzx/ydjhzxXF.vue +++ b/src/views/jhzx/ydjhzxXF.vue @@ -1097,8 +1097,8 @@ export default { var Y = date.getFullYear() + "/"; var M = (date.getMonth() + 2 < 10 ? "0" + (date.getMonth() + 2) : date.getMonth() + 2)+ "/"; var D = date.getDate()<10? "0" +date.getDate():date.getDate(); - this.queryParam.yf = Y + M + D; - + //this.queryParam.yf = Y + M + D; + this.queryParam.yf= XEUtils.toDateString(XEUtils.getWhatMonth(new Date(), 0, 'first'),'yyyy/MM/dd') }, //初始化表1 数据 initList() { diff --git a/src/views/zyjhzx/hxianfkui/comps/pgd.js b/src/views/zyjhzx/hxianfkui/comps/pgd.js index efd3864..5c339b0 100644 --- a/src/views/zyjhzx/hxianfkui/comps/pgd.js +++ b/src/views/zyjhzx/hxianfkui/comps/pgd.js @@ -66,7 +66,7 @@ export default function (width,height){ lineHeight:1, stroke:'black', strokeWidth:1, - text:'抛丸施工单', + text:'划线施工单', align:'center', fontSize:20, }) @@ -78,7 +78,7 @@ export default function (width,height){ width:_width-48, height:15, lineHeight:1, - text:'单号:PW_'+data.gdh, + text:'单号:HX_'+data.gdh, align:'right', fontSize:12, }) diff --git a/src/views/zyjhzx/hxianpgong/comps/pgd.js b/src/views/zyjhzx/hxianpgong/comps/pgd.js index efd3864..5c339b0 100644 --- a/src/views/zyjhzx/hxianpgong/comps/pgd.js +++ b/src/views/zyjhzx/hxianpgong/comps/pgd.js @@ -66,7 +66,7 @@ export default function (width,height){ lineHeight:1, stroke:'black', strokeWidth:1, - text:'抛丸施工单', + text:'划线施工单', align:'center', fontSize:20, }) @@ -78,7 +78,7 @@ export default function (width,height){ width:_width-48, height:15, lineHeight:1, - text:'单号:PW_'+data.gdh, + text:'单号:HX_'+data.gdh, align:'right', fontSize:12, }) diff --git a/src/views/zyjhzx/lliaofkui/comps/pgd.js b/src/views/zyjhzx/lliaofkui/comps/pgd.js index efd3864..df30d82 100644 --- a/src/views/zyjhzx/lliaofkui/comps/pgd.js +++ b/src/views/zyjhzx/lliaofkui/comps/pgd.js @@ -66,7 +66,7 @@ export default function (width,height){ lineHeight:1, stroke:'black', strokeWidth:1, - text:'抛丸施工单', + text:'理料施工单', align:'center', fontSize:20, }) @@ -78,7 +78,7 @@ export default function (width,height){ width:_width-48, height:15, lineHeight:1, - text:'单号:PW_'+data.gdh, + text:'单号:LL_'+data.gdh, align:'right', fontSize:12, }) diff --git a/src/views/zyjhzx/lliaofkui/index.vue b/src/views/zyjhzx/lliaofkui/index.vue index a14dba6..6073e4f 100644 --- a/src/views/zyjhzx/lliaofkui/index.vue +++ b/src/views/zyjhzx/lliaofkui/index.vue @@ -20,7 +20,7 @@ export default { components: {LliaoPgd}, data(){ return { - title:'抛 丸 作 业 反 馈', + title:'理料 作 业 反 馈', width:0, height:0, stage:null, diff --git a/src/views/zyjhzx/lliaopgong/comps/pgd.js b/src/views/zyjhzx/lliaopgong/comps/pgd.js index efd3864..df30d82 100644 --- a/src/views/zyjhzx/lliaopgong/comps/pgd.js +++ b/src/views/zyjhzx/lliaopgong/comps/pgd.js @@ -66,7 +66,7 @@ export default function (width,height){ lineHeight:1, stroke:'black', strokeWidth:1, - text:'抛丸施工单', + text:'理料施工单', align:'center', fontSize:20, }) @@ -78,7 +78,7 @@ export default function (width,height){ width:_width-48, height:15, lineHeight:1, - text:'单号:PW_'+data.gdh, + text:'单号:LL_'+data.gdh, align:'right', fontSize:12, }) diff --git a/src/views/zyjhzx/qgefkui/comps/pgd.js b/src/views/zyjhzx/qgefkui/comps/pgd.js index efd3864..dfe6600 100644 --- a/src/views/zyjhzx/qgefkui/comps/pgd.js +++ b/src/views/zyjhzx/qgefkui/comps/pgd.js @@ -66,7 +66,7 @@ export default function (width,height){ lineHeight:1, stroke:'black', strokeWidth:1, - text:'抛丸施工单', + text:'切割施工单', align:'center', fontSize:20, }) @@ -78,7 +78,7 @@ export default function (width,height){ width:_width-48, height:15, lineHeight:1, - text:'单号:PW_'+data.gdh, + text:'单号:QG_'+data.gdh, align:'right', fontSize:12, }) diff --git a/src/views/zyjhzx/qgepgong/comps/pgd.js b/src/views/zyjhzx/qgepgong/comps/pgd.js index efd3864..dfe6600 100644 --- a/src/views/zyjhzx/qgepgong/comps/pgd.js +++ b/src/views/zyjhzx/qgepgong/comps/pgd.js @@ -66,7 +66,7 @@ export default function (width,height){ lineHeight:1, stroke:'black', strokeWidth:1, - text:'抛丸施工单', + text:'切割施工单', align:'center', fontSize:20, }) @@ -78,7 +78,7 @@ export default function (width,height){ width:_width-48, height:15, lineHeight:1, - text:'单号:PW_'+data.gdh, + text:'单号:QG_'+data.gdh, align:'right', fontSize:12, }) diff --git a/src/views/zyjhzx/sliao/comps/baifang.js b/src/views/zyjhzx/sliao/comps/baifang.js index ebe9aa8..47a3fd9 100644 --- a/src/views/zyjhzx/sliao/comps/baifang.js +++ b/src/views/zyjhzx/sliao/comps/baifang.js @@ -1,4 +1,5 @@ import Konva from "konva"; +import {daoduo} from "@/api/zyjh"; const baifang=function (option={}) { const width=option.width,height=option.height,slList=option.dw,image=require('@/assets/gb.png') @@ -41,6 +42,7 @@ const baifang=function (option={}) { draggable:true }) + group.setAttr('item',item) group.setAttr('index',index) slGroup.add(group) @@ -54,13 +56,13 @@ const baifang=function (option={}) { let _index=0 group.on('dragstart',function (){ - console.log(this) const {x,y}=this.absolutePosition() this.startPos={ x:x, y:y } }) + const movedList=[] group.on('dragmove',function (){ if(_index===0){ _index=this.getAttr('index') @@ -85,22 +87,46 @@ const baifang=function (option={}) { child.move({ y:dir }) + const item=child.getAttr('item') + item.ceng+=dir>0?1:-1 + child.setAttr('item',item) + const movedIndex=movedList.indexOf(child) + if (movedIndex===-1){ + movedList.push(child) + }else { + slList.splice(movedIndex, 1); + movedList.push(child) + } this.startPos={ x:x, y:thisY } } - } }) group.on('dragend',function (){ const index=this.getAttr('index') - const element = slList.splice(index-1, 1)[0]; - slList.splice(_index-1, 0, element); - this.setAttr('index',_index) - _index=0 - handler(slList) + const item=this.getAttr('item') + const data={ + id:item.id, + lastCeng:item.ceng, + lastDuo:item.dwId, + ceng:_index, + duo:item.dwId, + movedList:movedList + } + daoduo(data).then(res=>{ + if (res.success){ + const element = slList.splice(index-1, 1)[0]; + slList.splice(_index-1, 0, element); + this.setAttr('index',_index) + _index=0 + handler(slList) + }else { + + } + }) }) const indexRect=new Konva.Rect({ @@ -157,7 +183,7 @@ const baifang=function (option={}) { width: imgSize+40, height:40, fill:'black', - text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.sljhrq},切割:${item.qgjhrq||''}`, + text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`, align:'center', verticalAlign:'middle', }) @@ -171,7 +197,7 @@ const baifang=function (option={}) { slGroup.add(rect) for (let i = 1; i <= slList.length; i++) { const item=slList[i-1] - gangban(i,item,item.length) + gangban(i,item) } } diff --git a/src/views/zyjhzx/sliao/index.vue b/src/views/zyjhzx/sliao/index.vue index a1a5f29..2308ef7 100644 --- a/src/views/zyjhzx/sliao/index.vue +++ b/src/views/zyjhzx/sliao/index.vue @@ -14,7 +14,7 @@ import workers from "@/views/zyjhzx/sliao/comps/person"; import SliaoSearch from "@/views/zyjhzx/sliao/comps/SliaoSearch.vue"; import liliao from "@/views/zyjhzx/sliao/comps/liliao"; import baifang from "@/views/zyjhzx/sliao/comps/baifang"; -import {getSljhPgd, getTlt, getYcldw} from "@/api/zyjh"; +import {getSljhPgd, getTlt, getYcldw, shangLiao} from "@/api/zyjh"; import {formatTlt} from "@/views/zyjhzx/sliao/comps/utils"; import {getBzryList} from "@/api/sjzx/bzzGL"; @@ -43,17 +43,32 @@ export default { } }, mounted() { + this.$socket.open() + this.wsSubscribe() this.initKonvaStage(); this.tlt=JSON.parse(window.localStorage.getItem('QGKW')); }, + sockets:{}, methods:{ + wsSubscribe(){ + this.sockets.subscribe('slComplete', data => { + if (this.currentDw&&this.currentDwIndex&&this.currentDw.id===data.dwId) { + if (this.slGroup){ + this.slGroup.destroyChildren() + } + console.log(this.currentDw.list) + this.dw[this.currentDwIndex].list.push(data) + this.drawBaiFang(this.dw[this.currentDwIndex].list) + } + }) + }, search(queryParam){ console.log(queryParam) }, initBaiFang(index,dw){ - // if (this.slGroup){ - // this.slGroup.destroyChildren() - // } + if (this.slGroup){ + this.slGroup.destroyChildren() + } this.canSl=true this.currentDw=dw this.currentDwIndex=index @@ -110,10 +125,10 @@ export default { const maxY=y+that.height*0.8-20 if(thisX>=x&&thisY>=y&&thisX<=maxX&&thisY<=maxY){ const item=this.getAttr('item') - console.log(item) const data={ + ydjh:item, dwId:that.currentDw.id, - ceng:'', + ceng:that.dw[that.currentDwIndex].list.length+1, czbh:item.dcCh, pl:item.dcPl, fd:item.dcFd, @@ -122,12 +137,14 @@ export default { tlth:item.tzbh, wph:item.wpxh, wpgg:item.wpgg, - sljhrq:item.slrq, - qgjhrq:item.qgrq, - bfr:'' + sljhrq:item.sljhrq, + qgjhrq:item.qgjhrq, + bfr:that.getCurrentWorker()?.userName } - that.dw[that.currentDwIndex].list.push(data) - that.drawBaiFang(that.dw[that.currentDwIndex].list) + + shangLiao(data).then(res=>{ + console.log(res) + }) this.remove()