提交 415d4376 authored 作者: JaxBBLL's avatar JaxBBLL

fix: styles fix

上级 6b8010dd
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
this.ctx.fillStyle = "#ffffff"; this.ctx.fillStyle = "#ffffff";
this.ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight); this.ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight);
this.ctx.setStrokeStyle("#000000"); // 设置线条颜色 this.ctx.setStrokeStyle("#000000"); // 设置线条颜色
this.ctx.setLineWidth(2); // 设置线条宽度 this.ctx.setLineWidth(4); // 设置线条宽度
this.ctx.setLineCap("round"); // 设置线条端点样式 this.ctx.setLineCap("round"); // 设置线条端点样式
this.ctx.setLineJoin("round"); // 设置线条连接样式 this.ctx.setLineJoin("round"); // 设置线条连接样式
this.ctx.draw(true); // 立即绘制背景 this.ctx.draw(true); // 立即绘制背景
...@@ -75,7 +75,10 @@ export default { ...@@ -75,7 +75,10 @@ export default {
this.points.push({ x, y }); this.points.push({ x, y });
if (this.points.length >= 2) { if (this.points.length >= 2) {
this.ctx.beginPath(); this.ctx.beginPath();
this.ctx.setLineWidth(4); // 设置线条宽度
this.ctx.setLineCap("round"); // 设置线条端点样式
this.ctx.setLineJoin("round"); // 设置线条连接样式
this.ctx.moveTo( this.ctx.moveTo(
this.points[this.points.length - 2].x, this.points[this.points.length - 2].x,
this.points[this.points.length - 2].y this.points[this.points.length - 2].y
...@@ -185,7 +188,8 @@ export default { ...@@ -185,7 +188,8 @@ export default {
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 5000;
.signature-canvas { .signature-canvas {
width: 761.6px; width: 761.6px;
height: 302.4px; height: 302.4px;
......
...@@ -64,7 +64,11 @@ ...@@ -64,7 +64,11 @@
{ {
"path": "pages/inspectionContent/inspectionContentList", "path": "pages/inspectionContent/inspectionContentList",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": "",
"app-plus":{
// 将回弹属性关掉
"bounce":"none"
}
} }
}, },
// 机房巡检新页面 // 机房巡检新页面
...@@ -78,7 +82,11 @@ ...@@ -78,7 +82,11 @@
{ {
"path": "pages/shaftInspection/shaftInspectionList", "path": "pages/shaftInspection/shaftInspectionList",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": "",
"app-plus":{
// 将回弹属性关掉
"bounce":"none"
}
} }
}, },
// 井道巡检新页面 // 井道巡检新页面
......
<template> <template>
<view class="container"> <view class="container">
<uni-nav-bar <uni-nav-bar :fixed="true" background-color="rgba(214, 240, 255, 0.0)" status-bar rightWidth="240">
:fixed="true" <block slot="left">
background-color="rgba(214, 240, 255, 0.0)" <view class="" @click="back">
status-bar <text class="iconfont icon-fanhui"></text>
rightWidth="240" </view>
> </block>
<block slot="left"> <block slot="right" class="nav-right">
<view class="" @click="back"> <view class="header-buttons">
<text class="iconfont icon-fanhui"></text> <view class="button" @click="lookTable">查看样表</view>
</view> </view>
</block> </block>
<block slot="right" class="nav-right"> </uni-nav-bar>
<view class="header-buttons"> <view class="profile-section">
<view class="button" @click="lookTable">查看样表</view> <view class="profile-box">
</view> <view class="profile-left">
</block> <view class="avatar">
</uni-nav-bar> <image src="@/static/img/add-img/defaultAvatar.png" mode="aspectFit"></image>
<view class="profile-section"> </view>
<view class="profile-box"> <view class="info">
<view class="profile-left"> <view class="describe">
<view class="avatar"> <view class="username">{{ userInfo.user }}</view>
<image <view v-if="abnormalLengths" class="abnormal">存在异常 {{ abnormalLengths }}</view>
src="@/static/img/add-img/defaultAvatar.png" </view>
mode="aspectFit" <view class="describe">
></image> <view class="number">
</view> 巡检编号:
<view class="info"> <text class="value">{{ inspectionCode }}</text>
<view class="describe"> </view>
<view class="username">{{ userInfo.user }}</view> <view v-if="!!isSign" class="number">
<view v-if="abnormalLengths" class="abnormal" 巡检时间:
>存在异常 {{ abnormalLengths }}</view <text class="value">
> {{ updateDate }}
</view> </text>
<view class="describe"> </view>
<view class="number" </view>
>巡检编号:<text class="value">{{ inspectionCode }}</text></view </view>
> </view>
<view v-if="!!isSign" class="number" <!-- v-if="allIsSubmitOne" -->
>巡检时间:<text class="value"> <view class="profile-right">
{{ updateDate }} <button
</text></view v-if="!isSign"
> :disabled="!allIsSubmitOne"
</view> class="record-button"
</view> :class="{
</view> 'is-disabled': !allIsSubmitOne
<!-- v-if="allIsSubmitOne" --> }"
<view class="profile-right"> @click="toSign"
<button >
v-if="!isSign" 巡检人签字
:disabled="!allIsSubmitOne" </button>
class="record-button" <div v-else style="display: flex">
:class="{ <image class="sign-img" mode="aspectFit" :src="detailsInfo.signImg" @click="previewImage([detailsInfo.signImg], 0)"></image>
'is-disabled': !allIsSubmitOne, <button v-if="detailsInfo.synchronization != 1" class="record-button" @click="toSign">重签</button>
}" </div>
@click="toSign" <template v-if="allIsSubmitOne">
> <button v-if="detailsInfo.synchronization != 1 && isSign" class="inspection-button ml-10" @click="onSyncData(true)">数据同步</button>
巡检人签字 </template>
</button> </view>
<div v-else style="display: flex"> </view>
<image </view>
style="width: 120px; height: 40px" <view class="box" v-if="!isSign">
mode="aspectFit" <view class="bar">
:src="detailsInfo.signImg" <view class="title">巡检进度</view>
@click="previewImage([detailsInfo.signImg], 0)" <view class="dai">
></image> 待巡检
<button <text class="num">{{ listData.length - inspectionNumber }}</text>
v-if="detailsInfo.synchronization != 1" 个机房
class="record-button" </view>
@click="toSign" <view class="yi">
> 已完成
重签 <text class="num">{{ inspectionNumber }}</text>
</button> 个机房
</div> </view>
<template v-if="allIsSubmitOne"> </view>
<button </view>
v-if="detailsInfo.synchronization != 1 && isSign" <view v-if="!isSign" class="card-box">
class="inspection-button ml-10" <view class="card-row" :class="{ right: rowIndex % 2 !== 0 }" v-for="(row, rowIndex) in rows" :key="rowIndex">
@click="onSyncData(true)" <view class="card-wrapper" v-for="(card, cardIndex) in row" :key="cardIndex" @click="startDialog(card.name, card.jfType, card.value, false)">
> <view
数据同步 class="card"
</button> :class="{
</template> status1: card.status == 1,
</view> status2: card.status == 2,
</view> active: value === card.value
</view> }"
<view class="box" v-if="!isSign"> >
<view class="bar"> <view class="card-content">
<view class="title"> 巡检进度 </view> <view class="first-row">
<view class="dai"> <template v-if="card.isSubmit == 0">
待巡检 <text class="iconfont icon-weixunjian"></text>
<text class="num">{{ listData.length - inspectionNumber }}</text </template>
>个机房</view <template v-else>
> <text v-if="card.status == 0" class="iconfont icon-weixunjian"></text>
<view class="yi"> <text v-if="card.status == 1" class="iconfont icon-wancheng"></text>
已完成 <text class="num">{{ inspectionNumber }}</text <text v-if="card.status == 2" class="iconfont icon-shibai1"></text>
>个机房</view </template>
>
</view> <text class="status" v-if="card.isSubmit == 0">草稿</text>
</view> <text class="status" v-else>{{ card.statusLable }}</text>
<view v-if="!isSign" class="card-box"> </view>
<view <view class="second-row">
class="card-row" <text class="location">{{ card.name }}</text>
:class="{ right: rowIndex % 2 !== 0 }" </view>
v-for="(row, rowIndex) in rows" </view>
:key="rowIndex" <view class="spacer-image right" v-if="cardIndex < row.length - 1">
> <image v-if="inspectionNumber == 11" class="img" src="@/static/img/arr2.svg" mode="aspectFit"></image>
<view <image v-else class="img" src="@/static/img/arr1.svg" mode="aspectFit"></image>
class="card-wrapper" </view>
v-for="(card, cardIndex) in row" <view class="spacer-image bottom" v-if="rowIndex < rows.length - 1">
:key="cardIndex" <view v-if="(rowIndex == 1 && cardIndex == 0) || (rowIndex == 0 && cardIndex == 4)">
@click="startDialog(card.name, card.jfType, card.value, false)" <image v-if="inspectionNumber == 11" class="img" src="@/static/img/arr2.svg" mode="aspectFit"></image>
> <image v-else class="img" src="@/static/img/arr1.svg" mode="aspectFit"></image>
<view </view>
class="card" </view>
:class="{ </view>
status1: card.status == 1, </view>
status2: card.status == 2, </view>
active: value === card.value, </view>
}" <view v-else class="card-box detail">
> <view class="card-row" :class="{ right: rowIndex % 2 !== 0 }" v-for="(row, rowIndex) in rows" :key="rowIndex">
<view class="card-content"> <view class="card-wrapper" v-for="(card, cardIndex) in row" :key="cardIndex" @click="getDetailsItem(card.name, card.jfType, card.value)">
<view class="first-row"> <view
<template v-if="card.isSubmit == 0"> class="card"
<text class="iconfont icon-weixunjian"></text> :class="{
</template> active: value === card.value,
<template v-else> warning: card.statusLable == '巡检异常'
<text }"
v-if="card.status == 0" >
class="iconfont icon-weixunjian" <view class="card-content">
></text> <view class="first-row">
<text <image class="icon" src="@/static/img/add-img/home1.png"></image>
v-if="card.status == 1" <text class="status">{{ card.statusLable }}</text>
class="iconfont icon-wancheng" </view>
></text> <view class="second-row">
<text <text class="location">{{ card.name }}</text>
v-if="card.status == 2" </view>
class="iconfont icon-shibai1" </view>
></text> </view>
</template> </view>
</view>
<text class="status" v-if="card.isSubmit == 0">草稿</text> <detail ref="detail" :jfType="jfType" :detailsItem="detailsItem"></detail>
<text class="status" v-else>{{ card.statusLable }}</text> </view>
</view> <view v-if="!isSign" class="submit-module">
<view class="second-row"> <view class="action-btn" @click="startDialogBtn()">开始巡检</view>
<text class="location">{{ card.name }}</text> </view>
</view> <signDialog ref="signDialog" @confirm="handlePopupConfirm"></signDialog>
</view> <!-- 巡检弹窗 -->
<view class="spacer-image right" v-if="cardIndex < row.length - 1"> <startDialog ref="startDialog" :startDialogData="startDialogData" @confirm="handleStartDialog"></startDialog>
<image <Dialog v-show="isDialog" :list="propList" @close="onSyncData(false)"></Dialog>
v-if="inspectionNumber == 11" </view>
class="img"
src="@/static/img/arr2.svg"
mode="aspectFit"
></image>
<image
v-else
class="img"
src="@/static/img/arr1.svg"
mode="aspectFit"
></image>
</view>
<view class="spacer-image bottom" v-if="rowIndex < rows.length - 1">
<view
v-if="
(rowIndex == 1 && cardIndex == 0) ||
(rowIndex == 0 && cardIndex == 4)
"
>
<image
v-if="inspectionNumber == 11"
class="img"
src="@/static/img/arr2.svg"
mode="aspectFit"
></image>
<image
v-else
class="img"
src="@/static/img/arr1.svg"
mode="aspectFit"
></image>
</view>
</view>
</view>
</view> </view
></view>
<view v-else class="card-box detail">
<view
class="card-row"
:class="{ right: rowIndex % 2 !== 0 }"
v-for="(row, rowIndex) in rows"
:key="rowIndex"
>
<view
class="card-wrapper"
v-for="(card, cardIndex) in row"
:key="cardIndex"
@click="getDetailsItem(card.name, card.jfType, card.value)"
>
<view
class="card"
:class="{
active: value === card.value,
warning: card.statusLable == '巡检异常',
}"
>
<view class="card-content">
<view class="first-row">
<image
class="icon"
src="@/static/img/add-img/home1.png"
></image>
<text class="status">{{ card.statusLable }}</text>
</view>
<view class="second-row">
<text class="location">{{ card.name }}</text>
</view>
</view>
</view>
</view>
</view>
<detail ref="detail" :jfType="jfType" :detailsItem="detailsItem"></detail
></view>
<view v-if="!isSign" class="submit-module">
<view class="action-btn" @click="startDialogBtn()">开始巡检</view>
</view>
<signDialog ref="signDialog" @confirm="handlePopupConfirm"></signDialog>
<!-- 巡检弹窗 -->
<startDialog
ref="startDialog"
:startDialogData="startDialogData"
@confirm="handleStartDialog"
></startDialog>
<Dialog
v-show="isDialog"
:list="propList"
@close="onSyncData(false)"
></Dialog>
</view>
</template> </template>
<script> <script>
import moment from "moment"; import moment from 'moment';
import { import { writeInspectionData, addLog, getLogContent, LOG_TYPE_ENUM } from '@/utils/IoReadingAndWriting.js';
writeInspectionData, import signDialog from '@/components/signDialog.vue';
addLog, import detail from './components/detail.vue';
getLogContent, import startDialog from './components/dialog.vue';
LOG_TYPE_ENUM,
} from "@/utils/IoReadingAndWriting.js";
import signDialog from "@/components/signDialog.vue";
import detail from "./components/detail.vue";
import startDialog from "./components/dialog.vue";
import assRoomApi from "@/api/assRoom.js"; import assRoomApi from '@/api/assRoom.js';
import inspectApi from "@/api/inspect"; import inspectApi from '@/api/inspect';
import { sqlToData, dataToSql, getHistoryData } from "./shared"; import { sqlToData, dataToSql, getHistoryData } from './shared';
import Dialog from "@/pages/inspectionManagement/dialog.vue"; import Dialog from '@/pages/inspectionManagement/dialog.vue';
export default { export default {
components: { components: {
signDialog, signDialog,
detail, detail,
startDialog, startDialog,
Dialog, Dialog
}, },
data() { data() {
return { return {
inspectionCode: "", inspectionCode: '',
rows: [], rows: [],
baseInfo: {}, // 基础信息 baseInfo: {}, // 基础信息
inspectionNumber: 0, // 已巡检的井道数量 inspectionNumber: 0, // 已巡检的井道数量
detailsInfo: {}, // 详情 detailsInfo: {}, // 详情
detailsItem: {}, detailsItem: {},
isDisable: false, // 禁用 isDisable: false, // 禁用
isSign: false, //签名状态 isSign: false, //签名状态
isSubmit: 0, //提交状态 isSubmit: 0, //提交状态
uid: "", uid: '',
options: {}, //存储数据 options: {}, //存储数据
backValue: "", backValue: '',
all_data: [], //所有数据 all_data: [], //所有数据
jfType: "0", //机房类型 jfType: '0', //机房类型
allIsSubmitOne: false, allIsSubmitOne: false,
startDialogData: { startDialogData: {
text: [], text: [],
isList: true, isList: true,
isLast: false, isLast: false
}, //弹窗文案 }, //弹窗文案
name: "F座3楼-内环屏蔽机房", name: 'F座3楼-内环屏蔽机房',
value: "1", value: '1',
listData: [], listData: [],
isDialog: false, isDialog: false,
propList: [], propList: [],
did: "", // 最近7天数据的id did: '' // 最近7天数据的id
}; };
}, },
computed: { computed: {
userInfo() { userInfo() {
return this.$store.state.now_user || {}; return this.$store.state.now_user || {};
}, },
updateDate() { updateDate() {
return moment( return moment(Number(this.detailsInfo.updateTime || this.detailsInfo.createTime)).format('YYYY-MM-DD');
Number(this.detailsInfo.updateTime || this.detailsInfo.createTime) },
).format("YYYY-MM-DD"); abnormalLengths() {
}, return this.detailsInfo?.originData?.filter((t) => t.status === 2).length;
abnormalLengths() { }
return this.detailsInfo?.originData?.filter((t) => t.status === 2).length; },
}, onLoad(options) {
}, this.options = options;
onLoad(options) { this.backValue = this.options.backValue || '';
this.options = options; this.isDisable = options.isDisable == 1 ? true : false;
this.backValue = this.options.backValue || ""; this.uid = this.options.uid || '';
this.isDisable = options.isDisable == 1 ? true : false; this.value = this.options.value || '1';
this.uid = this.options.uid || ""; },
this.value = this.options.value || "1"; onShow() {
}, // 已经签名不触发更新,主要用于图片预览关闭后会触发onShow
onShow() { if (!this.isSign) {
// 已经签名不触发更新,主要用于图片预览关闭后会触发onShow if (this.uid) {
if (!this.isSign) { this.getRoomList().then((res) => {
if (this.uid) { this.init(res).then(() => {
this.getRoomList().then((res) => { this.getDetails(this.uid);
this.init(res).then(() => { });
this.getDetails(this.uid); });
}); } else {
}); this.getRoomList().then((res) => {
} else { // 获取7日(168小时)内最后一条巡检记录回显到页面(选项、文案、照片;异常项-不调出文案及照片)
this.getRoomList().then((res) => { getHistoryData().then((detailsInfo) => {
// 获取7日(168小时)内最后一条巡检记录回显到页面(选项、文案、照片;异常项-不调出文案及照片) if (detailsInfo) {
getHistoryData().then((detailsInfo) => { // 处理历史数据(选项、文案、照片;异常项-不调出文案及照片)
if (detailsInfo) { console.log('detailsInfo', detailsInfo);
// 处理历史数据(选项、文案、照片;异常项-不调出文案及照片)
console.log("detailsInfo", detailsInfo); this.did = detailsInfo.id;
this.did = detailsInfo.id; delete detailsInfo.id;
delete detailsInfo.inspectionCode;
delete detailsInfo.id;
delete detailsInfo.inspectionCode this.listData = this.listFormat(detailsInfo.originData);
this.detailsInfo = detailsInfo;
this.listData = this.listFormat(detailsInfo.originData);
this.detailsInfo = detailsInfo; this.inspectionNumber = detailsInfo.inspectionNumber;
this.inspectionCode = `JFXJ${moment().format('yyyyMMDDHHmmss')}${Math.floor(Math.random() * 900) + 100}`;
this.inspectionNumber = detailsInfo.inspectionNumber; this.cardsInfo = detailsInfo.originData;
this.inspectionCode = `JFXJ${moment().format("yyyyMMDDHHmmss")}${ this.isSubmit = 0;
Math.floor(Math.random() * 900) + 100 this.isSign = false;
}`;
this.cardsInfo = detailsInfo.originData; // 默认选中第一个机房
this.isSubmit = 0; this.detailsItem = detailsInfo.originData[0].details;
this.isSign = false;
if (this.detailsItem.afxt && this.detailsItem.afxt.detail && this.detailsItem.afxt.detail[2].inspectionResult === 1) {
// 默认选中第一个机房 this.detailsItem.afxt.detail = this.detailsItem.afxt.detail.slice(0, 3);
this.detailsItem = detailsInfo.originData[0].details; }
this.allIsSubmitOne = detailsInfo.originData.every((item) => item.isSubmit == 1);
if (
this.detailsItem.afxt && let group1 = this.cardsInfo.slice(0, 5);
this.detailsItem.afxt.detail && let group2 = this.cardsInfo.slice(5, 10);
this.detailsItem.afxt.detail[2].inspectionResult === 1 let group3 = this.cardsInfo.slice(10);
) { if (!this.isSign) {
this.detailsItem.afxt.detail = group2 = group2.reverse();
this.detailsItem.afxt.detail.slice(0, 3); }
} this.rows = [group1, group2, group3];
this.allIsSubmitOne = detailsInfo.originData.every(
(item) => item.isSubmit == 1 this.detailsInfo = detailsInfo;
); } else {
this.init(res);
let group1 = this.cardsInfo.slice(0, 5); }
let group2 = this.cardsInfo.slice(5, 10); });
let group3 = this.cardsInfo.slice(10); });
if (!this.isSign) { }
group2 = group2.reverse(); }
}
this.rows = [group1, group2, group3]; // this.startDialogData.text = [
// `请到“${this.name}”后;`,
this.detailsInfo = detailsInfo; // "点击“我已到达”开始巡检",
} else { // ];
this.init(res); console.log('this.startDialogData', this.startDialogData);
} this.all_data = this.$store.state.all_data;
}); },
}); methods: {
} getRoomList() {
} return assRoomApi.selectRoomList(1).then((res) => {
console.log('机房列表', res);
// this.startDialogData.text = [ return res;
// `请到“${this.name}”后;`, });
// "点击“我已到达”开始巡检", },
// ]; listFormat(baseList) {
console.log("this.startDialogData", this.startDialogData); const roomFeatureMap = {
this.all_data = this.$store.state.all_data; 1: '1',
}, 2: '0',
methods: { 3: '2'
getRoomList() { };
return assRoomApi.selectRoomList(1).then((res) => { let list = baseList.map((item, index) => {
console.log("机房列表", res); const jfType = roomFeatureMap[item.roomFeature];
return res; return {
}); id: item.id,
}, name: item.roomName,
listFormat(baseList) { value: item.dictValue,
const roomFeatureMap = { /** 只是为了映射jfType,为了兼容之前的逻辑
1: "1", * 前端用的:jfType 机房类型 0屏蔽  1汇聚  2电池间(1) 3电池间(2)
2: "0", * roomFeature 机房类型枚举:1.汇聚机房,2.屏蔽机房,3.UPS机房,4.数据机房
3: "2", */
}; jfType: item.dictValue == '11' ? '3' : jfType,
let list = baseList.map((item, index) => { isVaild: item.isVaild || false, // 校验通过
const jfType = roomFeatureMap[item.roomFeature]; status: item.status || 0,
return { statusLable: item.statusLable || '未巡检'
id: item.id, };
name: item.roomName, });
value: item.dictValue, return list;
/** 只是为了映射jfType,为了兼容之前的逻辑 },
* 前端用的:jfType 机房类型 0屏蔽  1汇聚  2电池间(1) 3电池间(2) init(baseList) {
* roomFeature 机房类型枚举:1.汇聚机房,2.屏蔽机房,3.UPS机房,4.数据机房 this.value = baseList[0].dictValue;
*/ return new Promise((resolve, reject) => {
jfType: item.dictValue == "11" ? "3" : jfType, let list = this.listFormat(baseList);
isVaild: item.isVaild || false, // 校验通过 this.listData = this.deepClone(list);
status: item.status || 0,
statusLable: item.statusLable || "未巡检", console.log('this.listData', this.listData);
};
}); const group1 = list.slice(0, 5);
return list; const group2 = list.slice(5, 10).reverse();
}, const group3 = list.slice(10);
init(baseList) { this.rows = [group1, group2, group3];
this.value = baseList[0].dictValue;
return new Promise((resolve, reject) => { if (this.uid) {
let list = this.listFormat(baseList); this.inspectionCode = this.detailsInfo.inspectionCode;
this.listData = this.deepClone(list); } else {
this.inspectionCode = `JFXJ${moment().format('yyyyMMDDHHmmss')}${Math.floor(Math.random() * 900) + 100}`;
console.log("this.listData", this.listData); }
resolve();
const group1 = list.slice(0, 5); });
const group2 = list.slice(5, 10).reverse(); },
const group3 = list.slice(10); deepClone(target) {
this.rows = [group1, group2, group3]; if (typeof target !== 'object' || target === null) {
return target;
if (this.uid) { }
this.inspectionCode = this.detailsInfo.inspectionCode;
} else { let clone;
this.inspectionCode = `JFXJ${moment().format("yyyyMMDDHHmmss")}${ if (Array.isArray(target)) {
Math.floor(Math.random() * 900) + 100 clone = [];
}`; for (let i = 0; i < target.length; i++) {
} clone[i] = this.deepClone(target[i]);
resolve(); }
}); } else {
}, clone = {};
deepClone(target) { for (const key in target) {
if (typeof target !== "object" || target === null) { if (target.hasOwnProperty(key)) {
return target; clone[key] = this.deepClone(target[key]);
} }
}
let clone; }
if (Array.isArray(target)) {
clone = []; return clone;
for (let i = 0; i < target.length; i++) { },
clone[i] = this.deepClone(target[i]); // 回显数据
} getDetails(uid) {
} else { uni.showLoading();
clone = {}; return inspectApi
for (const key in target) { .info(uid)
if (target.hasOwnProperty(key)) { .then((res) => {
clone[key] = this.deepClone(target[key]); console.log('before sqlToData', res);
} const detailsInfo = sqlToData(res);
} console.log('getDetails', detailsInfo);
}
this.listData = this.listFormat(detailsInfo.originData);
return clone;
}, this.detailsInfo = detailsInfo;
// 回显数据 this.inspectionNumber = detailsInfo.inspectionNumber;
getDetails(uid) { this.inspectionCode = detailsInfo.inspectionCode;
uni.showLoading(); this.cardsInfo = detailsInfo.originData;
return inspectApi this.isSubmit = this.detailsInfo.isSubmit;
.info(uid) this.isSign = this.detailsInfo.isSign;
.then((res) => {
console.log("before sqlToData", res); // 默认选中第一个机房
const detailsInfo = sqlToData(res); this.detailsItem = detailsInfo.originData[0].details;
console.log("getDetails", detailsInfo);
if (this.detailsItem.afxt && this.detailsItem.afxt.detail && this.detailsItem.afxt.detail[2].inspectionResult === 1) {
this.listData = this.listFormat(detailsInfo.originData); this.detailsItem.afxt.detail = this.detailsItem.afxt.detail.slice(0, 3);
}
this.detailsInfo = detailsInfo; this.allIsSubmitOne = detailsInfo.originData.every((item) => item.isSubmit == 1);
this.inspectionNumber = detailsInfo.inspectionNumber;
this.inspectionCode = detailsInfo.inspectionCode; let group1 = this.cardsInfo.slice(0, 5);
this.cardsInfo = detailsInfo.originData; let group2 = this.cardsInfo.slice(5, 10);
this.isSubmit = this.detailsInfo.isSubmit; let group3 = this.cardsInfo.slice(10);
this.isSign = this.detailsInfo.isSign; if (!this.isSign) {
group2 = group2.reverse();
// 默认选中第一个机房 }
this.detailsItem = detailsInfo.originData[0].details; this.rows = [group1, group2, group3];
console.log('this.cardsInfo', this.cardsInfo);
if (
this.detailsItem.afxt && this.isDisable = this.isDisable || detailsInfo.synchronization == 1; // 是否禁用 1:已同步数据 0: 未同步数据
this.detailsItem.afxt.detail && uni.hideLoading();
this.detailsItem.afxt.detail[2].inspectionResult === 1 })
) { .catch((error) => {
this.detailsItem.afxt.detail = this.detailsItem.afxt.detail.slice( uni.showToast({
0, title: error.msg,
3 icon: 'none',
); duration: 1000
} });
this.allIsSubmitOne = detailsInfo.originData.every( uni.hideLoading();
(item) => item.isSubmit == 1 });
); },
// 获取机房详情
getDetailsItem(location, jfType, value) {
this.activeName = location;
this.value = value;
this.detailsItem = this.detailsInfo.originData[value - 1].details;
this.jfType = this.detailsInfo.originData[value - 1].jfType;
if (this.detailsItem.afxt.detail[2].inspectionResult === 1) {
this.detailsItem.afxt.detail = this.detailsItem.afxt.detail.slice(0, 3);
}
console.log('this.detailsItem', this.detailsItem);
},
startDialogBtn(name = 'F座3楼-内环屏蔽机房', jfType = '0', value = '1') {
let item = this.findTargetObject(this.listData);
console.log('即将操作的机房', item);
this.name = this.uid ? item.name : name;
this.jfType = this.uid ? item.jfType : jfType;
this.value = this.uid ? item.value : value;
this.startDialogData.text = [`请到“${name}”后;`, '点击“我已到达”开始巡检'];
this.name = name;
this.jfType = jfType;
this.value = value;
this.$refs.startDialog.open();
},
startDialog(name = 'F座3楼-内环屏蔽机房', jfType = '0', value = '1') {
this.name = name;
this.jfType = jfType;
this.value = value;
if (!this.uid && value != '1') {
this.startDialogData.text = [`当前线路非常用巡检线路,`, `是否需要从“${this.name}”开始巡检`];
} else {
this.startDialogData.text = [`请到“${this.name}”后;`, '点击“我已到达”开始巡检'];
}
this.$refs.startDialog.open();
},
// 处理弹窗确认
handleStartDialog(summary) {
this.toShaftInspection(this.name, this.jfType, this.value);
},
// 跳转到具体的机房
toShaftInspection(name, jfType, value) {
console.log('name, 跳转到具体的机房, value', name, jfType, value);
uni.navigateTo({
url: `/pages/inspectionContent/inspectionContentNew?value=${value}&inspectionCode=${this.inspectionCode}&jfType=${jfType}&location=${name}&uid=${this.uid}&backValue=${this.backValue}&did=${this.did}`
});
},
lookTable() {
uni.navigateTo({
url: '/pages/report/sampleTable?isJF=1'
});
},
toSign() {
this.$refs.signDialog.open();
},
findTargetObject(rows) {
if (!rows || rows.length === 0) return null;
let lastNonZeroIndex = -1;
// 首先检查所有对象,记录最后一个 status 不为 0 的索引
for (let i = 0; i < rows.length; i++) {
if (rows[i].status !== 0) {
lastNonZeroIndex = i;
}
}
// 如果没有找到任何 status 不为 0 的对象,返回 null
if (lastNonZeroIndex === -1) return null;
// 计算目标对象的索引
let targetIndex = lastNonZeroIndex + 1;
// 如果最后一个非零对象是数组的最后一个元素,则从第一个对象开始检查
if (lastNonZeroIndex === rows.length - 1) {
for (let i = 0; i < rows.length; i++) {
if (rows[i].status !== 0) {
targetIndex = i + 1;
break; // 找到第一个就停止
}
}
// 如果 targetIndex 超出数组范围,则返回 null
return targetIndex < rows.length ? rows[targetIndex] : null;
}
// 正常情况:返回最后一个非零对象的下一个对象
return rows[targetIndex];
},
// 处理弹窗确认
handlePopupConfirm(signImg) {
this.detailsInfo.isSign = this.isSign = true; // 回显到文字显示区域
this.detailsInfo.signImg = signImg; // 回显到文字显示区域
this.detailsInfo.isSubmit = 1; // 提交状态
const isException = this.detailsInfo.originData.some((item) => item.status == 2);
this.detailsInfo.isException = isException ? 1 : 0; // 巡检异常
let allIsSubmitOne = this.detailsInfo.originData.every((item) => item.isSubmit === 1);
if (!allIsSubmitOne) {
// 如果有机房没有巡检完,记录是编辑状态
this.detailsInfo.synchronization = 2;
} else {
this.detailsInfo.synchronization = 0;
}
this.realSave(this.detailsInfo);
},
realSave(params, type = 'sign') {
const send = dataToSql(params);
const api = this.uid ? inspectApi.update : inspectApi.save;
const inspectionCode = this.inspectionCode || `JFXJ${moment().format('yyyyMMDDHHmmss')}${Math.floor(Math.random() * 900) + 100}`;
send.inspectionCode = inspectionCode;
let group1 = this.cardsInfo.slice(0, 5);
let group2 = this.cardsInfo.slice(5, 10);
let group3 = this.cardsInfo.slice(10);
if (!this.isSign) {
group2 = group2.reverse();
}
this.rows = [group1, group2, group3];
console.log("this.cardsInfo", this.cardsInfo);
this.isDisable = this.isDisable || detailsInfo.synchronization == 1; // 是否禁用 1:已同步数据 0: 未同步数据
uni.hideLoading();
})
.catch((error) => {
uni.showToast({
title: error.msg,
icon: "none",
duration: 1000,
});
uni.hideLoading();
});
},
// 获取机房详情
getDetailsItem(location, jfType, value) {
this.activeName = location;
this.value = value;
this.detailsItem = this.detailsInfo.originData[value - 1].details;
this.jfType = this.detailsInfo.originData[value - 1].jfType;
if (this.detailsItem.afxt.detail[2].inspectionResult === 1) {
this.detailsItem.afxt.detail = this.detailsItem.afxt.detail.slice(0, 3);
}
console.log("this.detailsItem", this.detailsItem);
},
startDialogBtn(name = "F座3楼-内环屏蔽机房", jfType = "0", value = "1") {
let item = this.findTargetObject(this.listData);
console.log("即将操作的机房", item);
this.name = this.uid ? item.name : name;
this.jfType = this.uid ? item.jfType : jfType;
this.value = this.uid ? item.value : value;
this.startDialogData.text = [
`请到“${name}”后;`,
"点击“我已到达”开始巡检",
];
this.name = name;
this.jfType = jfType;
this.value = value;
this.$refs.startDialog.open();
},
startDialog(name = "F座3楼-内环屏蔽机房", jfType = "0", value = "1") {
this.name = name;
this.jfType = jfType;
this.value = value;
if (!this.uid && value != "1") {
this.startDialogData.text = [
`当前线路非常用巡检线路,`,
`是否需要从“${this.name}”开始巡检`,
];
} else {
this.startDialogData.text = [
`请到“${this.name}”后;`,
"点击“我已到达”开始巡检",
];
}
this.$refs.startDialog.open();
},
// 处理弹窗确认
handleStartDialog(summary) {
this.toShaftInspection(this.name, this.jfType, this.value);
},
// 跳转到具体的机房
toShaftInspection(name, jfType, value) {
console.log("name, 跳转到具体的机房, value", name, jfType, value);
uni.navigateTo({
url: `/pages/inspectionContent/inspectionContentNew?value=${value}&inspectionCode=${this.inspectionCode}&jfType=${jfType}&location=${name}&uid=${this.uid}&backValue=${this.backValue}&did=${this.did}`,
});
},
lookTable() {
uni.navigateTo({
url: "/pages/report/sampleTable?isJF=1",
});
},
toSign() {
this.$refs.signDialog.open();
},
findTargetObject(rows) {
if (!rows || rows.length === 0) return null;
let lastNonZeroIndex = -1;
// 首先检查所有对象,记录最后一个 status 不为 0 的索引
for (let i = 0; i < rows.length; i++) {
if (rows[i].status !== 0) {
lastNonZeroIndex = i;
}
}
// 如果没有找到任何 status 不为 0 的对象,返回 null
if (lastNonZeroIndex === -1) return null;
// 计算目标对象的索引
let targetIndex = lastNonZeroIndex + 1;
// 如果最后一个非零对象是数组的最后一个元素,则从第一个对象开始检查
if (lastNonZeroIndex === rows.length - 1) {
for (let i = 0; i < rows.length; i++) {
if (rows[i].status !== 0) {
targetIndex = i + 1;
break; // 找到第一个就停止
}
}
// 如果 targetIndex 超出数组范围,则返回 null
return targetIndex < rows.length ? rows[targetIndex] : null;
}
// 正常情况:返回最后一个非零对象的下一个对象
return rows[targetIndex];
},
// 处理弹窗确认
handlePopupConfirm(signImg) {
this.detailsInfo.isSign = this.isSign = true; // 回显到文字显示区域
this.detailsInfo.signImg = signImg; // 回显到文字显示区域
this.detailsInfo.isSubmit = 1; // 提交状态
const isException = this.detailsInfo.originData.some(
(item) => item.status == 2
);
this.detailsInfo.isException = isException ? 1 : 0; // 巡检异常
let allIsSubmitOne = this.detailsInfo.originData.every(
(item) => item.isSubmit === 1
);
if (!allIsSubmitOne) {
// 如果有机房没有巡检完,记录是编辑状态
this.detailsInfo.synchronization = 2;
} else {
this.detailsInfo.synchronization = 0;
}
this.realSave(this.detailsInfo);
},
realSave(params, type = "sign") {
const send = dataToSql(params);
const api = this.uid ? inspectApi.update : inspectApi.save;
const inspectionCode = this.inspectionCode || `JFXJ${moment().format("yyyyMMDDHHmmss")}${
Math.floor(Math.random() * 900) + 100
}`
send.inspectionCode = inspectionCode
console.log('send', send); console.log('send', send);
api(this.uid ? { id: this.uid, ...send } : send).then((res) => { api(this.uid ? { id: this.uid, ...send } : send).then((res) => {
const logContent = getLogContent(LOG_TYPE_ENUM.sys, `巡检编号(${inspectionCode})`, '同步');
const logContent = getLogContent(LOG_TYPE_ENUM.sys, `巡检编号(${inspectionCode})`, "同步"); this.$logApi.addlog(logContent);
this.$logApi.addlog(logContent) console.log('logContent', logContent);
console.log("logContent", logContent);
uni.showToast({
uni.showToast({ title: type == 'sign' ? '签字成功' : '同步成功',
title: type == "sign" ? "签字成功" : "同步成功", icon: 'success'
icon: "success", });
});
if (!this.uid) {
if (!this.uid) { this.uid = res.lastInsertId;
this.uid = res.lastInsertId; setTimeout(() => {
setTimeout(() => { this.getDetails(res.lastInsertId);
this.getDetails(res.lastInsertId); }, 300);
}, 300); }
} });
},
}); back() {
}, if (this.backValue === 'home') {
back() { uni.navigateTo({
if (this.backValue === "home") { url: '/pages/home/home'
uni.navigateTo({ });
url: "/pages/home/home", } else {
}); uni.navigateTo({
} else { url: `/pages/inspectionManagement/index`
uni.navigateTo({ });
url: `/pages/inspectionManagement/index`, }
}); },
} previewImage(images, index) {
}, uni.previewImage({
previewImage(images, index) { current: index,
uni.previewImage({ urls: images,
current: index, success: (res) =>{
urls: images, }
}); });
}, },
onSyncData(show) { onSyncData(show) {
this.isDialog = show; this.isDialog = show;
this.propList = [ this.propList = [
{ {
...dataToSql(this.detailsInfo), ...dataToSql(this.detailsInfo),
id: this.uid, id: this.uid
}, }
]; ];
console.log("propList", this.propList); console.log('propList', this.propList);
if (!show) { if (!show) {
this.getDetails(this.uid); this.getDetails(this.uid);
} }
}, }
}, }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.uni-nav-bar-text { .uni-nav-bar-text {
height: 28.8px; height: 28.8px;
width: 28.8px; width: 28.8px;
background: #ffffff; background: #ffffff;
border: 0.32px solid rgba(224, 224, 224, 1); border: 0.32px solid rgba(224, 224, 224, 1);
border-radius: 14.4px; border-radius: 14.4px;
color: #333; color: #333;
text-align: center; text-align: center;
.iconfont { .iconfont {
font-size: 16px; font-size: 16px;
line-height: 28.8px; line-height: 28.8px;
} }
} }
.nav-right { .nav-right {
width: 192px; width: 192px;
} }
.header-buttons { .header-buttons {
display: flex; display: flex;
align-items: center; align-items: center;
margin-left: auto; margin-left: auto;
.button { .button {
width: 89.6px; width: 89.6px;
height: 28.8px; height: 28.8px;
background: #ffffff; background: #ffffff;
border-radius: 14.4px; border-radius: 14.4px;
margin-left: 12.8px; margin-left: 12.8px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 12.8px; font-size: 12.8px;
color: #000000; color: #000000;
line-height: 28.8px; line-height: 28.8px;
font-weight: 400; font-weight: 400;
text-align: center; text-align: center;
} }
} }
.container { .container {
background-image: linear-gradient(115deg, #e8f0fb 0%, #e1ebfa 100%); background-image: linear-gradient(115deg, #e8f0fb 0%, #e1ebfa 100%);
padding: 0 25.6px; padding: 0 25.6px;
height: 100vh; height: 100vh;
} }
.profile-section { .profile-section {
width: 100%; width: 100%;
margin-bottom: 12.8px; margin-bottom: 12.8px;
.profile-box { .profile-box {
background-color: #fff; background-color: #fff;
border-radius: 9.6px; border-radius: 9.6px;
padding: 12.8px 25.6px; padding: 12.8px 25.6px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.profile-left { .profile-left {
display: flex; display: flex;
align-items: center; align-items: center;
.avatar { .avatar {
position: relative; position: relative;
width: 68.8px; width: 68.8px;
height: 68.8px; height: 68.8px;
margin-right: 9.6px; margin-right: 9.6px;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.change-password { .change-password {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
text-align: center; text-align: center;
height: 17.6px; height: 17.6px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 9.6px; font-size: 9.6px;
color: #ffffff; color: #ffffff;
line-height: 16px; line-height: 16px;
font-weight: 400; font-weight: 400;
} }
} }
.info { .info {
.username { .username {
font-size: 16px; font-size: 16px;
color: #000000; color: #000000;
line-height: 22.4px; line-height: 22.4px;
font-weight: 500; font-weight: 500;
margin-bottom: 7.2px; margin-bottom: 7.2px;
margin-right: 10px; margin-right: 10px;
} }
.number { .number {
font-size: 12.8px; font-size: 12.8px;
color: #4a4a4a; color: #4a4a4a;
line-height: 22.4px; line-height: 22.4px;
font-weight: 400; font-weight: 400;
margin-right: 9.6px; margin-right: 9.6px;
.value { .value {
color: #000000; color: #000000;
} }
} }
.describe { .describe {
display: flex; display: flex;
.abnormal { .abnormal {
color: #fff; color: #fff;
line-height: 22.4px; line-height: 22.4px;
height: 22.4px; height: 22.4px;
padding: 0 8px; padding: 0 8px;
font-size: 12px; font-size: 12px;
background-color: #f55a42; background-color: #f55a42;
border-radius: 11px; border-radius: 11px;
} }
} }
} }
} }
.profile-right { .profile-right {
display: flex; display: flex;
.inspection-button { .inspection-button {
width: 89.6px; width: 89.6px;
height: 28.8px; height: 28.8px;
background-image: linear-gradient(105deg, #68acfb 0%, #3774f6 100%); background-image: linear-gradient(105deg, #68acfb 0%, #3774f6 100%);
border-radius: 14.4px; border-radius: 14.4px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 12.8px; font-size: 12.8px;
color: #ffffff; color: #ffffff;
line-height: 28.8px; line-height: 28.8px;
font-weight: 400; font-weight: 400;
margin-right: 12.8px; margin-right: 12.8px;
} }
.record-button { .record-button {
width: 115.2px; width: 115.2px;
height: 28.8px; height: 28.8px;
background: #ffffff; background: #ffffff;
border: 0.8px solid rgba(55, 116, 246, 1); border: 0.8px solid rgba(55, 116, 246, 1);
border-radius: 14.4px; border-radius: 14.4px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 12.8px; font-size: 12.8px;
color: #3774f6; color: #3774f6;
line-height: 28.8px; line-height: 28.8px;
font-weight: 400; font-weight: 400;
&.is-disabled { &.is-disabled {
color: #c7c7c7; color: #c7c7c7;
border-color: #c7c7c7; border-color: #c7c7c7;
} }
} }
} }
} }
} }
.box { .box {
background: #ffffff; background: #ffffff;
border-radius: 9.6px 9.6px 0 0; border-radius: 9.6px 9.6px 0 0;
padding: 12.8px 19.2px; padding: 12.8px 19.2px;
.bar { .bar {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
.title { .title {
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-size: 14.4px; font-size: 14.4px;
color: #000000; color: #000000;
line-height: 27.2px; line-height: 27.2px;
font-weight: 500; font-weight: 500;
} }
.dai { .dai {
background: rgba(243, 152, 0, 0.08); background: rgba(243, 152, 0, 0.08);
border-radius: 8px; border-radius: 8px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 11.2px; font-size: 11.2px;
color: #4a4a4a; color: #4a4a4a;
letter-spacing: 0; letter-spacing: 0;
text-align: right; text-align: right;
line-height: 27.2px; line-height: 27.2px;
font-weight: 400; font-weight: 400;
margin: 0 9.6px; margin: 0 9.6px;
padding: 0 9.6px; padding: 0 9.6px;
.num { .num {
color: #f39800; color: #f39800;
} }
} }
.yi { .yi {
background: rgba(55, 116, 246, 0.08); background: rgba(55, 116, 246, 0.08);
border-radius: 8px; border-radius: 8px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 11.2px; font-size: 11.2px;
color: #4a4a4a; color: #4a4a4a;
letter-spacing: 0; letter-spacing: 0;
text-align: right; text-align: right;
line-height: 27.2px; line-height: 27.2px;
font-weight: 400; font-weight: 400;
padding: 0 9.6px; padding: 0 9.6px;
.num { .num {
color: #000; color: #000;
} }
} }
} }
} }
.card-box { .card-box {
background: #ffffff; background: #ffffff;
border-radius: 0 0 9.6px 9.6px; border-radius: 0 0 9.6px 9.6px;
padding: 12.8px 19.2px; padding: 12.8px 19.2px;
height: calc(100vh - 232px - 19.2px); height: calc(100vh - 232px - 19.2px);
&.detail { &.detail {
height: calc(100vh - 200px); height: calc(100vh - 200px);
border-radius: 9.6px; border-radius: 9.6px;
overflow: auto; overflow: auto;
.card-wrapper { .card-wrapper {
width: calc((100% - 4 * 12.8px) / 5); /* 严格五等分宽度 */ width: calc((100% - 4 * 12.8px) / 5); /* 严格五等分宽度 */
.card { .card {
margin-bottom: 12.8px; margin-bottom: 12.8px;
} }
} }
} }
} }
.card-row { .card-row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
position: relative; position: relative;
width: 100%; width: 100%;
.card-wrapper { .card-wrapper {
width: calc((100% - 4 * 43.2px) / 5); /* 严格五等分宽度 */ width: calc((100% - 4 * 43.2px) / 5); /* 严格五等分宽度 */
.card { .card {
height: 51.2px; height: 51.2px;
margin-bottom: 43.2px; margin-bottom: 43.2px;
border-radius: 8px; border-radius: 8px;
background-color: rgba(242, 242, 242, 0.6); background-color: rgba(242, 242, 242, 0.6);
box-shadow: 0 1.6px 3.2px rgba(0, 0, 0, 0.1); box-shadow: 0 1.6px 3.2px rgba(0, 0, 0, 0.1);
position: relative; position: relative;
&.active { &.active {
background: #fafcff; background: #fafcff;
border: 1px solid rgba(55, 116, 246, 1); border: 1px solid rgba(55, 116, 246, 1);
box-shadow: 0px 0px 3px 0px rgba(55, 116, 246, 0.2); box-shadow: 0px 0px 3px 0px rgba(55, 116, 246, 0.2);
} }
&.warning { &.warning {
background: #fff5f4; background: #fff5f4;
&.active { &.active {
border: 1px solid #ff4a34; border: 1px solid #ff4a34;
} }
.status { .status {
color: #ff4a34 !important; color: #ff4a34 !important;
} }
} }
&.status1 { &.status1 {
background: #f3f7ff; background: #f3f7ff;
.status { .status {
color: #3774f6; color: #3774f6;
} }
} }
&.status2 { &.status2 {
background: #fff5f4; background: #fff5f4;
.status { .status {
color: #f55a42; color: #f55a42;
} }
} }
.card-content { .card-content {
padding: 6.4px; padding: 6.4px;
.first-row { .first-row {
display: flex; display: flex;
align-items: center; align-items: center;
.iconfont { .iconfont {
font-size: 12px; font-size: 12px;
margin-right: 6.4px; margin-right: 6.4px;
&.icon-weixunjian { &.icon-weixunjian {
color: #959595; color: #959595;
} }
&.icon-shibai1 { &.icon-shibai1 {
color: #ff4a34; color: #ff4a34;
} }
&.icon-wancheng { &.icon-wancheng {
color: #3774f6; color: #3774f6;
} }
} }
.status { .status {
font-size: 12px; font-size: 12px;
color: #333333; color: #333333;
} }
} }
.second-row { .second-row {
margin-top: 3.2px; margin-top: 3.2px;
padding-left: 20px; padding-left: 20px;
.location { .location {
font-size: 12px; font-size: 12px;
color: #666666; color: #666666;
} }
} }
} }
} }
.spacer-image.right { .spacer-image.right {
position: absolute; position: absolute;
right: -43.2px; right: -43.2px;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
.img { .img {
width: 30.4px; width: 30.4px;
height: 6.4px; height: 6.4px;
margin: 0 6.4px; margin: 0 6.4px;
} }
} }
} }
.spacer-image.bottom { .spacer-image.bottom {
position: absolute; position: absolute;
bottom: -33.6px; bottom: -33.6px;
left: 50%; left: 50%;
transform: translateX(-50%) rotate(90deg); transform: translateX(-50%) rotate(90deg);
.img { .img {
width: 30.4px; width: 30.4px;
height: 6.4px; height: 6.4px;
margin: 6.4px 0; margin: 6.4px 0;
} }
} }
&.right { &.right {
.card-wrapper { .card-wrapper {
.spacer-image.right { .spacer-image.right {
position: absolute; position: absolute;
left: -43.2px; left: -43.2px;
top: 50%; top: 50%;
transform: translateY(-50%) rotate(180deg); transform: translateY(-50%) rotate(180deg);
.img { .img {
width: 30.4px; width: 30.4px;
height: 6.4px; height: 6.4px;
margin: 0 6.4px; margin: 0 6.4px;
} }
} }
} }
} }
} }
.submit-module { .submit-module {
display: flex; display: flex;
justify-content: center; justify-content: center;
position: fixed; position: fixed;
gap: 16px; gap: 16px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
bottom: 25.6px; bottom: 25.6px;
.action-btn { .action-btn {
width: 145.6px; width: 145.6px;
height: 38.4px; height: 38.4px;
line-height: 38.4px; line-height: 38.4px;
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%); background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
box-shadow: 0px 8px 19.2px 0px rgba(185, 185, 185, 0.24); box-shadow: 0px 8px 19.2px 0px rgba(185, 185, 185, 0.24);
border-radius: 21.6px 19.2px 19.2px 21.6px; border-radius: 21.6px 19.2px 19.2px 21.6px;
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
text-align: center; text-align: center;
font-weight: 400; font-weight: 400;
&.complete-btn {
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
color: #ffffff;
}
}
}
&.complete-btn { .sign-img {
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%); width: 80px;
color: #ffffff; height: 28.8px;
} margin-right: 10px;
} border: 1px solid #c5c5c5;
&.no-border {
border: none;
}
} }
</style> </style>
...@@ -605,14 +605,14 @@ export default { ...@@ -605,14 +605,14 @@ export default {
this.all_data[index] = params; this.all_data[index] = params;
logContent = getLogContent( logContent = getLogContent(
LOG_TYPE_ENUM.edit, LOG_TYPE_ENUM.edit,
`${params.recordName}(${params.inspectionCode})`, `巡检编号(${params.inspectionCode})`,
"巡检模块" "巡检模块"
); );
} else { } else {
this.all_data.push(params); this.all_data.push(params);
logContent = getLogContent( logContent = getLogContent(
LOG_TYPE_ENUM.add, LOG_TYPE_ENUM.add,
`${params.recordName}(${params.inspectionCode})`, `巡检编号(${params.inspectionCode})`,
"巡检模块" "巡检模块"
); );
} }
......
...@@ -785,7 +785,6 @@ export default { ...@@ -785,7 +785,6 @@ export default {
height: 28.8px; height: 28.8px;
margin-right: 10px; margin-right: 10px;
border: 1px solid #ccc; border: 1px solid #ccc;
// border-right: none;
border-radius: 3px; border-radius: 3px;
&.no-border { &.no-border {
border: none; border: none;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论