Commit ace0f3ba authored by 胡占生's avatar 胡占生 🇨🇳

fix: 新增现状风险 修复固有风险表单,修复缓存id

parent a4fc0ad1
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
'riskAdd' 'riskAdd'
], ],
// 不需要展示底部tabbar的页面 // 不需要展示底部tabbar的页面
noTab:["login", "login2", 'addInherent','riskInherent',"choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList'], noTab:["login", "login2", 'addCurrent','addPresent','addInherent','riskInherent',"choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList'],
// cachePage预先定义的缓存页面 // cachePage预先定义的缓存页面
otherCache: [], otherCache: [],
// 专门处理列表缓存的页面,这些页面缓存逻辑与其他缓存不一样去详情返回列表缓存,但是进入列表必须刷新,如何有需要缓存的列表请放到这里来。 // 专门处理列表缓存的页面,这些页面缓存逻辑与其他缓存不一样去详情返回列表缓存,但是进入列表必须刷新,如何有需要缓存的列表请放到这里来。
......
...@@ -156,11 +156,16 @@ const routes = [{ ...@@ -156,11 +156,16 @@ const routes = [{
name: 'addInherent', name: 'addInherent',
component: () => import('../views/riskProject/add/addInherent.vue'), component: () => import('../views/riskProject/add/addInherent.vue'),
}, },
{ {//编辑固有风险
path: '/addCurrent', path: '/addCurrent',
name: 'addCurrent', name: 'addCurrent',
component: () => import('../views/riskProject/add/addCurrent.vue'), component: () => import('../views/riskProject/add/addCurrent.vue'),
}, },
{//新增现状风险
path: '/addPresent ',
name: 'addPresent',
component: () => import('../views/riskProject/add/addPresent.vue'),
},
] ]
const router = new VueRouter({ const router = new VueRouter({
......
This diff is collapsed.
...@@ -638,7 +638,7 @@ export default { ...@@ -638,7 +638,7 @@ export default {
message: "提交成功", message: "提交成功",
duration: 2000, duration: 2000,
}); });
// history.go(-1); history.go(-1);
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
......
This diff is collapsed.
...@@ -437,7 +437,7 @@ export default { ...@@ -437,7 +437,7 @@ export default {
message: "提交成功", message: "提交成功",
duration: 2000, duration: 2000,
}); });
// history.go(-1); history.go(-1);
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<van-col span="17"> <van-col span="17">
<van-row gutter=""> <van-row gutter="">
<van-col span="9">发起时间:</van-col> <van-col span="9">发起时间:</van-col>
<van-col span="15">{{ item.createTime}}</van-col> <van-col span="15">{{ timestampToTimes(item.createTime)}}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="9">楼层:</van-col> <van-col span="9">楼层:</van-col>
...@@ -46,6 +46,17 @@ ...@@ -46,6 +46,17 @@
{{ '●待审批'}} {{ '●待审批'}}
</van-col> </van-col>
</van-row> </van-row>
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)"
>编辑</van-button
>
<!-- <van-button round type="info" @click="goConfirm(item)" v-show="active==0"
>确认</van-button
> -->
</div>
</van-overlay>
</van-cell-group> </van-cell-group>
<div <div
style=" style="
...@@ -83,6 +94,7 @@ ...@@ -83,6 +94,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { timestampToTime, generateId } from "@/utils/format";
export default { export default {
name:'risk-confirme', name:'risk-confirme',
components: { components: {
...@@ -111,11 +123,14 @@ ...@@ -111,11 +123,14 @@
}; };
}, },
created() { created() {
this.planId=this.$route.params.id this.planId=this.$route.params.id || sessionStorage.getItem('planId')
this.getRiskList(this.planId); this.getRiskList(this.planId);
// this.postList(); // this.postList();
}, },
methods: { methods: {
timestampToTimes(time){
return timestampToTime(new Date(time),"DT2", true)
},
changeData(arr){ changeData(arr){
var arrList=[] var arrList=[]
arr.forEach(item=>{ arr.forEach(item=>{
...@@ -239,9 +254,10 @@ ...@@ -239,9 +254,10 @@
// 详情 // 详情
goDetail(data) { goDetail(data) {
this.$router.push({ this.$router.push({
name: "risk-big-detail", name: "addCurrent",
params: { params: {
id: data.businessId||data.id, inherentId: data.businessId||data.id,
buildingIds:this.active,
}, },
}); });
this.showIndex = null; this.showIndex = null;
......
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
}; };
}, },
created() { created() {
var planId=this.$route.params.id var planId=this.$route.params.id || sessionStorage.getItem('planId')
this.postList(planId); this.postList(planId);
}, },
methods: { methods: {
......
...@@ -70,9 +70,9 @@ ...@@ -70,9 +70,9 @@
>详情</van-button >详情</van-button
> >
<van-button round type="info" @click="goConfirm(item)" v-show="active==0" <!-- <van-button round type="info" @click="goConfirm(item)" v-show="active==0"
>确认</van-button >确认</van-button
> > -->
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
...@@ -190,6 +190,7 @@ ...@@ -190,6 +190,7 @@
id: data.businessId ||data.id, id: data.businessId ||data.id,
}, },
}); });
sessionStorage.setItem('planId',data.id)
this.showIndex = null; this.showIndex = null;
}, },
// 确认 // 确认
......
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