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

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

parents 15236232 52960c74
...@@ -354,7 +354,7 @@ export default { ...@@ -354,7 +354,7 @@ export default {
created() { created() {
if (this.$route.params.inherentId) { if (this.$route.params.inherentId) {
this.inherentId = this.$route.params.inherentId this.inherentId = this.$route.params.inherentId
this.buildingIds = this.$route.params.buildingIds this.buildingIds = this.$route.params.buildingId
this.postReturnEcho(); this.postReturnEcho();
} }
// this.getList(); // this.getList();
...@@ -458,6 +458,11 @@ export default { ...@@ -458,6 +458,11 @@ export default {
params: { params: {
id: this.inherentId, id: this.inherentId,
// planId:this.planId // planId:this.planId
buildingId:this.buildingId,
planId:this.inherentId,
floorId:this.form.floorId,
roomName:this.form.roomName,
roomId:this.form.roomId,
}, },
}) })
}, },
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<van-form <van-form
@submit="onSubmit" @submit="onSubmit"
:scroll-to-error="true" :scroll-to-error="true"
...@@ -466,11 +465,16 @@ export default { ...@@ -466,11 +465,16 @@ export default {
var userInfo=getUserInfo() var userInfo=getUserInfo()
this.form.buildingIds=this.$route.params.id this.form.buildingIds=this.$route.params.id
this.form.planId=this.$route.params.planId this.form.planId=this.$route.params.planId
this.form.floorId = this.$route.params.floorId
this.form.roomId = this.$route.params.roomId
this.form.inherentId = this.$route.params.id
this.form.roomName = this.$route.params.roomName
this.form.buildingName = '1号楼' this.form.buildingName = '1号楼'
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='测试项目' this.form.projectId='测试项目'
}, },
methods: { methods: {
seletFloor(name){ seletFloor(name){
...@@ -600,7 +604,8 @@ export default { ...@@ -600,7 +604,8 @@ export default {
onSubmit(values) { onSubmit(values) {
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values) // console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var formDataJson=this.jsonToFormData(this.form) var formDataJson=this.jsonToFormData(this.form)
let url = "/risk/plan/inherent"; // let url = "/risk/plan/inherent";
let url = "/risk/plan/existing";
values.hdPicture1.forEach((item) => { values.hdPicture1.forEach((item) => {
if (item.file) { if (item.file) {
formDataJson.append("pictureFile[]", item.file); formDataJson.append("pictureFile[]", item.file);
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
<div style="font-size: 0.45rem;padding: 5px 0;"> <div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.title }} {{ item.title }}
</div> </div>
<van-row gutter=""> <van-row gutter="">
<van-col span="17"> <van-col span="17">
<van-row gutter=""> <van-row gutter="">
...@@ -263,11 +262,16 @@ export default { ...@@ -263,11 +262,16 @@ export default {
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
sessionStorage.setItem('buildingId',this.buildingId)
sessionStorage.setItem('planId',this.planId)
sessionStorage.setItem('buildingName',this.buildingName)
this.$router.push({ this.$router.push({
name: "addCurrent", name: "addCurrent",
params: { params: {
inherentId: data.businessId || data.id, inherentId: data.businessId || data.id,
buildingIds: this.active planId: this.planId,
buildingId:this.buildingId,
buildingName:this.buildingName
} }
}); });
this.showIndex = null; this.showIndex = null;
......
...@@ -33,205 +33,105 @@ ...@@ -33,205 +33,105 @@
</div> </div>
</van-grid-item> </van-grid-item>
</van-grid> </van-grid>
<van-steps <van-steps :active="phase" active-icon="success" active-color="#38f" style="margin: 0.26rem 0;">
:active="phase"
active-icon="success"
active-color="#38f"
style="margin: 0.26rem 0;"
>
<van-step name="1">任务发起</van-step> <van-step name="1">任务发起</van-step>
<van-step name="2">风险评估</van-step> <van-step name="2">风险评估</van-step>
<van-step name="3">评估审核</van-step> <van-step name="3">评估审核</van-step>
<van-step name="4">项目完成</van-step> <van-step name="4">项目完成</van-step>
</van-steps> </van-steps>
<van-tabs <van-tabs v-model="active" color="#2980f7" animated :sticky="true" offset-top="2.93rem">
v-model="active"
color="#2980f7"
animated
:sticky="true"
offset-top="2.93rem"
>
<van-tab title="任务详情"> <van-tab title="任务详情">
<van-form <van-form :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit">
:scroll-to-error="true" <van-field readonly name="createUserName" :value="form.createUserName" label="创建人员" input-align="right"
:show-error="false" :rules="[{ required: true, message: '创建人员不能为空' }]" />
validate-trigger="onSubmit" <van-field readonly name="createDeptName" :value="form.createDeptName" label="创建单位" input-align="right"
> :rules="[{ required: true, message: '创建单位不能为空' }]" />
<van-field <van-field readonly name="projectName" :value="form.projectName" label="任务名称" input-align="right"
readonly :rules="[{ required: true, message: '任务名称不能为空' }]" />
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 <van-field readonly name="projectName" :value="form.projectName" label="关联项目" input-align="right"
readonly :rules="[{ required: true, message: '关联项目不能为空' }]" />
name="projectName"
:value="form.projectName"
label="关联项目"
input-align="right"
:rules="[{ required: true, message: '关联项目不能为空' }]"
/>
<van-field <van-field readonly name="buildingNames" :value="form.buildingNames" label="评估楼栋" input-align="right"
readonly :rules="[{ required: true, message: '评估楼栋不能为空' }]" />
name="buildingNames"
:value="form.buildingNames"
label="评估楼栋"
input-align="right"
:rules="[{ required: true, message: '评估楼栋不能为空' }]"
/>
<van-field <van-field readonly name="deptName" :value="form.deptName" label="评估小组选择" input-align="right"
readonly :rules="[{ required: true, message: '评估小组不能为空' }]" />
name="deptName"
:value="form.deptName"
label="评估小组选择"
input-align="right"
:rules="[{ required: true, message: '评估小组不能为空' }]"
/>
<van-field <van-field readonly name="leaderUserName" :value="form.leaderUserName" label="评估小组组长" input-align="right"
readonly :rules="[{ required: true, message: '评估小组组长不能为空' }]" />
name="leaderUserName"
:value="form.leaderUserName"
label="评估小组组长"
input-align="right"
:rules="[{ required: true, message: '评估小组组长不能为空' }]"
/>
<van-field <van-field clickable name="workUserNames" :value="form.workUserNames" label="评估成员" input-align="right"
clickable :rules="[{ required: true, message: '评估成员不能为空' }]" />
name="workUserNames"
:value="form.workUserNames"
label="评估成员"
input-align="right"
:rules="[{ required: true, message: '评估成员不能为空' }]"
/>
<van-field <van-field v-model="form.startTime" readonly name="location" label="任务开始时间" input-align="right" :formatter="() => {
v-model="form.startTime"
readonly
name="location"
label="任务开始时间"
input-align="right"
: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" readonly name="location" label="任务结束时间" :formatter="() => {
v-model="form.endTime"
readonly
name="location"
label="任务结束时间"
:formatter="
() => {
return timestampToTimes(form.endTime); return timestampToTimes(form.endTime);
} }
" " input-align="right" :rules="[{ required: true, message: '任务结束时间不能为空' }]" />
input-align="right"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
</van-form> </van-form>
</van-tab> </van-tab>
<van-tab title="风险清单"> <van-tab title="风险清单">
<!-- <van-row v-for="item in riskList" :key="item.id"> <van-sticky>
<van-col span="24"> <van-dropdown-menu>
{{ item.name }} <van-dropdown-item v-model="value1" :options="option1" />
<van-dropdown-item v-model="value2" :options="option2" />
<van-dropdown-item v-model="value3" :options="option3" />
</van-dropdown-menu>
</van-sticky>
<div style="overflow-y: auto;">
<van-cell-group 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="5">
<van-image width="46" height="46" src="https://img01.yzcdn.cn/vant/cat.jpeg" />
</van-col> </van-col>
</van-row> -->
<van-cell-group
inset
v-for="(item, index) in riskList"
:key="index"
>
<div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.title }}
</div>
<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-col span="15">{{ item.name }}</van-col>
</van-row> </van-row>
</van-col> </van-col>
<van-col span="7">
<van-row
:style="{
color: '#03b615'
}"
>
{{ item.state }}
</van-row>
</van-col> </van-col>
<van-col span="7"> <van-col span="2">
<van-row <van-row :style="{
:style="{
color: '#03b615' color: '#03b615'
}" }">
> <van-icon name="arrow" size="26px" @click="goColorDetail" />
<van-button icon="plus" @click="goColorDetail"></van-button>
</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="审核记录"> <van-tab title="审核记录">
<div class="journal-wrap"> <div class="journal-wrap">
<van-cell-group inset> <van-cell-group inset>
<van-steps <van-steps direction="vertical" :active="99999" v-if="riskLogList.length > 0">
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>
<van-col span="24" <van-col span="24">
><div class="info-title"> <div class="info-title">
{{ timestampToTimes(item.startTime) }} {{ timestampToTimes(item.startTime) }}
</div></van-col </div>
> </van-col>
</van-row> </van-row>
<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">{{ item.approvalUserName }}</van-col> <van-col span="17">{{ item.approvalUserName }}</van-col>
</van-row> </van-row>
<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">{{ item.taskName }}</van-col> <van-col span="17">{{ item.taskName }}</van-col>
</van-row> </van-row>
<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">{{ item.taskResult }}</van-col> <van-col span="17">{{ item.taskResult }}</van-col>
</van-row> </van-row>
<!-- <van-row> <!-- <van-row>
...@@ -250,15 +150,13 @@ ...@@ -250,15 +150,13 @@
</div> </div>
</van-tab> </van-tab>
<van-tab title="风险评估报告"> <van-tab title="风险评估报告">
<div <div style="height: 1.5rem;
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>
...@@ -268,15 +166,13 @@ ...@@ -268,15 +166,13 @@
<van-icon name="arrow" size="26px" /> <van-icon name="arrow" size="26px" />
</div> </div>
</div> </div>
<div <div style="height: 1.5rem;
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>
...@@ -289,8 +185,7 @@ ...@@ -289,8 +185,7 @@
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
<div <div style="display: flex;
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;
...@@ -298,12 +193,8 @@ ...@@ -298,12 +193,8 @@
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>
...@@ -337,7 +228,22 @@ export default { ...@@ -337,7 +228,22 @@ export default {
phase: 1, phase: 1,
form: {}, form: {},
tabs: [], tabs: [],
riskList:[], riskList: [],
value1: 0,
value2: 'a',
value3: '1',
option1: [
{ text: '楼栋', value: 0 },
{ text: '全部', value: 1 },
],
option2: [
{ text: '楼层', value: 'a' },
{ text: '全部', value: 'b' },
],
option3: [
{ text: '房间', value: '1' },
{ text: '全部', value: '2' },
],
}; };
}, },
created() { created() {
...@@ -352,9 +258,9 @@ export default { ...@@ -352,9 +258,9 @@ export default {
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('buildingId', this.messageList.riskBuildingListDtos[0].buildingId)
sessionStorage.setItem('planId',this.messageList.id) sessionStorage.setItem('planId', this.messageList.id)
sessionStorage.setItem('buildingName',this.messageList.riskBuildingListDtos[0].buildingName) sessionStorage.setItem('buildingName', this.messageList.riskBuildingListDtos[0].buildingName)
this.$router.push({ this.$router.push({
name: "riskInherent", name: "riskInherent",
params: { params: {
...@@ -373,9 +279,9 @@ export default { ...@@ -373,9 +279,9 @@ export default {
}); });
}, },
//风险清单列表 //风险清单列表
getRiskTaskList(planId, buildingId){ getRiskTaskList(planId, buildingId) {
getFun(`/risk/plan/inherent/list/${planId}/${buildingId}`).then(res=>{ getFun(`/risk/plan/inherent/list/${planId}/${buildingId}`).then(res => {
console.log(res.data,'lll') console.log(res.data, 'lll')
this.riskList = res.data this.riskList = res.data
}) })
}, },
...@@ -434,17 +340,27 @@ export default { ...@@ -434,17 +340,27 @@ export default {
this.showIndex = null; this.showIndex = null;
}, },
//固定资产 //固定资产
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",
params:{ params: {
floorId:18, floorId: 18,
isView:true isView: true
} }
}) })
}, },
//风险清单列表点击
toRiskDetail(item) {
console.log(item,'LLLL')
this.$router.push({
name:"taskDetail",
params:{
id:item.id
}
})
}
} }
}; };
</script> </script>
...@@ -453,9 +369,11 @@ export default { ...@@ -453,9 +369,11 @@ export default {
font-family: ""; font-family: "";
color: #2c3e50; color: #2c3e50;
} }
.cell-wrap { .cell-wrap {
position: relative; position: relative;
} }
p { p {
font-size: 0.4rem; font-size: 0.4rem;
font-weight: none; font-weight: none;
...@@ -463,31 +381,38 @@ p { ...@@ -463,31 +381,38 @@ p {
margin: 0.186667rem 0; margin: 0.186667rem 0;
color: #7f7f7f; color: #7f7f7f;
} }
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 10px;
padding: 10px; padding: 10px;
font-size: 13px; font-size: 13px;
position: relative; position: relative;
.van-row { .van-row {
margin-bottom: 0.133333rem; margin-bottom: 0.133333rem;
line-height: 0.64rem; line-height: 0.64rem;
} }
} }
.journal-wrap { .journal-wrap {
position: relative; position: relative;
} }
.supervise-wrap { .supervise-wrap {
position: relative; position: relative;
} }
.info-title { .info-title {
color: #2980f7; color: #2980f7;
font-weight: none; font-weight: none;
} }
.field-title { .field-title {
color: black; color: black;
font-weight: none; font-weight: none;
} }
.more { .more {
position: absolute; position: absolute;
bottom: 0.32rem; bottom: 0.32rem;
......
...@@ -3,33 +3,101 @@ ...@@ -3,33 +3,101 @@
<van-sticky offset-top="0"> <van-sticky offset-top="0">
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
</van-sticky> </van-sticky>
<div class="section">
<van-tabs v-model="activeName" color="#2980f7" animated >
<van-tab title="固有风险信息" name="a">
</van-tab>
<van-tab title="现状风险" name="b">
<van-cell-group
inset
v-for="(item, index) in quoRiskList"
:key="index"
>
<div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.name }}
</div>
<van-row gutter="">
<van-col span="17">
<van-row gutter="">
<van-col span="9">创建人:</van-col>
<van-col span="15">{{ item.leaderUserName }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">发起时间:</van-col>
<van-col span="15">{{
timestampToTimes(item.startTime)
}}</van-col>
</van-row>
</van-col>
<van-col span="7">
<van-row>
{{ item.state }}
</van-row>
<van-row>
<van-button
type="info"
size="mini"
@click="todetail(index, item)"
>{{ active == 2 ? "去处理" : "去审批" }}</van-button
>
</van-row>
</van-col>
</van-row>
</van-cell-group>
</van-tab>
<van-tab title="四色图" name="c">
<drawCanvas/>
</van-tab>
</van-tabs>
</div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import drawCanvas from '@/views/drawCanvas/riskView.vue'
import { getFun, postFun } from "@/service/table.js";
export default { export default {
name:'taskDetail', name: 'taskDetail',
data() { data() {
return { return {
text: "固有风险列表", text: "固有风险列表",
activeName: 'a',
quoRiskList:[],//现状风险列表
InherentRisk:[],//固有风险
inherentId:''
} }
}, },
components: { components: {
LHeader, LHeader,
drawCanvas
},
created(){
this.inherentId = this.$route.params.id
}, },
mounted() { mounted() {
this.getQuoRiskList(this.$route.params.id)
}, },
methods: { methods: {
getQuoRiskList(inherentId){
getFun(`/risk/plan/existing/list/${inherentId}`).then(res=>{
this.quoRiskList = res.data
})
}
}, },
} }
</script> </script>
<style scoped> <style scoped>
.wrap{ .wrap {
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;
} }
.section {
width: 100%;
height: 100%;
overflow-y: auto;
}
</style> </style>
...@@ -3,13 +3,13 @@ module.exports = { ...@@ -3,13 +3,13 @@ module.exports = {
devServer: { devServer: {
open: true, open: true,
host: 'localhost', host: 'localhost',
port: 8081, port: 8080,
https: false, https: false,
//以上的ip和端口是我们本机的;下面为需要跨域的 //以上的ip和端口是我们本机的;下面为需要跨域的
proxy: { //配置跨域 proxy: { //配置跨域
'/app-api': { '/app-api': {
// target: 'http://192.168.4.232:8080/', //这里是后台的地址 target: 'http://192.168.4.232:8080/', //这里是后台的地址
target: 'http://192.168.15.124:8080/', //这里是杨帆的地址 // target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址 // target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
// target: 'http://localhost:8080/', //这里是后台的地址 // target: 'http://localhost:8080/', //这里是后台的地址
ws: true, ws: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment