Commit 35958ac2 authored by p-wanping.song's avatar p-wanping.song

Merge branch 'develop' of http://git.censoft.com.cn/rongtong/rongtong-app into develop

parents 99f4d39b a55ac9de
...@@ -114,7 +114,6 @@ export default { ...@@ -114,7 +114,6 @@ export default {
getFun("/risk/plan/dept/list").then(res => { getFun("/risk/plan/dept/list").then(res => {
this.allDeptList = res.data; this.allDeptList = res.data;
this.deptList = this.allDeptList.filter(item => item.parentId == 0); this.deptList = this.allDeptList.filter(item => item.parentId == 0);
console.log(res.data);
}); });
}, },
// // 待搜索框内容发生变化 // // 待搜索框内容发生变化
...@@ -139,7 +138,6 @@ export default { ...@@ -139,7 +138,6 @@ export default {
else this.showPre = false; else this.showPre = false;
this.deptName = data.deptName; this.deptName = data.deptName;
this.deptId = data.deptId; this.deptId = data.deptId;
console.log(this.deptList);
// this.deptId = data.deptId; // this.deptId = data.deptId;
// this.searchVal = ""; // this.searchVal = "";
// this.deptName = data.deptName; // this.deptName = data.deptName;
...@@ -150,7 +148,6 @@ export default { ...@@ -150,7 +148,6 @@ export default {
goBack() { goBack() {
var parentId = this.allDeptList.find(item => item.deptId == this.deptId) var parentId = this.allDeptList.find(item => item.deptId == this.deptId)
.parentId; .parentId;
console.log(parentId);
if (parentId != 0) { if (parentId != 0) {
this.showPre = true; this.showPre = true;
var dept = this.allDeptList.find(item => item.deptId == parentId); var dept = this.allDeptList.find(item => item.deptId == parentId);
......
This diff is collapsed.
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
alt="" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" style="position: relative;top: 32%;transform: translateY(-50%);"
/> />
风险信息 固有风险信息
</div> </div>
<van-field <van-field
readonly readonly
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
<van-field <van-field
readonly readonly
required required
name="projectId" name="projectName"
:value="form.projectId" :value="form.projectName"
label="所属项目" label="所属项目"
placeholder="请输入" placeholder="请输入"
/> />
...@@ -620,40 +620,47 @@ ...@@ -620,40 +620,47 @@
</div> </div>
</van-tab> </van-tab>
<van-tab title="现状风险"> <van-tab title="现状风险">
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list">
<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)"
> >
<div style="font-size: 0.45rem;padding: 5px 0;"> <div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.title }} {{ item.name }}
</div> </div>
<van-row gutter=""> <van-row gutter="">
<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.name }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">创建时间:</van-col>
<van-col span="15">{{ <van-col span="15">{{
timestampToTimes(item.createTime) timestampToTimes(item.createTime)
}}</van-col> }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="9">风险描述:</van-col> <van-col span="9">楼层:</van-col>
<van-col span="15">{{ item.describe }}</van-col> <van-col span="15">{{ item.floorName }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">房间:</van-col>
<van-col span="15">{{ item.roomName }}</van-col>
</van-row> </van-row>
</van-col> </van-col>
<van-col <!-- <van-col span="7" :style="{ color: item.state == 1 ? '#0069e5' : '#03b615' }">
span="7" {{ "●待审批" }}
:style="{ color: item.state == 1 ? '#0069e5' : '#03b615' }" </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="danger" @click="delInherent(item)"
>删除</van-button
>
</div>
</van-overlay>
</van-cell-group> </van-cell-group>
<div <div
style=" style="
...@@ -780,12 +787,14 @@ ...@@ -780,12 +787,14 @@
</template> </template>
<script> <script>
import { Dialog } from "vant";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import selectDept from "@/components/selectDept/index.vue"; import selectDept from "@/components/selectDept/index.vue";
import SelectList from "@/components/selectList.vue"; import SelectList from "@/components/selectList.vue";
import selectFloor from "@/components/selectFloor.vue"; import selectFloor from "@/components/selectFloor.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";
import { timestampToTime, generateId } from "@/utils/format";
export default { export default {
name: "addCurrent", name: "addCurrent",
...@@ -825,6 +834,7 @@ export default { ...@@ -825,6 +834,7 @@ export default {
}, },
data() { data() {
return { return {
showIndex: null,
measuresDept: false, measuresDept: false,
ShowfloorList: false, ShowfloorList: false,
floorSource: [], floorSource: [],
...@@ -844,7 +854,7 @@ export default { ...@@ -844,7 +854,7 @@ export default {
showPopover: false, showPopover: false,
showGradeDialog: false, showGradeDialog: false,
taskId: "", taskId: "",
text: "添加固有风险", text: "编辑固有风险",
id: "", id: "",
isTimely: 1, isTimely: 1,
active: 0, active: 0,
...@@ -925,12 +935,55 @@ export default { ...@@ -925,12 +935,55 @@ export default {
} }
}, },
methods: { methods: {
// 详情
goDetail(data) {
sessionStorage.setItem("inherentId", this.inherentId);
sessionStorage.setItem("existingId", data.id);
this.$router.push({
name: "addPresent",
params: {
inherentId: this.inherentId,
existingId: data.id,
isEdit: true
}
});
this.showIndex = null;
},
delInherent(item) {
Dialog.confirm({
title: "删除现有风险",
message: "是否确认删除?"
})
.then(() => {
// on confirm
getFun(`/risk/plan/existing/delete/${item.id}`).then(res => {
this.$toast.success(res.msg);
this.getList();
// });
});
{
inherentId;
}
})
.catch(() => {
// on cancel
});
},
afterRead(file) { afterRead(file) {
console.log(file); console.log(file);
}, },
timestampToTimes(time) { timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true); return timestampToTime(new Date(time), "DT2", true);
}, },
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.showIndex = index;
},
tabList(value) { tabList(value) {
console.log( console.log(
"%c [ value ]-527", "%c [ value ]-527",
...@@ -1011,7 +1064,6 @@ export default { ...@@ -1011,7 +1064,6 @@ export default {
} }
this.form[this.userPrefix + "Id"] = value.userId; this.form[this.userPrefix + "Id"] = value.userId;
this.form[this.userPrefix + "Name"] = value.nickName; this.form[this.userPrefix + "Name"] = value.nickName;
console.log("this.form :>> ", this.form);
this.showTrouble = false; this.showTrouble = false;
}, },
getUserData(e) { getUserData(e) {
...@@ -1041,12 +1093,10 @@ export default { ...@@ -1041,12 +1093,10 @@ export default {
}); });
}, },
changeDept(id, name) { changeDept(id, name) {
console.log(id);
this.form.measuresDeptId = id; this.form.measuresDeptId = id;
this.form.measuresDeptName = name; this.form.measuresDeptName = name;
}, },
closeDept() { closeDept() {
console.log(this.form.deptId);
this.measuresDept = false; this.measuresDept = false;
}, },
selectData(dataName, isSinge) { selectData(dataName, isSinge) {
...@@ -1097,7 +1147,6 @@ export default { ...@@ -1097,7 +1147,6 @@ export default {
return arr; return arr;
}, },
getFloor() { getFloor() {
console.log(this.form, 111);
getFun(`/risk/plan/floor/list/${this.form.buildingId}`) getFun(`/risk/plan/floor/list/${this.form.buildingId}`)
.then(res => { .then(res => {
// this.$toast.clear(); // this.$toast.clear();
...@@ -1187,11 +1236,12 @@ export default { ...@@ -1187,11 +1236,12 @@ export default {
}); });
}, },
performTasks() { performTasks() {
console.log("1233213 :>> ", 1233213); sessionStorage.setItem("inherentId", this.inherentId);
this.$router.push({ this.$router.push({
name: "addPresent", name: "addPresent",
params: { params: {
id: this.inherentId inherentId: this.inherentId,
isEdit: false
} }
}); });
}, },
...@@ -1207,7 +1257,6 @@ export default { ...@@ -1207,7 +1257,6 @@ export default {
async deleteFile(val, detail, key) { async deleteFile(val, detail, key) {
// console.log(val,detail) // console.log(val,detail)
if (val.fileId) { if (val.fileId) {
console.log(detail, "ccc");
let formdata = new FormData(); let formdata = new FormData();
formdata.append("key", val["fileId"]); formdata.append("key", val["fileId"]);
var ids = this.form[key + "Ids"].split(","); var ids = this.form[key + "Ids"].split(",");
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
<van-field <van-field
readonly readonly
required required
name="projectId" name="projectName"
:value="form.projectId" :value="form.projectName"
label="所属项目" label="所属项目"
placeholder="请输入" placeholder="请输入"
/> />
...@@ -765,10 +765,11 @@ export default { ...@@ -765,10 +765,11 @@ export default {
this.$route.params.planId || sessionStorage.getItem("planId"); this.$route.params.planId || sessionStorage.getItem("planId");
this.form.buildingName = this.form.buildingName =
this.$route.params.buildingName || sessionStorage.getItem("buildingName"); this.$route.params.buildingName || sessionStorage.getItem("buildingName");
this.form.projectId = sessionStorage.getItem("projectId");
this.form.projectName = sessionStorage.getItem("projectName");
this.form.userId = userInfo.userId; this.form.userId = userInfo.userId;
this.form.userName = userInfo.userName; this.form.userName = userInfo.userName;
this.form.deptName = userInfo.dept.deptName; this.form.deptName = userInfo.dept.deptName;
this.form.projectId = "测试项目";
}, },
mounted() { mounted() {
if (sessionStorage.getItem("inherenForm") != "") { if (sessionStorage.getItem("inherenForm") != "") {
...@@ -786,7 +787,6 @@ export default { ...@@ -786,7 +787,6 @@ export default {
} }
this.form[this.userPrefix + "Id"] = value.userId; this.form[this.userPrefix + "Id"] = value.userId;
this.form[this.userPrefix + "Name"] = value.nickName; this.form[this.userPrefix + "Name"] = value.nickName;
console.log("this.form :>> ", this.form);
this.showTrouble = false; this.showTrouble = false;
}, },
getUserData(e) { getUserData(e) {
...@@ -816,12 +816,10 @@ export default { ...@@ -816,12 +816,10 @@ export default {
}); });
}, },
changeDept(id, name) { changeDept(id, name) {
console.log(id);
this.form.measuresDeptId = id; this.form.measuresDeptId = id;
this.form.measuresDeptName = name; this.form.measuresDeptName = name;
}, },
closeDept() { closeDept() {
console.log(this.form.deptId);
this.measuresDept = false; this.measuresDept = false;
}, },
selectData(dataName, isSinge) { selectData(dataName, isSinge) {
......
This diff is collapsed.
...@@ -399,7 +399,6 @@ export default { ...@@ -399,7 +399,6 @@ export default {
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
console.log(this.form.deptId,'00000')
getFun(`/risk/plan/user/list/${this.form.deptId}`).then(res => { getFun(`/risk/plan/user/list/${this.form.deptId}`).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.columnsTrouble = res.data; this.columnsTrouble = res.data;
...@@ -493,7 +492,7 @@ export default { ...@@ -493,7 +492,7 @@ export default {
formdata.append("key", val["fileId"]); formdata.append("key", val["fileId"]);
let res = await postFun("/mobile/remove", formdata); let res = await postFun("/mobile/remove", formdata);
if (res) { if (res) {
console.log(res); res;
this.$toast({ this.$toast({
title: "提示", title: "提示",
message: "删除成功!" message: "删除成功!"
...@@ -657,7 +656,6 @@ export default { ...@@ -657,7 +656,6 @@ export default {
} }
this.form[this.userPrefix + "Id"] = value.userId; this.form[this.userPrefix + "Id"] = value.userId;
this.form[this.userPrefix + "Name"] = value.nickName; this.form[this.userPrefix + "Name"] = value.nickName;
console.log("this.form :>> ", this.form);
this.showTrouble = false; this.showTrouble = false;
}, },
// 风险定级 // 风险定级
......
...@@ -153,11 +153,11 @@ export default { ...@@ -153,11 +153,11 @@ export default {
}; };
}, },
created() { created() {
this.planId = this.$route.params.id || sessionStorage.getItem("planId"); this.planId = sessionStorage.getItem("planId") || this.$route.params.id;
this.buildingId = this.buildingId =
this.$route.params.buildingId || sessionStorage.getItem("buildingId"); sessionStorage.getItem("buildingId") || this.$route.params.buildingId;
this.buildingName = this.buildingName =
this.$route.params.buildingName || sessionStorage.getItem("buildingName"); sessionStorage.getItem("buildingName") || this.$route.params.buildingName;
this.getRiskList(this.planId); this.getRiskList(this.planId);
// this.postList(); // this.postList();
}, },
...@@ -260,7 +260,6 @@ export default { ...@@ -260,7 +260,6 @@ export default {
this.changeBuild(res.data[0].name); this.changeBuild(res.data[0].name);
this.option0 = this.changeData(res.data); this.option0 = this.changeData(res.data);
this.value0 = res.data[0].name || ""; this.value0 = res.data[0].name || "";
console.log(this.value0, 222);
this.changeBuild(); this.changeBuild();
}) })
.catch(() => { .catch(() => {
...@@ -274,7 +273,6 @@ export default { ...@@ -274,7 +273,6 @@ export default {
.then(res => { .then(res => {
this.option2 = this.changeData(res.data); this.option2 = this.changeData(res.data);
this.value2 = res.data[0].id || 0; this.value2 = res.data[0].id || 0;
console.log(this.value2, "vlaue2");
resolve(res.data); resolve(res.data);
let risk = this.riskList( let risk = this.riskList(
this.planId, this.planId,
...@@ -331,11 +329,9 @@ export default { ...@@ -331,11 +329,9 @@ export default {
}, },
changeBuild() { changeBuild() {
if (this.value0) { if (this.value0) {
console.log(this.floorListData, this.value0, 111);
let arr = this.floorListData.filter(item => item.name == this.value0)[0] let arr = this.floorListData.filter(item => item.name == this.value0)[0]
.children; .children;
console.log(arr);
this.option1 = this.changeData(arr); this.option1 = this.changeData(arr);
this.value1 = arr[0].id; this.value1 = arr[0].id;
this.roomList(this.value1); this.roomList(this.value1);
...@@ -373,7 +369,7 @@ export default { ...@@ -373,7 +369,7 @@ export default {
sessionStorage.setItem("buildingId", this.buildingId); sessionStorage.setItem("buildingId", this.buildingId);
sessionStorage.setItem("planId", this.planId); sessionStorage.setItem("planId", this.planId);
sessionStorage.setItem("buildingName", this.buildingName); sessionStorage.setItem("buildingName", this.buildingName);
sessionStorage.setItem("inherentId", data.businessId || data.id); sessionStorage.setItem("inherentId", data.id);
this.$router.push({ this.$router.push({
name: "addCurrent", name: "addCurrent",
params: { params: {
......
...@@ -67,7 +67,6 @@ export default { ...@@ -67,7 +67,6 @@ export default {
}; };
buildingDtos[i] = buildingDto; buildingDtos[i] = buildingDto;
} }
console.log(buildingDtos);
var params = { var params = {
id: this.planId, id: this.planId,
taskResult: this.result, taskResult: this.result,
...@@ -75,9 +74,7 @@ export default { ...@@ -75,9 +74,7 @@ export default {
buildingDtos: buildingDtos buildingDtos: buildingDtos
}; };
postFun("/risk/plan/approve", params) postFun("/risk/plan/approve", params)
.then(res => { .then(res => {})
console.log(res);
})
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试");
......
...@@ -177,40 +177,83 @@ ...@@ -177,40 +177,83 @@
@click="toRiskDetail(item)" @click="toRiskDetail(item)"
> >
<!-- <van-col span="20"> --> <!-- <van-col span="20"> -->
<van-col> <van-col>
<van-image <van-image
style="vertical-align: middle;margin-right: 15px;margin-left: 10px;" style="vertical-align: middle;margin-right: 15px;margin-left: 10px;"
width="58" width="58"
height="58" height="58"
:src="(item.level == '重大风险' ? :src="
require('@/assets/imgs/redInherent.png'):item.level == '较大风险'? item.level == '重大风险'
require('@/assets/imgs/inherentOrange.png'): item.level === '一般风险'?require('@/assets/imgs/yellowInherent.png') :require('@/assets/imgs/blueInherent.png') ? require('@/assets/imgs/redInherent.png')
)" : item.level == '较大风险'
/> ? require('@/assets/imgs/inherentOrange.png')
<!-- <van-image width="46" height="46" :src="item.avatar" /> --> : item.level === '一般风险'
</van-col> ? require('@/assets/imgs/yellowInherent.png')
<van-col span="17"> : require('@/assets/imgs/blueInherent.png')
<van-row gutter="0"> "
<van-col style="font-weight: bold;color:#000;font-size: 16px;">风险名称:</van-col> />
<van-col span="14" style="color: #000;font-size: 16px;" class="item-prop">{{ item.name }}</van-col> <!-- <van-image width="46" height="46" :src="item.avatar" /> -->
</van-row> </van-col>
<van-row gutter="0"> <van-col span="17">
<van-col style="font-weight: bold;color:#666666;font-size: 12px;">风险等级:</van-col> <van-row gutter="0">
<van-col span="15" style="color: #9d9d9d;font-size: 12px;" class="item-prop">{{ item.level }}</van-col> <van-col
</van-row> span="10"
<van-row gutter="0"> style="font-weight: bold;color:#000;font-size: 16px;"
<van-col style="font-weight: bold;color:#666666;font-size: 12px;">上报时间:</van-col> >风险名称:</van-col
<van-col span="15" style="color: #9d9d9d;font-size: 12px;" class="item-prop">{{ timestampToTimes(item.createTime, "DT2") }}</van-col> >
</van-row> <van-col span="14" style="color: #000;font-size: 16px;">{{
<van-row gutter="0"> item.name
<van-col style="font-weight: bold;color:#666666;font-size: 12px;">所属房间:</van-col> }}</van-col>
<van-col span="15" style="color: #9d9d9d;font-size: 12px;" class="item-prop">{{ item.buildingName + item.floorName + item.roomName }}</van-col> </van-row>
</van-row> <van-row gutter="0">
</van-col> <van-col
<!-- </van-col> --> span="9"
<!-- <van-col span="4" class="list-right"> style="font-weight: bold;color:#666666;font-size: 12px;"
<van-tag plain type="primary">详情<van-icon name="arrow" size="12px" /></van-tag> >风险等级:</van-col
</van-col> --> >
<van-col
span="15"
style="color: #9d9d9d;font-size: 12px;"
>{{ item.level }}</van-col
>
</van-row>
<van-row gutter="0">
<van-col
span="9"
style="font-weight: bold;color:#666666;font-size: 12px;"
>上报时间:</van-col
>
<van-col
span="15"
style="color: #9d9d9d;font-size: 12px;"
>{{ timestampToTimes(item.createTime, "DT2") }}</van-col
>
</van-row>
<van-row gutter="0">
<van-col
span="9"
style="font-weight: bold;color:#666666;font-size: 12px;"
>所属房间:</van-col
>
<van-col
span="15"
style="color: #9d9d9d;font-size: 12px;"
>{{
item.buildingName + item.floorName + item.roomName
}}</van-col
>
</van-row>
</van-col>
<van-col span="4" class="list-right">
<van-tag plain type="primary"
>详情<van-icon name="arrow" size="12px"
/></van-tag>
<!-- <van-row type="flex">
详情
</van-row> -->
</van-col>
</van-row> </van-row>
</van-cell-group> </van-cell-group>
</div> </div>
...@@ -596,6 +639,15 @@ export default { ...@@ -596,6 +639,15 @@ export default {
"buildingName", "buildingName",
this.messageList.riskBuildingListDtos[0].buildingName this.messageList.riskBuildingListDtos[0].buildingName
); );
sessionStorage.setItem(
"projectId",
this.messageList.detailsDto.projectId
);
sessionStorage.setItem(
"projectName",
this.messageList.detailsDto.projectName
);
this.$router.push({ this.$router.push({
name: "riskInherent", name: "riskInherent",
params: { params: {
...@@ -644,7 +696,6 @@ export default { ...@@ -644,7 +696,6 @@ export default {
this.isShowAppvoreList = true; this.isShowAppvoreList = true;
getFun("/risk/plan/allocation/building/list/" + id) getFun("/risk/plan/allocation/building/list/" + id)
.then(res => { .then(res => {
console.log(res);
this.buildingList = res.data; this.buildingList = res.data;
this.checkValue = this.buildingList.map(item => item.buildingId); this.checkValue = this.buildingList.map(item => item.buildingId);
}) })
...@@ -665,18 +716,15 @@ export default { ...@@ -665,18 +716,15 @@ export default {
getRiskTaskList(planId, buildingId) { getRiskTaskList(planId, buildingId) {
if (buildingId) { if (buildingId) {
getFun(`/risk/plan/inherent/list/${planId}/${buildingId}`).then(res => { getFun(`/risk/plan/inherent/list/${planId}/${buildingId}`).then(res => {
console.log(res.data, "lll");
this.riskList = res.data; this.riskList = res.data;
}); });
} else { } else {
getFun(`/risk/plan/inherent/list/${planId}`).then(res => { getFun(`/risk/plan/inherent/list/${planId}`).then(res => {
console.log(res.data, "lll");
this.riskList = res.data; this.riskList = res.data;
}); });
} }
}, },
postList(id, buildingId) { postList(id, buildingId) {
console.log(buildingId, "123");
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
...@@ -689,13 +737,11 @@ export default { ...@@ -689,13 +737,11 @@ export default {
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.data || res.rows; this.messageList = res.data || res.rows;
console.log(this.messageList);
this.form = this.messageList.detailsDto; this.form = this.messageList.detailsDto;
this.checkValue = this.messageList.riskBuildingListDtos.map( this.checkValue = this.messageList.riskBuildingListDtos.map(
item => item.buildingId item => item.buildingId
); );
this.riskLogList = this.messageList.approveListDtos; this.riskLogList = this.messageList.approveListDtos;
console.log(this.messageList.statusKey, 111);
switch (this.messageList.statusKey) { switch (this.messageList.statusKey) {
case "CREATE_TASK": case "CREATE_TASK":
case "WAIT_START": case "WAIT_START":
...@@ -775,10 +821,11 @@ export default { ...@@ -775,10 +821,11 @@ export default {
}, },
//风险清单列表点击 //风险清单列表点击
toRiskDetail(item) { toRiskDetail(item) {
sessionStorage.setItem("inherentId", item.id);
this.$router.push({ this.$router.push({
name: "taskDetail", name: "taskDetail",
params: { params: {
id: item.id, inherentId: item.id,
floorId: item.floorId floorId: item.floorId
} }
}); });
...@@ -795,7 +842,7 @@ export default { ...@@ -795,7 +842,7 @@ export default {
.cell-wrap { .cell-wrap {
position: relative; position: relative;
} }
.van-cell-group--inset .van-row{ .van-cell-group--inset .van-row {
line-height: 1.5 !important; line-height: 1.5 !important;
} }
...@@ -819,10 +866,10 @@ p { ...@@ -819,10 +866,10 @@ p {
line-height: 0.64rem; line-height: 0.64rem;
} }
} }
.list-row{ .list-row {
position: relative; position: relative;
} }
.list-right{ .list-right {
position: absolute; position: absolute;
right: 0; right: 0;
} }
...@@ -853,9 +900,9 @@ p { ...@@ -853,9 +900,9 @@ p {
font-weight: none; font-weight: none;
z-index: 99; z-index: 99;
} }
.item-prop{ .item-prop {
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
</style> </style>
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<van-field <van-field
readonly readonly
required required
name="projectId" name="projectName"
:value="form.projectId" :value="form.projectName"
label="所属项目" label="所属项目"
placeholder="请输入" placeholder="请输入"
/> />
...@@ -457,19 +457,6 @@ export default { ...@@ -457,19 +457,6 @@ export default {
this.$bus.$off("riskLevelBus"); this.$bus.$off("riskLevelBus");
}); });
}, },
beforeRouteEnter(to, from, next) {
if (from.name == "riskInherent") {
sessionStorage.setItem("inherenForm", "");
sessionStorage.setItem("level", "");
}
next();
},
beforeRouteLeave(to, from, next) {
if (to.name != "riskInherent") {
sessionStorage.setItem("inherenForm", JSON.stringify(this.form));
}
next();
},
data() { data() {
return { return {
measuresDept: false, measuresDept: false,
...@@ -491,7 +478,7 @@ export default { ...@@ -491,7 +478,7 @@ export default {
showPopover: false, showPopover: false,
showGradeDialog: false, showGradeDialog: false,
taskId: "", taskId: "",
text: "添加固有风险", text: "固有风险详情",
id: "", id: "",
isTimely: 1, isTimely: 1,
active: 0, active: 0,
...@@ -560,17 +547,13 @@ export default { ...@@ -560,17 +547,13 @@ export default {
if (this.$route.params.inherentId || sessionStorage.getItem("inherentId")) { if (this.$route.params.inherentId || sessionStorage.getItem("inherentId")) {
this.inherentId = this.inherentId =
this.$route.params.inherentId || sessionStorage.getItem("inherentId"); this.$route.params.inherentId || sessionStorage.getItem("inherentId");
this.buildingIds = this.buildingIds =
this.$route.params.buildingId || sessionStorage.getItem("buildingId"); this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.postReturnEcho(); this.postReturnEcho();
} }
}, },
mounted() { mounted() {},
if (sessionStorage.getItem("inherenForm") != "") {
this.form = JSON.parse(sessionStorage.getItem("inherenForm"));
this.form.level = sessionStorage.getItem("level");
}
},
methods: { methods: {
timestampToTimes(time) { timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true); return timestampToTime(new Date(time), "DT2", true);
...@@ -640,7 +623,6 @@ export default { ...@@ -640,7 +623,6 @@ export default {
} }
this.form[this.userPrefix + "Id"] = value.userId; this.form[this.userPrefix + "Id"] = value.userId;
this.form[this.userPrefix + "Name"] = value.nickName; this.form[this.userPrefix + "Name"] = value.nickName;
console.log("this.form :>> ", this.form);
this.showTrouble = false; this.showTrouble = false;
}, },
getUserData(e) { getUserData(e) {
...@@ -670,12 +652,10 @@ export default { ...@@ -670,12 +652,10 @@ export default {
}); });
}, },
changeDept(id, name) { changeDept(id, name) {
console.log(id);
this.form.measuresDeptId = id; this.form.measuresDeptId = id;
this.form.measuresDeptName = name; this.form.measuresDeptName = name;
}, },
closeDept() { closeDept() {
console.log(this.form.deptId);
this.measuresDept = false; this.measuresDept = false;
}, },
selectData(dataName, isSinge) { selectData(dataName, isSinge) {
...@@ -726,7 +706,6 @@ export default { ...@@ -726,7 +706,6 @@ export default {
return arr; return arr;
}, },
getFloor() { getFloor() {
console.log(this.form, 111);
getFun(`/risk/plan/floor/list/${this.form.buildingId}`) getFun(`/risk/plan/floor/list/${this.form.buildingId}`)
.then(res => { .then(res => {
// this.$toast.clear(); // this.$toast.clear();
......
...@@ -6,11 +6,16 @@ ...@@ -6,11 +6,16 @@
<div class="section"> <div class="section">
<van-tabs v-model="activeName" color="#2980f7" animated @click="onClick"> <van-tabs v-model="activeName" color="#2980f7" animated @click="onClick">
<van-tab title="固有风险信息" name="a"> <van-tab title="固有风险信息" name="a">
<TabDetail :InherentRisk="InherentRisk"/> <TabDetail :InherentRisk="InherentRisk" />
</van-tab> </van-tab>
<van-tab title="现状风险" name="b"> <van-tab title="现状风险" name="b">
<div class="quolist"> <div class="quolist">
<van-cell-group style="padding: 10px;box-sizing: border-box;background-color: #fff;margin: 8px;border-radius: 10px;" v-for="(item, index) in quoRiskList" :key="index" @click="goDetail(item)"> <van-cell-group
style="padding: 10px;box-sizing: border-box;background-color: #fff;margin: 8px;border-radius: 10px;"
v-for="(item, index) in quoRiskList"
:key="index"
@click="goDetail(item)"
>
<div style="font-size: 0.45rem;padding: 5px 0;"> <div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.name }} {{ item.name }}
</div> </div>
...@@ -28,18 +33,24 @@ ...@@ -28,18 +33,24 @@
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="9">风险因素:</van-col> <van-col span="9">风险因素:</van-col>
<van-col span="15">{{ <van-col span="15">{{ item.factor }}</van-col>
item.factor
}}</van-col>
</van-row> </van-row>
</van-col> </van-col>
<van-col span="7"> <van-col span="7">
<van-row> <van-row>
{{ item.state }} {{ item.state }}
</van-row> </van-row>
<van-row type="flex" style="flex-direction: column;align-items: center;"> <van-row
type="flex"
style="flex-direction: column;align-items: center;"
>
<van-col> <van-col>
<van-image round width="34" height="34" src="http://rongtongpc.censoft.com.cn/dev-api/profile/upload/2023/07/08/xianyou.png" /> <van-image
round
width="34"
height="34"
src="http://rongtongpc.censoft.com.cn/dev-api/profile/upload/2023/07/08/xianyou.png"
/>
</van-col> </van-col>
<van-col> <van-col>
{{ item.userName }} {{ item.userName }}
...@@ -51,7 +62,7 @@ ...@@ -51,7 +62,7 @@
</div> </div>
</van-tab> </van-tab>
<van-tab title="四色图" name="c"> <van-tab title="四色图" name="c">
<drawCanvas :isView="true" :floorId="floorId"/> <drawCanvas :isView="true" :floorId="floorId" />
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
...@@ -82,7 +93,7 @@ export default { ...@@ -82,7 +93,7 @@ export default {
TabDetail TabDetail
}, },
created() { created() {
this.inherentId = this.$route.params.id ||sessionStorage.getItem('inherntId') this.inherentId = this.$route.params.id ||sessionStorage.getItem('inherentId')
this.floorId = this.$route.params.floorId this.floorId = this.$route.params.floorId
}, },
mounted() { mounted() {
...@@ -104,11 +115,13 @@ export default { ...@@ -104,11 +115,13 @@ export default {
return timestampToTime(new Date(time), "DT1", true); return timestampToTime(new Date(time), "DT1", true);
}, },
goDetail(item){ goDetail(item){
sessionStorage.setItem('inherntId',this.inherentId) sessionStorage.setItem('inherentId',this.inherentId)
sessionStorage.setItem('existingId',item.id)
this.$router.push({ this.$router.push({
name:'presentDetail', name:'presentDetail',
params:{ params:{
isView:false, isView:false,
existingId:item.id
} }
}) })
}, },
...@@ -134,7 +147,7 @@ export default { ...@@ -134,7 +147,7 @@ export default {
/* height: 100%; */ /* height: 100%; */
overflow-y: auto; overflow-y: auto;
} }
.quolist{ .quolist {
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;
} }
......
...@@ -21,8 +21,13 @@ ...@@ -21,8 +21,13 @@
<van-cell-group inset v-if="finalRiskList.length > 0"> <van-cell-group inset v-if="finalRiskList.length > 0">
<van-cell value="风险评估管理" /> <van-cell value="风险评估管理" />
<van-grid :column-num="4"> <van-grid :column-num="4">
<van-grid-item @click="dangerJump(item.path)" v-for="item in finalRiskList" :key="item.key" :icon="item.imgUrl" <van-grid-item
:text="item.text" /> @click="dangerJump(item.path)"
v-for="item in finalRiskList"
:key="item.key"
:icon="item.imgUrl"
:text="item.text"
/>
</van-grid> </van-grid>
</van-cell-group> </van-cell-group>
<!-- <van-cell-group inset v-for="(item, index) in riskList" :key="index"> <!-- <van-cell-group inset v-for="(item, index) in riskList" :key="index">
...@@ -45,15 +50,15 @@ ...@@ -45,15 +50,15 @@
<script> <script>
import tabBar from "@/components/TabBar"; import tabBar from "@/components/TabBar";
import { getFun, postFun } from '@/service/table' import { getFun, postFun } from "@/service/table";
export default { export default {
components: { components: {
tabBar tabBar
}, },
data() { data() {
return { return {
value: '', value: "",
/** /**
* 总公司:任务台账; * 总公司:任务台账;
* 区域负责人:任务管理,任务审批,任务台账 * 区域负责人:任务管理,任务审批,任务台账
* 评估负责人: 执行管理,风险评估,任务审批,任务台账 * 评估负责人: 执行管理,风险评估,任务审批,任务台账
...@@ -63,166 +68,161 @@ export default { ...@@ -63,166 +68,161 @@ export default {
{ {
path: "/taskLedger", path: "/taskLedger",
imgUrl: require("@/assets/workbench/work-approval.png"), imgUrl: require("@/assets/workbench/work-approval.png"),
text: "任务台账", text: "任务台账"
}, },
{ {
path: "/riskManage", path: "/riskManage",
imgUrl: require("@/assets/workbench/risk-report.png"), imgUrl: require("@/assets/workbench/risk-report.png"),
text: "任务管理", text: "任务管理"
}, },
{ {
path: "/taskManage", path: "/taskManage",
imgUrl: require("@/assets/workbench/plane-approval.png"), imgUrl: require("@/assets/workbench/plane-approval.png"),
text: "任务审批", text: "任务审批"
}, },
{ {
path: "/riskExecution", path: "/riskExecution",
imgUrl: require("@/assets/workbench/rectification-notice.png"), imgUrl: require("@/assets/workbench/rectification-notice.png"),
text: "执行管理", text: "执行管理"
}, },
{ {
path: "/riskAssess", path: "/riskAssess",
imgUrl: require("@/assets/workbench/risk-confirm.png"), imgUrl: require("@/assets/workbench/risk-confirm.png"),
text: "风险评估", text: "风险评估"
}, },
{ {
path: "/riskApprove", path: "/riskApprove",
imgUrl: require("@/assets/workbench/risk-account.png"), imgUrl: require("@/assets/workbench/risk-account.png"),
text: "风险审批", text: "风险审批"
}, },
{ {
path: "/riskLedger", path: "/riskLedger",
imgUrl: require("@/assets/workbench/danger-account.png"), imgUrl: require("@/assets/workbench/danger-account.png"),
text: "风险台账", text: "风险台账"
}, }
// { // {
// path: "/riskView", // path: "/riskView",
// imgUrl: require("@/assets/workbench/quarter_record.png"), // imgUrl: require("@/assets/workbench/quarter_record.png"),
// text: "四色图", // text: "四色图",
// }, // },
], ],
riskList: [ { riskList: [
key:"1", {
key: "1",
path: "/taskLedger", path: "/taskLedger",
imgUrl: require("@/assets/workbench/work-approval.png"), imgUrl: require("@/assets/workbench/work-approval.png"),
text: "任务台账", text: "任务台账"
}, },
{ {
key:"2", key: "2",
path: "/riskManage", path: "/riskManage",
imgUrl: require("@/assets/workbench/risk-report.png"), imgUrl: require("@/assets/workbench/risk-report.png"),
text: "任务管理", text: "任务管理"
}, },
{ {
key:"3", key: "3",
path: "/taskManage", path: "/taskManage",
imgUrl: require("@/assets/workbench/plane-approval.png"), imgUrl: require("@/assets/workbench/plane-approval.png"),
text: "任务审批", text: "任务审批"
}, },
{ {
key:"4", key: "4",
path: "/riskExecution", path: "/riskExecution",
imgUrl: require("@/assets/workbench/rectification-notice.png"), imgUrl: require("@/assets/workbench/rectification-notice.png"),
text: "执行管理", text: "执行管理"
}, },
{ {
key:"5", key: "5",
path: "/riskAssess", path: "/riskAssess",
imgUrl: require("@/assets/workbench/risk-confirm.png"), imgUrl: require("@/assets/workbench/risk-confirm.png"),
text: "风险评估", text: "风险评估"
}, },
{ {
key:"6", key: "6",
path: "/riskApprove", path: "/riskApprove",
imgUrl: require("@/assets/workbench/risk-account.png"), imgUrl: require("@/assets/workbench/risk-account.png"),
text: "风险审批", text: "风险审批"
}, },
{ {
key:"7", key: "7",
path: "/riskLedger", path: "/riskLedger",
imgUrl: require("@/assets/workbench/danger-account.png"), imgUrl: require("@/assets/workbench/danger-account.png"),
text: "风险台账", text: "风险台账"
},], }
finalRiskList:[], ],
finalRiskList: [],
images: [ images: [
{ {
url: require('@/assets/workbench/u47.png'), url: require("@/assets/workbench/u47.png")
}, },
{ {
url: require('@/assets/workbench/u51.png'), url: require("@/assets/workbench/u51.png")
}, },
{ {
url: require('@/assets/workbench/u55.png'), url: require("@/assets/workbench/u55.png")
}, }
] ]
}; };
}, },
created() { created() {},
},
mounted() { mounted() {
// this.getMenuList(); // this.getMenuList();
this.workBenchList(); this.workBenchList();
}, },
methods: { methods: {
//查询角色菜单列表 //查询角色菜单列表
getMenuList() { getMenuList() {
getFun('/menu/roleMenuTreeselect').then((res) => { getFun("/menu/roleMenuTreeselect")
this.riskList = res.list .then(res => {
this.riskList.forEach((item, index) => { this.riskList = res.list;
item.children.forEach((i, k) => { this.riskList.forEach((item, index) => {
let data = this.riskList2.find((y) => y.text == i.menuName) item.children.forEach((i, k) => {
if (data) { let data = this.riskList2.find(y => y.text == i.menuName);
i.icon = data.imgUrl if (data) {
} i.icon = data.imgUrl;
}) }
});
});
})
.catch(err => {
console.log("err==>>", err);
}); });
console.log('this.riskList==>>', this.riskList)
}).catch((err) => {
console.log('err==>>', err)
})
}, },
workBenchList() { workBenchList() {
getFun(`/menu/getMenu`).then(res => { getFun(`/menu/getMenu`).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.powerObj = res.data; this.powerObj = res.data;
if (this.powerObj.风险评估管理) { if (this.powerObj.风险评估管理) {
this.finalRiskList = [ this.finalRiskList = [...this.riskList].filter(x =>
...this.riskList [...this.powerObj.风险评估管理].some(y => `/${y.path}` == x.path)
].filter((x) =>
[...this.powerObj.风险评估管理].some(
(y) => (`/${y.path}`) == x.path
)
); );
} else { } else {
this.finalRiskList = []; this.finalRiskList = [];
} }
console.log(this.finalRiskList)
} else { } else {
this.powerObj = {} this.powerObj = {};
} }
}); });
}, },
onSearch() { onSearch() {},
},
createdClick() { createdClick() {
this.$router.push('/create-task') this.$router.push("/create-task");
}, },
dangerJump(path) { dangerJump(path) {
if (path) { if (path) {
if (path == '/add-danger') { if (path == "/add-danger") {
sessionStorage.removeItem('obj') sessionStorage.removeItem("obj");
this.$router.push({ name: 'add-danger', params: { isWorkbenchTo: 1 } }); this.$router.push({
name: "add-danger",
params: { isWorkbenchTo: 1 }
});
} else { } else {
this.$router.push(path); this.$router.push(path);
} }
} }
}, }
} }
}; };
</script> </script>
......
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