Commit aefa8254 authored by kaitly205422@163.com's avatar kaitly205422@163.com

Merge branch 'develop' of http://git.censoft.com.cn/rongtong/rongtong-app into develop

parents 14438637 2f357c63
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -269,6 +269,69 @@ const routes = [ ...@@ -269,6 +269,69 @@ const routes = [
name: "modelResult", name: "modelResult",
component: () => import("../views/riskProject/assess/model/result.vue"), component: () => import("../views/riskProject/assess/model/result.vue"),
}, },
// 风险巡查管理 -巡查执行
{
path: "/patrolExecute",
name: "patrolExecute",
component: () => import("../views/riskPatrol/patrolExecute"),
},
// 风险巡查管理 -巡查详情
{
path: "/patrolExecute/implement",
name: "implement",
component: () => import("../views/riskPatrol/patrolExecute/implement.vue"),
},
{
path: "/patrolExecute/addDanger",
name: "addDanger",
component: () => import("../views/riskPatrol/patrolExecute/addDanger.vue"),
},
// 风险巡查管理 -巡查取消
{
path: "/patrolCancle",
name: "patrolCancle",
component: () => import("../views/riskPatrol/patrolCancle"),
},
// 风险巡查管理 -巡查记录
{
path: "/patrolLog",
name: "patrolLog",
component: () => import("../views/riskPatrol/patrolLog"),
},
{
path: "/patrolLog/logList",
name: "patrolLogList",
component: () => import("../views/riskPatrol/patrolLog/logList.vue"),
},
{
path: "/patrolLog/logDetail",
name: "patrolLogDetail",
component: () => import("../views/riskPatrol/patrolLog/logDetail.vue"),
},
{
path: "/patrolLog",
name: "patrolLog",
component: () => import("../views/riskPatrol/patrolLog"),
},
// 风险巡查管理 -巡查审批
{
path: "/patrolApprove",
name: "patrolApprove",
component: () => import("../views/riskPatrol/patrolApprove"),
},
// 风险巡查管理 -异常处置
{
path: "/abnormalDeal",
name: "abnormalDeal",
component: () => import("../views/riskPatrol/abnormalDeal"),
},
// 风险巡查管理 -巡查统计
{
path: "/patrolStatistics",
name: "patrolStatistics",
component: () => import("../views/riskPatrol/patrolStatistics"),
},
]; ];
const router = new VueRouter({ const router = new VueRouter({
......
import request from '@/utils/axios'
/*get请求*/
export function getFun(url,params) {
return request({
url: url,
method: 'get',
params
})
}
/* post请求 */
export function postWork(url,data) {
return request({
url: '/hse/wy/app-api/'+url,
method: 'post',
data
})
}
\ No newline at end of file
...@@ -142,6 +142,7 @@ export default { ...@@ -142,6 +142,7 @@ export default {
}; };
/* 存储用户信息 */ /* 存储用户信息 */
setUserInfo(userInfo); setUserInfo(userInfo);
setLocalUserInfo(userInfo)
// if(!Response2.data.initializePassword){ // if(!Response2.data.initializePassword){
// this.$router.push('/save-workbench') // this.$router.push('/save-workbench')
// }else{ // }else{
......
<template>
<div class="wrap">
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
</div>
</template>
<script type="text/ecmascript-6">
import LHeader from "@/components/header.vue";
export default {
name: 'abnormalDeal', //异常处置
components: {
LHeader,
},
props: {
},
data() {
return {
text:'异常处置',
}
},
computed: {
},
watch: {
},
created(){
},
mounted() {
},
methods: {
},
}
</script>
<style scoped lang='less'>
.wrap {
height: 100vh;
width: 100vw;
}
</style>
<template>
<div class="wrap">
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
</div>
</template>
<script type="text/ecmascript-6">
import LHeader from "@/components/header.vue";
export default {
name: 'patrolApprove', //巡查审批
components: {
LHeader,
},
props: {
},
data() {
return {
text:'巡查审批',
}
},
computed: {
},
watch: {
},
created(){
},
mounted() {
},
methods: {
},
}
</script>
<style scoped lang='less'>
.wrap {
height: 100vh;
width: 100vw;
}
</style>
<template>
<div class="wrap">
<LHeader :text="text"></LHeader>
<!-- 内容列表 -->
<div class="con-list">
<!-- v-for="(item, index) in messageList" :key="index" -->
<van-cell-group inset>
<van-row gutter class="cont-operation">
<van-col span="24">申请原因</van-col>
</van-row>
<van-row gutter class="cont-operation" style="margin-top: 10px;">
<van-col span="24">
<van-radio-group v-model="radio" direction="horizontal" @change="operation">
<van-radio name="1" shape="square">快捷申请</van-radio>
<van-radio name="2" shape="square">自定义</van-radio>
</van-radio-group>
</van-col>
</van-row>
</van-cell-group>
</div>
<van-form
style="margin: 0 10px"
@submit="onSubmit"
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<van-field
v-if="isShow"
readonly
clickable
required
label="申请原因"
name="applyReason"
:value="applyReason"
placeholder="请选择"
@click="showReason = true"
:rules="[{ required: true, message: '请选择申请原因' }]"
/>
<van-popup v-model="showReason" position="bottom">
<van-picker
show-toolbar
:columns="columnsReason"
@confirm="onConSetReason"
@cancel="showReason = false"
/>
</van-popup>
<van-field
v-if="!isShow"
v-model="measures"
name="measures"
label="申请原因"
type="textarea"
rows="3"
autosize
placeholder="请输入"
/>
<div class="operation-btn">
<!-- <van-button
block
type="info"
plain
native-type="button"
style="border-radius: 5px; background-color: #f0f1f5; margin-bottom: 10px;"
@click="cancel"
>取消</van-button> -->
<van-button
block
type="info"
native-type="submit"
style="border-radius: 5px;"
>提交</van-button>
</div>
</van-form>
</div>
</template>
<script type="text/ecmascript-6">
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
export default {
name: 'patrolCancle', //巡查取消
components: {
LHeader,
},
data() {
return {
text:'巡查取消',
radio: "1",
applyReason: "",
setRank: "", //风险定级
showReason: false,
columnsReason: ["今日请假", "今日外出、离岗", "今日调休"],
measures: "",
isShow: true,
content:'',
applyTime:this.util.timestampToTime(new Date(),'DT2',true)
}
},
computed: {
},
watch: {
},
created(){
},
mounted() {
},
methods: {
operation() {
if (this.radio == "1") {
this.isShow = true;
} else {
this.isShow = false;
}
},
onConSetReason(value) {
this.showReason = false;
this.applyReason = value;
},
onSubmit(values) {
console.log(values)
this.$toast.loading({
message: "提交中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
if(this.radio=='1'){
this.content=this.applyReason
}else if(this.radio=='2'){
this.content=this.measures
}
postFun('risk/currentRiskHoliday/save', {reason:this.content,holidayTime:this.applyTime})
.then((res) => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000,
});
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
},
save(){
},
cancel() {
this.$router.go(-1);
}
},
}
</script>
<style scoped lang='less'>
.wrap {
height: 100vh;
width: 100vw;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
}
}
.operation-btn {
width: 95%;
margin: 20px 10px 10px;
position: fixed;
bottom: 50px;
right: 0;
left: 0;
}
</style>
<template>
<div>
<van-sticky>
<LHeader :text="text"></LHeader>
</van-sticky>
<!-- tab标签 -->
<van-tabs
v-model="active"
color="#2980f7"
animated
@click="tabClick"
:sticky="true"
offset-top="1.5rem"
>
<van-tab v-for="(i, key) in tabs" :key="key" :title="i.title">
<!-- 内容列表 -->
<div class="con-list">
<van-pull-refresh v-model="i.refreshing" @refresh="onRefresh">
<van-list
v-model="i.loading"
:finished="i.finished"
finished-text="没有更多了"
@load="onLoad()"
>
<van-cell-group inset v-for="(item, index) in i.messageList" :key="index">
<van-row gutter>
<!-- <van-col span="18">
<span class="con_title">日查</span>
<span>&nbsp;&nbsp;制度、规程、方案</span>
</van-col>-->
<van-col span="12" class="con_type">
<van-popover
v-model="showPopoverFlag2[index]"
theme="dark"
trigger="click"
placement="bottom-start"
>
<span class="tip">{{item.postName}}</span>
<template #reference>{{item.postName.length>10?item.postName.substring(0,10)+'...':item.postName}}</template>
</van-popover>
</van-col>
<van-col span="12" class="cont-end">{{item.hdLev|hdLev}}</van-col>
</van-row>
<van-row gutter>
<van-col span="24">{{item.hdName}}</van-col>
</van-row>
<van-row gutter class="cont-operation">
<van-col span="10" class="con_type">
<van-popover
v-model="showPopoverFlag[index]"
theme="dark"
trigger="click"
placement="bottom-start"
>
<span class="tip">《{{item.regulatoryBasis}}》</span>
<template #reference>法律依据/出处</template>
</van-popover>
</van-col>
<van-col span="14" class="con_right">
<van-radio-group
v-model="item.result"
direction="horizontal"
@change="operation(item.result,index,item)"
>
<van-radio :name="1" shape="square" :disabled="item.result == '2'">合格</van-radio>
<van-radio :name="2" shape="square" >不合格</van-radio>
</van-radio-group>
</van-col>
</van-row>
</van-cell-group>
</van-list>
</van-pull-refresh>
</div>
<!-- 暂无数据 -->
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="i.messageList.length == 0"
>暂无数据</div>
</van-tab>
</van-tabs>
<div class="operation-btn">
<van-button
block
type="info"
native-type="submit"
style="border-radius: 5px;"
@click="finish"
>结束巡查</van-button>
</div>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
export default {
name: "implement",
components: {
LHeader
},
data() {
return {
id: "", //巡查周期id
content:'',
text: this.$route.query.content?this.$route.query.content:'执行巡查',
messageList: [],
active: 0,
hdType:'',
total:0,//总条数
page:1,//页码
psize:5,//页数量
refreshing:false,
cycle:'',
tabs: [
// {
// title: "安全管理类",
// api: "/rectification/list1"
// },
// {
// title: "文明施工类",
// api: "/rectification/list2"
// },
// {
// title: "临时用电类",
// api: "/rectification/finishList"
// }
],
showPopover: false,
showPopoverFlag:[],
showPopoverFlag2:[]
};
},
filters:{
hdLev(val){
if(val=='S'){
return '重大隐患'
}else if(val=='A'){
return '严重隐患'
}else if(val=='B'){
return '较大隐患'
}else{
return '较小隐患'
}
}
},
mounted() {
if (this.$route.query.id) {
this.id = this.$route.query.id;
}
if (this.$route.query.cycle) {
this.cycle = this.$route.query.cycle;
}
if (this.$route.query.content) {
this.content = this.$route.query.content;
}
this.loadingTabs()
},
methods: {
tabClick(name,title){
this.page=1
this.hdType=title
this.tabs.forEach((i)=>{
if(i.title==this.hdType){
i.messageList=[]
i.loading=true
i.finished=false
}
})
this.onLoad();
},
// tabChange(name,title){
// console.log(title)
// this.page=1
// this.hdType=title
// this.tabs.forEach((i)=>{
// if(i.title==this.hdType){
// i.messageList=[]
// i.loading=true
// i.finished=false
// }
// })
// this.onLoad();
// },
loadingTabs(){
getFun("/risk/currentRiskPatrolDetail/detailList",{ id: this.id}).then(res => {
// this.hdType=res.data[0].hdType
res.data.forEach((i)=>{
this.tabs.push({
title:i.hdType,
api:i.id,
messageList:[],
loading: false,
finished: false,
refreshing:false,
})
})
if(sessionStorage.getItem('type')){
this.hdType=sessionStorage.getItem('type')
var j=0
this.tabs.forEach((i)=>{
if(i.title==this.hdType){
this.active=j
}
j++;
})
}else{
this.hdType=res.data[0].hdType
}
this.$toast.clear();
})
.catch(err => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
postList(val) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
let obj = {
cycle: this.id,
hdType:this.hdType,
pageNum:this.page,
pageSize:this.psize,
};
postFun("patrol/running/list?cycle="+this.id+'&hdType='+this.hdType+'&pageNum='+this.page+'&pageSize='+this.psize)
.then(res => {
res.rows.forEach((item)=>{
this.tabs.forEach((i)=>{
if(i.title==this.hdType){
i.messageList.push(item)
}
})
})
this.$toast.clear();
this.total=res.total
this.page++;
this.tabs.forEach((i)=>{
if(i.title==this.hdType){
if (i.messageList.length>=this.total) {
i.finished = true;
}
i.loading = false;
}
})
//防止分页超出操作
// if(!(this.page*5-this.total>=0)){
// this.page++;
// }
})
.catch(err => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
operation(val, index,item) {
console.log(val)
if(val == 1){
return
}
console.log(item)
// 如果不合格跳转到隐患上报页面
this.$dialog
.confirm({
title: "提示",
message: "确定跳转到隐患上报页面吗?"
})
.then(() => {
this.$router.push({
name: "addDanger",
});
var obj={
id:item.id,
proId:item.proId,
hdRange:item.hdRange,
hdType:item.hdType,
hdName:item.hdName,
hdId:item.hdId,
hdLev:item.hdLev,
}
sessionStorage.setItem('obj',JSON.stringify(obj))
})
.catch(() => {
item.result = 1
});
},
finish() {
this.$dialog
.confirm({
title: "提示",
message: "确定提交吗?"
}).then(() => {
this.$toast.loading({
message: "提交中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
// let obj2 = {
// cycle: this.id
// };
postFun("patrol/running/save?cycle="+this.id)
.then(res => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000
});
// this.$router.push('/danger-Patrol-Time')
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
})
.catch(() => {
});
},
//下拉页面刷新
onRefresh() {
// 清空列表数据
this.page=1
this.tabs.forEach((i)=>{
if(i.title==this.hdType){
i.loading=true
i.finished=false
}
})
this.onLoad();
},
//上拉页面加载数据
onLoad(value) {
this.tabs.forEach((i)=>{
if(i.title==this.hdType){
if (i.refreshing) {
i.messageList=[]
i.refreshing = false;
}
}
})
this.postList()
},
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list {
padding: 0 0 60px;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
.con_title {
color: #05a7f0;
font-weight: 600;
}
.con_type {
color: #05a7f0;
padding-right: 10px;
}
.cont-end{
display: flex;
justify-content: flex-end;
color: #05a7f0;
padding-right: 12px;
}
}
.con_right {
display: flex;
justify-content: flex-end;
}
.cont-operation {
display: flex;
align-items: center;
margin-top: 10px;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
/deep/.van-tab__pane-wrapper {
min-height: 8rem;
}
.van-tabs__track {
min-height: 3rem;
}
.operation-btn {
width: 95%;
margin: 20px 10px 10px;
position: fixed;
bottom: 1.3333rem;
right: 0;
left: 0;
}
.tip {
width: auto;
height: 28px;
padding: 0 8px;
line-height: 28px;
}
</style>
<template>
<div class="wrap">
<LHeader :text="text"></LHeader>
<!-- 内容列表 -->
<div class="title">{{nowTime}}</div>
<p class="title-text">系统提示:请按照下列巡查清单完成巡查工作。</p>
<div class="con-list">
<van-cell-group
inset
v-for="(item, index) in contentList"
:key="index"
@click="onClick(item)"
>
<div class="icon-wrap">
<span class="icon-img">
<van-image
width="45"
height="45"
style="margin: 0 10px;overflow: hidden; border-radius: 5px;"
:src="item.imgUrl"
/>
</span>
<div class="icon_wrap_text">
<div class="icon_wrap_text1">{{ item.content }}</div>
<span class="icon_wrap_text2" v-if="item.content=='日查清单'">{{ item.startTime| formatDate }}</span>
<span class="icon_wrap_text2" v-else>{{ item.startTime| formatDate }}{{ item.validityTime| formatDate }}</span>
</div>
</div>
</van-cell-group>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import LHeader from "@/components/header.vue";
import { postWork } from "@/service/workbench";
import { getFun, postFun } from "@/service/table.js";
import { timestampToTime } from "@/utils/format";
export default {
name: 'patrolExecute', //巡查执行
components: {
LHeader,
},
props: {
},
data() {
return {
text:'巡查执行',
nowTime:"",
contentList: [
],
contentLists:[
{
title: "1",
imgUrl: require("@/assets/dangerPatrol/day_list.png"),
content: "日查清单"
},
{
title: "2",
imgUrl: require("@/assets/dangerPatrol/week_list.png"),
content: "周查清单"
},
{
title: "3",
imgUrl: require("@/assets/dangerPatrol/half_month_list.png"),
content: "半月查清单"
},
{
title: "4",
imgUrl: require("@/assets/dangerPatrol/month_list.png"),
content: "月查清单"
},
{
title: "5",
imgUrl: require("@/assets/dangerPatrol/quarter_list.png"),
content: "季查清单"
},
{
title: "6",
imgUrl: require("@/assets/dangerPatrol/year_list.png"),
content: "半年查清单"
},
{
title: "7",
imgUrl: require("@/assets/dangerPatrol/year_list.png"),
content: "年查清单"
}
]
}
},
created(){
},
mounted() {
this.nowTime = timestampToTime(new Date(), "DT7", true);
this.loading()
},
methods: {
loading(){
let userInfoData = JSON.parse(localStorage.getItem('LocalUserInfo'))
console.log('userInfoData==>>',userInfoData.userId)
let params = {
// userId: userInfoData.userId,
status:'0'
}
getFun("risk/riskUserPatrol/list", params).then((res) => {
this.contentLists.forEach((x)=>{
res.rows.forEach((y)=>{
if(x.title==y.patrolType){
x.startTime=y.startTime
x.validityTime=y.validityTime
this.contentList.push(x)
}
})
})
console.log(this.contentList)
// this.contentList.forEach((x)=>{
// res.data.forEach((y)=>{
// if(x.title==y.cycle){
// x.start
// }
// })
// })
})
},
onClick(val) {
console.log(val)
sessionStorage.removeItem('type')
this.$router.push({
name: "implement",
query:{
id:val.title,
content:val.content
}
});
}
},
filters: {
  formatDate (time) {
     return timestampToTime(time, "DT7", true)
  }
}
}
</script>
<style scoped lang='less'>
.wrap {
height: 100vh;
width: 100vw;
}
.van-cell-group--inset {
// height: 2.266667rem;
line-height: 2.266667rem;
font-size: 0.42rem;
font-weight: bolder;
margin: 0.266667rem;
padding-left: 0.666667rem;
color: #646566;
.icon-wrap {
display: flex;
align-items: center;
.icon-img {
margin-right: 0.533333rem;
display: inherit;
}
.icon_wrap_text{
width: 100%;
// padding-top: 0.3rem;
padding-bottom: 0.3rem;
position: relative;
.icon_wrap_text1{
margin-top: -0.3rem;
}
.icon_wrap_text2{
position: absolute;
left: 0%;
top: 15%;
font-size: 0.35rem;
color: #C1C1C1;
}
}
}
}
.title{
text-align: left;
font-weight: bolder;
margin-top: 0.5rem;
font-size: 13px;
padding-left: 0.666667rem;
}
.title-text{
font-size: 13px;
padding-left: 0.666667rem;
}
</style>
<template>
<div class="wrap">
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
</div>
</template>
<script type="text/ecmascript-6">
import LHeader from "@/components/header.vue";
export default {
name: 'patrolLog', //巡查记录
components: {
LHeader,
},
props: {
},
data() {
return {
text:'巡查记录',
}
},
computed: {
},
watch: {
},
created(){
},
mounted() {
},
methods: {
},
}
</script>
<style scoped lang='less'>
.wrap {
height: 100vh;
width: 100vw;
}
</style>
<template>
<div class="wrap">
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
</div>
</template>
<script type="text/ecmascript-6">
import LHeader from "@/components/header.vue";
import * as echarts from "echarts";
export default {
name: 'patrolStatistics', //巡查统计
components: {
LHeader,
},
props: {
},
data() {
return {
text:'巡查统计',
}
},
computed: {
},
watch: {
},
created(){
},
mounted() {
},
methods: {
myEcharts(data) {
var xData=[]
var seriesData=[]
data.forEach((i)=>{
xData.push(i.date)
seriesData.push(i.hdNumber)
})
var myChart = echarts.init(document.getElementById("box"));
//配置图表
var option = {
xAxis: {
type: "category",
data: xData
},
yAxis: {
type: "value"
},
dataZoom: [
{
type: 'inside',
start: 0,
end: 20
},
{
start: 0,
end: 20
}
],
series: [
{
data: seriesData,
type: "line"
}
]
};
myChart.setOption(option);
}
},
}
</script>
<style scoped lang='less'>
.wrap {
height: 100vh;
width: 100vw;
}
</style>
...@@ -30,6 +30,18 @@ ...@@ -30,6 +30,18 @@
/> />
</van-grid> </van-grid>
</van-cell-group> </van-cell-group>
<van-cell-group inset v-if="finalRiskPatrol.length > 0">
<van-cell value="风险巡查管理" />
<van-grid :column-num="4">
<van-grid-item
@click="dangerJump(item.path)"
v-for="item in finalRiskPatrol"
:key="item.key"
:icon="item.imgUrl"
:text="item.text"
/>
</van-grid>
</van-cell-group>
<!-- <van-cell-group inset v-for="(item, index) in riskList" :key="index"> <!-- <van-cell-group inset v-for="(item, index) in riskList" :key="index">
<van-cell :value="item.menuName" /> <van-cell :value="item.menuName" />
<van-grid :column-num="5"> <van-grid :column-num="5">
...@@ -152,7 +164,47 @@ export default { ...@@ -152,7 +164,47 @@ export default {
text: "风险台账" text: "风险台账"
} }
], ],
riskPatrol:[
{
key: "1",
path: "/patrolExecute",
imgUrl: require("@/assets/workbench/risk-account.png"),
text: "巡查执行"
},
{
key: "2",
path: "/patrolCancle",
imgUrl: require("@/assets/workbench/u9177.png"),
text: "巡查取消"
},
{
key: "3",
path: "/patrolLog",
imgUrl: require("@/assets/workbench/plane-approval.png"),
text: "巡查记录"
},
{
key: "4",
path: "/patrolApprove",
imgUrl: require("@/assets/workbench/inspect-plane.png"),
text: "巡查审批"
},
{
key: "5",
path: "/abnormalDeal",
imgUrl: require("@/assets/workbench/danger-report.png"),
text: "异常处置"
},
{
key: "6",
path: "/patrolStatistics",
imgUrl: require("@/assets/workbench/danger-account.png"),
text: "巡查统计"
},
],
finalRiskList: [], finalRiskList: [],
finalRiskPatrol: [],
images: [ images: [
{ {
url: require("@/assets/workbench/u47.png") url: require("@/assets/workbench/u47.png")
...@@ -201,6 +253,14 @@ export default { ...@@ -201,6 +253,14 @@ export default {
} else { } else {
this.finalRiskList = []; this.finalRiskList = [];
} }
if (this.powerObj.风险巡查管理) {
this.finalRiskPatrol = [...this.riskPatrol].filter(x =>
[...this.powerObj.风险巡查管理].some(y => `/${y.path}` == x.path)
);
console.log(' this.finalRiskPatrol==>>', this.finalRiskPatrol)
} else {
this.finalRiskPatrol = [];
}
} else { } else {
this.powerObj = {}; this.powerObj = {};
} }
......
...@@ -3,18 +3,19 @@ module.exports = { ...@@ -3,18 +3,19 @@ module.exports = {
devServer: { devServer: {
open: true, open: true,
host: "localhost", host: "localhost",
port: 8080, port: 8081,
https: false, https: false,
//以上的ip和端口是我们本机的;下面为需要跨域的 //以上的ip和端口是我们本机的;下面为需要跨域的
proxy: { proxy: {
//配置跨域 //配置跨域
"/app-api": { "/app-api": {
target: "http://192.168.4.232:8080/", //这里是后台的地址 // target: "http://192.168.4.232:8080/", //这里是后台的地址
// target: "http://localhost:8080/", //这里是后台的地址 // target: "http://localhost:8080/", //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址 // target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: "http://192.168.10.137:8080/", //这里是周昊的地址 // target: "http://192.168.10.137:8080/", //这里是周昊的地址
// target: "http://192.168.15.230:8080/", //这里是晓静的地址 // target: "http://192.168.15.230:8080/", //这里是晓静的地址
// target: 'http://localhost:8081/', //这里是后台的地址 // target: 'http://localhost:8081/', //这里是后台的地址
target: 'http://127.0.0.1:8080', //这里是后台的地址
ws: true, ws: true,
changOrigin: true, //允许跨域 changOrigin: true, //允许跨域
// logLevel: 'debug', // 显示代理调试信息 // logLevel: 'debug', // 显示代理调试信息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment