Commit c8448cea authored by 薄玉虎's avatar 薄玉虎

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

parents 344102b5 08cd0978
......@@ -13,7 +13,8 @@
<header class="header">
<van-icon @click="to" name="arrow-left" class="iconColorLeft"/>
<span>{{text}}</span>
<van-icon name="bars" class="iconColorRight"/>
<!-- 为止有什么用图标注释 -->
<!-- <van-icon name="bars" class="iconColorRight"/> -->
</header>
</div>
</template>
......
......@@ -12,7 +12,7 @@ router.beforeEach(async(to, from, next) => {
const hasToken = getToken()//确定用户是否已登录
if (hasToken) {
if (to.path === '/login2') {
next({ path: '/message-center' })
next({ path: '/save-workbench' })
} else {
next()
}
......
......@@ -526,7 +526,7 @@ const routes = [{
path: '/risk-big-detail',
name: 'risk-big-detail',
meta: {
title: '风险历史台账',
title: '风险详情',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAccount/riskBigDetail'),
......
......@@ -85,7 +85,7 @@ export default {
setUserInfo(userInfo)
})
setToken(Response.data)
this.$router.push('/message-center')
this.$router.push('/save-workbench')
}else if(Response.code==301){
this.$toast.clear()
this.$toast.fail({
......@@ -103,7 +103,7 @@ export default {
.login {
background-size: cover;
background-repeat: no-repeat;
background-position: center;
// background-position: center;
background-attachment: fixed;
.login-logo {
width: 120px;
......
......@@ -110,6 +110,7 @@ export default {
this.$router.push({
name: 'list',
query:{
name:'formwork',
planItemId:item2.id,
planId:this.id,
checkitem:item2.checkItem,//检查项目
......
......@@ -54,6 +54,7 @@
:rules="[{ required: true, message: '请填写问题描述' }]"
/>
<van-field
v-if="islay"
v-model="checkBasis"
name="法律依据"
label="法律依据"
......@@ -62,12 +63,12 @@
/>
<van-field name="uploader" label="图像上传" :rules="[{ required: true, message: '请上传图像' }]">
<template #input>
<van-uploader v-model="uploaderImg" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderImg" />
</template>
</van-field>
<van-field name="uploader2" label="视频上传" :rules="[{ required: true, message: '请上传视频' }]">
<template #input>
<van-uploader v-model="uploaderVideo" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderVideo" />
</template>
</van-field>
<div style="margin: 0.5rem">
......@@ -106,19 +107,21 @@ export default {
id:'',//检查执行id
ids:[],//下拉框选中值数组id
planId:'',//不合格跳转进本页面所传列表id
planItemId:''//不合格跳转进本页面所传列id
planItemId:'',//不合格跳转进本页面所传列id
islay:false,//是否显示法律依据
}
},
mounted() {
if(this.$route.query.id){
this.id=this.$route.query.id
}
if(this.$route.name=='list'&&this.$route.query.checkitem){
if(this.$route.query.name=='formwork'){
this.problemName=this.$route.query.checkitem,//检查项目
this.problemDescribe=this.$route.query.checkContent,//检查内容
this.checkBasis=this.$route.query.checkBasis//法律依据
this.planId=this.$route.query.planId
this.planItemId=this.$route.query.planItemId
this.planItemId=this.$route.query.planItemId,
this.islay=true
}
this.init()
},
......
......@@ -122,7 +122,7 @@
:value="findTime"
label="隐患发现时间"
placeholder="点击选择日期"
@click="showFindTime = true"
@click="showFindTime = true; currentDate = new Date()"
:rules="[{ required: true, message: '隐患发现时间不能为空' }]"
/>
<van-popup v-model="showFindTime" position="bottom">
......@@ -209,13 +209,13 @@
<van-field name="hdPicture1" label="隐患照片">
<template #input>
<van-uploader v-model="uploaderImg" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderImg" />
</template>
</van-field>
<van-field name="hdVideo1" label="隐患视频">
<template #input>
<van-uploader v-model="uploaderVideo" accept="video/*" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderVideo" accept="video/*" />
</template>
</van-field>
<van-field
......@@ -225,7 +225,7 @@
:value="expireTime"
label="隐患到期时间"
placeholder="点击选择日期"
@click="showExpireTime = true"
@click="showExpireTime = true; currentDate = new Date()"
/>
<van-popup v-model="showExpireTime" position="bottom">
<van-datetime-picker
......@@ -289,6 +289,7 @@ export default {
},
activated() {
this.taskId = this.$route.params.taskId;
console.log(this.taskId );
if (this.taskId) {
this.isShowreturnCause = true;
this.text = "隐患上报退回";
......@@ -302,6 +303,7 @@ export default {
},
beforeRouteLeave(to, from, next) {
if (to.name != "choose-people") {
this.text = "新增隐患",
this.projectId = ""; // 所属工程
this.taskId = "";
this.projectName = "";
......@@ -337,6 +339,7 @@ export default {
this.columnsRecPeople = [];
this.isShowreturnCause = false;
this.returnCause = ""; // 退回原因
this.currentDate = new Date()
}
next();
},
......@@ -544,6 +547,7 @@ export default {
onConFindTime(date) {
this.findTime = timestampToTime(date, "DT1", true);
this.showFindTime = false;
// this.currentDate = new Date()
},
// 风险源
onConSource(value) {
......@@ -582,6 +586,7 @@ export default {
onConExpireTime(date) {
this.expireTime = timestampToTime(date, "DT1", true);
this.showExpireTime = false;
// this.currentDate = new Date()
},
// 隐患整改人
onConRecPeople(value) {
......
......@@ -67,13 +67,13 @@
<van-field name="uploader" label="整改照片" :rules="[{ required: true, message: '整改照片不能为空' }]">
<template #input>
<van-uploader v-model="uploaderImg" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderImg" />
</template>
</van-field>
<van-field name="uploader2" label="整改视频">
<template #input>
<van-uploader v-model="uploaderVideo" accept="video/*" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderVideo" accept="video/*" />
</template>
</van-field>
......
......@@ -14,7 +14,7 @@
:value="delayTime"
label="延期时间"
placeholder="点击选择日期"
@click="showDelayTime = true"
@click="showDelayTime = true; currentDate = new Date()"
:rules="[{ required: true, message: '延期时间不能为空' }]"
/>
<van-popup v-model="showDelayTime" position="bottom">
......
......@@ -3,7 +3,7 @@
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -42,7 +42,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
......@@ -112,6 +112,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
......@@ -59,7 +59,7 @@
:value="value"
label="整改截止时间"
placeholder="点击选择日期"
@click="showCalendar = true"
@click="showCalendar = true;currentDate = new Date()"
:rules="[{ required: true, message: '请选择日期' }]"
/>
<van-popup v-model="showCalendar" position="bottom">
......@@ -197,6 +197,7 @@ export default {
vm.returnReason = "";
vm.getFormList();
// 清空数据
vm.currentDate = new Date()
}
});
},
......
......@@ -4,7 +4,7 @@
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -33,7 +33,7 @@
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
......@@ -102,6 +102,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
......@@ -4,7 +4,7 @@
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -33,7 +33,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
......@@ -110,6 +110,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
......@@ -9,6 +9,7 @@
>
<van-field
v-model="applyDate"
readonly
name="applyDate"
label="延期时间"
placeholder="请输入"
......
......@@ -4,7 +4,7 @@
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -33,7 +33,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
......@@ -124,6 +124,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
......@@ -4,7 +4,7 @@
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -32,7 +32,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
......@@ -122,6 +122,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
......@@ -3,7 +3,7 @@
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -37,7 +37,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goSubmit(item)"
>上报</van-button
>
......@@ -106,6 +106,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
......@@ -3,7 +3,7 @@
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -41,7 +41,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
......@@ -111,6 +111,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......@@ -128,10 +129,11 @@ export default {
},
// 确认
goConfirm(data) {
localStorage.setItem('reviewdanger_params',JSON.stringify(data))
this.$router.push({
name: "review-add",
params: {
data: data,
data,
}
});
this.showIndex = null;
......
......@@ -39,8 +39,6 @@
<div class="detail">详情</div>
</van-cell-group>
<van-form
@submit="onSubmit"
:show-error='false'
......@@ -76,7 +74,7 @@
label="隐患复查照片"
>
<template #input>
<van-uploader v-model="uploaderImg" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderImg" />
</template>
</van-field>
</div>
......@@ -127,10 +125,12 @@ export default {
};
},
beforeRouteEnter(to, from, next) {
console.log('执行了此钩子')
next(vm => {
if (from.name === "review-danger") {
if (from.name === "review-danger"||from.name=="normal-detail") {
vm.messageList = [];
let paramsData = to.params.data;
// 修改bug回退获取不到参数有参数的用参数没参数的话用本地缓存
let paramsData = to.params.data||JSON.parse(localStorage.getItem('reviewdanger_params'));
vm.taskId = paramsData.taskId;
vm.messageList.push(paramsData);
vm.radio= "1";
......@@ -140,7 +140,9 @@ export default {
}
});
},
created() {},
created() {
console.log('执行了此钩子1')
},
methods: {
selectResult(val) {
this.radio = val;
......
......@@ -3,7 +3,7 @@
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -43,7 +43,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
......@@ -110,6 +110,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
......@@ -4,7 +4,7 @@
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -31,7 +31,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
......@@ -118,6 +118,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
......@@ -20,10 +20,10 @@
<van-tab title="消息信息" name="消息信息" :badge="messageNewsNum>0?messageNewsNum : ''">
<message-news @messageLength="getMessageLength"></message-news>
</van-tab>
<van-tab title="待办事项" name="待办事项" badge="">
<van-tab title="" name="" disabled badge="">
<wait-event></wait-event>
</van-tab>
<van-tab title="通知公告" name="通知公告" badge="">
<van-tab title="" name="" disabled badge="">
<notice-info></notice-info>
</van-tab>
</van-tabs>
......
......@@ -14,12 +14,12 @@
</div>
<!-- 搜索 -->
<div class="search-wrap">
<!-- <div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @search="onSearch" />
</div>
</div> -->
<!-- 内容列表 -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<!-- <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
v-model="loading"
......@@ -34,7 +34,7 @@
@click="touchstart(index, item)"
>
<!--@touchend.prevent="touchend(index)" 长按备份-->
<div class="messgae-title">{{ item.noticeTitle }}</div>
<div class="messgae-title"><span>{{ item.noticeTitle }}</span> <span>{{item.sendTime}}</span> </div>
<div class="message-content">
{{ item.upcomingUserName }},您好!您有一条来自{{
item.createUserName
......@@ -43,18 +43,15 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<van-overlay :show="showIndex == index" >
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
<!-- @touchstart="goDetail(item)" 长按备份-->
<van-button round type="info" @click="goConfirm(item)"
>整改</van-button
>查看</van-button
>
<van-button
round
type="warning"
type="info"
@click="read(item)"
v-if="item.status == '未读'"
>已读</van-button
......@@ -203,7 +200,7 @@ export default {
// clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
// return;
return;
}
this.showIndex = index;
// this.Loop = setTimeout(
......@@ -222,10 +219,7 @@ export default {
goDetail(data) {
this.showIndex = null;
},
// 整改
goConfirm(data) {
this.showIndex = null;
}
}
};
</script>
......@@ -266,12 +260,18 @@ export default {
}
// 内容
.con-list {
margin-top: .266667rem;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.messgae-title{
display: flex;
justify-content: space-between;
align-items: center;
}
.message-content {
margin-top: 10px;
......
......@@ -35,15 +35,41 @@
</van-tab>
<van-tab title="问题记录">
<van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup">
<div class="card" v-for="(item,index) in noticeQuestionList" :key="index" >
<van-checkbox :name="item.id" :disabled="finish=='true'?true:item.checkSubmitId?true:false">问题{{item.id}}</van-checkbox>
<div>负责人姓名:{{item.realName}}</div>
<div>问题名称:{{item.title}}</div>
<div>问题位置:{{item.address}}</div>
<div>问题内容:{{item.context}}</div>
<div>发现时间:{{item.checkTime}}</div>
<div class="card" v-for="(item,index) in noticeQuestionList" :key="index">
<van-overlay @click.stop="close(item)" :show="item.show" >
<van-button round type="primary" size="small" @click.stop="update(index,item)">修改</van-button>
<van-button round type="primary" size="small" @click.stop="cardCommit(item)">提交</van-button>
</van-overlay>
<van-checkbox :name="item.id" :disabled="finish=='true'?true:item.checkSubmitId?true:false">问题{{index+1}}</van-checkbox>
<div @click="cardClick(item)">
<div>负责人姓名:{{item.realName}}</div>
<div>问题名称:{{item.title}}</div>
<div>问题位置:{{item.address}}</div>
<div>问题内容:{{item.context}}</div>
<div>发现时间:{{item.checkTime}}</div>
</div>
</div>
</van-checkbox-group>
<van-dialog v-model="dialogShow" @confirm="commitDialog()" :title="dialogTitle" show-cancel-button>
<van-field
v-model="updateObj.title"
name="问题名称"
label="问题名称"
placeholder="问题名称"
/>
<van-field
v-model="updateObj.address"
name="问题位置"
label="问题位置"
placeholder="问题位置"
/>
<van-field
v-model="updateObj.context"
name="问题内容"
label="问题内容"
placeholder="问题内容"
/>
</van-dialog>
<div class="page-footer">
<van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick" :disabled="finish=='true'?true:false">全选</van-checkbox>
</div>
......@@ -66,6 +92,7 @@
</van-tab>
</van-tabs>
<tab-bar :index="1"></tab-bar>
</div>
</template>
......@@ -81,6 +108,7 @@ export default {
},
data() {
return {
dialogShow:false,//弹框是否显示
istext:true,//是否显示文字
isImg:false,//是否显示图片
istext2:true,//是否显示文字2
......@@ -98,6 +126,14 @@ export default {
showCalendar: false,//弹出层状态
finish:'',//检查状态
isFinish:false,//提交状态
dialogTitle:'标题',//弹框标题
//修改问题对象
updateObj:{
id:'',//问题ID
title:'',//问题名称
address:'',//问题位置
context:''//问题内容
},
}
},
watch:{
......@@ -184,6 +220,12 @@ export default {
/* ---新增---- */
this.isFinish=Response.data.isFinish
this.noticeQuestionList=Response.data.list
//初始化每个div的弹框,遮罩层显示状态
this.noticeQuestionList.forEach((item)=>{
item.show=false
item.dialogShow=false
})
console.log(this.noticeQuestionList)
/* ----详情---- */
if(this.isFinish){
//获取选中状态数组
......@@ -320,17 +362,82 @@ export default {
this.$toast.fail('提交失败,请稍后再试')
})
})
},
//卡片单击事件
cardClick(item){
item.show=true
this.$forceUpdate()//强制刷新
},
//关闭遮罩层事件
close(item){
item.show=false
this.$forceUpdate()//强制刷新
},
//修改卡片值
update(index,item){
item.show=false
this.dialogShow=true
//把列表可编辑数据回显到弹框表单中
this.dialogTitle='问题'+(index+1),//标题
this.updateObj.id=item.id,//问题ID
this.updateObj.title=item.title,//问题名称
this.updateObj.address=item.address,//问题位置
this.updateObj.context=item.context//问题内容
this.$forceUpdate()//强制刷新
},
//卡片提交
cardCommit(item){
item.show=false
this.$forceUpdate()//强制刷新
this.$toast.loading({
message:'提交中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
})
postFun('check/trouble/update',this.updateObj).then((Response)=>{
if(Response.code==0){
this.$toast.clear()
this.$toast.success('提交成功')
}
}).catch(()=>{
this.$toast.clear()
this.$toast.fail('提交失败,请稍后再试')
})
},
//弹框数据提交
commitDialog(){
this.noticeQuestionList.forEach((item)=>{
if(item.id=this.updateObj.id){
item.title=this.updateObj.title,//问题名称
item.addressthis.updateObj.address,//问题位置
item.context=this.updateObj.context//问题内容
}
})
this.$forceUpdate()//强制刷新
}
}
}
</script>
<style lang="less" scoped>
.card{
position: relative;
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
.van-overlay {
display:flex;
justify-content: space-evenly;
align-items: center;
.van-button{
width: 30%;
margin-top: 0;
}
text-align: center;
position: absolute;
}
}
.card div{
font-size: 0.4rem;
......
......@@ -4,7 +4,7 @@
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -36,7 +36,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
......@@ -123,6 +123,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
......@@ -215,7 +215,7 @@ export default {
data() {
return {
id: "",
text: "风险历史台账",
text: "风险详情",
riskOpen: false,
riskOpenText: "展开 ▼",
journalOpen: false,
......
......@@ -120,7 +120,7 @@
<van-field
readonly
clickable
name="setRank"
name="riskRank"
:value="riskRank"
label="风险等级"
placeholder="请选择"
......@@ -146,6 +146,7 @@
/> -->
<van-field
v-show="showSetRankMode"
v-model="setRankMode"
name="setRankMode"
label="定级方式"
......@@ -154,9 +155,9 @@
autosize
placeholder="请输入"
/>
<van-field name="setRankModeFile" label=" ">
<van-field name="setRankModeFile" label=" " v-show="showSetRankMode">
<template #input>
<van-uploader v-model="setRankModeImg" accept="file" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="setRankModeImg" accept="file" />
</template>
</van-field>
......@@ -239,7 +240,7 @@
/>
<van-field name="technologyFile" label=" ">
<template #input>
<van-uploader v-model="technologyImg" accept="file" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="technologyImg" accept="file" />
</template>
</van-field>
......@@ -254,7 +255,7 @@
/>
<van-field name="administrationFile" label=" ">
<template #input>
<van-uploader v-model="administrationImg" accept="file" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="administrationImg" accept="file" />
</template>
</van-field>
......@@ -269,7 +270,7 @@
/>
<van-field name="urgentFile" label=" ">
<template #input>
<van-uploader v-model="urgentImg" accept="file" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="urgentImg" accept="file" />
</template>
</van-field>
......@@ -315,11 +316,19 @@ export default {
this.$bus.$on("riskLevelBus", res => {
this.showSetRank = false // 再次关闭弹出层 以防万一
this.riskRank = res
console.log(Boolean(res))
if(res){
this.riskRank = res
}else{
this.setRank = ""
}
// 销毁一下监听事件 不然会越加越多
this.$bus.$off('riskLevelBus', this.myhandle)
});
},
beforeRouteLeave(to, from, next) {
if (to.name != "matrix-grad") {
this.text = "新增风险",
this.taskId = "",
this.id = "",
this.projectId = "", // 所属工程
......@@ -390,6 +399,7 @@ export default {
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank: ["一般风险", "较小风险", "较大风险", "重大风险"],
showSetRankMode: false, // 是否显示定级方式
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
location: "", //风险部位
......@@ -637,7 +647,16 @@ export default {
cancel() {
this.$router.go(-1);
}
}
},
watch:{
setRank(newVal, oldVal){
if(newVal == '其他定级方式'){
this.showSetRankMode = true
}else{
this.showSetRankMode = false
}
}
},
};
</script>
<style scoped>
......
......@@ -86,6 +86,7 @@ export default {
message: "提交成功",
duration: 2000
});
this.$bus.$emit("riskLevelBus", res.data.evaluateLevel)
history.go(-1);
})
......@@ -96,7 +97,9 @@ export default {
},
cancel() {
this.$bus.$emit("riskLevelBus", 0)
this.$router.go(-1);
}
}
};
......
......@@ -4,7 +4,7 @@
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -45,7 +45,7 @@
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
......@@ -117,6 +117,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
......@@ -3,7 +3,7 @@
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
......@@ -46,7 +46,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>上报</van-button
>
......@@ -117,6 +117,7 @@ export default {
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
......
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