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);
......
...@@ -33,46 +33,127 @@ ...@@ -33,46 +33,127 @@
</div> </div>
</van-grid-item> </van-grid-item>
</van-grid> </van-grid>
<van-steps :active="phase" active-icon="success" active-color="#38f" style="margin: 0.26rem 0;"> <van-steps
<van-step name="1">任务发起</van-step> :active="status"
<van-step name="2">风险评估</van-step> active-icon="success"
<van-step name="3">评估审核</van-step> active-color="#38f"
<van-step name="4">项目完成</van-step> style="margin: 0.26rem 0;"
>
<van-step>任务发起</van-step>
<van-step>风险评估</van-step>
<van-step>评估审核</van-step>
<van-step>项目完成</van-step>
</van-steps> </van-steps>
<van-tabs v-model="active" color="#2980f7" animated :sticky="true" offset-top="2.93rem"> <van-tabs
v-model="active"
color="#2980f7"
animated
:sticky="true"
offset-top="2.93rem"
>
<van-tab title="任务详情"> <van-tab title="任务详情">
<van-form :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit"> <van-form
<van-field readonly name="createUserName" :value="form.createUserName" label="创建人员" input-align="right" :scroll-to-error="true"
:rules="[{ required: true, message: '创建人员不能为空' }]" /> :show-error="false"
<van-field readonly name="createDeptName" :value="form.createDeptName" label="创建单位" input-align="right" validate-trigger="onSubmit"
:rules="[{ required: true, message: '创建单位不能为空' }]" /> >
<van-field readonly name="projectName" :value="form.projectName" label="任务名称" input-align="right" <van-field
:rules="[{ required: true, message: '任务名称不能为空' }]" /> readonly
name="createUserName"
:value="form.createUserName"
label="创建人员"
input-align="right"
:rules="[{ required: true, message: '创建人员不能为空' }]"
/>
<van-field
readonly
name="createDeptName"
:value="form.createDeptName"
label="创建单位"
input-align="right"
:rules="[{ required: true, message: '创建单位不能为空' }]"
/>
<van-field
readonly
name="projectName"
:value="form.projectName"
label="任务名称"
input-align="right"
:rules="[{ required: true, message: '任务名称不能为空' }]"
/>
<van-field readonly name="projectName" :value="form.projectName" label="关联项目" input-align="right" <van-field
:rules="[{ required: true, message: '关联项目不能为空' }]" /> readonly
name="projectName"
:value="form.projectName"
label="关联项目"
input-align="right"
:rules="[{ required: true, message: '关联项目不能为空' }]"
/>
<van-field readonly name="buildingNames" :value="form.buildingNames" label="评估楼栋" input-align="right" <van-field
:rules="[{ required: true, message: '评估楼栋不能为空' }]" /> readonly
name="buildingNames"
:value="form.buildingNames"
label="评估楼栋"
input-align="right"
:rules="[{ required: true, message: '评估楼栋不能为空' }]"
/>
<van-field readonly name="deptName" :value="form.deptName" label="评估小组选择" input-align="right" <van-field
:rules="[{ required: true, message: '评估小组不能为空' }]" /> readonly
name="deptName"
:value="form.deptName"
label="评估小组选择"
input-align="right"
:rules="[{ required: true, message: '评估小组不能为空' }]"
/>
<van-field readonly name="leaderUserName" :value="form.leaderUserName" label="评估小组组长" input-align="right" <van-field
:rules="[{ required: true, message: '评估小组组长不能为空' }]" /> readonly
name="leaderUserName"
:value="form.leaderUserName"
label="评估小组组长"
input-align="right"
:rules="[{ required: true, message: '评估小组组长不能为空' }]"
/>
<van-field clickable name="workUserNames" :value="form.workUserNames" label="评估成员" input-align="right" <van-field
:rules="[{ required: true, message: '评估成员不能为空' }]" /> clickable
name="workUserNames"
:value="form.workUserNames"
label="评估成员"
input-align="right"
:rules="[{ required: true, message: '评估成员不能为空' }]"
/>
<van-field v-model="form.startTime" readonly name="location" label="任务开始时间" input-align="right" :formatter="() => { <van-field
return timestampToTimes(form.startTime); v-model="form.startTime"
} readonly
" :rules="[{ required: true, message: '任务开始时间不能为空' }]" /> name="location"
label="任务开始时间"
input-align="right"
:formatter="
() => {
return timestampToTimes(form.startTime);
}
"
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
/>
<van-field v-model="form.endTime" readonly name="location" label="任务结束时间" :formatter="() => { <van-field
return timestampToTimes(form.endTime); v-model="form.endTime"
} readonly
" input-align="right" :rules="[{ required: true, message: '任务结束时间不能为空' }]" /> name="location"
label="任务结束时间"
:formatter="
() => {
return timestampToTimes(form.endTime);
}
"
input-align="right"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
</van-form> </van-form>
</van-tab> </van-tab>
<van-tab title="风险清单"> <van-tab title="风险清单">
...@@ -84,11 +165,24 @@ ...@@ -84,11 +165,24 @@
</van-dropdown-menu> </van-dropdown-menu>
</van-sticky> </van-sticky>
<div style="overflow-y: auto;"> <div style="overflow-y: auto;">
<van-cell-group inset v-for="(item, index) in riskList" :key="index"> <van-cell-group
<van-row type="flex" justify="space-between" style="margin-top:10px;"> inset
v-for="(item, index) in riskList"
:key="index"
>
<van-row
type="flex"
justify="space-between"
style="margin-top:10px;"
>
<van-col span="22" @click="toRiskDetail(item)"> <van-col span="22" @click="toRiskDetail(item)">
<van-col span="5"> <van-col span="5">
<van-image width="46" height="46" src="https://img01.yzcdn.cn/vant/cat.jpeg" /> <van-image
width="46"
height="46"
src="https://img01.yzcdn.cn/vant/cat.jpeg"
/>
<van-image width="46" height="46" :src="item.avatar" />
</van-col> </van-col>
<van-col span="17"> <van-col span="17">
<van-row gutter=""> <van-row gutter="">
...@@ -98,21 +192,26 @@ ...@@ -98,21 +192,26 @@
</van-col> </van-col>
</van-col> </van-col>
<van-col span="2"> <van-col span="2">
<van-row :style="{ <van-row
color: '#03b615' :style="{
}"> color: '#03b615'
}"
>
<van-icon name="arrow" size="26px" @click="goColorDetail" /> <van-icon name="arrow" size="26px" @click="goColorDetail" />
</van-row> </van-row>
</van-col> </van-col>
</van-row> </van-row>
</van-cell-group> </van-cell-group>
</div> </div>
</van-tab> </van-tab>
<van-tab title="审核记录"> <van-tab title="审核记录">
<div class="journal-wrap"> <div class="journal-wrap">
<van-cell-group inset> <van-cell-group inset>
<van-steps direction="vertical" :active="99999" v-if="riskLogList.length > 0"> <van-steps
direction="vertical"
:active="99999"
v-if="riskLogList.length > 0"
>
<van-step v-for="(item, index) in riskLogList" :key="index"> <van-step v-for="(item, index) in riskLogList" :key="index">
<div class="step-wrap"> <div class="step-wrap">
<van-row> <van-row>
...@@ -123,15 +222,21 @@ ...@@ -123,15 +222,21 @@
</van-col> </van-col>
</van-row> </van-row>
<van-row> <van-row>
<van-col span="7"><span class="field-title">操作人:</span></van-col> <van-col span="7"
><span class="field-title">操作人:</span></van-col
>
<van-col span="17">{{ item.approvalUserName }}</van-col> <van-col span="17">{{ item.approvalUserName }}</van-col>
</van-row> </van-row>
<van-row> <van-row>
<van-col span="7"><span class="field-title">审批结果:</span></van-col> <van-col span="7"
><span class="field-title">审批结果:</span></van-col
>
<van-col span="17">{{ item.taskName }}</van-col> <van-col span="17">{{ item.taskName }}</van-col>
</van-row> </van-row>
<van-row> <van-row>
<van-col span="7"><span class="field-title">岗位:</span></van-col> <van-col span="7"
><span class="field-title">岗位:</span></van-col
>
<van-col span="17">{{ item.taskResult }}</van-col> <van-col span="17">{{ item.taskResult }}</van-col>
</van-row> </van-row>
<!-- <van-row> <!-- <van-row>
...@@ -150,13 +255,15 @@ ...@@ -150,13 +255,15 @@
</div> </div>
</van-tab> </van-tab>
<van-tab title="风险评估报告"> <van-tab title="风险评估报告">
<div style="height: 1.5rem; <div
style="height: 1.5rem;
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #97999a; border-bottom: 1px solid #97999a;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
line-height: 1.5rem; line-height: 1.5rem;
"> "
>
<div><van-icon name="column" size="26px" /></div> <div><van-icon name="column" size="26px" /></div>
<div style="flex-grow:1;line-height: 0.6rem"> <div style="flex-grow:1;line-height: 0.6rem">
<div>风险评估报告.PDF</div> <div>风险评估报告.PDF</div>
...@@ -166,13 +273,15 @@ ...@@ -166,13 +273,15 @@
<van-icon name="arrow" size="26px" /> <van-icon name="arrow" size="26px" />
</div> </div>
</div> </div>
<div style="height: 1.5rem; <div
style="height: 1.5rem;
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #97999a; border-bottom: 1px solid #97999a;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
line-height: 1.5rem; line-height: 1.5rem;
"> "
>
<div><van-icon name="column" size="26px" /></div> <div><van-icon name="column" size="26px" /></div>
<div style="flex-grow:1;line-height: 0.6rem"> <div style="flex-grow:1;line-height: 0.6rem">
<div>风险评估报告.PDF</div> <div>风险评估报告.PDF</div>
...@@ -185,7 +294,9 @@ ...@@ -185,7 +294,9 @@
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
<div style="display: flex; <div
v-show="pathAuth == 'riskAssess' && (status == 0 || status == 1)"
style="display: flex;
justify-content: space-around; justify-content: space-around;
background-color: #fff; background-color: #fff;
border-top: 1px solid #e3e3e3; border-top: 1px solid #e3e3e3;
...@@ -193,8 +304,12 @@ ...@@ -193,8 +304,12 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
position: fixed; position: fixed;
bottom: 0;"> bottom: 0;"
<div @click="performTasks" style="color: #4bced0;font-size: 14px;font-weight: 600;"> >
<div
@click="performTasks"
style="color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;"><van-icon name="plus" /></div> <div style="font-size: 22px;"><van-icon name="plus" /></div>
<div>执行任务</div> <div>执行任务</div>
</div> </div>
...@@ -203,6 +318,64 @@ ...@@ -203,6 +318,64 @@
<div>任务完成</div> <div>任务完成</div>
</div> --> </div> -->
</div> </div>
<div
v-show="pathAuth == 'riskManage' && status == 0"
style="display: flex;
justify-content: space-around;
background-color: #fff;
border-top: 1px solid #e3e3e3;
height: 1.5rem;
width: 100%;
text-align: center;
position: fixed;
bottom: 0;"
>
<div
@click="editTask"
style="color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;">
<van-icon name="edit" />
</div>
<div>修改任务</div>
</div>
<div
@click="delTask"
style="color: #ec808d;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;"><van-icon name="cross" /></div>
<div>删除任务</div>
</div>
</div>
<div
v-show="pathAuth == 'riskApprove' && status == 2"
style="display: flex;
justify-content: space-around;
background-color: #fff;
border-top: 1px solid #e3e3e3;
height: 1.5rem;
width: 100%;
text-align: center;
position: fixed;
bottom: 0;"
>
<div
@click="approveTask"
style="color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;">
<van-icon name="success" />
</div>
<div>审批通过</div>
</div>
<div
@click="unApproveTask"
style="color: #ec808d;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;"><van-icon name="cross" /></div>
<div>审批否决</div>
</div>
</div>
</div> </div>
</template> </template>
...@@ -225,42 +398,51 @@ export default { ...@@ -225,42 +398,51 @@ export default {
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层, showIndex: null, // 是否显示遮罩层,
active: 0, active: 0,
phase: 1, status: 0,
pathAuth: "",
form: {}, form: {},
tabs: [], tabs: [],
riskList: [], riskList: [],
value1: 0, value1: 0,
value2: 'a', value2: "a",
value3: '1', value3: "1",
option1: [ option1: [
{ text: '楼栋', value: 0 }, { text: "楼栋", value: 0 },
{ text: '全部', value: 1 }, { text: "全部", value: 1 }
], ],
option2: [ option2: [
{ text: '楼层', value: 'a' }, { text: "楼层", value: "a" },
{ text: '全部', value: 'b' }, { text: "全部", value: "b" }
], ],
option3: [ option3: [
{ text: '房间', value: '1' }, { text: "房间", value: "1" },
{ text: '全部', value: '2' }, { text: "全部", value: "2" }
], ]
}; };
}, },
created() { created() {
var planId = this.$route.params.id || sessionStorage.getItem("planId"); var planId = this.$route.params.id || sessionStorage.getItem("planId");
var buildingId = var buildingId =
this.$route.params.buildingId || sessionStorage.getItem("buildingId"); this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.pathAuth = sessionStorage.getItem("pathAuth");
this.postList(planId, buildingId); this.postList(planId, buildingId);
this.getRiskTaskList(planId, buildingId) this.getRiskTaskList(planId, buildingId);
}, },
methods: { methods: {
timestampToTimes(time) { timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true); return timestampToTime(new Date(time), "DT2", true);
}, },
//执行任务
performTasks() { performTasks() {
sessionStorage.setItem('buildingId', this.messageList.riskBuildingListDtos[0].buildingId) sessionStorage.setItem(
sessionStorage.setItem('planId', this.messageList.id) "buildingId",
sessionStorage.setItem('buildingName', this.messageList.riskBuildingListDtos[0].buildingName) this.messageList.riskBuildingListDtos[0].buildingId
);
sessionStorage.setItem("planId", this.messageList.id);
sessionStorage.setItem(
"buildingName",
this.messageList.riskBuildingListDtos[0].buildingName
);
this.$router.push({ this.$router.push({
name: "riskInherent", name: "riskInherent",
params: { params: {
...@@ -270,6 +452,26 @@ export default { ...@@ -270,6 +452,26 @@ export default {
} }
}); });
}, },
//修改任务
editTask() {
//TODO 修改任务
console.log("修改任务");
},
//删除任务
delTask() {
//TODO 删除任务
console.log("删除任务");
},
//审批通过
approveTask() {
//TODO 审批通过
console.log("审批通过");
},
//审批否决
unApproveTask() {
//TODO 审批否决
console.log("审批否决");
},
handadd() { handadd() {
this.$router.push({ this.$router.push({
name: "riskAdd", name: "riskAdd",
...@@ -280,10 +482,12 @@ export default { ...@@ -280,10 +482,12 @@ export default {
}, },
//风险清单列表 //风险清单列表
getRiskTaskList(planId, buildingId) { getRiskTaskList(planId, buildingId) {
getFun(`/risk/plan/inherent/list/${planId}/${buildingId}`).then(res => { if (buildingId) {
console.log(res.data, 'lll') getFun(`/risk/plan/inherent/list/${planId}/${buildingId}`).then(res => {
this.riskList = res.data console.log(res.data, "lll");
}) this.riskList = res.data;
});
}
}, },
postList(id, buildingId) { postList(id, buildingId) {
console.log(buildingId, "123"); console.log(buildingId, "123");
...@@ -302,6 +506,30 @@ export default { ...@@ -302,6 +506,30 @@ export default {
console.log(this.messageList); console.log(this.messageList);
this.form = this.messageList.detailsDto; this.form = this.messageList.detailsDto;
this.riskLogList = this.messageList.approveListDtos; this.riskLogList = this.messageList.approveListDtos;
console.log(this.messageList.statusKey, 111);
switch (this.messageList.statusKey) {
case "CREATE_TASK":
case "WAIT_START":
case "WAIT_RETURN":
this.status = 0;
break;
case "CREATE_TASK":
case "WAIT_LEADER_RETURN":
case "PROJECT_REPORT":
this.status = 1;
break;
case "WAIT_APPROVE":
case "FINISH":
this.status = 2;
break;
case "REVOKE":
case "FINISH":
this.status = 3;
break;
default:
this.status = 0;
break;
}
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
...@@ -324,7 +552,7 @@ export default { ...@@ -324,7 +552,7 @@ export default {
this.$router.push({ this.$router.push({
name: "risk-big-detail", name: "risk-big-detail",
params: { params: {
id: data.businessId || data.id, id: data.businessId || data.id
} }
}); });
this.showIndex = null; this.showIndex = null;
...@@ -341,7 +569,7 @@ export default { ...@@ -341,7 +569,7 @@ export default {
}, },
//固定资产 //固定资产
goColorDetail() { goColorDetail() {
// 楼层id: floorId // 楼层id: floorId
// 是否查看 : isView: true/false (true:查看,false:添加) // 是否查看 : isView: true/false (true:查看,false:添加)
this.$router.push({ this.$router.push({
name: "riskView", name: "riskView",
...@@ -349,17 +577,17 @@ export default { ...@@ -349,17 +577,17 @@ export default {
floorId: 18, floorId: 18,
isView: true isView: true
} }
}) });
}, },
//风险清单列表点击 //风险清单列表点击
toRiskDetail(item) { toRiskDetail(item) {
console.log(item,'LLLL') console.log(item, "LLLL");
this.$router.push({ this.$router.push({
name:"taskDetail", name: "taskDetail",
params:{ params: {
id:item.id id: item.id
} }
}) });
} }
} }
}; };
......
...@@ -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({
......
<template> <template>
<!-- 提交 --> <!-- 提交 -->
<div> <div>
<van-sticky offset-top="0"> <van-sticky offset-top="0">
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
</van-sticky> </van-sticky>
<div style="margin-bottom: 1.5rem;"> <div style="margin-bottom: 1.5rem;">
<van-grid :column-num="3" style="background-color: #fff;"> <van-grid :column-num="3" style="background-color: #fff;">
<van-grid-item > <van-grid-item>
<div>发起人员:</div> <div>发起人员:</div>
<div>{{messageList.createUserName}}</div> <div>{{ messageList.createUserName }}</div>
</van-grid-item> </van-grid-item>
<van-grid-item > <van-grid-item>
<div>项目负责人:</div> <div>项目负责人:</div>
<div>{{messageList.leaderUserName}}</div> <div>{{ messageList.leaderUserName }}</div>
</van-grid-item> </van-grid-item>
<van-grid-item > <van-grid-item>
<div>任务状态:</div> <div>任务状态:</div>
<div>{{messageList.status}}</div> <div>{{ messageList.status }}</div>
</van-grid-item> </van-grid-item>
<van-grid-item > <van-grid-item>
<div>开始时间:</div> <div>开始时间:</div>
<div>{{timestampToTimes(messageList.startTime)||messageList.startTime}}</div> <div>
{{
timestampToTimes(messageList.startTime) || messageList.startTime
}}
</div>
</van-grid-item> </van-grid-item>
<van-grid-item > <van-grid-item>
<div>结束时间:</div> <div>结束时间:</div>
<div>{{timestampToTimes(messageList.endTime)||messageList.endTime}}</div> <div>
{{ timestampToTimes(messageList.endTime) || messageList.endTime }}
</div>
</van-grid-item> </van-grid-item>
</van-grid> </van-grid>
<van-steps :active="active" active-icon="success" active-color="#38f" style="margin: 0.26rem 0;"> <van-steps
:active="active"
active-icon="success"
active-color="#38f"
style="margin: 0.26rem 0;"
>
<van-step>任务发起</van-step> <van-step>任务发起</van-step>
<van-step>风险评估</van-step> <van-step>风险评估</van-step>
<van-step>评估审核</van-step> <van-step>评估审核</van-step>
<van-step>项目完成</van-step> <van-step>项目完成</van-step>
</van-steps> </van-steps>
<van-tabs v-model="active" color="#2980f7" <van-tabs
v-model="active"
color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="2.93rem"> offset-top="2.93rem"
>
<van-tab title="任务详情"> <van-tab title="任务详情">
<van-form <van-form
:scroll-to-error="true" :scroll-to-error="true"
:show-error="false" :show-error="false"
validate-trigger="onSubmit" validate-trigger="onSubmit"
> >
<van-field <van-field
readonly readonly
name="createUserName" name="createUserName"
:value="form.createUserName" :value="form.createUserName"
label="创建人员" label="创建人员"
input-align="right" input-align="right"
:rules="[{ required: true, message: '创建人员不能为空' }]" :rules="[{ required: true, message: '创建人员不能为空' }]"
/> />
<van-field <van-field
readonly readonly
name="createDeptName" name="createDeptName"
:value="form.createDeptName" :value="form.createDeptName"
label="创建单位" label="创建单位"
input-align="right" input-align="right"
:rules="[{ required: true, message: '创建单位不能为空' }]" :rules="[{ required: true, message: '创建单位不能为空' }]"
/> />
<van-field <van-field
readonly readonly
name="projectName" name="projectName"
:value="form.projectName" :value="form.projectName"
label="任务名称" label="任务名称"
input-align="right" input-align="right"
:rules="[{ required: true, message: '任务名称不能为空' }]" :rules="[{ required: true, message: '任务名称不能为空' }]"
/> />
<van-field <van-field
readonly readonly
name="projectName" name="projectName"
:value="form.projectName" :value="form.projectName"
label="关联项目" label="关联项目"
input-align="right" input-align="right"
:rules="[{ required: true, message: '关联项目不能为空' }]" :rules="[{ required: true, message: '关联项目不能为空' }]"
/> />
<van-field <van-field
readonly readonly
name="buildingNames" name="buildingNames"
:value="form.buildingNames" :value="form.buildingNames"
label="评估楼栋" label="评估楼栋"
input-align="right" input-align="right"
:rules="[{ required: true, message: '评估楼栋不能为空' }]" :rules="[{ required: true, message: '评估楼栋不能为空' }]"
/> />
<van-field <van-field
readonly readonly
name="leaderUserName" name="leaderUserName"
:value="form.leaderUserName" :value="form.leaderUserName"
label="项目负责人" label="项目负责人"
input-align="right" input-align="right"
:rules="[{ required: true, message: '事故类型不能为空' }]" :rules="[{ required: true, message: '事故类型不能为空' }]"
/> />
<van-field <van-field
v-model="form.startTime" v-model="form.startTime"
readonly readonly
name="location" name="location"
label="任务开始时间" label="任务开始时间"
input-align="right" input-align="right"
:formatter="()=>{ :formatter="
return timestampToTimes(form.startTime) () => {
}" return timestampToTimes(form.startTime);
:rules="[{ required: true, message: '任务开始时间不能为空' }]" }
"
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
/> />
<van-field <van-field
v-model="form.endTime" v-model="form.endTime"
readonly readonly
name="location" name="location"
label="任务结束时间" label="任务结束时间"
:formatter="()=>{ :formatter="
return timestampToTimes(form.endTime) () => {
}" return timestampToTimes(form.endTime);
input-align="right" }
:rules="[{ required: true, message: '任务结束时间不能为空' }]" "
input-align="right"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/> />
<van-field <van-field
clickable clickable
name="workUserNames" name="workUserNames"
:value="form.workUserNames" :value="form.workUserNames"
label="执行人员" label="执行人员"
input-align="right" input-align="right"
:rules="[{ required: true, message: '执行人员不能为空' }]" :rules="[{ required: true, message: '执行人员不能为空' }]"
/> />
</van-form> </van-form>
</van-tab>
<van-tab title="风险清单">
</van-tab> </van-tab>
<van-tab title="风险清单"> </van-tab>
<van-tab title="审核记录"> <van-tab title="审核记录">
<div class="journal-wrap"> <div class="journal-wrap">
<van-cell-group inset > <van-cell-group inset>
<van-steps direction="vertical" :active="99999" v-if="riskLogList.length>0"> <van-steps
<van-step v-for="(item, index) in riskLogList" :key="index"> direction="vertical"
<div class="step-wrap"> :active="99999"
<van-row> v-if="riskLogList.length > 0"
<van-col span="24"><div class="info-title">{{timestampToTimes(item.startTime)}}</div></van-col> >
</van-row> <van-step v-for="(item, index) in riskLogList" :key="index">
<van-row> <div class="step-wrap">
<van-col span="7" <van-row>
><span class="field-title">操作人:</span></van-col <van-col span="24"
> ><div class="info-title">
<van-col span="17">{{item.approvalUserName}}</van-col> {{ timestampToTimes(item.startTime) }}
</van-row> </div></van-col
<van-row> >
<van-col span="7" </van-row>
><span class="field-title">审批结果:</span></van-col <van-row>
> <van-col span="7"
<van-col span="17">{{item.taskName}}</van-col> ><span class="field-title">操作人:</span></van-col
</van-row> >
<van-row> <van-col span="17">{{ item.approvalUserName }}</van-col>
<van-col span="7" </van-row>
><span class="field-title">岗位:</span></van-col <van-row>
> <van-col span="7"
<van-col span="17">{{item.taskResult}}</van-col> ><span class="field-title">审批结果:</span></van-col
</van-row> >
<!-- <van-row> <van-col span="17">{{ item.taskName }}</van-col>
</van-row>
<van-row>
<van-col span="7"
><span class="field-title">岗位:</span></van-col
>
<van-col span="17">{{ item.taskResult }}</van-col>
</van-row>
<!-- <van-row>
<van-col span="7" <van-col span="7"
><span class="field-title">结果:</span></van-col ><span class="field-title">结果:</span></van-col
> >
<van-col span="17">{{LogType(item.taskResult)}}</van-col> <van-col span="17">{{LogType(item.taskResult)}}</van-col>
</van-row> --> </van-row> -->
</div> </div>
</van-step> </van-step>
</van-steps> </van-steps>
<div style="text-align: center;" v-if="riskLogList.length == 0">暂无数据</div> <div style="text-align: center;" v-if="riskLogList.length == 0">
</van-cell-group> 暂无数据
</div> </div>
</van-cell-group>
</div>
</van-tab> </van-tab>
<van-tab title="风险评估报告"> <van-tab title="风险评估报告">
<div style="height: 1.5rem; <div
style="height: 1.5rem;
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #97999a; border-bottom: 1px solid #97999a;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
line-height: 1.5rem; line-height: 1.5rem;
"> "
<div><van-icon name="column" size="26px"/></div> >
<div style="flex-grow:1;line-height: 0.6rem"> <div><van-icon name="column" size="26px" /></div>
<div>风险评估报告.PDF</div> <div style="flex-grow:1;line-height: 0.6rem">
<div>2019-3-21 10:23 100KB</div> <div>风险评估报告.PDF</div>
</div> <div>2019-3-21 10:23 100KB</div>
<div> </div>
<van-icon name="arrow" size="26px"/> <div>
</div> <van-icon name="arrow" size="26px" />
</div>
</div> </div>
<div style="height: 1.5rem; <div
style="height: 1.5rem;
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #97999a; border-bottom: 1px solid #97999a;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
line-height: 1.5rem; line-height: 1.5rem;
"> "
<div><van-icon name="column" size="26px"/></div> >
<div style="flex-grow:1;line-height: 0.6rem"> <div><van-icon name="column" size="26px" /></div>
<div>风险评估报告.PDF</div> <div style="flex-grow:1;line-height: 0.6rem">
<div>2019-3-21 10:23 100KB</div> <div>风险评估报告.PDF</div>
</div> <div>2019-3-21 10:23 100KB</div>
<div> </div>
<van-icon name="arrow" size="26px"/> <div>
</div> <van-icon name="arrow" size="26px" />
</div>
</div> </div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
<div style="display: flex; <div
style="display: flex;
justify-content: space-around; justify-content: space-around;
background-color: #fff; background-color: #fff;
border-top: 1px solid #e3e3e3; border-top: 1px solid #e3e3e3;
...@@ -216,172 +247,160 @@ ...@@ -216,172 +247,160 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
position: fixed; position: fixed;
bottom: 0;"> bottom: 0;"
<div @click="performTasks" style="color: #4bced0;font-size: 14px;font-weight: 600;"> >
<div style="font-size: 22px;"><van-icon name="plus" /></div> <div
<div>执行任务</div> @click="performTasks"
</div> style="color: #4bced0;font-size: 14px;font-weight: 600;"
<!-- <div style="color: #ec808d;font-size: 14px;font-weight: 600;"> >
<div style="font-size: 22px;"><van-icon name="plus" /></div>
<div>执行任务</div>
</div>
<!-- <div style="color: #ec808d;font-size: 14px;font-weight: 600;">
<div style="font-size: 22px;"><van-icon name="success" /></div> <div style="font-size: 22px;"><van-icon name="success" /></div>
<div>任务完成</div> <div>任务完成</div>
</div> --> </div> -->
</div>
</div> </div>
</template> </div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { timestampToTime, generateId } from "@/utils/format";
import { getFun, postFun } from "@/service/table.js";
export default {
name:'riskBigDetail',
components: {
LHeader,
},
data() {
return {
text: "任务单",
searchValue: "",
isHaveNews: false,
messageList: [],
riskLogList:[],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
active: 0,
form:{
}, <script>
tabs: [ import LHeader from "@/components/header.vue";
], import { timestampToTime, generateId } from "@/utils/format";
}; import { getFun, postFun } from "@/service/table.js";
export default {
name: "riskBigDetail",
components: {
LHeader
},
data() {
return {
text: "任务单",
searchValue: "",
isHaveNews: false,
messageList: [],
riskLogList: [],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
active: 0,
form: {},
tabs: []
};
},
created() {
var planId = this.$route.params.id || sessionStorage.getItem("planId");
this.postList(planId);
},
methods: {
timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true);
}, },
created() { performTasks() {
var planId=this.$route.params.id || sessionStorage.getItem('planId') this.$router.push({
this.postList(planId); name: "riskInherent",
params: {
id: this.messageList.id
}
});
}, },
methods: { handadd() {
timestampToTimes(time){ this.$router.push({
return timestampToTime(new Date(time),"DT2", true) name: "riskAdd",
}, params: {
performTasks(){ title: "新增"
this.$router.push({
name: "riskInherent",
params: {
id:this.messageList.id
},
})
},
handadd(){
this.$router.push({
name: "riskAdd",
params: {
title:'新增'
},
})
},
postList(id) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
getFun(`/risk/plan/details/${id}`)
.then((res) => {
this.$toast.clear();
this.messageList =res.data||res.rows;
this.form= this.messageList.detailsDto
this.riskLogList= this.messageList.approveListDtos
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
onSearch(val) {
this.postList(this.searchValue);
},
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return;
} }
this.showIndex = index; });
}, },
// 详情 postList(id) {
goDetail(data) { this.$toast.loading({
this.$router.push({ message: "加载中...",
name: "riskBigDetail", forbidClick: true,
params: { loadingType: "spinner",
id: data.businessId||data.id, duration: 0
}, });
}); getFun(`/risk/plan/details/${id}`)
sessionStorage.setItem('planId',data.id) .then(res => {
this.showIndex = null; this.$toast.clear();
}, this.messageList = res.data || res.rows;
// 确认 this.form = this.messageList.detailsDto;
goConfirm(data) { this.riskLogList = this.messageList.approveListDtos;
this.$router.push({ })
name: "risk-affirm", .catch(() => {
params: { this.$toast.clear();
data: data, this.$toast.fail("加载失败,请稍后再试");
},
}); });
this.showIndex = null;
},
}, },
};
</script>
<style lang="less" scoped>
#app { onSearch(val) {
font-family: ""; this.postList(this.searchValue);
color: #2c3e50 },
} touchstart(index, item) {
if (this.showIndex != null) {
.cell-wrap { this.showIndex = null;
position: relative; return;
}
p {
font-size: 0.4rem;
font-weight: none;
padding-left: 0.16rem;
margin: 0.186667rem 0;
color: #7f7f7f;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
} }
this.showIndex = index;
},
// 确认
goConfirm(data) {
this.$router.push({
name: "risk-affirm",
params: {
data: data
}
});
this.showIndex = null;
} }
.journal-wrap { }
position: relative; };
} </script>
.supervise-wrap { <style lang="less" scoped>
position: relative; #app {
} font-family: "";
.info-title { color: #2c3e50;
color: #2980f7; }
font-weight: none;
} .cell-wrap {
.field-title { position: relative;
color: black; }
font-weight: none; p {
} font-size: 0.4rem;
.more { font-weight: none;
position: absolute; padding-left: 0.16rem;
bottom: 0.32rem; margin: 0.186667rem 0;
right: 15px; color: #7f7f7f;
color: #2a80f7; }
font-weight: none; .van-cell-group--inset {
z-index: 99; margin: 0;
} margin-bottom: 10px;
</style> padding: 10px;
font-size: 13px;
\ No newline at end of file position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: none;
}
.field-title {
color: black;
font-weight: none;
}
.more {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: none;
z-index: 99;
}
</style>
<template> <template>
<!-- 提交 --> <!-- 提交 -->
<div> <div>
<van-sticky offset-top="0"> <van-sticky offset-top="0">
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
</van-sticky> </van-sticky>
<van-sticky offset-top="1.5rem"> <van-sticky offset-top="1.5rem">
<van-search <van-search
v-model="searchValue" v-model="searchValue"
show-action show-action
placeholder="请输入搜索内容" placeholder="请输入搜索内容"
@search="onSearch" @search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
</van-sticky>
<van-tabs
v-model="active"
@change="
postList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <template #action>
<!-- 内容列表 --> <div @click="onSearch">搜索</div>
<div </template>
class="con-list" </van-search>
@touchmove="showIndex = null" </van-sticky>
v-if="key == active" <van-tabs
v-model="active"
@change="
postList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 -->
<div
class="con-list"
@touchmove="showIndex = null"
v-if="key == active"
>
<van-cell-group
inset
v-for="(item, index) in messageList"
:key="index"
@click="touchstart(index, item)"
> >
<van-cell-group <div style="font-size: 0.45rem;padding: 5px 0;">
inset {{ item.name }}
v-for="(item, index) in messageList" </div>
:key="index"
@click="touchstart(index, item)"
>
<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">{{
</van-row> timestampToTimes(item.startTime) || item.startTime
<van-row gutter=""> }}</van-col>
<van-col span="9">处理人员:</van-col> </van-row>
<van-col span="15">{{ item.leaderUserName }}</van-col> <van-row gutter="">
</van-row> <van-col span="9">处理人员:</van-col>
</van-col> <van-col span="15">{{ item.leaderUserName }}</van-col>
<van-col span="7" :style="{'color':'#03b615'}"> </van-row>
{{ item.state }} </van-col>
</van-col> <van-col span="7" :style="{ color: '#03b615' }">
</van-row> {{ item.state }}
</van-col>
</van-row>
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="7">风险源:</van-col> <van-col span="7">风险源:</van-col>
<van-col span="17">{{ item.riskSource }}</van-col> <van-col span="17">{{ item.riskSource }}</van-col>
</van-row> --> </van-row> -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<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"
>确认</van-button >确认</van-button
> --> > -->
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
<div <div
style=" style="
width: 100%; width: 100%;
text-align: center; text-align: center;
...@@ -84,170 +87,170 @@ ...@@ -84,170 +87,170 @@
position: fixed; position: fixed;
top: 30%; top: 30%;
" "
v-if="messageList['length']==0" v-if="messageList['length'] == 0"
> >
暂无数据 暂无数据
</div> </div>
</div>
<!-- 暂无数据 -->
<!-- {{messageList}} -->
</van-tab>
</van-tabs>
<div style="width: 60px;position: fixed;right: 5%;top: 80%;" @click="handadd">
<img src="@/assets/accidentIcon/add.svg" alt="" width="100%" >
</div> </div>
<!-- 暂无数据 -->
<!-- {{messageList}} -->
</van-tab>
</van-tabs>
<div
style="width: 60px;position: fixed;right: 5%;top: 80%;"
@click="handadd"
>
<img src="@/assets/accidentIcon/add.svg" alt="" width="100%" />
</div> </div>
</template> </div>
</template>
<script>
import LHeader from "@/components/header.vue"; <script>
import { timestampToTime, generateId } from "@/utils/format"; import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js"; import { timestampToTime, generateId } from "@/utils/format";
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: "执行中",
api: "/risk/plan/create/list?status=running",
},
{
title: "已执行",
api: "/risk/plan/create/list?status=finish",
},
],
};
},
created() {
this.postList();
},
methods: {
timestampToTimes(time){
return timestampToTime(new Date(time),"DT1", true)
},
handadd(){
this.$router.push({
name: "riskAdd",
params: {
title:'新增'
},
})
}, },
postList(select = "") { {
this.$toast.loading({ title: "执行中",
message: "加载中...", api: "/risk/plan/create/list?status=running"
forbidClick: true, },
loadingType: "spinner", {
duration: 0, title: "已执行",
}); api: "/risk/plan/create/list?status=finish"
// let formdata = new FormData();
// formdata.append("select", select);
getFun(this.tabs[this.active]['api'])
.then((res) => {
this.$toast.clear();
this.messageList =res.data||res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
onSearch(val) {
this.postList(this.searchValue);
},
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return;
} }
this.showIndex = index; ]
}, };
},
// 详情 created() {
goDetail(data) { this.postList();
this.$router.push({ },
name: "riskTaskList", methods: {
params: { timestampToTimes(time) {
id: data.businessId ||data.id, return timestampToTime(new Date(time), "DT1", true);
}, },
}); handadd() {
sessionStorage.setItem('planId',data.id) this.$router.push({
this.showIndex = null; name: "riskAdd",
}, params: {
// 确认 title: "新增"
goConfirm(data) { }
this.$router.push({ });
name: "risk-affirm", },
params: { postList(select = "") {
data: data, this.$toast.loading({
}, message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
// let formdata = new FormData();
// formdata.append("select", select);
getFun(this.tabs[this.active]["api"])
.then(res => {
this.$toast.clear();
this.messageList = res.data || res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
}); });
},
onSearch(val) {
this.postList(this.searchValue);
},
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
}, return;
}
this.showIndex = index;
},
// 详情
goDetail(data) {
this.$router.push({
name: "riskTaskList",
params: {
id: data.businessId || data.id
}
});
sessionStorage.setItem("pathAuth", "riskManage");
sessionStorage.setItem("planId", data.id);
this.showIndex = null;
}, },
}; // 确认
</script> goConfirm(data) {
this.$router.push({
<style lang="less" scoped> name: "risk-affirm",
params: {
#app { data: data
font-family: ""; }
color: #2c3e50; });
this.showIndex = null;
}
} }
.con-list { };
padding: 0; </script>
background-color: #f0f1f5;
.van-cell-group--inset { <style lang="less" scoped>
margin: 0; #app {
margin-bottom: 0.26667rem; font-family: "";
padding: 0.25rem; color: #2c3e50;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem; font-size: 0.4rem;
position: relative; line-height: 0.8rem;
border-radius: 4%; margin-bottom: 0;
box-shadow: 0px 0px 10px 2px #f3f3f3; }
width: 90%; .van-overlay {
margin: 0.4rem auto; position: absolute;
.van-row { .wrapper {
font-size: 0.4rem; display: flex;
line-height: 0.8rem; align-items: center;
margin-bottom: 0; justify-content: space-evenly;
} height: 100%;
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
} }
} }
} }
/deep/.van-tab__pane{ }
min-height: 8rem; /deep/.van-tab__pane {
} min-height: 8rem;
</style> }
</style>
\ No newline at end of file
...@@ -4,50 +4,54 @@ ...@@ -4,50 +4,54 @@
<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" <div style="font-size: 0.45rem;padding: 5px 0;">
:key="index" {{ item.name }}
> </div>
<div style="font-size: 0.45rem;padding: 5px 0;"> <van-row gutter="4">
{{ item.name }} <van-col span="17">
</div> <van-row gutter="">
<van-row gutter=""> <van-col span="9">风险系数:</van-col>
<van-col span="17"> <van-col span="15">{{ item.coefficient }}</van-col>
<van-row gutter=""> </van-row>
<van-col span="9">创建人:</van-col> <van-row gutter="">
<van-col span="15">{{ item.leaderUserName }}</van-col> <van-col span="9">创建时间:</van-col>
</van-row> <van-col span="15">{{
<van-row gutter=""> timestampToTimes(item.createTime)
<van-col span="9">发起时间:</van-col> }}</van-col>
<van-col span="15">{{ </van-row>
timestampToTimes(item.startTime) <van-row gutter="">
}}</van-col> <van-col span="9">风险描述:</van-col>
</van-row> <van-col span="15">{{
</van-col> item.describe
<van-col span="7"> }}</van-col>
<van-row> </van-row>
{{ item.state }} </van-col>
</van-row> <van-col span="7">
<van-row> <van-row>
<van-button {{ item.state }}
type="info" </van-row>
size="mini" <van-row type="flex" style="flex-direction: column;align-items: center;">
@click="todetail(index, item)" <van-col>
>{{ active == 2 ? "去处理" : "去审批" }}</van-button <van-image round width="34" height="34" src="https://img01.yzcdn.cn/vant/cat.jpeg" />
> </van-col>
</van-row> <van-col>
</van-col> {{ item.userName }}
</van-row> </van-col>
</van-cell-group> </van-row>
</van-col>
</van-row>
</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