Commit 13865c3e authored by yf's avatar yf

.

parent 2f216e98
...@@ -497,6 +497,7 @@ ...@@ -497,6 +497,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import SelectList from "@/components/selectList.vue"; import SelectList from "@/components/selectList.vue";
import selectFloor from "@/components/selectFloor.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue"; // import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import { getUserInfo, getLocalUserInfo } from "@/utils/userInfo"; import { getUserInfo, getLocalUserInfo } from "@/utils/userInfo";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
...@@ -513,6 +514,7 @@ export default { ...@@ -513,6 +514,7 @@ export default {
name: "addPresent", name: "addPresent",
components: { components: {
LHeader, LHeader,
selectFloor,
SelectList SelectList
}, },
activated() {}, activated() {},
...@@ -603,7 +605,15 @@ export default { ...@@ -603,7 +605,15 @@ export default {
}, },
created() { created() {
var userInfo = getUserInfo(); var userInfo = getUserInfo();
this.form.buildingIds = this.$route.params.id; this.form.buildingIds =
this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.form.planId =
this.$route.params.planId || sessionStorage.getItem("planId");
this.form.buildingName =
this.$route.params.buildingName || sessionStorage.getItem("buildingName");
this.form.userId = userInfo.userId;
this.form.userName = userInfo.userName;
this.form.deptName = userInfo.dept.deptName;
this.form.planId = this.$route.params.planId; this.form.planId = this.$route.params.planId;
this.form.floorId = this.$route.params.floorId; this.form.floorId = this.$route.params.floorId;
this.form.roomId = this.$route.params.roomId; this.form.roomId = this.$route.params.roomId;
...@@ -616,14 +626,24 @@ export default { ...@@ -616,14 +626,24 @@ export default {
this.form.projectId = "测试项目"; this.form.projectId = "测试项目";
}, },
mounted() { mounted() {
if (sessionStorage.getItem("presentForm") != "") { this.getFloor();
this.form = JSON.parse(sessionStorage.getItem("presentForm"));
this.form.level = sessionStorage.getItem("level");
}
this.getFXYS(); this.getFXYS();
this.getZSGLX(); this.getZSGLX();
}, },
methods: { methods: {
getFloor() {
getFun(`/risk/plan/floor/list/${this.form.buildingIds}`)
.then(res => {
// this.$toast.clear();
// this.showSource = true;
let newArr = this.renameKeyInTree(res.data, "name", "text");
this.floorSource = newArr;
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
getFXYS() { getFXYS() {
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_factor`) getFun(`/risk/plan/dict/data/list?dictType=risk_plan_factor`)
.then(res => { .then(res => {
...@@ -643,22 +663,8 @@ export default { ...@@ -643,22 +663,8 @@ export default {
}); });
}, },
seletFloor(name) { seletFloor(name) {
this.$toast.loading({ this.ShowfloorList = true;
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
this.userPrefix = name; this.userPrefix = name;
getFun(`/risk/plan/floor/list/${this.form.buildingIds}`)
.then(res => {
this.$toast.clear();
this.showSource = true;
this.columnsSource = res.data;
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
}, },
seletRoom(name) { seletRoom(name) {
this.$toast.loading({ this.$toast.loading({
......
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