修改维修必填字段和没有权限推出的问题

This commit is contained in:
龙运模 2025-05-29 15:53:49 +08:00
parent c24b7fdfc3
commit da33f75322
5 changed files with 60 additions and 25 deletions

View File

@ -244,6 +244,7 @@
} }
}, },
created() { created() {
console.log('layout 再一次进入')
this.onLayoutResize(); this.onLayoutResize();
window.addEventListener('resize', this.onLayoutResize); window.addEventListener('resize', this.onLayoutResize);
const menu = this.$router.sc_getMenu(); const menu = this.$router.sc_getMenu();

View File

@ -6,9 +6,9 @@
<div class="router-err__content"> <div class="router-err__content">
<h2>无权限或找不到页面</h2> <h2>无权限或找不到页面</h2>
<p>当前页面无权限访问或者打开了一个不存在的链接请检查当前账户权限和链接的可访问性</p> <p>当前页面无权限访问或者打开了一个不存在的链接请检查当前账户权限和链接的可访问性</p>
<el-button type="primary" plain round @click="gohome">返回首页</el-button> <el-button type="primary" plain round @click="goHome">返回首页</el-button>
<el-button type="primary" plain round @click="gologin">重新登录</el-button> <el-button type="primary" plain round @click="goLogin">重新登录</el-button>
<el-button type="primary" round @click="goback">返回上一页</el-button> <el-button type="primary" round @click="goBack">返回上一页</el-button>
</div> </div>
</div> </div>
</template> </template>
@ -16,15 +16,15 @@
<script> <script>
export default { export default {
methods: { methods: {
gohome(){ goHome(){
location.href="#/" location.href="#/"
}, },
goback(){ goLogin(){
this.$router.push("/login");
},
goBack(){
this.$router.go(-1); this.$router.go(-1);
}, },
gologin(){
this.$router.push("/login");
}
} }
} }
</script> </script>

View File

@ -13,7 +13,7 @@ let global_callback = function () {};
let timeoutObj = null; let timeoutObj = null;
let timeout = 28 * 1000; //30秒一次心跳 let timeout = 28 * 1000; //30秒一次心跳
let serverTimeoutObj = 60; //心跳倒计时 let serverTimeoutObj = 60; //心跳倒计时
let timeOutNum = 60; //断开 重连倒计时 let timeOutNum = 60; // 断开 重连倒计时
let lockReconnect = false; //是否真正建立连接 let lockReconnect = false; //是否真正建立连接
const wsUri = systemConfig.WS_URL; const wsUri = systemConfig.WS_URL;
let showNot = null; let showNot = null;
@ -46,7 +46,8 @@ function startHeartbeat() {
start(); start();
} }
function start() {//开启心跳 //开启心跳
function start() {
timeoutObj && clearTimeout(timeoutObj); timeoutObj && clearTimeout(timeoutObj);
serverTimeoutObj && clearTimeout(serverTimeoutObj); serverTimeoutObj && clearTimeout(serverTimeoutObj);
timeoutObj = setTimeout(function () { timeoutObj = setTimeout(function () {
@ -65,7 +66,22 @@ function start() {//开启心跳
} }
function createWebSocket(callback, token) { function createWebSocket(callback, token) {
if (websocket == null || typeof websocket !== WebSocket) { console.log(websocket,'websocket')
// if (websocket == null || typeof websocket !== WebSocket) {
// initWebSocket(callback, token);
// }
// websocket.readyState 0 (CONNECTING) 1 (OPEN) 2 (CLOSING) 3 (CLOSED)
// 0 连接正在建立中,尚未连接
// 1 已经建立,可以进行通信
// 2 关闭握手过程,即将关闭
// 3 闭或者根本没有建立‌
if(websocket && websocket.readyState === 1){
return
}
console.log(websocket)
if (websocket === null || websocket.readyState === 3) {
initWebSocket(callback, token); initWebSocket(callback, token);
} }
} }
@ -121,7 +137,6 @@ function closeSock(active) {
function webSocketOnMessage(msg) { function webSocketOnMessage(msg) {
// 收到信息为Blob类型时 // 收到信息为Blob类型时
let result = null; let result = null;
// debugger
// 二进制文件 // 二进制文件
if (msg.data instanceof Blob) { if (msg.data instanceof Blob) {
const reader = new FileReader(); const reader = new FileReader();

View File

@ -114,14 +114,20 @@
{{scope.row.m_ascription===1?'旧部件':'新部件'}} {{scope.row.m_ascription===1?'旧部件':'新部件'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="part_mpn" label="部件MPN" :show-overflow-tooltip="true" width="240"> <el-table-column prop="part_mpn" label="部件MPN" :show-overflow-tooltip="false" width="250">
<template #default="scope"> <template #default="scope">
<el-input :size="size" v-model="scope.row.part_mpn" placeholder="部件MPN"></el-input> <div class="flexBox">
<span class="requiredText" v-if="item.repair_action==1">*</span>
<el-input :size="size" v-model="scope.row.part_mpn" placeholder="部件MPN" style="width: 230px;"></el-input>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="part_sn" label="部件SN" :show-overflow-tooltip="true" width="240"> <el-table-column prop="part_sn" label="部件SN" :show-overflow-tooltip="false" width="250">
<template #default="scope"> <template #default="scope">
<el-input :size="size" v-model="scope.row.part_sn" placeholder="部件SN"></el-input> <div class="flexBox">
<span class="requiredText" v-if="item.repair_action==1">*</span>
<el-input :size="size" v-model="scope.row.part_sn" placeholder="部件SN" style="width: 230px;"></el-input>
</div>
</template> </template>
</el-table-column> </el-table-column>
</sc-table> </sc-table>
@ -327,7 +333,17 @@
color: var(--el-color-danger); color: var(--el-color-danger);
} }
} }
.flexBox{
display: flex;
align-items: center;
.requiredText{
height: 100%;
display: flex;
align-items: center;
color: var(--el-color-danger);
margin-right: 4px;
}
}
.btnBox { .btnBox {
text-align: right; text-align: right;
} }

View File

@ -1,13 +1,13 @@
<template> <template>
<el-container class="mainBox mainHeaderNoBorderPadding"> <el-container class="mainBox mainHeaderNoBorderPadding">
<el-header class="header"> <!-- <el-header class="header">-->
<div class="left-panel"> <!-- <div class="left-panel">-->
<el-button type="primary" :disabled="selection.length!==1" :size="size" icon="sc-icon-MaintenanceSetup" @click="upkeep">执行维修</el-button> <!-- <el-button type="primary" :disabled="selection.length!==1" :size="size" icon="sc-icon-MaintenanceSetup" @click="upkeep">执行维修</el-button>-->
</div> <!-- </div>-->
<div class="right-panel"> <!-- <div class="right-panel">-->
</div> <!-- </div>-->
</el-header> <!-- </el-header>-->
<el-main class="nopadding"> <el-main class="nopadding">
<div class="flowPath"> <div class="flowPath">
<flow :list="flowList"/> <flow :list="flowList"/>
@ -22,7 +22,7 @@
</div> </div>
</div> </div>
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" :params="params" row-key="id" stripe border :size="size" @selection-change="selectionChange" @columnBack="columnBack"> <scTable ref="table" :apiObj="list.apiObj" :column="list.column" :params="params" row-key="id" stripe border :size="size" @selection-change="selectionChange" @columnBack="columnBack">
<el-table-column type="selection" align="center" width="40"></el-table-column> <!-- <el-table-column type="selection" align="center" width="40"></el-table-column>-->
<template #repair_status="scope"> <template #repair_status="scope">
<span v-for="(item,ind) in setMap.statusList" :key="ind"> <span v-for="(item,ind) in setMap.statusList" :key="ind">
<span :style="{color:item.value==1?`var(--el-order-color-1)`:item.value==2?`var(--el-order-color-2)`:item.value==3?`var(--el-order-color-3)`:item.value==4?`var(--el-order-color-4)`:`var(--el-order-color-100)`}" <span :style="{color:item.value==1?`var(--el-order-color-1)`:item.value==2?`var(--el-order-color-2)`:item.value==3?`var(--el-order-color-3)`:item.value==4?`var(--el-order-color-4)`:`var(--el-order-color-100)`}"
@ -303,6 +303,9 @@ export default {
padding: 0 10px; padding: 0 10px;
} }
} }
.mainHeaderNoBorderPadding{
padding-top: 10px;
}
.logoCell{ .logoCell{
display: flex; display: flex;
align-items: center; align-items: center;