Commit 283a8a78 authored by 王明朋's avatar 王明朋

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

parents 61e0a2f1 25f68366
Pipeline #7625 passed with stage
in 12 seconds
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
"vant": "^2.12.30", "vant": "^2.12.30",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-esign": "^1.0.5", "vue-esign": "^1.0.5",
"vue-qrcode-reader": "^3.1.0",
"vue-router": "^3.0.7", "vue-router": "^3.0.7",
"vue2-verify": "^1.1.5", "vue2-verify": "^1.1.5",
"vuex": "^3.1.2" "vuex": "^3.1.2"
......
...@@ -47,10 +47,17 @@ export default { ...@@ -47,10 +47,17 @@ export default {
"noticeList", "noticeList",
"confirmNote", "confirmNote",
], ],
// cachePage预先定义的缓存页面
otherCache: [],
// 专门处理列表缓存的页面,这些页面缓存逻辑与其他缓存不一样去详情返回列表缓存,但是进入列表必须刷新,如何有需要缓存的列表请放到这里来。
listCache:['insert-danger','confirme-danger','report-return','change-danger','review-danger','stand-book','major-danger','delay-approval',
'my-delay','risk-return','risk-account','risk-confirme','my-delay'],
}; };
}, },
mounted() { mounted() {
// 这个配合列表路由使用缓存初始缓存页面
this.otherCache=[...this.cachePage];
let tabH = let tabH =
document document
.getElementsByTagName("html")[0] .getElementsByTagName("html")[0]
...@@ -67,13 +74,25 @@ export default { ...@@ -67,13 +74,25 @@ export default {
}, },
computed: { computed: {
showTab() { showTab() {
return !["login", "login2", "choose-people"].includes( return !["login", "login2", "choose-people","scan",'success','fail','warn'].includes(
this.$route.name this.$route.name
); );
}, },
}, },
watch: { watch: {
$route(to, from) { $route(to, from) {
// 列表页面动态添加缓存
if(from.name=='save-workbench'){
// 如何使从工作台进入列表页面在cachePage里添加页面
if((!this.cachePage.includes(to.name))&&this.listCache.includes(to.name)){
this.cachePage.push(to.name)
}
}
if(to.name=='save-workbench'){
// 如何回到工作台默认恢复预定义缓存页面
this.cachePage=[...this.otherCache];
}
// 有主级到次级 // 有主级到次级
if (to.meta.index > from.meta.index) { if (to.meta.index > from.meta.index) {
this.transitionName = "slide-left"; // 向左滑动 this.transitionName = "slide-left"; // 向左滑动
......
// qrcode.vue
<template>
<div>
<van-image
@click="$router.back()"
:src="require('../assets/back.png')"
/>
<!-- <p class="error">{{ error }}</p> -->
<!--错误信息-->
<!-- <p class="decode-result">
扫描结果:
<b>{{ result }}</b>
</p> -->
<!--扫描结果-->
<!-- <p @click="openCamera">打开相机</p>
<div v-show="show" class="cameraMessage">
<p @click="closeCamera">关闭相机</p>
<p @click="openFlash">打开手电筒</p>
<p @click="switchCamera">相机反转</p>
</div> -->
<qrcode-stream
v-show="qrcode"
:camera="camera"
:torch="torchActive"
@decode="onDecode"
@init="onInit"
>
<div>
<div class="qr-scanner">
<div class="box">
<div class="line"></div>
<div class="angle"></div>
</div>
<div class="txt">
将二维码/条码放入框内,即自动扫描
<div class="myQrcode">我的二维码</div>
</div>
</div>
</div>
</qrcode-stream>
</div>
</template>
<script>
// 下载插件
// cnpm install --save vue-qrcode-reader
// 引入
import { QrcodeStream } from "vue-qrcode-reader";
export default {
// 注册
components: { QrcodeStream },
data() {
return {
result: "", // 扫码结果信息
error: "", // 错误信息
// show: false,
// qrcode: false,
qrcode: true,
torchActive: false,
camera: "rear",
// camera: "front"
};
},
methods: {
onDecode(result) {
console.log(result);
this.result = result;
this.$emit('success',result)
},
async onInit(promise) {
const { capabilities } = await promise;
const TORCH_IS_SUPPORTED = !!capabilities.torch;
try {
await promise;
} catch (error) {
if (error.name === "NotAllowedError") {
this.error = "ERROR: 您需要授予相机访问权限";
} else if (error.name === "NotFoundError") {
this.error = "ERROR: 这个设备上没有摄像头";
} else if (error.name === "NotSupportedError") {
this.error = "ERROR: 所需的安全上下文(HTTPS、本地主机)";
} else if (error.name === "NotReadableError") {
this.error = "ERROR: 相机被占用";
} else if (error.name === "OverconstrainedError") {
this.error = "ERROR: 安装摄像头不合适";
} else if (error.name === "StreamApiNotSupportedError") {
this.error = "ERROR: 此浏览器不支持流API";
}
}
},
// 打开相机
// openCamera() {
// this.camera = 'rear'
// this.qrcode = true
// this.show = true
// },
// 关闭相机
// closeCamera() {
// this.camera = 'off'
// this.qrcode = false
// this.show = false
// },
// 打开手电筒
// openFlash() {
// switch (this.torchActive) {
// case true:
// this.torchActive = false
// break
// case false:
// this.torchActive = true
// break
// }
// },
// 相机反转
// switchCamera() {
// // console.log(this.camera);
// switch (this.camera) {
// case 'front':
// this.camera = 'rear'
// console.log(this.camera)
// break
// case 'rear':
// this.camera = 'front'
// console.log(this.camera)
// break
// }
// }
},
};
</script>
<style scoped lang="less">
.error {
font-weight: bold;
color: red;
}
.cameraMessage {
width: 100%;
height: 60px;
}
.qr-scanner {
background-image: linear-gradient(
0deg,
transparent 24%,
rgba(32, 255, 77, 0.1) 25%,
rgba(32, 255, 77, 0.1) 26%,
transparent 27%,
transparent 74%,
rgba(32, 255, 77, 0.1) 75%,
rgba(32, 255, 77, 0.1) 76%,
transparent 77%,
transparent
),
linear-gradient(
90deg,
transparent 24%,
rgba(32, 255, 77, 0.1) 25%,
rgba(32, 255, 77, 0.1) 26%,
transparent 27%,
transparent 74%,
rgba(32, 255, 77, 0.1) 75%,
rgba(32, 255, 77, 0.1) 76%,
transparent 77%,
transparent
);
background-size: 3rem 3rem;
background-position: -1rem -1rem;
width: 100%;
/* height: 100%; */
height: 100vh;
/* height: 288px; */
position: relative;
background-color: #1110;
/* background-color: #111; */
}
/* .qrcode-stream-wrapper {
display: flex;
justify-content: center;
align-items: center;
margin-top: 82px;
clear: both;
} */
/* .qrcode-stream-wrapper >>> .qrcode-stream-camera {
width: 213px;
height: 210px;
clear: both;
margin-top: 39px;
} */
.qr-scanner .box {
width: 213px;
height: 213px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
overflow: hidden;
border: 0.1rem solid rgba(0, 255, 51, 0.2);
/* background: url('http://resource.beige.world/imgs/gongconghao.png') no-repeat center center; */
}
.qr-scanner .txt {
width: 100%;
height: 35px;
line-height: 35px;
font-size: 14px;
text-align: center;
/* color: #f9f9f9; */
margin: 0 auto;
position: absolute;
top: 70%;
left: 0;
}
.qr-scanner .myQrcode {
text-align: center;
color: #00ae10;
}
.qr-scanner .line {
height: calc(100% - 2px);
width: 100%;
background: linear-gradient(180deg, rgba(0, 255, 51, 0) 43%, #00ff33 211%);
border-bottom: 3px solid #00ff33;
transform: translateY(-100%);
animation: radar-beam 2s infinite alternate;
animation-timing-function: cubic-bezier(0.53, 0, 0.43, 0.99);
animation-delay: 1.4s;
}
.qr-scanner .box:after,
.qr-scanner .box:before,
.qr-scanner .angle:after,
.qr-scanner .angle:before {
content: "";
display: block;
position: absolute;
width: 3vw;
height: 3vw;
border: 0.2rem solid transparent;
}
.qr-scanner .box:after,
.qr-scanner .box:before {
top: 0;
border-top-color: #00ff33;
}
.qr-scanner .angle:after,
.qr-scanner .angle:before {
bottom: 0;
border-bottom-color: #00ff33;
}
.qr-scanner .box:before,
.qr-scanner .angle:before {
left: 0;
border-left-color: #00ff33;
}
.qr-scanner .box:after,
.qr-scanner .angle:after {
right: 0;
border-right-color: #00ff33;
}
@keyframes radar-beam {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(0);
}
}
/deep/.qrcode-stream-camera{
height:100vh !important;
}
/deep/.van-image{
position: fixed;
z-index: 333333333333333;
left: 0.3rem;
top: 0.3rem;
opacity: 0.6;
}
</style>
\ No newline at end of file
<template> <template>
<div> <div>
<!-- 占位导航栏div,防止导航栏挡住内容 --> <!-- 占位导航栏div,防止导航栏挡住内容 -->
<div style="width:100%;height:2rem"></div> <van-tabbar v-model="active" @change="onChange" route>
<van-tabbar v-model="active" @change="onChange">
<van-tabbar-item <van-tabbar-item
v-for="(item,index) in tabBarList" v-for="(item, index) in tabBarList"
:key="index" :key="index"
:icon="active==item.name?item.imgUrlActive: item.imgUrl" :icon="active == item.name ? item.imgUrlActive : item.imgUrl"
>{{ item.text }}</van-tabbar-item >{{ item.text }}</van-tabbar-item
> >
</van-tabbar> </van-tabbar>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props:{
index: {
type: Number,
default: 0
},
},
data() { data() {
return { return {
active: "0", active: 1,
tabBarList: [ tabBarList: [
{ {
key: "1", key: "1",
name:'0', name: "0",
imgUrl: require("@/assets/tabBar/new.png"), imgUrl: require("@/assets/tabBar/new.png"),
imgUrlActive: require("@/assets/tabBar/new-active.png"), imgUrlActive: require("@/assets/tabBar/new-active.png"),
path: "/message-center", path: "/message-center",
text: "消息中心" text: "消息中心",
}, },
{ {
key: "2", key: "2",
name:'1', name: "1",
imgUrl: require("@/assets/tabBar/workbench.png"), imgUrl: require("@/assets/tabBar/workbench.png"),
imgUrlActive: require("@/assets/tabBar/workbench-active.png"), imgUrlActive: require("@/assets/tabBar/workbench-active.png"),
path: "/save-workbench", path: "/save-workbench",
text: "安全工作台" text: "安全工作台",
}, },
{ {
key: "3", key: "3",
name:'2', name: "2",
imgUrl: require("@/assets/tabBar/my.png"), imgUrl: require("@/assets/tabBar/my.png"),
imgUrlActive: require("@/assets/tabBar/my-active.png"), imgUrlActive: require("@/assets/tabBar/my-active.png"),
path: "/my", path: "/my",
text: "我的地盘" text: "我的地盘",
}
]
};
}, },
mounted() { ],
this.active = this.index };
}, },
methods: { methods: {
onChange(index) { onChange(index) {
this.active = index; if (this.active == index) {
if(this.active==index){ this.tabBarList.forEach((item) => {
this.tabBarList.forEach((item)=>{ if (item.name == this.active) {
if(item.name==this.active){ this.$router.push(item.path);
this.$router.push(item.path)
}
})
}else{
}
} }
});
} }
},
},
}; };
</script> </script>
\ No newline at end of file
<style scoped>
/* @import url(); 引入css类 */
</style>
...@@ -445,7 +445,7 @@ const routes = [{ ...@@ -445,7 +445,7 @@ const routes = [{
path: '/stand-book', path: '/stand-book',
name: 'stand-book', name: 'stand-book',
meta: { meta: {
title: '隐患历史台账', title: '隐患台账',
index: 1 index: 1
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/standBook'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/standBook'),
...@@ -460,22 +460,22 @@ const routes = [{ ...@@ -460,22 +460,22 @@ const routes = [{
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/standBook/normalDetail'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/standBook/normalDetail'),
}, },
// 隐患督办列表 // 企业级督办列表
{ {
path: '/supervise-danger', path: '/supervise-danger',
name: 'supervise-danger', name: 'supervise-danger',
meta: { meta: {
title: '隐患督办', title: '企业级督办',
index: 1 index: 1
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/superviseDanger'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/superviseDanger'),
}, },
// 隐患督办批示 // 企业级督办批示
{ {
path: '/super-survey', path: '/super-survey',
name: 'super-survey', name: 'super-survey',
meta: { meta: {
title: '隐患督办', title: '企业级督办',
index: 1 index: 1
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/superviseDanger/superSurvey'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/superviseDanger/superSurvey'),
...@@ -524,22 +524,22 @@ const routes = [{ ...@@ -524,22 +524,22 @@ const routes = [{
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/delayApproval/ratifyInfo'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/delayApproval/ratifyInfo'),
}, },
// 项目经理督办列表 // 项目督办列表
{ {
path: '/manager-danger', path: '/manager-danger',
name: 'manager-danger', name: 'manager-danger',
meta: { meta: {
title: '项目经理督办', title: '项目督办',
index: 1 index: 1
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/managerDanger'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/managerDanger'),
}, },
// 项目经理督办批示 // 项目督办批示
{ {
path: '/manager-survey', path: '/manager-survey',
name: 'manager-survey', name: 'manager-survey',
meta: { meta: {
title: '项目经理督办', title: '项目督办',
index: 1 index: 1
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/managerDanger/managerSurvey'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/managerDanger/managerSurvey'),
...@@ -630,7 +630,7 @@ const routes = [{ ...@@ -630,7 +630,7 @@ const routes = [{
component: () => import('@/views/my/role') component: () => import('@/views/my/role')
}, },
{ {
path:'/message-details', path: '/message-details',
name: 'message-details', name: 'message-details',
meta: { meta: {
title: '消息详情', title: '消息详情',
...@@ -642,7 +642,7 @@ const routes = [{ ...@@ -642,7 +642,7 @@ const routes = [{
path: '/my-reset-pas', path: '/my-reset-pas',
name: 'my-reset-pas', name: 'my-reset-pas',
meta: { meta: {
title: '重置密码', title: '修改密码',
index: 1 index: 1
}, },
component: () => import('@/views/my/resetPas') component: () => import('@/views/my/resetPas')
...@@ -656,7 +656,60 @@ const routes = [{ ...@@ -656,7 +656,60 @@ const routes = [{
}, },
component: () => import('@/views/risk/riskAdd/matrixGrad/index') component: () => import('@/views/risk/riskAdd/matrixGrad/index')
}, },
// matrix-grad {
path: '/finish-delay-detail',
name: 'finish-delay-detail',
meta: {
title: '审批详情',
index: 1
},
component: () => import('@/views/danger/changeDanger/finishDelayDetail')
},
{
path: '/my-delay',
name: 'my-delay',
meta: {
title: '我的延期',
index: 1
},
component: () => import('@/views/danger/myDelay/index')
},
{
path: '/scan',
name: 'scan',
meta: {
title: '',
index: 1
},
component: () => import('@/views/scan/index')
},
{
path: '/success',
name: 'success',
meta: {
title: '',
index: 1
},
component: () => import('@/views/common/success')
},
{
path: '/fail',
name: 'fail',
meta: {
title: '',
index: 1
},
component: () => import('@/views/common/fail')
},
{
path: '/warn',
name: 'warn',
meta: {
title: '',
index: 1
},
component: () => import('@/views/common/warn')
},
] ]
const router = new VueRouter({ const router = new VueRouter({
......
...@@ -166,7 +166,7 @@ export function dangerReviewAdd(url, data) { ...@@ -166,7 +166,7 @@ export function dangerReviewAdd(url, data) {
}) })
} }
// 隐患历史台账模块 // 隐患台账模块
export function dangerStandBook(url, data) { export function dangerStandBook(url, data) {
return request({ return request({
url: url, url: url,
...@@ -202,7 +202,7 @@ export function majorAdd(url, data) { ...@@ -202,7 +202,7 @@ export function majorAdd(url, data) {
}) })
} }
//隐患督办 //企业级督办
export function superviseList(url, data) { export function superviseList(url, data) {
return request({ return request({
url: url, url: url,
...@@ -211,7 +211,7 @@ export function superviseList(url, data) { ...@@ -211,7 +211,7 @@ export function superviseList(url, data) {
}) })
} }
//经理督办 //项目级督办
export function superviseSABlist(url, data) { export function superviseSABlist(url, data) {
return request({ return request({
url: url, url: url,
...@@ -220,7 +220,7 @@ export function superviseSABlist(url, data) { ...@@ -220,7 +220,7 @@ export function superviseSABlist(url, data) {
}) })
} }
//经理督办添加 //项目级督办添加
export function superviseAdd(url, data) { export function superviseAdd(url, data) {
return request({ return request({
url: url, url: url,
......
<template>
<div id='content'>
<van-image
width="100"
height="100"
:src="require('../../assets/result/fail.png')"
/>
<div class='text'>{{text}}</div>
<div class='button'>
<van-button block color="#52c41a" @click="$router.back()">返回</van-button>
</div>
</div>
</template>
<script>
export default {
data(){
return {
text:'操作失败'
}
},
mounted(){
let text = this.$route.query.text;
if(text){
this.text=text
}
}
};
</script>
<style scoped>
#content{
text-align: center;
padding-top: 2rem;
}
.text{
margin-top:0.6rem;
font-size: 0.8rem;
color:#e84335
}
.button{
padding: 1rem 0.5rem;
}
</style>
\ No newline at end of file
<template>
<div id='content'>
<van-image
width="100"
height="100"
:src="require('../../assets/result/success.png')"
/>
<div class='text'>{{text}}</div>
<div class='button'>
<van-button block color="#52c41a" @click="$router.back()">返回</van-button>
</div>
</div>
</template>
<script>
export default {
data(){
return {
text:'操作成功'
}
},
mounted(){
let text = this.$route.query.text;
if(text){
this.text=text
}
}
};
</script>
<style scoped>
#content{
text-align: center;
padding-top: 2rem;
}
.text{
margin-top:0.6rem;
font-size: 0.8rem;
color:#52c41a
}
.button{
padding: 1rem 0.5rem;
}
</style>
\ No newline at end of file
<template>
<div id='content'>
<van-image
width="100"
height="100"
:src="require('../../assets/result/warn.png')"
/>
<div class='text'>{{text}}</div>
<div class='button'>
<van-button block color="#52c41a" @click="$router.back()">返回</van-button>
</div>
</div>
</template>
<script>
export default {
data(){
return {
text:'警告信息'
}
},
mounted(){
let text = this.$route.query.text;
if(text){
this.text=text
}
}
};
</script>
<style scoped>
#content{
text-align: center;
padding-top: 2rem;
}
.text{
margin-top:0.6rem;
font-size: 0.8rem;
color:#faad14
}
.button{
padding: 1rem 0.5rem;
}
</style>
\ No newline at end of file
...@@ -3,7 +3,11 @@ ...@@ -3,7 +3,11 @@
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<!-- 视屏 --> <!-- 视屏 -->
<div v-if="videoUrl"> <div v-if="videoUrl">
<custom-player :videoUrl="videoUrl" :videoImg="videoImg" @close="videoUrl=''"/> <custom-player
:videoUrl="videoUrl"
:videoImg="videoImg"
@close="videoUrl = ''"
/>
</div> </div>
<van-form <van-form
@submit="onSubmit" @submit="onSubmit"
...@@ -86,7 +90,11 @@ ...@@ -86,7 +90,11 @@
:rules="[{ required: true, message: '隐患类型不能为空' }]" :rules="[{ required: true, message: '隐患类型不能为空' }]"
:class="{ gray: isShowreturnCause }" :class="{ gray: isShowreturnCause }"
/> />
<van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause"> <van-popup
v-model="showType"
position="bottom"
v-if="!isShowreturnCause"
>
<van-picker <van-picker
show-toolbar show-toolbar
value-key="hdType" value-key="hdType"
...@@ -187,28 +195,6 @@ ...@@ -187,28 +195,6 @@
@cancel="showSource = false" @cancel="showSource = false"
/> />
</van-popup> </van-popup>
<!-- <van-field
readonly
clickable
name="dangerSource"
:value="source1"
label=" "
@click="showSource1 = true"
placeholder="请选择"
:rules="[{ required: true, message: '风险源不能为空' }]"
/>
<van-popup v-model="showSource1" position="bottom">
<van-picker
show-toolbar
value-key="riskSource"
:columns="columnsSource1"
@confirm="onConSource1"
@cancel="showSource1 = false"
/>
</van-popup> -->
<van-field <van-field
v-model="source1" v-model="source1"
readonly readonly
...@@ -244,7 +230,7 @@ ...@@ -244,7 +230,7 @@
<van-field name="hdPicture1" label="隐患照片"> <van-field name="hdPicture1" label="隐患照片">
<template #input> <template #input>
<van-uploader <van-uploader
@delete="deleteFile(...arguments,'uploaderImg')" @delete="deleteFile(...arguments, 'uploaderImg')"
multiple multiple
:max-count="5" :max-count="5"
upload-text="最多上传五个" upload-text="最多上传五个"
...@@ -268,7 +254,9 @@ ...@@ -268,7 +254,9 @@
alt="" alt=""
style="width: 0.64rem; height: 0.64rem" style="width: 0.64rem; height: 0.64rem"
/> />
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text"
>最多上传五个</span
>
</div> </div>
</template> </template>
</van-uploader> </van-uploader>
...@@ -279,7 +267,7 @@ ...@@ -279,7 +267,7 @@
<template #input> <template #input>
<van-uploader <van-uploader
multiple multiple
@delete="deleteFile(...arguments,'uploaderVideo')" @delete="deleteFile(...arguments, 'uploaderVideo')"
:max-count="5" :max-count="5"
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="uploaderVideo" v-model="uploaderVideo"
...@@ -304,7 +292,9 @@ ...@@ -304,7 +292,9 @@
alt="" alt=""
style="width: 0.64rem; height: 0.64rem" style="width: 0.64rem; height: 0.64rem"
/> />
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text"
>最多上传五个</span
>
</div> </div>
</template> </template>
</van-uploader> </van-uploader>
...@@ -367,7 +357,7 @@ ...@@ -367,7 +357,7 @@
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 { timestampToTime } from "@/utils/format"; import { timestampToTime } from "@/utils/format";
import customPlayer from "@/components/video" import customPlayer from "@/components/video";
import { import {
getFormList, getFormList,
postHdTyp, postHdTyp,
...@@ -382,11 +372,12 @@ export default { ...@@ -382,11 +372,12 @@ export default {
name: "add-danger", name: "add-danger",
components: { components: {
LHeader, LHeader,
customPlayer customPlayer,
}, },
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;
...@@ -452,7 +443,7 @@ export default { ...@@ -452,7 +443,7 @@ export default {
data() { data() {
return { return {
// 视频预览地址 // 视频预览地址
videoUrl:'', videoUrl: "",
id: 0, id: 0,
text: "新增隐患", text: "新增隐患",
...@@ -497,29 +488,29 @@ export default { ...@@ -497,29 +488,29 @@ export default {
methods: { methods: {
// 点击预览图 // 点击预览图
clickPre(e){ clickPre(e) {
console.log(e) console.log(e);
if(e.filePath){ if (e.filePath) {
this.videoUrl=e.filePath; this.videoUrl = e.filePath;
}else{ } else {
this.videoUrl=e.content; this.videoUrl = e.content;
} }
}, },
async deleteFile(val,detail,key){ async deleteFile(val, detail, key) {
// console.log(val,detail) // console.log(val,detail)
if(val.fileId){ if (val.fileId) {
let formdata= new FormData(); let formdata = new FormData();
formdata.append('key',val['fileId']) formdata.append("key", val["fileId"]);
let res = await postFun('/mobile/remove',formdata); let res = await postFun("/mobile/remove", formdata);
if(res){ if (res) {
console.log(res); console.log(res);
this.$toast({ this.$toast({
title:'提示', title: "提示",
message:'删除成功!' message: "删除成功!",
}) });
} else { } else {
console.log('删除失败'); console.log("删除失败");
this[key].splice(detail.index,0,val) this[key].splice(detail.index, 0, val);
} }
} }
}, },
...@@ -568,8 +559,11 @@ export default { ...@@ -568,8 +559,11 @@ export default {
formdata.append("dangerSource", values.dangerSource); formdata.append("dangerSource", values.dangerSource);
formdata.append("hdPosition", values.hdPosition); formdata.append("hdPosition", values.hdPosition);
formdata.append("hdDescribe", values.hdDescribe); formdata.append("hdDescribe", values.hdDescribe);
formdata.append("hdExpirationTime", values.hdExpirationTime||''); formdata.append("hdExpirationTime", values.hdExpirationTime || "");
formdata.append("rectificationUser", values.rectificationUser||''); formdata.append(
"rectificationUser",
values.rectificationUser || ""
);
console.log(values.hdPicture1, "这是要上传的文件"); console.log(values.hdPicture1, "这是要上传的文件");
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式 // 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
values.hdPicture1.forEach((item) => { values.hdPicture1.forEach((item) => {
...@@ -655,30 +649,39 @@ export default { ...@@ -655,30 +649,39 @@ export default {
this.dangerName = msg.hdProjectName; this.dangerName = msg.hdProjectName;
this.dangerNum = msg.hdProjectId; this.dangerNum = msg.hdProjectId;
this.dangerLevel = this.dangerType(msg.hdLev); this.dangerLevel = this.dangerType(msg.hdLev);
this.source1 = this.source1 ? this.source1 : msg.dangerSource; this.source1 = this.source1
? this.source1
: msg.dangerSource;
this.findTime = msg.hdDiscoveryTime; this.findTime = msg.hdDiscoveryTime;
this.source = msg.dangerId; this.source = msg.dangerId;
this.location = msg.hdPosition; this.location = msg.hdPosition;
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 = (res.data.imgsysFiles || []).map((item) => { this.uploaderImg = (res.data.imgsysFiles || []).map(
(item) => {
return { return {
...item, ...item,
url: item.filePath, url: item.filePath,
}; };
}); }
);
console.log(this.uploaderImg); console.log(this.uploaderImg);
this.uploaderVideo = (res.data.videosysFiles || []).map((item) => { this.uploaderVideo = (res.data.videosysFiles || []).map(
(item) => {
return { return {
...item, ...item,
url: item.filePath, url: item.filePath,
file:new File([],item['fileName'],{})
}; };
}); }
);
postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then((res) => { postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then(
(res) => {
this.columnsRecPeople = res.data; this.columnsRecPeople = res.data;
}); }
);
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
...@@ -697,9 +700,11 @@ export default { ...@@ -697,9 +700,11 @@ export default {
this.projectName = value.projectName; this.projectName = value.projectName;
this.showProjectName = false; this.showProjectName = false;
// 这里请求隐患整改人接口 // 这里请求隐患整改人接口
postHdShowPeople(`/hdreport/showPeople/${this.projectId}`).then((res) => { postHdShowPeople(`/hdreport/showPeople/${this.projectId}`).then(
(res) => {
this.columnsRecPeople = res.data; this.columnsRecPeople = res.data;
}); }
);
}, },
// 适用范围 // 适用范围
onConRange(value) { onConRange(value) {
...@@ -773,11 +778,6 @@ export default { ...@@ -773,11 +778,6 @@ export default {
this.columnsSource1 = res.data; this.columnsSource1 = res.data;
}); });
}, },
// 风险源第二个字段
// onConSource1(value) {
// this.source1 = value.riskSource;
// this.showSource1 = false;
// },
goSelectTwo() { goSelectTwo() {
if (this.source) { if (this.source) {
// 跳转到多选页面 // 跳转到多选页面
......
<template>
<div>
<LHeader :text="$route.meta.title"></LHeader>
<!-- 内容列表 -->
<div class="con-list">
<div class="cell-wrap">
<!-- <p>隐患上报</p> -->
<van-cell-group inset>
<van-row gutter="">
<van-col span="7"
><span class="field-title"
>隐患单编号:</span
></van-col
>
<van-col span="17">{{ data.pid }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title"
>延期时间:</span
></van-col
>
<van-col span="17">{{ data.applyDate }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title"
>延期理由:</span
></van-col
>
<van-col span="17">{{ data.applyReason }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title"
>审批结果:</span
></van-col
>
<van-col span="17">{{ data.examineResult==0?'退回':(data.examineResult==1?'通过':'待审批') }}</van-col>
</van-row>
<van-row gutter="" v-if="data.examineResult ">
<van-col span="7"
><span class="field-title"
>审批理由:</span
></van-col
>
<van-col span="17">{{ data.examineResult }}</van-col>
</van-row>
<!-- examineResult -->
</van-cell-group>
<van-cell-group>
<van-button plain type="info" block @click="$router.back()" color="#2980F7">返回列表</van-button>
</van-cell-group>
</div>
</div>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
export default {
components: {
LHeader,
},
data() {
return {
id: 0,
data: {},
};
},
created() {
this.id = this.$route.params.id;
this.getDetail();
},
methods: {
getDetail() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
getFun("/delayApply/delayDetails/" + this.id)
.then((res) => {
this.$toast.clear();
this.data = res.data.delayApply;
})
.catch((err) => {
console.log(err);
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
},
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0.533333rem;
background-color: #f0f1f5;
.cell-wrap {
position: relative;
}
p {
font-size: 0.4rem;
font-weight: none;
padding-left: 0.16rem;
margin: 0.186667rem 0;
color: #7f7f7f;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
}
.confirm-wrap {
position: relative;
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: none;
}
.field-title {
color: black;
font-weight: none;
}
}
</style>
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
postList(); postList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 --> <!-- 内容列表 -->
...@@ -39,14 +39,14 @@ ...@@ -39,14 +39,14 @@
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患单编号:</van-col> <van-col span="7">隐患单编号:</van-col>
<van-col span="17"> <van-col span="17">
{{ item.businessId || item.id }} {{ item.businessId || item.pid || item.id}}
</van-col> </van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7">所属项目:</van-col> <van-col span="7">所属项目:</van-col>
<van-col span="17">{{ item.proId }}</van-col> <van-col span="17">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="" v-show="item.hdLev">
<van-col span="7">隐患级别:</van-col> <van-col span="7">隐患级别:</van-col>
<van-col span="17">{{ <van-col span="17">{{
item.hdLev | dangerText item.hdLev | dangerText
...@@ -75,7 +75,6 @@ ...@@ -75,7 +75,6 @@
<van-col span="17">{{ item.taskName }}</van-col> <van-col span="17">{{ item.taskName }}</van-col>
</van-row> </van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
...@@ -89,16 +88,17 @@ ...@@ -89,16 +88,17 @@
round round
type="info" type="info"
@click="goConfirm(item)" @click="goConfirm(item)"
v-if="active !== 2" v-if="active == 0 || active == 1"
>隐患整改</van-button >隐患整改</van-button
> >
<van-button <van-button
round round
type="info" color="orange"
@click="goDelay(item)" @click="goDelay(item)"
v-if="active !== 2" v-if="active == 0 || active == 1"
>申请延期</van-button
> >
申请延期
</van-button>
<!-- <van-button round type="warning " @click="goClose(item)" <!-- <van-button round type="warning " @click="goClose(item)"
>关闭</van-button >关闭</van-button
> --> > -->
...@@ -130,6 +130,7 @@ import { getFun, postFun } from "@/service/table.js"; ...@@ -130,6 +130,7 @@ import { getFun, postFun } from "@/service/table.js";
// import { dangerRect, list1, list2 } from "@/service/danger"; // import { dangerRect, list1, list2 } from "@/service/danger";
import { Dialog } from "vant"; import { Dialog } from "vant";
export default { export default {
name:'change-danger',
components: { components: {
LHeader, LHeader,
}, },
...@@ -153,6 +154,10 @@ export default { ...@@ -153,6 +154,10 @@ export default {
title: "已整改", title: "已整改",
api: "/rectification/finishList", api: "/rectification/finishList",
}, },
// {
// title: "我的延期",
// api: "/rectification/finishDelayList",
// },
], ],
}; };
}, },
...@@ -220,57 +225,6 @@ export default { ...@@ -220,57 +225,6 @@ export default {
this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试");
}); });
}, },
// onClickTab(val, select = "") {
// this.showIndex = null;
// this.$toast.loading({
// message: "加载中...",
// forbidClick: true,
// loadingType: "spinner",
// duration: 0,
// });
// // 这里根据tab切换调用接口
// let formdata = new FormData();
// formdata.append("select", select);
// [list1, list2]
// [val](formdata)
// .then((res) => {
// console.log(res.rows);
// this.$toast.clear();
// this.messageList = res.rows;
// // 判断有无数据返回
// // if (this.messageList.length == 0) {
// // this.isHaveNews = true;
// // }
// })
// .catch(() => {
// this.$toast.clear();
// this.$toast.fail("加载失败,请稍后再试");
// });
// },
// 此接口暂时废弃
// postList() {
// this.$toast.loading({
// message: "加载中...",
// forbidClick: true,
// loadingType: "spinner",
// duration: 0,
// });
// dangerRect("/rectification/list")
// .then((res) => {
// this.$toast.clear();
// this.messageList = res.rows;
// // 判断有无数据返回
// if (this.messageList.length == 0) {
// this.isHaveNews = true;
// }
// })
// .catch(() => {
// this.$toast.clear();
// this.$toast.fail("加载失败,请稍后再试");
// });
// },
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
...@@ -282,10 +236,12 @@ export default { ...@@ -282,10 +236,12 @@ export default {
// 详情 // 详情
goDetail(data) { goDetail(data) {
let name =
this.active == 3 ? "finish-delay-detail" : "normal-detail";
this.$router.push({ this.$router.push({
name: "normal-detail", name,
params: { params: {
id: data.taskId||data.id, id: data.taskId || data.id,
}, },
}); });
this.showIndex = null; this.showIndex = null;
......
...@@ -141,6 +141,7 @@ ...@@ -141,6 +141,7 @@
<!-- 退回是的选项 --> <!-- 退回是的选项 -->
<div class="disagree" v-else> <div class="disagree" v-else>
<van-field <van-field
required
v-model="returnReason" v-model="returnReason"
label="退回原因" label="退回原因"
name="confirmOpinion" name="confirmOpinion"
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
postList(); postList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 --> <!-- 内容列表 -->
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患单编号:</van-col> <van-col span="7">隐患单编号:</van-col>
<van-col span="17">{{ item.businessId||item.id }}</van-col> <van-col span="17">{{
item.businessId || item.id
}}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7">所属项目:</van-col> <van-col span="7">所属项目:</van-col>
...@@ -75,7 +77,7 @@ ...@@ -75,7 +77,7 @@
> >
<van-button <van-button
round round
v-if="active==0" v-if="active == 0"
type="info" type="info"
@click="goConfirm(item)" @click="goConfirm(item)"
>确认</van-button >确认</van-button
...@@ -108,6 +110,7 @@ import LHeader from "@/components/header.vue"; ...@@ -108,6 +110,7 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { dangerConfirm } from "@/service/danger"; import { dangerConfirm } from "@/service/danger";
export default { export default {
name:'confirme-danger',
components: { components: {
LHeader, LHeader,
}, },
...@@ -149,10 +152,10 @@ export default { ...@@ -149,10 +152,10 @@ export default {
}); });
let formdata = new FormData(); let formdata = new FormData();
formdata.append("select", select); formdata.append("select", select);
postFun(this.tabs[this.active]['api'], formdata) postFun(this.tabs[this.active]["api"], formdata)
.then((res) => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.data||res.rows; this.messageList = res.data || res.rows;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
...@@ -176,7 +179,7 @@ export default { ...@@ -176,7 +179,7 @@ export default {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
id: data.taskId||data.id, id: data.taskId || data.id,
}, },
}); });
this.showIndex = null; this.showIndex = null;
...@@ -229,7 +232,7 @@ export default { ...@@ -229,7 +232,7 @@ export default {
} }
} }
} }
/deep/.van-tab__pane{ /deep/.van-tab__pane {
min-height: 8rem; min-height: 8rem;
} }
</style> </style>
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
getList(); getList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div <div
...@@ -42,14 +42,18 @@ ...@@ -42,14 +42,18 @@
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患单编号:</van-col> <van-col span="7">隐患单编号:</van-col>
<van-col span="17">{{ item.businessId }}</van-col> <van-col span="17">{{
item.businessId || 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>
<van-col span="17">{{ item.proId }}</van-col> <van-col span="17">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患级别:</van-col> <van-col span="7" v-if="item.hdLev"
>隐患级别:</van-col
>
<van-col span="17">{{ <van-col span="17">{{
item.hdLev | dangerText item.hdLev | dangerText
}}</van-col> }}</van-col>
...@@ -80,8 +84,8 @@ ...@@ -80,8 +84,8 @@
<van-button <van-button
round round
type="primary" type="primary"
@click="goDetail(item)" @click="goDetail(item, 'normal-detail')"
>详情</van-button >隐患详情</van-button
> >
<van-button <van-button
round round
...@@ -90,11 +94,36 @@ ...@@ -90,11 +94,36 @@
v-if="active == 0" v-if="active == 0"
>审批 >审批
</van-button> </van-button>
<van-button
round
type="info"
@click="
goDetail(
item,
'finish-delay-detail'
)
"
v-if="active == 1"
>延期查看</van-button
>
</div> </div>
</van-overlay> </van-overlay>
</template> </template>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 -->
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="messageList.length == 0"
>
暂无数据
</div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
...@@ -106,6 +135,7 @@ import { getFun, postFun } from "@/service/table.js"; ...@@ -106,6 +135,7 @@ import { getFun, postFun } from "@/service/table.js";
import { delayList } from "@/service/danger"; import { delayList } from "@/service/danger";
export default { export default {
name:'delay-approval',
components: { components: {
LHeader, LHeader,
}, },
...@@ -134,7 +164,7 @@ export default { ...@@ -134,7 +164,7 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
getList(select='') { getList(select = "") {
/*接口对接3 START*/ /*接口对接3 START*/
// 例子: // 例子:
this.$toast.loading({ this.$toast.loading({
...@@ -148,13 +178,14 @@ export default { ...@@ -148,13 +178,14 @@ export default {
postFun(this.tabs[this.active]["api"], 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 || res.data;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
} }
}) })
.catch(() => { .catch((err) => {
console.log(err);
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试");
}); });
...@@ -172,11 +203,14 @@ export default { ...@@ -172,11 +203,14 @@ export default {
}, },
// 详情 // 详情
goDetail(data) {
goDetail(data, name = "normal-detail") {
let id =
name == "normal-detail" ? data.businessId || data.pid : data.id;
this.$router.push({ this.$router.push({
name: "normal-detail", name,
params: { params: {
id: data.businessId, id,
}, },
}); });
this.showIndex = null; this.showIndex = null;
...@@ -229,4 +263,10 @@ export default { ...@@ -229,4 +263,10 @@ export default {
} }
} }
} }
/deep/.van-tab__pane-wrapper {
min-height: 8rem;
}
.van-tabs__track {
min-height: 3rem;
}
</style> </style>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<van-field <van-field
v-model="opinion" v-model="opinion"
label="理由或者意见" label='审批意见'
name="examineReason" name="examineReason"
rows="3" rows="3"
type="textarea" type="textarea"
...@@ -76,6 +76,8 @@ export default { ...@@ -76,6 +76,8 @@ export default {
}, },
data() { data() {
return { return {
pid:'',
id:'',
text: "延期审批", text: "延期审批",
taskId: "", taskId: "",
delayTime: "", // 延迟时间 delayTime: "", // 延迟时间
...@@ -105,6 +107,9 @@ export default { ...@@ -105,6 +107,9 @@ export default {
formdata.append("examineResult", this.isAgree*1); formdata.append("examineResult", this.isAgree*1);
formdata.append("examineReason", values.examineReason); formdata.append("examineReason", values.examineReason);
formdata.append("taskId", this.taskId); formdata.append("taskId", this.taskId);
formdata.append("pid", this.pid);
formdata.append('applyDate',this.applyDate);
formdata.append('id',this.id);
delayEdit(`/delayApply/edit`, formdata) delayEdit(`/delayApply/edit`, formdata)
.then((res) => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
...@@ -133,6 +138,8 @@ export default { ...@@ -133,6 +138,8 @@ export default {
// 对数据进行赋值 // 对数据进行赋值
this.applyDate = res.data.delayApply.applyDate; this.applyDate = res.data.delayApply.applyDate;
this.applyReason = res.data.delayApply.applyReason; this.applyReason = res.data.delayApply.applyReason;
this.pid=res.data.delayApply.pid;
this.id=res.data.delayApply.id;
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
......
...@@ -77,6 +77,7 @@ import LHeader from "@/components/header.vue"; ...@@ -77,6 +77,7 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
export default { export default {
name:'insert-danger',
components: { components: {
LHeader, LHeader,
}, },
...@@ -132,7 +133,7 @@ export default { ...@@ -132,7 +133,7 @@ export default {
name: "normal-detail", name: "normal-detail",
params: { params: {
id: data.id, id: data.id,
detailTitle: "上报详情", detailTitle: "隐患详情",
}, },
}); });
this.showIndex = null; this.showIndex = null;
......
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
getList(); getList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
...@@ -115,6 +115,7 @@ import { getFun, postFun } from "@/service/table.js"; ...@@ -115,6 +115,7 @@ import { getFun, postFun } from "@/service/table.js";
/*接口对接2 END*/ /*接口对接2 END*/
export default { export default {
name:'major-danger',
components: { components: {
LHeader, LHeader,
}, },
...@@ -193,6 +194,8 @@ export default { ...@@ -193,6 +194,8 @@ export default {
}, },
// 确认 // 确认
goConfirm(data) { goConfirm(data) {
console.log(data)
localStorage.setItem('majorDanderData',JSON.stringify(data))
this.$router.push({ this.$router.push({
name: "major-survey", name: "major-survey",
params: { params: {
......
...@@ -42,8 +42,14 @@ ...@@ -42,8 +42,14 @@
direction="horizontal" direction="horizontal"
@change="selectResult" @change="selectResult"
> >
<van-radio name="1" style="margin-bottom:0.3rem">{{name=='项目经理二次认定'?'退回到发起人':'同意'}}</van-radio> <van-radio name="1" style="margin-bottom: 0.3rem">{{
<van-radio name="0" style="margin-bottom:0.3rem">{{name=='项目经理二次认定'?'重新发起重大隐患审批':'退回'}}</van-radio> name == "项目经理二次认定" ? "退回到发起人" : "同意"
}}</van-radio>
<van-radio name="0" style="margin-bottom: 0.3rem">{{
name == "项目经理二次认定"
? "重新发起重大隐患审批"
: "退回"
}}</van-radio>
<!-- 退回到发起人 --> <!-- 退回到发起人 -->
<!-- <van-radio name="1" style="margin-bottom:0.3rem">{{name=='项目经理二次认定'?'退回到发起人':'同意'}}</van-radio> <!-- <van-radio name="1" style="margin-bottom:0.3rem">{{name=='项目经理二次认定'?'退回到发起人':'同意'}}</van-radio>
<van-radio name="0" style="margin-bottom:0.3rem">{{name=='项目经理二次认定'?'重新发起重大隐患审批':'退回'}}</van-radio> --> <van-radio name="0" style="margin-bottom:0.3rem">{{name=='项目经理二次认定'?'重新发起重大隐患审批':'退回'}}</van-radio> -->
...@@ -54,17 +60,21 @@ ...@@ -54,17 +60,21 @@
<div class="disagree"> <div class="disagree">
<van-field <van-field
readonly readonly
v-if="radio == 1?(name=='项目经理二次认定'?true:false):(name=='项目经理二次认定'?false:true)" v-if="
radio == 1
? name == '项目经理二次认定'
? true
: false
: name == '项目经理二次认定'
? false
: true
"
clickable clickable
required
name="thinkHdLev" name="thinkHdLev"
:value="thinkLevel" :value="thinkLevel"
label="认定隐患级别" label="认定隐患级别"
placeholder="请选择认定隐患级别" placeholder="请选择认定隐患级别"
@click="showThinkLevel = true" @click="showThinkLevel = true"
:rules="[
{ required: true, message: '认定隐患级别不能为空' },
]"
/> />
<van-popup v-model="showThinkLevel" position="bottom"> <van-popup v-model="showThinkLevel" position="bottom">
<van-picker <van-picker
...@@ -84,8 +94,8 @@ ...@@ -84,8 +94,8 @@
rows="3" rows="3"
type="textarea" type="textarea"
placeholder="请输入" placeholder="请输入"
:required="radio==1?false:true" :required="true"
:rules="[{ required: radio==1?false:true, message: '审批意见不能为空' }]" :rules="[{ required: true, message: '审批意见不能为空' }]"
/> />
</div> </div>
...@@ -114,7 +124,7 @@ export default { ...@@ -114,7 +124,7 @@ export default {
}, },
data() { data() {
return { return {
name:'', name: "",
taskId: "", taskId: "",
messageList: [], messageList: [],
radio: "1", radio: "1",
...@@ -131,42 +141,34 @@ export default { ...@@ -131,42 +141,34 @@ export default {
], ],
}; };
}, },
beforeRouteEnter(to, from, next) {
next((vm) => {
if (from.name === "major-danger") {
vm.messageList = [];
let paramsData = to.params.data;
vm.taskId = paramsData.taskId;
vm.messageList.push(paramsData);
vm.radio = "1";
vm.agreeOpinion = "";
vm.disagreeOpinion = "";
vm.thinkLevel = "";
}
});
},
mounted() { mounted() {
this.getName() this.messageList = [];
console.log(1) let paramsData =
this.$route.params.data ||
JSON.parse(localStorage.getItem("majorDanderData"));
this.messageList.push(paramsData);
this.taskId = paramsData.taskId;
this.radio = "1";
this.agreeOpinion = "";
this.disagreeOpinion = "";
this.thinkLevel = "";
this.getName();
}, },
methods: { methods: {
selectResult(val) { selectResult(val) {
this.radio = val; this.radio = val;
this.disagreeOpinion = "";
}, },
getName(){ getName() {
let id=this.$route.params.data.taskId getFun("/majorapprove/add", {
let fd = new FormData() taskId: this.taskId,
fd.append('taskId',id); })
.then((data) => {
getFun('/majorapprove/add',{ this.name = data.msg;
taskId:id
}).then(data=>{
this.name=data.msg;
}).catch(err=>{
this.$toast.fail("提交失败,请稍后再试");
}) })
.catch((err) => {
this.$toast.fail("提交失败,请稍后再试");
});
}, },
onSubmit(values) { onSubmit(values) {
this.$toast.loading({ this.$toast.loading({
......
...@@ -96,13 +96,14 @@ import { superviseList } from "@/service/danger"; ...@@ -96,13 +96,14 @@ import { superviseList } from "@/service/danger";
/*接口对接2 END*/ /*接口对接2 END*/
export default { export default {
name:'manager-danger',
components: { components: {
LHeader, LHeader,
tabBar, tabBar,
}, },
data() { data() {
return { return {
text: "项目经理督办", text: "项目督办",
searchValue: "", searchValue: "",
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
......
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
taskId: "", taskId: "",
pid:"", pid:"",
messageList: [], messageList: [],
text: "项目经理督办批示", text: "项目督办批示",
opinion: "" opinion: ""
}; };
}, },
......
<template>
<div>
<van-sticky>
<LHeader :text="text"></LHeader>
</van-sticky>
<van-sticky offset-top="1.5rem">
<van-search
v-model="searchValue"
show-action
placeholder="请输入搜索内容"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
</van-sticky>
<van-tabs
v-model="active"
@change="
postList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
:key="index"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="7">隐患单编号:</van-col>
<van-col span="17">
{{ item.businessId || item.pid || item.id }}
</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">所属项目:</van-col>
<van-col span="17">{{ item.proId }}</van-col>
</van-row>
<van-row gutter="" v-show="item.hdLev">
<van-col span="7">隐患级别:</van-col>
<van-col span="17">{{
item.hdLev | dangerText
}}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">适用范围:</van-col>
<van-col span="17">{{ item.hdRange }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">隐患类型:</van-col>
<van-col span="17">{{ item.hdType }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">超期标识:</van-col>
<van-col span="17">{{
item.dueDate | formatTime
}}</van-col>
</van-row>
<van-row gutter="" v-if="item.taskName">
<van-col span="7">工单状态:</van-col>
<van-col span="17">{{ item.taskName }}</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
<van-button
round
type="primary"
@click="goDetail(item, 'normal-detail')"
>隐患详情</van-button
><van-button
round
type="info"
@click="
goDetail(item, 'finish-delay-detail')
"
>延期查看</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="messageList.length == 0"
>
暂无数据
</div>
</van-tab>
</van-tabs>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
export default {
name: "my-delay",
components: {
LHeader,
},
data() {
return {
text: "我的延期",
searchValue: "",
messageList: [],
showIndex: null,
active: 0,
tabs: [
{
title: "待审批",
api: "/delayApply/finishDelayList",
},
{
title: "已通过",
api: "/delayApply/finishDelayListYes",
},
{
title: "已退回",
api: "/delayApply/finishDelayListNo",
},
],
};
},
created() {
this.postList();
},
methods: {
onSearch(val) {
this.postList(this.searchValue);
},
postList(select = "") {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
let formdata = new FormData();
formdata.append("select", select);
postFun(this["tabs"][this.active]["api"], formdata)
.then((res) => {
console.log(res);
this.$toast.clear();
this.messageList = res.rows || res.data;
})
.catch((err) => {
console.log(err);
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.showIndex = index;
},
// 详情
goDetail(data, name = "normal-detail") {
let id = name == "normal-detail" ? data.pid : data.id;
this.$router.push({
name,
params: {
id,
},
});
this.showIndex = null;
},
},
filters: {
formatTime: function (val) {
if (new Date(val).getTime() <= new Date().getTime()) {
return "超期";
} else if (
new Date(val).getTime() >= new Date().getTime() &&
new Date(val).getTime() <= new Date().getTime() + 259200000
) {
return "临期";
} else {
return "正常";
}
},
},
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
/deep/.van-tab__pane-wrapper {
min-height: 8rem;
}
.van-tabs__track {
min-height: 3rem;
}
</style>
...@@ -86,7 +86,9 @@ import tabBar from "@/components/TabBar"; ...@@ -86,7 +86,9 @@ 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 { dangerReturn, dangerReturnDel } from "@/service/danger"; import { dangerReturn, dangerReturnDel } from "@/service/danger";
export default { export default {
name:'report-return',
components: { components: {
LHeader, LHeader,
tabBar, tabBar,
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
postList(); postList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
...@@ -113,7 +113,7 @@ import LHeader from "@/components/header.vue"; ...@@ -113,7 +113,7 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { dangerReview } from "@/service/danger"; import { dangerReview } from "@/service/danger";
export default { export default {
name:'review-danger',
components: { components: {
LHeader, LHeader,
}, },
......
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
<!-- tab标签 --> <!-- tab标签 -->
<van-tabs <van-tabs
v-model="active" v-model="active"
@change="postList" @change="postList(searchValue);showIndex=null"
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title" :sticky="true" <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title" :sticky="true"
offset-top="3rem"> offset-top="2.93rem">
<div v-show="key == active"> <div v-show="key == active">
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<van-row gutter=""> <van-row gutter="">
<van-col span="7">工单状态</van-col> <van-col span="7">工单状态</van-col>
<van-col span="17">{{ <van-col span="17">{{
item | formatTime item.taskName
}}</van-col> }}</van-col>
</van-row> </van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
...@@ -113,12 +113,13 @@ import LHeader from "@/components/header.vue"; ...@@ -113,12 +113,13 @@ 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 {
name:'stand-book',
components: { components: {
LHeader, LHeader,
}, },
data() { data() {
return { return {
text: "隐患历史台账", text: "隐患台账",
active: 0, active: 0,
searchValue: "", searchValue: "",
isHaveNews: false, isHaveNews: false,
......
This diff is collapsed.
...@@ -86,13 +86,14 @@ import { superviseSABlist } from "@/service/danger"; ...@@ -86,13 +86,14 @@ import { superviseSABlist } from "@/service/danger";
/*接口对接2 END*/ /*接口对接2 END*/
export default { export default {
name:'supervise-danger',
components: { components: {
LHeader, LHeader,
tabBar tabBar
}, },
data() { data() {
return { return {
text: "隐患督办", text: "企业级督办",
searchValue: "", searchValue: "",
messageList: [], messageList: [],
isHaveNews: false, isHaveNews: false,
......
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
data() { data() {
return { return {
taskId: "", taskId: "",
text: "隐患督办批示", text: "企业级督办批示",
messageList: [], messageList: [],
opinion: "", opinion: "",
......
<template> <template>
<div> <div>
<!-- 重置密码页面 --> <!-- 修改密码页面 -->
<!-- 头部标签 --> <!-- 头部标签 -->
<LHeader :text="$route.meta.title"></LHeader> <LHeader :text="$route.meta.title"></LHeader>
...@@ -17,9 +17,7 @@ ...@@ -17,9 +17,7 @@
name="oldPassword" name="oldPassword"
label="旧密码" label="旧密码"
placeholder="请输入旧密码" placeholder="请输入旧密码"
:rules="[ :rules="[{ required: true, message: '请填写密码' }]"
{ required: true, message: '请填写密码' }
]"
/> />
<van-field <van-field
required required
...@@ -33,7 +31,7 @@ ...@@ -33,7 +31,7 @@
{ {
message: '密码必须大于6个字符小于20个字符', message: '密码必须大于6个字符小于20个字符',
validator: (val) => { validator: (val) => {
return val['length'] > 6 && val['length'] < 20; return val['length'] >= 6 && val['length'] < 20;
}, },
}, },
]" ]"
...@@ -46,11 +44,11 @@ ...@@ -46,11 +44,11 @@
label="再次输入" label="再次输入"
placeholder="再次输入新密码" placeholder="再次输入新密码"
:rules="[ :rules="[
{ validator, required: true, message: '二次输入不正确' }, { validator, required: true, message: '二次密码输入不一致' },
{ {
message: '密码必须大于6个字符小于20个字符', message: '密码必须大于等于6个字符小于20个字符',
validator: (val) => { validator: (val) => {
return val['length'] > 6 && val['length'] < 20; return val['length'] >= 6 && val['length'] < 20;
}, },
}, },
]" ]"
...@@ -80,11 +78,11 @@ export default { ...@@ -80,11 +78,11 @@ export default {
oldPassword: "", oldPassword: "",
newPassword: "", newPassword: "",
confirm: "", confirm: "",
} },
}; };
}, },
mounted(){ mounted() {
console.log(getUserInfo()) console.log(getUserInfo());
}, },
methods: { methods: {
validator(val) { validator(val) {
...@@ -97,30 +95,17 @@ export default { ...@@ -97,30 +95,17 @@ export default {
loadingType: "spinner", loadingType: "spinner",
duration: 0, duration: 0,
}); });
postFun( postFun("/mobile/resetPwd", this.obj2formdata(val))
"/mobile/resetPwd",
this.obj2formdata(val)
)
.then((data) => { .then((data) => {
if (data.code == 0) {
this.$toast.clear(); this.$toast.clear();
this.$dialog.alert({ this.$toast.success('密码修改成功!');
title:'提示', this.$router.back()
message:'密码重置成功,请重新登录',
}).then(
res=>{
removeToken();
this.$router.push('/login2')
} }
)
}) })
.catch((err) => {
this.$toast.clear();
this.$toast.fail("操作失败,请稍后再试");
});
}, },
obj2formdata(data) { obj2formdata(data) {
console.log(data,'fasfasdfsd') console.log(data, "fasfasdfsd");
let fd = new FormData(); let fd = new FormData();
for (let k in data) { for (let k in data) {
if (data[k]) { if (data[k]) {
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
getList(); getList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab <van-tab
v-for="(item, key) in tabs" v-for="(item, key) in tabs"
...@@ -118,12 +118,13 @@ import { postriskBook } from "@/service/risk"; ...@@ -118,12 +118,13 @@ import { postriskBook } from "@/service/risk";
/*接口对接2 END*/ /*接口对接2 END*/
export default { export default {
name:'risk-account',
components: { components: {
LHeader, LHeader,
}, },
data() { data() {
return { return {
text: "风险历史台账", text: "风险台账",
searchValue: "", searchValue: "",
messageList: [], messageList: [],
isHaveNews: false, isHaveNews: false,
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
/> --> /> -->
<van-field <van-field
v-show="setRank=='其他定级方式'" v-show="setRank == '其他定级方式'"
v-model="setRankMode" v-model="setRankMode"
name="setRankMode" name="setRankMode"
label="定级方式" label="定级方式"
...@@ -164,7 +164,11 @@ ...@@ -164,7 +164,11 @@
placeholder="请输入" placeholder="请输入"
/> />
<van-field name="setRankModeFile" label=" " v-show="setRank=='其他定级方式'"> <van-field
name="setRankModeFile"
label=" "
v-show="setRank == '其他定级方式'"
>
<template #input> <template #input>
<van-uploader <van-uploader
multiple multiple
...@@ -193,7 +197,9 @@ ...@@ -193,7 +197,9 @@
alt="" alt=""
style="width: 0.64rem; height: 0.64rem" style="width: 0.64rem; height: 0.64rem"
/> />
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text"
>最多上传五个</span
>
</div> </div>
</template> </template>
</van-uploader> </van-uploader>
...@@ -312,7 +318,9 @@ ...@@ -312,7 +318,9 @@
alt="" alt=""
style="width: 0.64rem; height: 0.64rem" style="width: 0.64rem; height: 0.64rem"
/> />
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text"
>最多上传五个</span
>
</div> </div>
</template> </template>
</van-uploader> </van-uploader>
...@@ -357,7 +365,9 @@ ...@@ -357,7 +365,9 @@
alt="" alt=""
style="width: 0.64rem; height: 0.64rem" style="width: 0.64rem; height: 0.64rem"
/> />
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text"
>最多上传五个</span
>
</div> </div>
</template> </template>
</van-uploader> </van-uploader>
...@@ -403,7 +413,9 @@ ...@@ -403,7 +413,9 @@
alt="" alt=""
style="width: 0.64rem; height: 0.64rem" style="width: 0.64rem; height: 0.64rem"
/> />
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text"
>最多上传五个</span
>
</div> </div>
</template> </template>
</van-uploader> </van-uploader>
...@@ -595,9 +607,8 @@ export default { ...@@ -595,9 +607,8 @@ export default {
} }
}, },
onSubmit(values) { onSubmit(values) {
let formdata = new FormData(); let formdata = new FormData();
formdata.append('id',this.id); 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);
...@@ -614,7 +625,7 @@ export default { ...@@ -614,7 +625,7 @@ export default {
formdata.append("emergencyMeasure", this.urgent); formdata.append("emergencyMeasure", this.urgent);
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式 // 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
console.log(values) console.log(values);
values.setRankModeFile.forEach((item) => { values.setRankModeFile.forEach((item) => {
// 定级方式 // 定级方式
formdata.append("risk4[]", item.file); formdata.append("risk4[]", item.file);
...@@ -693,7 +704,7 @@ export default { ...@@ -693,7 +704,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.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;
...@@ -713,46 +724,58 @@ export default { ...@@ -713,46 +724,58 @@ export default {
// urgentImg administrationImg technologyImg setRankModeImg // urgentImg administrationImg technologyImg setRankModeImg
// 定级方式 // 定级方式
this.urgentImg = (res.data.imgsysFiles2 || []).map(item=>{return {...item,url:item.filePath}}); this.urgentImg = (res.data.imgsysFiles2 || []).map(
this.administrationImg = (res.data.imgsysFiles1 || []).map(item=>{return {...item,url:item.filePath}}); (item) => {
this.technologyImg = (res.data.imgsysFiles0 || []).map(item=>{return {...item,url:item.filePath}}); return {
this.setRankModeImg = (res.data.imgsysFiles3 || []).map(item=>{return {...item,url:item.filePath}}); ...item,
url: item.filePath,
file: new File([], item["fileName"], {}),
};
}
);
this.administrationImg = (res.data.imgsysFiles1 || []).map(
(item) => {
return {
...item,
url: item.filePath,
file: new File([], item["fileName"], {}),
};
}
);
this.technologyImg = (res.data.imgsysFiles0 || []).map(
(item) => {
return {
...item,
url: item.filePath,
file: new File([], item["fileName"], {}),
};
}
);
this.setRankModeImg = (res.data.imgsysFiles3 || []).map(
(item) => {
return {
...item,
url: item.filePath,
file: new File([], item["fileName"], {}),
};
}
);
// this.technologyFile = res.data.riskFileList1.map(() => {
// return {
// ...item,
// url: item.filePath,
// };
// });
// this.urgentImg = data.riskFileList4.map(() => {
// console.log(111)
// 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);
postHdPeople(`/riskMain/getUserList`, formdata).then((res) => { postHdPeople(`/riskMain/getUserList`, formdata).then(
(res) => {
this.columnsMainDutyPeopLe = res.data; this.columnsMainDutyPeopLe = res.data;
this.mainDutyPeopLe = this.columnsMainDutyPeopLe.filter((item) => { this.mainDutyPeopLe =
return item["userId"] == data.responsibilityMember; this.columnsMainDutyPeopLe.filter((item) => {
return (
item["userId"] ==
data.responsibilityMember
);
})[0]["userName"]; })[0]["userName"];
}); }
);
// console.log(data) // console.log(data)
this.$toast.clear(); this.$toast.clear();
this.returnCause = res.data.reason; this.returnCause = res.data.reason;
...@@ -783,9 +806,11 @@ export default { ...@@ -783,9 +806,11 @@ export default {
this.source = ""; this.source = "";
this.trouble = ""; this.trouble = "";
// 请求风险源 // 请求风险源
postHdSource(`/riskMain/showSourceName/${this.factor}`).then((res) => { postHdSource(`/riskMain/showSourceName/${this.factor}`).then(
(res) => {
this.columnsSource = res.data; this.columnsSource = res.data;
}); }
);
}, },
// 风险源 // 风险源
onConSource(value) { onConSource(value) {
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
postList(); postList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 --> <!-- 内容列表 -->
...@@ -119,6 +119,7 @@ import LHeader from "@/components/header.vue"; ...@@ -119,6 +119,7 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { postriskConList } from "@/service/risk"; import { postriskConList } from "@/service/risk";
export default { export default {
name:'risk-confirme',
components: { components: {
LHeader: LHeader, LHeader: LHeader,
}, },
...@@ -187,7 +188,7 @@ export default { ...@@ -187,7 +188,7 @@ export default {
this.$router.push({ this.$router.push({
name: "risk-big-detail", name: "risk-big-detail",
params: { params: {
id: data.taskId||data.processinstanceId, id: data.taskId||data.id,
}, },
}); });
this.showIndex = null; this.showIndex = null;
......
...@@ -97,6 +97,7 @@ import LHeader from "@/components/header.vue"; ...@@ -97,6 +97,7 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { postriskConReturn, postriskConReDel } from "@/service/risk"; import { postriskConReturn, postriskConReDel } from "@/service/risk";
export default { export default {
name:'risk-return',
components: { components: {
LHeader: LHeader, LHeader: LHeader,
}, },
......
<template> <template>
<div> <div>
<!-- 头部标签 --> <!-- 头部标签 -->
<van-sticky> <van-sticky>
<header class="header-wrap">首开集团安全隐患排查治理体系</header> <header class="header-wrap">
首开集团安全隐患排查治理体系
<van-icon
:name="require('../../assets/sq.png')"
class="iconColorRight"
size="0.5rem"
@click="$router.push('/scan')"
/>
</header>
</van-sticky> </van-sticky>
<!-- 搜索 -->
<!-- <div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @search="onSearch" />
</div> -->
<!-- 滚动通知 -->
<van-notice-bar left-icon="volume-o" :scrollable="false" mode="link">
<van-swipe
vertical
class="notice-swipe"
:autoplay="3000"
:show-indicators="false"
>
<van-swipe-item>提示:您有1条待办事项需要处理</van-swipe-item>
<van-swipe-item>提示:您有2条待办事项需要处理</van-swipe-item>
</van-swipe>
</van-notice-bar>
<!-- 内容 --> <!-- 内容 -->
<div class="con"> <div class="con">
<!-- 消息中心 -->
<!-- <van-cell-group inset v-if="finalNewsCenterList.length > 0">
<van-cell value="消息中心" />
<van-grid :column-num="5">
<van-grid-item
v-for="item in finalNewsCenterList"
:key="item.key"
:icon="item.imgUrl"
:text="item.text"
@click="myClick(item.text)"
/>
</van-grid>
</van-cell-group> -->
<!-- 风控分级管控 --> <!-- 风控分级管控 -->
<van-cell-group inset v-if="finalRiskList.length > 0"> <van-cell-group inset v-if="finalRiskList.length > 0">
<van-cell value="风险分级管控" /> <van-cell value="风险分级管控" />
...@@ -88,6 +64,7 @@ ...@@ -88,6 +64,7 @@
</template> </template>
<script> <script>
let scan = null;
import tabBar from "@/components/TabBar"; import tabBar from "@/components/TabBar";
import { postWork } from "@/service/workbench"; import { postWork } from "@/service/workbench";
export default { export default {
...@@ -204,13 +181,19 @@ export default { ...@@ -204,13 +181,19 @@ export default {
key: "9", key: "9",
path: "/supervise-danger", path: "/supervise-danger",
imgUrl: require("@/assets/workbench/retification-acceptance.png"), imgUrl: require("@/assets/workbench/retification-acceptance.png"),
text: "隐患督办", text: "企业级督办",
}, },
{ {
key: "10", key: "10",
path: "/manager-danger", path: "/manager-danger",
imgUrl: require("@/assets/workbench/inspect-plane.png"), imgUrl: require("@/assets/workbench/inspect-plane.png"),
text: "经理督办", text: "项目级督办",
},
{
key: "12",
path: "/my-delay",
imgUrl: require("@/assets/workbench/inspect-plane.png"),
text: "我的延期",
}, },
], ],
safetyCheckList: [ safetyCheckList: [
...@@ -255,14 +238,14 @@ export default { ...@@ -255,14 +238,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", key: "8",
path: "/checked-confirm", path: "/checked-confirm",
imgUrl: require("@/assets/workbench/ehcek-record.png"), imgUrl: require("@/assets/workbench/ehcek-record.png"),
text: "整改确认" text: "整改确认",
} },
], ],
// 后台给的数据权限对象 // 后台给的数据权限对象
...@@ -278,6 +261,10 @@ export default { ...@@ -278,6 +261,10 @@ export default {
// 根据权限显示对应的图标 // 根据权限显示对应的图标
this.getWorkList(); this.getWorkList();
}, },
async mounted() {
await this.startRecognize();
await this.startScan();
},
methods: { methods: {
myClick(data) {}, myClick(data) {},
jump(path) { jump(path) {
...@@ -307,7 +294,9 @@ export default { ...@@ -307,7 +294,9 @@ export default {
if (this.powerObj.风险分级管控) { if (this.powerObj.风险分级管控) {
// 对两个数组进行比较 拿到需要的数据 赋值给新数组 (赋值给新数组是为了解决页面闪屏问题) // 对两个数组进行比较 拿到需要的数据 赋值给新数组 (赋值给新数组是为了解决页面闪屏问题)
this.finalRiskList = [...this.riskList].filter((x) => this.finalRiskList = [...this.riskList].filter((x) =>
[...this.powerObj.风险分级管控].some((y) => y.menuName === x.text) [...this.powerObj.风险分级管控].some(
(y) => y.menuName === x.text
)
); );
// 如果有隐患上报权限 则在添加一个 上报退回的权限 // 如果有隐患上报权限 则在添加一个 上报退回的权限
...@@ -327,8 +316,11 @@ export default { ...@@ -327,8 +316,11 @@ export default {
} }
// 隐患排查治理 // 隐患排查治理
if (this.powerObj.隐患排查治理) { if (this.powerObj.隐患排查治理) {
this.finalDangerList = [...this.dangerList].filter((x) => this.finalDangerList = [...this.dangerList].filter(
[...this.powerObj.隐患排查治理].some((y) => y.menuName === x.text) (x) =>
[...this.powerObj.隐患排查治理].some(
(y) => y.menuName === x.text
)
); );
// 如果有隐患上报权限 则在添加一个 上报退回的权限 // 如果有隐患上报权限 则在添加一个 上报退回的权限
this.powerObj.隐患排查治理.map((item) => { this.powerObj.隐患排查治理.map((item) => {
...@@ -348,8 +340,12 @@ export default { ...@@ -348,8 +340,12 @@ export default {
// this.finalDangerList = this.dangerList // this.finalDangerList = this.dangerList
// 安全监督检查 // 安全监督检查
if (this.powerObj.安全监督检查) { if (this.powerObj.安全监督检查) {
this.finalSafetyCheckList = [...this.safetyCheckList].filter((x) => this.finalSafetyCheckList = [
[...this.powerObj.安全监督检查].some((y) => y.menuName === x.text) ...this.safetyCheckList,
].filter((x) =>
[...this.powerObj.安全监督检查].some(
(y) => y.menuName === x.text
)
); );
} else { } else {
this.finalSafetyCheckList = []; this.finalSafetyCheckList = [];
...@@ -361,7 +357,7 @@ export default { ...@@ -361,7 +357,7 @@ export default {
} }
}); });
}, },
}, }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -404,4 +400,16 @@ export default { ...@@ -404,4 +400,16 @@ export default {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
} }
header .iconColorRight {
color: white;
float: right;
position: relative;
top: 32%;
right: 5%;
transform: scale(2);
.van-icon__image {
width: 0.35rem;
height: 0.35rem;
}
}
</style> </style>
<template>
<div class="qrcode">
<qrcode @success="success" />
</div>
</template>
<script>
import { getFun, postFun } from "@/service/table.js";
export default {
components: {
// 注册
qrcode: () => import("@/components/QrCodeReader"),
},
mounted() {},
methods: {
success(val) {
// alert(val);
let formdata = new FormData();
formdata.append("activityid", val);
postFun("/train/sign", formdata)
.then((res) => {
this.$toast.clear();
// this.$toast.success("扫码成功");
let obj ={
签到成功:'success',
签到失败:'fail',
重复签到:'warn'
}
this.$router.replace({
name:obj[res.data.details],
query:{
text:res.data.details
}
})
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("扫码失败,请稍后再试");
});
},
},
};
</script>
\ No newline at end of file
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