修复冲突
This commit is contained in:
commit
31d2d99ad3
30
App.vue
30
App.vue
|
|
@ -1,18 +1,32 @@
|
|||
<script>
|
||||
import { connectWs, closeWs } from '@/common/websocketManager.js';
|
||||
let globalWs = null;
|
||||
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
onLaunch() {
|
||||
console.log('App Launch');
|
||||
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
|
||||
onShow() {
|
||||
console.log('App Show');
|
||||
if (uni.getStorageSync('userInfo')) {
|
||||
// 重置重连计数,确保立即重连
|
||||
connectWs()
|
||||
}
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
|
||||
onHide() {
|
||||
console.log('App Hide');
|
||||
if (uni.getStorageSync('userInfo')) {
|
||||
// 可选择关闭 socket,或只是停止心跳
|
||||
closeWs()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "./uni_modules/vk-uview-ui/index.scss";
|
||||
/*每个页面公共css */
|
||||
</style>
|
||||
/* 每个页面公共css */
|
||||
</style>
|
||||
|
|
@ -0,0 +1,319 @@
|
|||
// common/websocket.js
|
||||
// 带中文日志与消息体打印选项的 WsRequest(替换你当前文件即可)
|
||||
|
||||
class WsRequest {
|
||||
constructor(url = '', options = {}) {
|
||||
this.url = url || '';
|
||||
this.options = Object.assign({
|
||||
header: {},
|
||||
protocols: [],
|
||||
debug: true,
|
||||
lang: 'zh', // 'zh' 或 'en',控制日志语言(默认中文)
|
||||
showMessageBody: true, // 是否在日志中显示收到消息的完整 JSON(默认 true)
|
||||
filterPing: true, // 是否过滤掉 ping/pong 日志(默认 true)
|
||||
heartbeatInterval: 30000,
|
||||
heartbeatTimeout: 15000,
|
||||
pingMessage: { type: 'ping' },
|
||||
parseJSON: true,
|
||||
maxReconnectAttempts: 10,
|
||||
reconnectDelayBase: 1000,
|
||||
autoConnect: false,
|
||||
bindGlobal: true
|
||||
}, options);
|
||||
|
||||
this.socketTask = null;
|
||||
this.connected = false;
|
||||
this._msgQueue = [];
|
||||
this.reconnectAttempts = 0;
|
||||
this._lastPongAt = Date.now();
|
||||
this._hbTimer = null;
|
||||
this._hbTimeoutTimer = null;
|
||||
this._subscriptions = new Map();
|
||||
|
||||
if (this.options.bindGlobal) this._bindGlobalSocketEvents();
|
||||
if (this.options.autoConnect) setTimeout(() => this.open(), 0);
|
||||
}
|
||||
|
||||
// 内部多语言 Label
|
||||
_label(key) {
|
||||
const zh = {
|
||||
open: '打开连接 ->',
|
||||
alreadyConnected: '已连接,忽略 open',
|
||||
connectNoTask: 'connectSocket 未返回 task,使用全局回调',
|
||||
onOpen: '连接已打开',
|
||||
onMessage: '收到消息',
|
||||
onClose: '连接已关闭',
|
||||
onError: '连接错误',
|
||||
globalOnOpen: '全局 onSocketOpen',
|
||||
globalOnMessage: '全局 onSocketMessage',
|
||||
hbTimeout: '心跳超时',
|
||||
reconnectScheduled: '计划重连',
|
||||
sendFailed: '发送失败',
|
||||
closeError: '关闭错误'
|
||||
};
|
||||
const en = {
|
||||
open: 'open ->',
|
||||
alreadyConnected: 'already connected, ignore open',
|
||||
connectNoTask: 'connectSocket returned no task (using global callbacks if available)',
|
||||
onOpen: 'onOpen',
|
||||
onMessage: 'onMessage',
|
||||
onClose: 'onClose',
|
||||
onError: 'onError',
|
||||
globalOnOpen: 'global onSocketOpen',
|
||||
globalOnMessage: 'global onSocketMessage',
|
||||
hbTimeout: 'hb timeout',
|
||||
reconnectScheduled: 'reconnect scheduled',
|
||||
sendFailed: 'send failed',
|
||||
closeError: 'close error'
|
||||
};
|
||||
return this.options.lang === 'zh' ? zh[key] || key : en[key] || key;
|
||||
}
|
||||
|
||||
// 简单统一日志
|
||||
log(...args) {
|
||||
if (!this.options.debug) return;
|
||||
// 如果是对象,格式化输出以便控制台可读
|
||||
const out = args.map(a => {
|
||||
if (typeof a === 'object') {
|
||||
try { return JSON.stringify(a, null, 2); } catch (e) { return String(a); }
|
||||
}
|
||||
return String(a);
|
||||
}).join(' ');
|
||||
console.log('[WsRequest]', out);
|
||||
}
|
||||
|
||||
// ---------- 对外控制 ----------
|
||||
open() {
|
||||
if (!this.url) { this.log(this._label('open'), this._label('noUrl') || 'no url'); return; }
|
||||
if (this.connected) { this.log(this._label('alreadyConnected')); return; }
|
||||
this.log(this._label('open'), this.url);
|
||||
try {
|
||||
const task = uni.connectSocket({ url: this.url, header: this.options.header, protocols: this.options.protocols });
|
||||
if (task && typeof task.onOpen === 'function') {
|
||||
this._bindSocketTask(task);
|
||||
} else {
|
||||
this.log(this._label('connectNoTask'));
|
||||
// 依赖全局回调,_bindGlobalSocketEvents 已经绑定则会处理 onOpen/onMessage
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
close(code = 1000, reason = 'client close') {
|
||||
this._stopHeartbeat();
|
||||
try {
|
||||
if (this.socketTask && typeof this.socketTask.close === 'function') {
|
||||
this.socketTask.close({ code, reason });
|
||||
} else if (typeof uni.closeSocket === 'function') {
|
||||
uni.closeSocket();
|
||||
}
|
||||
} catch (e) {
|
||||
this.log(this._label('closeError'), e);
|
||||
}
|
||||
this.connected = false;
|
||||
}
|
||||
|
||||
send(payload) {
|
||||
const data = typeof payload === 'string' ? payload : JSON.stringify(payload);
|
||||
if (this.socketTask && typeof this.socketTask.send === 'function' && this.connected) {
|
||||
try { this.socketTask.send({ data }); return; } catch (e) { this.log(this._label('sendFailed'), e); this._msgQueue.push(data); }
|
||||
} else {
|
||||
try { uni.sendSocketMessage({ data }); return; } catch (e) { this._msgQueue.push(data); }
|
||||
}
|
||||
}
|
||||
|
||||
_flushQueue() {
|
||||
if (!this.connected) return;
|
||||
while (this._msgQueue.length) {
|
||||
const d = this._msgQueue.shift();
|
||||
try {
|
||||
if (this.socketTask && typeof this.socketTask.send === 'function') {
|
||||
this.socketTask.send({ data: d });
|
||||
} else {
|
||||
uni.sendSocketMessage({ data: d });
|
||||
}
|
||||
} catch (e) { this._msgQueue.unshift(d); break; }
|
||||
}
|
||||
}
|
||||
|
||||
_bindSocketTask(task) {
|
||||
this.socketTask = task;
|
||||
if (task.__ws_bound__) return;
|
||||
task.__ws_bound__ = true;
|
||||
|
||||
task.onOpen(res => {
|
||||
this.log(this._label('onOpen'), res);
|
||||
this.connected = true;
|
||||
this.reconnectAttempts = 0;
|
||||
this._lastPongAt = Date.now();
|
||||
this._startHeartbeat();
|
||||
this._flushQueue();
|
||||
this.options.onOpen && this.options.onOpen(res);
|
||||
});
|
||||
|
||||
task.onMessage(msg => {
|
||||
this._handleIncoming(msg);
|
||||
});
|
||||
|
||||
task.onClose(res => {
|
||||
this.log(this._label('onClose'), res);
|
||||
this.connected = false;
|
||||
this._stopHeartbeat();
|
||||
this.options.onClose && this.options.onClose(res);
|
||||
this._tryReconnect();
|
||||
});
|
||||
|
||||
task.onError(err => {
|
||||
this.log(this._label('onError'), err);
|
||||
this.connected = false;
|
||||
this._stopHeartbeat();
|
||||
this.options.onError && this.options.onError(err);
|
||||
this._tryReconnect();
|
||||
});
|
||||
}
|
||||
|
||||
// 处理收到的消息(task 或 全局都使用)
|
||||
_handleIncoming(msg) {
|
||||
this._lastPongAt = Date.now();
|
||||
let data = msg && msg.data;
|
||||
if (this.options.parseJSON) {
|
||||
try { data = JSON.parse(msg.data); } catch (e) { /* keep raw */ }
|
||||
}
|
||||
const type = (data && data.type) || '__default__';
|
||||
|
||||
// 过滤 ping/pong (若你想看 ping/pong,把 filterPing 设为 false)
|
||||
const isPing = data && (data.type === 'ping' || data.type === 'pong' || (typeof data === 'string' && (data === 'ping' || data === 'pong')));
|
||||
if (isPing && this.options.filterPing) {
|
||||
// 仍更新 lastPong,但不打印消息体,除非 showMessageBody 强制 true
|
||||
if (this.options.debug && this.options.showMessageBody === false) {
|
||||
this.log(this._label('onMessage'), type);
|
||||
}
|
||||
} else {
|
||||
// 打印消息类型与(可选)格式化消息体
|
||||
if (this.options.debug) {
|
||||
if (this.options.showMessageBody) {
|
||||
let bodyStr;
|
||||
try { bodyStr = JSON.stringify(data, null, 2); } catch (e) { bodyStr = String(data); }
|
||||
this.log(this.options.lang === 'zh' ? `${this._label('onMessage')} (${type}):` : `${this._label('onMessage')} (${type}):`, '\n' + bodyStr);
|
||||
} else {
|
||||
this.log(this._label('onMessage'), type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 外部回调与订阅异步派发
|
||||
if (this.options.onMessage) setTimeout(() => this.options.onMessage(data, msg), 0);
|
||||
setTimeout(() => this._dispatch(type, data, msg), 0);
|
||||
}
|
||||
|
||||
_bindGlobalSocketEvents() {
|
||||
// 解绑默认全局再绑定,避免重复
|
||||
try { uni.offSocketOpen && uni.offSocketOpen(); } catch (e) {}
|
||||
try { uni.offSocketMessage && uni.offSocketMessage(); } catch (e) {}
|
||||
try { uni.offSocketClose && uni.offSocketClose(); } catch (e) {}
|
||||
try { uni.offSocketError && uni.offSocketError(); } catch (e) {}
|
||||
|
||||
try {
|
||||
uni.onSocketOpen(res => {
|
||||
this.log(this._label('globalOnOpen'), res);
|
||||
this.connected = true;
|
||||
this.reconnectAttempts = 0;
|
||||
this._lastPongAt = Date.now();
|
||||
this._startHeartbeat();
|
||||
this._flushQueue();
|
||||
this.options.onOpen && this.options.onOpen(res);
|
||||
});
|
||||
} catch (e) {}
|
||||
|
||||
try {
|
||||
uni.onSocketMessage(msg => {
|
||||
// 全局收到消息也走统一处理
|
||||
if (this.options.debug) this.log(this._label('globalOnMessage'));
|
||||
this._handleIncoming(msg);
|
||||
});
|
||||
} catch (e) {}
|
||||
|
||||
try {
|
||||
uni.onSocketClose(res => {
|
||||
this.log(this._label('globalOnClose'), res);
|
||||
this.connected = false;
|
||||
this._stopHeartbeat();
|
||||
this.options.onClose && this.options.onClose(res);
|
||||
this._tryReconnect();
|
||||
});
|
||||
} catch (e) {}
|
||||
|
||||
try {
|
||||
uni.onSocketError(err => {
|
||||
this.log(this._label('globalOnError'), err);
|
||||
this.connected = false;
|
||||
this._stopHeartbeat();
|
||||
this.options.onError && this.options.onError(err);
|
||||
this._tryReconnect();
|
||||
});
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
_startHeartbeat() {
|
||||
this._stopHeartbeat();
|
||||
if (!this.options.heartbeatInterval) return;
|
||||
const pingData = typeof this.options.pingMessage === 'string' ? this.options.pingMessage : JSON.stringify(this.options.pingMessage);
|
||||
this._hbTimer = setInterval(() => {
|
||||
if (!this.connected) return;
|
||||
try { this.send(pingData); } catch (e) { this.log('hb send err', e); }
|
||||
clearTimeout(this._hbTimeoutTimer);
|
||||
this._hbTimeoutTimer = setTimeout(() => {
|
||||
const since = Date.now() - this._lastPongAt;
|
||||
if (since > this.options.heartbeatTimeout) {
|
||||
this.log(this._label('hbTimeout'), since);
|
||||
try { this.close(); } catch (e) { this.log('hb close fail', e); }
|
||||
}
|
||||
}, this.options.heartbeatTimeout);
|
||||
}, this.options.heartbeatInterval);
|
||||
}
|
||||
|
||||
_stopHeartbeat() {
|
||||
if (this._hbTimer) { clearInterval(this._hbTimer); this._hbTimer = null; }
|
||||
if (this._hbTimeoutTimer) { clearTimeout(this._hbTimeoutTimer); this._hbTimeoutTimer = null; }
|
||||
}
|
||||
|
||||
_tryReconnect() {
|
||||
if (this.reconnectAttempts >= this.options.maxReconnectAttempts) { this.log(this._label('reconnectScheduled'), 'exhausted'); return; }
|
||||
this.reconnectAttempts++;
|
||||
const delay = Math.min(this.options.reconnectDelayBase * Math.pow(1.5, this.reconnectAttempts - 1), 30000);
|
||||
this.log(this._label('reconnectScheduled'), delay + 'ms', 'attempt', this.reconnectAttempts);
|
||||
setTimeout(() => {
|
||||
this.socketTask = null;
|
||||
this.connectIfForeground();
|
||||
}, delay);
|
||||
}
|
||||
|
||||
connectIfForeground() {
|
||||
// 如果你在项目中有前台检测,这里可改为判断前台才 open()
|
||||
this.open();
|
||||
}
|
||||
|
||||
subscribe(type, handler) {
|
||||
if (!this._subscriptions) this._subscriptions = new Map();
|
||||
if (!this._subscriptions.has(type)) this._subscriptions.set(type, new Set());
|
||||
this._subscriptions.get(type).add(handler);
|
||||
return () => this.unsubscribe(type, handler);
|
||||
}
|
||||
|
||||
unsubscribe(type, handler) {
|
||||
if (!this._subscriptions) return;
|
||||
const s = this._subscriptions.get(type); if (!s) return; s.delete(handler);
|
||||
if (s.size === 0) this._subscriptions.delete(type);
|
||||
}
|
||||
|
||||
_dispatch(type, data, raw) {
|
||||
if (!this._subscriptions) return;
|
||||
const handlers = this._subscriptions.get(type);
|
||||
if (handlers) for (const h of Array.from(handlers)) try { h(data, raw); } catch (e) { this.log('handler err', e); }
|
||||
const def = this._subscriptions.get('__default__');
|
||||
if (def) for (const h of Array.from(def)) try { h(data, raw); } catch (e) { this.log('default handler err', e); }
|
||||
}
|
||||
}
|
||||
|
||||
export default WsRequest;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
// websocketManager.js
|
||||
import WsRequest from '@/common/websocket.js';
|
||||
|
||||
let globalWs = null;
|
||||
|
||||
const initWs = (url, options) => {
|
||||
// 如果已经有 WebSocket 实例,直接返回
|
||||
if (globalWs) return globalWs;
|
||||
|
||||
globalWs = new WsRequest(url, options);
|
||||
return globalWs;
|
||||
};
|
||||
|
||||
const connectWs = () => {
|
||||
if (globalWs) {
|
||||
globalWs.reconnectAttempts = 0; // 重置重连计数
|
||||
globalWs.open(); // 打开 WebSocket 连接
|
||||
}
|
||||
};
|
||||
|
||||
const closeWs = () => {
|
||||
if (globalWs) {
|
||||
globalWs.close(); // 关闭 WebSocket 连接
|
||||
}
|
||||
};
|
||||
|
||||
export { initWs, connectWs, closeWs };
|
||||
|
|
@ -53,6 +53,7 @@
|
|||
}
|
||||
const go = () => {
|
||||
uni.setStorageSync('token', 1);
|
||||
uni.setStorageSync('userInfo', null);
|
||||
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
|
|
|
|||
62
main.js
62
main.js
|
|
@ -1,40 +1,32 @@
|
|||
import App from './App'
|
||||
// 引入 uView UI
|
||||
import uView from './uni_modules/vk-uview-ui';
|
||||
|
||||
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
import './uni.promisify.adaptor'
|
||||
Vue.config.productionTip = false
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
app.$mount()
|
||||
// #endif
|
||||
|
||||
// #ifdef VUE3
|
||||
import {
|
||||
createSSRApp
|
||||
} from 'vue'
|
||||
import { createSSRApp } from 'vue'
|
||||
import App from './App'
|
||||
import uView from './uni_modules/vk-uview-ui'
|
||||
import donghua from '@/component/public/donghua.vue'
|
||||
import errorshow from '@/component/public/errorshow.vue'
|
||||
import tanchuang from '@/pages/procurement/components/tanchuang.vue';
|
||||
// import arrowkeys from '@/component/public/newgame/arrowkeys.vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
import tanchuang from '@/pages/procurement/components/tanchuang.vue'
|
||||
// import WsRequest from '@/common/websocket.js' // default 导入,文件必须有 export default
|
||||
|
||||
// 使用 uView UI
|
||||
app.use(uView)
|
||||
app.component('donghua', donghua)
|
||||
app.component('tanchuang', tanchuang)
|
||||
app.component('errorshow', errorshow)
|
||||
|
||||
|
||||
// app.component('arrowkeys', arrowkeys)
|
||||
return {
|
||||
app
|
||||
}
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
|
||||
// // 延后创建实例(构造不会阻塞主线程)
|
||||
// const websocket = new WsRequest(
|
||||
// 'wss://www.focusnu.com/ws101/sdWebsocket/1942419556028956674',
|
||||
// {
|
||||
// debug: true,
|
||||
// heartbeatInterval: 25000
|
||||
// }
|
||||
// )
|
||||
|
||||
// app.config.globalProperties.$socket = websocket
|
||||
// app.provide('socket', websocket)
|
||||
|
||||
app.use(uView)
|
||||
app.component('donghua', donghua)
|
||||
app.component('tanchuang', tanchuang)
|
||||
app.component('errorshow', errorshow)
|
||||
|
||||
return { app }
|
||||
}
|
||||
// #endif
|
||||
// #endif
|
||||
|
|
|
|||
|
|
@ -8,7 +8,13 @@ export const electricityMeterlist = () => {
|
|||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得护理单元主页大图
|
||||
export const queryWorkCareList = (data) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/care/queryWorkCareList?workType=${data.workType}&employeeId=${data.employeeId}&nuId=${data.nuId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 智能电表设备信息清零
|
||||
export const electricityMetereleReset = (cid,address) => {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="index-content-other" :style="transition?{opacity: `1`}:{opacity: `0`}">
|
||||
<view class="index-content-other" :style="transition?{opacity: `1`}:{opacity: `0`}" v-if="!closeit" >
|
||||
<view class="zhezhao"
|
||||
v-show="openqingling || openlahzha || openbaoxiu || openhehzha || openchaobiao ||openrizhi"
|
||||
@click="closeall()">
|
||||
|
|
@ -560,7 +560,7 @@
|
|||
waterwaterReset, waterwaterControl, waterbaoxiu, waterwaterRead, humidDevicebaoxiu, updateDeviceRealTime, cameraInfobaoxiu,
|
||||
electricityMeterListArray, requestLogList, humidDevicejgList, humidDevicejgwarn
|
||||
} from "./api.js"
|
||||
import { movedirection, queryPadPageList } from '@/pages/watch/api/lunpan.js'
|
||||
import { movedirection } from '@/pages/watch/api/lunpan.js'
|
||||
import joysticknew from '@/component/public/newgame/joysticknew.vue';
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -568,12 +568,6 @@
|
|||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
// propsmove: {
|
||||
// type: Number
|
||||
// },
|
||||
isMain: {
|
||||
type: Boolean
|
||||
}
|
||||
});
|
||||
const movetype = ref(-1);
|
||||
|
||||
|
|
@ -672,32 +666,7 @@
|
|||
const scrollLeft = ref(0)
|
||||
|
||||
// 监听 isMain 的变化,但只在 isShow 为 true 时响应
|
||||
watch(
|
||||
() => props.isMain,
|
||||
(newVal, oldVal) => {
|
||||
// 如果不是从一个明确的布尔值变到另一个(例如首次 undefined -> 布尔),可以按需忽略
|
||||
if (typeof oldVal !== 'boolean') return
|
||||
if (!props.isShow) return
|
||||
if (lanjie.value) {
|
||||
lanjie.value = false
|
||||
return
|
||||
}
|
||||
|
||||
if (oldVal === true && newVal === false) {
|
||||
movetype.value = 0;
|
||||
zeroIndex.value = 0;
|
||||
typeNowtarget.value = zeroIndex.value;
|
||||
changeallmessage()
|
||||
|
||||
} else if (oldVal === false && newVal === true) {
|
||||
movetype.value = -1
|
||||
zeroIndex.value = -1
|
||||
typeNowtarget.value = 0;
|
||||
changeallmessage()
|
||||
}
|
||||
// console.log("?????",typeNowtarget.value)
|
||||
}
|
||||
)
|
||||
const zeroIndex = ref(-1)
|
||||
const emit = defineEmits(['back', 'cleanmain', `canback`])
|
||||
const savetopindex = ref(0)
|
||||
|
|
@ -1392,7 +1361,7 @@
|
|||
|
||||
const changeallmessage = () => {
|
||||
uni.$emit('smallmonitor:isshow', false)
|
||||
typeNow.value = allArray.value[typeNowtarget.value].typeNumber;
|
||||
typeNow.value = allArray.value[typeNowtarget.value]?.typeNumber ;
|
||||
if (typeNow.value === 1) {
|
||||
indexmessage.value = allArray.value[typeNowtarget.value]
|
||||
const firstTarget = indexmessage.value.eleValue;
|
||||
|
|
@ -1441,12 +1410,17 @@
|
|||
changeallmessage()
|
||||
}, 500)
|
||||
}
|
||||
const closeit = ref(false)
|
||||
const init = () => {
|
||||
allArray.value = [];
|
||||
// console.log("????", uni.getStorageSync('serverUrl'), uni.getStorageSync('nuId'))
|
||||
electricityMeterlist().then((res : any) => {
|
||||
// console.log("!!!", res.result)
|
||||
if (res.result.cameraInfoEntityList.length && res.result.cameraInfoEntityList != null) {
|
||||
if(!res.result.cameraInfoEntityList.length){
|
||||
closeit.value = true
|
||||
return
|
||||
}
|
||||
if ( res.result.cameraInfoEntityList != null) {
|
||||
res.result.cameraInfoEntityList.forEach((element : any, index : number) => {
|
||||
element.typeNumber = 0
|
||||
element.lookName = "摄像头" + (index+1) ;
|
||||
|
|
@ -1454,7 +1428,7 @@
|
|||
allArray.value.push(element)
|
||||
})
|
||||
}
|
||||
if (res.result.electricityMeterEntityList.length && res.result.electricityMeterEntityList != null) {
|
||||
if ( res.result.electricityMeterEntityList != null) {
|
||||
res.result.electricityMeterEntityList.forEach((element : any, index : number) => {
|
||||
element.typeNumber = 1
|
||||
element.lookName = "电表" + (index+1)
|
||||
|
|
@ -1462,7 +1436,7 @@
|
|||
allArray.value.push(element)
|
||||
})
|
||||
}
|
||||
if (res.result.waterMeterEntityList.length && res.result.waterMeterEntityList != null) {
|
||||
if ( res.result.waterMeterEntityList != null) {
|
||||
res.result.waterMeterEntityList.forEach((element : any, index : number) => {
|
||||
element.typeNumber = 2
|
||||
element.lookName = "水表" + (index+1)
|
||||
|
|
@ -1470,7 +1444,7 @@
|
|||
allArray.value.push(element)
|
||||
})
|
||||
}
|
||||
if (res.result.humidDeviceEntityList.length && res.result.humidDeviceEntityList != null) {
|
||||
if ( res.result.humidDeviceEntityList != null) {
|
||||
res.result.humidDeviceEntityList.forEach((element : any, index : number) => {
|
||||
element.typeNumber = 3
|
||||
element.lookName = "温度计" + (index+1)
|
||||
|
|
@ -1479,10 +1453,10 @@
|
|||
})
|
||||
}
|
||||
// 重新刷新动画
|
||||
let donghua = typeNowtarget.value;
|
||||
// let donghua = typeNowtarget.value;
|
||||
typeNowtarget.value = -1;
|
||||
setTimeout(()=>{
|
||||
typeNowtarget.value = donghua
|
||||
typeNowtarget.value = 0
|
||||
},500)
|
||||
|
||||
// rightmessage.value = res.result.cameraInfoEntityList[0]
|
||||
|
|
|
|||
|
|
@ -100,8 +100,17 @@
|
|||
:interval="120" />
|
||||
</view>
|
||||
<view class="weight-time">
|
||||
10:00 - 10:10
|
||||
<view class="pao-father">
|
||||
<view class="" v-if="indexmessage?.startTime">
|
||||
{{ indexmessage?.startTime.slice(11, 16) }}
|
||||
-
|
||||
{{ indexmessage?.endTime.slice(11, 16) }}
|
||||
</view>
|
||||
<view class="" v-show="!indexmessage?.startTime">
|
||||
暂无数据
|
||||
</view>
|
||||
|
||||
|
||||
<view class="pao-father" v-show="indexmessage?.startTime">
|
||||
<image class="pao-img" :src="`/static/index/newindex/states/pao.png`" />
|
||||
<view style="z-index: 1;">
|
||||
待执行
|
||||
|
|
@ -109,27 +118,27 @@
|
|||
|
||||
</view>
|
||||
</view>
|
||||
<image class="big-img" :src="`/static/index/newindex/wendu/2.png`" />
|
||||
<image class="big-img" :src="indexmessage?.previewFile? 'https://www.focusnu.com/media/upFiles/' + indexmessage?.previewFile: `/static/index/newindex/wendu/2.png`" />
|
||||
<view style="display: flex;align-items: center;">
|
||||
<view class="server-name">
|
||||
一级压疮防护
|
||||
<view class="server-name" v-if="indexmessage?.startTime">
|
||||
{{ indexmessage?.directiveName }}
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;margin-top: 40rpx;">
|
||||
<view style="width: 240rpx;height: 90rpx;margin-right: 40rpx;">
|
||||
<view class="start-button">
|
||||
<view class="start-button" v-show="indexmessage?.startTime">
|
||||
开始服务
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 240rpx;height: 90rpx;">
|
||||
<view class="end-button">
|
||||
<view class="end-button" v-show="indexmessage?.startTime">
|
||||
结束服务
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="left-menu">
|
||||
<view class="left-menu" v-show="indexmessage?.startTime">
|
||||
<view v-for="(item,index) in leftArray" :key="index" style="margin: 30rpx 0;">
|
||||
<view class="left-ball">
|
||||
<image class="left-menu-img" :src="item" />
|
||||
|
|
@ -137,7 +146,7 @@
|
|||
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-menu">
|
||||
<view class="right-menu" v-show="indexmessage?.startTime">
|
||||
<view class="zhezhao-top" @click="scrollTop -= 115"></view>
|
||||
<view class="zhezhao-bottom" @click="scrollTop += 115"></view>
|
||||
<image class="top-img" :src="`/static/index/newindex/rightmenu/top.png`"
|
||||
|
|
@ -198,7 +207,8 @@
|
|||
</view>
|
||||
|
||||
</view>
|
||||
<image class="big-older" :src="`/static/index/newindex/leftmenu/${uni.getStorageSync('NUall').elderInfo?.name?`older`:`nopeople`}.png`" />
|
||||
<image class="big-older"
|
||||
:src="`/static/index/newindex/leftmenu/${uni.getStorageSync('NUall').elderInfo?.name?`older`:`nopeople`}.png`" />
|
||||
<view class="name-weight">
|
||||
{{ uni.getStorageSync('NUall').elderInfo?.name ? uni.getStorageSync('NUall').elderInfo?.name:`暂无长者` }}
|
||||
</view>
|
||||
|
|
@ -260,6 +270,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch } from 'vue';
|
||||
import { queryPadPageList } from '@/pages/watch/api/lunpan.js'
|
||||
import { queryWorkCareList } from './api.js'
|
||||
|
||||
const props = defineProps({
|
||||
isShow: {
|
||||
|
|
@ -280,6 +291,7 @@
|
|||
uni.setStorageSync('nuName', data.nuName);
|
||||
uni.setStorageSync('elderId', data.elderInfo ? data.elderInfo?.id : null);
|
||||
uni.setStorageSync('NUall', data);
|
||||
getgif()
|
||||
}
|
||||
const tagarray = ["市医保", "半失能", "正常计费"]
|
||||
|
||||
|
|
@ -376,7 +388,7 @@
|
|||
// console.log("????",transition.value)
|
||||
setTimeout(() => {
|
||||
transition.value = true;
|
||||
console.log("看看", uni.getStorageSync('NUall'))
|
||||
// console.log("看看", uni.getStorageSync('NUall'))
|
||||
}, 50)
|
||||
} else {
|
||||
transition.value = false;
|
||||
|
|
@ -418,7 +430,8 @@
|
|||
// 每秒更新一次时间
|
||||
setInterval(updateTime, 1000);
|
||||
photoplay.value = true;
|
||||
getmenu()
|
||||
getmenu();
|
||||
getgif();
|
||||
})
|
||||
const filteredMenu = (index : number) => {
|
||||
return leftMenuArray.value.filter(item => Number(item.areaFlag) - 1 == index);
|
||||
|
|
@ -433,6 +446,19 @@
|
|||
})
|
||||
}))
|
||||
}
|
||||
const indexmessage = ref({});
|
||||
const getgif = () => {
|
||||
let data = {
|
||||
nuId: uni.getStorageSync('NUall').nuId,
|
||||
employeeId: uni.getStorageSync('userInfo').employessId,
|
||||
workType: 5
|
||||
}
|
||||
queryWorkCareList(data).then((res : any) => {
|
||||
// console.log("看看图",res.result.records[0])
|
||||
indexmessage.value = res.result.records[0]
|
||||
// console.log("看看图",'https://www.focusnu.com/media/upFiles/'+indexmessage.value.previewFile)
|
||||
})
|
||||
}
|
||||
const lanjie = ref(false);
|
||||
const gotolook = () => {
|
||||
uni.navigateTo({
|
||||
|
|
@ -542,7 +568,7 @@
|
|||
margin-top: 0.5vw;
|
||||
width: 9vw;
|
||||
height: 9vw;
|
||||
|
||||
|
||||
border: 1rpx solid #DCDCDC;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -781,51 +781,6 @@
|
|||
repeating-linear-gradient(0deg, var(--color) 0 var(--dash), transparent 0 calc(var(--dash) + var(--gap))) top right / var(--thick) 100% no-repeat;
|
||||
}
|
||||
|
||||
.time-button-black-spe {
|
||||
transition: all 1s;
|
||||
position: absolute;
|
||||
width: 360rpx;
|
||||
height: 100rpx;
|
||||
/* padding-left: 3rpx; */
|
||||
padding: 0 20rpx;
|
||||
border-radius: 20rpx;
|
||||
border-top-right-radius: 0;
|
||||
border: 2rpx solid #e8e9eb;
|
||||
color: #545569;
|
||||
/* background-color: rgb(77, 77, 77); */
|
||||
bottom: -100rpx;
|
||||
left: -220rpx;
|
||||
/* color: #fff; */
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 999;
|
||||
/* box-shadow: 0 2px 6px rgba(0, 131, 250, 0.2); */
|
||||
|
||||
}
|
||||
|
||||
.time-button-black {
|
||||
transition: all 1s;
|
||||
position: absolute;
|
||||
|
||||
width: 360rpx;
|
||||
height: 100rpx;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 20rpx;
|
||||
border-bottom-right-radius: 0;
|
||||
background-color: #fff;
|
||||
top: -100rpx;
|
||||
left: -220rpx;
|
||||
border: 2rpx solid #e8e9eb;
|
||||
color: #545569;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 999;
|
||||
box-shadow: 0 2px 6px rgba(0, 131, 250, 0.2);
|
||||
|
||||
}
|
||||
|
||||
.time-button-orange-spe {
|
||||
transition: all 1s;
|
||||
|
|
@ -1954,12 +1909,13 @@
|
|||
border-top: 17.32rpx solid #999;
|
||||
/* 0.866 * s */
|
||||
margin: 0rpx 0rpx 0 15rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mark-bgc {
|
||||
position: absolute;
|
||||
top: 50rpx;
|
||||
left: 0;
|
||||
top: 20rpx;
|
||||
right: 0;
|
||||
width: 450rpx;
|
||||
background-color: #fff;
|
||||
z-index: 999;
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
// 定义 Link 类型
|
||||
export type roomBtttonType = {
|
||||
url : string;
|
||||
targetUrl : string;
|
||||
name : string
|
||||
}
|
||||
|
|
@ -14,9 +14,23 @@
|
|||
:class="!topindex&&!bodystatus&&!facestatus?'firsttarget':''">
|
||||
<view class="mark">
|
||||
<view style="margin-right: 15rpx;">
|
||||
体型标签:
|
||||
老人标签:
|
||||
</view>
|
||||
<view class="overlay" v-show="openbody" @click="openbody=false"></view>
|
||||
</view>
|
||||
<view class="marknone" @click="openbody=!openbody;openface=false">
|
||||
<view v-if="!bodyTagListLook.length&&!emotionTagListLook.length" style="margin-top: -3rpx;">
|
||||
未选择
|
||||
</view>
|
||||
<view v-for="(item,index) in bodyTagListLook" :key="index">
|
||||
<image class="tags-img" style="width: 40rpx;height: 40rpx;margin: 0 10rpx;" :src="item" />
|
||||
</view>
|
||||
<view v-for="(item,index) in emotionTagListLook" :key="index">
|
||||
<image class="tags-img" style="width: 40rpx;height: 40rpx;margin: 0 10rpx;" :src="item" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="tri-down" @click="openbody=!openbody;openface=false">
|
||||
|
||||
<view class="mark-bgc" v-show="openbody" :style="{opacity:bodydonghua?1:0}" @click.stop>
|
||||
<view style="margin-top: 40rpx;margin-bottom: 30rpx;;margin-left: 50rpx;font-size: 32rpx;">
|
||||
<view>
|
||||
|
|
@ -35,19 +49,27 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-top: 40rpx;margin-bottom: 30rpx;;margin-left: 50rpx;font-size: 32rpx;">
|
||||
<view>
|
||||
情绪标签
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;flex-wrap: wrap;">
|
||||
<view v-for="(item,index) in emotionTagList" :key="index" @click="addface(index)">
|
||||
<view class="tags-father" :class="facestatustarget===index?'secondtarget':''">
|
||||
<image class="tags-img"
|
||||
:src="item.izSelected==`Y`?item.netPicFocus: item.netPic" />
|
||||
<view class="tags-font"
|
||||
:style="item.izSelected==`Y`?{color:`rgb(54, 159, 239)`}:{}">
|
||||
{{item.tagName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="marknone" @click="openbody=!openbody;openface=false">
|
||||
<view v-if="!bodyTagListLook.length" style="margin-top: -3rpx;">
|
||||
未选择
|
||||
</view>
|
||||
<view v-for="(item,index) in bodyTagListLook" :key="index">
|
||||
<image class="tags-img" style="width: 40rpx;height: 40rpx;margin: 0 10rpx;" :src="item" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="tri-down" @click="openbody=!openbody;openface=false"></view>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center;margin-right: 15rpx;padding: 0 15rpx;"
|
||||
<!-- <view style="display: flex;align-items: center;margin-right: 15rpx;padding: 0 15rpx;"
|
||||
:class="topindex===1&&!bodystatus&&!facestatus?'firsttarget':''">
|
||||
<view class="mark">
|
||||
情绪标签:
|
||||
|
|
@ -82,18 +104,18 @@
|
|||
</view>
|
||||
|
||||
<view class="tri-down" @click="openface=!openface;openbody=false"></view>
|
||||
</view>
|
||||
<view class="white-button" :class="topindex===2?'firsttarget':''" @click="routerPush">
|
||||
</view> -->
|
||||
<view class="white-button" @click="routerPush">
|
||||
<image class="white-img" :src="`/static/index/newruler/yulan.png`" />
|
||||
预览
|
||||
</view>
|
||||
<view class="white-button" :class="topindex===3?'firsttarget':''" @click="shareToWeixin">
|
||||
<view class="white-button" @click="shareToWeixin">
|
||||
<image class="white-img" :src="`/static/index/newruler/fenxiang.png`" />
|
||||
分享
|
||||
</view>
|
||||
<view class="white-button" :class="topindex===3?'firsttarget':''" @click="zhilingbao">
|
||||
<image class="white-img" :src="`/static/index/newruler/fenxiang.png`" />
|
||||
指令包
|
||||
<view class="white-button" @click="changLeft(5)">
|
||||
<image class="white-img" style="width: 45rpx;height: 45rpx;" :src="`/static/index/newruler/watch.png`" />
|
||||
监控
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -113,12 +135,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="boom" :style="{ transform: transformStyle }" ref="leftLabels">
|
||||
<view v-for="(item, index) in timearr[0].children" :key="index" class="boom-son"
|
||||
v-show="item.tagName">
|
||||
<text class="boom-text">{{ item.tagName }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="super-card-container">
|
||||
|
|
@ -159,18 +175,6 @@
|
|||
请选择服务指令迁移的目标单元格
|
||||
|
||||
</view>
|
||||
<!-- <view class="time-button-black-spe"
|
||||
:style="{left:saveEditIndex.index0?`-220rpx`:`0`}"
|
||||
v-if="saveEditIndex.index0 == index0 && saveEditIndex.index1 == index1 && index1==0 && isDelete">
|
||||
是否确认删除该服务指令
|
||||
|
||||
</view>
|
||||
<view class="time-button-black"
|
||||
:style="{left:saveEditIndex.index0?`-220rpx`:`0`}"
|
||||
v-if="saveEditIndex.index0 == index0 && saveEditIndex.index1 == index1 && index1 && isDelete">
|
||||
是否确认删除该服务指令
|
||||
|
||||
</view> -->
|
||||
<view class="title-time-blue"
|
||||
v-show="saveEditIndex.index0 == index0 && saveEditIndex.index1 == index1 && isRule">
|
||||
</view>
|
||||
|
|
@ -407,13 +411,10 @@
|
|||
监控
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -566,19 +567,15 @@
|
|||
</view>
|
||||
|
||||
</view>
|
||||
<!-- <view class="card-font">
|
||||
确定要删除指令吗
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch } from 'vue';
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch } from 'vue';
|
||||
import { onShow, onHide } from '@dcloudio/uni-app';
|
||||
import type { roomBtttonType } from "./index";
|
||||
import { getNclist, addBatch, addDirective, addInstant, addElderTag, deleteDirective, deleteInstant, deleteElderTag, editDirective } from "./api.js";
|
||||
import { getNclist, addBatch, addDirective, addInstant, deleteDirective, deleteInstant, editDirective } from "./api.js";
|
||||
import { myArray } from './yaoshandiao.js';
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -586,19 +583,7 @@
|
|||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
darkFans: {
|
||||
type: Boolean,
|
||||
},
|
||||
canmove: {
|
||||
type: Boolean,
|
||||
},
|
||||
|
||||
});
|
||||
watch(
|
||||
() => props.canmove,
|
||||
() => {
|
||||
bottomisShaking.value = false;
|
||||
})
|
||||
watch(
|
||||
() => props.isshow,
|
||||
(newVal, oldVal) => {
|
||||
|
|
@ -619,7 +604,6 @@
|
|||
})
|
||||
}
|
||||
upmenuIndex.value = 0
|
||||
getblue.value = !getblue.value
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
@ -628,7 +612,6 @@
|
|||
const facestatus = ref(false);
|
||||
const facestatustarget = ref(-1);
|
||||
|
||||
|
||||
/* ---- 用于 transform 的响应式字符串 ----
|
||||
注意:虽然这是响应式,但我们只在 rAF 里更新它(受控更新),避免频繁触发 Vue 渲染 */
|
||||
const transformStyle = ref('translate3d(0, 0, 0)');
|
||||
|
|
@ -644,7 +627,6 @@
|
|||
() => {
|
||||
setTimeout(() => {
|
||||
bodydonghua.value = openbody.value
|
||||
emit('vip', bodydonghua.value)
|
||||
}, 50)
|
||||
}
|
||||
)
|
||||
|
|
@ -654,7 +636,6 @@
|
|||
() => {
|
||||
setTimeout(() => {
|
||||
facedonghua.value = openface.value
|
||||
emit('vip', facedonghua.value)
|
||||
}, 50)
|
||||
}
|
||||
)
|
||||
|
|
@ -663,9 +644,7 @@
|
|||
const facetarget = ref([]);
|
||||
const addbody = (index : number) => {
|
||||
if (bodyTagList.value[index].izSelected == 'Y') {
|
||||
|
||||
bodyTagList.value[index].izSelected = 'N';
|
||||
|
||||
} else {
|
||||
let targetNumber = 0;
|
||||
bodyTagList.value.forEach((element : any) => {
|
||||
|
|
@ -676,7 +655,7 @@
|
|||
|
||||
if (targetNumber > 1) {
|
||||
uni.showToast({
|
||||
title: "标签最多只能添加两个",
|
||||
title: "每种标签最多只能添加两个",
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
|
|
@ -713,7 +692,6 @@
|
|||
}
|
||||
|
||||
const open = ref(false);
|
||||
const getblue = ref(false);
|
||||
|
||||
const bottomItems = ref([])
|
||||
const nameArray = [
|
||||
|
|
@ -807,8 +785,6 @@
|
|||
} else {
|
||||
doChangeNew()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
const doChangeNew = () => {
|
||||
let object = JSON.parse(JSON.stringify(timearr.value[flyNumber.value.index0].children[flyNumber.value.index1]))
|
||||
|
|
@ -824,7 +800,6 @@
|
|||
let endTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime;
|
||||
let positioning = timearr.value[indexsave.value[0]].positioning;
|
||||
|
||||
|
||||
// 解析原始时间(健壮地 trim)
|
||||
const parseTime = (t) => {
|
||||
const parts = String(t || '').split(':').map(s => s.trim());
|
||||
|
|
@ -871,15 +846,6 @@
|
|||
|
||||
timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime =
|
||||
`${String(newEndHour)}:${pad2(newEndMin)}`;
|
||||
// const rest = startTime.split(":")[1]; // ":20"
|
||||
// const rest0 = endTime.split(":")[1];; // ":20"
|
||||
// let many = Number(rest0) - Number(rest);
|
||||
// let start = newtagName
|
||||
// let end = Number(start) + many
|
||||
// // 用 positioning 替换原来的小时部分
|
||||
// timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime = positioning + ":" + start.padStart(2, '0'); // "9:20"
|
||||
// timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime = positioning + ":" + String(end % 60).padStart(2, '0'); // "9:20"
|
||||
flyNumber.value.index0 = -1;
|
||||
flyNumber.value.index1 = -1;
|
||||
isMove.value = false;
|
||||
let data = {
|
||||
|
|
@ -887,16 +853,13 @@
|
|||
index1: saveEditIndex.value.index1
|
||||
}
|
||||
whereEvent(data);
|
||||
// saveAll()
|
||||
let infoValue = timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1]
|
||||
infoValue.positioning = saveEditIndex.value.index0;
|
||||
infoValue.positioningLong = saveEditIndex.value.index1;
|
||||
// console.log("issuccess?",saveEditIndex.value.index0,saveEditIndex.value.index1)
|
||||
editDirective(infoValue).then((res : any) => {
|
||||
if (res.success) {
|
||||
geteverything()
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
//变更左侧菜单
|
||||
|
|
@ -912,8 +875,8 @@
|
|||
monthIndex.value = -1;
|
||||
weekValue.value = "";
|
||||
monthValue.value = "";
|
||||
secondtop.value = 1
|
||||
firsttop.value = 1
|
||||
secondtop.value = 0.01
|
||||
firsttop.value = 0.01
|
||||
//这个东西完全是为了给动画用的,因为downmenuIndex这个吊东西其他地方在用,所以需要再整一个属性。
|
||||
downdonghua.value = -1;
|
||||
|
||||
|
|
@ -948,113 +911,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
function dosomesave() {
|
||||
cardsumit.value.op.name = secondopenValue.value[cardsumit.value.op.index[2]].relName
|
||||
switch (secondopenValue.value[cardsumit.value.op.index[2]].cycleTypeId) {
|
||||
case `1`:
|
||||
openOp.value = 0
|
||||
break;
|
||||
case `2`:
|
||||
openOp.value = 1
|
||||
break;
|
||||
case `3`:
|
||||
openOp.value = 2
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
const selectType = ref(true);
|
||||
const deleteButton = ref(false);
|
||||
const isRule = ref(false);
|
||||
const savemoved = ref(-1);
|
||||
const movecard = (where : number) => {
|
||||
// isDelete.value = false;
|
||||
// switch (where) {
|
||||
// case 0:
|
||||
// if (saveEditIndex.value.index1) {
|
||||
// saveEditIndex.value.index1--
|
||||
// centerCell();
|
||||
// isopen.value = false;
|
||||
// if (open.value) {
|
||||
// setTimeout(() => {
|
||||
// rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1)
|
||||
// }, 50)
|
||||
// }
|
||||
// } else {
|
||||
// topindex.value = 0
|
||||
// savemoved.value = saveEditIndex.value.index0
|
||||
// isRule.value = false;
|
||||
// }
|
||||
// break
|
||||
// case 1:
|
||||
// if (saveEditIndex.value.index0 == 23) {
|
||||
// return
|
||||
// }
|
||||
// saveEditIndex.value.index0++
|
||||
// centerCell();
|
||||
// isopen.value = false;
|
||||
// if (open.value) {
|
||||
// setTimeout(() => {
|
||||
// rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1)
|
||||
// }, 50)
|
||||
// }
|
||||
// break
|
||||
// case 2:
|
||||
// if (saveEditIndex.value.index1 == 11) {
|
||||
// return
|
||||
// }
|
||||
// saveEditIndex.value.index1++
|
||||
// centerCell();
|
||||
// isopen.value = false;
|
||||
// if (open.value) {
|
||||
// setTimeout(() => {
|
||||
// rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1)
|
||||
// }, 50)
|
||||
// }
|
||||
// break
|
||||
// case 3:
|
||||
// if (saveEditIndex.value.index0 == 0) {
|
||||
// return
|
||||
// }
|
||||
// saveEditIndex.value.index0--
|
||||
// centerCell();
|
||||
// isopen.value = false;
|
||||
// if (open.value) {
|
||||
// setTimeout(() => {
|
||||
// rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1)
|
||||
// }, 50)
|
||||
// }
|
||||
// break
|
||||
// }
|
||||
}
|
||||
const topindex = ref(-1)
|
||||
const movetop = (where : number) => {
|
||||
isDelete.value = false;
|
||||
switch (where) {
|
||||
case 0:
|
||||
|
||||
break
|
||||
case 1:
|
||||
if (topindex.value < 3) {
|
||||
topindex.value++
|
||||
}
|
||||
|
||||
break
|
||||
case 2:
|
||||
openbody.value = false
|
||||
openface.value = false
|
||||
topindex.value = -1
|
||||
saveEditIndex.value.index0 = savemoved.value
|
||||
isRule.value = true;
|
||||
break
|
||||
case 3:
|
||||
if (topindex.value) {
|
||||
topindex.value--
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
const weekValue = ref("");
|
||||
const weekIndex = ref(-1);
|
||||
const monthValue = ref("");
|
||||
|
|
@ -1114,14 +973,7 @@
|
|||
}
|
||||
|
||||
}
|
||||
const haveName = ref(false);
|
||||
const isHave = () => {
|
||||
if (timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].directiveName) {
|
||||
haveName.value = true;
|
||||
} else {
|
||||
haveName.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 给抖动用的
|
||||
function pseudoRandom(index0, index1) {
|
||||
const seed = index0 * 55.9898 + index1 * 78.233;
|
||||
|
|
@ -1135,17 +987,12 @@
|
|||
// 在作用域中声明一个定时器变量
|
||||
let throttleTimer = null;
|
||||
//监听拖拽
|
||||
// const dragOffset = ref(0);
|
||||
// const moveDownNumber = ref(0)
|
||||
/* 兼容:如果不支持 requestAnimationFrame,就用 setTimeout */
|
||||
const requestAnimationFrame =
|
||||
typeof window !== 'undefined' && window.requestAnimationFrame
|
||||
? window.requestAnimationFrame
|
||||
: (cb) => setTimeout(cb, 16);
|
||||
function handleScrolltime(e) {
|
||||
// let num = e.detail.scrollTop
|
||||
// let formattedNum = parseFloat(num.toFixed(2));
|
||||
// moveDownNumber.value = formattedNum
|
||||
// uni-app 的 scroll 事件通常把位置放在 e.detail.scrollTop
|
||||
// 为保险,先做容错判断
|
||||
const scrollTop = (e && e.detail && (e.detail.scrollTop ?? e.detail.scrollY)) || 0;
|
||||
|
|
@ -1166,8 +1013,6 @@
|
|||
function handleTop(e) {
|
||||
leftIn.value = e.detail.scrollLeft
|
||||
}
|
||||
|
||||
const changeBug = ref(true);
|
||||
// 方法:根据条件返回不同的类名
|
||||
const getClass = (item, index0, index1) => {
|
||||
if (item.startTime) {
|
||||
|
|
@ -1271,18 +1116,11 @@
|
|||
lastTap.value = now
|
||||
}
|
||||
}
|
||||
// 暗黑模式
|
||||
const underFans = ref<boolean>(false);
|
||||
// 当前选中的菜单索引
|
||||
const roomTar = ref<number[]>([]);
|
||||
const emit = defineEmits(['vip', 'changeold']);
|
||||
const isEdit = ref(false);
|
||||
|
||||
const saveEditIndex = ref({
|
||||
index0: -1,
|
||||
index1: -1
|
||||
})
|
||||
const clickstauts = ref(0)
|
||||
const secondopenValue = ref([]);
|
||||
|
||||
const secondContant = (index : number) => {
|
||||
iszhouqi.value = false;
|
||||
|
|
@ -1293,16 +1131,12 @@
|
|||
downmenuIndex.value = index;
|
||||
downdonghua.value = index;
|
||||
thirdmenuIndex.value = 0;
|
||||
firsttop.value = 1;
|
||||
firsttop.value = 0.01;
|
||||
nextTick(() => {
|
||||
firsttop.value = 0;
|
||||
})
|
||||
}
|
||||
|
||||
const newchange = (type : number) => {
|
||||
emit('changeold', type)
|
||||
}
|
||||
|
||||
const timer = ref(null);//计时器
|
||||
const elementsInfo = ref({})//所有表格的信息
|
||||
const moveX = ref(0)
|
||||
|
|
@ -1314,26 +1148,13 @@
|
|||
index1: 999,
|
||||
tagName: ''
|
||||
})
|
||||
const deletebottomindex = ref(-1);
|
||||
const deletedownisopen = ref(false);
|
||||
|
||||
const deletedownisopacity = ref(false);
|
||||
const deletebottom = (index : number, name : string) => {
|
||||
bottomisShaking.value = false;
|
||||
deletebottomindex.value = index;
|
||||
shakyTable.value = false;
|
||||
deletedownisopacity.value = false;
|
||||
deletedownisopen.value = true;
|
||||
deletename.value = name;
|
||||
setTimeout(() => {
|
||||
deletedownisopacity.value = true
|
||||
}, 100)
|
||||
}
|
||||
|
||||
const touchindex1 = ref(-1);
|
||||
// 分享矩阵到微信
|
||||
const shareShow = ref(false);
|
||||
const shareToWeixin = () => {
|
||||
|
||||
shareShow.value = true;
|
||||
deletedownisopacity.value = false;
|
||||
setTimeout(() => {
|
||||
|
|
@ -1414,42 +1235,15 @@
|
|||
const shakyTable = ref(false);
|
||||
const reldata = ref([]);
|
||||
const deleteRuler = (index0 : number, index1 : number) => {
|
||||
console.log("?????", timearr.value[index0].children[index1])
|
||||
deleteDirective(timearr.value[index0].children[index1]).then((res : any) => {
|
||||
|
||||
if (res.success) {
|
||||
geteverything()
|
||||
}
|
||||
})
|
||||
}
|
||||
const longPressTimer = ref(null);
|
||||
const isScrolling = ref(false)
|
||||
//长按计时器
|
||||
let scrollTimeout = null
|
||||
function handleScroll(e) {
|
||||
isScrolling.value = true
|
||||
// 清除之前的定时器
|
||||
if (scrollTimeout) clearTimeout(scrollTimeout)
|
||||
// 设置新的定时器
|
||||
scrollTimeout = setTimeout(() => {
|
||||
isScrolling.value = false;
|
||||
}, 400)
|
||||
}
|
||||
const isBack = ref(false)
|
||||
|
||||
const saveX = ref(0);
|
||||
const saveY = ref(0);
|
||||
const isTuoing = ref(false);
|
||||
|
||||
// 存储菜单的id
|
||||
const saveId = ref("");
|
||||
const saveTagName = ref("");
|
||||
function isblue() {
|
||||
if (openOp.value !== -1) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
const bottomTimer = ref(null);
|
||||
const bottomisShaking = ref(false);
|
||||
|
|
@ -1481,45 +1275,8 @@
|
|||
bottomTimer.value = null
|
||||
}
|
||||
}
|
||||
const openValue = ref({
|
||||
time: "",
|
||||
minute: "",
|
||||
array: []
|
||||
})
|
||||
const cardsumit = ref({
|
||||
op: {
|
||||
name: "",
|
||||
index: [-1, -1, -1],
|
||||
},
|
||||
startTime: "",
|
||||
weekTimeNumber: -1,
|
||||
monthTimeNumber: -1,
|
||||
monthTime: "",
|
||||
weekTime: ""
|
||||
})
|
||||
const openOp = ref(0);
|
||||
const clickOp = (index : number, item : any) => {
|
||||
saveId.value = item.id;
|
||||
cardsumit.value.op.index[2] = index
|
||||
cardsumit.value.op.name = item.relName
|
||||
switch (item.cycleTypeId) {
|
||||
case 0:
|
||||
openOp.value = 0
|
||||
break;
|
||||
case 1:
|
||||
openOp.value = 1
|
||||
break;
|
||||
case 2:
|
||||
openOp.value = 2
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const indexsave = ref([-1, -1]);
|
||||
const scrollContainer = ref(null)
|
||||
const opensay = () => {
|
||||
sayisopacity.value = false;
|
||||
sayisopen.value = true;
|
||||
|
|
@ -1552,9 +1309,7 @@
|
|||
}
|
||||
|
||||
const doaddDirective = (element : any) => {
|
||||
// console.log("提交了啥", element)
|
||||
addDirective(element).then((res) => {
|
||||
console.log("添加后返回了啥1", res)
|
||||
if (res.success) {
|
||||
geteverything()
|
||||
}
|
||||
|
|
@ -1563,7 +1318,6 @@
|
|||
|
||||
const killjishi = (id : string) => {
|
||||
deleteInstant({ id: id }).then((res) => {
|
||||
// console.log("添加后返回了啥1", res)
|
||||
if (res.success) {
|
||||
geteverything()
|
||||
}
|
||||
|
|
@ -1571,7 +1325,6 @@
|
|||
}
|
||||
|
||||
const addnew = () => {
|
||||
// console.log("9999", timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1])
|
||||
|
||||
if (isDelete.value) {
|
||||
isDelete.value = false;
|
||||
|
|
@ -1590,7 +1343,6 @@
|
|||
if (iszhiling.value) {
|
||||
|
||||
let allobject = savePackagelist.value[forthmenuIndex.value];
|
||||
// console.log("special",allobject)
|
||||
|
||||
if (saveEditIndex.value.index1 === -1 && saveEditIndex.value.index0 === -1) {
|
||||
return
|
||||
|
|
@ -1659,14 +1411,11 @@
|
|||
index1: saveEditIndex.value.index1
|
||||
}
|
||||
whereEvent(data);
|
||||
console.log("zou", haveValue)
|
||||
if (haveValue) {
|
||||
|
||||
editDirective(param).then((res : any) => {
|
||||
if (res.success) {
|
||||
geteverything()
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
doaddDirective(param);
|
||||
|
|
@ -1758,7 +1507,6 @@
|
|||
cycleType = monthValue.value + "号";
|
||||
cycleValue = monthValue.value
|
||||
}
|
||||
console.log("重要", cycleValue)
|
||||
iszhouqi.value = false;
|
||||
weekIndex.value = -1;
|
||||
monthIndex.value = -1;
|
||||
|
|
@ -1771,7 +1519,6 @@
|
|||
const endHour = startHour + Math.floor(endMinute / 60)
|
||||
const formattedStart = `${String(startHour)}:${String(startMinute).padStart(2, '0')}`
|
||||
const formattedEnd = `${String(endHour)}:${String(endMinute % 60).padStart(2, '0')}`
|
||||
console.log("allobject", allobject)
|
||||
let param = {
|
||||
id: haveValue ? timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].id : "",
|
||||
nuId: uni.getStorageSync('nuId'),
|
||||
|
|
@ -1815,17 +1562,14 @@
|
|||
index1: saveEditIndex.value.index1
|
||||
}
|
||||
whereEvent(data);
|
||||
console.log("日常指令看看进入了啥", param)
|
||||
if (haveValue) {
|
||||
editDirective(param).then((res : any) => {
|
||||
if (res.success) {
|
||||
geteverything()
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
doaddDirective(param);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1835,7 +1579,6 @@
|
|||
if (!cansumit.value) {
|
||||
return
|
||||
}
|
||||
|
||||
let info = []
|
||||
|
||||
bodyTagList.value.forEach((element : any) => {
|
||||
|
|
@ -1849,21 +1592,14 @@
|
|||
}
|
||||
})
|
||||
|
||||
// bottomItems.value.forEach((element : any, index : number) => {
|
||||
// element.sort = index
|
||||
// })
|
||||
|
||||
let allvalue = {
|
||||
nuId: uni.getStorageSync('nuId'),
|
||||
nuName: uni.getStorageSync('nuName'),
|
||||
elderId: uni.getStorageSync('elderId'),
|
||||
elderName: uni.getStorageSync('NUall').elderInfo.name,
|
||||
// serverList: postArray,
|
||||
// instantList: bottomItems.value,
|
||||
tagList: info
|
||||
}
|
||||
|
||||
// console.log("入参", allvalue)
|
||||
addBatch(allvalue).then(() => {
|
||||
geteverything()
|
||||
})
|
||||
|
|
@ -1934,13 +1670,10 @@
|
|||
directiveName: '' // 默认的 directiveName
|
||||
}))
|
||||
}))
|
||||
// console.log("wtf", res)
|
||||
res.result.serviceList.forEach((res : any) => {
|
||||
timearr.value[res.positioning].children[res.positioningLong] = res;
|
||||
})
|
||||
// console.log("返回了", res.result)
|
||||
bottomItems.value = res.result.instantList
|
||||
// console.log("看看获得了什么",bottomItems.value)
|
||||
cansumit.value = true;
|
||||
emotionTagList.value = res.result.emotionTagList;
|
||||
emotionTagListLook.value = []
|
||||
|
|
@ -1951,13 +1684,11 @@
|
|||
}
|
||||
})
|
||||
bodyTagList.value = res.result.bodyTagList
|
||||
// console.log("zzzz",res.result.bodyTagList)
|
||||
res.result.bodyTagList.forEach((res : any) => {
|
||||
if (res.izSelected == 'Y') {
|
||||
bodyTagListLook.value.push(res.netPic)
|
||||
}
|
||||
})
|
||||
// console.log("res11111",res)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -1975,7 +1706,6 @@
|
|||
})
|
||||
})
|
||||
secondtemp.value = goodArray
|
||||
|
||||
if (res.result) {
|
||||
res.result.forEach((element : any) => {
|
||||
if (element.netFlag == '0') {
|
||||
|
|
@ -2001,7 +1731,6 @@
|
|||
})
|
||||
})
|
||||
bigArray.value = res.result;
|
||||
// console.log("右侧",bigArray.value)
|
||||
}
|
||||
downList.value = bigArray.value[0].children
|
||||
upmenuIndex.value = -1;
|
||||
|
|
@ -2013,8 +1742,6 @@
|
|||
uni.$on('where', findback);
|
||||
downdonghua.value = 0;
|
||||
geteverything()
|
||||
|
||||
|
||||
})
|
||||
|
||||
const bodyTagListLook = ref([]);
|
||||
|
|
@ -2031,43 +1758,6 @@
|
|||
solveWatch.value = 3;
|
||||
whereEvent(data)
|
||||
}
|
||||
|
||||
const moveNumber = ref({
|
||||
index0: 999,
|
||||
index1: 999
|
||||
})
|
||||
|
||||
const moBan = ref({
|
||||
directiveId: "",
|
||||
directiveName: "",
|
||||
typeId: "",
|
||||
typeName: "",
|
||||
categoryId: "",
|
||||
categoryName: "",
|
||||
cycleTypeId: "",
|
||||
cycleType: "",
|
||||
cycleValue: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
positioning: "",
|
||||
positioningLong: "",
|
||||
izPackage: 'N',
|
||||
previewFile: "",
|
||||
previewFileSmall: "",
|
||||
serviceDuration: "",
|
||||
immediateFile: "",
|
||||
immediateFileFocus: "",
|
||||
netImmediateFileFocus:"",
|
||||
netImmediateFile: "",
|
||||
tagName: "",
|
||||
netPreviewFile:"",
|
||||
netPreviewFileSmall:"",
|
||||
mp3File:"",
|
||||
netMp3File:"",
|
||||
mp4File:"",
|
||||
netMp4File:"",
|
||||
serviceContent:"",
|
||||
})
|
||||
// 切割bigArray
|
||||
function splitString(str) {
|
||||
// 使用正则表达式找到所有括号的内容
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -176,7 +176,7 @@
|
|||
item.zk = false;
|
||||
item.scrollleft = 0;
|
||||
})
|
||||
console.log("?????",form,res.result.records)
|
||||
// console.log("?????",form,res.result.records)
|
||||
listarr.value.push(...res.result.records)
|
||||
status.value = (res.result.total == listarr.value.length ? 'nomore' : 'loadmore')
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,18 +1,23 @@
|
|||
<template>
|
||||
<view class="backgroundContainer">
|
||||
|
||||
<!-- 左侧菜单 -->
|
||||
<leftcontent :list="tabbrarr" @navurl="navurl"></leftcontent>
|
||||
|
||||
<!-- 主页 -->
|
||||
<index :isShow="menuIndexshow" v-if="!menuIndex" />
|
||||
<!-- 设备页 -->
|
||||
<equipment :isShow="menuIndexshowfifth" v-if="menuIndex==4" />
|
||||
<equipment :isShow="menuIndexshowfifth" v-if="menuIndex==4" />
|
||||
<!-- 医嘱页 -->
|
||||
<requestform :isShow="menuIndexshowfourth" v-if="menuIndex==3" />
|
||||
<!-- 户嘱页 -->
|
||||
<nurse :isshow="menuIndexshowsecond"
|
||||
v-if="menuIndex==1&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
|
||||
v-if="menuIndex==1&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
|
||||
<!-- 医嘱 -->
|
||||
<doctorask v-if="menuIndex==2"/>
|
||||
<doctorask v-if="menuIndex==2&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
|
||||
<!-- 没有数据 -->
|
||||
<view class="nomessageclass" :style="messageopit?{opacity: `1`}:{opacity: `0`}"
|
||||
v-if="(menuIndex == 1 || menuIndex == 2) && (!uni.getStorageSync('elderId') ||!uni.getStorageSync('nuId'))">
|
||||
<defaultr cont="暂无老人入住"></defaultr>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -26,6 +31,8 @@
|
|||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { getServiceTree, getNcPackagelist } from './component/nurse/api.js'
|
||||
import leftcontent from "./component/leftcontent/leftcontent.vue"
|
||||
import defaultr from '@/pages/procurement/components/default.vue';
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
menuIndex.value = -1;
|
||||
|
|
@ -41,7 +48,6 @@
|
|||
})
|
||||
})
|
||||
|
||||
|
||||
// 通用的生成函数
|
||||
function genPaths(base, prefix, count, ext = 'png', startIndex = 0, pad = false) {
|
||||
return Array.from({ length: count }, (_, i) => {
|
||||
|
|
@ -52,27 +58,30 @@
|
|||
})
|
||||
}
|
||||
const tabbrarr = ref([
|
||||
{name:'首页',url:'/static/shouye/sy/h0.png',urls:'/static/shouye/sy/h1.png'},
|
||||
{name:'护嘱',url:'/static/shouye/sy/n0.png',urls:'/static/shouye/sy/n1.png'},
|
||||
{name:'医嘱',url:'/static/shouye/sy/y0.png',urls:'/static/shouye/sy/y1.png'},
|
||||
{name:'后勤',url:'/static/shouye/sy/l0.png',urls:'/static/shouye/sy/l1.png'},
|
||||
{name:'物联',url:'/static/shouye/sy/g0.png',urls:'/static/shouye/sy/g1.png'},
|
||||
{name:'返回',url:'/static/shouye/sy/f0.png',urls:'/static/shouye/sy/f1.png'},
|
||||
{ name: '首页', url: '/static/shouye/sy/h0.png', urls: '/static/shouye/sy/h1.png' },
|
||||
{ name: '护嘱', url: '/static/shouye/sy/n0.png', urls: '/static/shouye/sy/n1.png' },
|
||||
{ name: '医嘱', url: '/static/shouye/sy/y0.png', urls: '/static/shouye/sy/y1.png' },
|
||||
{ name: '后勤', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' },
|
||||
{ name: '物联', url: '/static/shouye/sy/g0.png', urls: '/static/shouye/sy/g1.png' },
|
||||
{ name: '返回', url: '/static/shouye/sy/f0.png', urls: '/static/shouye/sy/f1.png' },
|
||||
])
|
||||
const navurl =(e)=>{
|
||||
const navurl = (e) => {
|
||||
changeMenu(e)
|
||||
}
|
||||
|
||||
|
||||
// 当前选中的菜单索引
|
||||
const menuIndex = ref<number>(-1);
|
||||
const menuIndexshow = ref<boolean>(false);
|
||||
const menuIndexshowsecond = ref<boolean>(false);
|
||||
const menuIndexshowfourth = ref<boolean>(false);
|
||||
const menuIndexshowfifth = ref<boolean>(false);
|
||||
const messageopit = ref<boolean>(false);
|
||||
|
||||
// 变更菜单
|
||||
const changeMenu = (index : number) => {
|
||||
if (index === menuIndex.value) {
|
||||
return
|
||||
}
|
||||
menuIndex.value = index;
|
||||
menuIndexshow.value = false
|
||||
menuIndexshowsecond.value = false
|
||||
|
|
@ -89,7 +98,11 @@
|
|||
break;
|
||||
case 1:
|
||||
menuIndexshowsecond.value = true
|
||||
nomesssageshow()
|
||||
break;
|
||||
case 2:
|
||||
|
||||
nomesssageshow()
|
||||
break;
|
||||
case 3:
|
||||
menuIndexshowfourth.value = true
|
||||
|
|
@ -121,12 +134,15 @@
|
|||
|
||||
});
|
||||
|
||||
|
||||
|
||||
const nomesssageshow = () => {
|
||||
messageopit.value = false;
|
||||
setTimeout(() => {
|
||||
messageopit.value = true;
|
||||
}, 200)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
.backgroundContainer {
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
|
@ -137,5 +153,8 @@
|
|||
z-index: 12;
|
||||
}
|
||||
|
||||
|
||||
.nomessageclass {
|
||||
width: 100vw;
|
||||
transition: opacity 1s ease;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="photo-father">
|
||||
<view class="juzhong" style="margin-left: -30rpx;">
|
||||
<view class="juzhong" style="margin-left: -30rpx;z-index: 1;">
|
||||
<donghua :width="`1300rpx`" :height="`900rpx`" :links="blueArray" :playing="photoplay" :loop="true"
|
||||
:interval="120" />
|
||||
</view>
|
||||
|
|
@ -568,6 +568,7 @@
|
|||
.big-img {
|
||||
width: 550rpx;
|
||||
height: 550rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.server-name {
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@
|
|||
import twoseven from '@/pages/login/twoseven.vue'
|
||||
import { isRel, getLoginCode, loginApp } from './api.js'
|
||||
import huakuai from '@/component/public/huakuai.vue'
|
||||
import { initWs, connectWs } from '@/common/websocketManager.js';
|
||||
|
||||
const zyupgrade = ref(null);
|
||||
const isTarget = ref(false);
|
||||
|
|
@ -202,18 +203,18 @@
|
|||
const getImg = () => {
|
||||
if (/^\d{11}$/.test(form.username)) {
|
||||
isRel(form.username).then((res : any) => {
|
||||
console.log("啥啊",res)
|
||||
console.log("啥啊", res)
|
||||
if (res.result.code == `0`) {
|
||||
uni.setStorageSync('serverUrl', res.result.orgList[0].serverUrl);
|
||||
uni.setStorageSync('orgList', res.result.orgList);
|
||||
uni.setStorageSync('orgListName', res.result.orgList[0].departName);
|
||||
uni.setStorageSync('orgListCode', res.result.orgList[0].orgCode);
|
||||
|
||||
|
||||
allserve.value = res.result.orgList
|
||||
time.value = Date.now();
|
||||
|
||||
getLoginCode(time.value).then((res : any) => {
|
||||
console.log("啥啊",res)
|
||||
console.log("啥啊", res)
|
||||
form.captcha = res.message
|
||||
canclick.value = true
|
||||
})
|
||||
|
|
@ -366,6 +367,14 @@
|
|||
})
|
||||
}
|
||||
const gotoindex = () => {
|
||||
if (uni.getStorageSync('userInfo')) {
|
||||
initWs(`wss://www.focusnu.com/ws101/sdWebsocket/${uni.getStorageSync('userInfo').employessId}`, {
|
||||
debug: true,
|
||||
heartbeatInterval: 25000,
|
||||
autoConnect: false, // 不自动连接
|
||||
});
|
||||
connectWs(); // 主动连接 WebSocket
|
||||
}
|
||||
jumpTo(`/pages/login/animationpage`)
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// 全局请求封装
|
||||
const base_url = 'https://www.focusnu.com/opeapi'
|
||||
// const base_url = 'http://192.168.2.37:8081/opeapi'
|
||||
// const base_url = 'http://192.168.2.37:8081/opeapi'
|
||||
// const base_url = 'http://localhost:8091/opeapi'
|
||||
// 请求超出时间
|
||||
const timeout = 5000
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Loading…
Reference in New Issue