Commit 7eb7bf7f authored by 罗新东's avatar 罗新东

修复了视屏无法播放的bug

parent bf784c55
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-esign": "^1.0.5", "vue-esign": "^1.0.5",
"vue-router": "^3.0.7", "vue-router": "^3.0.7",
"vue-video-player": "^5.0.2",
"vue2-verify": "^1.1.5", "vue2-verify": "^1.1.5",
"vuex": "^3.1.2" "vuex": "^3.1.2"
}, },
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</keep-alive> </keep-alive>
</transition> </transition>
<div :style="{height:tabH}"></div> <div :style="{height:tabH}"></div>
<tab-bar :index="1" v-if="showTab"></tab-bar> <tab-bar v-if="showTab"></tab-bar>
</div> </div>
</template> </template>
...@@ -94,6 +94,7 @@ export default { ...@@ -94,6 +94,7 @@ export default {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
// z-index:999999999999
} }
.router-view { .router-view {
......
<template>
<div class="player">
<van-icon name="close" size="1rem" color="red" style="top:27%" @click="$emit('close')"/>
<video-player
style="position: absolute;
top: 50%;
width: 100%;
transform: translateY(-50%);"
class="video-player vjs-custom-skin"
ref="videoPlayer"
:options="playerOptions"
:playsinline="true" >
</video-player>
</div>
</template>
<script>
import Vue from "vue";
import VideoPlayer from "vue-video-player";
require("video.js/dist/video-js.css");
require("vue-video-player/src/custom-theme.css");
Vue.use(VideoPlayer);
export default {
name: "customPlayer",
data() {
return {
playerOptions: {
height: "360",
autoplay: true, // true:浏览器准备好时开始回放。
muted: false, // true:默认情况下将会消除任何音频。
language: "zh-CN",
// aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
preload: 'auto', // 建议浏览器在加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
playbackRates: [0.7, 1.0, 1.5, 2.0],
sources: [
{
type: "video/mp4",
src:this.videoUrl,
},
],
// poster: "https://surmon-china.github.io/vue-quill-editor/static/images/surmon-1.jpg", // 你的封面地址
poster:this.videoImg,
notSupportedMessage: "此视频暂无法播放,请稍后再试", // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
controlBar: {
timeDivider: true, //当前时间和持续时间的分隔符
durationDisplay: true, //显示持续时间
remainingTimeDisplay: false, //是否显示剩余时间功能
fullscreenToggle: true, // 全屏按钮
},
},
};
},
props: {
"videoUrl": {
type: String,
required: true
},
"videoImg": {
type: String,
required: true,
default:"https://surmon-china.github.io/vue-quill-editor/static/images/surmon-1.jpg"
}
},
mounted() {},
methods: {},
};
</script>
<style lang="less">
.player{
height: 100vh;
position: fixed;
z-index: 1000000000;
width: 100vw;
background-color: rgba(0, 0, 0, 0.5);
text-align: center;
}
//播放按钮样式
.video-player.vjs-custom-skin > .video-js .vjs-big-play-button{
width: 60px !important;
height:35px !important;
line-height: 35px !important;
border-radius: 5px !important;
font-size: 2.5em !important;
}
.vjs-custom-skin > .video-js .vjs-big-play-button {
top: 53%;
}
.vjs-poster{
border-radius: 10px i !important;
}
</style>
\ No newline at end of file
...@@ -17,17 +17,20 @@ import './permission' ...@@ -17,17 +17,20 @@ import './permission'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import { prefix } from '@/common/js/utils' import { prefix } from '@/common/js/utils'
import { Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit, AddressList, Field, CellGroup, Cell, SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem, PullRefresh, List, Tab, Tabs, GoodsAction, GoodsActionIcon, GoodsActionButton, SubmitBar, Toast ,Search,Picker,Uploader,Notify ,ContactList,Calendar,Radio,RadioGroup,Tag,Tabbar,TabbarItem,Sticky, Grid, GridItem,Skeleton,Col,Row, Image as VanImage, Badge,NoticeBar,DatetimePicker, import { Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit, AddressList, Field, CellGroup, Cell, SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem, PullRefresh, List, Tab, Tabs, GoodsAction, GoodsActionIcon, GoodsActionButton, SubmitBar, Toast ,Search,Picker,Uploader,Notify ,ContactList,Calendar,Radio,RadioGroup,Tag,Tabbar,TabbarItem,Sticky, Grid, GridItem,Skeleton,Col,Row, Image as VanImage, Badge,NoticeBar,DatetimePicker,
Step, Steps } from 'vant' Step, Steps, ImagePreview } from 'vant'
import 'lib-flexible/flexible' import 'lib-flexible/flexible'
import vueEsign from 'vue-esign' import vueEsign from 'vue-esign'
import VideoPlayer from 'vue-video-player'
// 全局过滤器 // 全局过滤器
import filters from "@/utils/filters.js" import filters from "@/utils/filters.js"
Vue.use(vueEsign)
Vue.prototype.util = util Vue.prototype.util = util
Vue.use(vueEsign)
Vue.use(VideoPlayer)
Vue.use(Divider).use(Popup).use(Overlay).use(Loading).use(Dialog).use(Toast).use(ContactCard).use(Form).use(AddressEdit).use(AddressList).use(Field).use(CellGroup).use(Cell).use(SwipeCell).use(Icon).use(Stepper).use(Card).use(Button).use(Swipe).use(SwipeItem).use(PullRefresh).use(List).use(Tab).use(Tabs).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton).use(SubmitBar).use(Checkbox).use(CheckboxGroup).use(Search).use(Picker).use(Uploader).use(Notify) Vue.use(Divider).use(Popup).use(Overlay).use(Loading).use(Dialog).use(Toast).use(ContactCard).use(Form).use(AddressEdit).use(AddressList).use(Field).use(CellGroup).use(Cell).use(SwipeCell).use(Icon).use(Stepper).use(Card).use(Button).use(Swipe).use(SwipeItem).use(PullRefresh).use(List).use(Tab).use(Tabs).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton).use(SubmitBar).use(Checkbox).use(CheckboxGroup).use(Search).use(Picker).use(Uploader).use(Notify)
.use(ContactList).use(Calendar).use(Radio).use(RadioGroup).use(Tag).use(Tabbar).use(TabbarItem).use(Sticky) .use(ContactList).use(Calendar).use(Radio).use(RadioGroup).use(Tag).use(Tabbar).use(TabbarItem).use(Sticky)
.use(Grid).use(GridItem).use(Skeleton).use(Col).use(Row).use(VanImage).use(Badge).use(NoticeBar).use(DatetimePicker) .use(Grid).use(GridItem).use(Skeleton).use(Col).use(Row).use(VanImage).use(Badge).use(NoticeBar).use(DatetimePicker)
.use(Step).use(Steps) .use(Step).use(Steps).use(ImagePreview)
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ new Vue({
router, router,
......
...@@ -605,7 +605,17 @@ const routes = [{ ...@@ -605,7 +605,17 @@ const routes = [{
index:1 index:1
}, },
component:()=>import('@/views/danger/insertDanger/list') component:()=>import('@/views/danger/insertDanger/list')
} },
{
path:'/video',
name:'video-play',
meta:{
title:'视屏播放',
index:1
},
component:()=>import('@/components/video')
},
] ]
......
...@@ -30,6 +30,7 @@ service.interceptors.request.use(config => { ...@@ -30,6 +30,7 @@ service.interceptors.request.use(config => {
return Promise.reject(error) return Promise.reject(error)
}) })
service.interceptors.response.use(response => { service.interceptors.response.use(response => {
// console.log(response,'这是接口返回数据')
const res = response.data//获取请求返回数据 const res = response.data//获取请求返回数据
const code = response.status//获取请求响应码 const code = response.status//获取请求响应码
if(code == 200) {//请求响应码200 代表已经请求到接口 if(code == 200) {//请求响应码200 代表已经请求到接口
...@@ -47,8 +48,14 @@ service.interceptors.response.use(response => { ...@@ -47,8 +48,14 @@ service.interceptors.response.use(response => {
removeToken() removeToken()
location.reload() location.reload()
}); });
}else{
Toast.fail({
title: '提示',
message: res.msg||'数据异常请稍后再试',
})
} }
}else{ }else{
console.log('11111111')
Promise.reject(new Error('Error')) Promise.reject(new Error('Error'))
} }
},err=>{ },err=>{
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
/> />
<van-field <van-field
required
readonly readonly
clickable clickable
name="proId" name="proId"
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
placeholder="请选择" placeholder="请选择"
@click="showProjectName = true" @click="showProjectName = true"
:rules="[{ required: true, message: '所属项目不能为空' }]" :rules="[{ required: true, message: '所属项目不能为空' }]"
:class="{gray:isShowreturnCause}" :class="{ gray: isShowreturnCause }"
/> />
<van-popup <van-popup
v-model="showProjectName" v-model="showProjectName"
...@@ -44,6 +45,7 @@ ...@@ -44,6 +45,7 @@
</van-popup> </van-popup>
<van-field <van-field
required
readonly readonly
clickable clickable
name="hdRange" name="hdRange"
...@@ -52,7 +54,7 @@ ...@@ -52,7 +54,7 @@
placeholder="请选择" placeholder="请选择"
@click="showRange = true" @click="showRange = true"
:rules="[{ required: true, message: '适用范围不能为空' }]" :rules="[{ required: true, message: '适用范围不能为空' }]"
:class="{gray:isShowreturnCause}" :class="{ gray: isShowreturnCause }"
/> />
<van-popup <van-popup
v-model="showRange" v-model="showRange"
...@@ -69,6 +71,7 @@ ...@@ -69,6 +71,7 @@
</van-popup> </van-popup>
<van-field <van-field
required
readonly readonly
clickable clickable
name="hdType" name="hdType"
...@@ -77,7 +80,7 @@ ...@@ -77,7 +80,7 @@
placeholder="请选择" placeholder="请选择"
@click="showType = true" @click="showType = true"
:rules="[{ required: true, message: '隐患类型不能为空' }]" :rules="[{ required: true, message: '隐患类型不能为空' }]"
:class="{'gray':isShowreturnCause}" :class="{ gray: isShowreturnCause }"
/> />
<van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause"> <van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause">
<van-picker <van-picker
...@@ -90,6 +93,7 @@ ...@@ -90,6 +93,7 @@
</van-popup> </van-popup>
<van-field <van-field
required
readonly readonly
clickable clickable
name="hdProjectName" name="hdProjectName"
...@@ -98,7 +102,7 @@ ...@@ -98,7 +102,7 @@
placeholder="请选择" placeholder="请选择"
@click="showDangerName = true" @click="showDangerName = true"
:rules="[{ required: true, message: '隐患项目名称不能为空' }]" :rules="[{ required: true, message: '隐患项目名称不能为空' }]"
:class="{gray:isShowreturnCause}" :class="{ gray: isShowreturnCause }"
/> />
<van-popup <van-popup
v-model="showDangerName" v-model="showDangerName"
...@@ -115,6 +119,7 @@ ...@@ -115,6 +119,7 @@
</van-popup> </van-popup>
<van-field <van-field
required
class="gray" class="gray"
v-model="dangerNum" v-model="dangerNum"
readonly readonly
...@@ -124,6 +129,7 @@ ...@@ -124,6 +129,7 @@
:rules="[{ required: true, message: '隐患项目编号不能为空' }]" :rules="[{ required: true, message: '隐患项目编号不能为空' }]"
/> />
<van-field <van-field
required
class="gray" class="gray"
v-model="dangerLevel" v-model="dangerLevel"
readonly readonly
...@@ -134,6 +140,7 @@ ...@@ -134,6 +140,7 @@
/> />
<van-field <van-field
required
readonly readonly
clickable clickable
name="hdDiscoveryTime" name="hdDiscoveryTime"
...@@ -156,6 +163,7 @@ ...@@ -156,6 +163,7 @@
</van-popup> </van-popup>
<van-field <van-field
required
readonly readonly
clickable clickable
name="dangerId" name="dangerId"
...@@ -219,6 +227,7 @@ ...@@ -219,6 +227,7 @@
/> />
<van-field <van-field
required
v-model="describe" v-model="describe"
rows="3" rows="3"
label="隐患描述" label="隐患描述"
...@@ -231,6 +240,7 @@ ...@@ -231,6 +240,7 @@
<van-field name="hdPicture1" label="隐患照片"> <van-field name="hdPicture1" label="隐患照片">
<template #input> <template #input>
<van-uploader <van-uploader
@delete="deleteFile(...arguments,'uploaderImg')"
multiple multiple
:max-count="5" :max-count="5"
upload-text="最多上传五个" upload-text="最多上传五个"
...@@ -265,6 +275,7 @@ ...@@ -265,6 +275,7 @@
<template #input> <template #input>
<van-uploader <van-uploader
multiple multiple
@delete="deleteFile(...arguments,'uploaderVideo')"
:max-count="5" :max-count="5"
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="uploaderVideo" v-model="uploaderVideo"
...@@ -368,7 +379,7 @@ export default { ...@@ -368,7 +379,7 @@ export default {
}, },
activated() { activated() {
this.taskId = this.taskId =
this.$route.params.taskId || localStorage.getItem("dangerAddTaskId"); this.$route.params.taskId || localStorage.getItem("dangerAddTaskId");
console.log(this.taskId); console.log(this.taskId);
if (this.taskId) { if (this.taskId) {
this.isShowreturnCause = true; this.isShowreturnCause = true;
...@@ -475,6 +486,24 @@ export default { ...@@ -475,6 +486,24 @@ export default {
}, },
methods: { methods: {
async deleteFile(val,detail,key){
// console.log(val,detail)
if(val.fileId){
let formdata= new FormData();
formdata.append('key',val['fileId'])
let res = await postFun('/mobile/remove',formdata);
if(res){
console.log(res);
this.$toast({
title:'提示',
message:'删除成功!'
})
} else {
console.log('删除失败');
this[key].splice(detail.index,0,val)
}
}
},
dangerType(danger) { dangerType(danger) {
// 严重隐患 = A // 严重隐患 = A
...@@ -520,18 +549,18 @@ export default { ...@@ -520,18 +549,18 @@ export default {
formdata.append("dangerSource", values.dangerSource); formdata.append("dangerSource", values.dangerSource);
formdata.append("hdPosition", values.hdPosition); formdata.append("hdPosition", values.hdPosition);
formdata.append("hdDescribe", values.hdDescribe); formdata.append("hdDescribe", values.hdDescribe);
formdata.append("hdExpirationTime", values.hdExpirationTime); formdata.append("hdExpirationTime", values.hdExpirationTime||'');
formdata.append("rectificationUser", values.rectificationUser); formdata.append("rectificationUser", values.rectificationUser||'');
console.log(values.hdPicture1,'这是要上传的文件') console.log(values.hdPicture1, "这是要上传的文件");
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式 // 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
values.hdPicture1.forEach((item) => { values.hdPicture1.forEach((item) => {
if(item.file){ if (item.file) {
formdata.append("hdPicture1[]", item.file?item.file:item); formdata.append("hdPicture1[]", item.file);
} }
}); });
values.hdVideo1.forEach((item) => { values.hdVideo1.forEach((item) => {
if(item.file){ if (item.file) {
formdata.append("hdVideo1[]", item.file); formdata.append("hdVideo1[]", item.file);
} }
}); });
this.$toast.loading({ this.$toast.loading({
...@@ -628,11 +657,9 @@ export default { ...@@ -628,11 +657,9 @@ export default {
}; };
}); });
postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then( postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then((res) => {
(res) => { this.columnsRecPeople = res.data;
this.columnsRecPeople = res.data; });
}
);
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
...@@ -769,9 +796,9 @@ export default { ...@@ -769,9 +796,9 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
.gray{ .gray {
/deep/.van-field__control{ /deep/.van-field__control {
color:gray !important; color: gray !important;
} }
} }
</style> </style>
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
</van-sticky> </van-sticky>
<!-- tab标签 --> <!-- tab标签 -->
<van-tabs <van-tabs
color="#2980f7"
@click="onClickTab($event, searchValue)" @click="onClickTab($event, searchValue)"
animated animated
color="#2980F7"
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="3rem"
> >
...@@ -123,6 +123,7 @@ ...@@ -123,6 +123,7 @@
<van-col span="6">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="18">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="18">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
...@@ -136,7 +137,7 @@ ...@@ -136,7 +137,7 @@
<van-col span="18">{{ item.dueDate | formatTime }}</van-col> <van-col span="18">{{ item.dueDate | formatTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row>
...@@ -152,9 +153,9 @@ ...@@ -152,9 +153,9 @@
<van-button round type="info" @click="goDelay(item)" <van-button round type="info" @click="goDelay(item)"
>延期</van-button >延期</van-button
> >
<van-button round type="warning" @click="goClose(item)" <!-- <van-button round type="warning" @click="goClose(item)"
>关闭</van-button >关闭</van-button
> > -->
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
......
<template> <template>
<div> <div>
<van-sticky>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
</van-sticky>
<van-sticky offset-top="1.5rem"> <van-sticky offset-top="1.5rem">
<van-search <van-search
v-model="searchValue" v-model="searchValue"
...@@ -12,84 +14,111 @@ ...@@ -12,84 +14,111 @@
<div @click="onSearch">搜索</div> <div @click="onSearch">搜索</div>
</template> </template>
</van-search> </van-search>
</van-sticky> </van-sticky>
<!-- 内容列表 --> <!-- tab标签 -->
<div class="con-list" @touchmove="showIndex = null"> <van-tabs v-model="active" @change="postList" color="#2980f7" animated
<van-cell-group :sticky="true"
inset offset-top="3rem">
v-for="(item, index) in messageList" <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
:key="index" <div v-show="key == active">
@click="touchstart(index, item)" <div class="con-list" @touchmove="showIndex = null">
> <van-cell-group
<van-row gutter=""> inset
<van-col span="6">隐患编号:</van-col> v-for="(item, index) in messageList"
<van-col span="18">{{ item.businessId }}</van-col> :key="index"
</van-row> @click="touchstart(index, item)"
<van-row gutter=""> >
<van-col span="6">所属项目:</van-col> <van-row gutter="">
<van-col span="18">{{ item.proId }}</van-col> <van-col span="6">隐患编号:</van-col>
</van-row> <van-col span="18">{{ item.businessId }}</van-col>
<van-row gutter=""> </van-row>
<van-col span="6">隐患级别:</van-col> <van-row gutter="">
<van-col span="18">{{ item.hdLev | dangerText }}</van-col> <van-col span="6">所属项目:</van-col>
</van-row> <van-col span="18">{{ item.proId }}</van-col>
<!-- <van-row gutter=""> </van-row>
<van-col span="6">发现时间:</van-col> <van-row gutter="">
<van-col span="18">{{ item.hdDiscoveryTime }}</van-col> <van-col span="6">隐患级别:</van-col>
</van-row> --> <van-col span="18">{{ item.hdLev | dangerText }}</van-col>
<van-row gutter=""> </van-row>
<van-col span="6">适用范围:</van-col> <!--<van-row gutter="">
<van-col span="18">{{ item.hdRange }}</van-col> <van-col span="6">发现时间:</van-col>
</van-row> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
<van-row gutter=""> </van-row> -->
<van-col span="6">隐患类型:</van-col> <van-row gutter="">
<van-col span="18">{{ item.hdType }}</van-col> <van-col span="6">适用范围:</van-col>
</van-row> <van-col span="18">{{ item.hdRange }}</van-col>
<van-row gutter=""> </van-row>
<van-col span="6">超期标识:</van-col> <van-row gutter="">
<van-col span="18">{{ item | formatTime }}</van-col> <van-col span="6">隐患类型:</van-col>
</van-row> <van-col span="18">{{ item.hdType }}</van-col>
</van-row>
<van-row gutter="">
<!-- 长按显示遮罩层 --> <van-col span="6">超期标识:</van-col>
<van-overlay :show="showIndex == index"> <van-col span="18">{{ item | formatTime }}</van-col>
<div class="wrapper" @click.stop ="showIndex = null"> </van-row>
<van-button round type="primary" @click="goDetail(item)" <van-row gutter="">
>详情</van-button <van-col span="6">工单状态</van-col>
> <van-col span="18">{{ item | formatTime }}</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
<div
v-if="messageList.length == 0"
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
>
暂无数据
</div> </div>
</van-overlay> </van-tab>
</van-cell-group> </van-tabs>
</div>
<!-- 暂无数据 -->
<div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
v-if="isHaveNews"
>
暂无数据
</div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { dangerStandBook } from "@/service/danger"; import { dangerStandBook } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar
}, },
data() { data() {
return { return {
text: "隐患历史台账", text: "隐患历史台账",
active: 0,
searchValue: "", searchValue: "",
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
tabs: [
{
title: "已完结",
api: "/hdreport/doneList",
},
{
title: "已挂账",
api: "/hdreport/doneListRectification",
},
{
title: "已整改",
api: "/hdreport/doneListReview",
},
],
}; };
}, },
created() { created() {
...@@ -97,23 +126,22 @@ export default { ...@@ -97,23 +126,22 @@ export default {
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
this.postList(this.searchValue) this.postList(this.searchValue);
}, },
postList(select = "") {
postList(select='') {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
let formdata=new FormData(); let formdata = new FormData();
formdata.append('select',select); formdata.append("select", select);
dangerStandBook("/hdreport/doneList",formdata) postFun(this.tabs[this.active * 1]["api"], formdata)
.then(res => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
} }
...@@ -127,7 +155,7 @@ export default { ...@@ -127,7 +155,7 @@ export default {
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.showIndex = index; this.showIndex = index;
}, },
...@@ -135,26 +163,29 @@ export default { ...@@ -135,26 +163,29 @@ export default {
// 详情 // 详情
goDetail(data) { goDetail(data) {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params:{ params: {
id: data.businessId id: data.businessId,
} },
}); });
this.showIndex = null; this.showIndex = null;
}, },
}, },
filters: { filters: {
formatTime: function(row) { formatTime: function (row) {
if (row.dueDate <= row.rectificationTime) { if (row.dueDate <= row.rectificationTime) {
return "超期" return "超期";
} else if (row.dueDate >= row.rectificationTime && row.dueDate - 259200000 <= row.rectificationTime) { } else if (
//三天 row.dueDate >= row.rectificationTime &&
return "临期" row.dueDate - 259200000 <= row.rectificationTime
} else { ) {
return "正常" //三天
} return "临期";
} } else {
} return "正常";
}
},
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -168,14 +199,14 @@ export default { ...@@ -168,14 +199,14 @@ export default {
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 0.26667rem; margin-bottom: 0.26667rem;
padding: 0.25rem; padding: 0.25rem;
font-size: 0.4rem; font-size: 0.4rem;
position: relative; position: relative;
border-radius: 4%; border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3; box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%; width: 90%;
margin: 0.4rem auto; margin: 0.4rem auto;
.van-row { .van-row {
font-size: 0.4rem; font-size: 0.4rem;
line-height: 0.8rem; line-height: 0.8rem;
......
<template> <template>
<div> <div>
<div v-if="videoUrl">
<custom-player :videoUrl="videoUrl" :videoImg="videoImg" @close="videoUrl=''"/>
</div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="con-list"> <div class="con-list">
<div class="cell-wrap"> <div class="cell-wrap">
<p>隐患上报</p> <p>隐患上报</p>
<van-cell-group inset> <van-cell-group inset>
<van-row gutter="">
<van-col span="7"
><span class="field-title">隐患编号</span></van-col
>
<van-col span="17">{{ hdReport.id }}</van-col>
</van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">所属项目:</span></van-col ><span class="field-title">所属项目:</span></van-col
...@@ -14,43 +24,38 @@ ...@@ -14,43 +24,38 @@
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">隐患项目名称</span></van-col ><span class="field-title">隐患级别</span></van-col
> >
<van-col span="17">{{ hdReport.hdProjectName }}</van-col> <van-col span="17">{{ hdReport.hdLev }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">隐患发现时间</span></van-col ><span class="field-title">适用范围</span></van-col
> >
<van-col span="17">{{ hdReport.hdDiscoveryTime }}</van-col> <van-col span="17">{{ hdReport.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">隐患级别</span></van-col ><span class="field-title">隐患类型</span></van-col
> >
<van-col span="17">{{ hdReport.hdLev }}</van-col> <van-col span="17">{{ hdReport.hdType }}</van-col>
</van-row> </van-row>
<!-- 隐藏的字段 --> <!-- 隐藏的字段 -->
<div v-show="reportOpen"> <div v-show="reportOpen">
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">适用范围</span></van-col ><span class="field-title">隐患项目名称</span></van-col
> >
<van-col span="17">{{ hdReport.hdRange }}</van-col> <van-col span="17">{{ hdReport.hdProjectName }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">隐患类型</span></van-col ><span class="field-title">隐患发现时间</span></van-col
> >
<van-col span="17">{{ hdReport.hdType }}</van-col> <van-col span="17">{{ hdReport.hdDiscoveryTime }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">隐患项目编号</span></van-col
>
<van-col span="17">{{ hdReport.hdProjectId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">风险源:</span></van-col ><span class="field-title">风险源:</span></van-col
...@@ -75,7 +80,7 @@ ...@@ -75,7 +80,7 @@
> >
<van-col span="17">{{ hdReport.hdDescribe }}</van-col> <van-col span="17">{{ hdReport.hdDescribe }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="" v-if="hdReport.hdPictureList">
<van-col span="7" <van-col span="7"
><span class="field-title">隐患照片:</span></van-col ><span class="field-title">隐患照片:</span></van-col
> >
...@@ -85,7 +90,7 @@ ...@@ -85,7 +90,7 @@
v-for="(item, index) in hdReport.hdPictureList" v-for="(item, index) in hdReport.hdPictureList"
:key="index" :key="index"
> >
<van-image width="100" height="100" :src="item.filePath" /> <van-image width="100" height="100" :src="item.filePath" @click="imagePreview(item.filePath)"/>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
...@@ -98,18 +103,20 @@ ...@@ -98,18 +103,20 @@
class="detail_video" class="detail_video"
v-for="(item, index) in hdReport.hdVideoList" v-for="(item, index) in hdReport.hdVideoList"
:key="index" :key="index"
style="position:relative"
> >
<video :src="item.filePath"></video> <van-icon name="play" size="1rem" style="border:solid 3px black;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)"/>
<video :src="item.filePath" @click="videoUrl=item.filePath"/>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="" v-if="hdReport.hdExpirationTime">
<van-col span="7" <van-col span="7"
><span class="field-title">隐患到期时间:</span></van-col ><span class="field-title">隐患到期时间:</span></van-col
> >
<van-col span="17">{{ hdReport.hdExpirationTime }}</van-col> <van-col span="17">{{ hdReport.hdExpirationTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="" v-if="hdReport.rectificationUser">
<van-col span="7" <van-col span="7"
><span class="field-title">隐患整改人:</span></van-col ><span class="field-title">隐患整改人:</span></van-col
> >
...@@ -138,7 +145,7 @@ ...@@ -138,7 +145,7 @@
<van-col span="7" <van-col span="7"
><span class="field-title">隐患整改人:</span></van-col ><span class="field-title">隐患整改人:</span></van-col
> >
<van-col span="17">{{ item.rectificationUser}}</van-col> <van-col span="17">{{ item.rectificationUser }}</van-col>
</van-row> </van-row>
<van-row gutter="" v-if="item.rectificationReview"> <van-row gutter="" v-if="item.rectificationReview">
<van-col span="7" <van-col span="7"
...@@ -162,9 +169,10 @@ ...@@ -162,9 +169,10 @@
<van-col span="9" <van-col span="9"
><span class="field-title">隐患确认信息:</span></van-col ><span class="field-title">隐患确认信息:</span></van-col
> >
<van-col span="15">{{item.confirmResult==0?'退回':'通过'}}</van-col> <van-col span="15">{{
item.confirmResult == 0 ? "退回" : "通过"
}}</van-col>
</van-row> </van-row>
</div> </div>
</van-step> </van-step>
</van-steps> </van-steps>
...@@ -266,7 +274,7 @@ ...@@ -266,7 +274,7 @@
v-for="(itemTwo, index) in item.hdPictureList" v-for="(itemTwo, index) in item.hdPictureList"
:key="index" :key="index"
> >
<van-image width="100" height="100" :src="itemTwo.filePath" /> <van-image width="100" height="100" :src="itemTwo.filePath" @click="imagePreview(itemTwo.filePath)"/>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
...@@ -280,7 +288,7 @@ ...@@ -280,7 +288,7 @@
v-for="(itemTwo, index) in item.hdVideoList" v-for="(itemTwo, index) in item.hdVideoList"
:key="index" :key="index"
> >
<video :src="itemTwo.filePath"></video> <video :src="itemTwo.filePath" @click="videoUrl=itemTwo.filePath"></video>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
...@@ -300,7 +308,7 @@ ...@@ -300,7 +308,7 @@
v-for="(item, index) in hdReviewList" v-for="(item, index) in hdReviewList"
:key="index" :key="index"
> >
<van-row gutter="" v-if="item.hdPictureList['length']"> <van-row gutter="" v-if="item.hdPictureList">
<van-col span="7" <van-col span="7"
><span class="field-title">隐患照片:</span></van-col ><span class="field-title">隐患照片:</span></van-col
> >
...@@ -310,7 +318,7 @@ ...@@ -310,7 +318,7 @@
v-for="(itemTwo, index) in item.hdPictureList" v-for="(itemTwo, index) in item.hdPictureList"
:key="index" :key="index"
> >
<van-image width="100" height="100" :src="itemTwo.filePath" /> <van-image width="100" height="100" :src="itemTwo.filePath" @click="imagePreview(itemTwo.filePath)"/>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
...@@ -449,14 +457,20 @@ ...@@ -449,14 +457,20 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { standBookDetail,deal } from "@/service/danger"; import {ImagePreview} from 'vant';
import { standBookDetail, deal } from "@/service/danger";
import customPlayer from "@/components/video"
export default { export default {
components: { components: {
LHeader, LHeader,
customPlayer
}, },
data() { data() {
return { return {
videoImg:'12',
// 视屏播放
videoUrl:'',
id: "", id: "",
text: "隐患详情", text: "隐患详情",
reportOpen: false, reportOpen: false,
...@@ -492,6 +506,9 @@ export default { ...@@ -492,6 +506,9 @@ export default {
} }
}, },
methods: { methods: {
imagePreview(item){
ImagePreview({closeable:true,images:[item]})
},
// 请求台账信息 // 请求台账信息
postDetail() { postDetail() {
this.$toast.loading({ this.$toast.loading({
...@@ -500,7 +517,13 @@ export default { ...@@ -500,7 +517,13 @@ export default {
loadingType: "spinner", loadingType: "spinner",
duration: 0, duration: 0,
}); });
(this.$route.params.method=='get'?getFun:postFun)(`${this.$route.params.api?this.$route.params.api:'/hdreport/hdDetailsApp/'}${this.id}`) (this.$route.params.method == "get" ? getFun : postFun)(
`${
this.$route.params.api
? this.$route.params.api
: "/hdreport/hdDetailsApp/"
}${this.id}`
)
.then((res) => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.hdReport = res.data.hdReport; this.hdReport = res.data.hdReport;
...@@ -516,7 +539,7 @@ export default { ...@@ -516,7 +539,7 @@ export default {
this.instructionsList = this.beifeninstructionsList.slice(-1); this.instructionsList = this.beifeninstructionsList.slice(-1);
}) })
.catch((err) => { .catch((err) => {
console.log(err) console.log(err);
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试");
}); });
...@@ -650,10 +673,22 @@ export default { ...@@ -650,10 +673,22 @@ export default {
height: 2.666667rem; height: 2.666667rem;
margin-right: 0.266667rem; margin-right: 0.266667rem;
float: left; float: left;
video { overflow: hidden;
width: 2.666667rem; // video {
height: 2.666667rem; // width: 2.666667rem;
} // height: 2.666667rem;
// }
} }
} }
// 调整播放器样式
.video-js .vjs-icon-placeholder {
width: 100%;
height: 100%;
overflow: hidden;
// display: block;
}
.vjs_video_1251-dimensions.vjs-fluid {
padding-top: 4.25%;
}
</style> </style>
...@@ -172,6 +172,7 @@ ...@@ -172,6 +172,7 @@
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="setRankModeImg" v-model="setRankModeImg"
accept="file" accept="file"
@delete="deleteFile(...arguments,'setRankModeImg')"
> >
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
...@@ -285,6 +286,7 @@ ...@@ -285,6 +286,7 @@
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="technologyImg" v-model="technologyImg"
accept="file" accept="file"
@delete="deleteFile(...arguments,'technologyImg')"
> >
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
...@@ -328,6 +330,7 @@ ...@@ -328,6 +330,7 @@
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="administrationImg" v-model="administrationImg"
accept="file" accept="file"
@delete="deleteFile(...arguments,'administrationImg')"
> >
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
...@@ -372,6 +375,7 @@ ...@@ -372,6 +375,7 @@
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="urgentImg" v-model="urgentImg"
accept="file" accept="file"
@delete="deleteFile(...arguments,'urgentImg')"
> >
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
...@@ -438,7 +442,7 @@ export default { ...@@ -438,7 +442,7 @@ export default {
this.postReturnEcho(); this.postReturnEcho();
} }
this.getList(); this.getList();
this.$bus.$on("riskLevelBus", (res) => { this.$bus.$on("riskLevelBus", (res) => {
this.showSetRank = false; // 再次关闭弹出层 以防万一 this.showSetRank = false; // 再次关闭弹出层 以防万一
console.log(Boolean(res)); console.log(Boolean(res));
...@@ -564,6 +568,24 @@ export default { ...@@ -564,6 +568,24 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
async deleteFile(val,detail,key){
// console.log(val,detail)
if(val.fileId){
let formdata= new FormData();
formdata.append('key',val['fileId'])
let res = await postFun('/mobile/remove',formdata);
if(res){
console.log(res);
this.$toast({
title:'提示',
message:'删除成功!'
})
} else {
console.log('删除失败');
this[key].splice(detail.index,0,val)
}
}
},
onSubmit(values) { onSubmit(values) {
let formdata = new FormData(); let formdata = new FormData();
formdata.append("pId", this.projectId); formdata.append("pId", this.projectId);
...@@ -675,35 +697,40 @@ export default { ...@@ -675,35 +697,40 @@ export default {
this.mainDutyPeopLe = data.mainDutyPeopLe; this.mainDutyPeopLe = data.mainDutyPeopLe;
this.mainDutyDept = data1.dept.deptName; this.mainDutyDept = data1.dept.deptName;
this.technology = data.technicalMeasures; this.technology = data.technicalMeasures;
// urgentImg administrationImg technologyImg // urgentImg administrationImg technologyImg setRankModeImg
data.riskFileList4 = data.riskFileList4 || [];
data.riskFileList3 = data.riskFileList3 || []; // 定级方式
data.riskFileList2 = data.riskFileList2 || []; this.urgentImg = res.data.imgsysFiles3 || [];
data.riskFileList1 = data.riskFileList1 || []; this.administrationImg = res.data.imgsysFiles2 || [];
this.technologyFile = data.riskFileList1.map(() => { this.administrationImg = res.data.imgsysFiles1 || [];
return { this.technologyImg = res.data.imgsysFiles0 || [];
...item, console.log(data.riskFileList4, data.riskFileList3, data.riskFileList2, data.riskFileList1,'测试测试测试')
url: item.filePath, // this.technologyFile = res.data.riskFileList1.map(() => {
}; // return {
}); // ...item,
this.urgentImg = data.riskFileList4.map(() => { // url: item.filePath,
return { // };
...item, // });
url: item.filePath, // this.urgentImg = data.riskFileList4.map(() => {
}; // console.log(111)
}); // return {
this.administrationImg = data.riskFileList3.map(() => { // ...item,
return { // url: item.filePath,
...item, // };
url: item.filePath, // });
}; // this.administrationImg = data.riskFileList3.map(() => {
}); // return {
this.technologyImg = data.riskFileList2.map(() => { // ...item,
return { // url: item.filePath,
...item, // };
url: item.filePath, // });
}; // this.technologyImg = data.riskFileList2.map(() => {
}); // return {
// ...item,
// url: item.filePath,
// };
// });
console.log('结果')
// 请求人员列表 // 请求人员列表
let formdata = new FormData(); let formdata = new FormData();
formdata.append("organizationId", data.responsibilityDept); formdata.append("organizationId", data.responsibilityDept);
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<div class="con-list">
<van-cell-group <van-cell-group
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@click="goDetail(item.taskId)" @click="goDetail(item.taskId)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="6">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="18">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">风险等级:</van-col> <van-col span="6">风险等级:</van-col>
<van-col span="18">{{ item.riskLevel }}</van-col> <van-col span="18">{{ item.riskLevel }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">风险源:</van-col> <van-col span="6">风险源:</van-col>
<van-col span="18">{{ item.riskSource }}</van-col> <van-col span="18">{{ item.riskSource }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">事故类型:</van-col> <van-col span="6">事故类型:</van-col>
<van-col span="18">{{ item.accidentType }}</van-col> <van-col span="18">{{ item.accidentType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">管控层级:</van-col> <van-col span="6">管控层级:</van-col>
<van-col span="18">{{ item.controllevel }}</van-col> <van-col span="18">{{ item.controllevel }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">主责部门:</van-col> <van-col span="6">主责部门:</van-col>
<van-col span="18">{{ item.responsibilityDept }}</van-col> <van-col span="18">{{ item.responsibilityDept }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">主责人员:</van-col> <van-col span="6">主责人员:</van-col>
<van-col span="18">{{ item.responsibilityMember }}</van-col> <van-col span="18">{{ item.responsibilityMember }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row>
<!-- 详情 --> <!-- 详情 -->
<div class="detail">详情</div> <div class="detail">详情</div>
</van-cell-group> </van-cell-group>
</div>
<van-form <van-form
@submit="onSubmit" @submit="onSubmit"
:show-error="false" :show-error="false"
...@@ -89,13 +89,13 @@ ...@@ -89,13 +89,13 @@
/> />
</div> </div>
<div style="margin: 16px;"> <div style="margin: 16px">
<van-button round block type="info" native-type="submit" <van-button round block type="info" native-type="submit"
>保存</van-button >保存</van-button
> >
</div> </div>
</van-form> </van-form>
<div style="margin:10px 16px 0px;padding-bottom:16px"> <div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel" <van-button round block type="warning" @click.native="cancel"
>取消</van-button >取消</van-button
> >
...@@ -105,13 +105,13 @@ ...@@ -105,13 +105,13 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { postriskConAdd } from "@/service/risk"; import { postriskConAdd } from "@/service/risk";
export default { export default {
name: "risk-affirm", name: "risk-affirm",
components: { components: {
LHeader LHeader,
}, },
data() { data() {
return { return {
...@@ -120,12 +120,12 @@ export default { ...@@ -120,12 +120,12 @@ export default {
radio: "1", radio: "1",
text: "风险确认", text: "风险确认",
agreeIdea: "", // 同意意见 agreeIdea: "", // 同意意见
disagreeIdea: "" //退回意见 disagreeIdea: "", //退回意见
}; };
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next((vm) => {
if (from.name === "risk-confirme") { if (from.name === "risk-confirme") {
vm.messageList = []; vm.messageList = [];
let paramsData = to.params.data; let paramsData = to.params.data;
...@@ -153,14 +153,14 @@ export default { ...@@ -153,14 +153,14 @@ export default {
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
postriskConAdd(`/riskConfirm/add/${this.taskId}`, formdata) postriskConAdd(`/riskConfirm/add/${this.taskId}`, formdata)
.then(res => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.$toast.success({ this.$toast.success({
message: "提交成功", message: "提交成功",
duration: 2000 duration: 2000,
}); });
history.go(-1); history.go(-1);
}) })
...@@ -174,44 +174,78 @@ export default { ...@@ -174,44 +174,78 @@ export default {
this.$router.push({ this.$router.push({
name: "risk-big-detail", name: "risk-big-detail",
params: { params: {
id: taskId id: taskId,
} },
}); });
}, },
cancel() { cancel() {
this.$router.go(-1); this.$router.go(-1);
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
.van-cell-group--inset { // .van-cell-group--inset {
margin: 0; // margin: 0;
margin-bottom: 10px; // margin-bottom: 10px;
padding: 10px; // padding: 10px;
font-size: 13px; // font-size: 13px;
position: relative; // position: relative;
.van-row { // .van-row {
margin-bottom: 0.133333rem; // margin-bottom: 0.133333rem;
line-height: 0.64rem; // line-height: 0.64rem;
} // }
.van-overlay { // .van-overlay {
position: absolute; // position: absolute;
.wrapper { // .wrapper {
display: flex; // display: flex;
align-items: center; // align-items: center;
justify-content: space-evenly; // justify-content: space-evenly;
height: 100%; // height: 100%;
// }
// }
// }
// .detail {
// position: absolute;
// bottom: 0.32rem;
// right: 15px;
// color: #2a80f7;
// font-weight: none;
// z-index: 99;
// }
#app {
font-family: "";
color: #2c3e50;
}
/deep/.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;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
} }
} }
} }
.detail {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: none;
z-index: 99;
}
</style> </style>
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