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
......@@ -47,10 +47,17 @@ export default {
"noticeList",
"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() {
// 这个配合列表路由使用缓存初始缓存页面
this.otherCache=[...this.cachePage];
let tabH =
document
.getElementsByTagName("html")[0]
......@@ -67,13 +74,25 @@ export default {
},
computed: {
showTab() {
return !["login", "login2", "choose-people"].includes(
return !["login", "login2", "choose-people","scan",'success','fail','warn'].includes(
this.$route.name
);
},
},
watch: {
$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) {
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>
<div>
<!-- 占位导航栏div,防止导航栏挡住内容 -->
<div style="width:100%;height:2rem"></div>
<van-tabbar v-model="active" @change="onChange">
<van-tabbar-item
v-for="(item,index) in tabBarList"
:key="index"
:icon="active==item.name?item.imgUrlActive: item.imgUrl"
>{{ item.text }}</van-tabbar-item
>
</van-tabbar>
</div>
<div>
<!-- 占位导航栏div,防止导航栏挡住内容 -->
<van-tabbar v-model="active" @change="onChange" route>
<van-tabbar-item
v-for="(item, index) in tabBarList"
:key="index"
:icon="active == item.name ? item.imgUrlActive : item.imgUrl"
>{{ item.text }}</van-tabbar-item
>
</van-tabbar>
</div>
</template>
<script>
export default {
props:{
index: {
type: Number,
default: 0
data() {
return {
active: 1,
tabBarList: [
{
key: "1",
name: "0",
imgUrl: require("@/assets/tabBar/new.png"),
imgUrlActive: require("@/assets/tabBar/new-active.png"),
path: "/message-center",
text: "消息中心",
},
{
key: "2",
name: "1",
imgUrl: require("@/assets/tabBar/workbench.png"),
imgUrlActive: require("@/assets/tabBar/workbench-active.png"),
path: "/save-workbench",
text: "安全工作台",
},
{
key: "3",
name: "2",
imgUrl: require("@/assets/tabBar/my.png"),
imgUrlActive: require("@/assets/tabBar/my-active.png"),
path: "/my",
text: "我的地盘",
},
],
};
},
},
data() {
return {
active: "0",
tabBarList: [
{
key: "1",
name:'0',
imgUrl: require("@/assets/tabBar/new.png"),
imgUrlActive: require("@/assets/tabBar/new-active.png"),
path: "/message-center",
text: "消息中心"
methods: {
onChange(index) {
if (this.active == index) {
this.tabBarList.forEach((item) => {
if (item.name == this.active) {
this.$router.push(item.path);
}
});
}
},
{
key: "2",
name:'1',
imgUrl: require("@/assets/tabBar/workbench.png"),
imgUrlActive: require("@/assets/tabBar/workbench-active.png"),
path: "/save-workbench",
text: "安全工作台"
},
{
key: "3",
name:'2',
imgUrl: require("@/assets/tabBar/my.png"),
imgUrlActive: require("@/assets/tabBar/my-active.png"),
path: "/my",
text: "我的地盘"
}
]
};
},
mounted() {
this.active = this.index
},
methods: {
onChange(index) {
this.active = index;
if(this.active==index){
this.tabBarList.forEach((item)=>{
if(item.name==this.active){
this.$router.push(item.path)
}
})
}else{
}
}
}
},
};
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>
</script>
\ No newline at end of file
......@@ -445,7 +445,7 @@ const routes = [{
path: '/stand-book',
name: 'stand-book',
meta: {
title: '隐患历史台账',
title: '隐患台账',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/standBook'),
......@@ -460,22 +460,22 @@ const routes = [{
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/standBook/normalDetail'),
},
// 隐患督办列表
// 企业级督办列表
{
path: '/supervise-danger',
name: 'supervise-danger',
meta: {
title: '隐患督办',
title: '企业级督办',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/superviseDanger'),
},
// 隐患督办批示
// 企业级督办批示
{
path: '/super-survey',
name: 'super-survey',
meta: {
title: '隐患督办',
title: '企业级督办',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/superviseDanger/superSurvey'),
......@@ -524,22 +524,22 @@ const routes = [{
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/delayApproval/ratifyInfo'),
},
// 项目经理督办列表
// 项目督办列表
{
path: '/manager-danger',
name: 'manager-danger',
meta: {
title: '项目经理督办',
title: '项目督办',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/managerDanger'),
},
// 项目经理督办批示
// 项目督办批示
{
path: '/manager-survey',
name: 'manager-survey',
meta: {
title: '项目经理督办',
title: '项目督办',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/managerDanger/managerSurvey'),
......@@ -630,7 +630,7 @@ const routes = [{
component: () => import('@/views/my/role')
},
{
path:'/message-details',
path: '/message-details',
name: 'message-details',
meta: {
title: '消息详情',
......@@ -642,7 +642,7 @@ const routes = [{
path: '/my-reset-pas',
name: 'my-reset-pas',
meta: {
title: '重置密码',
title: '修改密码',
index: 1
},
component: () => import('@/views/my/resetPas')
......@@ -656,7 +656,60 @@ const routes = [{
},
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({
......
......@@ -166,7 +166,7 @@ export function dangerReviewAdd(url, data) {
})
}
// 隐患历史台账模块
// 隐患台账模块
export function dangerStandBook(url, data) {
return request({
url: url,
......@@ -202,7 +202,7 @@ export function majorAdd(url, data) {
})
}
//隐患督办
//企业级督办
export function superviseList(url, data) {
return request({
url: url,
......@@ -211,7 +211,7 @@ export function superviseList(url, data) {
})
}
//经理督办
//项目级督办
export function superviseSABlist(url, data) {
return request({
url: url,
......@@ -220,7 +220,7 @@ export function superviseSABlist(url, data) {
})
}
//经理督办添加
//项目级督办添加
export function superviseAdd(url, data) {
return request({
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
This diff is collapsed.
<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 @@
<van-tabs
v-model="active"
@change="
postList();
postList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="3rem"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 -->
......@@ -39,14 +39,14 @@
<van-row gutter="">
<van-col span="7">隐患单编号:</van-col>
<van-col span="17">
{{ item.businessId || item.id }}
{{ 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="">
<van-row gutter="" v-show="item.hdLev">
<van-col span="7">隐患级别:</van-col>
<van-col span="17">{{
item.hdLev | dangerText
......@@ -71,11 +71,10 @@
}}</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-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">
......@@ -89,16 +88,17 @@
round
type="info"
@click="goConfirm(item)"
v-if="active !== 2"
v-if="active == 0 || active == 1"
>隐患整改</van-button
>
<van-button
round
type="info"
color="orange"
@click="goDelay(item)"
v-if="active !== 2"
>申请延期</van-button
v-if="active == 0 || active == 1"
>
申请延期
</van-button>
<!-- <van-button round type="warning " @click="goClose(item)"
>关闭</van-button
> -->
......@@ -130,6 +130,7 @@ import { getFun, postFun } from "@/service/table.js";
// import { dangerRect, list1, list2 } from "@/service/danger";
import { Dialog } from "vant";
export default {
name:'change-danger',
components: {
LHeader,
},
......@@ -153,6 +154,10 @@ export default {
title: "已整改",
api: "/rectification/finishList",
},
// {
// title: "我的延期",
// api: "/rectification/finishDelayList",
// },
],
};
},
......@@ -220,57 +225,6 @@ export default {
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) {
if (this.showIndex != null) {
......@@ -282,10 +236,12 @@ export default {
// 详情
goDetail(data) {
let name =
this.active == 3 ? "finish-delay-detail" : "normal-detail";
this.$router.push({
name: "normal-detail",
name,
params: {
id: data.taskId||data.id,
id: data.taskId || data.id,
},
});
this.showIndex = null;
......
......@@ -141,6 +141,7 @@
<!-- 退回是的选项 -->
<div class="disagree" v-else>
<van-field
required
v-model="returnReason"
label="退回原因"
name="confirmOpinion"
......
......@@ -17,13 +17,13 @@
<van-tabs
v-model="active"
@change="
postList();
postList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="3rem"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 -->
......@@ -36,7 +36,9 @@
>
<van-row gutter="">
<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 gutter="">
<van-col span="7">所属项目:</van-col>
......@@ -75,7 +77,7 @@
>
<van-button
round
v-if="active==0"
v-if="active == 0"
type="info"
@click="goConfirm(item)"
>确认</van-button
......@@ -108,6 +110,7 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { dangerConfirm } from "@/service/danger";
export default {
name:'confirme-danger',
components: {
LHeader,
},
......@@ -149,10 +152,10 @@ export default {
});
let formdata = new FormData();
formdata.append("select", select);
postFun(this.tabs[this.active]['api'], formdata)
postFun(this.tabs[this.active]["api"], formdata)
.then((res) => {
this.$toast.clear();
this.messageList = res.data||res.rows;
this.messageList = res.data || res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
......@@ -176,7 +179,7 @@ export default {
this.$router.push({
name: "normal-detail",
params: {
id: data.taskId||data.id,
id: data.taskId || data.id,
},
});
this.showIndex = null;
......@@ -229,7 +232,7 @@ export default {
}
}
}
/deep/.van-tab__pane{
/deep/.van-tab__pane {
min-height: 8rem;
}
</style>
......@@ -20,13 +20,13 @@
<van-tabs
v-model="active"
@change="
getList();
getList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="3rem"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div
......@@ -42,14 +42,18 @@
>
<van-row gutter="">
<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 gutter="">
<van-col span="7">所属项目:</van-col>
<van-col span="17">{{ item.proId }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">隐患级别:</van-col>
<van-col span="7" v-if="item.hdLev"
>隐患级别:</van-col
>
<van-col span="17">{{
item.hdLev | dangerText
}}</van-col>
......@@ -80,8 +84,8 @@
<van-button
round
type="primary"
@click="goDetail(item)"
>详情</van-button
@click="goDetail(item, 'normal-detail')"
>隐患详情</van-button
>
<van-button
round
......@@ -90,11 +94,36 @@
v-if="active == 0"
>审批
</van-button>
<van-button
round
type="info"
@click="
goDetail(
item,
'finish-delay-detail'
)
"
v-if="active == 1"
>延期查看</van-button
>
</div>
</van-overlay>
</template>
</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>
......@@ -106,6 +135,7 @@ import { getFun, postFun } from "@/service/table.js";
import { delayList } from "@/service/danger";
export default {
name:'delay-approval',
components: {
LHeader,
},
......@@ -134,7 +164,7 @@ export default {
this.getList();
},
methods: {
getList(select='') {
getList(select = "") {
/*接口对接3 START*/
// 例子:
this.$toast.loading({
......@@ -148,13 +178,14 @@ export default {
postFun(this.tabs[this.active]["api"], formdata)
.then((res) => {
this.$toast.clear();
this.messageList = res.rows;
this.messageList = res.rows || res.data;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
})
.catch(() => {
.catch((err) => {
console.log(err);
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
......@@ -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({
name: "normal-detail",
name,
params: {
id: data.businessId,
id,
},
});
this.showIndex = null;
......@@ -229,4 +263,10 @@ export default {
}
}
}
/deep/.van-tab__pane-wrapper {
min-height: 8rem;
}
.van-tabs__track {
min-height: 3rem;
}
</style>
......@@ -42,7 +42,7 @@
<van-field
v-model="opinion"
label="理由或者意见"
label='审批意见'
name="examineReason"
rows="3"
type="textarea"
......@@ -76,6 +76,8 @@ export default {
},
data() {
return {
pid:'',
id:'',
text: "延期审批",
taskId: "",
delayTime: "", // 延迟时间
......@@ -105,6 +107,9 @@ export default {
formdata.append("examineResult", this.isAgree*1);
formdata.append("examineReason", values.examineReason);
formdata.append("taskId", this.taskId);
formdata.append("pid", this.pid);
formdata.append('applyDate',this.applyDate);
formdata.append('id',this.id);
delayEdit(`/delayApply/edit`, formdata)
.then((res) => {
this.$toast.clear();
......@@ -133,6 +138,8 @@ export default {
// 对数据进行赋值
this.applyDate = res.data.delayApply.applyDate;
this.applyReason = res.data.delayApply.applyReason;
this.pid=res.data.delayApply.pid;
this.id=res.data.delayApply.id;
})
.catch(() => {
this.$toast.clear();
......
......@@ -77,6 +77,7 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
export default {
name:'insert-danger',
components: {
LHeader,
},
......@@ -132,7 +133,7 @@ export default {
name: "normal-detail",
params: {
id: data.id,
detailTitle: "上报详情",
detailTitle: "隐患详情",
},
});
this.showIndex = null;
......
......@@ -20,13 +20,13 @@
<van-tabs
v-model="active"
@change="
getList();
getList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="3rem"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div class="con-list" @touchmove="showIndex = null">
......@@ -115,6 +115,7 @@ import { getFun, postFun } from "@/service/table.js";
/*接口对接2 END*/
export default {
name:'major-danger',
components: {
LHeader,
},
......@@ -193,6 +194,8 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data)
localStorage.setItem('majorDanderData',JSON.stringify(data))
this.$router.push({
name: "major-survey",
params: {
......
......@@ -42,8 +42,14 @@
direction="horizontal"
@change="selectResult"
>
<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="1" style="margin-bottom: 0.3rem">{{
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="0" style="margin-bottom:0.3rem">{{name=='项目经理二次认定'?'重新发起重大隐患审批':'退回'}}</van-radio> -->
......@@ -54,17 +60,21 @@
<div class="disagree">
<van-field
readonly
v-if="radio == 1?(name=='项目经理二次认定'?true:false):(name=='项目经理二次认定'?false:true)"
v-if="
radio == 1
? name == '项目经理二次认定'
? true
: false
: name == '项目经理二次认定'
? false
: true
"
clickable
required
name="thinkHdLev"
:value="thinkLevel"
label="认定隐患级别"
placeholder="请选择认定隐患级别"
@click="showThinkLevel = true"
:rules="[
{ required: true, message: '认定隐患级别不能为空' },
]"
/>
<van-popup v-model="showThinkLevel" position="bottom">
<van-picker
......@@ -84,8 +94,8 @@
rows="3"
type="textarea"
placeholder="请输入"
:required="radio==1?false:true"
:rules="[{ required: radio==1?false:true, message: '审批意见不能为空' }]"
:required="true"
:rules="[{ required: true, message: '审批意见不能为空' }]"
/>
</div>
......@@ -114,7 +124,7 @@ export default {
},
data() {
return {
name:'',
name: "",
taskId: "",
messageList: [],
radio: "1",
......@@ -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() {
this.getName()
console.log(1)
this.messageList = [];
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: {
selectResult(val) {
this.radio = val;
this.disagreeOpinion = "";
},
getName(){
let id=this.$route.params.data.taskId
let fd = new FormData()
fd.append('taskId',id);
getFun('/majorapprove/add',{
taskId:id
}).then(data=>{
this.name=data.msg;
}).catch(err=>{
this.$toast.fail("提交失败,请稍后再试");
getName() {
getFun("/majorapprove/add", {
taskId: this.taskId,
})
.then((data) => {
this.name = data.msg;
})
.catch((err) => {
this.$toast.fail("提交失败,请稍后再试");
});
},
onSubmit(values) {
this.$toast.loading({
......
......@@ -96,13 +96,14 @@ import { superviseList } from "@/service/danger";
/*接口对接2 END*/
export default {
name:'manager-danger',
components: {
LHeader,
tabBar,
},
data() {
return {
text: "项目经理督办",
text: "项目督办",
searchValue: "",
isHaveNews: false,
messageList: [],
......
......@@ -69,7 +69,7 @@ export default {
taskId: "",
pid:"",
messageList: [],
text: "项目经理督办批示",
text: "项目督办批示",
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";
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { dangerReturn, dangerReturnDel } from "@/service/danger";
export default {
name:'report-return',
components: {
LHeader,
tabBar,
......
......@@ -19,13 +19,13 @@
<van-tabs
v-model="active"
@change="
postList();
postList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="3rem"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div class="con-list" @touchmove="showIndex = null">
......@@ -113,7 +113,7 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { dangerReview } from "@/service/danger";
export default {
name:'review-danger',
components: {
LHeader,
},
......
......@@ -18,14 +18,14 @@
<!-- tab标签 -->
<van-tabs
v-model="active"
@change="postList"
@change="postList(searchValue);showIndex=null"
color="#2980f7"
animated
:sticky="true"
offset-top="3rem"
offset-top="2.93rem"
>
<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 class="con-list" @touchmove="showIndex = null">
<van-cell-group
......@@ -71,7 +71,7 @@
<van-row gutter="">
<van-col span="7">工单状态</van-col>
<van-col span="17">{{
item | formatTime
item.taskName
}}</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
......@@ -113,12 +113,13 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { dangerStandBook } from "@/service/danger";
export default {
name:'stand-book',
components: {
LHeader,
},
data() {
return {
text: "隐患历史台账",
text: "隐患台账",
active: 0,
searchValue: "",
isHaveNews: false,
......
This diff is collapsed.
......@@ -86,13 +86,14 @@ import { superviseSABlist } from "@/service/danger";
/*接口对接2 END*/
export default {
name:'supervise-danger',
components: {
LHeader,
tabBar
},
data() {
return {
text: "隐患督办",
text: "企业级督办",
searchValue: "",
messageList: [],
isHaveNews: false,
......
......@@ -68,7 +68,7 @@ export default {
data() {
return {
taskId: "",
text: "隐患督办批示",
text: "企业级督办批示",
messageList: [],
opinion: "",
......
<template>
<div>
<!-- 重置密码页面 -->
<!-- 修改密码页面 -->
<!-- 头部标签 -->
<LHeader :text="$route.meta.title"></LHeader>
......@@ -17,9 +17,7 @@
name="oldPassword"
label="旧密码"
placeholder="请输入旧密码"
:rules="[
{ required: true, message: '请填写密码' }
]"
:rules="[{ required: true, message: '请填写密码' }]"
/>
<van-field
required
......@@ -33,7 +31,7 @@
{
message: '密码必须大于6个字符小于20个字符',
validator: (val) => {
return val['length'] > 6 && val['length'] < 20;
return val['length'] >= 6 && val['length'] < 20;
},
},
]"
......@@ -46,11 +44,11 @@
label="再次输入"
placeholder="再次输入新密码"
:rules="[
{ validator, required: true, message: '二次输入不正确' },
{ validator, required: true, message: '二次密码输入不一致' },
{
message: '密码必须大于6个字符小于20个字符',
message: '密码必须大于等于6个字符小于20个字符',
validator: (val) => {
return val['length'] > 6 && val['length'] < 20;
return val['length'] >= 6 && val['length'] < 20;
},
},
]"
......@@ -80,11 +78,11 @@ export default {
oldPassword: "",
newPassword: "",
confirm: "",
}
},
};
},
mounted(){
console.log(getUserInfo())
mounted() {
console.log(getUserInfo());
},
methods: {
validator(val) {
......@@ -97,30 +95,17 @@ export default {
loadingType: "spinner",
duration: 0,
});
postFun(
"/mobile/resetPwd",
this.obj2formdata(val)
)
postFun("/mobile/resetPwd", this.obj2formdata(val))
.then((data) => {
this.$toast.clear();
this.$dialog.alert({
title:'提示',
message:'密码重置成功,请重新登录',
}).then(
res=>{
removeToken();
this.$router.push('/login2')
}
)
if (data.code == 0) {
this.$toast.clear();
this.$toast.success('密码修改成功!');
this.$router.back()
}
})
.catch((err) => {
this.$toast.clear();
this.$toast.fail("操作失败,请稍后再试");
});
},
obj2formdata(data) {
console.log(data,'fasfasdfsd')
console.log(data, "fasfasdfsd");
let fd = new FormData();
for (let k in data) {
if (data[k]) {
......
......@@ -19,13 +19,13 @@
<van-tabs
v-model="active"
@change="
getList();
getList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="3rem"
offset-top="2.93rem"
>
<van-tab
v-for="(item, key) in tabs"
......@@ -118,12 +118,13 @@ import { postriskBook } from "@/service/risk";
/*接口对接2 END*/
export default {
name:'risk-account',
components: {
LHeader,
},
data() {
return {
text: "风险历史台账",
text: "风险台账",
searchValue: "",
messageList: [],
isHaveNews: false,
......
This diff is collapsed.
......@@ -19,13 +19,13 @@
<van-tabs
v-model="active"
@change="
postList();
postList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="3rem"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 -->
......@@ -119,6 +119,7 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { postriskConList } from "@/service/risk";
export default {
name:'risk-confirme',
components: {
LHeader: LHeader,
},
......@@ -187,7 +188,7 @@ export default {
this.$router.push({
name: "risk-big-detail",
params: {
id: data.taskId||data.processinstanceId,
id: data.taskId||data.id,
},
});
this.showIndex = null;
......
......@@ -97,6 +97,7 @@ import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { postriskConReturn, postriskConReDel } from "@/service/risk";
export default {
name:'risk-return',
components: {
LHeader: LHeader,
},
......
This diff is collapsed.
<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