projects/mes-test #132

Manually merged
gtz217 merged 281 commits from projects/mes-test into projects/mes 2023-11-30 09:11:34 +08:00
6 changed files with 40 additions and 41 deletions
Showing only changes of commit 31033dd7e2 - Show all commits

View File

@ -1,8 +1,8 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2023-11-15 17:25:58 # @LastEditTime: 2023-11-16 08:52:02
# @LastEditors: DY # @LastEditors: zhp
# @Description: # @Description:
### ###
# 开发环境配置 # 开发环境配置
@ -18,7 +18,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48080' # VUE_APP_BASE_API = 'http://192.168.1.49:48080'
# VUE_APP_BASE_API = 'http://192.168.1.8:48080' # VUE_APP_BASE_API = 'http://192.168.1.8:48080'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082' # VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.56:48080' # VUE_APP_BASE_API = 'http://192.168.1.56:48080'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080' # VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# 路由懒加载 # 路由懒加载

View File

@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
// 增加三方登陆 update by 芋艿 // 增加三方登陆 update by 芋艿
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee'] const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee', '/AGVBoard', '/coldBoard', '/processingBoard']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
@ -19,7 +19,12 @@ router.beforeEach((to, from, next) => {
if (to.path === '/login') { if (to.path === '/login') {
next({ path: '/' }) next({ path: '/' })
NProgress.done() NProgress.done()
} else { }
// else if (to.path === '/AGVBoard') {
// next({ path: '/AGVBoard' })
// NProgress.done()
// }
else {
if (store.getters.roles.length === 0) { if (store.getters.roles.length === 0) {
isRelogin.show = true isRelogin.show = true
// 获取字典数据 add by 芋艿 // 获取字典数据 add by 芋艿

View File

@ -91,7 +91,7 @@ export const constantRoutes = [
{ {
path: '/AGVBoard', path: '/AGVBoard',
name: 'AGVBoard', name: 'AGVBoard',
component: Layout, // component: Layout,
// route level code-splitting // route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route // this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited. // which is lazy-loaded when the route is visited.

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-11-14 10:46:52 * @LastEditTime: 2023-11-15 16:04:06
* @Description: * @Description:
--> -->
<template> <template>
@ -727,21 +727,21 @@ export default {
} }
}, },
watch: { // watch: {
clientWidth(val) { // clientWidth(val) {
if (!this.timer) { // if (!this.timer) {
this.clientWidth = val // this.clientWidth = val
this.beilv2 = this.clientWidth / 1920 // this.beilv2 = this.clientWidth / 1920
this.timer = true // this.timer = true
let _this = this // let _this = this
setTimeout(function () { // setTimeout(function () {
_this.timer = false // _this.timer = false
}, 500) // }, 500)
} // }
// // //
this.windowWidth(val); // this.windowWidth(val);
} // }
}, // },
created() { created() {
// this.fetchList('exception-alarm') // this.fetchList('exception-alarm')
// this.fetchList('inAndOutOfEachLine') // this.fetchList('inAndOutOfEachLine')

View File

@ -1021,7 +1021,7 @@ export default {
top: 2em; top: 2em;
} }
.container-main { .container-main {
// padding: 10px; padding: 6px;
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<el-drawer :visible.sync="drawer" :append-to-body="true" size="80%"> <el-drawer :visible.sync="drawer" :append-to-body="true" size="80%" >
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
<!-- <template v-for="demo in demoList"> --> <!-- <template v-for="demo in demoList"> -->
<!-- <el-button :key="demo.name" :type="demo.name === curDemo ? 'primary' : ' '" @click="curDemo = demo.name"> --> <!-- <el-button :key="demo.name" :type="demo.name === curDemo ? 'primary' : ' '" @click="curDemo = demo.name"> -->
@ -29,24 +29,13 @@
<el-col :span="20"> <el-col :span="20">
<!-- 纸张设置 --> <!-- 纸张设置 -->
<el-button-group style="margin:0 10px"> <el-button-group style="margin:0 10px">
<el-button <el-button v-for="(value,type) in paperTypes" :key="type" :type="curPaperType === type ? 'primary' : ' '"
v-for="(value,type) in paperTypes" @click="setPaper(type,value)">
:key="type"
:type="curPaperType === type ? 'primary' : ' '"
@click="setPaper(type,value)"
>
{{ type }} {{ type }}
</el-button> </el-button>
</el-button-group> </el-button-group>
<el-input-number <el-input-number style="margin:0 10px" :value="scaleValue " :precision="2" :step="0.1" :min="scaleMin"
style="margin:0 10px" :max="scaleMax" @change="changeScale" />
:value="scaleValue "
:precision="2"
:step="0.1"
:min="scaleMin"
:max="scaleMax"
@change="changeScale"
/>
<el-popover v-model="paperPopVisible" placement="bottom" width="300" title="设置纸张宽高(mm)"> <el-popover v-model="paperPopVisible" placement="bottom" width="300" title="设置纸张宽高(mm)">
<div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 10px"> <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 10px">
<el-input v-model="paperWidth" type="number" style=" width: 100px; text-align: center" place="宽mm" />~ <el-input v-model="paperWidth" type="number" style=" width: 100px; text-align: center" place="宽mm" />~
@ -212,7 +201,7 @@ export default {
return type return type
} }
}, },
mounted() { created() {
this.init() this.init()
// console.log('aaaaaa') // console.log('aaaaaa')
// this.otherPaper() // this.otherPaper()
@ -224,6 +213,9 @@ export default {
// handleClose() { // handleClose() {
// $('.hiprintEpContainer').empty() // $('.hiprintEpContainer').empty()
// }, // },
closed() {
$('.hiprintEpContainer').empty()
},
init(data) { init(data) {
this.drawer = true this.drawer = true
this.modelData = data this.modelData = data
@ -264,6 +256,7 @@ export default {
// console.log(this.modelData) // console.log(this.modelData)
// console.log($('#hiprint-printTemplate').empty()) // console.log($('#hiprint-printTemplate').empty())
if (this.modelData) { if (this.modelData) {
// console.log(this.modelData);
$('.hiprintEpContainer').empty() $('.hiprintEpContainer').empty()
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value) hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
$('.hiprint-printTemplate').empty() $('.hiprint-printTemplate').empty()
@ -278,7 +271,7 @@ export default {
$('.hiprint-printTemplate').empty() $('.hiprint-printTemplate').empty()
// const templates = this.$ls.get('KEY_TEMPLATES', {}) // const templates = this.$ls.get('KEY_TEMPLATES', {})
const template = provider.value const template = provider.value
console.log(template) // console.log(template)
hiprintTemplate = new hiprint.PrintTemplate({ hiprintTemplate = new hiprint.PrintTemplate({
template: template, template: template,
settingContainer: '#PrintElementOptionSetting', settingContainer: '#PrintElementOptionSetting',
@ -287,6 +280,7 @@ export default {
} }
// hiprintTemplate.design('#hiprint-printTemplate') // hiprintTemplate.design('#hiprint-printTemplate')
// console.log(hiprintTemplate) // console.log(hiprintTemplate)
console.log(hiprintTemplate);
hiprintTemplate.design('#hiprint-printTemplate', { grid: true }) hiprintTemplate.design('#hiprint-printTemplate', { grid: true })
// , zoomtrue // , zoomtrue
this.scaleValue = hiprintTemplate.editingPanel.scale || 1 this.scaleValue = hiprintTemplate.editingPanel.scale || 1