Commit 3e75edfd authored by wei's avatar wei

ll

parent b7e06f06
......@@ -171,6 +171,11 @@ const routes = [{
name: 'risk-big-detail',
component: () => import('../views/riskProject/approve/riskBigDetail.vue'),
},
{//执行情况管理
path: '/riskExecution',
name: 'riskExecution',
component: () => import('../views/riskProject/execution/index.vue'),
},
]
const router = new VueRouter({
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-form
@submit="onSubmit"
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;" >
<img src="@/assets/accidentIcon/bookmark.svg" alt="" style="position: relative;top: 32%;transform: translateY(-50%);" >
风险信息
</div>
<van-field
readonly
required
name="userName"
:value="form.userName"
label="评估人"
placeholder="请输入"
/>
<van-field
readonly
required
name="projectId"
:value="form.projectId"
label="所属项目"
placeholder="请输入"
/>
<van-field
readonly
required
name="buildingName"
:value="form.buildingName"
label="所属建筑物"
placeholder="请输入"
/>
<van-form @submit="onSubmit" :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit">
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
风险信息
</div>
<van-field readonly required name="userName" :value="form.userName" label="评估人" placeholder="请输入" />
<van-field readonly required name="projectId" :value="form.projectId" label="所属项目" placeholder="请输入" />
<van-field readonly required name="buildingName" :value="form.buildingName" label="所属建筑物" placeholder="请输入" />
<van-field
required
clickable
name="floorId"
:value="form.floorId"
label="所属楼层"
placeholder="请选择"
@click="seletFloor('floor')"
:rules="[{ required: true, message: '所属楼层不能为空' }]"
/>
<van-field required clickable name="floorId" :value="form.floorId" label="所属楼层" placeholder="请选择"
@click="seletFloor('floor')" :rules="[{ required: true, message: '所属楼层不能为空' }]" />
<van-field
readonly
required
name="roomName"
:value="form.roomName"
label="所属房间"
placeholder="请输入"
@click="seletRoom('room')"
:rules="[{ required: true, message: '所属房间不能为空' }]"
/>
<van-field readonly required name="roomName" :value="form.roomName" label="所属房间" placeholder="请输入"
@click="seletRoom('room')" :rules="[{ required: true, message: '所属房间不能为空' }]" />
<!-- <van-field
required
clickable
......@@ -66,73 +25,33 @@
placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]"
/> -->
<van-field
v-model="form.name"
required
name="name"
label="风险源名称"
placeholder="请选择"
@click="seletFactor('factor')"
:rules="[{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
v-model="form.factor"
required
name="factor"
label="风险因素"
placeholder="请选择"
@click="seletFactor('factor')"
:rules="[{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
v-model="form.type"
required
name="type"
label="准事故类型"
placeholder="请选择"
@click="seletType('type')"
:rules="[{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field v-model="form.name" required name="name" label="风险源名称" placeholder="请选择"
@click="seletFactor('factor')" :rules="[{ required: true, message: '风险源名称不能为空' }]" />
<van-field v-model="form.factor" required name="factor" label="风险因素" placeholder="请选择"
@click="seletFactor('factor')" :rules="[{ required: true, message: '风险因素不能为空' }]" />
<van-field
readonly
v-model="form.level"
required
name="level"
label="风险等级"
placeholder="请选择"
@click="seletGrade('level')"
:rules="[{ required: true, message: '风险等级不能为空' }]"
/>
<van-field v-model="form.type" required name="type" label="准事故类型" placeholder="请选择" @click="seletType('type')"
:rules="[{ required: true, message: '准事故类型不能为空' }]" />
<van-field
required
name="presenceLocation"
v-model="form.presenceLocation"
label="存在部位"
placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]"
/>
<van-field readonly v-model="form.level" required name="level" label="风险等级" placeholder="请选择"
@click="seletGrade('level')" :rules="[{ required: true, message: '风险等级不能为空' }]" />
<van-field required name="presenceLocation" v-model="form.presenceLocation" label="存在部位" placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]" />
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;" >
<img src="@/assets/accidentIcon/bookmark.svg" alt="" style="position: relative;top: 32%;transform: translateY(-50%);" >
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
风险源图片
</div>
<van-field name="hdPicture1" label="风险源图片" >
<van-field name="hdPicture1" label="风险源图片">
<template #input>
<van-uploader
@delete="deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="uploaderImg"
>
<van-uploader @delete="deleteFile(...arguments, 'uploaderImg')" multiple :max-count="5"
upload-text="最多上传五个" v-model="uploaderImg">
<template slot="default">
<!-- 11111111111 -->
<div
style="
<div style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -140,49 +59,28 @@
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/pic.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
">
<img src="@/assets/upload/pic.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;" >
<img src="@/assets/accidentIcon/bookmark.svg" alt="" style="position: relative;top: 32%;transform: translateY(-50%);" >
技术措施
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
技术措施
</div>
<van-field
v-model="form.measuresProject"
name="measuresProject"
label="技术措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field v-model="form.measuresProject" name="measuresProject" label="技术措施" type="textarea" rows="1" autosize
placeholder="请输入" />
<van-field name="measuresProjectFile[]" label=" ">
<template #input>
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresProjectFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresProjectFile')"
>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresProjectFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresProjectFile')">
<template slot="default">
<!-- 11111111111 -->
<div
style="
<div style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -190,49 +88,28 @@
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;" >
<img src="@/assets/accidentIcon/bookmark.svg" alt="" style="position: relative;top: 32%;transform: translateY(-50%);" >
管理措施
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
管理措施
</div>
<van-field
v-model="form.measuresAdministration"
name="measuresAdministration"
label="管理措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field v-model="form.measuresAdministration" name="measuresAdministration" label="管理措施" type="textarea"
rows="1" autosize placeholder="请输入" />
<van-field name="measuresAdministrationFile[]" label=" ">
<template #input>
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresAdministrationFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresAdministrationFile')"
>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile"
accept="file" result-type="file" @delete="deleteFile(...arguments, 'measuresAdministrationFile')">
<template slot="default">
<!-- 11111111111 -->
<div
style="
<div style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -240,49 +117,28 @@
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;" >
<img src="@/assets/accidentIcon/bookmark.svg" alt="" style="position: relative;top: 32%;transform: translateY(-50%);" >
应急措施
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
应急措施
</div>
<van-field
v-model="form.measuresEmergency"
name="measuresEmergency"
label="应急措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field v-model="form.measuresEmergency" name="measuresEmergency" label="应急措施" type="textarea" rows="1"
autosize placeholder="请输入" />
<van-field name="measuresEmergencyFile[]" label=" ">
<template #input>
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresEmergencyFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresEmergencyFile')"
>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresEmergencyFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresEmergencyFile')">
<template slot="default">
<!-- 11111111111 -->
<div
style="
<div style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -290,24 +146,18 @@
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;" >
<img src="@/assets/accidentIcon/bookmark.svg" alt="" style="position: relative;top: 32%;transform: translateY(-50%);" >
参考依据
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
参考依据
</div>
<!-- <van-field
readonly
......@@ -321,35 +171,20 @@
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
<van-popup v-model="showTrouble" position="bottom">
<van-picker
show-toolbar
value-key="name"
:columns="columnsTrouble"
@confirm="onConTrouble"
@cancel="showTrouble = false"
/>
<van-picker show-toolbar value-key="name" :columns="columnsTrouble" @confirm="onConTrouble"
@cancel="showTrouble = false" />
</van-popup>
<van-popup v-model="showSource" position="bottom">
<van-picker
show-toolbar
value-key="name"
:columns="columnsSource"
@confirm="onConSource"
@cancel="showSource = false"
/>
<van-picker show-toolbar value-key="name" :columns="columnsSource" @confirm="onConSource"
@cancel="showSource = false" />
</van-popup>
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit"
>上报</van-button
>
<van-button round block type="info" native-type="submit">上报</van-button>
</div>
</van-form>
<div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel"
>取消</van-button
>
<van-button round block type="warning" @click.native="cancel">取消</van-button>
</div>
</div>
</template>
......@@ -357,7 +192,7 @@
<script>
import LHeader from "@/components/header.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import { getUserInfo, getLocalUserInfo} from '@/utils/userInfo'
import { getUserInfo, getLocalUserInfo } from '@/utils/userInfo'
import { getFun, postFun } from "@/service/table.js";
// import {
// getFormList,
......@@ -397,7 +232,7 @@ export default {
},
beforeRouteLeave(to, from, next) {
if (to.name != "matrix-grad") {
}
next();
},
......@@ -406,9 +241,9 @@ export default {
taskId: "",
text: "添加固有风险",
id: "",
isTimely:1,
active:0,
form:{
isTimely: 1,
active: 0,
form: {
},
projectId: "", // 所属工程
......@@ -423,10 +258,10 @@ export default {
columnsFactor: [],
messageList: [
{
title:'回显风险源名称',
time:'2022-12-12',
name:'Mr.周',
state:1
title: '回显风险源名称',
time: '2022-12-12',
name: 'Mr.周',
state: 1
}
],
source: "", //风险源
......@@ -441,7 +276,7 @@ export default {
columnsSetRank: ["矩阵式定级", "其他定级方式"],
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank: ["重大风险", "较大风险", "一般风险", "较小风险" ],
columnsRiskRank: ["重大风险", "较大风险", "一般风险", "较小风险"],
showSetRankMode: false, // 是否显示定级方式
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
......@@ -472,103 +307,128 @@ export default {
};
},
created() {
var userInfo=getUserInfo()
this.form.buildingIds=this.$route.params.id
this.form.planId=this.$route.params.planId
var userInfo = getUserInfo()
this.form.buildingIds = this.$route.params.id
this.form.planId = this.$route.params.planId
this.form.buildingName = '1号楼'
this.form.userId=userInfo.userId
this.form.userName=userInfo.userName
this.form.deptName=userInfo.dept.deptName
this.form.projectId='测试项目'
this.form.userId = userInfo.userId
this.form.userName = userInfo.userName
this.form.deptName = userInfo.dept.deptName
this.form.projectId = '测试项目'
},
methods: {
seletFloor(name){
seletFloor(name) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
this.userPrefix=name
this.userPrefix = name
getFun(`/risk/plan/floor/list/${this.form.buildingIds}`).then((res) => {
this.$toast.clear()
this.showSource=true
this.columnsSource=res.data
this.showSource = true
this.columnsSource = res.data
}).catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
seletRoom(name){
seletRoom(name) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
this.userPrefix=name
this.userPrefix = name
getFun(`/risk/plan/room/list/${this.form.floorId}`).then((res) => {
this.$toast.clear()
this.showSource=true
this.columnsSource=res.data
this.showSource = true
this.columnsSource = res.data
}).catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
seletFactor(name){
this.showTrouble=true
this.riskName=name
this.columnsTrouble=[
{
name:'人的因素',
},
{
name:'物的因素',
},
{
name:'环境因素',
},
{
name:'管理因素',
},
]
//风险因素
seletFactor(name) {
this.showTrouble = true
this.riskName = name
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_factor`)
.then(res => {
console.log(res.data)
const arr = []
res.data.forEach(item=>{
arr.push({name:item.dictLabel})
})
this.columnsTrouble = arr
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
// this.columnsTrouble = [
// {
// name: '人的因素',
// },
// {
// name: '物的因素',
// },
// {
// name: '环境因素',
// },
// {
// name: '管理因素',
// },
// ]
},
seletType(name){
this.showTrouble=true
this.riskName=name
this.columnsTrouble=[
{
name:'物体打击',
},
{
name:'车辆伤害',
},
{
name:'起重伤害',
},
{
name:'机械伤害',
},
]
//准事故类型
seletType(name) {
this.showTrouble = true
this.riskName = name
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_type`)
.then(res => {
const arr = []
res.data.forEach(item=>{
arr.push({name:item.dictLabel})
})
this.columnsTrouble = arr
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
// this.columnsTrouble = [
// {
// name: '物体打击',
// },
// {
// name: '车辆伤害',
// },
// {
// name: '起重伤害',
// },
// {
// name: '机械伤害',
// },
// ]
},
seletGrade(name){
this.showTrouble=true
this.riskName=name
this.columnsTrouble=[
seletGrade(name) {
this.showTrouble = true
this.riskName = name
this.columnsTrouble = [
{
name:'重大风险',
name: '重大风险',
},
{
name:'较大风险',
name: '较大风险',
},
{
name:'一般风险',
name: '一般风险',
},
{
name:'较小风险',
name: '较小风险',
},
]
},
performTasks(){
performTasks() {
console.log('1233213 :>> ', 1233213);
},
// 点击预览图
......@@ -598,7 +458,7 @@ export default {
}
}
},
jsonToFormData(config) {
jsonToFormData(config) {
const formData = new FormData();
//循环传入的值转换formData
Object.keys(config).forEach((key) => {
......@@ -608,33 +468,33 @@ export default {
},
onSubmit(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";
values.hdPicture1.forEach((item) => {
if (item.file) {
formDataJson.append("pictureFile[]", item.file);
}else{
} else {
formDataJson.append("pictureFile[]", item.fileId);
}
});
values['measuresProjectFile[]'].forEach((item) => {
if (item.file) {
formDataJson.append("measuresProjectFile[]", item.file);
}else{
} else {
formDataJson.append("measuresProjectFile[]", item.fileId);
}
});
values['measuresEmergencyFile[]'].forEach((item) => {
if (item.file) {
formDataJson.append("measuresEmergencyFile[]", item.file);
}else{
} else {
formDataJson.append("measuresEmergencyFile[]", item.fileId);
}
});
values['measuresAdministrationFile[]'].forEach((item) => {
if (item.file) {
formDataJson.append("measuresAdministrationFile[]", item.file);
}else{
} else {
formDataJson.append("measuresAdministrationFile[]", item.fileId);
}
});
......@@ -795,17 +655,17 @@ export default {
this.$router.go(-1);
},
// 选择作业人
// 选择作业人
goSelPeoTwo(val) {
this.peopleName=val
this.peopleName = val
this.show = true;
},
onClose() {
this.show = false;
},
onSave(e) {
this.projectDirector=e[0].loginName
this.projectDirectorName=e[0].userName
this.projectDirector = e[0].loginName
this.projectDirectorName = e[0].userName
this.show = false;
},
},
......@@ -825,30 +685,34 @@ export default {
.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 {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
}
}
</style>
<template>
<!-- 提交 -->
<div>
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<van-tabs v-model="active" @change="postList" color="#2980f7" animated :sticky="true">
<van-tab v-for="(item) in tabs" :key="item.key" :title="item.title">
<!-- 内容列表 -->
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group inset v-for="(item, index) in messageList" :key="index">
<div style="font-size: 0.45rem;padding: 5px 0;">{{ item.title }}</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 :style="{ 'color': (active == 0) ? '#f79648' : (active == 1) ? '#0069e5' : '#03b615' }">
{{ item.state }}
</van-row>
<van-row>
<van-button type="info" size="mini" @click="lookdetail(index, item)">查看详情</van-button>
</van-row>
</van-col>
</van-row>
</van-cell-group>
<div style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
" v-if="messageList['length'] == 0">
暂无数据
</div>
</div>
<!-- 暂无数据 -->
<!-- {{messageList}} -->
</van-tab>
</van-tabs>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex">
<div class="wrapper" @click.stop="showIndex = false">
</div>
</van-overlay>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { timestampToTime, generateId } from "@/utils/format";
export default {
name: 'risk-execution',
components: {
LHeader,
},
data() {
return {
text: "执行情况管理",
searchValue: "",
isHaveNews: false,
messageList: [
{
title: 'XX项目评估任务单',
time: '2022-12-12',
name: 'Mr.周',
state: 1
}
],
Loop: "", // 定时器
showIndex: false, // 是否显示遮罩层,
active: 0,
// 状态 wait 待评估,running 执行中,finish 已完成
tabs: [
{
title: "待评估",
key: 'wait'
},
{
title: "执行中",
key: 'running'
},
{
title: "已完成",
key: 'finish'
},
],
};
},
created() {
this.postList(0);
},
methods: {
timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true)
},
handadd() {
this.$router.push({
name: "riskAdd",
params: {
title: '新增'
},
})
},
postList(name, title) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
let url = `/risk/plan/allocation/list?status=wait`
if (name == 0) {
url = `/risk/plan/allocation/list?status=wait`
} else if (name == 1) {
url = `/risk/plan/allocation/list?status=running`
} else {
url = `/risk/plan/allocation/list?status=finish`
}
getFun(url).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);
},
//查看详情
lookdetail(index, item) {
this.showIndex = true
},
// 详情
goDetail(data) {
this.$router.push({
name: "risk-big-detail",
params: {
id: data.businessId || data.id,
},
});
this.showIndex = null;
},
// 确认
goConfirm(data) {
this.$router.push({
name: "risk-affirm",
params: {
data: data,
},
});
this.showIndex = null;
},
},
};
</script>
<style lang="less" scoped>
#app {
font-family: "";
color: #2c3e50;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
position: relative;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
}
}
</style>
\ No newline at end of file
......@@ -16,6 +16,7 @@
</template>
</van-search> -->
<div class="con">
<van-cell-group inset v-if="finalRiskList.length > 0">
<van-cell value="风险评估管理" />
<van-grid :column-num="4">
......@@ -40,18 +41,18 @@ export default {
return {
value: '',
riskList: [
// {
// key: "1",
// path: "/riskAdd",
// imgUrl: require("@/assets/workbench/risk-report.png"),
// text: "任务创建",
// },
{
key: "2",
key: "1",
// path: "/danger",
path: "/riskManage",
imgUrl: require("@/assets/workbench/risk-report.png"),
text: "任务执行情况",
text: "任务管理",
},
{
key: "2",
path: "/riskExecution",
imgUrl: require("@/assets/workbench/risk-report.png"),
text: "执行情况管理",
},
{
key: "3",
......
......@@ -8,8 +8,9 @@ module.exports = {
//以上的ip和端口是我们本机的;下面为需要跨域的
proxy: { //配置跨域
'/app-api': {
// target: 'http://192.168.4.232:8080/', //这里是后台的地址
target: 'http://192.168.15.124:8080/', //这里是后台的地址
target: 'http://192.168.4.232:8080/', //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
ws: true,
changOrigin: true, //允许跨域
// logLevel: 'debug', // 显示代理调试信息
......
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