提交 cfe5e0c6 authored 作者: 邓文彬's avatar 邓文彬

fix(月报): 页面初始化

上级 866e9232
<template>
<div class="titleModel-box">
<span :class="{ titleClass, title: isTitleNormal }"
>{{ titletext
}}
</span>
<div class="title-center">
<slot name="centerBox"></slot>
</div>
<div class="fixSize">
<slot name="rightBox"></slot>
</div>
</div>
</template>
<script>
export default {
props: {
titletext: {
type: String,
default: "",
// required: true,
},
titleClass: {
type: String,
default: "",
},
isTitleNormal: {
type: Boolean,
default: true,
},
isShowLeftTime: {
type: Boolean,
default: false,
},
},
data() {
return {
nowTime: "", // 当前时间
time: "", // 定时器
};
},
mounted() {
},
methods: {
},
beforeDestroy() {
clearInterval(this.time);
},
};
</script>
<style lang="scss" scoped>
.titleModel-box {
display: flex;
align-items: center;
font-size: 16px;
color: #000000;
font-family: "AlibabaPuHuiTi-Medium";
span {
// width: 90%;
width: max-content;
}
.detection_time {
margin-left: 16px;
border-radius: 3px;
font-family: AlibabaPuHuiTi-Regular;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
}
.title {
/* margin-bottom: 5px; */
margin-right: 20px;
position: relative;
padding-left: 12px;
line-height: 18px;
font-size: 16px;
color: #000000;
font-family: "AlibabaPuHuiTi-Medium";
}
.title::before {
content: "";
position: absolute;
top: 50%;
left: 0;
width: 4px;
height: 90%;
background: #12ccf5;
display: block;
transform: translateY(-50%);
}
.title::after {
content: "";
position: absolute;
top: 0;
left: 3px;
width: 6px;
height: 100%;
display: block;
}
}
.fixSize {
font-size: 14px;
color: #005cb8;
text-align: center;
line-height: 24px;
font-weight: 400;
cursor: pointer;
font-family: "AlibabaPuHuiTi-Regular";
}
.title-center {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
</style>
\ No newline at end of file
{ {
"name": "computedRoomPad",
"lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "lockfileVersion": 1,
"": {
"dependencies": { "dependencies": {
"js-base64": "^3.7.5", "echarts": {
"lodash": "^4.17.21", "version": "5.5.1",
"moment": "^2.30.1", "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.5.1.tgz",
"sm-crypto": "^0.3.12" "integrity": "sha512-Fce8upazaAXUVUVsjgV6mBnGuqgO+JNDlcgF79Dksy4+wgGpQB2lmYoO4TSweFg/mZITdpGHomw/cNBJZj1icA==",
}, "requires": {
"devDependencies": { "tslib": "2.3.0",
"js-md5": "^0.7.3" "zrender": "5.6.0"
} }
}, },
"node_modules/js-base64": { "js-base64": {
"version": "3.7.5", "version": "3.7.5",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.5.tgz", "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.5.tgz",
"integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==" "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA=="
}, },
"node_modules/js-md5": { "js-md5": {
"version": "0.7.3", "version": "0.7.3",
"resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz", "resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==", "integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==",
"dev": true "dev": true
}, },
"node_modules/jsbn": { "jsbn": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-1.1.0.tgz", "resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-1.1.0.tgz",
"integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
}, },
"node_modules/lodash": { "lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
}, },
"node_modules/moment": { "moment": {
"version": "2.30.1", "version": "2.30.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="
"engines": {
"node": "*"
}
}, },
"node_modules/sm-crypto": { "sm-crypto": {
"version": "0.3.12", "version": "0.3.12",
"resolved": "https://registry.npmmirror.com/sm-crypto/-/sm-crypto-0.3.12.tgz", "resolved": "https://registry.npmmirror.com/sm-crypto/-/sm-crypto-0.3.12.tgz",
"integrity": "sha512-272PBzB4PYaBdeGa41TH9ZlMGLPVRmS36Gs4FjmHwXIdihQypAbhhFWZTaa/3de69q2KfMme1M5O2W5+spAdrg==", "integrity": "sha512-272PBzB4PYaBdeGa41TH9ZlMGLPVRmS36Gs4FjmHwXIdihQypAbhhFWZTaa/3de69q2KfMme1M5O2W5+spAdrg==",
"dependencies": { "requires": {
"jsbn": "^1.1.0" "jsbn": "^1.1.0"
} }
},
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"zrender": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.6.0.tgz",
"integrity": "sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==",
"requires": {
"tslib": "2.3.0"
}
} }
} }
} }
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"js-md5": "^0.7.3" "js-md5": "^0.7.3"
}, },
"dependencies": { "dependencies": {
"echarts": "^5.5.1",
"js-base64": "^3.7.5", "js-base64": "^3.7.5",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"moment": "^2.30.1", "moment": "^2.30.1",
......
<template>
<view class="home-page-content">
<!-- 内容区 -->
<view class="card-list">
<view class="card-item">
<view class="title"
>HI,欢迎回来{{ userInfo.name }}{{ userInfo.user }}</view
>
<view class="unit">所属单位:{{ userInfo.unitName || "--" }}</view>
<view class="time">上次同步时间:{{ lastTime || "--" }}</view>
<image
class="bg-img"
mode="aspectFill"
src="@/static/img/add-img/home1.png"
></image>
</view>
<view class="card-item" @click="toSyncPage">
<view class="title2x">巡检记录</view>
<view class="count">
<text class="num">{{ syncCount }}</text
>
</view>
<view class="button-text"
><text>待同步</text>
<view class="iconfont icon-Arrow-Right"></view>
</view>
<image
class="bg-img"
mode="aspectFill"
src="@/static/img/add-img/home2.png"
></image>
</view>
<view class="card-item card-item3x" @click="toPage">
<view class="title">开始巡检</view>
<view class="button-text"
><text>进入</text>
<text class="iconfont icon-Arrow-Right"></text>
</view>
<image
class="bg-img"
mode="aspectFill"
src="@/static/img/add-img/home3.png"
></image>
</view>
</view>
<view class="seconed-title"> 最新记录 </view>
<view class="month-list">
<!-- 每月记录 -->
<view
class="month-record-item"
v-for="(item, index) in list"
:key="index"
>
<view v-if="(item.list || []).length" class="seconed-title">
{{ item.submitTime || item.time }}
</view>
<view class="inspect-list">
<InspectionItem
v-for="ele in item.list"
:key="ele.uid"
:details="ele"
/>
</view>
</view>
<Empty v-if="list.length == 0" />
</view>
</view>
</template>
<script>
import InspectionItem from "@/components/inspectionItem/index.vue";
import { getAllInspections, getDarft } from "@/request/index.js";
import Empty from "@/components/empty/index.vue";
export default {
components: {
InspectionItem,
Empty,
},
data() {
return {
isDialog: false, //
list: [], // 展示数据
all_data: [], // 所有数据
searchForm: {
// 搜索条件
},
countNum: 0, // 统计查询总数
syncCount: 0, // 待同步条数
lastTime: "", // 上次登陆时间
};
},
created() {
this.lastTime = uni.getStorageSync("last_time") || "";
// uni.getStorageSync("last_time", this.$store.state.now_user.LastSynchronizationTime || "");
},
mounted() {
this.init();
},
computed: {
userInfo() {
return this.$store.state.now_user || {};
},
},
methods: {
init() {
uni.showLoading();
getAllInspections()
.then((res) => {
this.all_data = res;
this.getList();
uni.hideLoading();
})
.catch((error) => {
if (0 == error.code) {
uni.showToast({
title: error.msg,
icon: "none",
duration: 1000,
});
}
this.all_data = [];
uni.hideLoading();
});
},
toSyncPage() {
this.$emit("changeTab", {}, 2);
},
// 待同步数据
initSyncCount() {
this.syncCount = (this.all_data || []).filter(
(item) => item.synchronization == 0
).length;
},
// 初始化
getList() {
const all_data = this.all_data || [];
const tempAllData = {};
all_data.forEach((item) => {
const val = tempAllData[item.submitMonth] || [];
if (val.length) {
tempAllData[item.submitMonth].push(item);
} else {
tempAllData[item.submitMonth] = [item];
}
});
const keys = Object.keys(tempAllData);
const { inspectionTime = [] } = this.searchForm;
const startTime = inspectionTime[0];
const endTime = inspectionTime[1];
// 第一步: 筛选有效的时间范围
const timeFrame = keys.filter((key) => {
if (!inspectionTime.length) {
return true;
} else {
return (
new Date(startTime).getTime() <= new Date(key).getTime() &&
new Date(key).getTime() <= new Date(endTime).getTime()
);
}
});
// 第二步: 根据搜索条件过滤
const list = timeFrame.map((key) => {
return {
time: key,
list: this.coverData(tempAllData[key]),
};
});
this.countNum = 0;
list.forEach((item) => {
this.countNum += item.list.length;
});
this.list = list;
this.initSyncCount();
},
coverData(arr = []) {
const {
isException = "",
inspectionType = "",
synchronization = "",
} = this.searchForm;
return arr.filter((item) => {
return (
(!isException || item.isException == isException) &&
(!inspectionType || item.inspectionType == inspectionType) &&
(!synchronization || item.synchronization == synchronization)
);
});
},
change(e) {
this.searchForm = e;
this.init();
},
toIndex() {
uni.navigateTo({
url: "/pages/index/index",
});
},
toPage() {
uni.showLoading();
getDarft()
.then((res) => {
const darf_data = res || {};
if (darf_data.inspectionType == 1) {
uni.navigateTo({
url: `/pages/inspectionContent/inspectionContent?isDarf=1`,
});
} else if (darf_data.inspectionType == 2) {
uni.navigateTo({
url: `/pages/shaftInspection/shaftInspection?isDarf=1`,
});
} else {
uni.navigateTo({
url: "/pages/inspection/inspFirst",
});
}
uni.hideLoading();
})
.catch((error) => {
if (error.code == 0) {
uni.showToast({
title: error.msg,
icon: "none",
duration: 1000,
});
}
uni.navigateTo({
url: "/pages/inspection/inspFirst",
});
uni.hideLoading();
});
},
},
};
</script>
<style scoped lang="less">
.home-page-content {
.card-list {
display: flex;
.card-item {
border-radius: 12px;
flex: 1;
margin-right: 16px;
height: 166px;
box-sizing: border-box;
padding: 32px 0 24px 12px;
position: relative;
overflow: hidden;
&:nth-of-type(1) {
background-image: linear-gradient(-67deg, #dbeeff 6%, #f5fbff 100%);
}
&:nth-of-type(2) {
background-image: linear-gradient(108deg, #f2f6ff 0%, #e6eeff 92%);
}
&:nth-of-type(3) {
background-image: linear-gradient(-66deg, #dbeeff 6%, #f5fbff 100%);
}
.bg-img {
position: absolute;
right: 0px;
bottom: 0px;
width: 110px;
height: 130px;
z-index: 1;
}
.title {
font-size: 18px;
color: #000000;
font-weight: bold;
margin-bottom: 24px;
}
.unit {
margin-bottom: 16px;
}
.unit,
.time {
font-size: 12px;
color: #7c7c7c;
font-weight: 400;
z-index: 10;
}
.title2x {
font-size: 14px;
color: #4a4a4a;
font-weight: 400;
margin-bottom: 8px;
}
.count {
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
.num {
margin-right: 2px;
font-size: 32px;
color: #000000;
line-height: 40px;
font-weight: bold;
}
}
.button-text {
display: flex;
align-items: center;
font-size: 14px;
color: #3774f6;
font-weight: 400;
}
}
.card-item3x {
padding-top: 40px;
}
}
.seconed-title {
margin: 16px 0;
font-size: 18px;
color: #000000;
font-weight: bold;
}
.month-list {
height: calc(100vh - 166px - 25px - 16px - 16px - 20px);
overflow: auto;
.seconed-title {
margin-top: 0;
margin-bottom: 5px;
}
.month-record-item {
&:last-of-type {
margin: 0;
}
.inspect-list {
display: flex;
flex-wrap: wrap;
}
}
}
}
</style>
...@@ -7,20 +7,7 @@ ...@@ -7,20 +7,7 @@
<text class="text">{{ userName }}</text> <text class="text">{{ userName }}</text>
</view> </view>
<view class="tab-list">
<view
v-for="(item, index) in tabList"
:key="item.text"
class="tab-item"
@click="tabClick(item, index)"
:class="activeTabIndex == index ? 'active-tab' : ''"
>
<view class="icon-item"
><text class="iconfont" :class="item.defaultIcon"></text>
</view>
<text class="text">{{ item.text }}</text>
</view>
</view>
<view class="button-group"> <view class="button-group">
<view v-if="isAdmin" class="log-button" @click="lookLog">操作日志</view> <view v-if="isAdmin" class="log-button" @click="lookLog">操作日志</view>
...@@ -33,15 +20,8 @@ ...@@ -33,15 +20,8 @@
<!-- 内容区 --> <!-- 内容区 -->
<view class="right-container"> <view class="right-container">
<!-- 首页 -->
<Content v-if="activeTabIndex == 0" @changeTab="tabClick" />
<!-- 杭州内网机房巡检 -->
<InspectionManagement v-if="activeTabIndex == 1" />
<!-- 同步管理 -->
<SynchronousManagement v-if="activeTabIndex == 2" />
<MonthReport />
<RouterView /> <RouterView />
</view> </view>
...@@ -59,39 +39,17 @@ ...@@ -59,39 +39,17 @@
</template> </template>
<script> <script>
import InspectionManagement from "@/pages/inspectionManagement/index.vue";
import SynchronousManagement from "@/pages/synchronousManagement/index.vue";
import OperLog from "@/pages/index/operLog.vue"; import OperLog from "@/pages/index/operLog.vue";
import MonthReport from "@/pages/monthReport/index.vue"
import Content from "./content.vue";
export default { export default {
components: { components: {
Content,
InspectionManagement,
SynchronousManagement,
OperLog, OperLog,
MonthReport
}, },
data() { data() {
return { return {
activeTabIndex: 0,
tabList: [
{
defaultIcon: "iconfont icon-yingyongyewuguanli1",
isActive: true,
text: "主页",
},
{
defaultIcon: "iconfont icon-Inspection",
isActive: false,
text: "巡检管理",
},
{
defaultIcon: "iconfont icon-a-ActivityConfiguration",
isActive: false,
text: "同步管理",
},
],
userName: this.$store.state.now_user.user, userName: this.$store.state.now_user.user,
}; };
}, },
...@@ -101,9 +59,7 @@ export default { ...@@ -101,9 +59,7 @@ export default {
}, },
}, },
onLoad(options = {}) { onLoad(options = {}) {
// options就是路由参数,它是一个对象
// this.tabIndex = ;
this.tabClick({}, options.tabIndex || 0);
}, },
watch: { watch: {
...@@ -122,7 +78,6 @@ export default { ...@@ -122,7 +78,6 @@ export default {
url: "/pages/index/operLog", url: "/pages/index/operLog",
}); });
// this.activeTabIndex = 4
}, },
//退出--弹出对话框 //退出--弹出对话框
...@@ -148,10 +103,6 @@ export default { ...@@ -148,10 +103,6 @@ export default {
this.$refs.inputDialog2.open(); this.$refs.inputDialog2.open();
}, },
// 切换tab
tabClick(item, index) {
this.activeTabIndex = index;
},
toIndex() { toIndex() {
uni.navigateTo({ uni.navigateTo({
......
<template>
<view class="container">
<!-- 导航栏 -->
<!-- <uni-nav-bar
dark
:fixed="true"
background-color="#5474e8"
status-bar
left-text="返回"
title="杭州内网监管在线"
left-icon="left"
@clickLeft="back"
>
</uni-nav-bar> -->
<uni-nav-bar
:fixed="true"
background-color="rgba(214, 240, 255, 0.0)"
status-bar
rightWidth="300"
>
<block slot="left">
<view class="uni-nav-bar-text" @click="back">
<text class="iconfont icon-Arrow-Left"></text
></view>
</block>
</uni-nav-bar>
<view class="content">
<!-- 占位---不可删除 -->
<view class="seize-seat"> </view>
<view class="main box-shaow-box">
<view class="content_header">机房巡检</view>
<uni-forms
class="formClass"
:modelValue="formData"
label-width="100px"
ref="forms"
label-align="right"
>
<uni-forms-item label="巡检类型" required>
<uni-data-checkbox
mode="tag"
v-model="formData.inspectionType"
@change="change"
:localdata="rooms"
/>
</uni-forms-item>
<uni-forms-item label="巡检编号">
<view class="text">{{ formData.inspectionCode }}</view>
</uni-forms-item>
<uni-forms-item label="记录名称">
<view class="text">{{ formData.recordName }}</view>
</uni-forms-item>
<uni-forms-item label="巡检时间">
<view class="text">{{ formData.inspectionTime }}</view>
</uni-forms-item>
<uni-forms-item label="巡检人">
<view class="text">{{ formData.inspectionBy }}</view>
</uni-forms-item>
</uni-forms>
<view class="btn-class" @tap="clickNext"> 开始巡检 </view>
</view>
</view>
</view>
</template>
<script>
import getDateTime from "@/common/getdateTime.js";
import moment from "moment";
export default {
data() {
return {
rooms: [
{
text: "机房巡检",
value: "1",
},
{
text: "井道巡检",
value: "2",
},
],
formData: {
inspectionType: "",
inspectionCode: "",
recordName: "",
inspectionTime: "",
inspectionBy: "",
},
};
},
onLoad() {},
mounted() {
this.init();
},
methods: {
init() {
this.formData = {
inspectionType: "1",
inspectionCode: `JFXJ${moment().format("yyyyMMDDHHmmss")}${(Math.floor(Math.random() * 900) + 100)}`,
recordName: `${moment().format("yyyyMMDD")}-机房巡检记录`,
inspectionTime: moment().format("yyyy-MM-DD HH:mm"),
inspectionBy: this.$store.state.now_user.user,
inspectionById: this.$store.state.now_user.userId,
createByName: this.$store.state.now_user.user,
isException: "", // 是否有异常
position: "", // 位置
isSubmit: "", // 0 是草稿态; 1 是正式提交
conclusion: "", //结论
fillCheck: "", // tab字典的value值, 校验通过的
creatTime: `${new Date().getTime()}`,
items: [
// {
// "itemCode": "1", // 检查项
// "measuredData": "2,3", // 异常的楼层
// "inspectionResult": "1" // 检查项的结果, 1是异常 0 是正常
// },
],
};
},
change(val) {
this.formData.recordName = `${moment().format("yyyyMMDD")}-${
val.detail.data.text
}`;
this.formData.inspectionType = val.detail.value;
const inspectionCode = `${
val.detail.value == 1 ? "JFXJ" : "JDXJ"
}${moment().format("yyyyMMDDHHmmss")}`;
this.formData.inspectionCode = inspectionCode + (Math.floor(Math.random() * 900) + 100);
},
back() {
uni.navigateBack();
},
showRoomName(val) {
let res = "";
switch (val) {
case "1":
res = "核密机房";
break;
case "2":
res = "普密机房";
break;
case "3":
res = "传输机房";
break;
case "4":
res = "机要值班室";
break;
case "5":
res = "UPS机房";
break;
case "6":
res = "其他区域";
break;
}
return res;
},
clickNext() {
this.$store.commit("SET_TEMP_DATA", this.formData); // 缓存[巡检信息]
if (this.formData.inspectionType == 2) {
// 井道巡检
uni.redirectTo({
url: "/pages/shaftInspection/shaftInspection",
success() {
uni.hideLoading();
},
});
} else {
// 机房巡检
uni.redirectTo({
url: "/pages/inspectionContent/inspectionContent",
success() {
uni.hideLoading();
},
});
}
},
},
};
</script>
<style scoped lang="less">
.container {
width: 100%;
height: 100%;
background-image: linear-gradient(
90deg,
#e9f7fe 0%,
#dceffe 40%,
#d5ebfd 66%,
#c9e8fe 100%
);
.content {
margin-top: -44px;
width: 100%;
height: calc(100vh - var(--status-bar-height) - 50px);
background-size: 100% 40rpx;
background-repeat: no-repeat;
.seize-seat {
height: 50px;
width: 100%;
background-image: linear-gradient(
90deg,
#e9f7fe 0%,
#dceffe 40%,
#d5ebfd 66%,
#c9e8fe 100%
);
}
.main {
width: 100%;
height: 100%;
background-color: #ffffff;
padding: 20px 24px;
position: relative;
.uni-forms-item {
padding: 6px 0;
border-bottom: 1px solid #eee;
margin-bottom: 0px;
}
.content_header {
font-size: 18px;
color: #000000;
line-height: 26px;
font-weight: 500;
}
.formClass {
margin-top: 18px;
}
.btn-class {
width: 240px;
height: 48px;
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
box-shadow: 0px 10px 24px 0px rgba(51, 104, 246, 0.24);
border-radius: 27px;
font-size: 20px;
color: #ffffff;
text-align: center;
font-weight: 400;
text-align: center;
line-height: 48px;
position: absolute;
bottom: 32px;
left: 50%;
transform: translateX(-50%);
}
}
}
/deep/ .uni-forms-item__content {
display: flex;
align-items: center;
}
// 导航栏样式
.uni-nav-bar-text {
height: 36px;
width: 36px;
background: #ffffff;
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 18px;
border-radius: 50%;
color: #333;
text-align: center;
.iconfont {
font-size: 20px;
line-height: 36px;
}
}
}
</style>
<template>
<view class="gather-dataCenter">
<uni-forms
v-for="(item, parentIndex) in list"
:key="item.dictLabel"
:modelValue="item"
label-width="82px"
class="inspection-item"
:ref="`forms_${parentIndex}`"
:rules="rules"
>
<uni-forms-item class="row-item" label="巡检项">
<view class="text">{{ item.dictLabel }}</view>
</uni-forms-item>
<uni-forms-item required class="row-item" label="巡检结论">
<view class="tags">
<view
v-for="(ele, eleIndex) in item.resultArr"
class="tag"
:key="eleIndex"
@click="tagClick(parentIndex, eleIndex, ele.isActive)"
:class="ele.isActive ? 'active-tag' : ''"
>{{ ele.label }}
</view>
</view>
</uni-forms-item>
<!-- 异常状态时显示 -->
<uni-forms-item
required
class="row-item"
label="异常定位"
name="measuredDataArr"
v-if="item.inspectionResult == 1"
>
<view class="tags">
<view
v-for="(ele, eleIndex) in item.postionList"
class="tag"
@click="postionChange(parentIndex, eleIndex, ele.isActive)"
:class="
item.measuredDataArr.includes(ele.dictValue) ? 'active-tag' : ''
"
>{{ ele.dictLabel }}
</view>
</view>
</uni-forms-item>
<!-- 异常状态时显示 -->
<uni-forms-item
v-if="item.inspectionResult == 1"
required
class="row-item note-item"
label="情况摘要"
name="notes"
>
<textarea
type="text"
:disabled="isDisable"
v-model="item.notes"
placeholder="请输入内容"
/>
<view class="qucik-content">
<view v-if="!isDisable" class="quick-input"> 快捷输入 </view>
<view v-if="!isDisable">
<text
class="qucik-text"
v-for="quickItem in quickTextList"
:key="quickItem.text"
@click="clickQuick(item, quickItem)"
>{{ quickItem.text }}</text
>
</view>
</view>
</uni-forms-item>
</uni-forms>
</view>
</template>
<script>
import {
pad_1_3_inspection_items,
pad_1_3_inspection_position,
pad_room_type,
} from "@/utils/dict.js";
/**
* 电池间
*/
export default {
props: {
isDisable: {
type: Boolean,
},
},
data() {
return {
list: [],
rules: {
// 对notes字段进行必填验证
notes: {
rules: [
{
required: true,
errorMessage: "请输入情况摘要",
},
],
},
measuredDataArr: {
rules: [
{
required: true,
errorMessage: "请选择",
},
],
},
},
roomTypeLabel: "电池间巡检", // 用于获取类型值
quickTextList: [
{
text: "有异常",
},
{
text: "已处理",
},
{
text: "需派单维修",
},
],
};
},
mounted() {
this.coverlist();
},
methods: {
// tag 点击事件
tagClick(parentIndex, eleIndex, isActive) {
if (isActive || this.isDisable) {
return;
}
this.list[parentIndex].resultArr.forEach((element) => {
element.isActive = false;
});
const item = this.list[parentIndex].resultArr[eleIndex];
item.isActive = !isActive;
this.list[parentIndex].resultArr[eleIndex] = item;
// 赋值数据
this.list[parentIndex].inspectionResult = item.value; // 记录结论
this.list[parentIndex].postionList.forEach(
(item) => (item.isActive = false)
);
this.list[parentIndex].measuredDataArr = []; // 重置异常位置
this.list[parentIndex].notes = ""; // 重置摘要信息
},
// tag 点击事件
postionChange(parentIndex, eleIndex, isActive) {
if (this.isDisable) {
return;
}
const postionList = this.list[parentIndex].postionList;
const item = postionList[eleIndex];
item.isActive = !isActive;
postionList[eleIndex] = item;
this.list[parentIndex].postionList = postionList;
this.list[parentIndex].measuredDataArr = postionList
.filter((item) => item.isActive)
.map((item) => item.dictValue);
},
// 数据结构重组
coverlist() {
const roomTypeLabel = this.roomTypeLabel;
const roomType = pad_room_type.rows.filter(
(item) => item.dictLabel == roomTypeLabel
)[0].dictValue;
const temp = pad_1_3_inspection_items.rows.map((item) => {
return {
// ...item,
dictLabel: item.dictLabel,
dictValue: item.dictValue,
notes: "", // 情况摘要
inspectionResult: 0, // 异常
itemCode: item.dictValue, // 检查项 如:门禁
roomType, // 机房类型
resultArr: [
{
value: 0,
label: "正常",
isActive: true,
},
{
value: 1,
label: "异常",
},
],
measuredData: "", // 逗号分隔字符串
measuredDataArr: [], // 前端本地使用
postionList: pad_1_3_inspection_position.rows.map((item) => {
return {
...item,
};
}),
};
});
this.list = temp;
},
// 回显数据
setForm(componentData) {
this.list = componentData;
},
// 获取数据
getForm() {
const temp = this.list.map((item) => {
return {
...item,
measuredData: item.measuredDataArr.join(","),
};
});
return temp;
},
// 校验数据 所有表单
async vaildForm() {
const temp = this.list.map((item, index) => {
return this.$refs[`forms_${index}`][0]
.validate()
.then(() => {
return {
result: true,
index,
};
})
.catch(() => {
return {
result: false,
item,
};
});
});
return Promise.all(temp).then((res) => {
const allVaildList = res.filter((item) => item.result);
const formData = this.getForm();
return {
vaild: this.list.length == allVaildList.length,
formData,
};
});
},
clickQuick(item, quickItem) {
item.notes = `${item.notes}${quickItem.text}`;
},
},
};
</script>
<style lang="less" scoped>
.gather-dataCenter {
.inspection-item {
border: 1px solid;
margin-bottom: 12px;
background: #ffffff;
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 12px;
padding: 24px 24px 8px 24px;
.text {
font-size: 16px;
color: #000000;
line-height: 24px;
font-weight: bold;
}
.row-item {
border-bottom: 1px solid #eee;
// border: 1px solid;
padding-bottom: 18px;
margin-bottom: 12px;
&:last-of-type {
border-bottom: none;
margin-bottom: 0;
}
.tags {
display: flex;
align-items: center;
.tag {
background: #f2f3f5;
width: 55px;
height: 36px;
border-radius: 10px;
text-align: center;
line-height: 36px;
margin-right: 10px;
font-size: 14px;
color: #4a4a4a;
text-align: center;
font-weight: 400;
}
.active-tag {
background: #3774f6;
color: #fff;
}
}
}
}
.note-item {
textarea{
width: 100%;
min-height: 96px;
background: #f7f7f7;
border-radius: 1px;
font-size: 14px;
color: #4a4a4a;
padding: 16px;
font-weight: 400;
}
.qucik-content {
display: flex;
align-items: center;
.quick-input {
margin: 16px 18px 18px 0 ;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
}
.qucik-text {
display: inline-block;
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 8px;
padding: 0 10px;
height: 32px;
font-size: 12px;
color: #4a4a4a;
line-height: 20px;
font-weight: 400;
margin-right: 12px;
line-height: 32px;
text-align: center;
}
}
}
/deep/ .uni-forms-item__content {
display: flex;
align-items: center;
}
.note-item {
/deep/ .uni-forms-item__content {
display: block;
}
}
}
</style>
<template>
<view class="gather-dataCenter">
<uni-forms
:modelValue="form"
label-width="82px"
class="inspection-item"
ref="forms"
:rules="rules"
label-position="top"
>
<uni-forms-item
class="row-item"
required
label="机房值班"
name="roomWatch"
>
<textarea
class="textarea"
v-model="form.roomWatch"
placeholder-style="color:#C7C7C7"
placeholder="请输入需求文字"
:disabled="isDisable"
/>
<view >
<text v-if="!isDisable" class="quick-input"> 快捷输入 </text>
<text v-if="!isDisable">
<text
class="qucik-text"
v-for="item in quickTextList"
:key="item.text"
@click="clickQuick(item)"
>{{ item.text }}</text
>
</text>
</view>
</uni-forms-item>
</uni-forms>
</view>
</template>
<script>
import { pad_room_type } from "@/utils/dict.js";
/**
* 机房值班
*/
export default {
props: {
isDisable: {
type: Boolean,
},
},
data() {
return {
list: [],
rules: {
// 对notes字段进行必填验证
roomWatch: {
rules: [
{
required: true,
errorMessage: "请输入内容",
},
],
},
},
form: {
roomWatch: "", // 机房值班
},
quickTextList: [
{
text: "进出总人数:",
},
{
text: "访客记录:",
},
{
text: "有",
},
{
text: "无",
},
],
roomTypeLabel: "机房值班", // 用于获取类型值
};
},
mounted() {
const roomTypeLabel = this.roomTypeLabel;
const roomType = pad_room_type.rows.filter(
(item) => item.dictLabel == roomTypeLabel
)[0].dictValue;
this.form.roomType = roomType;
},
methods: {
// 回显数据
setForm(componentData) {
this.form = componentData;
},
clickQuick(item) {
this.form.roomWatch = `${this.form.roomWatch}${item.text}`;
},
// 校验数据 所有表单
async vaildForm() {
return new Promise((resolve, reject) => {
this.$refs.forms
.validate()
.then((res) => {
resolve({
vaild: true,
formData: this.form,
});
})
.catch((error) => {
resolve({
vaild: false,
formData: this.form,
});
});
});
},
},
};
</script>
<style lang="less" scoped>
.gather-dataCenter {
.inspection-item {
border: 1px solid;
margin-bottom: 12px;
background: #ffffff;
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 12px;
padding: 24px 24px 8px 24px;
.text {
font-size: 16px;
color: #000000;
line-height: 24px;
font-weight: bold;
}
.textarea {
width: 100%;
min-height: 96px;
background: #f7f7f7;
border-radius: 12px;
font-size: 14px;
color: #4a4a4a;
padding: 16px;
font-weight: 400;
margin-bottom: 14px;
}
.quick-input {
margin: 16px 18px 18px 0;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
}
.qucik-text {
display: inline-block;
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 8px;
padding: 0 10px;
height: 32px;
font-size: 12px;
color: #4a4a4a;
line-height: 20px;
font-weight: 400;
margin-right: 12px;
line-height: 32px;
text-align: center;
}
}
// /deep/ .uni-forms-item__content {
// display: flex;
// align-items: center;
// }
}
</style>
<template>
<view class="gather-dataCenter">
<uni-forms
:modelValue="form"
label-width="82px"
class="inspection-item"
ref="forms"
:rules="rules"
label-position="top"
>
<uni-forms-item
class="row-item"
required
label="值班交接"
name="dutyHandover"
>
<textarea
class="textarea"
v-model="form.dutyHandover"
placeholder-style="color:#C7C7C7"
placeholder="请输入"
:disabled="isDisable"
/>
<text v-if="!isDisable" class="quick-input"> 快捷输入 </text>
<text v-if="!isDisable">
<text
class="qucik-text"
v-for="item in quickTextList"
:key="item.text"
@click="clickQuick(item)"
>{{ item.text }}</text
>
</text>
</uni-forms-item>
<view class="user-info">
<uni-forms-item class="row-item" label="交班人">
<text class="text">{{ form.handoverPerson }}</text>
</uni-forms-item>
<uni-forms-item
class="row-item"
required
label="接班人"
name="successor"
>
<uni-easyinput
:disabled="isDisable"
type="text"
v-model="form.successor"
placeholder="请输入"
/>
</uni-forms-item>
</view>
</uni-forms>
</view>
</template>
<script>
import { pad_room_type } from "@/utils/dict.js";
/**
* 值班交接
*/
export default {
props: {
isDisable: {
type: Boolean,
},
},
data() {
return {
rules: {
// 对notes字段进行必填验证
dutyHandover: {
rules: [
{
required: true,
errorMessage: "请输入内容",
},
],
},
successor: {
rules: [
{
required: true,
errorMessage: "请输入内容",
},
],
},
},
form: {
dutyHandover: "", // 机房值班
handoverPerson: "", //交班人
successor: "", // 接班人
},
quickTextList: [
{
text: "未完成事项:",
},
{
text: "有",
},
{
text: "无",
},
],
roomTypeLabel: "值班交接", // 用于获取类型值
};
},
mounted() {
this.init();
},
methods: {
init() {
const roomTypeLabel = this.roomTypeLabel;
const roomType = pad_room_type.rows.filter(
(item) => item.dictLabel == roomTypeLabel
)[0].dictValue;
this.form.roomType = roomType;
this.form.handoverPerson = this.$store.state.now_user.user;
},
// 回显数据
setForm(componentData) {
this.form = componentData;
},
clickQuick(item) {
this.form.dutyHandover = `${this.form.dutyHandover}${item.text}`;
},
// 校验数据 所有表单
async vaildForm() {
return new Promise((resolve, reject) => {
this.$refs.forms
.validate()
.then((res) => {
resolve({
vaild: true,
formData: this.form,
});
})
.catch((error) => {
resolve({
vaild: false,
formData: this.form,
});
});
});
},
},
};
</script>
<style lang="less" scoped>
.gather-dataCenter {
.inspection-item {
border: 1px solid;
margin-bottom: 12px;
background: #ffffff;
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 12px;
padding: 24px 24px 8px 24px;
.text {
font-size: 16px;
color: #000000;
line-height: 24px;
font-weight: bold;
}
.textarea {
width: 100%;
min-height: 96px;
background: #f7f7f7;
border-radius: 12px;
font-size: 14px;
color: #4a4a4a;
padding: 16px;
font-weight: 400;
margin-bottom: 14px;
}
.quick-input {
margin: 16px 18px 18px 0 ;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
}
.qucik-text {
display: inline-block;
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 8px;
// width: 72px;
padding: 0 10px;
height: 32px;
font-size: 12px;
color: #4a4a4a;
line-height: 20px;
font-weight: 400;
margin-right: 12px;
line-height: 32px;
text-align: center;
}
}
.user-info {
display: flex;
.uni-forms-item {
flex: 1;
display: flex;
flex-direction: row;
}
}
// /deep/ .uni-forms-item__content {
// display: flex;
// align-items: center;
// }
}
</style>
<template>
<view class="gather-dataCenter">
<uni-forms
v-for="(item, parentIndex) in list"
:key="item.dictLabel"
:modelValue="item"
label-width="82px"
class="inspection-item"
:ref="`forms_${parentIndex}`"
:rules="rules"
>
<uni-forms-item class="row-item" label="巡检项" name="name">
<view class="text">{{ item.dictLabel }}</view>
</uni-forms-item>
<uni-forms-item required class="row-item" label="巡检结论" name="name">
<view class="tags">
<view
v-for="(ele, eleIndex) in item.resultArr"
class="tag"
:key="eleIndex"
@click="tagClick(parentIndex, eleIndex, ele.isActive)"
:class="ele.isActive ? 'active-tag' : ''"
>{{ ele.label }}
</view>
</view>
</uni-forms-item>
<!-- 异常状态时显示 -->
<uni-forms-item
required
class="row-item"
label="异常定位"
name="measuredDataArr"
v-if="item.inspectionResult == 1"
>
<view class="tags">
<view
v-for="(ele, eleIndex) in item.postionList"
class="tag"
:key="eleIndex"
@click="postionChange(parentIndex, eleIndex, ele.isActive)"
:class="
item.measuredDataArr.includes(ele.dictValue) ? 'active-tag' : ''
"
>{{ ele.dictLabel }}
</view>
</view>
</uni-forms-item>
<!-- 异常状态时显示 -->
<uni-forms-item
v-if="item.inspectionResult == 1"
required
class="row-item note-item"
label="情况摘要"
name="notes"
>
<textarea
type="text"
:disabled="isDisable"
v-model="item.notes"
placeholder="请输入内容"
/>
<view class="qucik-content">
<view v-if="!isDisable" class="quick-input"> 快捷输入 </view>
<view v-if="!isDisable">
<text
class="qucik-text"
v-for="quickItem in quickTextList"
:key="quickItem.text"
@click="clickQuick(item, quickItem)"
>{{ quickItem.text }}</text
>
</view>
</view>
</uni-forms-item>
</uni-forms>
</view>
</template>
<script>
import {
pad_1_1_inspection_items,
pad_1_1_inspection_position,
pad_room_type,
} from "@/utils/dict.js";
/**
* 汇集机房
*/
export default {
props: {
isDisable: {
type: Boolean,
},
},
data() {
return {
list: [],
rules: {
// 对notes字段进行必填验证
notes: {
rules: [
{
required: true,
errorMessage: "请输入情况摘要",
},
],
},
measuredDataArr: {
rules: [
{
required: true,
errorMessage: "请选择",
},
],
},
},
roomTypeLabel: "汇聚机房巡检", // 用于获取类型值
quickTextList: [
{
text: "有异常",
},
{
text: "已处理",
},
{
text: "需派单维修",
},
],
};
},
mounted() {
this.coverlist();
},
methods: {
// tag 点击事件
tagClick(parentIndex, eleIndex, isActive) {
if (isActive || this.isDisable) {
return;
}
this.list[parentIndex].resultArr.forEach((element) => {
element.isActive = false;
});
const item = this.list[parentIndex].resultArr[eleIndex];
item.isActive = !isActive;
this.list[parentIndex].resultArr[eleIndex] = item;
// 赋值数据
this.list[parentIndex].inspectionResult = item.value; // 记录结论
this.list[parentIndex].postionList.forEach(
(item) => (item.isActive = false)
);
this.list[parentIndex].measuredDataArr = []; // 重置异常位置
this.list[parentIndex].notes = ""; // 重置摘要信息
},
// tag 点击事件
postionChange(parentIndex, eleIndex, isActive) {
if (this.isDisable) {
return;
}
const postionList = this.list[parentIndex].postionList;
const item = postionList[eleIndex];
item.isActive = !isActive;
postionList[eleIndex] = item;
this.list[parentIndex].postionList = postionList;
this.list[parentIndex].measuredDataArr = postionList
.filter((item) => item.isActive)
.map((item) => item.dictValue);
},
// 数据结构重组
coverlist() {
const roomTypeLabel = this.roomTypeLabel;
const roomType = pad_room_type.rows.filter(
(item) => item.dictLabel == roomTypeLabel
)[0].dictValue;
const temp = pad_1_1_inspection_items.rows.map((item) => {
return {
// ...item,
dictLabel: item.dictLabel,
dictValue: item.dictValue,
notes: "", // 情况摘要
inspectionResult: 0, // 异常
itemCode: item.dictValue, // 检查项 如:门禁
roomType, // 机房类型
resultArr: [
{
value: 0,
label: "正常",
isActive: true,
},
{
value: 1,
label: "异常",
},
],
measuredData: "", // 逗号分隔字符串
measuredDataArr: [], // 前端本地使用
postionList: pad_1_1_inspection_position.rows.map((item) => {
return {
...item,
};
}),
};
});
this.list = temp;
},
// 回显数据
setForm(componentData) {
this.list = componentData;
},
// 获取数据
getForm() {
const temp = this.list.map((item) => {
return {
...item,
measuredData: item.measuredDataArr.join(","),
};
});
return temp;
},
// 校验数据 所有表单
async vaildForm() {
const temp = this.list.map((item, index) => {
return this.$refs[`forms_${index}`][0]
.validate()
.then(() => {
return {
result: true,
index,
};
})
.catch(() => {
return {
result: false,
item,
};
});
});
return Promise.all(temp).then((res) => {
const allVaildList = res.filter((item) => item.result);
const formData = this.getForm();
return {
vaild: this.list.length == allVaildList.length,
formData,
};
});
},
clickQuick(item, quickItem) {
item.notes = `${item.notes}${quickItem.text}`;
},
},
};
</script>
<style lang="less" scoped>
.gather-dataCenter {
.inspection-item {
border: 1px solid;
margin-bottom: 12px;
background: #ffffff;
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 12px;
padding: 24px 24px 8px 24px;
.text {
font-size: 16px;
color: #000000;
line-height: 24px;
font-weight: bold;
}
.row-item {
border-bottom: 1px solid #eee;
// border: 1px solid;
padding-bottom: 18px;
margin-bottom: 12px;
&:last-of-type {
border-bottom: none;
margin-bottom: 0;
}
.tags {
display: flex;
align-items: center;
.tag {
background: #f2f3f5;
width: 55px;
height: 36px;
border-radius: 10px;
text-align: center;
line-height: 36px;
margin-right: 10px;
font-size: 14px;
color: #4a4a4a;
text-align: center;
font-weight: 400;
}
.active-tag {
background: #3774f6;
color: #fff;
}
}
}
}
.note-item {
textarea{
width: 100%;
min-height: 96px;
background: #f7f7f7;
border-radius: 1px;
font-size: 14px;
color: #4a4a4a;
padding: 16px;
font-weight: 400;
}
.qucik-content {
display: flex;
align-items: center;
.quick-input {
margin: 16px 18px 18px 0 ;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
}
.qucik-text {
display: inline-block;
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 8px;
padding: 0 10px;
height: 32px;
font-size: 12px;
color: #4a4a4a;
line-height: 20px;
font-weight: 400;
margin-right: 12px;
line-height: 32px;
text-align: center;
}
}
}
/deep/ .uni-forms-item__content {
display: flex;
align-items: center;
}
.note-item {
/deep/ .uni-forms-item__content {
display: block;
}
}
}
</style>
<template>
<view class="gather-dataCenter">
<uni-forms
v-for="(item, parentIndex) in list"
:key="item.dictLabel"
:modelValue="item"
label-width="82px"
class="inspection-item"
:ref="`forms_${parentIndex}`"
:rules="rules"
>
<uni-forms-item class="row-item" label="巡检项" name="name">
<view class="text">{{ item.dictLabel }}</view>
</uni-forms-item>
<uni-forms-item required class="row-item" label="巡检结论" name="name">
<view class="tags">
<view
v-for="(ele, eleIndex) in item.resultArr"
class="tag"
:key="eleIndex"
@click="tagClick(parentIndex, eleIndex, ele.isActive)"
:class="ele.isActive ? 'active-tag' : ''"
>{{ ele.label }}
</view>
</view>
</uni-forms-item>
<!-- 异常状态时显示 -->
<uni-forms-item
required
class="row-item"
label="异常定位"
name="measuredDataArr"
v-if="item.inspectionResult == 1"
>
<view class="tags">
<view
v-for="(ele, eleIndex) in item.postionList"
class="tag"
@click="postionChange(parentIndex, eleIndex, ele.isActive)"
:class="
item.measuredDataArr.includes(ele.dictValue) ? 'active-tag' : ''
"
>{{ ele.dictLabel }}
</view>
</view>
</uni-forms-item>
<!-- 异常状态时显示 -->
<uni-forms-item
required
class="row-item note-item"
label="情况摘要"
name="notes"
v-if="item.inspectionResult == 1"
>
<textarea
type="text"
:disabled="isDisable"
v-model="item.notes"
placeholder="请输入内容"
/>
<view class="qucik-content">
<view v-if="!isDisable" class="quick-input"> 快捷输入 </view>
<view v-if="!isDisable">
<text
class="qucik-text"
v-for="quickItem in quickTextList"
:key="quickItem.text"
@click="clickQuick(item, quickItem)"
>{{ quickItem.text }}</text
>
</view>
</view>
</uni-forms-item>
</uni-forms>
</view>
</template>
<script>
import {
pad_1_2_inspection_items,
pad_1_2_inspection_position,
pad_room_type,
} from "@/utils/dict.js";
/**
* 屏蔽机房巡检
*/
export default {
props: {
isDisable: {
type: Boolean,
},
},
data() {
return {
list: [],
rules: {
// 对notes字段进行必填验证
notes: {
rules: [
{
required: true,
errorMessage: "请输入情况摘要",
},
],
},
measuredDataArr: {
rules: [
{
required: true,
errorMessage: "请选择",
},
],
},
},
roomTypeLabel: "屏蔽机房巡检", // 用于获取类型值
quickTextList: [
{
text: "有异常",
},
{
text: "已处理",
},
{
text: "需派单维修",
},
],
};
},
mounted() {
this.coverlist();
},
methods: {
// tag 点击事件
tagClick(parentIndex, eleIndex, isActive) {
if (isActive || this.isDisable) {
return;
}
this.list[parentIndex].resultArr.forEach((element) => {
element.isActive = false;
});
const item = this.list[parentIndex].resultArr[eleIndex];
item.isActive = !isActive;
this.list[parentIndex].resultArr[eleIndex] = item;
// 赋值数据
this.list[parentIndex].inspectionResult = item.value; // 记录结论
this.list[parentIndex].postionList.forEach(
(item) => (item.isActive = false)
);
this.list[parentIndex].measuredDataArr = []; // 重置异常位置
this.list[parentIndex].notes = ""; // 重置摘要信息
},
// tag 点击事件
postionChange(parentIndex, eleIndex, isActive) {
if (this.isDisable) {
return;
}
const postionList = this.list[parentIndex].postionList;
const item = postionList[eleIndex];
item.isActive = !isActive;
postionList[eleIndex] = item;
this.list[parentIndex].postionList = postionList;
this.list[parentIndex].measuredDataArr = postionList
.filter((item) => item.isActive)
.map((item) => item.dictValue);
},
// 数据结构重组
coverlist() {
const roomTypeLabel = this.roomTypeLabel;
const roomType = pad_room_type.rows.filter(
(item) => item.dictLabel == roomTypeLabel
)[0].dictValue;
const temp = pad_1_2_inspection_items.rows.map((item) => {
return {
// ...item,
dictLabel: item.dictLabel,
dictValue: item.dictValue,
notes: "", // 情况摘要
inspectionResult: 0, // 异常
itemCode: item.dictValue, // 检查项 如:门禁
roomType, // 机房类型
resultArr: [
{
value: 0,
label: "正常",
isActive: true,
},
{
value: 1,
label: "异常",
},
],
measuredData: "", // 逗号分隔字符串
measuredDataArr: [], // 前端本地使用
postionList: pad_1_2_inspection_position.rows.map((item) => {
return {
...item,
};
}),
};
});
this.list = temp;
},
// 回显数据
setForm(componentData) {
this.list = componentData;
},
// 获取数据
getForm() {
const temp = this.list.map((item) => {
return {
...item,
measuredData: item.measuredDataArr.join(","),
};
});
return temp;
},
// 校验数据 所有表单
async vaildForm() {
const temp = this.list.map((item, index) => {
return this.$refs[`forms_${index}`][0]
.validate()
.then(() => {
return {
result: true,
index,
};
})
.catch(() => {
return {
result: false,
item,
};
});
});
return Promise.all(temp).then((res) => {
const allVaildList = res.filter((item) => item.result);
const formData = this.getForm();
return {
vaild: this.list.length == allVaildList.length,
formData,
};
});
},
clickQuick(item, quickItem) {
item.notes = `${item.notes}${quickItem.text}`;
},
},
};
</script>
<style lang="less" scoped>
.gather-dataCenter {
.inspection-item {
border: 1px solid;
margin-bottom: 12px;
background: #ffffff;
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 12px;
padding: 24px 24px 8px 24px;
.text {
font-size: 16px;
color: #000000;
line-height: 24px;
font-weight: bold;
}
.row-item {
border-bottom: 1px solid #eee;
// border: 1px solid;
padding-bottom: 18px;
margin-bottom: 12px;
&:last-of-type {
border-bottom: none;
margin-bottom: 0;
}
.tags {
display: flex;
align-items: center;
.tag {
background: #f2f3f5;
width: 55px;
height: 36px;
border-radius: 10px;
text-align: center;
line-height: 36px;
margin-right: 10px;
font-size: 14px;
color: #4a4a4a;
text-align: center;
font-weight: 400;
}
.active-tag {
background: #3774f6;
color: #fff;
}
}
}
}
.note-item {
textarea{
width: 100%;
min-height: 96px;
background: #f7f7f7;
border-radius: 1px;
font-size: 14px;
color: #4a4a4a;
padding: 16px;
font-weight: 400;
}
.qucik-content {
display: flex;
align-items: center;
.quick-input {
margin: 16px 18px 18px 0 ;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
}
.qucik-text {
display: inline-block;
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 8px;
padding: 0 10px;
height: 32px;
font-size: 12px;
color: #4a4a4a;
line-height: 20px;
font-weight: 400;
margin-right: 12px;
line-height: 32px;
text-align: center;
}
}
}
/deep/ .uni-forms-item__content {
display: flex;
align-items: center;
}
.note-item {
/deep/ .uni-forms-item__content {
display: block;
}
}
}
</style>
<template>
<view class="tabs-component">
<view class="tabs-list">
<view
v-for="(item, index) in list"
:key="item.name"
class="tab-item"
@click="tabClick(index, item)"
:class="index == activeIndex ? 'active-tab-item' : ''"
>
<text
class="iconfont icon-yiwancheng1"
:class="item.isVaild ? 'vaild-icon' : ''"
></text>
{{ item.name }}</view
>
</view>
<!-- 描述 -->
<view v-if="(list[activeIndex]|| {}).value" class="descript">
<view v-if="(list[activeIndex].position || []).length" class="descript-item">
<text class="name">巡检位置</text>
<text class="text">{{
list[activeIndex].position.map((item) => item.dictLabel).join("、")
}}</text>
</view>
<view v-if="list[activeIndex].descript" class="descript-item">
<text class="name">巡检说明</text>
<text class="text"> {{ list[activeIndex].descript }}</text>
</view>
</view>
</view>
</template>
<script>
import {
pad_1_1_inspection_position,
pad_1_2_inspection_position,
pad_1_3_inspection_position,
} from "@/utils/dict.js";
export default {
props: {
options: {
tyep: Array,
},
},
data() {
return {
activeIndex: 0,
list: [],
};
},
mounted() {
this.list = this.options;
},
watch: {
options(newData) {
this.list = newData;
},
},
methods: {
tabClick(index, item) {
this.activeIndex = index;
this.$emit("change", index, item);
},
/**
* 设置单个校验状态
* @param index
* @param vaild
* @param iSwtich 是否自动切换到下一个tab
*/
setTabVaild(index, vaild = false, iSwtich = true) {
return new Promise((resolve, reject) => {
this.list[index].isVaild = vaild;
if (iSwtich && index < this.list.length - 1) {
this.tabClick(index + 1, {});
}
resolve();
});
},
// 校验所有内容是否填写完成
isAllVails() {
return this.list.every((item) => {
return item.isVaild;
});
},
},
};
</script>
<style lang="less" scoped>
.tabs-component {
.tabs-list {
display: flex;
align-items: center;
margin-bottom: 16px;
.iconfont {
margin-right: 5px;
color: #999;
font-size: 14px;
}
.tab-item {
margin-right: 24px;
font-size: 14px;
color: #000000;
line-height: 22px;
font-weight: 400;
position: relative;
padding-bottom: 5px;
&::after {
content: " ";
position: absolute;
bottom: 0px;
width: 100%;
height: 3px;
border-radius: 10px;
left: 0;
}
}
.vaild-icon {
color: #3774f6;
}
.active-tab-item {
color: #3774f6;
&::after {
background: #3774f6;
}
}
}
.descript {
padding: 8px 16px;
background: #e0f1ff;
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 8px;
.descript-item {
font-size: 12px;
color: #959595;
line-height: 28px;
font-weight: 400;
.name {
margin-right: 8px;
}
.text {
color: #000000;
}
}
}
}
</style>
<template>
<view class="inspection-management">
<!-- 搜索项 -->
<SearchCom @change="change" />
<!-- 结果 -->
<view class="inspection-management-content">
<view class="count-tatal">
<text class="num">{{ countNum || 0 }}</text>
<text>查询结果</text>
</view>
<view class="month-list">
<!-- 每月记录 -->
<view
class="month-record-item"
v-for="(item, index) in list"
:key="index"
>
<view v-if="(item.list || []).length" class="seconed-title">
{{ item.submitTime || item.time}}
</view>
<view class="inspect-list">
<InspectionItem
v-for="ele in item.list"
:key="ele.uid"
:details="ele"
/>
</view>
</view>
<Empty v-if="list.length == 0" />
</view>
</view>
<!-- 开始巡检 -->
<view class="inspection-button" @click="toPage"
>开始巡检</view
>
</view>
</template>
<script>
import SearchCom from "@/components/searchCom/index.vue";
import InspectionItem from "@/components/inspectionItem/index.vue";
import { getDarft } from "@/request/index.js";
import { getAllInspections } from "@/request/index.js";
import Empty from "@/components/empty/index.vue";
export default {
components: {
SearchCom,
InspectionItem,
Empty,
},
data() {
return {
isDialog: false, //
list: [], // 展示数据
all_data: [], // 所有数据
searchForm: {
// 搜索条件
},
countNum: 0, // 统计查询总数
};
},
mounted() {
uni.showLoading();
getAllInspections()
.then((res) => {
this.all_data = res;
this.init();
uni.hideLoading();
})
.catch((error) => {
if (0 == error.code) {
uni.showToast({
title: error.msg,
icon: "none",
duration: 1000,
});
}
this.all_data = [];
uni.hideLoading();
});
},
computed: {
userInfo() {
return this.$store.state.now_user || {};
},
},
methods: {
init() {
const all_data = this.all_data || [];
const { inspectionTime = [] } = this.searchForm;
const startTime = inspectionTime[0];
const endTime = inspectionTime[1];
// 第一步: 筛选有效的时间范围
const timeFrame = all_data.filter((item) => {
if (!inspectionTime.length) {
return true;
} else {
return (
new Date(startTime).getTime() <= new Date(item.submitTime).getTime() &&
new Date(item.submitTime).getTime() <= new Date(endTime).getTime()
);
}
});
// 属于同一个月的数据 聚合
const tempAllData = {};
timeFrame.forEach((item) => {
const val = tempAllData[item.submitMonth] || [];
if (val.length) {
tempAllData[item.submitMonth].push(item);
} else {
tempAllData[item.submitMonth] = [item];
}
});
const keys = Object.keys(tempAllData);
// 第二步: 根据搜索条件过滤
const list = keys.map((key) => {
return {
time: key,
list: this.coverData(tempAllData[key]),
};
});
this.countNum = 0;
list.forEach((item) => {
this.countNum += item.list.length;
});
this.list = list;
},
coverData(arr = []) {
const {
isException = "",
inspectionType = "",
synchronization = "",
} = this.searchForm;
return arr.filter((item) => {
return (
( !isException || isException =="all" || item.isException == isException) &&
( !inspectionType || inspectionType =="all" || item.inspectionType == inspectionType) &&
( !synchronization || synchronization =="all" || item.synchronization == synchronization)
);
});
},
change(e) {
this.searchForm = e;
this.init();
},
toPage() {
uni.showLoading();
getDarft()
.then((res) => {
const darf_data = res || {};
if (darf_data.inspectionType == 1) {
uni.navigateTo({
url: `/pages/inspectionContent/inspectionContent?isDarf=1`,
});
} else if (darf_data.inspectionType == 2) {
uni.navigateTo({
url: `/pages/shaftInspection/shaftInspection?isDarf=1`,
});
} else {
uni.navigateTo({
url: "/pages/inspection/inspFirst",
});
}
uni.hideLoading();
})
.catch((error) => {
if (error.code == 0) {
uni.showToast({
title: error.msg,
icon: "none",
duration: 1000,
});
}
uni.navigateTo({
url: "/pages/inspection/inspFirst",
});
uni.hideLoading();
});
},
},
};
</script>
<style scoped lang="less">
.inspection-management {
padding-top: 16px;
.count-tatal {
margin: 16px 0 8px 0;
font-size: 14px;
color: #4a4a4a;
font-weight: 400;
.num {
font-size: 18px;
color: #3774f6;
line-height: 26px;
font-weight: 600;
margin-right: 5px;
}
}
.inspection-management-content {
.month-list {
height: calc(100vh - 26px - 16px - 8px - 36px - 62px);
overflow: auto;
padding-bottom: 140px;
.seconed-title {
margin-top: 16px;
font-size: 18px;
color: #000000;
font-weight: bold;
}
.month-record-item {
margin-bottom: 24px;
&:last-of-type {
margin: 0;
}
.inspect-list {
display: flex;
flex-wrap: wrap;
}
}
}
}
.inspection-button {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 60px;
width: 240px;
height: 48px;
left: 50%;
color: #fff;
transform: translateX(-50%);
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
box-shadow: 0px 10px 24px 0px rgba(51, 104, 246, 0.24);
border-radius: 27px;
}
}
</style>
<template>
<view class="echartsBar" id="echartsBar"></view>
</template>
<script>
import * as echarts from "echarts";
export default {
props: {},
data() {
return {};
},
computed: {
option() {
let data1 = [1, 2, 3, 4, 5, 61],
data2 = [6, 5, 4, 3, 2, 1];
return {
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
legend: {
right: "0",
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
color: ["#4BB4FF", "#1183F5"],
yAxis: {
type: "value",
boundaryGap: [0, 0.01],
},
xAxis: {
type: "category",
data: [
"终端告警",
"应用告警",
"机房告警",
"网络告警",
"数据中心告警",
"用户疑似违规",
],
},
series: [
{
name: "上月",
type: "bar",
barWidth: "10",
itemStyle: {
borderRadius: [20, 20, 0, 0], // 设置顶部两个角的圆角半径为20像素
},
data: data1,
},
{
name: "本月",
type: "bar",
barWidth: "10",
itemStyle: {
borderRadius: [20, 20, 0, 0], // 设置顶部两个角的圆角半径为20像素
},
data: data2,
},
],
};
},
},
async mounted() {
this.$nextTick(() => {
this.init();
});
},
methods: {
init() {
const DOM = document.getElementById("echartsBar");
const myChart = echarts.init(DOM);
myChart.setOption(this.option);
window.addEventListener("resize", () => {
myChart.clear();
myChart.setOption(this.option);
myChart && myChart.resize();
});
},
},
};
</script>
<style lang="scss" scoped>
.echartsBar {
height: 100%;
width: 100%;
}
</style>
<template>
<ul>
<li v-for="item in rightOneData" :key="item.label">
<view class="label">{{ item.label }}</view>
<view class="value">{{ item.value }}</view>
</li>
</ul>
</template>
<script>
export default {
props: {},
data() {
return {
rightOneData: [
{
label: "现状分析:",
value:
"本月告警总数X次。终端告警X次、应用告警X次、网络告警X次、机房告警X次、数据中心告警X次。总体环比上升(下降 | 持平)XX%。",
},
{
label: "问题识别:",
value:
"本月对比上月,XX场景告警、XX场景告警发生率正在上升;本月对比上月,XX场景告警、XX场景告警发生率明显下降。",
},
{
label: "原因分析:",
value:
"XX场景告警(XXXXXX告警项)本月发生X次;XX场景告警的(XXXXXX告警项)本月发生X次 。",
},
{
label: "趋势预测:",
value:
"基于以上数据,XXXXX类、XXXX类告警有上升趋势,近期需重点关注,加强防范。",
},
{
label: "风险预警:",
value:
"请重点关注机房环控状态,加强巡检力度;请重点关注行为违规,加强规范机房人员个人行为。",
},
],
};
},
};
</script>
<style lang="scss" scoped>
ul{
list-style: none;
li{
list-style: none;
display: flex;
.label{
width: 65px;
height: auto;
font-size: 14px;
line-height: 22px;
color: #000000;
}
.value{
width: calc(100% - 75px);
height: auto;
margin-left: 10px;
font-size: 14px;
color: #4A4A4A;
line-height: 22px;
}
}
}
</style>
<template>
<view class="echartsBar" id="echartsLine"></view>
</template>
<script>
import * as echarts from "echarts";
export default {
props: {},
data() {
return {
lists: [
{
name: "终端",
yData: [],
},
{
name: "应用",
yData: [],
},
{
name: "机房",
yData: [],
},
{
name: "网络",
yData: [],
},
{
name: "数据中心",
yData: [],
},
{
name: "用户疑似违规",
yData: [],
},
],
};
},
computed: {
option() {
let legendData = [];
let serverData = [];
let xData = [];
this.lists.forEach((item) => {
legendData.push(item.name);
let yData = [];
xData = [];
for (let i = 1; i <= 31; i++) {
yData.push(Math.floor(Math.random() * 100));
xData.push("10-" + i.toString().padStart(2, '0'));
}
serverData.push({
name: item.name,
type: "line",
data: yData,
});
});
return {
tooltip: {
trigger: "axis",
},
legend: {
data: legendData,
right: "0",
icon: "rect",
},
color: [
"#4B81FF",
"#F542D1",
"#DC6B49",
"#FADF63",
"#5FD87E",
"#63C7EF",
],
grid: {
left: "3%",
right: "4%",
bottom: "18%",
containLabel: true,
},
xAxis: {
type: "category",
boundaryGap: false,
data: xData,
},
yAxis: {
type: "value",
},
series: serverData,
dataZoom: [
{
type: "slider", // 滑动条缩放
start: 66, // 初始显示前10%的数据
end: 100,
},
{
type: "inside", // 内置缩放
start: 0,
end: 10,
},
],
};
},
},
async mounted() {
this.$nextTick(() => {
this.init();
});
},
methods: {
init() {
const DOM = document.getElementById("echartsLine");
const myChart = echarts.init(DOM);
myChart.setOption(this.option);
window.addEventListener("resize", () => {
myChart.clear();
myChart.setOption(this.option);
myChart && myChart.resize();
});
},
},
};
</script>
<style lang="scss" scoped>
.echartsBar {
height: 100%;
width: 100%;
}
</style>
差异被折叠。
<template>
<view class="tem1 padding_all_16">
<view class="label">{{ item.label }}</view>
<view class="value">
<span>{{ item.value || 0 }}</span>
<span class="unit">{{ item.unit || "" }}</span>
<span class="upValue" v-if="item.upValue">{{ item.upValue }}</span>
</view>
<el-row v-if="item.children && item.children.length > 0" class="children">
<el-col
v-for="(child, j) in item.children"
:key="child.label + j"
:span="8"
>
<view class="childrenLabel">
<span :style="{ backgroundColor: child.color || '#ccc' }"></span>
{{ child.label }}
</view>
<view class="childrenValue">
{{ child.value || 0 }}
</view>
</el-col>
</el-row>
</view>
</template>
<script>
export default {
props: {
item: {
typeof: Object,
default: () => ({}),
},
},
data() {
return {};
},
created() {},
};
</script>
<style lang="scss" scoped>
.tem1 {
width: 100%;
height: 100%;
background: #f9f9f9;
border-radius: 3px;
cursor: pointer;
.label {
font-size: 14px;
color: #000000;
}
.value {
font-size: 22px;
color: #000000;
margin-top: 8px;
.unit {
font-size: 14px;
color: #7c7c7c;
margin-left: 4px;
}
.upValue {
font-size: 16px;
color: #ef5e59;
margin-left: 12px;
&.down {
color: #0cc991;
}
}
}
.children {
margin-top: 8px;
.childrenLabel {
font-size: 12px;
color: #7c7c7c;
span {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 4px;
}
}
.childrenValue {
padding-left: 10px;
font-size: 16px;
color: #000000;
}
}
}
</style>
<template>
<view class="tem2" :style="item.style || ''">
<view class="label">{{ item.label }}</view>
<view class="value">
<span>{{ item.value || 0 }}</span>
<span class="unit">{{ item.unit || "" }}</span>
</view>
</view>
</template>
<script>
export default {
props: {
item: {
typeof: Object,
default: () => ({}),
},
},
data() {
return {};
},
created() {},
};
</script>
<style lang="scss" scoped>
.tem2 {
width: 100%;
height: 100%;
padding: 10px 16px;
background: #f9f9f9;
border-radius: 3px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
.label {
font-size: 14px;
color: #000000;
}
.value {
font-size: 22px;
color: #000000;
.unit {
font-size: 14px;
color: #7c7c7c;
margin-left: 4px;
}
}
}
</style>
<template>
<view class="tem1 padding_all_16">
<view class="label">{{ item.label }}</view>
<view class="value">
<span>{{ item.value || 0 }}</span>
<span class="unit">{{ item.unit || "" }}</span>
<span class="upValue" v-if="item.upValue">{{ item.upValue }}</span>
</view>
</view>
</template>
<script>
export default {
props: {
item: {
typeof: Object,
default: () => ({}),
},
},
data() {
return {};
},
created() {},
};
</script>
<style lang="scss" scoped>
.tem1 {
width: 100%;
height: 100%;
background: #f9f9f9;
border-radius: 3px;
cursor: pointer;
.label {
font-size: 14px;
color: #000000;
}
.value {
font-size: 22px;
color: #000000;
margin-top: 4px;
.unit {
font-size: 14px;
color: #7c7c7c;
margin-left: 4px;
}
.upValue {
font-size: 16px;
color: #ef5e59;
margin-left: 12px;
&.down {
color: #0cc991;
}
}
}
}
</style>
<template>
<view class="lineItem" :style="item.style || ''">
<view class="topContent">
<view>{{ item.label }}</view>
<view>{{ item.value }}%</view>
</view>
<view class="line">
<view
class="activeLine"
:style="{
width: item.value + '%',
backgroundColor: item.value >= 60 ? '#00D7A4' : '#F39800',
}"
></view>
</view>
</view>
</template>
<script>
export default {
props: {
item: {
type: Object,
default: () => {},
},
data: {
type: Object,
default: () => {},
},
},
};
</script>
<style lang="scss" scoped>
.lineItem {
width: 100%;
.topContent {
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC-Medium;
font-size: 14px;
color: #000000;
line-height: 22px;
font-weight: 500;
margin-bottom: 4px;
}
.line {
background: #f2f2f2;
width: 100%;
height: 12px;
position: relative;
.activeLine {
height: 12px;
position: absolute;
z-index: 99;
}
}
}
</style>
// 终端
export const terminal = [
{
label: '终端数量(已接入)',
value: 1364,
unit: '台',
upValue: 106,
type: 'tem1',
span: 8,
children: [
{
label: '接入',
value: 10,
color: '#1183F5'
},
{
label: '变更',
value: 10,
color: '#F39800'
},
{
label: '撤销',
value: 10,
color: '#959595'
},
]
},
{
label: '个人证书(使用中)',
value: 1364,
unit: '个',
upValue: 106,
type: 'tem1',
span: 8,
children: [
{
label: '接入',
value: 10,
color: '#1183F5'
},
{
label: '撤销',
value: 10,
color: '#959595'
},
]
},
{
label: '单位证书(使用中)',
value: 1364,
unit: '个',
upValue: 106,
type: 'tem1',
span: 8,
children: [
{
label: '接入',
value: 10,
color: '#1183F5'
},
{
label: '变更',
value: 10,
color: '#F39800'
},
{
label: '接入',
value: 10,
color: '#959595'
},
]
}
]
// 应用
export const application = [
{
label: '应用数量(监测中)',
value: 1364,
unit: '套',
upValue: 106,
type: 'tem1',
span: 24,
children: [
{
label: '上线',
value: 10,
color: '#1183F5'
},
{
label: '下线',
value: 10,
color: '#959595'
},
]
}
]
// 机房
export const computerData = [
{
label: '设备资产',
value: 1364,
unit: '台',
upValue: 106,
type: 'tem1',
span: 12,
children: [
{
label: '进入',
value: 10,
color: '#1183F5'
},
{
label: '搬出',
value: 10,
color: '#959595',
},
]
},
{
type: 'tem2',
span: 12,
children: [
{
label: '机房',
value: 1364,
unit: '个',
},
{
label: '监测采集器',
value: 1364,
unit: '台',
style: 'margin-top: 16px;'
}
]
}
]
// 数据中心
export const dataCenter = [
{
label: '资源实例',
value: 1364,
unit: '个',
upValue: 106,
type: 'tem1',
span: 12,
children: [
{
label: '申请',
value: 10,
color: '#1183F5'
},
{
label: '释放',
value: 10,
color: '#959595'
},
]
},
{
type: 'tem4',
span: 12,
children: [
{
label: 'CPU资源余量',
value: 0,
unit: '',
},
{
label: '内存资源余量',
value: 20,
unit: '',
style: 'margin-top: 16px;'
},
{
label: '存储资源余量',
value: 80,
unit: '',
style: 'margin-top: 16px;'
}
]
}
]
// 网络
export const netData = [
{
label: '网络接入单位',
value: 1364,
unit: '家',
upValue: 106,
type: 'tem3',
span: 6,
},
{
type: 'tem2',
span: 18,
children: [
{
label: '汇聚交换机',
value: 1364,
unit: '台',
},
{
label: '防火墙',
value: 1364,
unit: '台',
},
{
label: '核心交换机',
value: 1364,
unit: '台',
},
{
label: '接入交换机',
value: 1364,
unit: '台',
style: 'margin-top: 16px;'
},
{
label: '应用服务器',
value: 1364,
unit: '台',
style: 'margin-top: 16px;'
},
{
label: '安全产品服务器',
value: 1364,
unit: '台',
style: 'margin-top: 16px;'
},
]
}
]
// 网络
export const userData = [
{
label: '内网用户',
value: 1364,
unit: '人',
upValue: 106,
type: 'tem3',
span: 6,
},
{
label: '涉密用户',
value: 1364,
unit: '人',
upValue: 106,
type: 'tem3',
span: 6,
},
{
label: '非涉密用户',
value: 1364,
unit: '人',
upValue: 106,
type: 'tem3',
span: 6,
},
]
// 运维
export const ywData = [
{
label: '告警派单',
value: 1364,
unit: '单',
type: 'tem3',
span: 8,
},
{
label: '人工派单',
value: 1364,
unit: '单',
type: 'tem3',
span: 8,
},
{
label: '电话咨询',
value: 1364,
unit: '单',
type: 'tem3',
span: 8,
},
]
// fb
export const fbData = [
{
label: '日常备案',
value: 1364,
unit: '个',
type: 'tem3',
span: 8,
},
{
label: '自测任务',
value: 1364,
unit: '次',
type: 'tem3',
span: 8,
},
{
label: '自查自测',
value: 1364,
unit: '次',
type: 'tem3',
span: 8,
},
]
\ No newline at end of file
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论