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

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

parents fddcc558 4a105568
<template> <template>
<div style="width:100%"> <div style="width:100%">
<LHeader :text="text"></LHeader>
<!-- 搜索 --> <!-- 搜索 -->
<div class="content-wrap"> <div class="content-wrap">
<!-- <div class="search-wrap"> <!-- <div class="search-wrap">
...@@ -70,7 +69,6 @@ ...@@ -70,7 +69,6 @@
</template> </template>
<script> <script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table"; import { getFun, postFun } from "@/service/table";
import { getUserInfo } from "@/utils/userInfo"; import { getUserInfo } from "@/utils/userInfo";
import { debounce } from "@/utils/common.js"; import { debounce } from "@/utils/common.js";
...@@ -78,9 +76,6 @@ import { Toast } from "vant"; ...@@ -78,9 +76,6 @@ import { Toast } from "vant";
export default { export default {
name: "select-people", name: "select-people",
components: {
LHeader
},
created() { created() {
this.getInsideUser(getUserInfo().secondaryUnit); this.getInsideUser(getUserInfo().secondaryUnit);
}, },
...@@ -106,7 +101,7 @@ export default { ...@@ -106,7 +101,7 @@ export default {
this.resultName = this.allDeptList.find( this.resultName = this.allDeptList.find(
item => item.deptId == this.result item => item.deptId == this.result
).deptName; ).deptName;
this.$emit("changeDept", this.result); this.$emit("changeDept", this.result, this.resultName);
}, },
// 查询内部人员 // 查询内部人员
getInsideUser(id, val) { getInsideUser(id, val) {
......
...@@ -86,8 +86,8 @@ ...@@ -86,8 +86,8 @@
<van-field <van-field
required required
clickable clickable
name="deptId" name="deptName"
:value="form.deptId" :value="form.deptName"
label="评估小组选择" label="评估小组选择"
placeholder="请选择" placeholder="请选择"
@click="selectDept()" @click="selectDept()"
...@@ -430,9 +430,10 @@ export default { ...@@ -430,9 +430,10 @@ export default {
selectDept() { selectDept() {
this.projectDept = true; this.projectDept = true;
}, },
changeDept(id) { changeDept(id, name) {
console.log(id); console.log(id);
this.form.deptId = id; this.form.deptId = id;
this.form.deptName = name;
}, },
closeDept() { closeDept() {
console.log(this.form.deptId); console.log(this.form.deptId);
......
This diff is collapsed.
...@@ -175,6 +175,7 @@ export default { ...@@ -175,6 +175,7 @@ export default {
// buildingId: item.buildingId // buildingId: item.buildingId
} }
}); });
sessionStorage.setItem("pathAuth", "riskApprove");
sessionStorage.setItem("planId", item.id); sessionStorage.setItem("planId", item.id);
sessionStorage.setItem("buildingId", ""); sessionStorage.setItem("buildingId", "");
} }
......
...@@ -278,20 +278,10 @@ export default { ...@@ -278,20 +278,10 @@ export default {
} }
}); });
sessionStorage.setItem("planId", item.id); sessionStorage.setItem("planId", item.id);
sessionStorage.setItem("pathAuth", "riskAssess");
sessionStorage.setItem("buildingId", item.buildingId); sessionStorage.setItem("buildingId", item.buildingId);
this.showIndex = false; this.showIndex = false;
}, },
// 详情
goDetail(data) {
this.$router.push({
name: "riskBigDetail",
params: {
id: data.businessId || data.id
}
});
this.showIndex = false;
},
// 确认 // 确认
goConfirm(data) { goConfirm(data) {
this.$router.push({ this.$router.push({
......
...@@ -40,20 +40,24 @@ ...@@ -40,20 +40,24 @@
:key="index" :key="index"
@click="touchstart(index, item)" @click="touchstart(index, item)"
> >
<div style="font-size: 0.45rem;padding: 5px 0;">{{item.name}}</div> <div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.name }}
</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">{{timestampToTimes(item.startTime)||item.startTime }}</van-col> <van-col span="15">{{
timestampToTimes(item.startTime) || item.startTime
}}</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.leaderUserName }}</van-col> <van-col span="15">{{ item.leaderUserName }}</van-col>
</van-row> </van-row>
</van-col> </van-col>
<van-col span="7" :style="{'color':'#03b615'}"> <van-col span="7" :style="{ color: '#03b615' }">
{{ item.state }} {{ item.state }}
</van-col> </van-col>
</van-row> </van-row>
...@@ -67,7 +71,6 @@ ...@@ -67,7 +71,6 @@
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null"> <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
> >
<!-- <van-button round type="info" @click="goConfirm(item)" v-show="active==0" <!-- <van-button round type="info" @click="goConfirm(item)" v-show="active==0"
...@@ -84,86 +87,87 @@ ...@@ -84,86 +87,87 @@
position: fixed; position: fixed;
top: 30%; top: 30%;
" "
v-if="messageList['length']==0" v-if="messageList['length'] == 0"
> >
暂无数据 暂无数据
</div> </div>
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<!-- {{messageList}} --> <!-- {{messageList}} -->
</van-tab> </van-tab>
</van-tabs> </van-tabs>
<div style="width: 60px;position: fixed;right: 5%;top: 80%;" @click="handadd"> <div
<img src="@/assets/accidentIcon/add.svg" alt="" width="100%" > style="width: 60px;position: fixed;right: 5%;top: 80%;"
@click="handadd"
>
<img src="@/assets/accidentIcon/add.svg" alt="" width="100%" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { timestampToTime, generateId } from "@/utils/format"; import { timestampToTime, generateId } from "@/utils/format";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
// import { postriskConList } from "@/service/risk"; // import { postriskConList } from "@/service/risk";
export default { export default {
name:'risk-confirme', name: "risk-confirme",
components: { components: {
LHeader, LHeader
}, },
data() { data() {
return { return {
text: "任务管理", text: "任务管理",
searchValue: "", searchValue: "",
isHaveNews: false, isHaveNews: false,
messageList: [ messageList: [],
],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层, showIndex: null, // 是否显示遮罩层,
active: 0, active: 0,
tabs: [ tabs: [
{ {
title: "待执行", title: "待执行",
api: "/risk/plan/create/list?status=wait", api: "/risk/plan/create/list?status=wait"
}, },
{ {
title: "执行中", title: "执行中",
api: "/risk/plan/create/list?status=running", api: "/risk/plan/create/list?status=running"
}, },
{ {
title: "已执行", title: "已执行",
api: "/risk/plan/create/list?status=finish", api: "/risk/plan/create/list?status=finish"
}, }
], ]
}; };
}, },
created() { created() {
this.postList(); this.postList();
}, },
methods: { methods: {
timestampToTimes(time){ timestampToTimes(time) {
return timestampToTime(new Date(time),"DT1", true) return timestampToTime(new Date(time), "DT1", true);
}, },
handadd(){ handadd() {
this.$router.push({ this.$router.push({
name: "riskAdd", name: "riskAdd",
params: { params: {
title:'新增' title: "新增"
}, }
}) });
}, },
postList(select = "") { postList(select = "") {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0, duration: 0
}); });
// let formdata = new FormData(); // let formdata = new FormData();
// formdata.append("select", select); // formdata.append("select", select);
getFun(this.tabs[this.active]['api']) getFun(this.tabs[this.active]["api"])
.then((res) => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList =res.data||res.rows; this.messageList = res.data || res.rows;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
...@@ -191,10 +195,11 @@ ...@@ -191,10 +195,11 @@
this.$router.push({ this.$router.push({
name: "riskTaskList", name: "riskTaskList",
params: { params: {
id: data.businessId ||data.id, id: data.businessId || data.id
}, }
}); });
sessionStorage.setItem('planId',data.id) sessionStorage.setItem("pathAuth", "riskManage");
sessionStorage.setItem("planId", data.id);
this.showIndex = null; this.showIndex = null;
}, },
// 确认 // 确认
...@@ -202,22 +207,21 @@ ...@@ -202,22 +207,21 @@
this.$router.push({ this.$router.push({
name: "risk-affirm", name: "risk-affirm",
params: { params: {
data: data, data: data
}, }
}); });
this.showIndex = null; this.showIndex = null;
}, }
}, }
}; };
</script> </script>
<style lang="less" scoped>
#app { <style lang="less" scoped>
#app {
font-family: ""; font-family: "";
color: #2c3e50; color: #2c3e50;
} }
.con-list { .con-list {
padding: 0; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
...@@ -245,9 +249,8 @@ ...@@ -245,9 +249,8 @@
} }
} }
} }
} }
/deep/.van-tab__pane{ /deep/.van-tab__pane {
min-height: 8rem; min-height: 8rem;
} }
</style> </style>
\ No newline at end of file
...@@ -4,29 +4,32 @@ ...@@ -4,29 +4,32 @@
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
</van-sticky> </van-sticky>
<div class="section"> <div class="section">
<van-tabs v-model="activeName" color="#2980f7" animated > <van-tabs v-model="activeName" color="#2980f7" animated>
<van-tab title="固有风险信息" name="a"> <van-tab title="固有风险信息" name="a">
</van-tab> </van-tab>
<van-tab title="现状风险" name="b"> <van-tab title="现状风险" name="b">
<van-cell-group <div class="quolist">
inset <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">
v-for="(item, index) in quoRiskList"
:key="index"
>
<div style="font-size: 0.45rem;padding: 5px 0;"> <div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.name }} {{ item.name }}
</div> </div>
<van-row gutter=""> <van-row gutter="4">
<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.leaderUserName }}</van-col> <van-col span="15">{{ item.coefficient }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">创建时间:</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>
<van-col span="15">{{ <van-col span="15">{{
timestampToTimes(item.startTime) item.describe
}}</van-col> }}</van-col>
</van-row> </van-row>
</van-col> </van-col>
...@@ -34,20 +37,21 @@ ...@@ -34,20 +37,21 @@
<van-row> <van-row>
{{ item.state }} {{ item.state }}
</van-row> </van-row>
<van-row> <van-row type="flex" style="flex-direction: column;align-items: center;">
<van-button <van-col>
type="info" <van-image round width="34" height="34" src="https://img01.yzcdn.cn/vant/cat.jpeg" />
size="mini" </van-col>
@click="todetail(index, item)" <van-col>
>{{ active == 2 ? "去处理" : "去审批" }}</van-button {{ item.userName }}
> </van-col>
</van-row> </van-row>
</van-col> </van-col>
</van-row> </van-row>
</van-cell-group> </van-cell-group>
</div>
</van-tab> </van-tab>
<van-tab title="四色图" name="c"> <van-tab title="四色图" name="c">
<drawCanvas/> <drawCanvas />
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
...@@ -58,33 +62,43 @@ ...@@ -58,33 +62,43 @@
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import drawCanvas from '@/views/drawCanvas/riskView.vue' import drawCanvas from '@/views/drawCanvas/riskView.vue'
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { timestampToTime } from "@/utils/format";
export default { export default {
name: 'taskDetail', name: 'taskDetail',
data() { data() {
return { return {
text: "固有风险列表", text: "固有风险列表",
activeName: 'a', activeName: 'a',
quoRiskList:[],//现状风险列表 quoRiskList: [],//现状风险列表
InherentRisk:[],//固有风险 InherentRisk: [],//固有风险
inherentId:'' inherentId: ''
} }
}, },
components: { components: {
LHeader, LHeader,
drawCanvas drawCanvas
}, },
created(){ created() {
this.inherentId = this.$route.params.id this.inherentId = this.$route.params.id
}, },
mounted() { mounted() {
this.getInherentRiskList(this.$route.params.id)
this.getQuoRiskList(this.$route.params.id) this.getQuoRiskList(this.$route.params.id)
}, },
methods: { methods: {
getQuoRiskList(inherentId){ getInherentRiskList(inherentId){
getFun(`/risk/plan/existing/list/${inherentId}`).then(res=>{ getFun(`/risk/plan/inherent/details/${inherentId}`).then(res=>{
console.log(res.data,'lllll')
})
},
getQuoRiskList(inherentId) {
getFun(`/risk/plan/existing/list/${inherentId}`).then(res => {
this.quoRiskList = res.data this.quoRiskList = res.data
}) })
} },
timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true);
},
}, },
} }
</script> </script>
...@@ -100,4 +114,8 @@ export default { ...@@ -100,4 +114,8 @@ export default {
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
} }
.quolist{
padding: 10px;
box-sizing: border-box;
}
</style> </style>
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