feat(hand-factory): 添加live数据获取接口并更新多个组件

refactor(klp-header): 更新产线列表显示名称
fix(login): 修正验证码启用条件判断
style(l3): 注释掉用户欢迎语区块
refactor(klp-shutdown-statistic): 为switch case添加break语句
This commit is contained in:
砂糖
2025-10-27 14:28:29 +08:00
parent 718f0efc76
commit 57600f66c2
5 changed files with 19 additions and 9 deletions

View File

@@ -0,0 +1,7 @@
import request from '@/utils/request'
export function getLiveData () {
return request({
method: 'get',
})
}

View File

@@ -36,11 +36,11 @@ export default {
return { return {
// 产线列表原Tab列表改造可外部传入此处保留默认值 // 产线列表原Tab列表改造可外部传入此处保留默认值
lineList: [ lineList: [
{ name: "酸轧机组", key: "acidity" }, { name: "科伦普重工-酸轧机组", key: "acidity" },
{ name: "彩涂机组", key: "paint" }, { name: "科伦普重工-彩涂机组", key: "paint" },
{ name: "镀锌线一组", key: "zinc1" }, { name: "科伦普重工-镀锌线一组", key: "zinc1" },
{ name: "镀锌线二组", key: "zinc2" }, { name: "科伦普重工-镀锌线二组", key: "zinc2" },
{ name: "镀锌线三组", key: "zinc3" }, { name: "科伦普重工-镀锌线三组", key: "zinc3" },
], ],
// 当前选中的产线索引关联picker // 当前选中的产线索引关联picker
currentLineIndex: 0, currentLineIndex: 0,

View File

@@ -335,10 +335,13 @@ export default {
switch (this.activeTab) { switch (this.activeTab) {
case "day": case "day":
return this.startDate; return this.startDate;
break;
case "month": case "month":
return `${this.startDate}${this.endDate}`; return `${this.startDate}${this.endDate}`;
break;
case "year": case "year":
return `${this.startDate}${this.endDate}`; return `${this.startDate}${this.endDate}`;
break;
default: default:
return ""; return "";
} }

View File

@@ -17,7 +17,7 @@
<view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled"> <view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
<view class="iconfont icon-code icon"></view> <view class="iconfont icon-code icon"></view>
<input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" /> <input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
<view class="login-code"> <view class="login-code" >
<image :src="codeUrl" @click="getCode" class="login-code-img"></image> <image :src="codeUrl" @click="getCode" class="login-code-img"></image>
</view> </view>
</view> </view>
@@ -86,7 +86,7 @@
// 获取图形验证码 // 获取图形验证码
getCode() { getCode() {
getCodeImg().then(res => { getCodeImg().then(res => {
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled this.captchaEnabled = res.data.captchaEnabled === undefined ? true : res.data.captchaEnabled
console.log(res, '验证码结果') console.log(res, '验证码结果')
if (this.captchaEnabled) { if (this.captchaEnabled) {
this.codeUrl = 'data:image/gif;base64,' + res.data.img this.codeUrl = 'data:image/gif;base64,' + res.data.img

View File

@@ -3,13 +3,13 @@
<template> <template>
<div class="dashboard-root"> <div class="dashboard-root">
<!-- 第一行头像+欢迎语 --> <!-- 第一行头像+欢迎语 -->
<div class="user-greeting-row"> <!-- <div class="user-greeting-row">
<img :src="avatar" class="user-avatar" alt="头像" /> <img :src="avatar" class="user-avatar" alt="头像" />
<div class="greeting-text"> <div class="greeting-text">
<div class="greeting-title">{{ greeting }}{{ name }}</div> <div class="greeting-title">{{ greeting }}{{ name }}</div>
<div class="greeting-desc">愿你天黑有灯下雨有伞</div> <div class="greeting-desc">愿你天黑有灯下雨有伞</div>
</div> </div>
</div> </div> -->
<!-- 全部应用 --> <!-- 全部应用 -->
<el-row> <el-row>