diff --git a/config/index.js b/config/index.js index ec1d2de..1cc4240 100644 --- a/config/index.js +++ b/config/index.js @@ -7,8 +7,8 @@ const os = require('os') const networkInterfaces = os.networkInterfaces() -const ip = networkInterfaces['WLAN'][1] ? networkInterfaces['WLAN'][1].address : networkInterfaces['WLAN'][0].address -// const ip = '127.0.0.1' +// const ip = networkInterfaces['WLAN'][1] ? networkInterfaces['WLAN'][1].address : networkInterfaces['WLAN'][0].address +const ip = '127.0.0.1' module.exports = { dev: { // Paths diff --git a/index.html b/index.html index 910ed0e..63b7375 100644 --- a/index.html +++ b/index.html @@ -4,12 +4,13 @@ MES信息管理系统 - - - - + + + + +
diff --git a/package.json b/package.json index 88a939e..aeed9ce 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { - "@xkeshi/vue-barcode": "^1.0.0", "axios": "0.18.0", "dhtmlx-gantt": "^7.1.12", "docxtemplater": "^3.19.7", @@ -23,17 +22,18 @@ "html2canvas": "^1.0.0-alpha.12", "jquery": "^3.5.1", "js-cookie": "2.2.0", - "jspdf": "^1.5.2", + "jspdf": "2.5.1", "jszip-utils": "^0.1.0", - "node-sass": "^4.10.0", + "mqtt": "^4.3.7", + "node-sass": "latest", "normalize.css": "7.0.0", "npm": "^7.20.5", "nprogress": "0.2.0", "qrcode": "^1.3.2", "stylus": "0.52.4", "stylus-loader": "^3.0.1", - "three-freeform-controls": "^0.1.12", "time-formater": "^1.0.3", + "uuid": "^9.0.0", "v-viewer": "^1.3.1", "view-ui-plus": "^1.3.1", "vue": "2.5.17", @@ -65,7 +65,7 @@ "eventsource-polyfill": "0.9.6", "file-loader": "1.1.11", "friendly-errors-webpack-plugin": "1.7.0", - "html-webpack-plugin": "4.0.0-alpha", + "html-webpack-plugin": "^4.5.2", "mini-css-extract-plugin": "0.4.1", "node-notifier": "5.2.1", "optimize-css-assets-webpack-plugin": "5.0.0", @@ -77,7 +77,7 @@ "raw-loader": "^4.0.2", "rimraf": "2.6.2", "sass-loader": "7.0.3", - "script-ext-html-webpack-plugin": "2.0.1", + "script-ext-html-webpack-plugin": "2.1.3", "script-loader": "^0.7.2", "semver": "5.5.0", "shelljs": "0.8.2", @@ -88,7 +88,7 @@ "vue-loader": "15.3.0", "vue-style-loader": "4.1.2", "vue-template-compiler": "2.5.17", - "webpack": "4.16.5", + "webpack": "4.36.1", "webpack-bundle-analyzer": "2.13.1", "webpack-cli": "3.1.0", "webpack-dev-server": "3.1.5", diff --git a/src/api/BasicData/MenuManagement.js b/src/api/BasicData/MenuManagement.js index a9fe02e..d78f549 100644 --- a/src/api/BasicData/MenuManagement.js +++ b/src/api/BasicData/MenuManagement.js @@ -24,7 +24,7 @@ export function getModule(role) { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '3', - name: `select * from 基础表_角色模块信息 inner join 基础表_模块信息 on 基础表_角色模块信息.id = 基础表_模块信息.id where 角色编号=${role} order by 角色模块顺序` + name: `select * from 基础表_角色模块信息 inner join 基础表_模块信息 on 基础表_角色模块信息.id = 基础表_模块信息.id where 角色编号=${role} and 是否禁用 = 0 order by 角色模块顺序` } }) } @@ -37,7 +37,7 @@ export function initFisrtLevel() { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '3', - name: `select id,title from 基础表_模块信息 where [path] = '/'` + name: `select id,title from 基础表_模块信息 where [path] = '/' and 是否禁用 = 0` } }) } @@ -50,7 +50,7 @@ export function initSecondLevel() { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '3', - name: `select id,title from 基础表_模块信息 where [path] <> '/'` + name: `select id,title from 基础表_模块信息 where [path] <> '/' and 是否禁用 = 0` } }) } diff --git a/src/api/ManufacturingCenter/maintainInformation.js b/src/api/ManufacturingCenter/maintainInformation.js index 6bcf509..6ba2f91 100644 --- a/src/api/ManufacturingCenter/maintainInformation.js +++ b/src/api/ManufacturingCenter/maintainInformation.js @@ -11,7 +11,13 @@ export function getTableData1() { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '3', - name: 'SELECT * FROM [基础数据_设备工位点检表]inner join dbo.基础数据_点检类型名称 on [基础数据_设备工位点检表].点检表类型 = 基础数据_点检类型名称.点检表类型流水号' + name: ` + SELECT 基础数据_点检类型名称.*,[基础数据_设备工位点检表].*,[MES_计划BOM_工位与名称].工位名称 FROM [基础数据_设备工位点检表] + inner join dbo.基础数据_点检类型名称 + on [基础数据_设备工位点检表].点检表类型 = 基础数据_点检类型名称.点检表类型流水号 + inner join [MES_计划BOM_工位与名称] + on [MES_计划BOM_工位与名称].工位号 = [基础数据_设备工位点检表].工位号 + ` } }) } diff --git a/src/assets/img/SiyuanLOGO.png b/src/assets/img/SiyuanLOGO.png index a80b0e5..7426163 100644 Binary files a/src/assets/img/SiyuanLOGO.png and b/src/assets/img/SiyuanLOGO.png differ diff --git a/src/assets/img/leftPic.png b/src/assets/img/leftPic.png new file mode 100644 index 0000000..64c4d29 Binary files /dev/null and b/src/assets/img/leftPic.png differ diff --git a/src/assets/img/logo.jpg b/src/assets/img/logo.jpg new file mode 100644 index 0000000..9e45f06 Binary files /dev/null and b/src/assets/img/logo.jpg differ diff --git a/src/assets/img/logo.png b/src/assets/img/logo.png new file mode 100644 index 0000000..9e45f06 Binary files /dev/null and b/src/assets/img/logo.png differ diff --git a/src/icons/svg/ProcessManagement.svg b/src/icons/svg/ProcessManagement.svg new file mode 100644 index 0000000..bb3afc3 --- /dev/null +++ b/src/icons/svg/ProcessManagement.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 26b1ba4..a78618c 100644 --- a/src/main.js +++ b/src/main.js @@ -20,7 +20,7 @@ import time from 'time-formater' import htmlToPdf from '@/vendor/htmlToPdf' import Viewer from 'v-viewer' import 'viewerjs/dist/viewer.css' -import VueBarcode from '@xkeshi/vue-barcode' +// import VueBarcode from '@xkeshi/vue-barcode' import Direction from 'vue-direction-key' import elDragDialog from '@/directive/el-dragDialog' // 全局数字、金额输入框组件 @@ -32,7 +32,7 @@ Vue.prototype.$axios = axios // 修改原型链 // axios.defaults.withCredentials = true Vue.use(elDragDialog) -Vue.component('barcode', VueBarcode) +// Vue.component('barcode', VueBarcode) Vue.use(Direction) Vue.use(curd) Vue.use(htmlToPdf) @@ -107,7 +107,7 @@ export function HashTable() { } this.getValues = function() { // eslint-disable-next-line no-array-constructor - const values = new Array() + const values = [] for (const prop in entry) { values.push(entry[prop]) } diff --git a/src/permission.js b/src/permission.js index ce0ac0c..04361ee 100644 --- a/src/permission.js +++ b/src/permission.js @@ -46,9 +46,9 @@ router.beforeEach((to, from, next) => { store.dispatch('GetInfo').then(res => { // 拉取user_info const data = res.data const asyncRouterMap = getRouter(data, 0) - console.log(asyncRouterMap) asyncRouterMap.push({ path: '*', redirect: '/404', hidden: true }) - store.dispatch('GenerateRoutes', asyncRouterMap).then(() => { // 根据roles权限生成可访问的路由表 + store.dispatch('GenerateRoutes', asyncRouterMap).then(() => { + // 根据roles权限生成可访问的路由表 router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) diff --git a/src/router/index.js b/src/router/index.js index 96f412b..dc6d365 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -21,6 +21,13 @@ import Layout from '../views/layout/Layout' icon: 'svg-name' the icon show in the sidebar, } **/ + +const originalPush = Router.prototype.push +Router.prototype.push = function push(location, onResolve, onReject) { + if (onResolve || onReject) { return originalPush.call(this, location, onResolve, onReject) } + return originalPush.call(this, location).catch((err) => err) +} + export const constantRouterMap = [ { path: '/login', component: () => import('@/views/login/index'), hidden: true }, { path: '/404', component: () => import('@/views/404'), hidden: true }, diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index 81c2a6a..faf28a1 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -70,7 +70,7 @@ background-color: #d8dde6;/*修改斑马线表格背景*/ } .el-table thead.is-group th{ - background-color: rgb(98, 157, 209); + background-color: rgb(134, 172, 206); } /* .el-textarea__inner, diff --git a/src/styles/index.scss b/src/styles/index.scss index aefb00b..5498cb6 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -324,7 +324,8 @@ input[type=number]::-webkit-outer-spin-button { } } .el-table__body tr.current-row>td{ - background-color: #5da2ef !important; + background-color: #9bcaff !important; + color: white; } //统一标准全局class 张丁予20200213 .machineTool { // 机床Select diff --git a/src/utils/mqtt.js b/src/utils/mqtt.js new file mode 100644 index 0000000..702a2f6 --- /dev/null +++ b/src/utils/mqtt.js @@ -0,0 +1,104 @@ +import { v4 as uuid } from 'uuid' +import mqtt from 'mqtt' +export { Mqtt } +class Mqtt { + constructor(config) { + this.connection = { + host: config.host, + port: config.port, + endpoint: config.endpoint || '/mqtt', + clean: config.clean || true, + connectTimeout: config.connectTimeout || 4000, + reconnectPeriod: config.reconnectPeriod || 4000, + clientId: config.clientId || uuid(), + username: config.username || '', + password: config.password || '' + } + this.client = { + connected: false + } + } + // 创建连接 + createConnection() { + // 连接字符串, 通过协议指定使用的连接方式 + // ws 未加密 WebSocket 连接 + // wss 加密 WebSocket 连接 + // mqtt 未加密 TCP 连接 + // mqtts 加密 TCP 连接 + // wxs 微信小程序连接 + // alis 支付宝小程序连接 + const { host, port, endpoint, ...options } = this.connection + const connectUrl = `ws://${host}:${port}${endpoint}` + try { + this.client = mqtt.connect(connectUrl, options) + } catch (error) { + // 连接错位、 + this.connectError(error) + } + } + connectError(error) { + console.log('mqtt.connect error', error) + } + // 订阅主题 + doSubscribe(subscription) { + const { topic, qos } = subscription + let subscribeSuccess = false + this.client.subscribe(topic, { qos }, (error, res) => { + if (error) { + subscribeSuccess = false + console.log('Subscribe to topics error', error) + } else { + subscribeSuccess = true + console.log('Subscribe to topics res', res) + } + }) + return subscribeSuccess + } + // 取消订阅 + doUnSubscribe(subscription) { + const { topic } = subscription + let unSubscribeSuccess = false + this.client.unsubscribe(topic, error => { + if (error) { + unSubscribeSuccess = false + console.log('Unsubscribe error', error) + } else { + unSubscribeSuccess = true + } + }) + return unSubscribeSuccess + } + // 发送消息 + doPublish(publish) { + const { topic, qos, payload } = publish + let doPublishSuccess = false + this.client.publish(topic, payload, qos, error => { + if (error) { + doPublishSuccess = false + console.log('Publish error', error) + } else { + doPublishSuccess = true + } + }) + return doPublishSuccess + } + // 断开连接 + destroyConnection() { + let destroyConnectionSuccess = false + if (this.client.connected) { + try { + this.client.end() + this.client = { + connected: false + } + destroyConnectionSuccess = true + console.log('Successfully disconnected!') + } catch (error) { + destroyConnectionSuccess = false + console.log('Disconnect failed', error.toString()) + } + } + return destroyConnectionSuccess + } +} + diff --git a/src/utils/request.js b/src/utils/request.js index 3f55e3d..92949ec 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,10 +1,34 @@ import axios from 'axios' -import { wsuri_config, name_config, name1_config, name3_config, name4_config, readFile_config, readImg_config, upload_config, upload2_config, upload3_config, uploadInvoiceScan_config, uploadInvoiceScan1_config, - download_config, uploadPerson_config, uploadOP_config, url_config, ExcelDownLoad_config, ServerIP_config, uploadFileMachine_config, - downloadFileMachine_config, MESUploadFile_config, MESDownloadFile_config, request_config, MESUploadFileProduct_config, MESUploadFileProject_config, MESUploadFileProcess_config } from '../../static/config' import Cookies from 'js-cookie' import store from '@/store' +const wsuri_config = `ws://192.168.1.27:61101//WebMoudule//websocket` +const name_config = `OP8888` +const name1_config = `OP1000` +const name3_config = `OP2000` +const name4_config = `OP9999` +const readFile_config = window.g.baseURL + `/webpage/file/` // invoice +const readImg_config = window.g.baseURL + `/webpage/img/` // delivery/MS/performancebond +const upload_config = window.g.baseURL + `/submit/uploadFile.ashx` // ContractInformationManagement +const upload2_config = window.g.baseURL + `/submit/upload2.ashx` // delivery +const upload3_config = window.g.baseURL + `/submit/upload3.ashx` // performancebond +const uploadInvoiceScan_config = window.g.baseURL + `/submit/uploadInvoiceScan.ashx` // invoice +const uploadInvoiceScan1_config = window.g.baseURL + `/submit/uploadInvoiceScan1.ashx` // invoice(workshop) +const download_config = window.g.baseURL + `/submit/downloadFile.ashx` // ContractInformationManagement +const uploadPerson_config = window.g.baseURL + `/submit/uploadPerson.ashx` +const uploadOP_config = window.g.baseURL + `/submit/uploadOP.ashx` +const url_config = window.g.baseURL + `/submit/MESCommonBase.ashx` // 采购件入库、离线件入库 +const ExcelDownLoad_config = window.g.baseURL + '/submit/MESCommonBase.ashx' // 导出excel +const ServerIP_config = window.g.baseURL + `/webpage/file/` +const uploadFileMachine_config = window.g.baseURL + `/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231 +const downloadFileMachine_config = window.g.baseURL + `/submit/downloadFileMachine.ashx` // 机床总图 发布时改成0.231 +const MESUploadFile_config = window.g.baseURL + `/submit/MESUploadFileParts.ashx` +const MESUploadFileProduct_config = window.g.baseURL + `/submit/MESUploadFileProduct.ashx` +const MESDownloadFile_config = window.g.baseURL + `/submit/MESDownloadFile.ashx` +const MESUploadFileProject_config = window.g.baseURL + `/submit/MESUploadFileProject.ashx` +const MESUploadFileProcess_config = window.g.baseURL + `/submit/MESUploadFileProcess.ashx` +const request_config = window.g.baseURL + `/submit/MESCommonBase.ashx` + export const wsuri = wsuri_config export const name = name_config export const name1 = name1_config @@ -41,11 +65,7 @@ const service = axios.create({ service.interceptors.request.use(config => { if (config.data.name !== '菜单系统模块_用户名密码_查询数据_new2' && config.data.name !== '菜单系统模块_获取角色模块_查询数据') { const id = Cookies.get('id') - if (typeof (id) !== 'undefined') { - console.log(id, 123) - console.log(typeof (id)) - } else { - console.log(456) + if (typeof (id) === 'undefined') { store.dispatch('FedLogOut').then(() => { location.reload() // 为了重新实例化vue-router对象 避免bug alert('此账号登录失效,请重新登录') diff --git a/src/utils/tool.js b/src/utils/tool.js index d475aee..e2e59f6 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -116,6 +116,22 @@ export function getNowTime1() { const time = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second return time } +export function getNowTime3(date) { + const month = zeroFill2(date.getMonth() + 1) + const day = zeroFill(date.getDate()) + return date.getFullYear() + '-' + month + '-' + day +} +function zeroFill2(i) { + if (i >= 0 && i <= 9) { + if (i === 0) { + return '01' + } else { + return '0' + i + } + } else { + return i + } +} // 工时统计上个月26-本月25 export function getTime26() { const date = new Date() diff --git a/src/views/BasicData/MenuManagement/index.vue b/src/views/BasicData/MenuManagement/index.vue index 3e672a6..8e63c32 100644 --- a/src/views/BasicData/MenuManagement/index.vue +++ b/src/views/BasicData/MenuManagement/index.vue @@ -11,6 +11,7 @@ + - - - - + @@ -160,11 +193,6 @@ {{ scope.row.变量特点 }} - - - + + +
+ + + + + + + + + + + @@ -246,7 +313,22 @@ import request from '@/utils/request' export default { data() { return { + form: { + tagID: '', + oldValue: '', + newValue: '', + filed: '' + }, + rules: { + tagID: [{ required: true, message: '请输入tagID', trigger: 'blur' }], + oldValue: [{ required: true, message: '请输入oldValue', trigger: 'blur' }], + newValue: [{ required: true, message: '请输入newValue', trigger: 'blur' }], + filed: [{ required: true, message: '请输入filed', trigger: 'blur' }] + }, + title: '', + dialogFormVisible3: false, loading: false, + isUpdate: false, tableData: [], dataType: [], // 工位数组 dataTypeValue: '', // 工位信息 @@ -262,16 +344,36 @@ export default { value: 7 } ], + valueUsed: [ + { + label: '启用', + value: 1 + }, { + label: '禁用', + value: 0 + } + ], + valueMonitor: [ + { + label: '监控', + value: 1 + }, { + label: '不监控', + value: 0 + } + ], valueTypeValue: '', + valueUsedValue: 1, + valueMonitorValue: '', total: 0, // 总条数 pageList: 100, // 每页显示条数 - pageSize: 100, // 每页显示条数 + pageSize: 50, // 每页显示条数 pageCurrent: 1 // 后台获取页 } }, created() { this.getNumber() - this.searchTable() + // this.searchTable() }, methods: { // 初始化获取产品型号 @@ -298,29 +400,114 @@ export default { searchTable() { this.loading = true this.tableData = [] - let stationNumberValue_check, valueType_check + let stationNumberValue_check, valueType_check, valueUsed_check, monitor_check // this.engineTypeValue ? engineTypeValue_check = 1 : (engineTypeValue_check = 0, this.engineTypeValue = '') - this.dataTypeValue ? stationNumberValue_check = 1 : (stationNumberValue_check = 0, this.dataTypeValue = '') - this.valueTypeValue ? valueType_check = 1 : (valueType_check = 0, this.valueTypeValue = '') + this.dataTypeValue ? stationNumberValue_check = 1 : stationNumberValue_check = 0 + this.valueTypeValue ? valueType_check = 1 : valueType_check = 0 + this.valueUsedValue !== 0 && this.valueUsedValue !== 1 ? valueUsed_check = 0 : valueUsed_check = 1 + this.valueMonitorValue !== 0 && this.valueMonitorValue !== 1 ? monitor_check = 0 : monitor_check = 1 var param = [] param[0] = ['变量类型_ischeck', valueType_check] param[1] = ['变量类型', this.valueTypeValue] param[2] = ['工位号_ischeck', stationNumberValue_check] param[3] = ['工位号', this.dataTypeValue] - param[4] = ['PageCurrent', this.pageCurrent] - param[5] = ['PageSize', this.pageSize] - param[6] = ['PageCount', '1111', 'int', '1'] - param[7] = ['ItemCount', '1111', 'int', '1'] + param[4] = ['启用_ischeck', valueUsed_check] + param[5] = ['启用', this.valueUsedValue] + param[6] = ['监控_ischeck', monitor_check] + param[7] = ['监控', this.valueMonitorValue] + param[8] = ['PageCurrent', this.pageCurrent] + param[9] = ['PageSize', this.pageSize] + param[10] = ['PageCount', '1111', 'int', '1'] + param[11] = ['ItemCount', '1111', 'int', '1'] var Data = this.CreateData('11', 'MES_基本变量_查询数据', param) this.ExecDatabase(Data).then(response => { - console.log(response, 66) if (response.data.result.length !== 0) { this.tableData = response.data.result } + for (const valueUsedCheckElement of this.tableData) { + valueUsedCheckElement['是否启用_Value'] = !!parseInt(valueUsedCheckElement['是否启用']) + valueUsedCheckElement['是否监控_Value'] = !!parseInt(valueUsedCheckElement['是否监控']) + } this.total = parseInt(response.data.output[0].ItemCount) this.loading = false }) }, + searchTableAfterEdit(tagID) { + var param = [] + param[0] = ['TagId', tagID] + var Data = this.CreateData('11', 'MES_基本变量_查询数据_TagId', param) + this.ExecDatabase(Data).then(response => { + if (response.data.length !== 0) { + for (let i = 0; i < this.tableData.length; i++) { + if (this.tableData[i]['TagID'] === tagID) { + response.data[0]['是否启用_Value'] = !!parseInt(response.data[0]['是否启用']) + response.data[0]['是否监控_Value'] = !!parseInt(response.data[0]['是否监控']) + console.log(response.data[0]) + this.$set(this.tableData, i, response.data[0]) + // this.tableData[i] = response.data[0] + return + } + } + } + this.isUpdate = !this.isUpdate + }) + }, + editShiftTable(row) {}, + handleDelete(row) {}, + switchChange(status, type, row) { + var param = [] + param[0] = ['Value_type', parseInt(type)] + param[1] = ['Value_edit', status ? 1 : 0] + param[2] = ['TagID', row.TagID] + var Data = this.CreateData('12', 'MES_基本变量_启用与监控编辑', param) + this.ExecDatabase(Data).then(response => { + if (response.data[0].result === '1') { + this.$message({ + message: '修改成功', + type: 'success' + }) + this.searchTableAfterEdit(row.TagID) + } else { + this.$message.error('修改失败!') + } + }) + }, + showEdit(row, column, cell, event) { + console.log(row, column, cell, event) + this.title = `【${column.label}】 修改信息` + this.form.filed = column.label + this.form.oldValue = row[column.label] + this.form.tagID = row.TagID + this.form.newValue = '' + this.dialogFormVisible3 = true + }, + submitAdd() { + var param = [] + param[0] = ['newValue', this.form.newValue] + param[1] = ['filed', this.form.filed] + param[2] = ['TagID', this.form.tagID] + var Data = this.CreateData('12', 'MES_基本变量_字段信息_编辑', param) + this.ExecDatabase(Data).then(response => { + if (response.data[0].result === '1') { + this.$message({ + message: '修改成功', + type: 'success' + }) + this.searchTableAfterEdit(this.form.tagID) + this.dialogFormVisible3 = false + } else { + this.$message.error('修改失败!') + } + }) + }, + callOff() { + this.title = '' + this.form.filed = '' + this.form.oldValue = '' + this.form.tagID = '' + this.form.newValue = '' + this.dialogFormVisible3 = false + }, // 分页 handleSizeChange(val) { this.pageCurrent = 1 diff --git a/src/views/BasicDataMaintenance/StationInformationMaintenance/index.vue b/src/views/BasicDataMaintenance/StationInformationMaintenance/index.vue index f4b0837..91be6bf 100644 --- a/src/views/BasicDataMaintenance/StationInformationMaintenance/index.vue +++ b/src/views/BasicDataMaintenance/StationInformationMaintenance/index.vue @@ -46,6 +46,13 @@ + + + - - - - - - - - - - + + + - + + + + @@ -119,275 +119,30 @@ - -
-
设备保养点检记录表
-
- 设备名称: - {{ 设备名称 }} - 设备编号: - {{ 设备编号 }} -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
点 检 人(操作工)
-
{{ tableData[0] ? tableData[0].姓名1 : '' }}
-
{{ tableData[0] ? tableData[0].姓名2 : '' }}
-
{{ tableData[0] ? tableData[0].姓名3 : '' }}
-
{{ tableData[0] ? tableData[0].姓名4 : '' }}
-
{{ tableData[0] ? tableData[0].姓名5 : '' }}
-
{{ tableData[0] ? tableData[0].姓名6 : '' }}
-
{{ tableData[0] ? tableData[0].姓名7 : '' }}
-
{{ tableData[0] ? tableData[0].姓名8 : '' }}
-
{{ tableData[0] ? tableData[0].姓名9 : '' }}
-
{{ tableData[0] ? tableData[0].姓名10 : '' }}
-
{{ tableData[0] ? tableData[0].姓名11 : '' }}
-
{{ tableData[0] ? tableData[0].姓名12 : '' }}
-
{{ tableData[0] ? tableData[0].姓名13 : '' }}
-
{{ tableData[0] ? tableData[0].姓名14 : '' }}
-
{{ tableData[0] ? tableData[0].姓名15 : '' }}
-
{{ tableData[0] ? tableData[0].姓名16 : '' }}
-
{{ tableData[0] ? tableData[0].姓名17 : '' }}
-
{{ tableData[0] ? tableData[0].姓名18 : '' }}
-
{{ tableData[0] ? tableData[0].姓名19 : '' }}
-
{{ tableData[0] ? tableData[0].姓名20 : '' }}
-
{{ tableData[0] ? tableData[0].姓名21 : '' }}
-
{{ tableData[0] ? tableData[0].姓名22 : '' }}
-
{{ tableData[0] ? tableData[0].姓名23 : '' }}
-
{{ tableData[0] ? tableData[0].姓名24 : '' }}
-
{{ tableData[0] ? tableData[0].姓名25 : '' }}
-
{{ tableData[0] ? tableData[0].姓名26 : '' }}
-
{{ tableData[0] ? tableData[0].姓名27 : '' }}
-
{{ tableData[0] ? tableData[0].姓名28 : '' }}
-
{{ tableData[0] ? tableData[0].姓名29 : '' }}
-
{{ tableData[0] ? tableData[0].姓名30 : '' }}
-
{{ tableData[0] ? tableData[0].姓名31 : '' }}
+ + + + + - - + @@ -425,10 +180,14 @@ + + + diff --git a/src/views/ProcessManagement/BomEngineManagement/BomListCompare.vue b/src/views/ProcessManagement/BomEngineManagement/BomListCompare.vue new file mode 100644 index 0000000..171733c --- /dev/null +++ b/src/views/ProcessManagement/BomEngineManagement/BomListCompare.vue @@ -0,0 +1,299 @@ + + + + + diff --git a/src/views/ProcessManagement/BomEngineManagement/index.vue b/src/views/ProcessManagement/BomEngineManagement/index.vue new file mode 100644 index 0000000..8b39319 --- /dev/null +++ b/src/views/ProcessManagement/BomEngineManagement/index.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/src/views/ProcessManagement/InterfaceModuleMaintenance/index.vue b/src/views/ProcessManagement/InterfaceModuleMaintenance/index.vue index 23ce1db..ec2f4a9 100644 --- a/src/views/ProcessManagement/InterfaceModuleMaintenance/index.vue +++ b/src/views/ProcessManagement/InterfaceModuleMaintenance/index.vue @@ -205,7 +205,6 @@ export default { // param[3] = ['check工位号', stationNumberValue_check] var Data = this.CreateData('11', '工艺管理_界面模块维护_信息查询', param) this.ExecDatabase(Data).then(response => { - console.log(response, 66) if (response.data.length !== 0) { this.tableData = response.data } diff --git a/src/views/ProcessManagement/MaterialVerificationMaintenance/index.vue b/src/views/ProcessManagement/MaterialVerificationMaintenance/index.vue index 695ddb7..c15ab56 100644 --- a/src/views/ProcessManagement/MaterialVerificationMaintenance/index.vue +++ b/src/views/ProcessManagement/MaterialVerificationMaintenance/index.vue @@ -3,7 +3,7 @@
工位号: - + 工位名称: - + 产品型号: 查询物料 创建物料 - 复制物料 - 物料导入 - 物料导出 + + +
- - - + + + + + - + @@ -65,28 +65,28 @@ {{ scope.row.零件图号 }} - + - - - + + + + + - - - + + + + + + @@ -114,7 +115,7 @@ @current-change="handleCurrentChange"/>
- + @@ -134,12 +135,19 @@ :value="item.value"/> - + + + + + + + + + placeholder="请输入零件图号"/> - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + + + + + @@ -43,7 +57,7 @@ import { searchTable1 as searchContractApproval } from '@/api/WorkshopProcuremen /* import { searchTable } from '@/api/PurchasingCenter/PurchaseMaterielModify' import { search } from '@/api/Assembly/DeliveryConfirmation' import { searchtable as searchtableSupplement } from '@/api/WorkshopProcurement/ScrappedSupplementaryInvestment1'*/ // 查询报废补投零件 -import Cookies from 'js-cookie' +// import Cookies from 'js-cookie' export default { components: { Breadcrumb, @@ -51,6 +65,10 @@ export default { }, data() { return { + tableData: [], + errorCount: 0, + showError: false, + dialogFormVisible4: false, timer: '', noticeFund: null, noticeInvoice: null, @@ -89,8 +107,10 @@ export default { 'token' ]) }, + created() { + // this.showOrder() + }, mounted() { - console.log(Cookies.get('id'), 999) /* if (this.id === 3 || Cookies.get('id') === 3) { // id=3 沈大为 总经理 this.checkApproval() this.timer = setInterval(this.checkApproval, 1000 * 60 * 5) @@ -393,6 +413,26 @@ export default { } }) }, + showOrder() { + // 未完成订单查询 + var param = [] + var Data = this.CreateData('11', 'MES_计划BOM_发动机订单计划_未完成计划_查询', param) + this.ExecDatabase(Data).then(response => { + console.log(response.data) + if (response.data.length > 0) { + this.errorCount = response.data.length + this.showError = true + this.dialogFormVisible4 = true + } else { + this.showError = false + } + }) + }, + submitAdd4() { + this.$router.push({ + // param参数用name query 参数用 path + path: '/WorkOrderManagement/ScheduleStatusChange' }) + }, toggleSideBar() { this.$store.dispatch('ToggleSideBar') }, diff --git a/src/views/layout/components/Sidebar/index.vue b/src/views/layout/components/Sidebar/index.vue index 5e48471..e954be8 100644 --- a/src/views/layout/components/Sidebar/index.vue +++ b/src/views/layout/components/Sidebar/index.vue @@ -2,7 +2,7 @@
- + @@ -68,12 +68,13 @@ export default { diff --git a/src/views/layout_HL/Layout.vue b/src/views/layout_HL/Layout.vue deleted file mode 100644 index 5fb5014..0000000 --- a/src/views/layout_HL/Layout.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - - - diff --git a/src/views/layout_HL/components/AppMain.vue b/src/views/layout_HL/components/AppMain.vue deleted file mode 100644 index 63ad836..0000000 --- a/src/views/layout_HL/components/AppMain.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - diff --git a/src/views/layout_HL/components/Navbar.vue b/src/views/layout_HL/components/Navbar.vue deleted file mode 100644 index 55de4c3..0000000 --- a/src/views/layout_HL/components/Navbar.vue +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - diff --git a/src/views/layout_HL/components/Sidebar/Item.vue b/src/views/layout_HL/components/Sidebar/Item.vue deleted file mode 100644 index b515f61..0000000 --- a/src/views/layout_HL/components/Sidebar/Item.vue +++ /dev/null @@ -1,29 +0,0 @@ - diff --git a/src/views/layout_HL/components/Sidebar/SidebarItem.vue b/src/views/layout_HL/components/Sidebar/SidebarItem.vue deleted file mode 100644 index ab3b050..0000000 --- a/src/views/layout_HL/components/Sidebar/SidebarItem.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - diff --git a/src/views/layout_HL/components/Sidebar/SidebarItem2.vue b/src/views/layout_HL/components/Sidebar/SidebarItem2.vue deleted file mode 100644 index 51de583..0000000 --- a/src/views/layout_HL/components/Sidebar/SidebarItem2.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - diff --git a/src/views/layout_HL/components/Sidebar/index.vue b/src/views/layout_HL/components/Sidebar/index.vue deleted file mode 100644 index 99467dc..0000000 --- a/src/views/layout_HL/components/Sidebar/index.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - - diff --git a/src/views/layout_HL/components/TagsView.vue b/src/views/layout_HL/components/TagsView.vue deleted file mode 100644 index 511a536..0000000 --- a/src/views/layout_HL/components/TagsView.vue +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - diff --git a/src/views/layout_HL/components/index.js b/src/views/layout_HL/components/index.js deleted file mode 100644 index 9fc98d6..0000000 --- a/src/views/layout_HL/components/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export { default as Navbar } from './Navbar' -export { default as Sidebar } from './Sidebar' -export { default as AppMain } from './AppMain' -export { default as TagsView } from './TagsView' diff --git a/src/views/layout_HL/mixin/ResizeHandler.js b/src/views/layout_HL/mixin/ResizeHandler.js deleted file mode 100644 index 7bd91b7..0000000 --- a/src/views/layout_HL/mixin/ResizeHandler.js +++ /dev/null @@ -1,52 +0,0 @@ -import store from '@/store' - -const { body } = document -const WIDTH = 1024 -const RATIO = 3 - -export default { - watch: { - $route(route) { - if (this.device === 'mobile' && this.sidebar.opened) { - store.dispatch('CloseSideBar', { withoutAnimation: false }) - } - } - }, - beforeMount() { - window.addEventListener('resize', this.resizeHandler) - }, - mounted() { - const isMobile = this.isMobile() - const isSmallDesktop = this.isSmallDesktop() - if (isSmallDesktop) { - store.dispatch('CloseSideBar', { withoutAnimation: false }) - } - if (isMobile) { - store.dispatch('ToggleDevice', 'mobile') - store.dispatch('CloseSideBar', { withoutAnimation: true }) - } - }, - methods: { - isMobile() { - const rect = body.getBoundingClientRect() - return rect.width - RATIO < WIDTH - }, - isSmallDesktop() { - const rect = body.getBoundingClientRect() - return rect.width - RATIO < 1300 - }, - resizeHandler() { - if (!document.hidden) { - const isMobile = this.isMobile() - const isSmallDesktop = this.isSmallDesktop() - store.dispatch('ToggleDevice', isMobile ? 'mobile' : 'desktop') - if (isSmallDesktop) { - store.dispatch('CloseSideBar', { withoutAnimation: false }) - } - if (isMobile) { - store.dispatch('CloseSideBar', { withoutAnimation: true }) - } - } - } - } -} diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 2950d06..f47aa0d 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -82,7 +82,7 @@ export default { } const validateUsername = (rule, value, callback) => { if (!isvalidUsername(value)) { - callback(new Error('请输入正确的用户名')) + callback(new Error('请输入4-5位工号')) } else { callback() } @@ -99,7 +99,7 @@ export default { againPassword: [ { required: true, message: '请输入确认密码', trigger: 'blur' }, { required: true, trigger: 'blur', validator: validateValue }], - Account: [{ required: true, message: '请输入考勤编号', trigger: 'blur' }], + Account: [{ required: true, trigger: 'blur', validator: validateUsername }], beforPassword: [{ required: true, message: '请输入原始密码', trigger: 'blur' }], newPassword: [{ required: true, message: '请输入新密码', trigger: 'blur' }] }, diff --git a/static/config.js b/static/config.js index a4cae08..ffdc9dc 100644 --- a/static/config.js +++ b/static/config.js @@ -1,33 +1,10 @@ -export const wsuri_config = `ws://192.168.1.27:61101//WebMoudule//websocket` -export const name_config = `OP8888` -export const name1_config = `OP1000` -export const name3_config = `OP2000` -export const name4_config = `OP9999` - -var url = `http://localhost:8100` -// var url = `http://124.220.15.242:8104` -// var url = `http://124.220.15.242:8110` // AP - -export const readFile_config = url + `/webpage/file/` // invoice -export const readImg_config = url + `/webpage/img/` // delivery/MS/performancebond -export const upload_config = url + `/submit/uploadFile.ashx` // ContractInformationManagement -export const upload2_config = url + `/submit/upload2.ashx` // delivery -export const upload3_config = url + `/submit/upload3.ashx` // performancebond -export const uploadInvoiceScan_config = url + `/submit/uploadInvoiceScan.ashx` // invoice -export const uploadInvoiceScan1_config = url + `/submit/uploadInvoiceScan1.ashx` // invoice(workshop) -export const download_config = url + `/submit/downloadFile.ashx` // ContractInformationManagement -export const uploadPerson_config = url + `/submit/uploadPerson.ashx` -export const uploadOP_config = url + `/submit/uploadOP.ashx` -export const url_config = url + `/submit/MESCommonBase.ashx` // 采购件入库、离线件入库 -export const ExcelDownLoad_config = url + '/submit/MESCommonBase.ashx' // 导出excel -// 技术中心程序发布时要更改下面所有的IP到0段 -export const ServerIP_config = url + `/webpage/file/` -export const uploadFileMachine_config = url + `/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231 -export const downloadFileMachine_config = url + `/submit/downloadFileMachine.ashx` // 机床总图 发布时改成0.231 -export const MESUploadFile_config = url + `/submit/MESUploadFileParts.ashx` -export const MESUploadFileProduct_config = url + `/submit/MESUploadFileProduct.ashx` -export const MESDownloadFile_config = url + `/submit/MESDownloadFile.ashx` -export const MESUploadFileProject_config = url + `/submit/MESUploadFileProject.ashx` -export const MESUploadFileProcess_config = url + `/submit/MESUploadFileProcess.ashx` - -export const request_config = url + `/submit/MESCommonBase.ashx` +window.g = { + mqttClient: null, + mqttSubscriptionTopic: 'MES/InstantMessaging/PF25/', + mqttPublishTopic: 'MesPrint', + mqttIP: '10.227.246.200', + mqttPortNumber: '8083', + printTemplate: 'BQFT_BarCode_001', + // baseURL: 'http://127.0.0.1:10031' + baseURL: 'http://10.227.246.200:10030' +}