From 3a17831e3480b8c1036de0246495ff965fff6dd9 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期二, 20 一月 2026 18:03:20 +0800
Subject: [PATCH] 根据华舟业务蓝图对设备模具、质量、车间进行优化测试
---
pages/index/login.vue | 1000 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 503 insertions(+), 497 deletions(-)
diff --git a/pages/index/login.vue b/pages/index/login.vue
index f6e8b25..afc19a5 100644
--- a/pages/index/login.vue
+++ b/pages/index/login.vue
@@ -1,14 +1,14 @@
<template>
- <view class="content">
- <image class="bg-img" src="../../static/login.jpg"></image>
- <view class="container">
- <view class="title">{{ $t("login.title") }}</view>
- <view class="box">
- <view class="logo">
- <image src="../../static/logo.png" mode=""></image>
- </view>
- <view class="login">
- <!-- <view class="item">
+ <view class="content">
+ <image class="bg-img" src="../../static/login.jpg"></image>
+ <view class="container">
+ <view class="title">{{ $t("login.title") }}</view>
+ <view class="box">
+ <view class="logo">
+ <image src="../../static/logo.png" mode=""></image>
+ </view>
+ <view class="login">
+ <!-- <view class="item">
<view class="left">褰撳墠甯愬锛�</view>
<picker :range="arrayDataBases" :value="DataBases" @change="DataBasesChange">
<view class="right" style="display: flex;align-items: center;">
@@ -17,525 +17,531 @@
</view>
</picker>
</view> -->
- <view class="item">
- <view class="left">{{ $t("login.Language") }}锛�</view>
- <picker :range="['涓枃','English']" :value="Language" @change="onLanguageChangeHandler">
- <view class="right" style="display: flex;align-items: center;">
- <input type="text" disabled v-model="Language" placeholder="璇烽�夋嫨璇█">
- <uni-icons type="forward" color="#808080"
- style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
- </view>
- </picker>
- </view>
- <view class="item">
- <view class="left">{{ $t("login.CurrentOrganization") }}锛�</view>
- <picker :range="arrayOrganization" :value="Organization" @change="OrganizationChange">
- <view class="right" style="display: flex;align-items: center;">
- <input type="text" disabled v-model="Organization" placeholder="璇烽�夋嫨褰撳墠缁勭粐">
- <uni-icons type="forward" color="#808080"
- style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
- </view>
- </picker>
- </view>
+ <view class="item">
+ <view class="left">{{ $t("login.Language") }}锛�</view>
+ <picker :range="['涓枃','English']" :value="Language" @change="onLanguageChangeHandler">
+ <view class="right" style="display: flex;align-items: center;">
+ <input type="text" disabled v-model="Language" placeholder="璇烽�夋嫨璇█">
+ <uni-icons type="forward" color="#808080"
+ style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
+ </view>
+ </picker>
+ </view>
+ <view class="item">
+ <view class="left">{{ $t("login.CurrentOrganization") }}锛�</view>
+ <picker :range="arrayOrganization" :value="Organization" @change="OrganizationChange">
+ <view class="right" style="display: flex;align-items: center;">
+ <input type="text" disabled v-model="Organization" placeholder="璇烽�夋嫨褰撳墠缁勭粐">
+ <uni-icons type="forward" color="#808080"
+ style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
+ </view>
+ </picker>
+ </view>
- <view class="item">
- <view class="left">{{ $t("login.UserName") }}锛�</view>
- <view class="right">
- <input type="text" v-model="UserName">
- </view>
- </view>
- <view class="item">
- <view class="left">{{ $t("login.PassWord") }}锛�</view>
- <view class="right">
- <input type="password" v-model="PassWord">
- </view>
- </view>
- <!-- <view class="api">
+ <view class="item">
+ <view class="left">{{ $t("login.UserName") }}锛�</view>
+ <view class="right">
+ <input type="text" v-model="UserName">
+ </view>
+ </view>
+ <view class="item">
+ <view class="left">{{ $t("login.PassWord") }}锛�</view>
+ <view class="right">
+ <input type="password" v-model="PassWord">
+ </view>
+ </view>
+ <!-- <view class="api">
褰撳墠鏈嶅姟鍣ㄥ湴鍧�锛歿{serverUrl}}
</view>
<view class="apibtn" @tap="changeApi=true">淇敼鏈嶅姟鍣ㄥ湴鍧�</view> -->
- </view>
- </view>
- <uni-popup ref="popup" type="center">
- <uni-popup-dialog :title="$t('login.ServiceSetting')" mode="input" @confirm="confirmHandler"
- :before-close="true" @close="close">
- <view class="popup-content">
- <input type="text" v-model="serverUrlName" placeholder="璇疯緭鍏ユ湇鍔″櫒鍚嶇О">
- </view>
- </uni-popup-dialog>
- </uni-popup>
+ </view>
+ </view>
+ <uni-popup ref="popup" type="center">
+ <uni-popup-dialog :title="$t('login.ServiceSetting')" mode="input" @confirm="confirmHandler"
+ :before-close="true" @close="close">
+ <view class="popup-content">
+ <input type="text" v-model="serverUrlName" placeholder="璇疯緭鍏ユ湇鍔″櫒鍚嶇О">
+ </view>
+ </uni-popup-dialog>
+ </uni-popup>
- <view class="btn" @tap="submit">{{$t("login.Login")}}</view>
- <view class="btn apibtn" @click="openServerSettingHandler">{{$t("login.ServiceSetting")}}</view>
+ <view class="btn" @tap="submit">{{$t("login.Login")}}</view>
+ <view class="btn apibtn" @click="openServerSettingHandler">{{$t("login.ServiceSetting")}}</view>
- </view>
- </view>
+ </view>
+ </view>
</template>
<script>
- import {
- setLoginData,
- setUserInfo
- } from "@/utils/auth.js";
- import hFormAlert from '@/components/h-form-alert/h-form-alert.vue';
- import {
- CommonUtils
- } from "../../utils/common";
- import {
- getLanguagePackJson
- } from "../../utils/i18n";
- import WebSocketServices from "@/utils/WebSocketServices";
- import getuiUtils from "../../utils/getuiUtils";
- export default {
- components: {
- hFormAlert
- },
- mounted() {
- console.log(uni.getLocale())
- },
- data() {
- return {
- WebSocketServices,
- CommonUtils,
- arrayDataBases: [],
- DataBases: '',
- Language: '涓枃',
- serverUrlandName: {
- "娴欐睙鏅轰簯杩堟��": 'http://47.96.97.237/API/',
- "娓╁窞娴疯瘹鍏夊": 'http://122.228.39.234:7177/API/',
- "瀹佹尝鎯犲悍宸ヤ笟": 'http://172.16.72.30:6699/API/',
- "浣欏鍏磋揪璧峰姩鍣�": 'http://121.37.133.104/API/',
- "鏉庢灄淇婃湰鍦版祴璇�": 'http://localhost:8082/LuBaoAPI/',
- "鏉窞鍑礉濂堢壒": 'http://192.168.50.253:8080/API/',
- "鏉窞鍑礉濂堢壒澶栫綉": 'http://erp.hzcabinet.cn:9090/API/',
- "缈佹稕娑涙湰鍦版祴璇�": 'http://localhost:81/API/',
- "闄堥晲鍝叉湰鍦版祴璇�": 'http://192.168.0.121:81/API/',
- "闄堥晲鍝叉湰鍦版祴璇�2": 'http://192.168.0.102:81/API/',
- "寮犵憺骞挎湰鍦版祴璇�": 'http://localhost:8082/API/',
- "浣欐�濇澃鏈湴娴嬭瘯": 'http://localhost:8082/LuBaoAPI/',
- // 灏忓崼鍐呭缃�
- "鑻忓窞鍗櫤绉戞妧-澶栫綉": 'http://221.224.60.42:8082/API_WW/',
- "鑻忓窞鍗櫤绉戞妧-鍐呯綉": 'http://172.16.20.233:8082/API_NW/',
- // 鍥涚淮灏斿唴澶栫綉
- "瀹佹尝鍥涚淮灏�-鍐呯綉": "http://192.168.0.236:9010/API/",
- "瀹佹尝鍥涚淮灏�-澶栫綉": "http://220.189.218.155:9010/API/",
- // 閿﹂殕
- "閿﹂殕-鏅鸿兘瀹跺眳": "http://192.168.1.11/API/",
- "閿﹂殕-鏅鸿兘瀹跺眳-澶栫綉": "http://61.174.29.234:8880/API/",
- // 鍗庤垷鍖呰
- "瀹佹尝鍗庤垷鍖呰1": "http://192.168.110.222:8082/API_NW/",
- "瀹佹尝鍗庤垷鍖呰2": "http://192.168.88.167:8082/API_NW/",
- "瀹佹尝鍗庤垷鍖呰": "http://61.164.64.222:8082/API_WW/",
- },
- serverUrlName: uni.getStorageSync('serverUrlName') || '娴欐睙鏅轰簯杩堟��',
+ import {
+ setLoginData,
+ setUserInfo
+ } from "@/utils/auth.js";
+ import hFormAlert from '@/components/h-form-alert/h-form-alert.vue';
+ import {
+ CommonUtils
+ } from "../../utils/common";
+ import {
+ getLanguagePackJson
+ } from "../../utils/i18n";
+ import WebSocketServices from "@/utils/WebSocketServices";
+ import getuiUtils from "../../utils/getuiUtils";
+ export default {
+ components: {
+ hFormAlert
+ },
+ mounted() {
+ console.log(uni.getLocale())
+ },
+ data() {
+ return {
+ WebSocketServices,
+ CommonUtils,
+ arrayDataBases: [],
+ DataBases: '',
+ Language: '涓枃',
+ serverUrlandName: {
+ "娴欐睙鏅轰簯杩堟��": 'http://47.96.97.237/API/',
+ "娓╁窞娴疯瘹鍏夊": 'http://122.228.39.234:7177/API/',
+ "瀹佹尝鎯犲悍宸ヤ笟": 'http://172.16.72.30:6699/API/',
+ "浣欏鍏磋揪璧峰姩鍣�": 'http://121.37.133.104/API/',
+ "鏉庢灄淇婃湰鍦版祴璇�": 'http://localhost:8082/LuBaoAPI/',
+ "鏉窞鍑礉濂堢壒": 'http://192.168.50.253:8080/API/',
+ "鏉窞鍑礉濂堢壒澶栫綉": 'http://erp.hzcabinet.cn:9090/API/',
+ "缈佹稕娑涙湰鍦版祴璇�": 'http://localhost:81/API/',
+ "闄堥晲鍝叉湰鍦版祴璇�": 'http://192.168.0.121:81/API/',
+ "闄堥晲鍝叉湰鍦版祴璇�2": 'http://192.168.0.102:81/API/',
+ "寮犵憺骞挎湰鍦版祴璇�": 'http://localhost:8082/API/',
+ "浣欐�濇澃鏈湴娴嬭瘯": 'http://localhost:8082/LuBaoAPI/',
+ // 灏忓崼鍐呭缃�
+ "鑻忓窞鍗櫤绉戞妧-澶栫綉": 'http://221.224.60.42:8082/API_WW/',
+ "鑻忓窞鍗櫤绉戞妧-鍐呯綉": 'http://172.16.20.233:8082/API_NW/',
+ // 鍥涚淮灏斿唴澶栫綉
+ "瀹佹尝鍥涚淮灏�-鍐呯綉": "http://192.168.0.236:9010/API/",
+ "瀹佹尝鍥涚淮灏�-澶栫綉": "http://220.189.218.155:9010/API/",
+ // 閿﹂殕
+ "閿﹂殕-鏅鸿兘瀹跺眳": "http://192.168.1.11/API/",
+ "閿﹂殕-鏅鸿兘瀹跺眳-澶栫綉": "http://61.174.29.234:8880/API/",
+ // 鍗庤垷鍖呰
+ "瀹佹尝鍗庤垷鍖呰1": "http://192.168.110.222:8082/API_NW/",
+ "瀹佹尝鍗庤垷鍖呰2": "http://192.168.88.167:8082/API_NW/",
+ "瀹佹尝鍗庤垷鍖呰": "http://61.164.64.222:8082/API_WW/",
+ },
+ serverUrlName: uni.getStorageSync('serverUrlName') || '娴欐睙鏅轰簯杩堟��',
- arrayOrganization: [],
- Organization: '',
- HOrgNameList: [],
+ arrayOrganization: [],
+ Organization: '',
+ HOrgNameList: [],
- HOrgName: '',
- UserName: '', //admin 001
- PassWord: '', //123456
- serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API/',
- serverUrlCache: '',
- }
- },
- onLoad() {
- this.ApplyLanguagePack(this.$i18n.locale)
- },
- onShow() {
- var logindata = uni.getStorageSync('loginData') || ''
- // console.log(logindata)
- if (logindata) {
- logindata = JSON.parse(logindata)
- this.HOrgName = logindata.HOrgName
- this.Organization = logindata.Organization
- this.UserName = logindata.HUserNumber
- this.PassWord = logindata.HPassWord
- // this.UserName = logindata.UserName
- // this.PassWord = logindata.PassWord
- }
- this.getOrganization()
- this.getDataBases()
- },
- methods: {
- async ApplyLanguagePack(lang, forceUpdate = false) {
- // 璇诲彇璇█鍖呭苟鍔犺浇
- // let languagePack = await getLanguagePackJson(lang)
- // this.$i18n.setLocaleMessage(lang, languagePack)
- this.$i18n.locale = lang
- },
- onLanguageChangeHandler(e) {
- //鍔ㄦ�佽幏鍙栧悗绔殑璇█鍖呮枃浠讹紝骞跺皢璇█鍖呭簲鐢ㄥ埌鍏ㄥ眬
- console.log('e: ', e.detail.value);
- if (e.detail.value == 0) {
- this.Language = '涓枃'
- this.ApplyLanguagePack("zh-Hans")
- // this.$i18n.locale = 'zh-Hans'
- }
- if (e.detail.value == 1) {
- this.Language = 'English'
- this.ApplyLanguagePack("en")
- // this.$i18n.locale = 'en'
- }
- },
- async InitOrgination() {
- console.log("鍒濆鍖栫粍缁�")
- await this.$nextTick(() => {
- this.Organization = this.arrayOrganization[0]
- this.HOrgName = this.HOrgNameList[0]
+ HOrgName: '',
+ UserName: '', //admin 001
+ PassWord: '', //123456
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API/',
+ serverUrlCache: '',
+ }
+ },
+ onLoad() {
+ this.ApplyLanguagePack(this.$i18n.locale)
+ },
+ onShow() {
+ var logindata = uni.getStorageSync('loginData') || ''
+ // console.log(logindata)
+ if (logindata) {
+ logindata = JSON.parse(logindata)
+ this.HOrgName = logindata.HOrgName
+ this.Organization = logindata.Organization
+ this.UserName = logindata.HUserNumber
+ this.PassWord = logindata.HPassWord
+ // this.UserName = logindata.UserName
+ // this.PassWord = logindata.PassWord
+ }
+ this.getOrganization()
+ this.getDataBases()
+ },
+ methods: {
+ async ApplyLanguagePack(lang, forceUpdate = false) {
+ // 璇诲彇璇█鍖呭苟鍔犺浇
+ // let languagePack = await getLanguagePackJson(lang)
+ // this.$i18n.setLocaleMessage(lang, languagePack)
+ this.$i18n.locale = lang
+ },
+ onLanguageChangeHandler(e) {
+ //鍔ㄦ�佽幏鍙栧悗绔殑璇█鍖呮枃浠讹紝骞跺皢璇█鍖呭簲鐢ㄥ埌鍏ㄥ眬
+ console.log('e: ', e.detail.value);
+ if (e.detail.value == 0) {
+ this.Language = '涓枃'
+ this.ApplyLanguagePack("zh-Hans")
+ // this.$i18n.locale = 'zh-Hans'
+ }
+ if (e.detail.value == 1) {
+ this.Language = 'English'
+ this.ApplyLanguagePack("en")
+ // this.$i18n.locale = 'en'
+ }
+ },
+ async InitOrgination() {
+ console.log("鍒濆鍖栫粍缁�")
+ await this.$nextTick(() => {
+ this.Organization = this.arrayOrganization[0]
+ this.HOrgName = this.HOrgNameList[0]
- let org = uni.getStorageSync('Organization')
- let orgName = uni.getStorageSync('OrganizationID')
- let orgHas = Array.from(this.arrayOrganization).findIndex((e) => e == org)
- if (org && (orgHas != -1)) {
- this.Organization = org
- this.HOrgName = orgName
- }
- })
- },
- confirmHandler() {
- console.log(this.serverUrlName)
- console.log(this.serverUrlandName[this.serverUrlName])
- let url = this.serverUrlandName[this.serverUrlName];
- if (url != undefined) {
- uni.setStorageSync('serverUrl', url)
- uni.setStorageSync('serverUrlName', this.serverUrlName)
- this.serverUrl = url
- this.changeApi = false
- this.getOrganization()
- this.$refs.popup.close()
- } else {
- uni.showToast({
- title: '鏈嶅姟鍣ㄥ悕绉伴敊璇閲嶆柊杈撳叆',
- icon: 'none',
- })
- }
- },
- close() {
- this.$refs.popup.close()
- },
- openServerSettingHandler() {
- this.$refs.popup.open()
- },
- getDataBases() {
- uni.request({
- url: this.serverUrl + '/Web/GetDataBases',
- success: (result) => {
- console.log(result);
- if (result.count == 1) {
- for (var i = 0; i < res.data.data.length; i++) {
- this.arrayDataBases[i] = result.data.data[i].name;
- }
- }
- console.log(this.arrayDataBases);
- this.$forceUpdate();
- },
- fail: (res) => {
- console.log(res);
- },
- });
- },
- DataBasesChange(e) {
- console.log(e.detail.value)
- this.DataBases = this.arrayDataBases[e.detail.value]
- uni.setStorageSync('DataBases', this.DataBases);
- },
+ let org = uni.getStorageSync('Organization')
+ let orgName = uni.getStorageSync('OrganizationID')
+ let orgHas = Array.from(this.arrayOrganization).findIndex((e) => e == org)
+ if (org && (orgHas != -1)) {
+ this.Organization = org
+ this.HOrgName = orgName
+ }
+ })
+ },
+ confirmHandler() {
+ console.log(this.serverUrlName)
+ console.log(this.serverUrlandName[this.serverUrlName])
+ let url = this.serverUrlandName[this.serverUrlName];
+ if (url != undefined) {
+ uni.setStorageSync('serverUrl', url)
+ uni.setStorageSync('serverUrlName', this.serverUrlName)
+ this.serverUrl = url
+ this.changeApi = false
+ this.getOrganization()
+ this.$refs.popup.close()
+ } else {
+ uni.showToast({
+ title: '鏈嶅姟鍣ㄥ悕绉伴敊璇閲嶆柊杈撳叆',
+ icon: 'none',
+ })
+ }
+ },
+ close() {
+ this.$refs.popup.close()
+ },
+ openServerSettingHandler() {
+ this.$refs.popup.open()
+ },
+ getDataBases() {
+ uni.request({
+ url: this.serverUrl + '/Web/GetDataBases',
+ success: (result) => {
+ console.log(result);
+ if (result.count == 1) {
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayDataBases[i] = result.data.data[i].name;
+ }
+ }
+ console.log(this.arrayDataBases);
+ this.$forceUpdate();
+ },
+ fail: (res) => {
+ console.log(res);
+ },
+ });
+ },
+ DataBasesChange(e) {
+ console.log(e.detail.value)
+ this.DataBases = this.arrayDataBases[e.detail.value]
+ uni.setStorageSync('DataBases', this.DataBases);
+ },
- getOrganization() {
- this.arrayOrganization = []
- uni.request({
- url: this.serverUrl + '/Web/GetOrganizations',
- success: (res) => {
- console.log(res.data.data);
- for (var i = 0; i < res.data.data.length; i++) {
- this.arrayOrganization[i] = res.data.data[i].Name
- this.HOrgNameList[i] = res.data.data[i].ID
- }
- // this.Organization = res.data.data[0].Name
- // this.HOrgName = res.data.data[0].ID
- this.$forceUpdate();
- this.InitOrgination()
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鑾峰彇缁勭粐澶辫触,璇锋鏌ユ湇鍔″櫒鍦板潃',
- icon: 'none'
- })
- },
- });
- },
- OrganizationChange(e) {
- // console.log(e.detail.value)
- this.Organization = this.arrayOrganization[e.detail.value]
- this.HOrgName = this.HOrgNameList[e.detail.value]
- },
- submit() {
- if (!this.Organization) {
- uni.showToast({
- title: '璇烽�夋嫨缁勭粐',
- icon: 'none'
- })
- } else if (!this.UserName) {
- uni.showToast({
- title: '璇疯緭鍏ョ敤鎴峰悕',
- icon: 'none'
- })
- } else if (!this.PassWord) {
- uni.showToast({
- title: '璇疯緭鍏ュ瘑鐮�',
- icon: 'none'
- })
- } else {
- uni.showLoading({
- title: '鐧诲綍涓�...',
- mask: true
- })
- var data = {
- HUserNumber: this.UserName,
- HPassWord: this.PassWord,
- HStockOrgID: this.HOrgName,
- HStockOrgName: this.Organization
- }
+ getOrganization() {
+ this.arrayOrganization = []
+ uni.request({
+ url: this.serverUrl + '/Web/GetOrganizations',
+ success: (res) => {
+ console.log(res.data.data);
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayOrganization[i] = res.data.data[i].Name
+ this.HOrgNameList[i] = res.data.data[i].ID
+ }
+ // this.Organization = res.data.data[0].Name
+ // this.HOrgName = res.data.data[0].ID
+ this.$forceUpdate();
+ this.InitOrgination()
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鑾峰彇缁勭粐澶辫触,璇锋鏌ユ湇鍔″櫒鍦板潃',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ OrganizationChange(e) {
+ // console.log(e.detail.value)
+ this.Organization = this.arrayOrganization[e.detail.value]
+ this.HOrgName = this.HOrgNameList[e.detail.value]
+ },
+ submit() {
+ if (!this.Organization) {
+ uni.showToast({
+ title: '璇烽�夋嫨缁勭粐',
+ icon: 'none'
+ })
+ } else if (!this.UserName) {
+ uni.showToast({
+ title: '璇疯緭鍏ョ敤鎴峰悕',
+ icon: 'none'
+ })
+ } else if (!this.PassWord) {
+ uni.showToast({
+ title: '璇疯緭鍏ュ瘑鐮�',
+ icon: 'none'
+ })
+ } else {
+ uni.showLoading({
+ title: '鐧诲綍涓�...',
+ mask: true
+ })
+ var data = {
+ HUserNumber: this.UserName,
+ HPassWord: this.PassWord,
+ HStockOrgID: this.HOrgName,
+ HStockOrgName: this.Organization
+ }
- // UserName: this.UserName,
- // PassWord: this.PassWord,
- // HOrgName: this.HOrgName,
- // Organization: this.Organization
- // }
- uni.setStorageSync('loginData', JSON.stringify(data));
- uni.request({
- url: this.serverUrl + 'WEBSController/GetUser_Json',
- method: 'GET',
- data: data,
- success: (res) => {
- console.log(res)
- uni.hideLoading()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- if (res.data.count == 1) {
- setLoginData(data)
- setUserInfo(res.data.data[0])
- uni.setStorageSync('HUserName', res.data.data[0].Czymc);
- uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID);
- uni.setStorageSync('SourceFlag', false);
- uni.setStorageSync('login', "login");
- uni.setStorageSync('Organization', this.Organization);
- uni.setStorageSync('OrganizationID', this.HOrgName);
- //瀛樺偍閮ㄩ棬 鑱屽憳 浠撳簱 绛変俊鎭�
- uni.setStorageSync('HDeptID', res.data.data[0].HDeptID); //閮ㄩ棬
- uni.setStorageSync('HDeptName', res.data.data[0].HDeptName);
- uni.setStorageSync('HEmpID', res.data.data[0].HEmpID); //鑱屽憳
- uni.setStorageSync('HEmpName', res.data.data[0].HEmpName);
- uni.setStorageSync('HSCWHID', res.data.data[0].HSCWHID); //璋冨叆浠撳簱
- uni.setStorageSync('HSCWHName', res.data.data[0].HSCWHName);
- uni.setStorageSync('HWhID', res.data.data[0].HWhID); //瀵瑰簲浠撳簱
- uni.setStorageSync('HWhName', res.data.data[0].HWhName);
- uni.setStorageSync('HWorkCenterID', res.data.data[0].HWorkCenterID); //宸ヤ綔涓績
- uni.setStorageSync('HWorkCenterName', res.data.data[0].HWorkCenterName);
- uni.setStorageSync('HSecManagerID', res.data.data[0].HSecManagerID); //瀵瑰簲楠屾敹
- uni.setStorageSync('HSecManagerName', res.data.data[0].HSecManagerName);
- this.CommonUtils.setServerUrl(this.serverUrl)
- // this.WebSocketServices.createConnect(res.data.data[0].Czybm,res.data.data[0].Czymc);
- // getuiUtils.getClientID()
- getuiUtils.getClientID(res.data.data[0].Czybm,res.data.data[0].Czymc)
- uni.reLaunch({
- url: '/pages/index/index'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.hideLoading()
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
+ // UserName: this.UserName,
+ // PassWord: this.PassWord,
+ // HOrgName: this.HOrgName,
+ // Organization: this.Organization
+ // }
+ uni.setStorageSync('loginData', JSON.stringify(data));
+ uni.request({
+ url: this.serverUrl + 'WEBSController/GetUser_Json',
+ method: 'GET',
+ data: data,
+ success: (res) => {
+ console.log(res)
+ uni.hideLoading()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ if (res.data.count == 1) {
+ setLoginData(data)
+ setUserInfo(res.data.data[0])
+ uni.setStorageSync('HUserName', res.data.data[0].Czymc);
+ uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID);
+ uni.setStorageSync('SourceFlag', false);
+ uni.setStorageSync('login', "login");
+ uni.setStorageSync('Organization', this.Organization);
+ uni.setStorageSync('OrganizationID', this.HOrgName);
+ //瀛樺偍閮ㄩ棬 鑱屽憳 浠撳簱 绛変俊鎭�
+ uni.setStorageSync('HDeptID', res.data.data[0].HDeptID); //閮ㄩ棬
+ uni.setStorageSync('HDeptName', res.data.data[0].HDeptName);
+ uni.setStorageSync('HEmpID', res.data.data[0].HEmpID); //鑱屽憳
+ uni.setStorageSync('HEmpName', res.data.data[0].HEmpName);
+ uni.setStorageSync('HSCWHID', res.data.data[0].HSCWHID); //璋冨叆浠撳簱
+ uni.setStorageSync('HSCWHName', res.data.data[0].HSCWHName);
+ uni.setStorageSync('HWhID', res.data.data[0].HWhID); //瀵瑰簲浠撳簱
+ uni.setStorageSync('HWhName', res.data.data[0].HWhName);
+ uni.setStorageSync('HWorkCenterID', res.data.data[0].HWorkCenterID); //宸ヤ綔涓績
+ uni.setStorageSync('HWorkCenterName', res.data.data[0].HWorkCenterName);
+ uni.setStorageSync('HSecManagerID', res.data.data[0].HSecManagerID); //瀵瑰簲楠屾敹
+ uni.setStorageSync('HSecManagerName', res.data.data[0].HSecManagerName);
+ uni.setStorageSync('HGroupID', res.data.data[0].HGroupID); //瀵瑰簲鐝粍
+ uni.setStorageSync('HGroupName', res.data.data[0].HGroup);
+ uni.setStorageSync('HProcID', res.data.data[0].HProcID); //瀵瑰簲宸ュ簭
+ uni.setStorageSync('HProcName', res.data.data[0].HProcName);
+ uni.setStorageSync('HSourceID', res.data.data[0].HSourceID); //瀵瑰簲鐢熶骇璧勬簮
+ uni.setStorageSync('HSourceName', res.data.data[0].HSource);
+ this.CommonUtils.setServerUrl(this.serverUrl)
+ // this.WebSocketServices.createConnect(res.data.data[0].Czybm,res.data.data[0].Czymc);
+ // getuiUtils.getClientID()
+ getuiUtils.getClientID(res.data.data[0].Czybm, res.data.data[0].Czymc)
+ uni.reLaunch({
+ url: '/pages/index/index'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
- // uni.request({
- // url: this.serverUrl + '/Web/GetUser',
- // method: 'GET',
- // data: data,
- // success: (res) => {
- // console.log(res)
- // uni.hideLoading()
- // uni.showToast({
- // title: res.data.Message,
- // icon: 'none'
- // })
- // if (res.data.count == 1) {
- // setLoginData(data)
- // setUserInfo(res.data.data[0])
- // uni.setStorageSync('HUserName', res.data.data[0].Czymc);
- // uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID);
- // uni.setStorageSync('SourceFlag', false);
- // uni.setStorageSync('login', "login");
- // uni.setStorageSync('Organization', this.Organization);
- // uni.setStorageSync('OrganizationID', this.HOrgName);
- // this.CommonUtils.setServerUrl(this.serverUrl)
- // uni.reLaunch({
- // url: '/pages/index/index'
- // })
- // }
- // },
- // fail: (res) => {
- // console.log(res);
- // uni.hideLoading()
- // uni.showToast({
- // title: '鎺ュ彛璇锋眰澶辫触',
- // icon: 'none'
- // })
- // },
- // });
- }
- }
- }
- }
+ // uni.request({
+ // url: this.serverUrl + '/Web/GetUser',
+ // method: 'GET',
+ // data: data,
+ // success: (res) => {
+ // console.log(res)
+ // uni.hideLoading()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // if (res.data.count == 1) {
+ // setLoginData(data)
+ // setUserInfo(res.data.data[0])
+ // uni.setStorageSync('HUserName', res.data.data[0].Czymc);
+ // uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID);
+ // uni.setStorageSync('SourceFlag', false);
+ // uni.setStorageSync('login', "login");
+ // uni.setStorageSync('Organization', this.Organization);
+ // uni.setStorageSync('OrganizationID', this.HOrgName);
+ // this.CommonUtils.setServerUrl(this.serverUrl)
+ // uni.reLaunch({
+ // url: '/pages/index/index'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.hideLoading()
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
+ }
+ }
+ }
+ }
</script>
<style lang="scss" scoped>
- .bg-img {
- position: fixed;
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- z-index: -1;
- }
+ .bg-img {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ z-index: -1;
+ }
- .container {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
+ .container {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
- .title {
- margin-top: 174rpx;
- font-size: 47rpx;
- font-weight: bold;
- color: #FFFFFF;
- }
+ .title {
+ margin-top: 174rpx;
+ font-size: 47rpx;
+ font-weight: bold;
+ color: #FFFFFF;
+ }
- .box {
- width: 682rpx;
- position: relative;
- top: 120rpx;
- display: flex;
- justify-content: center;
+ .box {
+ width: 682rpx;
+ position: relative;
+ top: 120rpx;
+ display: flex;
+ justify-content: center;
- .logo {
- width: 155rpx;
- height: 155rpx;
- padding: 10rpx;
- position: absolute;
- z-index: 9;
- background-color: rgba(255, 255, 255, 0.5);
- border-radius: 100%;
+ .logo {
+ width: 155rpx;
+ height: 155rpx;
+ padding: 10rpx;
+ position: absolute;
+ z-index: 9;
+ background-color: rgba(255, 255, 255, 0.5);
+ border-radius: 100%;
- image {
- width: 100%;
- height: 100%;
- border-radius: 100%;
- background-color: #f0f3f7;
- }
- }
+ image {
+ width: 100%;
+ height: 100%;
+ border-radius: 100%;
+ background-color: #f0f3f7;
+ }
+ }
- .login {
- width: 100%;
- height: 520rpx;
- position: absolute;
- top: 90rpx;
- z-index: 0;
- background: #FFFFFF;
- border-radius: 25rpx 0 25rpx 0;
- box-shadow: 0 6rpx 24rpx 8rpx rgba(21, 99, 210, 0.14);
- padding-top: 160rpx;
+ .login {
+ width: 100%;
+ height: 520rpx;
+ position: absolute;
+ top: 90rpx;
+ z-index: 0;
+ background: #FFFFFF;
+ border-radius: 25rpx 0 25rpx 0;
+ box-shadow: 0 6rpx 24rpx 8rpx rgba(21, 99, 210, 0.14);
+ padding-top: 160rpx;
- .item {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- margin-right: 38rpx;
- margin-bottom: 70rpx;
+ .item {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ margin-right: 38rpx;
+ margin-bottom: 70rpx;
- .left {
- font-size: 34rpx;
- font-weight: 400;
- color: #3C3C3C;
- }
+ .left {
+ font-size: 34rpx;
+ font-weight: 400;
+ color: #3C3C3C;
+ }
- .right {
- width: 441rpx;
- height: 68rpx;
- background: #EBEBEB;
- border-radius: 10rpx;
+ .right {
+ width: 441rpx;
+ height: 68rpx;
+ background: #EBEBEB;
+ border-radius: 10rpx;
- input {
- height: 100%;
- padding: 0 30rpx;
- font-size: 30rpx;
- }
- }
- }
+ input {
+ height: 100%;
+ padding: 0 30rpx;
+ font-size: 30rpx;
+ }
+ }
+ }
- // .api{
- // margin-left: 30rpx;
- // font-size: 27rpx;
- // color: #888;
- // }
- // .apibtn{
- // text-align: center;
- // font-size: 27rpx;
- // margin-top: 14rpx;
- // color: #066fb8;
- // text-decoration: underline; /* 娣诲姞涓嬪垝绾� */
- // font-style: italic; /* 灏嗗瓧浣撳彉涓烘枩浣� */
- // }
- }
- }
+ // .api{
+ // margin-left: 30rpx;
+ // font-size: 27rpx;
+ // color: #888;
+ // }
+ // .apibtn{
+ // text-align: center;
+ // font-size: 27rpx;
+ // margin-top: 14rpx;
+ // color: #066fb8;
+ // text-decoration: underline; /* 娣诲姞涓嬪垝绾� */
+ // font-style: italic; /* 灏嗗瓧浣撳彉涓烘枩浣� */
+ // }
+ }
+ }
- .btn {
- width: 540rpx;
- height: 92rpx;
- line-height: 92rpx;
- margin-top: 940rpx;
- background: #78CEFD;
- box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(120, 206, 253, 0.3);
- border-radius: 10rpx;
- font-weight: 400;
- color: #FEFEFE;
- text-align: center;
- font-size: 36rpx;
- }
+ .btn {
+ width: 540rpx;
+ height: 92rpx;
+ line-height: 92rpx;
+ margin-top: 940rpx;
+ background: #78CEFD;
+ box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(120, 206, 253, 0.3);
+ border-radius: 10rpx;
+ font-weight: 400;
+ color: #FEFEFE;
+ text-align: center;
+ font-size: 36rpx;
+ }
- .apibtn {
- margin-top: 50rpx;
- background: #eec18e;
- box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(253, 186, 118, 0.3);
- }
- }
+ .apibtn {
+ margin-top: 50rpx;
+ background: #eec18e;
+ box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(253, 186, 118, 0.3);
+ }
+ }
- .popup-content {
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- gap: 30rpx;
+ .popup-content {
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ gap: 30rpx;
- .pop-item {
- border: #EBEBEB 2rpx solid;
- border-radius: 10rpx;
- padding: 14rpx 8rpx;
- }
+ .pop-item {
+ border: #EBEBEB 2rpx solid;
+ border-radius: 10rpx;
+ padding: 14rpx 8rpx;
+ }
- >picker {
- background-color: #EBEBEB;
- }
- }
+ >picker {
+ background-color: #EBEBEB;
+ }
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1