Compare commits
2 Commits
45dfbc327a
...
c6d082dbe5
Author | SHA1 | Date | |
---|---|---|---|
c6d082dbe5 | |||
66f8e463d0 |
@ -90,4 +90,10 @@ public class MaintenanceOrderRespVO {
|
||||
@Schema(description = "审批状态(bpm_process_instance_status)")
|
||||
private Integer approveStatus;
|
||||
|
||||
@Schema(description = "报警id")
|
||||
private String alarmId;
|
||||
|
||||
@Schema(description = "报告id")
|
||||
private String reportId;
|
||||
|
||||
}
|
@ -64,4 +64,7 @@ public class MaintenanceOrderSaveReqVO {
|
||||
@Schema(description = "审批状态(bpm_process_instance_status)")
|
||||
private Integer approveStatus;
|
||||
|
||||
@Schema(description = "报警id")
|
||||
private String alarmId;
|
||||
|
||||
}
|
@ -81,6 +81,10 @@ public class MaintenanceOrderDO extends BaseDO {
|
||||
* 审批状态
|
||||
*/
|
||||
private Integer approveStatus;
|
||||
/**
|
||||
* 报警id
|
||||
*/
|
||||
private String alarmId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String equipNo;
|
||||
@ -90,4 +94,6 @@ public class MaintenanceOrderDO extends BaseDO {
|
||||
private String customerName;
|
||||
@TableField(exist = false)
|
||||
private String executorName;
|
||||
@TableField(exist = false)
|
||||
private String reportId;
|
||||
}
|
@ -3,6 +3,7 @@ package com.inspur.module.system.service.maintenance;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.inspur.framework.common.enums.CommonStatusEnum;
|
||||
import com.inspur.framework.common.pojo.PageResult;
|
||||
@ -16,9 +17,11 @@ import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderRecord
|
||||
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderRespVO;
|
||||
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderSaveReqVO;
|
||||
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO;
|
||||
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceReportDO;
|
||||
import com.inspur.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderMapper;
|
||||
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderRecordMapper;
|
||||
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceReportMapper;
|
||||
import com.inspur.module.system.service.baseData.CustomerInfoService;
|
||||
import com.inspur.module.system.service.equip.ComponentInfoService;
|
||||
import com.inspur.module.system.service.equip.EquipInfoService;
|
||||
@ -67,6 +70,9 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService {
|
||||
@Resource
|
||||
private BpmProcessInstanceApi processInstanceApi;
|
||||
|
||||
@Resource
|
||||
private MaintenanceReportMapper maintenanceReportMapper;
|
||||
|
||||
/**
|
||||
* OA 请假对应的流程定义 KEY
|
||||
*/
|
||||
@ -130,7 +136,17 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService {
|
||||
|
||||
@Override
|
||||
public MaintenanceOrderDO getRemoteMaintenanceOrder(String id) {
|
||||
return maintenanceOrderMapper.selectById(id);
|
||||
MaintenanceOrderDO maintenanceOrderDO = maintenanceOrderMapper.selectById(id);
|
||||
//获取维修报告
|
||||
if (Objects.nonNull(maintenanceOrderDO)){
|
||||
LambdaQueryWrapper<MaintenanceReportDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MaintenanceReportDO::getMaintenanceOrderId,maintenanceOrderDO.getMaintenanceOrderId());
|
||||
MaintenanceReportDO maintenanceReportDO = maintenanceReportMapper.selectOne(queryWrapper);
|
||||
if (Objects.nonNull(maintenanceReportDO)){
|
||||
maintenanceOrderDO.setReportId(maintenanceReportDO.getMaintenanceReportId());
|
||||
}
|
||||
}
|
||||
return maintenanceOrderDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3,9 +3,7 @@ package com.inspur.module.system.service.maintenance;
|
||||
import com.inspur.framework.common.pojo.PageResult;
|
||||
import com.inspur.module.system.controller.maintenance.vo.MaintenanceReportPageReqVO;
|
||||
import com.inspur.module.system.controller.maintenance.vo.MaintenanceReportSaveReqVO;
|
||||
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO;
|
||||
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceReportDO;
|
||||
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderMapper;
|
||||
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceReportMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
@ -29,17 +27,12 @@ public class MaintenanceReportServiceImpl implements MaintenanceReportService {
|
||||
@Resource
|
||||
private MaintenanceReportMapper maintenanceReportMapper;
|
||||
|
||||
@Resource
|
||||
private MaintenanceOrderMapper maintenanceOrderMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String createMaintenanceReport(MaintenanceReportSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
MaintenanceReportDO maintenanceReport = BeanUtils.toBean(createReqVO, MaintenanceReportDO.class);
|
||||
maintenanceReportMapper.insert(maintenanceReport);
|
||||
//更新工单表中的报告id
|
||||
maintenanceOrderMapper.updateById(new MaintenanceOrderDO().setMaintenanceOrderId(maintenanceReport.getMaintenanceOrderId()).setDiagnoiseReportId(maintenanceReport.getMaintenanceReportId()));
|
||||
// 返回
|
||||
return maintenanceReport.getMaintenanceReportId();
|
||||
}
|
||||
|
BIN
imt-ui/src/assets/images/bigscreen/item_title_2.png
Normal file
BIN
imt-ui/src/assets/images/bigscreen/item_title_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -1,6 +1,6 @@
|
||||
<template xmlns="">
|
||||
<div class="container">
|
||||
<div class="logo">智能机床运维管理系统</div>
|
||||
<div class="logo"><span class="login-title">智能机床运维管理系统</span></div>
|
||||
<!-- 登录区域 -->
|
||||
<div class="content">
|
||||
<!-- 配图 -->
|
||||
@ -14,52 +14,123 @@
|
||||
|
||||
<!-- 表单 -->
|
||||
<div class="form-cont">
|
||||
<el-tabs class="form" v-model="loginForm.loginType" style=" float:none;">
|
||||
<el-tab-pane label="账号密码登录" name="uname">
|
||||
<el-tabs
|
||||
class="form"
|
||||
v-model="loginForm.loginType"
|
||||
style=" float:none;"
|
||||
>
|
||||
<el-tab-pane
|
||||
label="账号密码登录"
|
||||
name="uname"
|
||||
>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="短信验证码登录" name="sms">
|
||||
<!-- <el-tab-pane label="短信验证码登录" name="sms">
|
||||
</el-tab-pane>-->
|
||||
</el-tabs>
|
||||
<div>
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form">
|
||||
<el-form-item prop="tenantName" v-if="tenantEnable">
|
||||
<el-input v-model="loginForm.tenantName" type="text" auto-complete="off" placeholder='租户'>
|
||||
<svg-icon slot="prefix" icon-class="tree" class="el-input__icon input-icon"/>
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
:model="loginForm"
|
||||
:rules="LoginRules"
|
||||
class="login-form"
|
||||
>
|
||||
<el-form-item
|
||||
prop="tenantName"
|
||||
v-if="tenantEnable"
|
||||
>
|
||||
<el-input
|
||||
v-model="loginForm.tenantName"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder='租户'
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="tree"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- 账号密码登录 -->
|
||||
<div v-if="loginForm.loginType === 'uname'">
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon"/>
|
||||
<el-input
|
||||
v-model="loginForm.username"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="账号"
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="user"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
|
||||
@keyup.enter.native="getCode">
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon"/>
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
type="password"
|
||||
auto-complete="off"
|
||||
placeholder="密码"
|
||||
@keyup.enter.native="getCode"
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="password"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;">记住密码</el-checkbox>
|
||||
<el-checkbox
|
||||
v-model="loginForm.rememberMe"
|
||||
style="margin:0 0 25px 0;"
|
||||
>记住密码</el-checkbox>
|
||||
</div>
|
||||
|
||||
<!-- 短信验证码登录 -->
|
||||
<div v-if="loginForm.loginType === 'sms'">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input v-model="loginForm.mobile" type="text" auto-complete="off" placeholder="请输入手机号">
|
||||
<svg-icon slot="prefix" icon-class="phone" class="el-input__icon input-icon"/>
|
||||
<el-input
|
||||
v-model="loginForm.mobile"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="请输入手机号"
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="phone"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="mobileCode">
|
||||
<el-input v-model="loginForm.mobileCode" type="text" auto-complete="off" placeholder="短信验证码"
|
||||
<el-input
|
||||
v-model="loginForm.mobileCode"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="短信验证码"
|
||||
class="sms-login-mobile-code-prefix"
|
||||
@keyup.enter.native="handleLogin">
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<template>
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon"/>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="password"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
</template>
|
||||
<template slot="append">
|
||||
<span v-if="mobileCodeTimer <= 0" class="getMobileCode" @click="getSmsCode" style="cursor: pointer;">获取验证码</span>
|
||||
<span v-if="mobileCodeTimer > 0" class="getMobileCode">{{ mobileCodeTimer }}秒后可重新获取</span>
|
||||
<span
|
||||
v-if="mobileCodeTimer <= 0"
|
||||
class="getMobileCode"
|
||||
@click="getSmsCode"
|
||||
style="cursor: pointer;"
|
||||
>获取验证码</span>
|
||||
<span
|
||||
v-if="mobileCodeTimer > 0"
|
||||
class="getMobileCode"
|
||||
>{{ mobileCodeTimer }}秒后可重新获取</span>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -67,8 +138,13 @@
|
||||
|
||||
<!-- 下方的登录按钮 -->
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button :loading="loading" size="medium" type="primary" style="width:100%;"
|
||||
@click.native.prevent="getCode">
|
||||
<el-button
|
||||
:loading="loading"
|
||||
size="medium"
|
||||
type="primary"
|
||||
style="width:100%;"
|
||||
@click.native.prevent="getCode"
|
||||
>
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
@ -76,9 +152,22 @@
|
||||
|
||||
<!-- 社交登录 -->
|
||||
<el-form-item style="width:100%;">
|
||||
<div class="oauth-login" style="display:flex">
|
||||
<div class="oauth-login-item" v-for="item in SysUserSocialTypeEnum" :key="item.type" @click="doSocialLogin(item)">
|
||||
<img :src="item.img" height="25px" width="25px" alt="登录" >
|
||||
<div
|
||||
class="oauth-login"
|
||||
style="display:flex"
|
||||
>
|
||||
<div
|
||||
class="oauth-login-item"
|
||||
v-for="item in SysUserSocialTypeEnum"
|
||||
:key="item.type"
|
||||
@click="doSocialLogin(item)"
|
||||
>
|
||||
<img
|
||||
:src="item.img"
|
||||
height="25px"
|
||||
width="25px"
|
||||
alt="登录"
|
||||
>
|
||||
<span>{{item.title}}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -90,8 +179,12 @@
|
||||
</div>
|
||||
|
||||
<!-- 图形验证码 -->
|
||||
<Verify ref="verify" :captcha-type="'blockPuzzle'" :img-size="{width:'400px',height:'200px'}"
|
||||
@success="handleLogin" />
|
||||
<Verify
|
||||
ref="verify"
|
||||
:captcha-type="'blockPuzzle'"
|
||||
:img-size="{width:'400px',height:'200px'}"
|
||||
@success="handleLogin"
|
||||
/>
|
||||
|
||||
<!-- footer -->
|
||||
<div class="footer">
|
||||
@ -101,27 +194,33 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {sendSmsCode, socialAuthRedirect} from "@/api/login";
|
||||
import {getTenantIdByName} from "@/api/system/tenant";
|
||||
import {SystemUserSocialTypeEnum} from "@/utils/constants";
|
||||
import {getCaptchaEnable, getTenantEnable} from "@/utils/ruoyi";
|
||||
import { sendSmsCode, socialAuthRedirect } from "@/api/login";
|
||||
import { getTenantIdByName } from "@/api/system/tenant";
|
||||
import { SystemUserSocialTypeEnum } from "@/utils/constants";
|
||||
import { getCaptchaEnable, getTenantEnable } from "@/utils/ruoyi";
|
||||
import {
|
||||
getPassword,
|
||||
getRememberMe, getTenantName,
|
||||
getRememberMe,
|
||||
getTenantName,
|
||||
getUsername,
|
||||
removePassword, removeRememberMe, removeTenantName,
|
||||
removePassword,
|
||||
removeRememberMe,
|
||||
removeTenantName,
|
||||
removeUsername,
|
||||
setPassword, setRememberMe, setTenantId, setTenantName,
|
||||
setUsername
|
||||
setPassword,
|
||||
setRememberMe,
|
||||
setTenantId,
|
||||
setTenantName,
|
||||
setUsername,
|
||||
} from "@/utils/auth";
|
||||
|
||||
import Verify from '@/components/Verifition/Verify';
|
||||
import {resetUserPwd} from "@/api/system/user";
|
||||
import Verify from "@/components/Verifition/Verify";
|
||||
import { resetUserPwd } from "@/api/system/user";
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
components: {
|
||||
Verify
|
||||
Verify,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -143,42 +242,47 @@ export default {
|
||||
|
||||
LoginRules: {
|
||||
username: [
|
||||
{required: true, trigger: "blur", message: "用户名不能为空"}
|
||||
{ required: true, trigger: "blur", message: "用户名不能为空" },
|
||||
],
|
||||
password: [
|
||||
{required: true, trigger: "blur", message: "密码不能为空"}
|
||||
{ required: true, trigger: "blur", message: "密码不能为空" },
|
||||
],
|
||||
mobile: [
|
||||
{required: true, trigger: "blur", message: "手机号不能为空"},
|
||||
{ required: true, trigger: "blur", message: "手机号不能为空" },
|
||||
{
|
||||
validator: function (rule, value, callback) {
|
||||
if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
|
||||
if (
|
||||
/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(
|
||||
value
|
||||
) === false
|
||||
) {
|
||||
callback(new Error("手机号格式错误"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, trigger: "blur"
|
||||
}
|
||||
},
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
tenantName: [
|
||||
{required: true, trigger: "blur", message: "租户不能为空"},
|
||||
{ required: true, trigger: "blur", message: "租户不能为空" },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
// debugger
|
||||
getTenantIdByName(value).then(res => {
|
||||
getTenantIdByName(value).then((res) => {
|
||||
const tenantId = res.data;
|
||||
if (tenantId && tenantId >= 0) {
|
||||
// 设置租户
|
||||
setTenantId(tenantId)
|
||||
setTenantId(tenantId);
|
||||
callback();
|
||||
} else {
|
||||
callback('租户不存在');
|
||||
callback("租户不存在");
|
||||
}
|
||||
});
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
loading: false,
|
||||
redirect: undefined,
|
||||
@ -190,30 +294,33 @@ export default {
|
||||
// 租户开关
|
||||
this.tenantEnable = getTenantEnable();
|
||||
if (this.tenantEnable) {
|
||||
getTenantIdByName(this.loginForm.tenantName).then(res => { // 设置租户
|
||||
getTenantIdByName(this.loginForm.tenantName).then((res) => {
|
||||
// 设置租户
|
||||
const tenantId = res.data;
|
||||
if (tenantId && tenantId >= 0) {
|
||||
setTenantId(tenantId)
|
||||
setTenantId(tenantId);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 验证码开关
|
||||
this.captchaEnable = getCaptchaEnable();
|
||||
// 重定向地址
|
||||
this.redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : undefined;
|
||||
this.redirect = this.$route.query.redirect
|
||||
? decodeURIComponent(this.$route.query.redirect)
|
||||
: undefined;
|
||||
this.getCookie();
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
// 情况一,未开启:则直接登录
|
||||
if (!this.captchaEnable) {
|
||||
this.handleLogin({})
|
||||
this.handleLogin({});
|
||||
return;
|
||||
}
|
||||
|
||||
// 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录
|
||||
// 弹出验证码
|
||||
this.$refs.verify.show()
|
||||
this.$refs.verify.show();
|
||||
},
|
||||
getCookie() {
|
||||
const username = getUsername();
|
||||
@ -229,28 +336,34 @@ export default {
|
||||
};
|
||||
},
|
||||
handleLogin(captchaParams) {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
// 设置 Cookie
|
||||
if (this.loginForm.rememberMe) {
|
||||
setUsername(this.loginForm.username)
|
||||
setPassword(this.loginForm.password)
|
||||
setRememberMe(this.loginForm.rememberMe)
|
||||
setTenantName(this.loginForm.tenantName)
|
||||
setUsername(this.loginForm.username);
|
||||
setPassword(this.loginForm.password);
|
||||
setRememberMe(this.loginForm.rememberMe);
|
||||
setTenantName(this.loginForm.tenantName);
|
||||
} else {
|
||||
removeUsername()
|
||||
removePassword()
|
||||
removeRememberMe()
|
||||
removeTenantName()
|
||||
removeUsername();
|
||||
removePassword();
|
||||
removeRememberMe();
|
||||
removeTenantName();
|
||||
}
|
||||
this.loginForm.captchaVerification = captchaParams.captchaVerification
|
||||
this.loginForm.captchaVerification =
|
||||
captchaParams.captchaVerification;
|
||||
// 发起登陆
|
||||
// console.log("发起登录", this.loginForm);
|
||||
this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => {
|
||||
this.$router.push({path: this.redirect || "/"}).catch(() => {
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$store
|
||||
.dispatch(
|
||||
this.loginForm.loginType === "sms" ? "SmsLogin" : "Login",
|
||||
this.loginForm
|
||||
)
|
||||
.then(() => {
|
||||
this.$router.push({ path: this.redirect || "/" }).catch(() => {});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
@ -261,34 +374,46 @@ export default {
|
||||
this.loading = true;
|
||||
let tenant = false;
|
||||
if (this.tenantEnable) {
|
||||
await this.$prompt('请输入租户名称', "提示", {
|
||||
await this.$prompt("请输入租户名称", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(async ({value}) => {
|
||||
await getTenantIdByName(value).then(res => {
|
||||
cancelButtonText: "取消",
|
||||
})
|
||||
.then(async ({ value }) => {
|
||||
await getTenantIdByName(value).then((res) => {
|
||||
const tenantId = res.data;
|
||||
tenant = true
|
||||
tenant = true;
|
||||
if (tenantId && tenantId >= 0) {
|
||||
setTenantId(tenantId)
|
||||
setTenantId(tenantId);
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
})
|
||||
.catch(() => {
|
||||
// 取消登录按钮 loading状态
|
||||
this.loading = false;
|
||||
|
||||
return false
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
tenant = true
|
||||
tenant = true;
|
||||
}
|
||||
if(tenant){
|
||||
if (tenant) {
|
||||
// 计算 redirectUri
|
||||
const redirectUri = location.origin + '/social-login?'
|
||||
+ encodeURIComponent('type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/")); // 重定向不能丢
|
||||
const redirectUri =
|
||||
location.origin +
|
||||
"/social-login?" +
|
||||
encodeURIComponent(
|
||||
"type=" +
|
||||
socialTypeEnum.type +
|
||||
"&redirect=" +
|
||||
(this.redirect || "/")
|
||||
); // 重定向不能丢
|
||||
// const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
|
||||
// const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
|
||||
// 进行跳转
|
||||
socialAuthRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => {
|
||||
socialAuthRedirect(
|
||||
socialTypeEnum.type,
|
||||
encodeURIComponent(redirectUri)
|
||||
).then((res) => {
|
||||
// console.log(res.url);
|
||||
window.location.href = res.data;
|
||||
});
|
||||
@ -297,10 +422,15 @@ export default {
|
||||
/** ========== 以下为升级短信登录 ========== */
|
||||
getSmsCode() {
|
||||
if (this.mobileCodeTimer > 0) return;
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
sendSmsCode(this.loginForm.mobile, this.scene, this.loginForm.uuid, this.loginForm.code).then(res => {
|
||||
this.$modal.msgSuccess("获取验证码成功")
|
||||
sendSmsCode(
|
||||
this.loginForm.mobile,
|
||||
this.scene,
|
||||
this.loginForm.uuid,
|
||||
this.loginForm.code
|
||||
).then((res) => {
|
||||
this.$modal.msgSuccess("获取验证码成功");
|
||||
this.mobileCodeTimer = 60;
|
||||
let msgTimer = setInterval(() => {
|
||||
this.mobileCodeTimer = this.mobileCodeTimer - 1;
|
||||
@ -310,18 +440,17 @@ export default {
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/assets/styles/login.scss";
|
||||
|
||||
|
||||
.oauth-login {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor:pointer;
|
||||
cursor: pointer;
|
||||
}
|
||||
.oauth-login-item {
|
||||
display: flex;
|
||||
@ -341,4 +470,14 @@ export default {
|
||||
top: 22%;
|
||||
}
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "BIAOTI";
|
||||
src: url(../assets/biaoti.ttf);
|
||||
}
|
||||
|
||||
.login-title {
|
||||
font-family: "BIAOTI";
|
||||
color: #3b49c4;
|
||||
}
|
||||
</style>
|
||||
|
@ -113,7 +113,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="bigscreen-item">
|
||||
<div class="item-title">
|
||||
<div class="item-title_1">
|
||||
<span class="title-font">告警信息</span>
|
||||
</div>
|
||||
<div class="item-content alarm-lists">
|
||||
@ -908,6 +908,23 @@ export default {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.item-title_1 {
|
||||
background: url(../../../assets/images/bigscreen/item_title_2.png)
|
||||
no-repeat center center;
|
||||
background-size: 100% 30px;
|
||||
height: 28px;
|
||||
padding-left: 20px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 3px;
|
||||
transform: skew(-10deg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.title-font {
|
||||
margin-left: 0.5%;
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.item-content {
|
||||
height: calc(100% - 28px);
|
||||
margin-top: 1%;
|
||||
|
@ -104,6 +104,7 @@ export default {
|
||||
processInstanceId: undefined,
|
||||
customerId: undefined,
|
||||
approveStatus: undefined,
|
||||
reportId: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
formRules: {
|
||||
@ -230,6 +231,7 @@ export default {
|
||||
processInstanceId: undefined,
|
||||
customerId: undefined,
|
||||
approveStatus: undefined,
|
||||
reportId: undefined,
|
||||
};
|
||||
this.cascaderValue = [];
|
||||
this.resetForm("formRef");
|
||||
|
@ -8,7 +8,7 @@
|
||||
<el-cascader
|
||||
v-model="cascaderValue"
|
||||
:options="equipCascader"
|
||||
:props="{ value: 'id',label: 'name',children: 'children',emitPath:false}"
|
||||
:props="{ value: 'id',label: 'name',children: 'children'}"
|
||||
clearable
|
||||
@change="cascaderChange"></el-cascader>
|
||||
</el-form-item>
|
||||
@ -124,6 +124,7 @@ export default {
|
||||
processInstanceId: undefined,
|
||||
customerId: undefined,
|
||||
faultType: undefined,
|
||||
reportId: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
// 表单校验
|
||||
@ -171,6 +172,7 @@ export default {
|
||||
}else {
|
||||
this.formData.equipId = null;
|
||||
}
|
||||
console.log(value)
|
||||
},
|
||||
initSelection(){
|
||||
getEquipCascader().then(res=>{
|
||||
@ -211,9 +213,11 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
async submitForm() {
|
||||
console.log(this.formData)
|
||||
// 校验主表
|
||||
await this.$refs["formRef"].validate();
|
||||
this.formData.status = 1;
|
||||
console.log(this.formData)
|
||||
await RemoteMaintenanceOrderApi.createRemoteMaintenanceOrder(this.formData)
|
||||
this.$modal.msgSuccess("提交成功");
|
||||
this.$tab.closeOpenPage({ path: "/maintenance/remote-maintenance-order" });
|
||||
@ -234,6 +238,7 @@ export default {
|
||||
processInstanceId: undefined,
|
||||
customerId: undefined,
|
||||
faultType: undefined,
|
||||
reportId: undefined,
|
||||
};
|
||||
this.cascaderValue = [];
|
||||
this.resetForm("formRef");
|
||||
|
@ -117,6 +117,7 @@ export default {
|
||||
processInstanceId: undefined,
|
||||
customerId: undefined,
|
||||
faultType: undefined,
|
||||
reportId: undefined,
|
||||
},
|
||||
reportFormData:{},
|
||||
evaluateFormData:{},
|
||||
@ -172,8 +173,8 @@ export default {
|
||||
RemoteMaintenanceOrderApi.getRemoteMaintenanceOrderRecord(this.id).then(res=>{
|
||||
this.formData = res.data;
|
||||
//加载报告
|
||||
if (this.formData.diagnoiseReportId != null){
|
||||
MaintenanceReportApi.getMaintenanceReport(this.formData.diagnoiseReportId).then(res=>{
|
||||
if (this.formData.reportId != null){
|
||||
MaintenanceReportApi.getMaintenanceReport(this.formData.reportId).then(res=>{
|
||||
this.reportFormData = res.data;
|
||||
this.evaluateFormData = res.data;
|
||||
})
|
||||
@ -213,8 +214,8 @@ export default {
|
||||
}
|
||||
//评价
|
||||
else if ("Activity_048xfy8" === taskKey){
|
||||
this.evaluateFormData.maintenanceReportId = this.formData.diagnoiseReportId;
|
||||
console.log(this.formData.diagnoiseReportId)
|
||||
this.evaluateFormData.maintenanceReportId = this.formData.reportId;
|
||||
console.log(this.formData.reportId)
|
||||
MaintenanceReportApi.submitEvaluate(this.evaluateFormData)
|
||||
console.log("评价表单提交!")
|
||||
}
|
||||
|
@ -109,9 +109,9 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="维修报告:"
|
||||
prop="diagnoiseReportId"
|
||||
prop="reportId"
|
||||
>
|
||||
<el-button v-if="detailForm.diagnoiseReportId !== null" size="mini" type="text" @click="openReport(detailForm.maintenanceOrderNo,detailForm.diagnoiseReportId)">维修报告</el-button>
|
||||
<el-button v-if="detailForm.reportId !== null" size="mini" type="text" @click="openReport(detailForm.maintenanceOrderNo,detailForm.reportId)">维修报告</el-button>
|
||||
<span v-else>无</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
Loading…
Reference in New Issue
Block a user