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

fix(功能走查): 功能走查88%

上级 45920574
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
} }
}, },
{ //主页
"path": "pages/index/index"
},
{ //操作日志 { //操作日志
"path": "pages/index/operLog" "path": "pages/index/operLog"
}, },
......
<template>
<view class="container">
<uni-nav-bar dark :fixed="true" background-color="#5474e8" status-bar left-text="退出" @clickLeft="logOut"
title="杭州内网监管在线" right-text="修改密码" @clickRight="toEditPd" />
<view class="content">
<span class="czrz-btn" @tap="lookLog">
操作日志
</span>
<my-tabs></my-tabs>
<view class="scroll-y-box">
<view class="index-top">
<!-- 用户信息 -->
<view class="user-box index-top-item box-shaow-box">
<view class="user-box-name">
{{user.name}}<span class="user-box-type">{{user.areaName}}</span>
</view>
<view class="user-box-time-text">
上次上报时间:<span
class="user-box-time">{{$store.state.last_time ? $store.state.last_time : '暂无'}}</span>
</view>
</view>
<!-- 例行巡检 -->
<view class="xj-box index-top-item box-shaow-box" v-if="user.permission == 1">
<view class="image-box">
<image src="../../static/img/inspection.png" mode=""></image>
</view>
<view class="index-top-item-text">
巡检
</view>
</view>
<!-- 填写报告 -->
<view class="bg-box index-top-item box-shaow-box" @click="goAddReport">
<view class="image-box">
<image src="../../static/img/report.png" mode=""></image>
</view>
<view class="index-top-item-text">
报告
</view>
</view>
<!-- 报修信息 -->
<view class="bx-box index-top-item box-shaow-box" @click="goAddRepair">
<view class="image-box">
<image src="../../static/img/repair.png"></image>
</view>
<view class="index-top-item-text">
报修
</view>
</view>
</view>
<!-- 记录信息 -->
<view class="recorded-information box-shaow-box">
<view class="recorded-information-item" @tap="toSync">
<view class="recorded-information-item-num is-margin-left">
{{isStatusNum}}<span class="small-text">(待同步)</span>
</view>
<view class="recorded-information-item-title">
<span v-if="user.permission == 1">巡检、</span>报修、报告记录
</view>
</view>
<view class="recorded-information-item" @tap="toInsp" v-if="user.permission == 1">
<view class="recorded-information-item-num">
{{inspectionNum}}
</view>
<view class="recorded-information-item-title">
巡检记录
</view>
</view>
<view class="recorded-information-item" @tap="toReport">
<view class="recorded-information-item-num">
{{reportNum}}
</view>
<view class="recorded-information-item-title">
报告记录
</view>
</view>
<view class="recorded-information-item" @tap="toRepair">
<view class="recorded-information-item-num">
{{repairNum}}
</view>
<view class="recorded-information-item-title">
报修记录
</view>
</view>
</view>
<!-- 最新记录 -->
<view class="new-record box-shaow-box">
<view class="new-record-top">
最新记录
</view>
<view class="new-record-main">
<view class="card" v-for="(item,index) in listData" :key="index">
<!-- 信息区域 -->
<view class="card-top">
<view class="card-title">
<span v-if="item.type == '1'">巡检记录</span>
<span v-if="item.type == '2'">报修记录</span>
<span v-if="item.type == '3'"> {{item.reportName}}</span>
</view>
<view class="card-item card-item-number">
<span class="card-item-title">编号:</span>{{item.number}}
</view>
<view class="card-item">
<span class="card-item-title">日期:</span>
<!-- <span >{{item.time.slice(0,11)}}</span> -->
<span>{{item.time ? item.time.slice(0,11) : item.time}}</span>
</view>
</view>
<!-- 按钮区域 -->
<view class="card-bottom">
<view @tap="delRecord(item)" class="card-bottom-btn-del card-bottom-btn"
v-if="item.status == '待同步'">
删除
</view>
<view @tap="lookRecoed(item)" class="card-bottom-btn-look card-bottom-btn"
v-if="item.status == '已同步'">
查看
</view>
<view @tap="editRecord(item)" class="card-bottom-btn-edit card-bottom-btn"
v-if="item.status == '待同步'">
编辑
</view>
</view>
<!-- 标签 -->
<view class="card-label" :class="item.status == '已同步' ? 'synced-label' : ''">
{{item.status}}
</view>
</view>
</view>
</view>
</view>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="base" title="删除" @confirm="dialogInputConfirm">
<view class="content-pop">
编号:<span>{{popupTitle.number}}</span>{{popupTitle.name}},确认删除?
</view>
</uni-popup-dialog>
</uni-popup>
<uni-popup ref="inputDialog2" type="dialog">
<uni-popup-dialog ref="inputClose2" mode="base" title="确定退出该账号?" @confirm="dialogInputConfirm2">
</uni-popup-dialog>
</uni-popup>
</view>
</view>
</template>
<script>
import myTabs from "components/myTabs/myTabs.vue"
import getDateTime from "@/common/getdateTime.js"
export default {
components: {
myTabs
},
data() {
return {
statusBarHeight: null,
listData: [],
user: {},
reportNum: 0,
inspectionNum: 0,
repairNum: 0,
isStatusNum: 0,
backButtonPress: 0,
isDel: {},
popupTitle: {
number: null,
name: ""
}
}
},
onShow() {
this.getData()
},
onLoad() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
console.log(this.statusBarHeight, 'sss');
},
mounted() {
// console.log(this.$store.state);
},
// 定义返回退出
onBackPress(options) {
this.backButtonPress++;
if (this.backButtonPress > 1) {
uni.setStorageSync('oper_record', this.$store.state.oper_record)
uni.setStorageSync('all_data', this.$store.state.all_data)
uni.setStorageSync('now_user', this.$store.state.now_user);
uni.setStorageSync('last_time', this.$store.state.last_time);
plus.runtime.quit();
} else {
plus.nativeUI.toast('再划一次退出应用');
}
setTimeout(function() {
this.backButtonPress = 0;
}, 1000);
return true;
},
// onNavigationBarButtonTap(val) {
// if (val.index == 0) {
// this.logOut()
// } else {
// this.toEditPd()
// }
// },
methods: {
toSync() {
uni.redirectTo({
url: "/pages/synchronization/synchronization"
})
},
toInsp(){
uni.redirectTo({
url: "/pages/inspection/inspection"
})
},
toReport() {
uni.redirectTo({
url: "/pages/report/report"
})
},
toRepair() {
uni.redirectTo({
url: "/pages/repair/repair"
})
},
editRecord(item) {
uni.showLoading({
title: '加载中',
mask: true
});
this.$store.commit('SET_TYPE', '编辑')
this.$store.commit('SET_TEMP_DATA', item)
if (item.type == '3') {
uni.navigateTo({
url: "/pages/report/reportInfo",
success() {
uni.hideLoading()
}
})
} else if (item.type == '2') {
uni.navigateTo({
url: "/pages/repair/repairDetail",
success() {
uni.hideLoading()
}
})
}
},
lookRecoed(item) {
uni.showLoading({
title: '加载中',
mask: true
});
this.$store.commit('SET_TEMP_DATA', item)
if (item.type == '3') {
uni.navigateTo({
url: "/pages/report/lookReport",
success() {
uni.hideLoading()
}
})
} else if (item.type == '2') {
uni.navigateTo({
url: "/pages/repair/showRapair",
success() {
uni.hideLoading()
}
})
}
},
delRecord(item) {
this.$refs.inputDialog.open()
this.isDel = item
this.popupTitle.number = item.number
if (item.type == '3') {
this.popupTitle.name = item.reportName
} else if (item.type == '2') {
this.popupTitle.name = '报修记录'
} else {
this.popupTitle.name = '巡检记录'
}
},
dialogInputConfirm() {
this.$store.state.all_data.map((item, index) => {
if (item.uid == this.isDel.uid) {
this.$store.commit('DEL_DATA', index)
let moduleName, detailName
if (item.type == 1) {
moduleName = '巡检'
detailName = '巡检记录' + '(' + item.number + ')'
} else if (item.type == 2) {
moduleName = '报修'
detailName = '报修记录' + '(' + item.number + ')'
} else {
moduleName = '报告'
detailName = item.reportName + '(' + item.number + ')'
}
let timeStr = getDateTime.dateTimeStr('y-m-d h:i')
let operData = {
name: this.$store.state.now_user.name,
level: '秘密',
user: this.$store.state.now_user.userName,
module: moduleName,
detail: detailName,
type: '删除',
time: timeStr
}
this.$store.state.oper_record.unshift(operData)
uni.showToast({
title: '删除成功',
icon: 'none',
duration: 2000
})
}
})
this.getData()
},
lookLog() {
// console.log('查看操作日志');
uni.navigateTo({
url: "/pages/index/operLog",
})
},
goAddReport() {
this.$store.commit('SET_TYPE', '新增') //将状态设置
this.$store.commit('SET_TEMP_DATA', {}) //清空
uni.navigateTo({
url: "/pages/report/report-detail/deatil_first",
})
},
goAddRepair() {
this.$store.commit('SET_TYPE', '新增') //将状态设置
this.$store.commit('SET_TEMP_DATA', {}) //清空
uni.navigateTo({
url: "/pages/repair/repairDetail",
})
},
logOut() {
this.$refs.inputDialog2.open()
},
dialogInputConfirm2() {
let _this = this
uni.redirectTo({
url: "/pages/login/login",
success() {
_this.$store.commit('SET_USER', {})
}
})
},
toEditPd() {
uni.navigateTo({
url: "/pages/index/editPd"
})
},
getData() {
uni.showLoading({
title: '加载中',
mask: true
});
setTimeout(() => {
uni.hideLoading()
}, 1000)
this.user = this.$store.state.now_user
const value = this.$store.state.all_data;
this.reportNum = 0 //重置所有数量
this.repairNum = 0
this.inspectionNum = 0
this.isStatusNum = 0
value.map(item => {
if (item.type == '3') {
this.reportNum += 1
} else if (item.type == '2') {
this.repairNum += 1
} else if (item.type == '1') {
this.inspectionNum += 1
}
if (item.status == '待同步') {
this.isStatusNum += 1
}
})
value.sort((a, b) => {
return a.time < b.time ? 1 : -1
})
if (this.user.areaName !== '市本级') {
let arr = []
value.map(item => {
if (item.oid == this.user.areaName) {
arr.push(item)
}
})
this.listData = arr.slice(0, 9)
} else {
this.listData = value.slice(0, 9);
}
}
}
}
</script>
<style lang="less" scoped>
.container {
width: 100%;
height: 100%;
// background-color: red;
}
.content {
width: 100%;
// height: calc(100% - 76px);
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
// background-color: #5474e8;
// position: relative;
.index-nav-bar {
width: 100%;
height: 33.53rpx;
background-color: #5474e8;
}
.czrz-btn {
color: #ffffff;
position: fixed;
font-size: 14px;
z-index: 1000;
right: 80px;
top: 44px;
font-size: 14px;
z-index: 999;
}
.scroll-y-box {
// height: calc(100% - 44px);
height: 96%;
// background-color: #e24f51;
overflow: hidden;
overflow-y: auto;
}
.index-top {
width: 718rpx;
// width: 100%;
height: 76rpx;
margin: 0 auto;
margin-top: 12rpx;
display: flex;
justify-content: space-between;
margin-bottom: 12rpx;
.index-top-item {
width: 158.82rpx;
height: 100%;
}
.user-box {
width: 205.88rpx;
.user-box-name {
font-size: 21.18rpx;
color: #3a3c4b;
letter-spacing: 1;
text-align: center;
padding-top: 17.65rpx;
margin-bottom: 8.24rpx;
font-family: 'AlibabaPuHuiTi-Medium';
.user-box-type {
font-size: 9.41rpx;
color: #778ca2;
margin-left: 4.12rpx;
letter-spacing: 0;
}
}
.user-box-time-text {
font-size: 9.41rpx;
margin-left: 44.71rpx;
color: #778ca2;
.user-box-time {
color: #32343b;
margin-left: 2.94rpx;
}
}
}
.xj-box,
.bg-box,
.bx-box {
display: flex;
align-items: center;
padding-left: 27.06rpx;
}
.xj-box {
background-color: #eee;
}
.image-box {
width: 42.35rpx;
height: 42.35rpx;
border-radius: 50%;
background-color: rgba(84, 116, 232, 0.1);
display: flex;
align-items: center;
justify-content: center;
margin-right: 9.41rpx;
image {
width: 23.53rpx;
height: 23.53rpx;
}
}
.index-top-item-text {
font-size: 11.76rpx;
color: #32343b;
}
}
.recorded-information {
width: 718rpx;
height: 76rpx;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 11.76rpx;
margin-bottom: 12rpx;
.recorded-information-item {
width: 164.71rpx;
height: 58.82rpx;
background-color: rgba(84, 116, 232, 0.06);
// box-shadow: 0px 1px 12px 0px rgba(84, 116, 232, 0.2);
border-radius: 10px;
text-align: center;
padding-top: 12.94rpx;
.is-margin-left {
margin-left: 17.65rpx;
}
.recorded-information-item-num {
font-size: 17.65rpx;
color: #5474e8;
.small-text {
font-size: 9.41rpx;
color: #32343b;
}
}
.recorded-information-item-title {
font-size: 10.59rpx;
color: #32343b;
}
}
}
.new-record {
width: 729.41rpx;
min-height: 180rpx;
// height: 172.94rpx;
margin: 0 auto;
.new-record-top {
width: 100%;
height: 28.24rpx;
background-color: rgba(64, 97, 213, 0.06);
box-shadow: 0px 0px 4px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px 10px 0px 0px;
padding-left: 17.65rpx;
line-height: 28.24rpx;
color: rgba(119, 140, 162, 0.7);
font-size: 11.76rpx;
}
.new-record-main {
width: 100%;
// height: calc(100% - 28.24rpx);
display: flex;
flex-wrap: wrap;
padding-top: 11.76rpx;
padding-left: 17.65rpx;
padding-right: 16.47rpx;
justify-content: space-between;
.card {
width: 219rpx;
height: 92rpx;
background-color: ;
background-color: #ffffff;
box-shadow: 0px 1px 12px 0px rgba(84, 116, 232, 0.2);
border-radius: 2px;
border: solid 1px rgba(119, 140, 162, 0.3);
margin-bottom: 17.65rpx;
position: relative;
font-size: 9.41rpx;
.card-top {
width: 100%;
height: 70rpx;
color: #3a3c4b;
padding: 11.76rpx;
.card-title {
width: 160rpx;
font-size: 10.59rpx;
font-family: AlibabaPuHuiTi-Medium;
margin-bottom: 5.88rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.card-item {
margin-bottom: 5.88rpx;
}
.card-item-number {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.card-item-title {
color: #778ca2;
margin-bottom: 5.88rpx;
margin-right: 4.71rpx;
}
}
.card-label {
width: 52.94rpx;
height: 20rpx;
line-height: 20rpx;
background-color: #ffae4e;
border-radius: 16px 0px 0px 16px;
color: #ffffff;
text-align: center;
position: absolute;
right: 0;
top: 9.41rpx;
}
.synced-label {
background-color: rgba(119, 140, 162, 0.3);
}
.card-bottom {
// border-radius: 2px;
width: 100%;
height: calc(100% - 70rpx);
display: flex;
// background-color:#36d;
.card-bottom-btn {
text-align: center;
line-height: 22rpx;
}
.card-bottom-btn-del {
width: 50%;
height: 100%;
color: #e24f51;
background-color: rgba(226, 79, 81, 0.12);
}
.card-bottom-btn-look {
flex: 1;
height: 100%;
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
}
.card-bottom-btn-edit {
width: 50%;
height: 100%;
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
position: relative;
}
}
}
}
.new-record-main::after {
content: "";
width: 219rpx;
height: 0;
visibility: hidden;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="container">
<uni-nav-bar dark :fixed="true" background-color="#5474e8" status-bar left-text="退出" @clickLeft="logOut"
title="杭州内网监管在线" right-text="修改密码" @clickRight="toEditPd" />
<view class="content">
<span class="czrz-btn" v-if="user.name == '超管' && user.permission == 1" @tap="lookLog">
操作日志
</span>
<my-tabs></my-tabs>
<view class="scroll-y-box">
<view class="index-top">
<!-- 用户信息 -->
<view class="user-box index-top-item box-shaow-box">
<view class="user-box-name">
{{user.name == '超管' ? '全区域' : user.areaName}}<span
class="user-box-type">{{user.name}}</span>
</view>
<view class="user-box-time-text">
上次上报时间:<span
class="user-box-time">{{$store.state.last_time ? $store.state.last_time : '暂无'}}</span>
</view>
</view>
<!-- 例行巡检 -->
<view class="xj-box index-top-item box-shaow-box" v-if="user.permission == 1" @tap="goAddInsp">
<view class="image-box">
<image src="../../static/img/inspection.png" mode=""></image>
</view>
<view class="index-top-item-text">
巡检
</view>
</view>
<!-- 填写报告 -->
<view class="bg-box index-top-item box-shaow-box" @tap="goAddReport">
<view class="image-box">
<image src="../../static/img/report.png" mode=""></image>
</view>
<view class="index-top-item-text">
报告
</view>
</view>
<!-- 报修信息 -->
<view class="bx-box index-top-item box-shaow-box" @tap="goAddRepair">
<view class="image-box">
<image src="../../static/img/repair.png"></image>
</view>
<view class="index-top-item-text">
报修
</view>
</view>
</view>
<!-- 记录信息 -->
<view class="recorded-information box-shaow-box">
<view class="recorded-information-item" @tap="toSync">
<view class="recorded-information-item-num is-margin-left">
{{isStatusNum}}<span class="small-text">(待同步)</span>
</view>
<view class="recorded-information-item-title">
<span v-if="user.permission == 1">巡检、</span>报修、报告记录
</view>
</view>
<view class="recorded-information-item" @tap="toInsp" v-if="user.permission == 1">
<view class="recorded-information-item-num">
{{inspectionNum}}
</view>
<view class="recorded-information-item-title">
巡检记录
</view>
</view>
<view class="recorded-information-item" @tap="toReport">
<view class="recorded-information-item-num">
{{reportNum}}
</view>
<view class="recorded-information-item-title">
报告记录
</view>
</view>
<view class="recorded-information-item" @tap="toRepair">
<view class="recorded-information-item-num">
{{repairNum}}
</view>
<view class="recorded-information-item-title">
报修记录
</view>
</view>
</view>
<!-- 最新记录 -->
<view class="new-record box-shaow-box">
<view class="new-record-top">
最新记录
</view>
<view class="new-record-main">
<view class="card-item-box" v-for="(v,i) in timeList" :key="i">
<span class="time-tip">
{{v.time}}
</span>
<view class="card-flex-box">
<view class="card" v-for="(item,index) in v.listData" :key="index">
<!-- 信息区域 -->
<view class="card-top">
<view class="card-title">
<span>{{item.time ? item.time.slice(0,11) : item.time}}</span>
<span class="status_tips"
v-if="item.abnormality == '有异常'">{{item.abnormality}}</span>
<span class="status_tips status_finish"
v-if="item.abnormality == '已处理'">{{item.abnormality}}</span>
</view>
<view class="card-item">
<span class="card-item-title">记录:</span>
<!-- <span >{{item.time.slice(0,11)}}</span> -->
<span v-if="item.type == '1'">{{showRoomName(item.room)}}巡检记录</span>
<span v-if="item.type == '2'">报修记录</span>
<span v-if="item.type == '3'"> {{item.reportName}}</span>
</view>
<view class="card-item card-item-number">
<span class="card-item-title">编号:</span>{{item.number}}
</view>
</view>
<!-- 按钮区域 -->
<view class="card-bottom">
<!-- <view @tap="delRecord(item)" class="card-bottom-btn-del card-bottom-btn"
v-if="item.status !== '已同步'">
删除
</view> -->
<view @tap="editRecord(item)" class="card-bottom-btn-edit card-bottom-btn"
v-if="item.status !== '已同步'">
编辑
</view>
<view class="card-bottom-btn-del card-bottom-btn" @tap="process(item)"
v-if="(item.abnormality == '有异常' || item.abnormality == '已处理') && item.status !== '已同步'">
处理
</view>
<view @tap="lookRecoed(item)" class="card-bottom-btn-look card-bottom-btn"
v-if="item.status == '已同步'">
查看
</view>
</view>
<!-- 标签 -->
<view class="card-label"
:class="item.status == '已同步' ? 'synced-label' : item.status == '编辑中' ? 'edit-label' : ''">
{{item.status}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="base" title="删除" @confirm="dialogInputConfirm">
<view class="content-pop">
编号:<span>{{popupTitle.number}}</span><span
v-if="isDel.type == 1">{{showRoomName(isDel.room)}}</span>{{popupTitle.name}},确认删除?
</view>
</uni-popup-dialog>
</uni-popup>
<uni-popup ref="inputDialog2" type="dialog">
<uni-popup-dialog ref="inputClose2" mode="base" title="确定退出该账号?" @confirm="dialogInputConfirm2">
</uni-popup-dialog>
</uni-popup>
</view>
</view>
</template>
<script>
import myTabs from "components/myTabs/myTabs.vue"
import getDateTime from "@/common/getdateTime.js"
export default {
components: {
myTabs
},
data() {
return {
statusBarHeight: null,
listData: [{
type: 2
}],
user: {},
reportNum: 0,
inspectionNum: 0,
repairNum: 0,
isStatusNum: 0,
backButtonPress: 0,
isDel: {},
popupTitle: {
number: null,
name: ""
},
timeList: []
}
},
onShow() {
this.getData()
uni.showLoading({
title: '加载中',
mask: true
});
setTimeout(() => {
uni.hideLoading()
}, 1000)
},
onLoad() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
// console.log(this.statusBarHeight, 'sss');
},
mounted() {
// console.log(this.$store.state);
},
// 定义返回退出
onBackPress(options) {
this.backButtonPress++;
if (this.backButtonPress > 1) {
uni.setStorageSync('oper_record', this.$store.state.oper_record)
uni.setStorageSync('all_data', this.$store.state.all_data)
uni.setStorageSync('now_user', this.$store.state.now_user);
uni.setStorageSync('last_time', this.$store.state.last_time);
plus.runtime.quit();
} else {
plus.nativeUI.toast('再划一次退出应用');
}
setTimeout(function() {
this.backButtonPress = 0;
}, 1000);
return true;
},
methods: {
process(item) {
this.$store.commit('SET_TEMP_DATA', item)
uni.navigateTo({
url: "/pages/inspection/inspProcess",
success(res) {
uni.hideLoading()
},
})
},
toSync() {
uni.redirectTo({
url: "/pages/synchronization/synchronization"
})
},
toInsp() {
console.log(123123);
uni.redirectTo({
url: "/pages/inspection/inspection"
})
},
toReport() {
uni.redirectTo({
url: "/pages/report/report"
})
},
toRepair() {
uni.redirectTo({
url: "/pages/repair/repair"
})
},
editRecord(item) {
// console.log(item,'当前编辑');
uni.showLoading({
title: '加载中',
mask: true
});
this.$store.commit('SET_TYPE', '编辑')
this.$store.commit('SET_TEMP_DATA', item)
let moduleName, detailName
if (item.type == '3') {
moduleName = '报告'
detailName = item.reportName + '(' + item.number + ')'
uni.navigateTo({
url: "/pages/report/reportInfo",
success() {
uni.hideLoading()
}
})
} else if (item.type == '2') {
moduleName = '报修'
detailName = '报修记录' + '(' + item.number + ')'
uni.navigateTo({
url: "/pages/repair/repairDetail",
success() {
uni.hideLoading()
}
})
} else {
moduleName = '巡检'
detailName = this.showRoomName(item.room) + '巡检记录' + '(' + item.number + ')'
uni.navigateTo({
url: "/pages/inspection/inspDetail",
success() {
uni.hideLoading()
},
fail(err) {
console.log(err);
}
})
}
let timeStr = getDateTime.dateTimeStr('y-m-d h:i')
let operData = {
name: this.$store.state.now_user.name,
level: '秘密',
user: this.$store.state.now_user.user,
module: moduleName,
detail: detailName,
type: '编辑',
time: timeStr
}
this.$store.state.oper_record.unshift(operData) //保存编辑记录
},
lookRecoed(item) {
uni.showLoading({
title: '加载中',
mask: true
});
this.$store.commit('SET_TYPE', '查看')
this.$store.commit('SET_TEMP_DATA', item)
if (item.type == '3') {
uni.navigateTo({
url: "/pages/report/lookReport",
success() {
uni.hideLoading()
}
})
} else if (item.type == '2') {
uni.navigateTo({
url: "/pages/repair/showRapair",
success() {
uni.hideLoading()
}
})
} else {
uni.navigateTo({
url: "/pages/inspection/inspDetail",
success() {
uni.hideLoading()
}
})
}
},
delRecord(item) {
this.$refs.inputDialog.open()
this.isDel = item
this.popupTitle.number = item.number
if (item.type == '3') {
this.popupTitle.name = item.reportName
} else if (item.type == '2') {
this.popupTitle.name = '报修记录'
} else {
this.popupTitle.name = '巡检记录'
}
},
dialogInputConfirm() {
this.$store.state.all_data.map((item, index) => {
if (item.uid == this.isDel.uid) {
this.$store.commit('DEL_DATA', index)
let moduleName, detailName
if (item.type == 1) {
moduleName = '巡检'
detailName = this.showRoomName(item.room) + '巡检记录' + '(' + item.number + ')'
} else if (item.type == 2) {
moduleName = '报修'
detailName = '报修记录' + '(' + item.number + ')'
} else {
moduleName = '报告'
detailName = item.reportName + '(' + item.number + ')'
}
let timeStr = getDateTime.dateTimeStr('y-m-d h:i')
let operData = {
name: this.$store.state.now_user.name,
level: '秘密',
user: this.$store.state.now_user.user,
module: moduleName,
detail: detailName,
type: '删除',
time: timeStr
}
this.$store.state.oper_record.unshift(operData)
uni.showToast({
title: '删除成功',
icon: 'none',
duration: 2000
})
}
})
this.getData()
},
lookLog() {
// console.log('查看操作日志');
uni.navigateTo({
url: "/pages/index/operLog",
})
},
goAddInsp() {
this.$store.commit('SET_TYPE', '新增') //将状态设置
this.$store.commit('SET_TEMP_DATA', {}) //清空
uni.navigateTo({
url: "/pages/inspection/inspFirst",
})
},
goAddReport() {
this.$store.commit('SET_TYPE', '新增') //将状态设置
this.$store.commit('SET_TEMP_DATA', {}) //清空
uni.navigateTo({
url: "/pages/report/report-detail/deatil_first",
})
},
goAddRepair() {
this.$store.commit('SET_TYPE', '新增') //将状态设置
this.$store.commit('SET_TEMP_DATA', {}) //清空
uni.navigateTo({
url: "/pages/repair/repairDetail",
})
},
logOut() {
this.$refs.inputDialog2.open()
},
dialogInputConfirm2() {
let _this = this
uni.redirectTo({
url: "/pages/login/login",
success() {
_this.$store.commit('SET_USER', {})
}
})
},
toEditPd() {
uni.navigateTo({
url: "/pages/index/editPd"
})
},
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;
case "7":
res = "省备份主机房";
break;
case "8":
res = "省备份传输机房";
break;
case "9":
res = "省备份UPS机房";
break;
}
return res;
},
getData() {
this.user = this.$store.state.now_user
// console.log(this.user,998988);
const value = this.$store.state.all_data;
this.reportNum = 0 //重置所有数量
this.repairNum = 0
this.inspectionNum = 0
this.isStatusNum = 0
value.map(item => {
if (item.type == '3') {
this.reportNum += 1
} else if (item.type == '2') {
this.repairNum += 1
} else if (item.type == '1') {
this.inspectionNum += 1
}
if (item.status == '待同步') {
this.isStatusNum += 1
}
})
value.sort((a, b) => {
return a.creatTime < b.creatTime ? 1 : -1
})
if (this.user.permission !== 1) {
let arr = []
value.map(item => {
if (item.oid == this.user.areaName) {
arr.push(item)
}
})
this.listData = arr.slice(0, 9)
} else {
this.listData = value.slice(0, 9);
}
let arr = []
this.listData.map(item => {
let mouth = item.time.split('-')[1].slice(0, 1) == '0' ? item.time.split('-')[1].substring(1) :
item.time.split('-')[1]
let time = item.time.split('-')[0] + '年' + mouth + '月'
let index = arr.findIndex(item => {
return item.time == time
})
if (index !== -1) {
arr[index].listData.push(item)
arr[index].listData = arr[index].listData.sort((a, b) => b.time.localeCompare(a.time))
} else {
arr.push({
time: time,
listData: [item]
})
}
})
this.timeList = arr.sort((a, b) => b.time.localeCompare(a.time))
}
}
}
</script>
<style lang="less" scoped>
.status_tips {
display: inline-block;
width: 56px;
height: 22px;
background-color: rgba(226, 79, 81, 0.1);
border-radius: 12px;
border: solid 1px #e24f51;
text-align: center;
font-size: 10.59rpx;
color: #e24f51;
margin-left: 16px;
}
.status_finish{
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
border: solid 1px #5474e8;
}
.container {
width: 100%;
height: 100%;
// background-color: red;
}
.content {
width: 100%;
height: calc(100% - 44px - var(--status-bar-height) - 40rpx);
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
// background-color: #5474e8;
// position: relative;
.index-nav-bar {
width: 100%;
height: 33.53rpx;
background-color: #5474e8;
}
.czrz-btn {
color: #ffffff;
position: fixed;
font-size: 14px;
z-index: 1000;
right: 86px;
top: 44px;
font-size: 14px;
z-index: 999;
}
.scroll-y-box {
height: 100%;
// height: 96%;
// background-color: #e24f51;
overflow: hidden;
overflow-y: auto;
}
.index-top {
width: 718rpx;
// width: 100%;
height: 76rpx;
margin: 0 auto;
margin-top: 12rpx;
display: flex;
justify-content: space-between;
margin-bottom: 12rpx;
.index-top-item {
width: 158.82rpx;
height: 100%;
}
.user-box {
width: 205.88rpx;
.user-box-name {
font-size: 21.18rpx;
color: #3a3c4b;
letter-spacing: 1;
text-align: center;
padding-top: 17.65rpx;
margin-bottom: 8.24rpx;
font-family: 'AlibabaPuHuiTi-Medium';
.user-box-type {
font-size: 9.41rpx;
color: #778ca2;
margin-left: 4.12rpx;
letter-spacing: 0;
}
}
.user-box-time-text {
font-size: 9.41rpx;
margin-left: 44.71rpx;
color: #778ca2;
.user-box-time {
color: #32343b;
margin-left: 2.94rpx;
}
}
}
.xj-box,
.bg-box,
.bx-box {
display: flex;
align-items: center;
padding-left: 27.06rpx;
}
.xj-box {
// background-color: #eee;
}
.image-box {
width: 42.35rpx;
height: 42.35rpx;
border-radius: 50%;
background-color: rgba(84, 116, 232, 0.1);
display: flex;
align-items: center;
justify-content: center;
margin-right: 9.41rpx;
image {
width: 23.53rpx;
height: 23.53rpx;
}
}
.index-top-item-text {
font-size: 11.76rpx;
color: #32343b;
}
}
.recorded-information {
width: 718rpx;
height: 76rpx;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 11.76rpx;
margin-bottom: 12rpx;
.recorded-information-item {
width: 164.71rpx;
height: 58.82rpx;
background-color: rgba(84, 116, 232, 0.06);
// box-shadow: 0px 1px 12px 0px rgba(84, 116, 232, 0.2);
border-radius: 10px;
text-align: center;
padding-top: 12.94rpx;
.is-margin-left {
margin-left: 17.65rpx;
}
.recorded-information-item-num {
font-size: 17.65rpx;
color: #5474e8;
.small-text {
font-size: 9.41rpx;
color: #32343b;
}
}
.recorded-information-item-title {
font-size: 10.59rpx;
color: #32343b;
}
}
}
.new-record {
width: 729.41rpx;
min-height: 180rpx;
// height: 172.94rpx;
margin: 0 auto;
.new-record-top {
width: 100%;
height: 28.24rpx;
background-color: rgba(64, 97, 213, 0.06);
box-shadow: 0px 0px 4px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px 10px 0px 0px;
padding-left: 17.65rpx;
line-height: 28.24rpx;
color: rgba(119, 140, 162, 0.7);
font-size: 11.76rpx;
}
.new-record-main {
width: 100%;
// height: calc(100% - 28.24rpx);
// padding-top: 11.76rpx;
// padding-left: 17.65rpx;
// padding-right: 16.47rpx;
.card-item-box {
width: 100%;
padding-top: 11.76rpx;
.time-tip {
color: #ffffff;
padding: 3px 11px 5px 10px;
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 0px 16px 16px 0px;
opacity: 0.7;
}
.card-flex-box {
width: 100%;
padding: 0 17.5rpx;
padding-top: 20px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.card-flex-box::after {
content: "";
width: 219rpx;
height: 0;
visibility: hidden;
}
}
.card {
width: 219rpx;
height: 92rpx;
background-color: ;
background-color: #ffffff;
box-shadow: 0px 1px 12px 0px rgba(84, 116, 232, 0.2);
border-radius: 2px;
border: solid 1px rgba(119, 140, 162, 0.3);
margin-bottom: 17.65rpx;
position: relative;
font-size: 9.41rpx;
.card-top {
width: 100%;
height: 70rpx;
color: #3a3c4b;
padding: 11.76rpx;
.card-title {
width: 160rpx;
font-size: 10.59rpx;
margin-bottom: 5.88rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
span {
font-family: AlibabaPuHuiTi-Medium;
}
}
.card-item {
margin-bottom: 5.88rpx;
}
.card-item-number {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.card-item-title {
color: #778ca2;
margin-bottom: 5.88rpx;
margin-right: 4.71rpx;
}
}
.card-label {
width: 52.94rpx;
height: 20rpx;
line-height: 20rpx;
background-color: #ffae4e;
border-radius: 16px 0px 0px 16px;
color: #ffffff;
text-align: center;
position: absolute;
right: 0;
top: 9.41rpx;
}
.synced-label {
background-color: rgba(119, 140, 162, 0.3);
}
.edit-label {
background-color: #5474e8;
}
.card-bottom {
// border-radius: 2px;
width: 100%;
height: calc(100% - 70rpx);
display: flex;
// background-color:#36d;
.card-bottom-btn {
text-align: center;
line-height: 22rpx;
}
.card-bottom-btn-del {
width: 50%;
height: 100%;
color: #e24f51;
background-color: rgba(226, 79, 81, 0.12);
}
.card-bottom-btn-look {
flex: 1;
height: 100%;
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
}
.card-bottom-btn-edit {
flex: 1;
height: 100%;
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
position: relative;
}
}
}
}
}
}
</style>
\ No newline at end of file
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<!-- 不可删除 --> <!-- 不可删除 -->
<text class="xuxian">......</text> <text class="xuxian">......</text>
<text class="bold">{{ item.name || item.user }} </text> <text class="bold"> {{ item.roleName }} {{ item.user }} </text>
<text class="text">操作</text> <text class="text">操作</text>
<text class="bold">{{ item.module }}{{ item.type }}</text> <text class="bold">{{ item.module }}{{ item.type }}</text>
<text v-if="item.detail" class="text">内容</text> <text v-if="item.detail" class="text">内容</text>
......
...@@ -55,8 +55,8 @@ export default { ...@@ -55,8 +55,8 @@ export default {
// user: "bjqxj", // user: "bjqxj",
// pd: "JF85250920", // pd: "JF85250920",
user: "hzsgjy", // 超管账号 user: "admin", // 超管账号
pd: "JFXJ85250920", pd: "JF123456",
}, },
backButtonPress: 0, backButtonPress: 0,
personList: [], personList: [],
......
...@@ -18,21 +18,21 @@ ...@@ -18,21 +18,21 @@
<view class="seize-seat"> </view> <view class="seize-seat"> </view>
<view class="container box-shaow-box"> <view class="container box-shaow-box">
<view class="image-item top-image"> <!-- <view class="image-item top-image">
<image <image
src="../../static/img/report-table/index.png" src="@/static/img/add-img/jf_table.png"
mode="widthFix" mode="widthFix"
></image> ></image>
</view> </view> -->
<view class="image-item top-image"> <view class="image-item top-image">
<image <image
src="../../static/img/report-table/report1.png" src="@/static/img/add-img/jd_table.png"
mode="widthFix" mode="widthFix"
></image> ></image>
</view> </view>
<view class="image-item" v-for="(item, index) in 17">
<image :src="checkImage(item)" mode="widthFix"></image>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -90,8 +90,8 @@ export default { ...@@ -90,8 +90,8 @@ export default {
justify-sampletable: space-between; justify-sampletable: space-between;
.image-item { .image-item {
width: 341.18rpx; width: 70%;
height: 464.71rpx; // height: 100%;
background-color: #ffffff; background-color: #ffffff;
box-shadow: 0px 0px 9.41rpx 0px rgba(84, 116, 232, 0.2); box-shadow: 0px 0px 9.41rpx 0px rgba(84, 116, 232, 0.2);
border-radius: 4px; border-radius: 4px;
......
...@@ -35,13 +35,12 @@ export const getLogContent = (type, detail = "", module = "其他模块") => { ...@@ -35,13 +35,12 @@ export const getLogContent = (type, detail = "", module = "其他模块") => {
const now_user = store.state.now_user; const now_user = store.state.now_user;
let timeStr = moment().format("yyyy-MM-DD HH:mm:ss"); let timeStr = moment().format("yyyy-MM-DD HH:mm:ss");
return { return {
name: now_user.user,
level: "秘密", level: "秘密",
user: now_user.user,
module, module,
detail, detail,
type, type,
time: timeStr, time: timeStr,
...now_user
}; };
}; };
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论