asd26269546 2 ani în urmă
părinte
comite
a259f65cdf

+ 1 - 0
commons/commons.css

@@ -69,6 +69,7 @@
 .commons-close {
 	background: rgba(153, 153, 153, 0.20)!important;
 	color: #999999!important;
+	display: inline-block;
 }
 
 .commons-before-40 {

+ 1 - 0
lang/cn.js

@@ -58,6 +58,7 @@ export const lang = {
 		channel:"通道",
 		pressure:"压力",
 		speed:"速度",
+		videoInstruction:"视频说明书"
 	},
 	assemblingMachine:{
 		name:'组装机',

+ 2 - 1
lang/en.js

@@ -58,6 +58,7 @@ export const lang = {
 		channel:"Channel",
 		pressure:"Pressure",
 		speed:"Speed",
+		videoInstruction:"Video instruction"
 	},
 	assemblingMachine:{
 		name:'Assembly Machine',
@@ -93,7 +94,7 @@ export const lang = {
 		loginText:'Log In',
 		demo:"demo",
 		agreement:{
-			text:"Red and Agree:Bytesailing",
+			text:"Red and Agree bytesailing",
 			clause:"Service Term",
 			agreement:"Privacy Agreement",
 			and:"and"

+ 1 - 1
main.js

@@ -42,7 +42,7 @@ const i18n = new VueI18n({
 	locale: localStorage.getItem('locale') || 'zh-CN', //初始化,保证刷新页面也保留
 	// #endif
 	// 加载语言文件的内容
-	messages: { 
+	messages: {  
 		'zh-CN': require('./lang/cn.js').lang, 
 		'en': require('./lang/en.js').lang
 	}

+ 11 - 9
pages/equipment/equipment.vue

@@ -17,6 +17,7 @@
 		<view  class="content" style="margin-top:128rpx">
 			<ul>
 				<li v-for="i in listData" :key="i.id">
+					 <!-- v-if="i.type == 1" -->
 					<view class="list-warp"  @click="toDtl" v-if="i.type == 1">
 						<view class="list-main-info">
 							<view class="img">
@@ -24,7 +25,7 @@
 							</view>
 							<view class="text">
 								<view class="list-main-title">
-									注塑机 
+									{{$t('injection.name')}}
 									<span class="commons-close">{{offLine}}</span>
 								</view>
 								<view class="list-main-model">
@@ -35,14 +36,14 @@
 								<span class="iconfont">&#xe6bb;</span>
 							</view>
 						</view>
-						<view class="tag">
+						<!-- <view class="tag">
 							<view class="tag-box">
 								自动模式
 							</view>
-							<!-- <view class="tag-box">
+							<view class="tag-box">
 								检测系统
-							</view> -->
-						</view>
+							</view>
+						</view> -->
 						
 					</view>
 					<!-- <view class="list-warp"  @click="toDtl3">
@@ -88,7 +89,8 @@
 						</view>
 					</view> -->
 				</li>
-				<li @click="toDtl5"  v-for="i in listData" :key="i.id" v-if="i.type === 8">
+				 <!-- v-if="i.type === 8" -->
+				<li @click="toDtl5"  v-for="i in listData" :key="i.id">
 					<view class="list-warp">
 						<view class="list-main-info">
 							<view class="img">
@@ -96,7 +98,7 @@
 							</view>
 							<view class="text">
 								<view class="list-main-title">
-									包装机
+									{{$t('packer.name')}}
 									<span class="commons-close">{{offLine}}</span>
 								</view>
 								<view class="list-main-model">
@@ -119,7 +121,7 @@
 							</view>
 							<view class="text">
 								<view class="list-main-title">
-									灭菌柜
+									{{$t('sterilization.name')}}
 									<span>{{running}}</span>
 								</view>
 								<view class="list-main-model">
@@ -196,7 +198,7 @@
 								<view class="tag-icon-box">
 									<i class="iconfont">&#xe733;</i>
 								</view>
-								
+								<!-- {{$t('warpKnitting.jaca')}} -->
 								贾卡
 							</view>
 							<view class="tag-box">

+ 15 - 14
pages/equipment/injectionMolding.vue

@@ -1,7 +1,7 @@
 <template>
 	<!-- 注塑机 -->
 	<view class="equipmentDtl">
-		<commons-header title='注塑机'></commons-header>
+		<commons-header :title="$t('injection.name')"></commons-header>
 		<view class="equ-img">
 			<image src="../../static/images/zsj.png" mode=""></image>
 			<!-- <view class="err-modal">
@@ -13,10 +13,10 @@
 				<image src="../../static/icon_sbzt.png" mode=""></image>
 				<view class="text">
 					<view class="label">
-						设备状态
+						{{$t('equipment.equipmentStatus')}}
 					</view>
 					<view class="state-text">
-						离线
+						{{$t('equipment.offLine')}}
 					</view>
 				</view>
 			</view>
@@ -24,10 +24,10 @@
 				<image src="../../static/icon_gzms.png" mode=""></image>
 				<view class="text">
 					<view class="label">
-						工作模式
+						{{$t('equipment.operatingMode')}}
 					</view>
 					<view class="state-text">
-						离线
+						{{$t('equipment.offLine')}}
 					</view>
 				</view>
 			</view>
@@ -35,11 +35,12 @@
 		<view class="echarts">
 			<view class="title">
 				<image src="../../static/btn_kanban_blue.png" mode=""></image>
-				<span>产量数据</span>
+				<span>{{$t('equipment.productionData')}}</span>
 			</view>
 			<view class="content">
 				<view class="text">
-					12小时产量
+					{{$t('equipment.productionData')}}
+					
 				</view>
 				<qiun-data-charts type="line" :opts="opts" :chartData="chartData" />
 			</view>
@@ -49,7 +50,7 @@
 				<li>
 					<image src="../../static/btn_kanban_blue.png" mode=""></image>
 					<view>
-						液压机
+						{{$t('injection.hydraulicPress')}}
 					</view>
 					<view class="before succes">
 					</view>
@@ -59,7 +60,7 @@
 						{{yeya}}℃
 					</view>
 					<view>
-						液压油温度
+						{{$t('injection.hydraulicOilTemperature')}}
 					</view>
 					<view class="before-icon">
 						<span class="iconfont">&#xe6c2;</span>
@@ -70,7 +71,7 @@
 						{{tongti}}℃
 					</view>
 					<view>
-						筒体温度
+						{{$t('injection.cylinderTemperature')}}
 					</view>
 					<view class="before-icon">
 						<span class="iconfont">&#xe6c2;</span>
@@ -81,7 +82,7 @@
 		<ul class="pressure-warp">
 			<li v-for="(i,index) in tongdao">
 				<view class="label">
-					通道{{index + 1}}
+					{{$t('injection.channel')}}{{index + 1}}
 				</view>
 				<view class="pressure-chart">
 					<view class="pressure-zhen"
@@ -100,10 +101,10 @@
 					{{i.yali}} Bar
 				</view>
 				<view style="padding-bottom: 40rpx;border-bottom:1rpx solid #DDDDDD;margin:0 40rpx">
-					压力{{index + 1}}
+					{{$t('injection.pressure')}}{{index + 1}}
 				</view>
 				<view style="margin-top:40rpx">
-					速度{{index + 1}}
+					{{$t('injection.speed')}}{{index + 1}}
 				</view>
 				<view class="num">
 					{{i.sudu}}%
@@ -113,7 +114,7 @@
 				</view>
 			</li>
 		</ul>
-		<button class="footer-btn" @click="toInstructionsVideo">视频说明书</button>
+		<button class="footer-btn" @click="toInstructionsVideo">{{$t('injection.videoInstruction')}}</button>
 	</view>
 </template>
 

+ 16 - 15
pages/equipment/packingMachine.vue

@@ -1,7 +1,7 @@
 <template>
 	<!-- 包装机 -->
 	<view class="packingMachineDtl">
-		<commons-header title='包装机'></commons-header>
+		<commons-header :title="$t('packer.name')"></commons-header>
 		<view class="equ-img">
 			<image src="../../static/bzj.png" mode=""></image>
 			<!-- <view class="err-modal">
@@ -13,10 +13,10 @@
 				<image src="../../static/icon_sbzt.png" mode=""></image>
 				<view class="text">
 					<view class="label">
-						设备状态
+						{{$t('equipment.equipmentStatus')}}
 					</view>
 					<view class="state-text">
-						离线
+						{{$t('equipment.offLine')}}
 					</view>
 				</view>
 			</view>
@@ -24,10 +24,10 @@
 				<image src="../../static/icon_gzms.png" mode=""></image>
 				<view class="text">
 					<view class="label">
-						工作模式
+						{{$t('equipment.operatingMode')}}
 					</view>
 					<view class="state-text">
-						离线
+						{{$t('equipment.offLine')}}
 					</view>
 				</view>
 			</view>
@@ -35,11 +35,12 @@
 		<view class="echarts">
 			<view class="title">
 				<image src="../../static/btn_kanban_blue.png" mode=""></image>
-				<span>产量数据</span>
+				<span>{{$t('equipment.productionData')}}</span>
 			</view>
 			<view class="content">
 				<view class="text">
-					12小时产量
+					{{$t('equipment.productionData')}}
+					
 				</view>
 				<qiun-data-charts type="line" :opts="opts" :chartData="chartData" />
 			</view>
@@ -53,7 +54,7 @@
 						
 					</view>
 					<view class="state-text" style="color:#666">
-						计划产量
+						{{$t('packer.plannedOutput')}}
 					</view>
 					
 				</view>
@@ -66,7 +67,7 @@
 						0
 					</view>
 					<view class="state-text" style="color:#666">
-						每分钟版数
+						{{$t('packer.versionsPerMinute')}}
 					</view>
 				</view>
 			</view>
@@ -79,7 +80,7 @@
 						0
 					</view>
 					<view>
-						每模个数
+						{{$t('packer.numberOfModules')}}
 					</view>
 					<view class="before-icon">
 						<span class="iconfont">&#xe74a;</span>
@@ -90,7 +91,7 @@
 						0
 					</view>
 					<view>
-						单模距离
+						{{$t('packer.singleModeDistance')}}
 					</view>
 					<view class="before-icon">
 						<span class="iconfont">&#xe74c;</span>
@@ -101,7 +102,7 @@
 						0
 					</view>
 					<view>
-						对版距离
+						{{$t('packer.alignmentDistance')}}
 					</view>
 					<view class="before-icon">
 						<span class="iconfont">&#xe74c;</span>
@@ -115,7 +116,7 @@
 						0
 					</view>
 					<view>
-						点动速度
+						{{$t('packer.jogSpeed')}}
 					</view>
 					<view class="before-icon">
 						<span class="iconfont">&#xe74b;</span>
@@ -126,7 +127,7 @@
 						0
 					</view>
 					<view>
-						链条速度
+						{{$t('packer.chainSpeed')}}
 					</view>
 					<view class="before-icon">
 						<span class="iconfont">&#xe74b;</span>
@@ -137,7 +138,7 @@
 						0
 					</view>
 					<view>
-						对版速度
+						{{$t('packer.alignmentSpeed')}}
 					</view>
 					<view class="before-icon">
 						<span class="iconfont">&#xe74b;</span>

+ 41 - 25
pages/user/login.vue

@@ -11,47 +11,48 @@
 			<uni-easyinput type="text" v-model="loginForm.tenantId" :placeholder="$t('login.form.tenantId')" />
 			<uni-easyinput type="text" v-model="loginForm.username" :placeholder="$t('login.form.username')" />
 			<uni-easyinput type="password" v-model="loginForm.password" :placeholder="$t('login.form.password')" />
-			
-			<!-- <uni-easyinput type="text" v-model="loginForm.code" placeholder="验证码" />
-			<image :src="image" @click="getCodeImg" style="width:200rpx;height:100rpx" mode=""></image> -->
+
+			<uni-easyinput type="text" v-model="loginForm.code" placeholder="验证码" />
+			<image :src="image" @click="getCodeImg" style="width:200rpx;height:100rpx" mode=""></image>
 		</view>
 		<view class="login-btn">
 			<view class="check-warp">
 				<view class="check-icon-warp">
 					<i class="iconfont" style="margin-right:16rpx">&#xe6cb;</i>
 				</view>
-				{{$t('login.agreement.text')}} 
-				<span>{{$t('login.agreement.clause')}}</span> 
-				{{$t('login.agreement.and')}} 
-				<span>{{$t('login.agreement.agreement')}}</span>
+				{{$t('login.agreement.text')}}
+				{{$t('login.agreement.clause')}}
+				{{$t('login.agreement.and')}}
+				{{$t('login.agreement.agreement')}}
+				<span></span>
 				
+				<span></span> 
 			</view>
 			<button type="default" @click="lodingFn">{{$t('login.loginText')}}</button>
 			<p @click="toDemo" class="demo">{{$t('login.demo')}}</p>
+			<p @click="change11">切换 {{system_info}}</p>
 		</view>
-
-
 	</view>
 </template>
 
 <script>
-	import Vue from 'vue'
+	import Vue from 'vue' 
 	import {
 		getParams
 	} from '@/util/uitl.js'
-	
+
 	export default {
 		data() {
 			return {
 				loginForm: {
 					//租户ID
-					tenantId: '000000',
+					tenantId: '',
 					//部门ID
 					deptId: '',
 					//角色ID
 					roleId: '',
 					//用户名
-					username: 'admin',
+					username: '',
 					//密码
 					password: '',
 					//账号类型
@@ -66,7 +67,8 @@
 
 				},
 				image: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
-				formData: {}
+				formData: {},
+				system_info:'123123123123',
 			}
 		},
 		onLoad() {
@@ -74,8 +76,7 @@
 			v.getCodeImg()
 		},
 		methods: {
-			toDemo(){
-				
+			toDemo() {
 				uni.navigateTo({
 					url: '/pages/equipment/equipmentDemo'
 				})
@@ -96,7 +97,7 @@
 					str = str.replace(/#/g, '%23');
 					return str;
 				}
-				
+
 				function formateObjToParamStr(paramObj) {
 					const sdata = [];
 					for (let attr in paramObj) {
@@ -104,34 +105,38 @@
 					}
 					return sdata.join('&');
 				}
-				const loginForm = {...this.loginForm}
+				const loginForm = {
+					...this.loginForm
+				}
 				loginForm.password = this.$w_md5.hex_md5_32(loginForm.password)
 				console.log(loginForm)
 				uni.request({
-					url: 'http://36.134.91.96:10001/api' + '/blade-auth/oauth/token?' + formateObjToParamStr(loginForm),
+					url: 'https://cfm.bytesail.cn/api' + '/blade-auth/oauth/token?' + formateObjToParamStr(
+						loginForm),
 					method: 'POST',
 					header: {
 						'Content-Type': 'application/json',
 						'Captcha-Key': loginForm.key,
 						'Captcha-Code': loginForm.code,
 						'Tenant-Id': loginForm.tenantId,
-						'Authorization':'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
+						'Authorization': 'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
 						'Blade-Auth': undefined
 					},
 					success: res => {
-						if(res.statusCode == 200){
+						if (res.statusCode == 200) {
 							uni.setStorageSync('token', res.data.access_token)
 							uni.setStorageSync('Authorization', res.data)
 							Vue.prototype.$token = res.data
 							uni.reLaunch({
 								url: '/pages/equipment/equipment'
 							})
-						}else{
+						} else {
 							console.log(res)
 							uni.showToast({
-								icon:"none",
-								title: '账号密码错误!'
+								icon: "none",
+								title: res.data.error_description
 							})
+							this.getCodeImg()
 						}
 					},
 				});
@@ -144,6 +149,15 @@
 					this.image = data.image
 				})
 			},
+			change11() {
+				let system_info = uni.getStorageSync('locale');
+				console.log(system_info)
+				!system_info || system_info == 'zh-CN' ? system_info = this._i18n.locale = 'en' : 
+				system_info = this._i18n.locale = 'zh-CN'
+				
+				uni.setStorageSync('locale', system_info);
+				
+			}
 		},
 	}
 </script>
@@ -175,11 +189,13 @@
 		height: 100vh;
 		width: 100vw;
 		background-size: 100% 100%;
-		.demo{
+
+		.demo {
 			margin-top: 30rpx;
 			text-align: center;
 			font-size: 24rpx;
 		}
+
 		.login-btn {
 			button {
 				background-color: #3370FF;

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


Fișier diff suprimat deoarece este prea mare
+ 258 - 229
unpackage/dist/dev/app-plus/app-view.js


+ 2 - 2
util/http.js

@@ -5,10 +5,10 @@ var BASE_URL
 //lb
 //const BASE_URL = 'http://10.0.126.219:82'
 if (process.env.NODE_ENV === 'development') {
-	BASE_URL = 'http://36.134.91.96:10001'
+	BASE_URL = 'https://cfm.bytesail.cn'
 	//BASE_URL = 'http://192.168.1.175:8188'
 } else {
-	BASE_URL = 'http://36.134.91.96:10001'
+	BASE_URL = 'https://cfm.bytesail.cn'
 	//BASE_URL = 'http://192.168.1.175:8188'
 }
 /**

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff