Commit 3652fe22 authored by 胡占生's avatar 胡占生 🇨🇳

消息更改

parents 7af8103d 7c4a2a97
Pipeline #7214 passed with stage
in 15 seconds
...@@ -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>
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
"major-survey", "major-survey",
"risk-add", "risk-add",
"noticeList", "noticeList",
"confirmNote",
], ],
}; };
}, },
...@@ -94,6 +95,7 @@ export default { ...@@ -94,6 +95,7 @@ export default {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
// z-index:999999999999
} }
.router-view { .router-view {
......
src/assets/upload/file.png

3.05 KB | W: | H:

src/assets/upload/file.png

426 Bytes | W: | H:

src/assets/upload/file.png
src/assets/upload/file.png
src/assets/upload/file.png
src/assets/upload/file.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/upload/video.png

3.33 KB | W: | H:

src/assets/upload/video.png

449 Bytes | W: | H:

src/assets/upload/video.png
src/assets/upload/video.png
src/assets/upload/video.png
src/assets/upload/video.png
  • 2-up
  • Swipe
  • Onion skin
<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,
......
...@@ -233,6 +233,24 @@ const routes = [{ ...@@ -233,6 +233,24 @@ const routes = [{
}, },
component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList'), component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList'),
}, },
{
path: '/noticeListDetail',
name: 'noticeListDetail',
meta: {
title: '整改通知管理详情',
index: 3
},
component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList/detail'),
},
{
path: '/noticeListEdit',
name: 'noticeListEdit',
meta: {
title: '整改通知管理编辑',
index: 3
},
component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList/edit'),
},
{ {
path: '/sign', path: '/sign',
name: 'sign', name: 'sign',
...@@ -242,6 +260,33 @@ const routes = [{ ...@@ -242,6 +260,33 @@ const routes = [{
}, },
component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList/sign'), component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList/sign'),
}, },
{
path: '/checked-confirm',
name: 'checked-confirm',
meta: {
title: '整改确认',
index: 3
},
component: () => import( /* webpackChunkName: "create-order" */ '../views/checkedConfirm'),
},
{
path: '/confirmNote',
name: 'confirmNote',
meta: {
title: '整改确认问题记录',
index: 3
},
component: () => import( /* webpackChunkName: "create-order" */ '../views/checkedConfirm/confirmNote'),
},
{
path: '/confirmDetail',
name: 'confirmDetail',
meta: {
title: '整改确认问题记录',
index: 3
},
component: () => import( /* webpackChunkName: "create-order" */ '../views/checkedConfirm/confirmNote/detail'),
},
// 登录页 // 登录页
{ {
path: '/login2', path: '/login2',
...@@ -260,17 +305,25 @@ const routes = [{ ...@@ -260,17 +305,25 @@ const routes = [{
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/messageCenter'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/messageCenter'),
}, },
// 安全工作台页面
{ {
path: '/save-workbench',
path: '/message-details', name: 'save-workbench',
name: 'message-details',
meta: { meta: {
index: 1 index: 1
}, },
component: () => import('../views/messageCenter/messageDetails'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/saveWorkbench'),
}, },
// 我的地盘页面
{
path: '/my',
name: 'my',
meta: {
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/my'),
},
// 安全工作台页面 // 安全工作台页面
{ {
path: '/save-workbench', path: '/save-workbench',
...@@ -495,83 +548,25 @@ const routes = [{ ...@@ -495,83 +548,25 @@ const routes = [{
// 风险模块 {
{ path:'/insert-danger',
path: '/risk-add', name:'insert-danger',
name: 'risk-add', meta:{
meta: { title:'我的上报',
title: '风险上报', index:1
index: 1 },
component:()=>import('@/views/danger/insertDanger/list')
},
{
path:'/video',
name:'video-play',
meta:{
title:'视屏播放',
index:1
},
component:()=>import('@/components/video')
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd'),
},
{
path: '/matrix-grad',
name: 'matrix-grad',
meta: {
title: '矩阵式定级',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd/matrixGrad'),
},
{
path: '/risk-return',
name: 'risk-return',
meta: {
title: '风险上报退回列表',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskReturn'),
},
{
path: '/risk-confirme',
name: 'risk-confirme',
meta: {
title: '风险确认',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskConfirme'),
},
{
path: '/risk-affirm',
name: 'risk-affirm',
meta: {
title: '风险确认',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskConfirme/riskAffirm'),
},
{
path: '/risk-account',
name: 'risk-account',
meta: {
title: '风险历史台账',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAccount'),
},
{
path: '/risk-big-detail',
name: 'risk-big-detail',
meta: {
title: '风险详情',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAccount/riskBigDetail'),
},
{
path: '/insert-danger',
name: 'insert-danger',
meta: {
title: '我的上报',
index: 1
},
component: () => import('@/views/danger/insertDanger/list')
}
] ]
......
...@@ -8,10 +8,8 @@ ...@@ -8,10 +8,8 @@
*/ */
import axios from 'axios' import axios from 'axios'
import router from '../router' import router from '../router'
import { Toast } from 'vant'; import { Toast ,Dialog} from 'vant';
import { Notify } from 'vant'; import { getToken ,removeToken} from '@/utils/auth' // get token from cookie
import { Dialog } from 'vant';
import { getToken, removeToken } from '@/utils/auth' // get token from cookie
const service = axios.create({ const service = axios.create({
baseURL: '/hse/app-api', //前缀路径 baseURL: '/hse/app-api', //前缀路径
headers: {//请求头部 headers: {//请求头部
...@@ -30,6 +28,7 @@ service.interceptors.request.use(config => { ...@@ -30,6 +28,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 代表已经请求到接口
...@@ -45,10 +44,16 @@ service.interceptors.response.use(response => { ...@@ -45,10 +44,16 @@ service.interceptors.response.use(response => {
theme: 'round-button', theme: 'round-button',
}).then(() => { }).then(() => {
removeToken() removeToken()
location.reload() // location.reload()
router.push({
name:'login2'
})
}); });
} else { }else{
return res Toast.fail({
title: '提示',
message: res.msg||'数据异常请稍后再试',
})
} }
} else { } else {
Promise.reject(new Error('Error')) Promise.reject(new Error('Error'))
......
...@@ -20,6 +20,28 @@ const dangerText = function(danger) { ...@@ -20,6 +20,28 @@ const dangerText = function(danger) {
return danger return danger
} }
} }
const riskText = function(danger) {
// 严重隐患 = A
// 较大隐患 = B
// 危险隐患 = C
// 重大隐患 = S
switch(danger){
case 'A':
return '严重风险'
case 'B':
return '较大风险'
case 'C':
return '危险风险'
case 'S':
return '重大风险'
default:
return danger
}
}
export default{ export default{
dangerText dangerText,
riskText
} }
\ No newline at end of file
...@@ -81,6 +81,9 @@ export default { ...@@ -81,6 +81,9 @@ export default {
getFun('check/carry/count',{planId:this.id}).then((Response)=>{ getFun('check/carry/count',{planId:this.id}).then((Response)=>{
this.$toast.clear() this.$toast.clear()
this.nums=Response.data this.nums=Response.data
sessionStorage.setItem('deptNameList',JSON.stringify(Response.data.deptNameList))
sessionStorage.setItem('deptIdList',JSON.stringify(Response.data.deptIdList))
sessionStorage.setItem('projectFlag',Response.data.projectFlag)
sessionStorage.setItem('nums',JSON.stringify(this.nums)) sessionStorage.setItem('nums',JSON.stringify(this.nums))
}).catch(()=>{ }).catch(()=>{
this.$toast.clear() this.$toast.clear()
...@@ -118,6 +121,9 @@ export default { ...@@ -118,6 +121,9 @@ export default {
finish:this.finish finish:this.finish
} }
}) })
console.log(this.nums.id)
sessionStorage.setItem('noteId',this.nums.id)
sessionStorage.setItem('checkedFinish',this.finish)
}, },
formwork(){ formwork(){
this.$router.push({name:'formwork',query:{id:this.id,finish:this.finish}}) this.$router.push({name:'formwork',query:{id:this.id,finish:this.finish}})
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
label="法律依据" label="法律依据"
placeholder="法律依据" placeholder="法律依据"
:disabled="isFormwork" :disabled="isFormwork"
:rules="[{ required: true, message: '请填写法律依据' }]"
/> />
<van-field <van-field
v-model="problemPosition" v-model="problemPosition"
...@@ -64,12 +63,12 @@ ...@@ -64,12 +63,12 @@
/> />
<!-- <van-area title="标题" :area-list="areaList" @confirm="onConfirm" /> --> <!-- <van-area title="标题" :area-list="areaList" @confirm="onConfirm" /> -->
</van-popup> </van-popup>
<van-field name="uploader" label="图像上传" :rules="[{ required: true, message: '请上传图像' }]"> <van-field name="uploader" label="图像上传" >
<template #input> <template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderImg" /> <van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderImg" />
</template> </template>
</van-field> </van-field>
<van-field name="uploader2" label="视频上传" :rules="[{ required: true, message: '请上传视频' }]"> <van-field name="uploader2" label="视频上传" >
<template #input> <template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderVideo" /> <van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderVideo" />
</template> </template>
...@@ -120,9 +119,15 @@ export default { ...@@ -120,9 +119,15 @@ export default {
if(this.$route.query.id){ if(this.$route.query.id){
this.id=this.$route.query.id this.id=this.$route.query.id
var obj=JSON.parse(this.$route.query.obj) var obj=JSON.parse(this.$route.query.obj)
this.Isvalue=obj.projectFlag }
this.ids=obj.deptIdList if(sessionStorage.getItem('projectFlag')){
this.value=obj.deptNameList.join('/') this.Isvalue=sessionStorage.getItem('projectFlag')=='true'?true:false
}
if(sessionStorage.getItem('deptNameList')){
this.value=JSON.parse(sessionStorage.getItem('deptNameList')).join('/')
}
if(sessionStorage.getItem('deptIdList')){
this.ids=JSON.parse(sessionStorage.getItem('deptIdList'))
} }
if(this.$route.query.name=='formwork'){ if(this.$route.query.name=='formwork'){
// this.problemName=this.$route.query.checkitem,//检查项目 // this.problemName=this.$route.query.checkitem,//检查项目
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<LHeader v-bind:text="text"></LHeader> <LHeader v-bind:text="text"></LHeader>
<div class="card"> <div class="card">
<div>问题位置:{{list.address}}</div> <div>问题位置:{{list.address}}</div>
<div>责任单位:{{list.deptId}}</div> <div>责任单位:{{list.deptNames.join('/')}}</div>
<div>问题描述:{{list.context}}</div> <div>问题描述:{{list.context}}</div>
<div>法律依据:{{list.checkBasis}}</div> <div>法律依据:{{list.checkBasis}}</div>
<div>图片展示:<van-uploader multiple :deletable="false" :show-upload="false" v-model="list.pictures" /></div> <div>图片展示:<van-uploader multiple :deletable="false" :show-upload="false" v-model="list.pictures" /></div>
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
name="法律依据" name="法律依据"
label="法律依据" label="法律依据"
placeholder="法律依据" placeholder="法律依据"
:disabled="true"
:rules="[{ required: true, message: '请填写法律依据' }]" :rules="[{ required: true, message: '请填写法律依据' }]"
/> />
<van-field <van-field
...@@ -53,12 +54,12 @@ ...@@ -53,12 +54,12 @@
/> />
<!-- <van-area title="标题" :area-list="areaList" @confirm="onConfirm" /> --> <!-- <van-area title="标题" :area-list="areaList" @confirm="onConfirm" /> -->
</van-popup> </van-popup>
<van-field name="uploader" label="图像上传" :rules="[{ required: true, message: '请上传图像' }]"> <van-field name="uploader" label="图像上传" >
<template #input> <template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="editObj.pictures" /> <van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="editObj.pictures" />
</template> </template>
</van-field> </van-field>
<van-field name="uploader2" label="视频上传" :rules="[{ required: true, message: '请上传视频' }]"> <van-field name="uploader2" label="视频上传" >
<template #input> <template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="editObj.videos" /> <van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="editObj.videos" />
</template> </template>
...@@ -95,10 +96,16 @@ export default { ...@@ -95,10 +96,16 @@ export default {
mounted() { mounted() {
if(this.$route.query.name=='note'){ if(this.$route.query.name=='note'){
this.editObj=JSON.parse(this.$route.query.obj) this.editObj=JSON.parse(this.$route.query.obj)
this.editObj.value="" this.editObj={
this.editObj.pictures=[] id:this.editObj.id,//问题ID
this.editObj.videos=[] address:this.editObj.address,//问题位置
console.log(this.editObj) value:this.editObj.deptNames.join('/'),//责任单位
context:this.editObj.context,//问题描述
checkBasis:this.editObj.checkBasis,//法律依据
pictures:this.editObj.pictures,//图片
videos:this.editObj.videos//视频
}
this.ids=this.editObj.deptIds
} }
this.init() this.init()
}, },
...@@ -134,10 +141,20 @@ export default { ...@@ -134,10 +141,20 @@ export default {
value.uploader.forEach((item) => { value.uploader.forEach((item) => {
pictures.push(item.content) pictures.push(item.content)
}); });
if(this.editObj.pictures){
this.editObj.pictures.forEach((item)=>{
pictures.push(item)
})
}
var videos=[]; var videos=[];
value.uploader2.forEach((item) => { value.uploader2.forEach((item) => {
videos.push(item.content) videos.push(item.content)
}); })
if(this.editObj.videos){
this.editObj.videos.forEach((item)=>{
videos.push(item)
})
}
var obj={ var obj={
id:this.editObj.id,//列表ID id:this.editObj.id,//列表ID
pictures:pictures,//图片 pictures:pictures,//图片
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<div class="card" v-for="(item,index) in list" :key="index" > <div class="card" v-for="(item,index) in list" :key="index" >
<van-overlay @click.stop="close(item)" :show="item.show" > <van-overlay @click.stop="close(item)" :show="item.show" >
<van-button round type="primary" @click.stop="detail(index,item)">详情</van-button> <van-button round type="primary" @click.stop="detail(index,item)">详情</van-button>
<van-button round type="info" @click.stop="update(index,item)">修改</van-button> <van-button round type="info" v-show="!finish" @click.stop="update(index,item)">修改</van-button>
<van-button round type="warning " @click.stop="Delete(item)">删除</van-button> <van-button round type="warning " v-show="!finish" @click.stop="Delete(item)">删除</van-button>
</van-overlay> </van-overlay>
<van-checkbox :name="item.id" :disabled="finish=='true'?true:item.checkSubmitId?true:false">问题{{index+1}}</van-checkbox> <van-checkbox :name="item.id" :disabled="finish=='true'?true:item.checkSubmitId?true:false">问题{{index+1}}</van-checkbox>
<div @click="cardClick(item)"> <div @click="cardClick(item)">
...@@ -57,11 +57,11 @@ export default { ...@@ -57,11 +57,11 @@ export default {
} }
}, },
mounted() { mounted() {
if(this.$route.query.id){ if(sessionStorage.getItem('noteId')){
this.id=this.$route.query.id this.id=sessionStorage.getItem('noteId')
} }
if(this.$route.query.finish){ if(sessionStorage.getItem('checkedFinish')){
this.finish=this.$route.query.finish this.finish=sessionStorage.getItem('checkedFinish')=='false'?false:true
} }
this.init() this.init()
}, },
...@@ -169,17 +169,20 @@ export default { ...@@ -169,17 +169,20 @@ export default {
}, },
//修改卡片值 //修改卡片值
update(index,item){ update(index,item){
console.log(item)
item.show=false item.show=false
//向编辑页面传值做数据回显 //向编辑页面传值做数据回显
var obj={ var obj={
id:item.id,//问题ID id:item.id,//问题ID
address:item.address,//问题位置 address:item.address,//问题位置
deptId:item.deptId,//责任单位ID deptId:item.deptIds,//责任单位ID
deptNames:item.deptNames,//责任单位名称
context:item.context,//问题描述 context:item.context,//问题描述
checkBasis:item.checkBasis,//法律依据 checkBasis:item.checkBasis,//法律依据
pictures:item.pictures,//图片 pictures:item.pictures,//图片
videos:item.videos//视频 videos:item.videos//视频
} }
console.log(obj,'检查')
this.$forceUpdate()//强制刷新 this.$forceUpdate()//强制刷新
this.$router.push({name:'edit',query:{name:'note',obj:JSON.stringify(obj)}}) this.$router.push({name:'edit',query:{name:'note',obj:JSON.stringify(obj)}})
}, },
......
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<template>
<div>
<LHeader v-bind:text="text"></LHeader>
<div class="card">
<div>问题位置:{{list.address}}</div>
<div>责任单位:{{list.deptId}}</div>
<div>问题描述:{{list.context}}</div>
<div>法律依据:{{list.checkBasis}}</div>
<div>图片展示:<van-uploader multiple :deletable="false" :show-upload="false" v-model="list.pictures" /></div>
<div>视频展示:<van-uploader multiple :deletable="false" :show-upload="false" :disabled="true" v-model="list.videos" /></div>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'confirmDetail',
components: {
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
text:'问题详情',//顶部文本
list:{},//详情列表
id:'',//详情列表id
}
},
mounted() {
this.id=this.$route.query.id
this.init()
},
methods: {
/* 获取详情列表 */
init(){
this.list={}
getFun('check/confirm/trouble/list',{planId:this.id}).then((Response)=>{
this.list=Response.data.list
})
}
}
}
</script>
<style lang="less" scoped>
.card{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
border-radius: 4%;
}
.card div{
font-size: 0.4rem;
line-height: 0.8rem;
}
</style>
This diff is collapsed.
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<template>
<div>
<LHeader v-bind:text="text"></LHeader>
<div class="card" v-for="(item,index) in checkedConfirmList" :key="index" @click="cardLocation(item)">
<div>负责人:{{item.name}}</div>
<div>部门名称:{{item.realName}}</div>
<div>开始时间:{{item.planStartTime}}</div>
<div>结束时间:{{item.planEndTime}}</div>
<div>检查地点:{{item.address}}</div>
<div>检查类型:{{item.type}}</div>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'checked-confirm',
components: {
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
checkedConfirmList:[],//检查确认列表
text:'检查确认列表',//顶部文本
}
},
mounted() {
this.list()
},
methods: {
/* 首次进入页面请求检查执行列表接口 */
list(){
this.checkedConfirmList=[]
this.$toast.loading({
message:'加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
})
getFun('check/confirm/list').then((Response)=>{
this.checkedConfirmList=Response.data
this.$toast.clear()
}).catch(()=>{
this.$toast.clear()
this.$toast.fail('加载失败,请稍后再试')
})
},
cardLocation(item){
sessionStorage.setItem('ConfirmFinish',item.finish)
sessionStorage.setItem('ConfirmId',item.id)
this.$router.push({name:'confirmNote',params:{name:'checkedConfirm',id:item.id}})//此id来判断是否加载问题上报新数据
}
}
}
</script>
<style lang="less" scoped>
.card{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
border-radius: 4%;
}
.card div{
font-size: 0.4rem;
line-height: 0.8rem;
}
</style>
...@@ -15,9 +15,11 @@ ...@@ -15,9 +15,11 @@
autosize autosize
label="退回原因" label="退回原因"
type="textarea" type="textarea"
class="gray"
/> />
<van-field <van-field
required
readonly readonly
clickable clickable
name="proId" name="proId"
...@@ -26,8 +28,13 @@ ...@@ -26,8 +28,13 @@
placeholder="请选择" placeholder="请选择"
@click="showProjectName = true" @click="showProjectName = true"
:rules="[{ required: true, message: '所属项目不能为空' }]" :rules="[{ required: true, message: '所属项目不能为空' }]"
:class="{ gray: isShowreturnCause }"
/> />
<van-popup v-model="showProjectName" position="bottom" v-if="!isShowreturnCause"> <van-popup
v-model="showProjectName"
position="bottom"
v-if="!isShowreturnCause"
>
<van-picker <van-picker
show-toolbar show-toolbar
value-key="projectName" value-key="projectName"
...@@ -38,6 +45,7 @@ ...@@ -38,6 +45,7 @@
</van-popup> </van-popup>
<van-field <van-field
required
readonly readonly
clickable clickable
name="hdRange" name="hdRange"
...@@ -46,8 +54,13 @@ ...@@ -46,8 +54,13 @@
placeholder="请选择" placeholder="请选择"
@click="showRange = true" @click="showRange = true"
:rules="[{ required: true, message: '适用范围不能为空' }]" :rules="[{ required: true, message: '适用范围不能为空' }]"
:class="{ gray: isShowreturnCause }"
/> />
<van-popup v-model="showRange" position="bottom" v-if="!isShowreturnCause"> <van-popup
v-model="showRange"
position="bottom"
v-if="!isShowreturnCause"
>
<van-picker <van-picker
show-toolbar show-toolbar
value-key="hdRange" value-key="hdRange"
...@@ -58,6 +71,7 @@ ...@@ -58,6 +71,7 @@
</van-popup> </van-popup>
<van-field <van-field
required
readonly readonly
clickable clickable
name="hdType" name="hdType"
...@@ -66,6 +80,7 @@ ...@@ -66,6 +80,7 @@
placeholder="请选择" placeholder="请选择"
@click="showType = true" @click="showType = true"
:rules="[{ required: true, message: '隐患类型不能为空' }]" :rules="[{ required: true, message: '隐患类型不能为空' }]"
: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
...@@ -78,6 +93,7 @@ ...@@ -78,6 +93,7 @@
</van-popup> </van-popup>
<van-field <van-field
required
readonly readonly
clickable clickable
name="hdProjectName" name="hdProjectName"
...@@ -86,8 +102,13 @@ ...@@ -86,8 +102,13 @@
placeholder="请选择" placeholder="请选择"
@click="showDangerName = true" @click="showDangerName = true"
:rules="[{ required: true, message: '隐患项目名称不能为空' }]" :rules="[{ required: true, message: '隐患项目名称不能为空' }]"
:class="{ gray: isShowreturnCause }"
/> />
<van-popup v-model="showDangerName" position="bottom" v-if="!isShowreturnCause"> <van-popup
v-model="showDangerName"
position="bottom"
v-if="!isShowreturnCause"
>
<van-picker <van-picker
show-toolbar show-toolbar
value-key="hdName" value-key="hdName"
...@@ -98,6 +119,8 @@ ...@@ -98,6 +119,8 @@
</van-popup> </van-popup>
<van-field <van-field
required
class="gray"
v-model="dangerNum" v-model="dangerNum"
readonly readonly
name="hdProjectId" name="hdProjectId"
...@@ -106,6 +129,8 @@ ...@@ -106,6 +129,8 @@
:rules="[{ required: true, message: '隐患项目编号不能为空' }]" :rules="[{ required: true, message: '隐患项目编号不能为空' }]"
/> />
<van-field <van-field
required
class="gray"
v-model="dangerLevel" v-model="dangerLevel"
readonly readonly
name="hdLev" name="hdLev"
...@@ -115,6 +140,7 @@ ...@@ -115,6 +140,7 @@
/> />
<van-field <van-field
required
readonly readonly
clickable clickable
name="hdDiscoveryTime" name="hdDiscoveryTime"
...@@ -137,6 +163,7 @@ ...@@ -137,6 +163,7 @@
</van-popup> </van-popup>
<van-field <van-field
required
readonly readonly
clickable clickable
name="dangerId" name="dangerId"
...@@ -200,6 +227,7 @@ ...@@ -200,6 +227,7 @@
/> />
<van-field <van-field
required
v-model="describe" v-model="describe"
rows="3" rows="3"
label="隐患描述" label="隐患描述"
...@@ -212,11 +240,34 @@ ...@@ -212,11 +240,34 @@
<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="最多上传五个"
v-model="uploaderImg" v-model="uploaderImg"
/> >
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/pic.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template> </template>
</van-field> </van-field>
...@@ -224,12 +275,13 @@ ...@@ -224,12 +275,13 @@
<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"
accept="video/*" accept="video/*"
> >
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
<div <div
style=" style="
...@@ -327,7 +379,7 @@ export default { ...@@ -327,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;
...@@ -392,6 +444,7 @@ export default { ...@@ -392,6 +444,7 @@ export default {
data() { data() {
return { return {
id: 0,
text: "新增隐患", text: "新增隐患",
taskId: "", taskId: "",
projectId: "", // 所属工程 projectId: "", // 所属工程
...@@ -433,6 +486,24 @@ export default { ...@@ -433,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
...@@ -465,6 +536,7 @@ export default { ...@@ -465,6 +536,7 @@ export default {
onSubmit(values) { onSubmit(values) {
let formdata = new FormData(); let formdata = new FormData();
formdata.append("id", this.id);
formdata.append("proId", this.projectId); formdata.append("proId", this.projectId);
// formdata.append("projectName", this.projectName); // formdata.append("projectName", this.projectName);
formdata.append("hdRange", values.hdRange); formdata.append("hdRange", values.hdRange);
...@@ -477,15 +549,19 @@ export default { ...@@ -477,15 +549,19 @@ 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, "这是要上传的文件");
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式 // 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
values.hdPicture1.forEach((item) => { values.hdPicture1.forEach((item) => {
formdata.append("hdPicture1[]", item.file); if (item.file) {
formdata.append("hdPicture1[]", item.file);
}
}); });
values.hdVideo1.forEach((item) => { values.hdVideo1.forEach((item) => {
formdata.append("hdVideo1[]", item.file); if (item.file) {
formdata.append("hdVideo1[]", item.file);
}
}); });
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
...@@ -548,8 +624,9 @@ export default { ...@@ -548,8 +624,9 @@ export default {
// 对数据进行赋值 // 对数据进行赋值
this.returnCause = res.data.reason; this.returnCause = res.data.reason;
let msg = res.data.hdReport; let msg = res.data.hdReport;
msg.hdPictureList=msg.hdPictureList||[]; // msg.hdPictureList=msg.hdPictureList||[];
msg.hdVideoList=msg.hdVideoList||[]; // msg.hdVideoList=msg.hdVideoList||[];
this.id = msg.id;
this.projectId = msg.proId; this.projectId = msg.proId;
this.projectName = res.data.projectInformations.filter( this.projectName = res.data.projectInformations.filter(
(item) => item.id == msg.proId (item) => item.id == msg.proId
...@@ -566,20 +643,26 @@ export default { ...@@ -566,20 +643,26 @@ export default {
this.describe = msg.hdDescribe; this.describe = msg.hdDescribe;
this.expireTime = msg.hdExpirationTime; this.expireTime = msg.hdExpirationTime;
this.recPeople = msg.rectificationUser; this.recPeople = msg.rectificationUser;
this.uploaderImg = msg.hdPictureList.map(item=>{ this.uploaderImg = (res.data.imgsysFiles || []).map((item) => {
return { return {
...item, ...item,
url:item.filePath url: item.filePath,
} };
}) });
this.uploaderVideo = msg.hdVideoList.map(item=>{ console.log(this.uploaderImg);
this.uploaderVideo = (res.data.videosysFiles || []).map((item) => {
return { return {
...item, ...item,
url:item.filePath url: item.filePath,
} };
}) });
postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then((res) => {
this.columnsRecPeople = res.data;
});
}) })
.catch(() => { .catch((err) => {
console.log(err);
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试");
}); });
...@@ -711,6 +794,11 @@ export default { ...@@ -711,6 +794,11 @@ export default {
}, },
}; };
</script> </script>
<style scoped> <style scoped lang="less">
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
.gray {
/deep/.van-field__control {
color: gray !important;
}
}
</style> </style>
...@@ -62,28 +62,89 @@ ...@@ -62,28 +62,89 @@
rows="3" rows="3"
type="textarea" type="textarea"
placeholder="请输入" placeholder="请输入"
required
:rules="[{ required: true, message: '隐患整改详情描述不能为空' }]" :rules="[{ required: true, message: '隐患整改详情描述不能为空' }]"
/> />
<van-field name="uploader" label="整改照片" :rules="[{ required: true, message: '整改照片不能为空' }]"> <van-field
name="uploader"
label="整改照片"
required
:rules="[{ required: true, message: '整改照片不能为空' }]"
>
<template #input> <template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderImg" /> <van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="uploaderImg"
>
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/pic.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template> </template>
</van-field> </van-field>
<van-field name="uploader2" label="整改视频"> <van-field name="uploader2" label="整改视频">
<template #input> <template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderVideo" accept="video/*" /> <van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="uploaderVideo"
accept="video/*"
>
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/video.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template> </template>
</van-field> </van-field>
<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
> >
...@@ -93,16 +154,16 @@ ...@@ -93,16 +154,16 @@
<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 { dangerRectReturn, dangerRectAdd } from "@/service/danger"; import { dangerRectReturn, dangerRectAdd } from "@/service/danger";
export default { export default {
name: "change-info", name: "change-info",
components: { components: {
LHeader LHeader,
}, },
data() { data() {
return { return {
text: "整改确认", text: "隐患整改",
taskId: "", taskId: "",
taskName: "", taskName: "",
messageList: [], messageList: [],
...@@ -110,13 +171,13 @@ export default { ...@@ -110,13 +171,13 @@ export default {
isShowreturnCause: false, isShowreturnCause: false,
value: "", value: "",
uploaderImg: [], //图像上传 uploaderImg: [], //图像上传
uploaderVideo: [] //视频上传 uploaderVideo: [], //视频上传
}; };
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next((vm) => {
if (from.name === "change-danger") { if (from.name === "change-danger") {
vm.messageList = [] vm.messageList = [];
let paramsData = to.params.data; let paramsData = to.params.data;
vm.taskId = paramsData.taskId; vm.taskId = paramsData.taskId;
vm.taskName = paramsData.taskName; vm.taskName = paramsData.taskName;
...@@ -127,9 +188,8 @@ export default { ...@@ -127,9 +188,8 @@ export default {
vm.getRectReturn(); vm.getRectReturn();
} }
// 清空数据 // 清空数据
vm.value="", (vm.value = ""), (vm.uploaderImg = []); //图像上传
vm.uploaderImg=[]; //图像上传 vm.uploaderVideo = []; //视频上传
vm.uploaderVideo=[] //视频上传
} }
}); });
}, },
...@@ -141,15 +201,15 @@ export default { ...@@ -141,15 +201,15 @@ export default {
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
let formdata = new FormData(); let formdata = new FormData();
formdata.append("details", this.value); formdata.append("details", this.value);
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式 // 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
values.uploader.forEach(item => { values.uploader.forEach((item) => {
formdata.append("rePicture1[]", item.file); formdata.append("rePicture1[]", item.file);
}); });
values.uploader2.forEach(item => { values.uploader2.forEach((item) => {
formdata.append("reVideo1[]", item.file); formdata.append("reVideo1[]", item.file);
}); });
// 判断保存的url // 判断保存的url
...@@ -158,11 +218,11 @@ export default { ...@@ -158,11 +218,11 @@ export default {
url = `/rectification/add2/${this.taskId}`; url = `/rectification/add2/${this.taskId}`;
} }
dangerRectAdd(url, formdata) dangerRectAdd(url, 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);
}) })
...@@ -177,10 +237,10 @@ export default { ...@@ -177,10 +237,10 @@ export default {
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
dangerRectReturn(`/rectification/addReturn/${this.taskId}`) dangerRectReturn(`/rectification/addReturn/${this.taskId}`)
.then(res => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.returnCause = res.data.reason; this.returnCause = res.data.reason;
}) })
...@@ -194,17 +254,17 @@ export default { ...@@ -194,17 +254,17 @@ export default {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
id: taskId id: taskId,
} },
}); });
}, },
cancel() { cancel() {
this.$router.go(-1); this.$router.go(-1);
} },
}, },
filters: { filters: {
formatTime: function(val) { formatTime: function (val) {
if (new Date(val).getTime() <= new Date().getTime()) { if (new Date(val).getTime() <= new Date().getTime()) {
return "超期"; return "超期";
} else if ( } else if (
...@@ -215,8 +275,8 @@ export default { ...@@ -215,8 +275,8 @@ export default {
} else { } else {
return "正常"; return "正常";
} }
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -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"
> >
...@@ -72,14 +72,14 @@ ...@@ -72,14 +72,14 @@
>详情</van-button >详情</van-button
> >
<van-button round type="info" @click="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>确认</van-button >隐患整改</van-button
> >
<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>
...@@ -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>
...@@ -147,14 +148,14 @@ ...@@ -147,14 +148,14 @@
>详情</van-button >详情</van-button
> >
<van-button round type="info" @click="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>确认</van-button >隐患整改</van-button
> >
<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>
......
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
:key="index" :key="index"
@click="goDetail(item.taskId)" @click="goDetail(item.taskId)"
> >
<van-row gutter="">
<van-col span="6">隐患编号:</van-col>
<van-col span="18">{{ item.businessId }}</van-col>
</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.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
...@@ -57,6 +61,7 @@ ...@@ -57,6 +61,7 @@
<!-- 同意时的选项 --> <!-- 同意时的选项 -->
<div class="agree" v-if="radio == 1"> <div class="agree" v-if="radio == 1">
<van-field <van-field
required
readonly readonly
clickable clickable
name="endTime" name="endTime"
...@@ -80,6 +85,7 @@ ...@@ -80,6 +85,7 @@
<van-field <van-field
readonly readonly
required
clickable clickable
name="rectificationUser" name="rectificationUser"
:value="valueRect" :value="valueRect"
...@@ -100,6 +106,7 @@ ...@@ -100,6 +106,7 @@
<van-field <van-field
readonly readonly
required
clickable clickable
name="rectificationReview" name="rectificationReview"
:value="valueReview" :value="valueReview"
...@@ -119,6 +126,7 @@ ...@@ -119,6 +126,7 @@
</van-popup> </van-popup>
<van-field <van-field
required
v-model="valueIdea" v-model="valueIdea"
label="意见" label="意见"
name="confirmOpinion" name="confirmOpinion"
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <van-sticky offset-top="0">
<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"
...@@ -15,71 +17,69 @@ ...@@ -15,71 +17,69 @@
</van-sticky> </van-sticky>
<!-- 内容列表 --> <!-- 内容列表 -->
<!-- 接口对接4 START --> <!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null"> <van-tabs
<van-cell-group v-model="active"
inset @change="
v-for="(item, index) in messageList" getList;
:key="index" showIndex = null;
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="6">隐患编号:</van-col>
<van-col span="18">{{ item.businessId }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="6">所属项目:</van-col>
<van-col span="18">{{ item.proId }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="6">隐患级别:</van-col>
<van-col span="18">{{ item.hdLev | dangerText }}</van-col>
</van-row>
<!-- <van-row gutter="">
<van-col span="6">发现时间:</van-col>
<van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> -->
<!-- *接口对接4 END -->
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
<van-button round type="info" @click="goConfirm(item)"
>审批</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
<!-- 暂无数据 -->
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
" "
v-if="isHaveNews" color="#2980f7"
animated
:sticky="true"
offset-top="3rem"
> >
暂无数据 <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
</div> <div
<tab-bar :index="1"></tab-bar> class="con-list"
@touchmove="showIndex = null"
v-if="key == active"
>
<van-cell-group
inset
v-for="(item, index) in messageList"
:key="index"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="6">隐患编号:</van-col>
<van-col span="18">{{ item.businessId }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="6">所属项目:</van-col>
<van-col span="18">{{ item.proId }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="6">隐患级别:</van-col>
<van-col span="18">{{ item.hdLev | dangerText }}</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<template v-if="active == 0">
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
<!-- <van-button round type="primary" @click="goDetail(item)"
>详情</van-button
> -->
<van-button round type="info" @click="goConfirm(item)"
>审批
</van-button>
</div>
</van-overlay>
</template>
</van-cell-group>
</div>
</van-tab>
</van-tabs>
</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 { delayList } from "@/service/danger"; import { delayList } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar,
}, },
data() { data() {
return { return {
...@@ -89,6 +89,17 @@ export default { ...@@ -89,6 +89,17 @@ export default {
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
active: 0,
tabs: [
{
title: "待审批",
api: "/delayApply/list",
},
{
title: "已审批",
api: "/delayApply/finishList",
},
],
}; };
}, },
created() { created() {
...@@ -104,9 +115,9 @@ export default { ...@@ -104,9 +115,9 @@ export default {
loadingType: "spinner", loadingType: "spinner",
duration: 0, duration: 0,
}); });
let formdata=new FormData(); let formdata = new FormData();
formdata.append('select',select); formdata.append("select", select);
postFun('/delayApply/list',formdata) postFun(this.tabs[this.active]["api"], formdata)
.then((res) => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
...@@ -122,7 +133,7 @@ export default { ...@@ -122,7 +133,7 @@ export default {
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch() { onSearch() {
this.getList(this.searchValue) this.getList(this.searchValue);
}, },
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
...@@ -133,15 +144,15 @@ export default { ...@@ -133,15 +144,15 @@ 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;
}, // },
// 审批 // 审批
goConfirm(data) { goConfirm(data) {
this.$router.push({ this.$router.push({
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
rows="3" rows="3"
type="textarea" type="textarea"
placeholder="请输入" placeholder="请输入"
required
:rules="[{ required: true, message: '理由或者意见不能为空' }]" :rules="[{ required: true, message: '理由或者意见不能为空' }]"
/> />
......
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
:key="index" :key="index"
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter="">
<van-col span="6">隐患编号:</van-col>
<van-col span="18">{{ item.id }}</van-col>
</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.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
...@@ -38,6 +42,10 @@ ...@@ -38,6 +42,10 @@
<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>
</van-row> </van-row>
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</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.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
:scroll-to-error="true" :scroll-to-error="true"
validate-trigger="onSubmit" validate-trigger="onSubmit"
> >
<van-field name="isResult" label="隐患复查结果"> <van-field name="isResult" label="审批结果">
<template #input> <template #input>
<van-radio-group <van-radio-group
v-model="radio" v-model="radio"
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
@change="selectResult" @change="selectResult"
> >
<van-radio name="1">同意</van-radio> <van-radio name="1">同意</van-radio>
<van-radio name="0">重新认定隐患级别</van-radio> <van-radio name="0">退回</van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
>详情</van-button >详情</van-button
> >
<van-button round type="info" @click="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>确认</van-button >隐患复查</van-button
> >
</div> </div>
</van-overlay> </van-overlay>
......
...@@ -2,50 +2,50 @@ ...@@ -2,50 +2,50 @@
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<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.hdLev | dangerText }}</van-col> <van-col span="18">{{ item.hdLev | dangerText }}</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.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>
</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.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</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 | formatTime }}</van-col> <van-col span="18">{{ item | 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>
<!-- 详情 --> <!-- 详情 -->
<div class="detail">详情</div> <div class="detail">详情</div>
</van-cell-group> </van-cell-group>
<van-form <van-form
@submit="onSubmit" @submit="onSubmit"
:show-error='false' :show-error="false"
:scroll-to-error="true" :scroll-to-error="true"
validate-trigger="onSubmit" validate-trigger="onSubmit"
> >
<van-field name="radio" label="隐患复查结果"> <van-field name="radio" label="复查结果">
<template #input> <template #input>
<van-radio-group <van-radio-group
v-model="radio" v-model="radio"
...@@ -62,19 +62,22 @@ ...@@ -62,19 +62,22 @@
<div class="agree" v-if="radio == 1"> <div class="agree" v-if="radio == 1">
<van-field <van-field
v-model="detail" v-model="detail"
label="详情描述" label="复查结论"
name="reviewDetails" name="reviewDetails"
rows="3" rows="3"
type="textarea" type="textarea"
placeholder="请输入" placeholder="请输入"
required
:rules="[{ required: true, message: '详情描述不能为空' }]" :rules="[{ required: true, message: '详情描述不能为空' }]"
/> />
<van-field <van-field name="uploader" label="复查照片">
name="uploader"
label="隐患复查照片"
>
<template #input> <template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderImg" /> <van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="uploaderImg"
/>
</template> </template>
</van-field> </van-field>
</div> </div>
...@@ -88,17 +91,18 @@ ...@@ -88,17 +91,18 @@
rows="3" rows="3"
type="textarea" type="textarea"
placeholder="请输入" placeholder="请输入"
required
:rules="[{ required: true, message: '退回原因不能为空' }]" :rules="[{ required: true, message: '退回原因不能为空' }]"
/> />
</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
> >
...@@ -108,11 +112,11 @@ ...@@ -108,11 +112,11 @@
<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 { dangerReviewAdd } from "@/service/danger"; import { dangerReviewAdd } from "@/service/danger";
export default { export default {
components: { components: {
LHeader LHeader,
}, },
data() { data() {
return { return {
...@@ -122,28 +126,30 @@ export default { ...@@ -122,28 +126,30 @@ export default {
text: "隐患复查", text: "隐患复查",
detail: "", detail: "",
uploaderImg: [], uploaderImg: [],
returnReason: "" returnReason: "",
}; };
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
console.log('执行了此钩子') console.log("执行了此钩子");
next(vm => { next((vm) => {
if (from.name === "review-danger"||from.name=="normal-detail") { if (from.name === "review-danger" || from.name == "normal-detail") {
vm.messageList = []; vm.messageList = [];
// 修改bug回退获取不到参数有参数的用参数没参数的话用本地缓存 // 修改bug回退获取不到参数有参数的用参数没参数的话用本地缓存
let paramsData = to.params.data||JSON.parse(localStorage.getItem('reviewdanger_params')); let paramsData =
to.params.data ||
JSON.parse(localStorage.getItem("reviewdanger_params"));
vm.taskId = paramsData.taskId; vm.taskId = paramsData.taskId;
vm.messageList.push(paramsData); vm.messageList.push(paramsData);
vm.radio= "1"; vm.radio = "1";
vm.detail = ""; vm.detail = "";
vm.uploaderImg = []; // 隐患整改人 vm.uploaderImg = []; // 隐患整改人
vm.returnReason = ""; vm.returnReason = "";
} }
}); });
}, },
created() { created() {
console.log('执行了此钩子1') console.log("执行了此钩子1");
}, },
methods: { methods: {
selectResult(val) { selectResult(val) {
this.radio = val; this.radio = val;
...@@ -154,24 +160,24 @@ export default { ...@@ -154,24 +160,24 @@ export default {
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
let formdata = new FormData() let formdata = new FormData();
formdata.append('reviewResult', this.radio) formdata.append("reviewResult", this.radio);
formdata.append('reviewDetails', values.reviewDetails) formdata.append("reviewDetails", values.reviewDetails);
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式 // 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
if (values.uploader) { if (values.uploader) {
values.uploader.forEach(item => { values.uploader.forEach((item) => {
formdata.append("reviewPicture1[]", item.file); formdata.append("reviewPicture1[]", item.file);
}); });
} }
dangerReviewAdd(`/review/add1/${this.taskId}`,formdata) dangerReviewAdd(`/review/add1/${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);
}) })
...@@ -185,16 +191,16 @@ export default { ...@@ -185,16 +191,16 @@ export default {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
id: taskId id: taskId,
} },
}); });
}, },
cancel() { cancel() {
this.$router.go(-1); this.$router.go(-1);
} },
}, },
filters: { filters: {
formatTime: function(row) { formatTime: function (row) {
if (new Date(row.dueDate).getTime() <= row.rectificationTime) { if (new Date(row.dueDate).getTime() <= row.rectificationTime) {
return "超期"; return "超期";
} else if ( } else if (
...@@ -206,33 +212,33 @@ export default { ...@@ -206,33 +212,33 @@ export default {
} else { } else {
return "正常"; return "正常";
} }
} },
} },
}; };
</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 { }
.detail {
position: absolute; position: absolute;
bottom: 0.32rem; bottom: 0.32rem;
right: 15px; right: 15px;
......
<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;
......
This diff is collapsed.
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="6">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="18">{{ item.businessId }}</van-col> <van-col span="18">{{ item.pid }}</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.proId }}</van-col> <van-col span="18">{{ item.projectName }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患编号:</van-col> <van-col span="7">隐患编号:</van-col>
<van-col span="17">{{ item.processInstanceId }}</van-col> <van-col span="17">{{ item.pid }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患项目名称:</van-col> <van-col span="7">隐患项目名称:</van-col>
......
...@@ -60,6 +60,7 @@ export default { ...@@ -60,6 +60,7 @@ export default {
}) })
}, },
cardLocation(item){ cardLocation(item){
sessionStorage.setItem('projectId',item.projectId)
sessionStorage.setItem('finish',item.finish) sessionStorage.setItem('finish',item.finish)
sessionStorage.setItem('id',item.id) sessionStorage.setItem('id',item.id)
this.$router.push({ this.$router.push({
......
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<template>
<div>
<LHeader v-bind:text="text"></LHeader>
<div class="card">
<div>问题位置:{{list.address}}</div>
<div>责任单位:{{list.deptNames.join('/')}}</div>
<div>问题描述:{{list.context}}</div>
<div>法律依据:{{list.checkBasis}}</div>
<div>图片展示:<van-uploader multiple :deletable="false" :show-upload="false" v-model="list.pictures" /></div>
<div>视频展示:<van-uploader multiple :deletable="false" :show-upload="false" :disabled="true" v-model="list.videos" /></div>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'detail',
components: {
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
text:'整改问题详情',//顶部文本
list:{},//详情列表
id:'',//详情列表id
}
},
mounted() {
this.id=this.$route.query.id
this.init()
},
methods: {
/* 获取详情列表 */
init(){
this.list={}
getFun('check/notify/trouble/'+this.id).then((Response)=>{
this.list=Response.data
})
}
}
}
</script>
<style lang="less" scoped>
.card{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
border-radius: 4%;
}
.card div{
font-size: 0.4rem;
line-height: 0.8rem;
}
</style>
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<template>
<div>
<LHeader v-bind:text="text"></LHeader>
<van-form @submit="onSubmit" @failed="onFailed">
<van-field
v-model="editObj.context"
name="问题描述"
label="问题描述"
placeholder="问题描述"
:rules="[{ required: true, message: '请填写问题描述' }]"
/>
<van-field
v-model="editObj.checkBasis"
name="法律依据"
label="法律依据"
placeholder="法律依据"
:rules="[{ required: true, message: '请填写法律依据' }]"
/>
<van-field
v-model="editObj.address"
name="问题位置"
label="问题位置"
placeholder="问题位置"
:rules="[{ required: true, message: '请填写问题位置' }]"
/>
<van-field
readonly
clickable
name="picker"
:value="editObj.value"
label="责任单位"
placeholder="请选择部门"
@click="showPicker = true"
:rules="[{ required: true, message: '请填写问题位置' }]"
/>
<van-popup v-model="showPicker" position="bottom">
<van-picker ref="apicker"
show-toolbar
:columns="columns"
@confirm="onConfirm"
@cancel="showPicker = false"
@change="checkScroll"
/>
<!-- <van-area title="标题" :area-list="areaList" @confirm="onConfirm" /> -->
</van-popup>
<van-field name="uploader" label="图像上传" :rules="[{ required: true, message: '请上传图像' }]">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="editObj.pictures" />
</template>
</van-field>
<van-field name="uploader2" label="视频上传" :rules="[{ required: true, message: '请上传视频' }]">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="editObj.videos" />
</template>
</van-field>
<div style="margin: 0.5rem">
<van-button round block type="info" native-type="submit">提交</van-button>
</div>
</van-form>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'list',
components: {
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
/* form表单 */
editObj:{},
value:'',//责任单位
showPicker:false,//默认是否展示弹出层
columns: [],//下拉数组
text:'整改通知问题编辑',//顶部文本
ids:[],//下拉框选中值数组id
}
},
mounted() {
if(this.$route.query.name=='noticeList'){
this.editObj=JSON.parse(this.$route.query.obj)
this.editObj={
id:this.editObj.id,//问题ID
address:this.editObj.address,//问题位置
value:this.editObj.deptNames.join('/'),//责任单位
context:this.editObj.context,//问题描述
checkBasis:this.editObj.checkBasis,//法律依据
pictures:this.editObj.pictures,//图片
videos:this.editObj.videos//视频
}
this.ids=this.editObj.deptIds
}
this.init()
},
methods: {
/* 获取下拉树级联列表 */
init(){
getFun('check/dept/tree').then((Response)=>{
this.columns=Response.data
})
},
/* 下拉框文本溢出动画效果 */
checkScroll () {
this.$nextTick(() => {
// 获取选中元素
let selectedItems = [...document.querySelectorAll('.van-picker-column__item--selected')]
selectedItems.forEach(item => {
let child = item.querySelector('.van-ellipsis')
if (child.offsetWidth > item.offsetWidth) { // 判断child文字宽度
item.classList.add('scroll')
} else {
item.classList.remove('scroll')
}
})
})
},
onFailed(errorInfo){
this.$toast.fail('提交失败,请完善信息')
},
/* 问题提交 */
onSubmit(value){
var pictures=[];
console.log(value)
value.uploader.forEach((item) => {
if(item.content){pictures.push(item.content)}
else if(item){pictures.push(item)}
});
var videos=[];
value.uploader2.forEach((item) => {
if(item.content){videos.push(item.content)}
else if(item){videos.push(item)}
});
var obj={
id:this.editObj.id,//列表ID
pictures:pictures,//图片
videos:videos,//视频
address:value['问题位置'],//问题位置
deptIds:this.ids,//责任单位
context:value['问题描述'],//问题描述
checkBasis:value['法律依据']//法律依据
}
this.$dialog.confirm({
title: '提示',
message: '确定提交检查问题?',
}).then(()=>{
this.$toast.loading({
message:'提交中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
})
postFun('check/notify/trouble/update',obj).then((Response)=>{
this.$toast.clear()
this.$toast.success({
message:'提交成功',
duration: 2000
})
this.$router.push({
name:'noticeList',
query:{
pageName:'noticeListEdit'
}
})
}).catch(()=>{
this.$toast.clear()
this.$toast.fail('提交失败,请稍后再试')
})
}).catch(()=>{
})
},
/* 确认选择级联菜单的回显数据处理 */
onConfirm(){
//获取回显的部门值和部门id数组
this.value=""
this.ids=[]
var valueList=this.$refs.apicker.getValues()
valueList.forEach((item)=>{
this.ids.push(item.id)
this.editObj.value+=item.text+' / '
})
this.showPicker = false;
}
}
}
</script>
<style lang="less" scoped>
.card{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
}
.card div{
font-size: 0.4rem;
}
/deep/ .van-picker-column__item--selected {
/* 重写选中后的效果 */
.van-ellipsis {
text-overflow: unset;
overflow: visible;
}
/* 增加scroll类 */
&.scroll > .van-ellipsis {
animation: move 4s linear infinite;
}
}
@keyframes move {
0% { transform: translateX(100%); }
100% { transform: translateX(-100%); }
}
</style>
This diff is collapsed.
...@@ -34,33 +34,42 @@ export default { ...@@ -34,33 +34,42 @@ export default {
result:[], result:[],
checkedAll:'', checkedAll:'',
img:'', img:'',
img2:'' // img2:'',
confirmImg:'',
}; };
}, },
mounted(){ mounted(){
if(this.$route.query.name=='sign'){ if(this.$route.query.name=='sign'){
this.img=this.$route.query.img this.img=this.$route.query.img
this.img2=this.$route.query.img2 // this.img2=this.$route.query.img2
}
if(this.$route.query.name=='confirmNote'){
this.confirmImg=this.$route.query.confirmImg
} }
}, },
methods: { methods: {
handleReset () { handleReset () {
this.$refs.esign.reset() this.$refs.esign.reset()
}, },
// 生成base64格式 // 生成base64格式
handleGenerate () { handleGenerate () {
this.$refs.esign.generate().then(res => { this.$refs.esign.generate().then(res => {
this.resultImg = res //把base64赋给img this.resultImg = res //把base64赋给img
//生成图片后存储到session中并跳转把图片是否显示的boolean带过去 //生成图片后存储到session中并跳转把图片是否显示的boolean带过去
console.log(this.value) if(this.confirmImg){
this.$router.push({name:'noticeList',query:{name:'sign',img:this.img,img2:this.img2}}) this.$router.push({name:'confirmNote',query:{name:'callbackSign',confirmImg:this.confirmImg}})
}else{
this.$router.push({name:'noticeList',query:{name:'sign',img:this.img}})
}
//判断是检查组签字还是项目经理签字 //判断是检查组签字还是项目经理签字
if(this.img){ if(this.img){
sessionStorage.setItem('resultImg',this.resultImg) sessionStorage.setItem('resultImg',this.resultImg)
}else if(this.img2){ }
sessionStorage.setItem('resultImg2',this.resultImg) // else if(this.img2){
// sessionStorage.setItem('resultImg2',this.resultImg)
// }
else if(this.confirmImg){
sessionStorage.setItem('confirmImg',this.resultImg)
} }
}).catch(err => { }).catch(err => {
// 画布没有签字时会执行这里 // 画布没有签字时会执行这里
......
...@@ -6,6 +6,12 @@ ...@@ -6,6 +6,12 @@
<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">{{ riskMain.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
...@@ -18,6 +24,12 @@ ...@@ -18,6 +24,12 @@
> >
<van-col span="17">{{ riskMain.riskFactor }}</van-col> <van-col span="17">{{ riskMain.riskFactor }}</van-col>
</van-row> </van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">风险级别:</span></van-col
>
<van-col span="17">{{ riskMain.riskLevel }}</van-col>
</van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7"><span class="field-title">风险源:</span></van-col> <van-col span="7"><span class="field-title">风险源:</span></van-col>
<van-col span="17">{{ riskMain.riskSource }}</van-col> <van-col span="17">{{ riskMain.riskSource }}</van-col>
...@@ -31,12 +43,6 @@ ...@@ -31,12 +43,6 @@
<!-- 隐藏的字段 --> <!-- 隐藏的字段 -->
<div v-show="riskOpen"> <div v-show="riskOpen">
<van-row gutter="">
<van-col span="7"
><span class="field-title">风险等级:</span></van-col
>
<van-col span="17">{{ riskMain.riskLevel }}</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
...@@ -73,7 +79,7 @@ ...@@ -73,7 +79,7 @@
> >
<van-col span="17"> <van-col span="17">
<div class="enclosure" v-for="(item, index) in riskMain.riskFileList1" :key="index"> <div class="enclosure" v-for="(item, index) in riskMain.riskFileList1" :key="index">
<a :href="item.filePath" target="_blank">{{item.fileName}}</a> {{index+1}}. <a :href="item.filePath" target="_blank" style="color:skyblue">{{item.fileName}}</a>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
...@@ -89,7 +95,7 @@ ...@@ -89,7 +95,7 @@
> >
<van-col span="17"> <van-col span="17">
<div class="enclosure" v-for="(item, index) in riskMain.riskFileList2" :key="index"> <div class="enclosure" v-for="(item, index) in riskMain.riskFileList2" :key="index">
<a :href="item.filePath" target="_blank">{{item.fileName}}</a> {{index+1}}. <a :href="item.filePath" target="_blank" style="color:skyblue">{{item.fileName}}</a>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
...@@ -105,7 +111,7 @@ ...@@ -105,7 +111,7 @@
> >
<van-col span="17"> <van-col span="17">
<div class="enclosure" v-for="(item, index) in riskMain.riskFileList3" :key="index"> <div class="enclosure" v-for="(item, index) in riskMain.riskFileList3" :key="index">
<a :href="item.filePath" target="_blank">{{item.fileName}}</a> {{index+1}}. <a :href="item.filePath" target="_blank" style="color:skyblue">{{item.fileName}}</a>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
...@@ -121,7 +127,7 @@ ...@@ -121,7 +127,7 @@
> >
<van-col span="17"> <van-col span="17">
<div class="enclosure" v-for="(item, index) in riskMain.riskFileList4" :key="index"> <div class="enclosure" v-for="(item, index) in riskMain.riskFileList4" :key="index">
<a :href="item.filePath" target="_blank">{{item.fileName}}</a> {{index+1}}. <a :href="item.filePath" target="_blank" style="color:skyblue">{{item.fileName}}</a>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
...@@ -162,7 +168,7 @@ ...@@ -162,7 +168,7 @@
</van-row> </van-row>
<van-row> <van-row>
<van-col span="6" <van-col span="6"
><span class="field-title">审批人:</span></van-col ><span class="field-title">操作人:</span></van-col
> >
<van-col span="18">{{item.userName}}</van-col> <van-col span="18">{{item.userName}}</van-col>
</van-row> </van-row>
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
/> --> /> -->
<van-field <van-field
v-show="showSetRankMode" v-show="setRank=='其他定级方式'"
v-model="setRankMode" v-model="setRankMode"
name="setRankMode" name="setRankMode"
label="定级方式" label="定级方式"
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
placeholder="请输入" placeholder="请输入"
/> />
<van-field name="setRankModeFile" label=" " v-show="showSetRankMode"> <van-field name="setRankModeFile" label=" " v-show="setRank=='其他定级方式'">
<template #input> <template #input>
<van-uploader <van-uploader
multiple multiple
...@@ -172,6 +172,8 @@ ...@@ -172,6 +172,8 @@
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="setRankModeImg" v-model="setRankModeImg"
accept="file" accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'setRankModeImg')"
> >
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
...@@ -233,9 +235,11 @@ ...@@ -233,9 +235,11 @@
<van-field <van-field
readonly readonly
clickable clickable
required
name="mainDutyDept" name="mainDutyDept"
:value="mainDutyDept" :value="mainDutyDept"
label="主责部门" label="主责部门"
:rules="[{ required: true, message: '主责部门不能为空' }]"
placeholder="请选择" placeholder="请选择"
@click="showMainDutyDept = true" @click="showMainDutyDept = true"
/> />
...@@ -252,9 +256,11 @@ ...@@ -252,9 +256,11 @@
<van-field <van-field
readonly readonly
clickable clickable
required
name="mainDutyPeopLe" name="mainDutyPeopLe"
:value="mainDutyPeopLe" :value="mainDutyPeopLe"
label="主责人员" label="主责人员"
:rules="[{ required: true, message: '主责人员不能为空' }]"
placeholder="请选择" placeholder="请选择"
@click="showMainDutyPeopLe = true" @click="showMainDutyPeopLe = true"
/> />
...@@ -285,6 +291,8 @@ ...@@ -285,6 +291,8 @@
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="technologyImg" v-model="technologyImg"
accept="file" accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'technologyImg')"
> >
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
...@@ -328,6 +336,8 @@ ...@@ -328,6 +336,8 @@
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="administrationImg" v-model="administrationImg"
accept="file" accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'administrationImg')"
> >
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
...@@ -372,6 +382,8 @@ ...@@ -372,6 +382,8 @@
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="urgentImg" v-model="urgentImg"
accept="file" accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'urgentImg')"
> >
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
...@@ -400,7 +412,7 @@ ...@@ -400,7 +412,7 @@
<div style="margin: 16px 16px 0"> <div style="margin: 16px 16px 0">
<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>
...@@ -564,13 +576,33 @@ export default { ...@@ -564,13 +576,33 @@ 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('id',this.id);
formdata.append("pId", this.projectId); formdata.append("pId", this.projectId);
formdata.append("riskFactor", this.factor); formdata.append("riskFactor", this.factor);
formdata.append("riskSource", this.source); formdata.append("riskSource", this.source);
formdata.append("accidentType", this.trouble); formdata.append("accidentType", this.trouble);
formdata.append("level", this.setRank); formdata.append("level", values.setRank);
formdata.append("riskLevel", this.riskRank); formdata.append("riskLevel", this.riskRank);
formdata.append("gradingMethod", this.setRankMode); formdata.append("gradingMethod", this.setRankMode);
formdata.append("riskPosition", this.location); formdata.append("riskPosition", this.location);
...@@ -586,6 +618,7 @@ export default { ...@@ -586,6 +618,7 @@ export default {
// 定级方式 // 定级方式
formdata.append("risk1[]", item.file); formdata.append("risk1[]", item.file);
}); });
// values.setRankModeFile.file
values.technologyFile.forEach((item) => { values.technologyFile.forEach((item) => {
// 技术措施 // 技术措施
formdata.append("risk2[]", item.file); formdata.append("risk2[]", item.file);
...@@ -659,6 +692,7 @@ export default { ...@@ -659,6 +692,7 @@ export default {
.then((res) => { .then((res) => {
let data = res.data.riskMain; let data = res.data.riskMain;
let data1 = res.data.ResponsibilityMember; let data1 = res.data.ResponsibilityMember;
this.id=data.id;
this.projectId = data.pId; this.projectId = data.pId;
this.riskRank = data.riskLevel; this.riskRank = data.riskLevel;
this.factor = data.riskFactor; this.factor = data.riskFactor;
...@@ -675,35 +709,45 @@ export default { ...@@ -675,35 +709,45 @@ 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 || []).map(item=>{return {...item,url:item.filePath}});
data.riskFileList1 = data.riskFileList1 || []; this.administrationImg = (res.data.imgsysFiles2 || []).map(item=>{return {...item,url:item.filePath}});
this.technologyFile = data.riskFileList1.map(() => { this.technologyImg = (res.data.imgsysFiles1 || []).map(item=>{return {...item,url:item.filePath}});
return { this.tecsetRankModeImg = (res.data.imgsysFiles0 || []).map(item=>{return {...item,url:item.filePath}});
...item, console.log(
url: item.filePath, data.riskFileList4,
}; data.riskFileList3,
}); data.riskFileList2,
this.urgentImg = data.riskFileList4.map(() => { data.riskFileList1,
return { );
...item, // this.technologyFile = res.data.riskFileList1.map(() => {
url: item.filePath, // return {
}; // ...item,
}); // url: item.filePath,
this.administrationImg = data.riskFileList3.map(() => { // };
return { // });
...item, // this.urgentImg = data.riskFileList4.map(() => {
url: item.filePath, // console.log(111)
}; // return {
}); // ...item,
this.technologyImg = data.riskFileList2.map(() => { // url: item.filePath,
return { // };
...item, // });
url: item.filePath, // this.administrationImg = data.riskFileList3.map(() => {
}; // return {
}); // ...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,21 +174,19 @@ export default { ...@@ -174,21 +174,19 @@ 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类 */
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0.266667rem 0;
margin-bottom: 10px;
padding: 10px; padding: 10px;
font-size: 13px; font-size: 13px;
position: relative; position: relative;
......
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
goDelete(data) { goDelete(data) {
this.$dialog.confirm({ this.$dialog.confirm({
title: "提示", title: "提示",
message: "确认要关闭此条隐患吗?", message: "确认要关闭此条风险吗?",
}) })
.then(() => { .then(() => {
this.$toast.loading({ this.$toast.loading({
......
...@@ -248,8 +248,14 @@ export default { ...@@ -248,8 +248,14 @@ export default {
key: "7", key: "7",
path: "", path: "",
imgUrl: require("@/assets/workbench/ehcek-record.png"), imgUrl: require("@/assets/workbench/ehcek-record.png"),
text: "检查记录", text: "检查记录"
}, },
{
key: "8",
path: "/checked-confirm",
imgUrl: require("@/assets/workbench/ehcek-record.png"),
text: "整改确认"
}
], ],
// 后台给的数据权限对象 // 后台给的数据权限对象
......
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