Commit 02661f43 authored by 罗新东's avatar 罗新东

修改列表样式,增加了搜索框,增加了全局底部导航栏

parent 0c2ca69e
...@@ -9,83 +9,129 @@ ...@@ -9,83 +9,129 @@
--> -->
<template> <template>
<div id="app"> <div id="app" :style="{height:appHeight}">
<transition :name="transitionName"> <transition :name="transitionName">
<keep-alive :include="cachePage"> <keep-alive :include="cachePage">
<router-view class="router-view" /> <router-view class="router-view" />
</keep-alive> </keep-alive>
</transition> </transition>
<div :style="{height:tabH}"></div>
<tab-bar :index="1" v-if="showTab"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
export default { import tabBar from "@/components/TabBar";
data () {
return { export default {
transitionName: 'slide-left', components: {
cachePage:["add-danger","change-info","affirm-danger","risk-affirm","manager-survey","super-survey","major-survey","risk-add","noticeList"] tabBar,
} },
data() {
return {
appHeight: "",
tabH: "",
rempx:0,
headH:'',
screenH: "",
transitionName: "slide-left",
cachePage: [
"add-danger",
"change-info",
"affirm-danger",
"risk-affirm",
"manager-survey",
"super-survey",
"major-survey",
"risk-add",
"noticeList",
],
};
},
mounted() {
let tabH =
document.getElementsByTagName("html")[0].style.fontSize.split("px")[0] *
1.33333;
let sH = window.screen.height;
this.headH=document.getElementsByTagName("html")[0].style.fontSize.split("px")[0] *
1.5;+'px'
this.appHeight = sH - tabH + "px";
this.tabH = tabH + "px";
this.screenH = sH + "px";
},
computed: {
showTab() {
return !["login", "login2"].includes(this.$route.name);
}, },
watch: { },
$route(to, from) { watch: {
// 有主级到次级 $route(to, from) {
if (to.meta.index > from.meta.index) { // 有主级到次级
this.transitionName = 'slide-left' // 向左滑动 if (to.meta.index > from.meta.index) {
} else if (to.meta.index < from.meta.index) { this.transitionName = "slide-left"; // 向左滑动
// 由次级到主级 } else if (to.meta.index < from.meta.index) {
this.transitionName = 'slide-right' // 由次级到主级
} else { this.transitionName = "slide-right";
this.transitionName = '' //同级无过渡效果 } else {
} this.transitionName = ""; //同级无过渡效果
} }
} },
} },
};
</script> </script>
<style lang="less"> <style lang="less">
// body{
// overflow: hidden;
// }
#app { #app {
font-family: 'Avenir', Helvetica, Arial, sans-serif; font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
// text-align: center; // text-align: center;
color: #2c3e50; color: #2c3e50;
box-sizing: border-box;
overflow: hidden;
position: relative;
overflow: hidden;
} }
.router-view{ .router-view {
width: 100%; width: 100%;
height: auto; height: auto;
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
margin: 0 auto; margin: 0 auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
background-color: #f0f1f5; background-color: #f0f1f5;
overflow: auto;
} }
.slide-right-enter-active, .slide-right-enter-active,
.slide-right-leave-active, .slide-right-leave-active,
.slide-left-enter-active, .slide-left-enter-active,
.slide-left-leave-active{ .slide-left-leave-active {
height: 100%; height: 100%;
will-change: transform; will-change: transform;
transition: all 500ms; transition: all 500ms;
position: absolute; position: absolute;
backface-visibility: hidden; backface-visibility: hidden;
} }
.slide-right-enter{ .slide-right-enter {
opacity: 0; opacity: 0;
transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0);
} }
.slide-right-leave-active{ .slide-right-leave-active {
opacity: 0; opacity: 0;
transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0);
} }
.slide-left-enter{ .slide-left-enter {
opacity: 0; opacity: 0;
transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0);
} }
.slide-left-leave-active{ .slide-left-leave-active {
opacity: 0; opacity: 0;
transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0);
} }
</style> </style>
...@@ -49,3 +49,8 @@ body.dialog-open { ...@@ -49,3 +49,8 @@ body.dialog-open {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
/deep/.con-list .van-cell-group--inset{
font-size: 0.4rem !important;
}
...@@ -24,7 +24,8 @@ Vue.use(vueEsign) ...@@ -24,7 +24,8 @@ Vue.use(vueEsign)
Vue.prototype.util = util Vue.prototype.util = util
Vue.use(Divider).use(Popup).use(Overlay).use(Loading).use(Dialog).use(Toast).use(ContactCard).use(Form).use(AddressEdit).use(AddressList).use(Field).use(CellGroup).use(Cell).use(SwipeCell).use(Icon).use(Stepper).use(Card).use(Button).use(Swipe).use(SwipeItem).use(PullRefresh).use(List).use(Tab).use(Tabs).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton).use(SubmitBar).use(Checkbox).use(CheckboxGroup).use(Search).use(Picker).use(Uploader).use(Notify) Vue.use(Divider).use(Popup).use(Overlay).use(Loading).use(Dialog).use(Toast).use(ContactCard).use(Form).use(AddressEdit).use(AddressList).use(Field).use(CellGroup).use(Cell).use(SwipeCell).use(Icon).use(Stepper).use(Card).use(Button).use(Swipe).use(SwipeItem).use(PullRefresh).use(List).use(Tab).use(Tabs).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton).use(SubmitBar).use(Checkbox).use(CheckboxGroup).use(Search).use(Picker).use(Uploader).use(Notify)
.use(ContactList).use(Calendar).use(Radio).use(RadioGroup).use(Tag).use(Tabbar).use(TabbarItem).use(Sticky) .use(ContactList).use(Calendar).use(Radio).use(RadioGroup).use(Tag).use(Tabbar).use(TabbarItem).use(Sticky)
.use(Grid).use(GridItem).use(Skeleton).use(Col).use(Row).use(VanImage).use(Badge).use(NoticeBar).use(DatetimePicker).use(Step).use(Steps) .use(Grid).use(GridItem).use(Skeleton).use(Col).use(Row).use(VanImage).use(Badge).use(NoticeBar).use(DatetimePicker)
.use(Step).use(Steps)
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ new Vue({
router, router,
......
...@@ -266,27 +266,27 @@ export function delayEdit(url, data) { ...@@ -266,27 +266,27 @@ export function delayEdit(url, data) {
} }
// 隐患整改 // 隐患整改
export function list1(url="/rectification/list1", data) { export function list1(data) {
return request({ return request({
url, url:"/rectification/list1",
method: 'post', method: 'post',
data data
}) })
} }
// 隐患整改已退回 // 隐患整改已退回
export function list2(url="/rectification/list2", data) { export function list2(data) {
return request({ return request({
url, url:"/rectification/list2",
method: 'post', method: 'post',
data data
}) })
} }
// 我的上报接口 // 我的上报接口
export function myHDList(url="/hdreport/myHDList",data=null){ export function myHDList(data){
return request({ return request({
url, url:'/hdreport/myHDList',
method:'post', method:'post',
data data
}) })
......
...@@ -272,6 +272,7 @@ ...@@ -272,6 +272,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { timestampToTime } from "@/utils/format"; import { timestampToTime } from "@/utils/format";
import { import {
getFormList, getFormList,
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { postHdRiskSource } from "@/service/danger"; import { postHdRiskSource } from "@/service/danger";
export default { export default {
components: { components: {
......
...@@ -8,32 +8,32 @@ ...@@ -8,32 +8,32 @@
@click="goDetail(item.taskId)" @click="goDetail(item.taskId)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="19">{{ item.dueDate | formatTime }}</van-col> <van-col span="18">{{ item.dueDate | formatTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">状态:</van-col> <van-col span="6">状态:</van-col>
<van-col span="19">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row>
<!-- 详情 --> <!-- 详情 -->
<div class="detail">详情</div> <div class="detail">详情</div>
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { dangerRectReturn, dangerRectAdd } from "@/service/danger"; import { dangerRectReturn, dangerRectAdd } from "@/service/danger";
export default { export default {
name: "change-info", name: "change-info",
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { timestampToTime } from "@/utils/format"; import { timestampToTime } from "@/utils/format";
import { delayAdd } from "@/service/danger"; import { delayAdd } from "@/service/danger";
export default { export default {
......
...@@ -3,14 +3,25 @@ ...@@ -3,14 +3,25 @@
<van-sticky> <van-sticky>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
</van-sticky> </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>
<!-- tab标签 --> <!-- tab标签 -->
<van-tabs <van-tabs
@click="onClickTab" @click="onClickTab($event, searchValue)"
animated animated
color="#2980F7" color="#2980F7"
:sticky="true" :sticky="true"
offset-top="1.5rem" offset-top="3rem"
> >
<van-tab title="隐患整改"> <van-tab title="隐患整改">
<!-- 内容列表 --> <!-- 内容列表 -->
...@@ -22,32 +33,32 @@ ...@@ -22,32 +33,32 @@
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="19">{{ item.dueDate | formatTime }}</van-col> <van-col span="18">{{ item.dueDate | formatTime }}</van-col>
</van-row> </van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
...@@ -62,6 +73,9 @@ ...@@ -62,6 +73,9 @@
<van-button round type="info" @click="goDelay(item)" <van-button round type="info" @click="goDelay(item)"
>延期</van-button >延期</van-button
> >
<van-button round type="warning " @click="goClose(item)"
>关闭</van-button
>
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
...@@ -75,7 +89,7 @@ ...@@ -75,7 +89,7 @@
position: fixed; position: fixed;
top: 30%; top: 30%;
" "
v-if="isHaveNews" v-if="onClickTab.length == 0"
> >
暂无数据 暂无数据
</div> </div>
...@@ -90,32 +104,32 @@ ...@@ -90,32 +104,32 @@
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="19">{{ item.dueDate | formatTime }}</van-col> <van-col span="18">{{ item.dueDate | formatTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">状态:</van-col> <van-col span="6">状态:</van-col>
<van-col span="19">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
...@@ -130,6 +144,9 @@ ...@@ -130,6 +144,9 @@
<van-button round type="info" @click="goDelay(item)" <van-button round type="info" @click="goDelay(item)"
>延期</van-button >延期</van-button
> >
<van-button round type="warning" @click="goClose(item)"
>关闭</van-button
>
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
...@@ -143,25 +160,31 @@ ...@@ -143,25 +160,31 @@
position: fixed; position: fixed;
top: 30%; top: 30%;
" "
v-if="isHaveNews" v-if="messageList.length == 0"
> >
暂无数据 暂无数据
</div> </div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import tabBar from "@/components/TabBar";
import { dangerRect, list1, list2 } from "@/service/danger"; import { dangerRect, list1, list2 } from "@/service/danger";
import { Dialog } from "vant";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar,
}, },
data() { data() {
return { return {
text: "隐患整改", text: "隐患整改",
appHeight: "",
searchValue: "", searchValue: "",
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
...@@ -172,9 +195,48 @@ export default { ...@@ -172,9 +195,48 @@ export default {
created() { created() {
this.onClickTab(0); this.onClickTab(0);
}, },
methods: { methods: {
onSearch(val) {}, // 关闭
onClickTab(val) { goClose(val) {
// 点击了关闭
Dialog.confirm({
title: "提示",
message: "确定要关闭此条隐患吗?",
})
.then(() => {
this.$toast.loading({
message: "删除中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
postFun(`/rectification/delete/${val.taskId}`)
.then((res) => {
console.log(res,'怎么样')
this.$toast.clear();
this.$toast.success({
message: "关闭成功",
duration: 2000,
});
this.onClickTab(0, this.searchValue)
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("关闭失败,请稍后再试");
});
this.showIndex = null;
})
.catch(() => {
this.$toast.clear();
this.showIndex = null;
});
// console.log(val)
},
onSearch(val) {
this.onClickTab(0, this.searchValue);
},
onClickTab(val, select = "") {
this.showIndex = null; this.showIndex = null;
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
...@@ -184,8 +246,10 @@ export default { ...@@ -184,8 +246,10 @@ export default {
}); });
// 这里根据tab切换调用接口 // 这里根据tab切换调用接口
let formdata = new FormData();
formdata.append("select", select);
[list1, list2] [list1, list2]
[val]() [val](formdata)
.then((res) => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
...@@ -281,18 +345,27 @@ export default { ...@@ -281,18 +345,27 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px 0.533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row { .van-row {
margin-bottom: 0.133333rem; font-size: 0.4rem;
line-height: 0.64rem; line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
...@@ -8,24 +8,24 @@ ...@@ -8,24 +8,24 @@
@click="goDetail(item.taskId)" @click="goDetail(item.taskId)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<!-- 详情 --> <!-- 详情 -->
<div class="detail">详情</div> <div class="detail">详情</div>
...@@ -151,6 +151,7 @@ ...@@ -151,6 +151,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { timestampToTime } from "@/utils/format"; import { timestampToTime } from "@/utils/format";
import { getConfirmFormList, dangerConSub } from "@/service/danger"; import { getConfirmFormList, dangerConSub } from "@/service/danger";
export default { export default {
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<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>
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
...@@ -11,28 +22,28 @@ ...@@ -11,28 +22,28 @@
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
...@@ -55,15 +66,19 @@ ...@@ -55,15 +66,19 @@
> >
暂无数据 暂无数据
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import tabBar from "@/components/TabBar";
import { dangerConfirm } from "@/service/danger"; import { dangerConfirm } from "@/service/danger";
export default { export default {
components: { components: {
LHeader LHeader,
tabBar
}, },
data() { data() {
return { return {
...@@ -80,15 +95,18 @@ export default { ...@@ -80,15 +95,18 @@ export default {
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
this.postList(this.searchValue)
}, },
postList() { postList(select='') {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
dangerConfirm("/confirm/list") let formdata=new FormData();
formdata.append('select',select);
dangerConfirm("/confirm/list",formdata)
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
...@@ -136,18 +154,27 @@ export default { ...@@ -136,18 +154,27 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px 0.533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row { .van-row {
margin-bottom: 0.133333rem; font-size: 0.4rem;
line-height: 0.64rem; line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<van-sticky offset-top="1.5rem">
<!-- 内容列表 --> <van-search
<!-- 接口对接4 START --> v-model="searchValue"
show-action
placeholder="请输入检查名称"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
</van-sticky>
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
inset inset
...@@ -11,32 +22,31 @@ ...@@ -11,32 +22,31 @@
:key="index" :key="index"
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<!-- *接口对接4 END --> <!-- *接口对接4 END -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop ="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @click="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>审批</van-button >审批</van-button
> >
</div> </div>
...@@ -45,57 +55,65 @@ ...@@ -45,57 +55,65 @@
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<div <div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;" style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="isHaveNews" v-if="isHaveNews"
> >
暂无数据 暂无数据
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { delayList } from "@/service/danger"; import { delayList } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar,
}, },
data() { data() {
return { return {
text: "延期审批", text: "延期审批",
searchValue: "", searchValue: "",
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
getList() { getList(select) {
/*接口对接3 START*/ /*接口对接3 START*/
// 例子: // 例子:
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
delayList("/delayApply/list") let formdata=new FormData();
.then(res => { formdata.append('select',select);
postFun('/delayApply/list',formdata)
.then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows this.messageList = res.rows;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
} }
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
...@@ -103,55 +121,63 @@ export default { ...@@ -103,55 +121,63 @@ export default {
}); });
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch(val) { onSearch() {
this.getList(this.searchValue)
}, },
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.showIndex = index; this.showIndex = index;
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
this.$router.push({ this.$router.push({
name: "risk-big-detail", name: "risk-big-detail",
params: { params: {
id: data.businessId id: data.businessId,
} },
}); });
this.showIndex = null; this.showIndex = null;
}, },
// 审批 // 审批
goConfirm(data) { goConfirm(data) {
this.$router.push({ this.$router.push({
name:"ratify-info", name: "ratify-info",
params:{ params: {
"taskId":data.taskId taskId: data.taskId,
} },
}); });
this.showIndex = null; this.showIndex = null;
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px .533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
.van-row{ border-radius: 4%;
margin-bottom: .133333rem; box-shadow: 0px 0px 10px 2px #f3f3f3;
line-height: .64rem; width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { delayReturn } from "@/service/danger"; import { delayReturn } from "@/service/danger";
import { delayEdit } from "@/service/danger"; import { delayEdit } from "@/service/danger";
export default { export default {
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<!-- --> <!-- <van-sticky offset-top="1.5rem">
<van-search
v-model="value"
show-action
placeholder="请输入检查名称"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
</van-sticky> -->
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
...@@ -12,33 +23,33 @@ ...@@ -12,33 +23,33 @@
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">状态:</van-col> <van-col span="6">状态:</van-col>
<van-col span="19">{{ item.taskName }}</van-col> <van-col span="18">{{ 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">
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
...@@ -48,47 +59,60 @@ ...@@ -48,47 +59,60 @@
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<div <div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;" style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="isHaveNews" v-if="isHaveNews"
> >
暂无数据 暂无数据
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {dangerReturnDel,myHDList} from "@/service/danger"; import {getFun,postFun} from "@/service/table.js";
import { dangerReturnDel, myHDList } from "@/service/danger";
export default { export default {
components: { components: {
LHeader: LHeader LHeader,
tabBar,
}, },
data() { data() {
return { return {
value: "",
text: "我的上报", text: "我的上报",
searchValue: "",
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
}; };
}, },
created() { created() {
this.postList(); this.postList();
}, },
methods: { methods: {
postList() { postList(select = '') {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
myHDList() let formdata=new FormData();
.then(res => { formdata.append('select',select);
postFun('/hdreport/myHDList',formdata)
.then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.data; this.messageList = res.data;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
} }
...@@ -99,23 +123,25 @@ export default { ...@@ -99,23 +123,25 @@ export default {
}); });
}, },
onSearch(val) { onSearch() {
// console.log(this.value)
this.postList(this.value);
}, },
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.showIndex = index; this.showIndex = index;
}, },
goDetail(data){ goDetail(data) {
this.$router.push({ this.$router.push({
// name: "insert-danger-detail", // name: "insert-danger-detail",
name:"normal-detail", name: "normal-detail",
params: { params: {
id: data.id, id: data.id,
detailTitle:'上报详情' detailTitle: "上报详情",
} },
}); });
this.showIndex = null; this.showIndex = null;
}, },
...@@ -125,8 +151,8 @@ export default { ...@@ -125,8 +151,8 @@ export default {
name: "add-danger", name: "add-danger",
params: { params: {
status: "退回", status: "退回",
taskId: data.taskId taskId: data.taskId,
} },
}); });
this.showIndex = null; this.showIndex = null;
}, },
...@@ -136,14 +162,14 @@ export default { ...@@ -136,14 +162,14 @@ export default {
message: "删除中...", message: "删除中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
dangerReturnDel(`/hdreport/delete/${data.taskId}`) dangerReturnDel(`/hdreport/delete/${data.taskId}`)
.then(res => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.$toast.success({ this.$toast.success({
message: "删除成功", message: "删除成功",
duration: 2000 duration: 2000,
}); });
this.postList(); this.postList();
}) })
...@@ -152,24 +178,33 @@ export default { ...@@ -152,24 +178,33 @@ export default {
this.$toast.fail("删除失败,请稍后再试"); this.$toast.fail("删除失败,请稍后再试");
}); });
this.showIndex = null; this.showIndex = null;
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px 0.533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row { .van-row {
margin-bottom: 0.133333rem; font-size: 0.4rem;
line-height: 0.64rem; line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<!-- <van-sticky offset-top="1.5rem">
<!-- 内容列表 --> <van-search
<!-- 接口对接4 START --> v-model="searchValue"
show-action
placeholder="请输入检查名称"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
</van-sticky> -->
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
inset inset
...@@ -11,52 +22,58 @@ ...@@ -11,52 +22,58 @@
:key="index" :key="index"
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<!-- *接口对接4 END --> <!-- *接口对接4 END -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop ="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @click="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>审批</van-button >审批</van-button
> >
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<div <div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;" style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="isHaveNews" v-if="isHaveNews"
> >
暂无数据 暂无数据
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { majorList } from "@/service/danger"; import { majorList } from "@/service/danger";
/*接口对接2 START*/ /*接口对接2 START*/
...@@ -77,39 +94,41 @@ import { majorList } from "@/service/danger"; ...@@ -77,39 +94,41 @@ import { majorList } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar
}, },
data() { data() {
return { return {
text: "重大隐患", text: "重大隐患",
searchValue: "", searchValue: "",
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
getList() { getList(select='') {
/*接口对接3 START*/ /*接口对接3 START*/
// 例子: // 例子:
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
majorList("/majorapprove/list") let formdata=new FormData();
.then(res => { formdata.append('select',select);
majorList("/majorapprove/list",formdata)
.then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows this.messageList = res.rows;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
} }
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
...@@ -118,23 +137,24 @@ export default { ...@@ -118,23 +137,24 @@ export default {
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch(val) { onSearch(val) {
this.getList(this.searchValue)
}, },
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.showIndex = index; this.showIndex = index;
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params:{ params: {
id: data.taskId id: data.taskId,
} },
}); });
this.showIndex = null; this.showIndex = null;
}, },
...@@ -144,27 +164,36 @@ export default { ...@@ -144,27 +164,36 @@ export default {
name: "major-survey", name: "major-survey",
params: { params: {
data: data, data: data,
} },
}); });
this.showIndex = null; this.showIndex = null;
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px .533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
.van-row{ border-radius: 4%;
margin-bottom: .133333rem; box-shadow: 0px 0px 10px 2px #f3f3f3;
line-height: .64rem; width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
...@@ -9,20 +9,20 @@ ...@@ -9,20 +9,20 @@
> >
<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 }}</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">隐患级别</van-col>
<van-col span="17">{{ item.hdLev }}</van-col> <van-col span="17">{{ item.hdLev }}</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.startDate }}</van-col> <van-col span="17">{{ item.startDate }}</van-col>
</van-row> --> </van-row> -->
<!-- 详情 --> <!-- 详情 -->
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { majorAdd } from "@/service/danger"; import { majorAdd } from "@/service/danger";
export default { export default {
name:"major-survey", name:"major-survey",
...@@ -124,10 +125,10 @@ export default { ...@@ -124,10 +125,10 @@ export default {
text: "重大隐患审批", text: "重大隐患审批",
agreeOpinion: "", agreeOpinion: "",
disagreeOpinion: "", disagreeOpinion: "",
thinkLevel:'重大隐患', //因为隐患级别 thinkLevel:'建议为严重隐患', //因为隐患级别
thinkHdLev:'重大隐患', thinkHdLev:'建议为严重隐患',
showThinkLevel: false, showThinkLevel: false,
columnsThinkLevel:["重大隐患","一般隐患A","一般隐患B","一般隐患C",] columnsThinkLevel:["建议为严重隐患","建议为较大隐患","建议为危险隐患",]
}; };
}, },
...@@ -161,7 +162,7 @@ export default { ...@@ -161,7 +162,7 @@ export default {
let formdata = new FormData() let formdata = new FormData()
formdata.append('isResult', values.isResult) formdata.append('isResult', values.isResult)
formdata.append('details', values.details) formdata.append('details', values.details)
formdata.append('thinkHdLev',values.isResult==1?'重大隐患':values.thinkHdLev) formdata.append('thinkHdLev',values.isResult==1?'建议为严重隐患':values.thinkHdLev)
formdata.append('taskId', this.taskId) formdata.append('taskId', this.taskId)
majorAdd(`/majorapprove/add`,formdata) majorAdd(`/majorapprove/add`,formdata)
.then(res => { .then(res => {
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<van-sticky offset-top="1.5rem">
<!-- 内容列表 --> <van-search
<!-- 接口对接4 START --> v-model="searchValue"
<div class="con-list" @touchmove="showIndex = null"> show-action
placeholder="请输入检查名称"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
</van-sticky>
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="19">{{ item.pid }}</van-col> <van-col span="18">{{ item.pid }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.projectName }}</van-col> <van-col span="18">{{ item.projectName }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<!-- *接口对接4 END --> <!-- *接口对接4 END -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop ="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
...@@ -43,19 +53,27 @@ ...@@ -43,19 +53,27 @@
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<div <div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;" style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="isHaveNews" v-if="isHaveNews"
> >
暂无数据 暂无数据
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { superviseList } from "@/service/danger"; import { superviseList } from "@/service/danger";
/*接口对接2 START*/ /*接口对接2 START*/
...@@ -76,39 +94,41 @@ import { superviseList } from "@/service/danger"; ...@@ -76,39 +94,41 @@ import { superviseList } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar,
}, },
data() { data() {
return { return {
text: "项目经理督办", text: "项目经理督办",
searchValue: "", searchValue: "",
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
getList() { getList(select='') {
/*接口对接3 START*/ /*接口对接3 START*/
// 例子: // 例子:
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
superviseList("/supervise/list") let formdata=new FormData();
.then(res => { formdata.append('select',select);
superviseList("/supervise/list",formdata)
.then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.data this.messageList = res.data;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
} }
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
...@@ -117,24 +137,24 @@ export default { ...@@ -117,24 +137,24 @@ export default {
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch(val) { onSearch(val) {
this.getList(this.searchValue)
}, },
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.showIndex = index; this.showIndex = index;
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params:{ params: {
id: data.pid id: data.pid,
} },
}); });
this.showIndex = null; this.showIndex = null;
}, },
...@@ -144,27 +164,36 @@ export default { ...@@ -144,27 +164,36 @@ export default {
name: "manager-survey", name: "manager-survey",
params: { params: {
data: data, data: data,
} },
}); });
this.showIndex = null; this.showIndex = null;
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px .533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
.van-row{ border-radius: 4%;
margin-bottom: .133333rem; box-shadow: 0px 0px 10px 2px #f3f3f3;
line-height: .64rem; width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
...@@ -8,19 +8,19 @@ ...@@ -8,19 +8,19 @@
@click="goDetail(item.pid)" @click="goDetail(item.pid)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患编号:</van-col> <van-col span="7">隐患编号</van-col>
<van-col span="17">{{ item.hdProjectId }}</van-col> <van-col span="17">{{ item.hdProjectId }}</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.projectName }}</van-col> <van-col span="17">{{ item.projectName }}</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.hdLev }}</van-col> <van-col span="17">{{ item.hdLev }}</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.createTime }}</van-col> <van-col span="17">{{ item.createTime }}</van-col>
</van-row> --> </van-row> -->
<!-- 详情 --> <!-- 详情 -->
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { superviseAdd } from "@/service/danger"; import { superviseAdd } from "@/service/danger";
export default { export default {
name: "manager-survey", name: "manager-survey",
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<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>
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
...@@ -10,39 +21,39 @@ ...@@ -10,39 +21,39 @@
:key="index" :key="index"
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</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">
<van-button round type="primary" @click="goSubmit(item)" <van-button round type="primary" @click="goSubmit(item)"
>上报</van-button >上报</van-button
> >
<van-button round type="warning" @click="goDelete(item)" <van-button round type="warning" @click="goDelete(item)"
>删除</van-button >关闭</van-button
> >
</div> </div>
</van-overlay> </van-overlay>
...@@ -50,20 +61,30 @@ ...@@ -50,20 +61,30 @@
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<div <div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;" style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="isHaveNews" v-if="isHaveNews"
> >
暂无数据 暂无数据
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { dangerReturn, dangerReturnDel } from "@/service/danger"; import { dangerReturn, dangerReturnDel } from "@/service/danger";
export default { export default {
components: { components: {
LHeader: LHeader LHeader,
tabBar,
}, },
data() { data() {
return { return {
...@@ -72,25 +93,27 @@ export default { ...@@ -72,25 +93,27 @@ export default {
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
}; };
}, },
created() { created() {
this.postList(); this.postList();
}, },
methods: { methods: {
postList() { postList(select = "") {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
dangerReturn("/hdreport/list") let formdata = new FormData();
.then(res => { formdata.append("select", select);
dangerReturn("/hdreport/list", formdata)
.then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
} }
...@@ -102,13 +125,14 @@ export default { ...@@ -102,13 +125,14 @@ export default {
}, },
onSearch(val) { onSearch(val) {
this.postList(this.searchValue);
}, },
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.showIndex = index; this.showIndex = index;
}, },
// 上报 // 上报
...@@ -117,53 +141,75 @@ export default { ...@@ -117,53 +141,75 @@ export default {
name: "add-danger", name: "add-danger",
params: { params: {
status: "退回", status: "退回",
taskId: data.taskId taskId: data.taskId,
} },
}); });
// 存到缓存里 如果路由跳转或者是缓存中有 就是隐患上报退回 // 存到缓存里 如果路由跳转或者是缓存中有 就是隐患上报退回
localStorage.setItem('dangerAddTaskId',data.taskId) localStorage.setItem("dangerAddTaskId", data.taskId);
this.showIndex = null; this.showIndex = null;
}, },
// 删除 // 删除
goDelete(data) { goDelete(data) {
this.$toast.loading({ this.$dialog
message: "删除中...", .confirm({
forbidClick: true, title: "提示",
loadingType: "spinner", message: "确认要关闭此条隐患吗?",
duration: 0 })
}); .then((r) => {
dangerReturnDel(`/hdreport/delete/${data.taskId}`) console.log(r, "确定");
.then(res => { this.$toast.loading({
this.$toast.clear(); message: "关闭中...",
this.$toast.success({ forbidClick: true,
message: "删除成功", loadingType: "spinner",
duration: 2000 duration: 0,
}); });
this.postList(); dangerReturnDel(`/hdreport/delete/${data.taskId}`)
.then((res) => {
this.$toast.clear();
this.$toast.success({
message: "关闭成功",
duration: 2000,
});
this.postList();
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("关闭失败,请稍后再试");
});
this.showIndex = null;
}) })
.catch(() => { .catch(() => {
console.log("错了");
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("删除失败,请稍后再试"); this.showIndex = null;
}); });
this.showIndex = null; },
} },
}
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px 0.533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row { .van-row {
margin-bottom: 0.133333rem; font-size: 0.4rem;
line-height: 0.64rem; line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<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>
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
...@@ -11,32 +22,32 @@ ...@@ -11,32 +22,32 @@
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="19">{{ item | formatTime }}</van-col> <van-col span="18">{{ item | formatTime }}</van-col>
</van-row> </van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
...@@ -59,15 +70,19 @@ ...@@ -59,15 +70,19 @@
> >
暂无数据 暂无数据
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { dangerReview } from "@/service/danger"; import { dangerReview } from "@/service/danger";
export default { export default {
components: { components: {
LHeader LHeader,
tabBar
}, },
data() { data() {
return { return {
...@@ -84,16 +99,19 @@ export default { ...@@ -84,16 +99,19 @@ export default {
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
this.postList(this.searchValue)
}, },
postList() { postList(select='') {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
dangerReview("/review/list") let formdata=new FormData();
formdata.append('select',select);
dangerReview("/review/list",formdata)
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
...@@ -158,18 +176,27 @@ export default { ...@@ -158,18 +176,27 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px 0.533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row { .van-row {
margin-bottom: 0.133333rem; font-size: 0.4rem;
line-height: 0.64rem; line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
...@@ -8,32 +8,32 @@ ...@@ -8,32 +8,32 @@
@click="goDetail(item.taskId)" @click="goDetail(item.taskId)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="19">{{ item | formatTime }}</van-col> <van-col span="18">{{ item | formatTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">状态:</van-col> <van-col span="6">状态:</van-col>
<van-col span="19">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row>
<!-- 详情 --> <!-- 详情 -->
<div class="detail">详情</div> <div class="detail">详情</div>
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { dangerReviewAdd } from "@/service/danger"; import { dangerReviewAdd } from "@/service/danger";
export default { export default {
components: { components: {
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<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>
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
...@@ -11,32 +22,32 @@ ...@@ -11,32 +22,32 @@
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">适用范围:</van-col> <van-col span="6">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col> <van-col span="18">{{ item.hdRange }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="19">{{ item | formatTime }}</van-col> <van-col span="18">{{ item | formatTime }}</van-col>
</van-row> </van-row>
...@@ -57,15 +68,19 @@ ...@@ -57,15 +68,19 @@
> >
暂无数据 暂无数据
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { dangerStandBook } from "@/service/danger"; import { dangerStandBook } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar
}, },
data() { data() {
return { return {
...@@ -82,16 +97,19 @@ export default { ...@@ -82,16 +97,19 @@ export default {
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
this.postList(this.searchValue)
}, },
postList() { postList(select='') {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
dangerStandBook("/hdreport/doneList") let formdata=new FormData();
formdata.append('select',select);
dangerStandBook("/hdreport/doneList",formdata)
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
...@@ -141,18 +159,27 @@ export default { ...@@ -141,18 +159,27 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px .533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
.van-row{ border-radius: 4%;
margin-bottom: .133333rem; box-shadow: 0px 0px 10px 2px #f3f3f3;
line-height: .64rem; width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
This diff is collapsed.
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<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>
<!-- 内容列表 --> <!-- 内容列表 -->
<!-- 接口对接4 START --> <!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
...@@ -12,20 +23,20 @@ ...@@ -12,20 +23,20 @@
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col> <van-col span="18">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<!-- *接口对接4 END --> <!-- *接口对接4 END -->
...@@ -49,11 +60,14 @@ ...@@ -49,11 +60,14 @@
> >
暂无数据 暂无数据
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { superviseSABlist } from "@/service/danger"; import { superviseSABlist } from "@/service/danger";
/*接口对接2 START*/ /*接口对接2 START*/
...@@ -73,7 +87,8 @@ import { superviseSABlist } from "@/service/danger"; ...@@ -73,7 +87,8 @@ import { superviseSABlist } from "@/service/danger";
export default { export default {
components: { components: {
LHeader LHeader,
tabBar
}, },
data() { data() {
return { return {
...@@ -89,14 +104,16 @@ export default { ...@@ -89,14 +104,16 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
getList() { getList(select='') {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
superviseSABlist("/supervise/SABlist") let formdata=new FormData();
formdata.append('select',select);
superviseSABlist("/supervise/SABlist",formdata)
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.data this.messageList = res.data
...@@ -113,6 +130,7 @@ export default { ...@@ -113,6 +130,7 @@ export default {
}, },
onSearch(val) { onSearch(val) {
this.getList(this.searchValue)
}, },
touchstart(index, item) { touchstart(index, item) {
...@@ -148,18 +166,27 @@ export default { ...@@ -148,18 +166,27 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px .533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row { .van-row {
margin-bottom: 0.133333rem; font-size: 0.4rem;
line-height: 0.64rem; line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
...@@ -8,19 +8,19 @@ ...@@ -8,19 +8,19 @@
@click="goDetail(item.pid)" @click="goDetail(item.pid)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患编号:</van-col> <van-col span="7">隐患编号</van-col>
<van-col span="17">{{ item.processInstanceId }}</van-col> <van-col span="17">{{ item.processInstanceId }}</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.projectName }}</van-col> <van-col span="17">{{ item.projectName }}</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.hdLev }}</van-col> <van-col span="17">{{ item.hdLev }}</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.createTime }}</van-col> <van-col span="17">{{ item.createTime }}</van-col>
</van-row> --> </van-row> -->
<!-- *接口对接4 END --> <!-- *接口对接4 END -->
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { superviseAdd } from "@/service/danger"; import { superviseAdd } from "@/service/danger";
export default { export default {
name:"super-survey", name:"super-survey",
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
<div> <div>
<!-- 头部标签 --> <!-- 头部标签 -->
<van-sticky> <van-sticky>
<header class="header-wrap"> <header class="header-wrap">消息中心</header>
消息中心
</header>
</van-sticky> </van-sticky>
<!-- 内容 --> <!-- 内容 -->
...@@ -17,9 +15,14 @@ ...@@ -17,9 +15,14 @@
sticky sticky
offset-top="1.333333rem" offset-top="1.333333rem"
> >
<van-tab title="消息信息" name="消息信息" :badge="messageNewsNum>0?messageNewsNum : ''"> <van-tab
title="消息信息"
name="消息信息"
:badge="messageNewsNum > 0 ? messageNewsNum : ''"
>
<message-news @messageLength="getMessageLength"></message-news> <message-news @messageLength="getMessageLength"></message-news>
</van-tab> </van-tab>
<van-tab title="" name="" disabled badge=""> <van-tab title="" name="" disabled badge="">
<wait-event></wait-event> <wait-event></wait-event>
</van-tab> </van-tab>
...@@ -44,20 +47,24 @@ export default { ...@@ -44,20 +47,24 @@ export default {
messageNews, messageNews,
waitEvent, waitEvent,
noticeInfo, noticeInfo,
tabBar tabBar,
}, },
data() { data() {
return { return {
activeName: "消息信息", activeName: "消息信息",
messageNewsNum: '' messageNewsNum: "",
searchValue:''
}; };
}, },
mounted() {}, mounted() {},
methods: { methods: {
getMessageLength(len){ onSearch(){
this.messageNewsNum = len
} },
} getMessageLength(len) {
this.messageNewsNum = len;
},
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -14,9 +14,19 @@ ...@@ -14,9 +14,19 @@
</div> </div>
<!-- 搜索 --> <!-- 搜索 -->
<!-- <div class="search-wrap"> <div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @search="onSearch" /> <!-- <van-search
</div> --> v-model="searchVal"
show-action
placeholder="请输入检查名称"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search> -->
<!-- <van-search v-model="searchVal" placeholder="搜索" @search="onSearch" /> -->
</div>
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<!-- <van-pull-refresh v-model="refreshing" @refresh="onRefresh"> <!-- <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
...@@ -32,6 +42,7 @@ ...@@ -32,6 +42,7 @@
:key="index" :key="index"
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<!--@touchend.prevent="touchend(index)" 长按备份--> <!--@touchend.prevent="touchend(index)" 长按备份-->
<div class="messgae-title"><span>{{ item.noticeTitle }}</span> <span>{{item.sendTime}}</span> </div> <div class="messgae-title"><span>{{ item.noticeTitle }}</span> <span>{{item.sendTime}}</span> </div>
<div class="message-content"> <div class="message-content">
...@@ -111,7 +122,14 @@ export default { ...@@ -111,7 +122,14 @@ export default {
}, },
// 搜索事件 // 搜索事件
onSearch(val) {}, onSearch(val) {
// console.log(this.searchVal);
// if(this.showIndex==2){
// }else{
// }
},
// 封装全部 已读 和 未读的方法 // 封装全部 已读 和 未读的方法
selectCategory(data) { selectCategory(data) {
......
...@@ -18,7 +18,22 @@ ...@@ -18,7 +18,22 @@
<!-- 搜索 --> <!-- 搜索 -->
<div class="search-wrap"> <div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @search="onSearch" /> <van-search
v-model="searchVal"
show-action
placeholder="请输入检查名称"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
<!-- <van-search
v-model="searchVal"
placeholder="搜索"
@search="onSearch"
@confirm="onSearch"
/> -->
</div> </div>
<!-- 内容列表 --> <!-- 内容列表 -->
...@@ -30,13 +45,13 @@ ...@@ -30,13 +45,13 @@
finished-text="没有更多了" finished-text="没有更多了"
@load="onLoad" @load="onLoad"
> --> > -->
<!-- <van-cell-group inset> <!-- <van-cell-group inset>
<div class="messgae-title">隐患确认信息</div> <div class="messgae-title">隐患确认信息</div>
<div class="message-content"> <div class="message-content">
张大海已确认一般隐患B类,右万宝宝负责整改。 张大海已确认一般隐患B类,右万宝宝负责整改。
</div> </div>
</van-cell-group> --> </van-cell-group> -->
<!-- </van-list> <!-- </van-list>
</van-pull-refresh> --> </van-pull-refresh> -->
</div> </div>
</div> </div>
...@@ -51,16 +66,16 @@ export default { ...@@ -51,16 +66,16 @@ export default {
messageCategory: [ messageCategory: [
{ {
key: "0", key: "0",
category: "全部" category: "全部",
}, },
{ {
key: "1", key: "1",
category: "已读" category: "已读",
}, },
{ {
key: "2", key: "2",
category: "未读" category: "未读",
} },
], ],
activeIndex: 0, activeIndex: 0,
searchVal: "", searchVal: "",
...@@ -79,7 +94,7 @@ export default { ...@@ -79,7 +94,7 @@ export default {
// 搜索事件 // 搜索事件
onSearch(val) { onSearch(val) {
if (val !== "") { if (val !== "") {
console.log(val); console.log(this.searchVal);
} }
}, },
...@@ -112,7 +127,7 @@ export default { ...@@ -112,7 +127,7 @@ export default {
// // } // // }
// }, 5000); // }, 5000);
// } // }
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -18,7 +18,17 @@ ...@@ -18,7 +18,17 @@
<!-- 搜索 --> <!-- 搜索 -->
<div class="search-wrap"> <div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @search="onSearch" /> <!-- <van-search
v-model="searchVal"
show-action
placeholder="请输入检查名称"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search> -->
<!-- <van-search v-model="searchVal" placeholder="搜索" @search="onSearch" /> -->
</div> </div>
<!-- 内容列表 --> <!-- 内容列表 -->
...@@ -30,13 +40,13 @@ ...@@ -30,13 +40,13 @@
finished-text="没有更多了" finished-text="没有更多了"
@load="onLoad" @load="onLoad"
> --> > -->
<!-- <van-cell-group inset> <!-- <van-cell-group inset>
<div class="messgae-title">隐患确认信息</div> <div class="messgae-title">隐患确认信息</div>
<div class="message-content"> <div class="message-content">
张大海已确认一般隐患B类,右万宝宝负责整改。 张大海已确认一般隐患B类,右万宝宝负责整改。
</div> </div>
</van-cell-group> --> </van-cell-group> -->
<!-- </van-list> <!-- </van-list>
</van-pull-refresh> --> </van-pull-refresh> -->
</div> </div>
</div> </div>
...@@ -51,16 +61,16 @@ export default { ...@@ -51,16 +61,16 @@ export default {
messageCategory: [ messageCategory: [
{ {
key: "0", key: "0",
category: "全部" category: "全部",
}, },
{ {
key: "1", key: "1",
category: "已读" category: "已读",
}, },
{ {
key: "2", key: "2",
category: "未读" category: "未读",
} },
], ],
activeIndex: 0, activeIndex: 0,
searchVal: "", searchVal: "",
...@@ -79,6 +89,7 @@ export default { ...@@ -79,6 +89,7 @@ export default {
// 搜索事件 // 搜索事件
onSearch(val) { onSearch(val) {
if (val !== "") { if (val !== "") {
console.log(this.search)
} }
}, },
...@@ -111,7 +122,7 @@ export default { ...@@ -111,7 +122,7 @@ export default {
// // } // // }
// }, 5000); // }, 5000);
// } // }
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<!-- <van-sticky offset-top="1.5rem">
<!-- 内容列表 --> <van-search
<!-- 接口对接4 START --> v-model="searchValue"
show-action
placeholder="请输入检查名称"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
</van-sticky> -->
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
inset inset
...@@ -11,32 +22,31 @@ ...@@ -11,32 +22,31 @@
:key="index" :key="index"
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险编号:</van-col> <van-col span="6">风险编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险级别:</van-col> <van-col span="6">风险级别:</van-col>
<van-col span="19">{{ item.riskLevel }}</van-col> <van-col span="18">{{ item.riskLevel }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.startDate }}</van-col> <van-col span="18">{{ item.startDate }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险源:</van-col> <van-col span="6">风险源:</van-col>
<van-col span="19">{{ item.riskSource }}</van-col> <van-col span="18">{{ item.riskSource }}</van-col>
</van-row> </van-row>
<!-- *接口对接4 END --> <!-- *接口对接4 END -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop ="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
...@@ -44,19 +54,25 @@ ...@@ -44,19 +54,25 @@
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<div <div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;" style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="isHaveNews" v-if="isHaveNews"
> >
暂无数据 暂无数据
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { postriskBook } from "@/service/risk"; import { postriskBook } from "@/service/risk";
/*接口对接2 START*/ /*接口对接2 START*/
...@@ -82,13 +98,13 @@ export default { ...@@ -82,13 +98,13 @@ export default {
return { return {
text: "风险历史台账", text: "风险历史台账",
searchValue: "", searchValue: "",
messageList: [], messageList: [],
isHaveNews: false, isHaveNews: false,
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
...@@ -99,17 +115,16 @@ export default { ...@@ -99,17 +115,16 @@ export default {
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
postriskBook("/riskMain/doneList") postriskBook("/riskMain/doneList")
.then(res => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows this.messageList = res.rows;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
} }
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
...@@ -117,44 +132,52 @@ export default { ...@@ -117,44 +132,52 @@ export default {
}); });
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch(val) { onSearch(val) {},
},
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.showIndex = index; this.showIndex = index;
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
this.$router.push({ this.$router.push({
name: "risk-big-detail", name: "risk-big-detail",
params: { params: {
id: data.businessId id: data.businessId,
} },
}); });
this.showIndex = null; this.showIndex = null;
}, },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px .533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
.van-row{ border-radius: 4%;
margin-bottom: .133333rem; box-shadow: 0px 0px 10px 2px #f3f3f3;
line-height: .64rem; width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
...@@ -8,23 +8,23 @@ ...@@ -8,23 +8,23 @@
<van-cell-group inset > <van-cell-group inset >
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">所属项目:</span></van-col ><span class="field-title">所属项目</span></van-col
> >
<van-col span="17">{{ riskMain.pId }}</van-col> <van-col span="17">{{ riskMain.pId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">风险因素:</span></van-col ><span class="field-title">风险因素</span></van-col
> >
<van-col span="17">{{ riskMain.riskFactor }}</van-col> <van-col span="17">{{ riskMain.riskFactor }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7"><span class="field-title">风险源:</span></van-col> <van-col span="7"><span class="field-title">风险源</span></van-col>
<van-col span="17">{{ riskMain.riskSource }}</van-col> <van-col span="17">{{ riskMain.riskSource }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">事故类型:</span></van-col ><span class="field-title">事故类型</span></van-col
> >
<van-col span="17">{{ riskMain.accidentType }}</van-col> <van-col span="17">{{ riskMain.accidentType }}</van-col>
</van-row> </van-row>
...@@ -33,43 +33,43 @@ ...@@ -33,43 +33,43 @@
<div v-show="riskOpen"> <div v-show="riskOpen">
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">风险等级:</span></van-col ><span class="field-title">风险等级</span></van-col
> >
<van-col span="17">{{ riskMain.riskLevel }}</van-col> <van-col span="17">{{ riskMain.riskLevel }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">风险部位:</span></van-col ><span class="field-title">风险部位</span></van-col
> >
<van-col span="17">{{ riskMain.emergencyMeasure }}</van-col> <van-col span="17">{{ riskMain.emergencyMeasure }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">管控层级:</span></van-col ><span class="field-title">管控层级</span></van-col
> >
<van-col span="17">{{ riskMain.controlLevel }}</van-col> <van-col span="17">{{ riskMain.controlLevel }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">主责部门:</span></van-col ><span class="field-title">主责部门</span></van-col
> >
<van-col span="17">{{ riskMain.responsibilityDept }}</van-col> <van-col span="17">{{ riskMain.responsibilityDept }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">主责人员:</span></van-col ><span class="field-title">主责人员</span></van-col
> >
<van-col span="17">{{ riskMain.responsibilityMember }}</van-col> <van-col span="17">{{ riskMain.responsibilityMember }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">定级方式:</span></van-col ><span class="field-title">定级方式</span></van-col
> >
<van-col span="17">{{ riskMain.gradingMethod }}</van-col> <van-col span="17">{{ riskMain.gradingMethod }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">定级方式(附件):</span></van-col ><span class="field-title">定级方式(附件)</span></van-col
> >
<van-col span="17"> <van-col span="17">
<div class="enclosure" v-for="(item, index) in riskMain.riskFileList1" :key="index"> <div class="enclosure" v-for="(item, index) in riskMain.riskFileList1" :key="index">
...@@ -79,13 +79,13 @@ ...@@ -79,13 +79,13 @@
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">技术措施:</span></van-col ><span class="field-title">技术措施</span></van-col
> >
<van-col span="17">{{ riskMain.technicalMeasures }}</van-col> <van-col span="17">{{ riskMain.technicalMeasures }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">技术措施(附件):</span></van-col ><span class="field-title">技术措施(附件)</span></van-col
> >
<van-col span="17"> <van-col span="17">
<div class="enclosure" v-for="(item, index) in riskMain.riskFileList2" :key="index"> <div class="enclosure" v-for="(item, index) in riskMain.riskFileList2" :key="index">
...@@ -95,13 +95,13 @@ ...@@ -95,13 +95,13 @@
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">管理措施:</span></van-col ><span class="field-title">管理措施</span></van-col
> >
<van-col span="17">{{ riskMain.managementMeasures }}</van-col> <van-col span="17">{{ riskMain.managementMeasures }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">管理措施(附件):</span></van-col ><span class="field-title">管理措施(附件)</span></van-col
> >
<van-col span="17"> <van-col span="17">
<div class="enclosure" v-for="(item, index) in riskMain.riskFileList3" :key="index"> <div class="enclosure" v-for="(item, index) in riskMain.riskFileList3" :key="index">
...@@ -111,13 +111,13 @@ ...@@ -111,13 +111,13 @@
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">应急措施:</span></van-col ><span class="field-title">应急措施</span></van-col
> >
<van-col span="17">{{ riskMain.emergencyMeasure }}</van-col> <van-col span="17">{{ riskMain.emergencyMeasure }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">应急措施(附件):</span></van-col ><span class="field-title">应急措施(附件)</span></van-col
> >
<van-col span="17"> <van-col span="17">
<div class="enclosure" v-for="(item, index) in riskMain.riskFileList4" :key="index"> <div class="enclosure" v-for="(item, index) in riskMain.riskFileList4" :key="index">
...@@ -137,12 +137,12 @@ ...@@ -137,12 +137,12 @@
<p>风险确认</p> <p>风险确认</p>
<van-cell-group inset v-for="(item, index) in confirmList" :key="index" > <van-cell-group inset v-for="(item, index) in confirmList" :key="index" >
<van-row gutter=""> <van-row gutter="">
<van-col span="7"><span class="field-title">意见:</span></van-col> <van-col span="7"><span class="field-title">意见</span></van-col>
<van-col span="17">{{ item.confirmOpinion }}</van-col> <van-col span="17">{{ item.confirmOpinion }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title">隐患确认信息:</span></van-col ><span class="field-title">隐患确认信息</span></van-col
> >
<van-col span="17">{{ item.confirmResult == 1? "同意":"退回" }}</van-col> <van-col span="17">{{ item.confirmResult == 1? "同意":"退回" }}</van-col>
</van-row> </van-row>
...@@ -161,28 +161,28 @@ ...@@ -161,28 +161,28 @@
> >
</van-row> </van-row>
<van-row> <van-row>
<van-col span="5" <van-col span="6"
><span class="field-title">审批人:</span></van-col ><span class="field-title">审批人:</span></van-col
> >
<van-col span="19">{{item.userName}}</van-col> <van-col span="18">{{item.userName}}</van-col>
</van-row> </van-row>
<van-row> <van-row>
<van-col span="5" <van-col span="6"
><span class="field-title">节点:</span></van-col ><span class="field-title">节点:</span></van-col
> >
<van-col span="19">{{item.logNode}}</van-col> <van-col span="18">{{item.logNode}}</van-col>
</van-row> </van-row>
<van-row> <van-row>
<van-col span="5" <van-col span="6"
><span class="field-title">结果:</span></van-col ><span class="field-title">结果:</span></van-col
> >
<van-col span="19">{{item.logResult}}</van-col> <van-col span="18">{{item.logResult}}</van-col>
</van-row> </van-row>
<van-row> <van-row>
<van-col span="5" <van-col span="6"
><span class="field-title">部门:</span></van-col ><span class="field-title">部门:</span></van-col
> >
<van-col span="19">{{item.deptName}}</van-col> <van-col span="18">{{item.deptName}}</van-col>
</van-row> </van-row>
</div> </div>
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { postriskDetail } from "@/service/risk"; import { postriskDetail } from "@/service/risk";
export default { export default {
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
@click="showProjectName = true" @click="showProjectName = true"
:rules="[{ required: true, message: '所属项目不能为空' }]" :rules="[{ required: true, message: '所属项目不能为空' }]"
/> />
<!-- {{headH}} -->
<van-popup v-model="showProjectName" position="bottom"> <van-popup v-model="showProjectName" position="bottom">
<van-picker <van-picker
show-toolbar show-toolbar
...@@ -299,6 +300,7 @@ ...@@ -299,6 +300,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { import {
getFormList, getFormList,
postHdSource, postHdSource,
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import Target from "./target.vue"; import Target from "./target.vue";
import Condition from "./condition.vue"; import Condition from "./condition.vue";
import { postCalRiskLevel } from "@/service/risk"; import { postCalRiskLevel } from "@/service/risk";
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<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>
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
...@@ -12,44 +23,44 @@ ...@@ -12,44 +23,44 @@
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险编号:</van-col> <van-col span="6">风险编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险级别:</van-col> <van-col span="6">风险级别:</van-col>
<van-col span="19">{{ item.riskLevel }}</van-col> <van-col span="18">{{ item.riskLevel }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.startDate }}</van-col> <van-col span="18">{{ item.startDate }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险源:</van-col> <van-col span="6">风险源:</van-col>
<van-col span="19">{{ item.riskSource }}</van-col> <van-col span="18">{{ item.riskSource }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">事故类型:</van-col> <van-col span="6">事故类型:</van-col>
<van-col span="19">{{ item.accidentType }}</van-col> <van-col span="18">{{ item.accidentType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">管控层级:</van-col> <van-col span="6">管控层级:</van-col>
<van-col span="19">{{ item.controllevel }}</van-col> <van-col span="18">{{ item.controllevel }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">主责部门:</van-col> <van-col span="6">主责部门:</van-col>
<van-col span="19">{{ item.responsibilityDept }}</van-col> <van-col span="18">{{ item.responsibilityDept }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">主责人员:</van-col> <van-col span="6">主责人员:</van-col>
<van-col span="19">{{ item.responsibilityMember }}</van-col> <van-col span="18">{{ item.responsibilityMember }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="19">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
...@@ -76,6 +87,7 @@ ...@@ -76,6 +87,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { postriskConList } from "@/service/risk"; import { postriskConList } from "@/service/risk";
export default { export default {
components: { components: {
...@@ -96,14 +108,16 @@ export default { ...@@ -96,14 +108,16 @@ export default {
this.postList() this.postList()
}, },
methods: { methods: {
postList(){ postList(select=''){
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
postriskConList("/riskConfirm/list") let formdata=new FormData();
formdata.append('select',select)
postFun("/riskConfirm/list",formdata)
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows this.messageList = res.rows
...@@ -118,9 +132,8 @@ export default { ...@@ -118,9 +132,8 @@ export default {
}); });
}, },
onSearch(val) { onSearch(val) {
this.postList(this.searchValue)
}, },
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
......
...@@ -9,36 +9,36 @@ ...@@ -9,36 +9,36 @@
@click="goDetail(item.taskId)" @click="goDetail(item.taskId)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险等级:</van-col> <van-col span="6">风险等级:</van-col>
<van-col span="19">{{ item.riskLevel }}</van-col> <van-col span="18">{{ item.riskLevel }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险源:</van-col> <van-col span="6">风险源:</van-col>
<van-col span="19">{{ item.riskSource }}</van-col> <van-col span="18">{{ item.riskSource }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">事故类型:</van-col> <van-col span="6">事故类型:</van-col>
<van-col span="19">{{ item.accidentType }}</van-col> <van-col span="18">{{ item.accidentType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">管控层级:</van-col> <van-col span="6">管控层级:</van-col>
<van-col span="19">{{ item.controllevel }}</van-col> <van-col span="18">{{ item.controllevel }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">主责部门:</van-col> <van-col span="6">主责部门:</van-col>
<van-col span="19">{{ item.responsibilityDept }}</van-col> <van-col span="18">{{ item.responsibilityDept }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">主责人员:</van-col> <van-col span="6">主责人员:</van-col>
<van-col span="19">{{ item.responsibilityMember }}</van-col> <van-col span="18">{{ item.responsibilityMember }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="19">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row>
<!-- 详情 --> <!-- 详情 -->
<div class="detail">详情</div> <div class="detail">详情</div>
...@@ -105,7 +105,9 @@ ...@@ -105,7 +105,9 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js";
import { postriskConAdd } from "@/service/risk"; import { postriskConAdd } from "@/service/risk";
export default { export default {
name: "risk-affirm", name: "risk-affirm",
components: { components: {
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<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>
<!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
inset inset
...@@ -10,75 +21,80 @@ ...@@ -10,75 +21,80 @@
:key="index" :key="index"
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险编号:</van-col> <van-col span="6">风险编号:</van-col>
<van-col span="19">{{ item.businessId }}</van-col> <van-col span="18">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="18">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险级别:</van-col> <van-col span="6">风险级别:</van-col>
<van-col span="19">{{ item.riskLevel }}</van-col> <van-col span="18">{{ item.riskLevel }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="19">{{ item.startDate }}</van-col> <van-col span="18">{{ item.startDate }}</van-col>
</van-row> --> </van-row> -->
<van-row gutter=""> <van-row gutter="">
<van-col span="5">风险源:</van-col> <van-col span="6">风险源:</van-col>
<van-col span="19">{{ item.riskSource }}</van-col> <van-col span="18">{{ item.riskSource }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">事故类型:</van-col> <van-col span="6">事故类型:</van-col>
<van-col span="19">{{ item.accidentType }}</van-col> <van-col span="18">{{ item.accidentType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">管控层级:</van-col> <van-col span="6">管控层级:</van-col>
<van-col span="19">{{ item.controllevel }}</van-col> <van-col span="18">{{ item.controllevel }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">主责部门:</van-col> <van-col span="6">主责部门:</van-col>
<van-col span="19">{{ item.responsibilityDept }}</van-col> <van-col span="18">{{ item.responsibilityDept }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">主责人员:</van-col> <van-col span="6">主责人员:</van-col>
<van-col span="19">{{ item.responsibilityMember }}</van-col> <van-col span="18">{{ item.responsibilityMember }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="19">{{ item.taskName }}</van-col> <van-col span="18">{{ 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">
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>上报</van-button >上报</van-button
> >
<van-button round type="warning" @click="goDelete(item)" <van-button round type="warning" @click="goDelete(item)"
>删除</van-button >关闭</van-button
> >
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<div <div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;" style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="isHaveNews" v-if="isHaveNews"
> >
暂无数据 暂无数据
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { postriskConReturn, postriskConReDel } from "@/service/risk"; import { postriskConReturn, postriskConReDel } from "@/service/risk";
export default { export default {
components: { components: {
...@@ -91,25 +107,27 @@ export default { ...@@ -91,25 +107,27 @@ export default {
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
}; };
}, },
created() { created() {
this.postList(); this.postList();
}, },
methods: { methods: {
postList() { postList(select = "") {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
postriskConReturn("/riskMain/list") let formdata = new FormData();
.then(res => { formdata.append("select", select);
postriskConReturn("/riskMain/list", formdata)
.then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
} }
...@@ -121,11 +139,12 @@ export default { ...@@ -121,11 +139,12 @@ export default {
}, },
onSearch(val) { onSearch(val) {
this.postList(this.searchValue);
}, },
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.showIndex = index; this.showIndex = index;
}, },
...@@ -133,56 +152,75 @@ export default { ...@@ -133,56 +152,75 @@ export default {
// 重新上报 // 重新上报
goDetail(data) { goDetail(data) {
this.$router.push({ this.$router.push({
name: 'risk-add', name: "risk-add",
params: { params: {
status: "退回", status: "退回",
taskId: data.taskId taskId: data.taskId,
} },
}); });
// 存到缓存里 如果路由跳转或者是缓存中有 就是隐患上报退回 // 存到缓存里 如果路由跳转或者是缓存中有 就是隐患上报退回
localStorage.setItem('riskAddTaskId',data.taskId) localStorage.setItem("riskAddTaskId", data.taskId);
this.showIndex = null; this.showIndex = null;
}, },
// 删除 // 删除
goDelete(data) { goDelete(data) {
this.$toast.loading({ this.$dialog.confirm({
message: "删除中...", title: "提示",
forbidClick: true, message: "确认要关闭此条隐患吗?",
loadingType: "spinner", })
duration: 0 .then(() => {
}); this.$toast.loading({
postriskConReDel(`/riskMain/delete/${data.taskId}`) message: "关闭中...",
.then(res => { forbidClick: true,
this.$toast.clear(); loadingType: "spinner",
this.$toast.success({ duration: 0,
message: "删除成功",
duration: 2000
}); });
this.postList(); postriskConReDel(`/riskMain/delete/${data.taskId}`)
.then((res) => {
this.$toast.clear();
this.$toast.success({
message: "关闭成功",
duration: 2000,
});
this.postList();
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("关闭失败,请稍后再试");
});
this.showIndex = null;
}) })
.catch(() => { .catch((err) => {
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("删除失败,请稍后再试"); this.showIndex = null;
}); });
this.showIndex = null; },
} },
}
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
#app {
font-family: "";
color: #2c3e50;
}
.con-list { .con-list {
padding: 10px 10px .533333rem; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 0.26667rem;
padding: 10px; padding: 0.25rem;
font-size: 13px; font-size: 0.4rem;
position: relative; position: relative;
.van-row{ border-radius: 4%;
margin-bottom: .133333rem; box-shadow: 0px 0px 10px 2px #f3f3f3;
line-height: .64rem; width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
...@@ -287,6 +287,7 @@ export default { ...@@ -287,6 +287,7 @@ export default {
}, },
// 搜索事件 // 搜索事件
onSearch(val) { onSearch(val) {
this.postList(this.searchValue)
}, },
// 请求工作台列表 // 请求工作台列表
getWorkList() { getWorkList() {
......
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