Commit a9891cc3 authored by kaitly205422@163.com's avatar kaitly205422@163.com

固有风险风险等级已选附件丢失

parent a1d4c276
......@@ -11,6 +11,7 @@
<div id="app">
<!-- :style="{ height: showTab ?appHeight:'100%' }" 之前是给id为app-content 设置的内联样式 id="app-content" -->
<div>
<span v-for="item in cachePage" :key="item">{{ item }}</span>
<transition :name="transitionName">
<keep-alive :include="cachePage">
<router-view class="router-view" />
......@@ -36,7 +37,7 @@ export default {
headH: "",
screenH: "",
transitionName: "slide-left",
cachePage: ["riskAdd"],
cachePage: ["riskAdd", "addInherent"],
// 不需要展示底部tabbar的页面
noTab: [
"login",
......@@ -151,6 +152,10 @@ export default {
this.handleCache("riskTaskList", to.name, "taskLedger");
} else if (to.name == 'riskView' || from.name == 'riskInherent') {
this.handleCache("addInherent", to.name, "riskInherent");
} else if (to.name === 'resultPage') {
this.handleCache("addCurrent", to.name, "addCurrent");
} else if (to.name === 'resultPage') {
this.handleCache("addInherent", to.name, "addInherent");
}
// 列表页面动态添加缓存
......
......@@ -314,7 +314,7 @@
<van-popup v-model="measuresDept" position="bottom" :style="{ height: '100%' }">
<div class="van-picker__toolbar" style="position: absolute; width: 100%; top: 0">
<button type="button" class="van-picker__cancel" v-on:click="
{
{
form.measuresDeptId = 0;
projectDept = false;
}
......@@ -432,7 +432,7 @@
<van-popup v-model="measuresDept" position="bottom" :style="{ height: '100%' }">
<div class="van-picker__toolbar" style="position: absolute; width: 100%; top: 0">
<button type="button" class="van-picker__cancel" v-on:click="
{
{
form.measuresDeptId = 0;
projectDept = false;
}
......@@ -477,19 +477,11 @@ export default {
addFloor,
},
activated() {
console.log('activated')
this.showSetRank = false; // 再次关闭弹出层 以防万一
this.getList();
this.$bus.$on("riskLevelBus", (res) => {
this.showSetRank = false; // 再次关闭弹出层 以防万一
console.log(Boolean(res));
if (res) {
this.riskRank = res;
} else {
this.setRank = "";
}
// 销毁一下监听事件 不然会越加越多
this.$bus.$off("riskLevelBus");
});
debugger;
this.showGradeDialog = false;
this.$set(this.form, 'level', sessionStorage.getItem("level"));
},
beforeRouteEnter(to, from, next) {
if (from.name == "riskInherent") {
......@@ -598,7 +590,16 @@ export default {
buildingIds: "",
};
},
created() {
mounted() {
// if (sessionStorage.getItem("buildingId")) {
// this.form.buildingId = sessionStorage.getItem("buildingId");
// }
// if (sessionStorage.getItem("inherenForm") != "") {
// this.form = JSON.parse(sessionStorage.getItem("inherenForm"));
// if (sessionStorage.getItem("level")) {
// this.$set(this.form, 'level', sessionStorage.getItem("level"))
// }
// } else {
if (this.$route.params.inherentId || sessionStorage.getItem("inherentId")) {
this.inherentId =
this.$route.params.inherentId || sessionStorage.getItem("inherentId");
......@@ -606,15 +607,7 @@ export default {
this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.postReturnEcho();
}
},
mounted() {
if (sessionStorage.getItem("buildingId")) {
this.form.buildingId = sessionStorage.getItem("buildingId");
}
if (sessionStorage.getItem("inherenForm") != "") {
this.form = JSON.parse(sessionStorage.getItem("inherenForm"));
this.form.level = sessionStorage.getItem("level");
}
// }
},
methods: {
createFloor() {
......@@ -644,7 +637,6 @@ export default {
if (item.measuresUserName == e)
this.form.measuresUserPhone = item.measuresUserPhone;
});
console.log(e, 1111);
});
},
measuresDeptNameChange(e) {
......
......@@ -298,7 +298,7 @@
<van-popup v-model="measuresDept" position="bottom" :style="{ height: '100%' }">
<div class="van-picker__toolbar" style="position: absolute; width: 100%; top: 0">
<button type="button" class="van-picker__cancel" v-on:click="
{
{
form.measuresDeptId = 0;
projectDept = false;
}
......@@ -355,12 +355,14 @@ export default {
activated() {
this.showSetRank = false; // 再次关闭弹出层 以防万一
if (this.$route.params.taskId) {
this.isShowreturnCause = true;
this.text = "风险上报退回";
this.taskId = this.$route.params.taskId;
this.postReturnEcho();
}
this.showGradeDialog = false;
this.$set(this.form, 'level', sessionStorage.getItem("level"));
// if (this.$route.params.taskId) {
// this.isShowreturnCause = true;
// this.text = "风险上报退回";
// this.taskId = this.$route.params.taskId;
// this.postReturnEcho();
// }
// this.getList();
// this.$bus.$on("riskLevelBus", (res) => {
......@@ -485,7 +487,6 @@ export default {
};
},
created() {
console.log(this.$route)
var userInfo = getUserInfo();
this.form.buildingIds =
this.$route.params.buildingId || sessionStorage.getItem("buildingId");
......@@ -502,7 +503,11 @@ export default {
mounted() {
if (sessionStorage.getItem("inherenForm") != "") {
this.form = JSON.parse(sessionStorage.getItem("inherenForm"));
this.form.level = sessionStorage.getItem("level");
if (sessionStorage.getItem("level")) {
setTimeout(() => {
this.form.level = sessionStorage.getItem("level");
}, 0)
}
} else if (this.$store.state.inherentTemplate) {
this.form = { ...this.form, ...this.$store.state.inherentTemplate };
}
......
......@@ -9,11 +9,11 @@ module.exports = {
proxy: {
//配置跨域
"/app-api": {
// target: "http://192.168.4.232:8080/", //这里是后台的地址
target: "http://192.168.4.232:8080/", //这里是后台的地址
// target: "http://localhost:8080/", //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: "http://192.168.14.152:8080/", //这里是鲍德的地址
target: "http://192.168.15.230:8080/", //这里是晓晋的地址
// target: "http://192.168.15.230:8080/", //这里是晓晋的地址
// target: 'http://localhost:8081/', //这里是后台的地址
// target: 'http://127.0.0.1:8080', //这里是后台的地址
ws: true,
......
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