Commit 658d7065 authored by duanfy's avatar duanfy

统一台账回显字段

parents ebdb5bf3 22fa4ff3
Pipeline #7038 passed with stage
in 29 seconds
......@@ -10,12 +10,15 @@
<template>
<div>
<header class="header">
<van-icon @click="to" name="arrow-left" class="iconColorLeft"/>
<span>{{text}}</span>
<!-- 为止有什么用图标注释 -->
<!-- <van-icon name="bars" class="iconColorRight"/> -->
</header>
<!-- 加个吸顶 -->
<van-sticky>
<header class="header">
<van-icon @click="to" name="arrow-left" class="iconColorLeft"/>
<span>{{text}}</span>
<!-- 为止有什么用图标注释 -->
<!-- <van-icon name="bars" class="iconColorRight"/> -->
</header>
</van-sticky>
</div>
</template>
......
......@@ -262,6 +262,7 @@ const routes = [{
},
{
path: '/add-danger',
name: 'add-danger',
......@@ -367,11 +368,12 @@ const routes = [{
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/standBook'),
},
{
path: '/normal-detail',
name: 'normal-detail',
meta: {
title: '隐患历史台账详情',
title: '隐患详情',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/standBook/normalDetail'),
......@@ -532,9 +534,16 @@ const routes = [{
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAccount/riskBigDetail'),
},
{
path:'/insert-danger',
name:'insert-danger',
meta:{
title:'我的上报',
index:1
},
component:()=>import('@/views/danger/insertDanger/list')
}
]
const router = new VueRouter({
......
......@@ -265,6 +265,33 @@ export function delayEdit(url, data) {
})
}
// 隐患整改
export function list1(url="/rectification/list1", data) {
return request({
url,
method: 'post',
data
})
}
// 隐患整改已退回
export function list2(url="/rectification/list2", data) {
return request({
url,
method: 'post',
data
})
}
// 我的上报接口
export function myHDList(url="/hdreport/myHDList",data=null){
return request({
url,
method:'post',
data
})
}
......
......@@ -288,8 +288,8 @@ export default {
components: {
LHeader,
},
activated() {
this.taskId = this.$route.params.taskId;
activated(){
this.taskId = this.$route.params.taskId || localStorage.getItem('dangerAddTaskId');
console.log(this.taskId );
if (this.taskId) {
this.isShowreturnCause = true;
......@@ -297,9 +297,13 @@ export default {
this.postReturnEcho();
}
this.getList();
},
mounted() {
this.$bus.$on("sourceAyy", res => {
this.source1 = res.join(",");
// 销毁一下监听事件 不然会越加越多
this.$bus.$off('riskLevelBus')
});
},
beforeRouteLeave(to, from, next) {
......@@ -341,6 +345,8 @@ export default {
this.isShowreturnCause = false;
this.returnCause = ""; // 退回原因
this.currentDate = new Date()
// 清空 localStorage
localStorage.removeItem('dangerAddTaskId')
}
next();
},
......@@ -386,13 +392,10 @@ export default {
currentDate : new Date()
};
},
created() {
},
methods: {
onSubmit(values) {
let formdata = new FormData();
formdata.append("proId", this.projectId);
formdata.append("hdRange", values.hdRange);
formdata.append("hdType", values.hdType);
......@@ -423,6 +426,7 @@ export default {
if (this.taskId) {
url = `/hdreport/editSave/${this.taskId}`;
}
console.log(url);
postHdReportAdd(url, formdata)
.then((res) => {
......
This diff is collapsed.
......@@ -234,8 +234,8 @@ export default {
let formdata = new FormData();
formdata.append("confirmResult", this.radio);
formdata.append("endTime", values.endTime);
formdata.append("rectificationUser", this.rectificationUser);
formdata.append("rectificationReview", this.rectificationReview);
formdata.append("rectificationUser", values.rectificationUser);
formdata.append("rectificationReview", values.rectificationReview);
formdata.append("confirmOpinion", values.confirmOpinion);
this.$toast.loading({
message: "提交中...",
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null">
......
<template>
<div>
<LHeader :text="text"></LHeader>
<!-- -->
<!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
:key="index"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="5">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="5">隐患级别:</van-col>
<van-col span="19">{{ item.hdLev }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="5">适用范围:</van-col>
<van-col span="19">{{ item.hdRange }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="5">隐患类型:</van-col>
<van-col span="19">{{ item.hdType }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="5">发现时间:</van-col>
<van-col span="19">{{ item.hdDiscoveryTime }}</van-col>
</van-row>
<!-- <van-row gutter="">
<van-col span="5">状态:</van-col>
<van-col span="19">{{ item.taskName }}</van-col>
</van-row> -->
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop ="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
<!-- 暂无数据 -->
<div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
v-if="isHaveNews"
>
暂无数据
</div>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import {dangerReturnDel,myHDList} from "@/service/danger";
export default {
components: {
LHeader: LHeader
},
data() {
return {
text: "我的上报",
searchValue: "",
isHaveNews: false,
messageList: [],
Loop: "", // 定时器
showIndex: null // 是否显示遮罩层
};
},
created() {
this.postList();
},
methods: {
postList() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
myHDList()
.then(res => {
this.$toast.clear();
this.messageList = res.data;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
onSearch(val) {
},
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return
}
this.showIndex = index;
},
goDetail(data){
this.$router.push({
// name: "insert-danger-detail",
name:"normal-detail",
params: {
id: data.id,
detailTitle:'上报详情'
}
});
this.showIndex = null;
},
// 提交
goSubmit(data) {
this.$router.push({
name: "add-danger",
params: {
status: "退回",
taskId: data.taskId
}
});
this.showIndex = null;
},
// 删除
goDelete(data) {
this.$toast.loading({
message: "删除中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
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;
}
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0.533333rem;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</style>
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null">
......
......@@ -28,8 +28,6 @@
<!-- 详情 -->
<div class="detail">详情</div>
</van-cell-group>
<van-form
@submit="onSubmit"
:show-error='false'
......@@ -160,7 +158,7 @@ export default {
let formdata = new FormData()
formdata.append('isResult', values.isResult)
formdata.append('details', values.details)
formdata.append('thinkHdLev', values.thinkHdLev)
formdata.append('thinkHdLev',values.isResult==1?'重大隐患':values.thinkHdLev)
formdata.append('taskId', this.taskId)
majorAdd(`/majorapprove/add`,formdata)
.then(res => {
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null">
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
......@@ -111,7 +111,7 @@ export default {
this.showIndex = index;
},
// 提交
// 上报
goSubmit(data) {
this.$router.push({
name: "add-danger",
......@@ -120,6 +120,8 @@ export default {
taskId: data.taskId
}
});
// 存到缓存里 如果路由跳转或者是缓存中有 就是隐患上报退回
localStorage.setItem('dangerAddTaskId',data.taskId)
this.showIndex = null;
},
// 删除
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
......
......@@ -327,7 +327,7 @@
<div class="step-wrap">
<van-row>
<van-col span="24"
><div class="info-title">日志信息</div></van-col
><div class="info-title">{{item.createTime}}</div></van-col
>
</van-row>
<van-row>
......@@ -354,12 +354,7 @@
>
<van-col span="19">{{ item.deptName }}</van-col>
</van-row>
<van-row>
<van-col span="5"
><span class="field-title">时间:</span></van-col
>
<van-col span="19">{{ item.createTime }}</van-col>
</van-row>
</div>
</van-step>
</van-steps>
......@@ -443,7 +438,7 @@ export default {
data() {
return {
id: "",
text: "隐患历史台账详情",
text: "隐患详情",
reportOpen: false,
reportOpenText: "展开 ▼",
journalOpen: false,
......@@ -468,10 +463,14 @@ export default {
};
},
created() {
if(this.$route.params.detailTitle){
this.text=this.$route.params.detailTitle
}
this.id = this.$route.params.id;
if (this.id) {
this.postDetail();
}
},
methods: {
// 请求台账信息
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null">
......
......@@ -17,7 +17,6 @@
<!-- <div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @search="onSearch" />
</div> -->
<!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null">
<!-- <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
......@@ -43,12 +42,11 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index" >
<van-overlay :show="showIndex == index" v-if="item.status == '未读'">
<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
round
type="info"
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null">
......
......@@ -157,7 +157,7 @@
<div class="step-wrap">
<van-row>
<van-col span="24"
><div class="info-title">日志信息</div></van-col
><div class="info-title">{{item.createTime}}</div></van-col
>
</van-row>
<van-row>
......@@ -184,12 +184,7 @@
>
<van-col span="19">{{item.deptName}}</van-col>
</van-row>
<van-row>
<van-col span="5"
><span class="field-title">时间:</span></van-col
>
<van-col span="19">{{item.createTime}}</van-col>
</van-row>
</div>
</van-step>
</van-steps>
......
......@@ -10,6 +10,7 @@
<van-field
v-if="isShowreturnCause"
v-model="returnCause"
required
readonly
rows="1"
autosize=""
......@@ -19,6 +20,7 @@
/>
<van-field
v-if="!isShowreturnCause"
required
readonly
clickable
name="projectName"
......@@ -40,6 +42,7 @@
<van-field
readonly
required
clickable
name="factor"
:value="factor"
......@@ -60,6 +63,7 @@
<van-field
readonly
required
clickable
name="source"
:value="source"
......@@ -80,6 +84,7 @@
<van-field
readonly
required
clickable
name="trouble"
:value="trouble"
......@@ -101,6 +106,7 @@
<van-field
readonly
clickable
required
name="setRank"
:value="setRank"
label="风险定级"
......@@ -119,6 +125,7 @@
<van-field
readonly
required
clickable
name="riskRank"
:value="riskRank"
......@@ -163,6 +170,7 @@
<van-field
v-model="location"
required
name="location"
label="风险部位"
type="textarea"
......@@ -175,6 +183,7 @@
<van-field
readonly
clickable
required
name="control"
:value="control"
label="管控层级"
......@@ -323,7 +332,7 @@ export default {
this.setRank = ""
}
// 销毁一下监听事件 不然会越加越多
this.$bus.$off('riskLevelBus', this.myhandle)
this.$bus.$off('riskLevelBus')
});
},
beforeRouteLeave(to, from, next) {
......@@ -480,7 +489,6 @@ export default {
formdata.append("id", this.id);
url = `/riskMain/editSave/${this.taskId}`;
}
postReAdd(url, formdata)
.then(res => {
this.$toast.clear();
......@@ -494,6 +502,7 @@ export default {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
this.$toast.clear();
},
// 请求表单数据
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null">
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
:key="index"
@change="touchstart(index, item)"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="5">风险编号:</van-col>
......@@ -139,6 +139,8 @@ export default {
taskId: data.taskId
}
});
// 存到缓存里 如果路由跳转或者是缓存中有 就是隐患上报退回
localStorage.setItem('riskAddTaskId',data.taskId)
this.showIndex = null;
},
// 删除
......
......@@ -144,6 +144,13 @@ export default {
}
],
dangerList: [
{
key: "11",
// path: "/danger",
path: "/insert-danger",
imgUrl: require("@/assets/workbench/risk-confirm.png"),
text: "我的上报"
},
// 隐患排查治理
{
key: "1",
......
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