Commit d77f16b3 authored by 王李辉's avatar 王李辉

风险上报退回

parent 69026c87
...@@ -386,16 +386,16 @@ const routes = [{ ...@@ -386,16 +386,16 @@ const routes = [{
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/superviseDanger'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/superviseDanger'),
}, },
// 隐患督办批示 // 隐患督办批示
{ {
path: '/super-survey', path: '/super-survey',
name: 'super-survey', name: 'super-survey',
meta: { meta: {
title: '隐患督办', title: '隐患督办',
index: 1 index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/superviseDanger/superSurvey'),
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/superviseDanger/superSurvey'),
},
// 重大隐患列表 // 重大隐患列表
{ {
path: '/major-danger', path: '/major-danger',
...@@ -429,17 +429,17 @@ const routes = [{ ...@@ -429,17 +429,17 @@ const routes = [{
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/delayApproval'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/delayApproval'),
}, },
// 延期审批确定 // 延期审批确定
{ {
path: '/ratify-info', path: '/ratify-info',
name: 'ratify-info', name: 'ratify-info',
meta: { meta: {
title: '延期审批', title: '延期审批',
index: 1 index: 1
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/delayApproval/ratifyInfo'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/danger/delayApproval/ratifyInfo'),
}, },
// 项目经理督办列表 // 项目经理督办列表
{ {
path: '/manager-danger', path: '/manager-danger',
...@@ -464,15 +464,7 @@ const routes = [{ ...@@ -464,15 +464,7 @@ const routes = [{
{ // 风险模块
path: '/risk',
name: 'risk',
meta: {
title: '风险',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk'),
},
{ {
path: '/risk-add', path: '/risk-add',
name: 'risk-add', name: 'risk-add',
...@@ -511,15 +503,6 @@ const routes = [{ ...@@ -511,15 +503,6 @@ const routes = [{
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskConfirme/riskAffirm'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskConfirme/riskAffirm'),
}, },
{
path: '/affirm-detail',
name: 'affirm-detail',
meta: {
title: '风险确认详情',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskConfirme/affirmDetail'),
},
{ {
path: '/risk-account', path: '/risk-account',
name: 'risk-account', name: 'risk-account',
......
...@@ -26,6 +26,17 @@ export function postHdType(url,data) { ...@@ -26,6 +26,17 @@ export function postHdType(url,data) {
data data
}) })
} }
// 各种措施
export function postMeasures(url,data) {
return request({
url: url,
method: 'post',
data
})
}
// 主责人员 // 主责人员
export function postHdPeople(url,data) { export function postHdPeople(url,data) {
return request({ return request({
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
欢迎登录<span>首开集团安全隐患排查治理体系</span>! 欢迎登录<span>首开集团安全隐患排查治理体系</span>!
</div> </div>
<div class="login-form"> <div class="login-form">
<van-form @submit="onSubmit"> <van-form @submit="onSubmit" :show-error-message="false" >
<div class="username-wrap"> <div class="username-wrap">
<div class="username-icon"> <div class="username-icon">
<van-image :src="require('@/assets/login/login-username.png')" /> <van-image :src="require('@/assets/login/login-username.png')" />
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
name="username" name="username"
label="" label=""
placeholder="账号" placeholder="账号"
:rules="[{ required: true, message: '请填写用户名' }]" :rules="[{ required: true, message: '请填写账号' }]"
/> />
</div> </div>
<div class="passworld-wrap"> <div class="passworld-wrap">
......
...@@ -58,6 +58,13 @@ ...@@ -58,6 +58,13 @@
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 -->
<div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
v-if="isHaveNews"
>
暂无数据
</div>
</div> </div>
</template> </template>
...@@ -72,6 +79,7 @@ export default { ...@@ -72,6 +79,7 @@ export default {
return { return {
text: "隐患整改", text: "隐患整改",
searchValue: "", searchValue: "",
isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null // 是否显示遮罩层
...@@ -94,6 +102,10 @@ export default { ...@@ -94,6 +102,10 @@ export default {
dangerRect("/rectification/list").then(res =>{ dangerRect("/rectification/list").then(res =>{
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows this.messageList = res.rows
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
}).catch(() => { }).catch(() => {
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试");
......
...@@ -2,14 +2,8 @@ ...@@ -2,14 +2,8 @@
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" /> <van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<van-tabs
v-model="active" <!-- 内容列表 -->
color="#247df7"
title-inactive-colo="#d0d1d1"
title-active-color="#000000"
>
<van-tab title="待确认">
<!-- 内容列表 -->
<div class="con-list"> <div class="con-list">
<van-cell-group <van-cell-group
inset inset
...@@ -32,7 +26,7 @@ ...@@ -32,7 +26,7 @@
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">隐患类型:</van-col> <van-col span="5">隐患类型:</van-col>
<van-col span="19">{{ item.hdTdueDateype }}</van-col> <van-col span="19">{{ item.hdType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="5">发现时间:</van-col> <van-col span="5">发现时间:</van-col>
...@@ -52,10 +46,13 @@ ...@@ -52,10 +46,13 @@
</van-cell-group> </van-cell-group>
</div> </div>
</van-tab> <!-- 暂无数据 -->
<van-tab title="已确认">已确认</van-tab> <div
<van-tab title="已退回">已退回</van-tab> style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
</van-tabs> v-if="isHaveNews"
>
暂无数据
</div>
</div> </div>
</template> </template>
...@@ -64,12 +61,12 @@ import LHeader from "@/components/header.vue"; ...@@ -64,12 +61,12 @@ import LHeader from "@/components/header.vue";
import { dangerConfirm } from "@/service/danger"; import { dangerConfirm } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader
}, },
data() { data() {
return { return {
text: "隐患确认", text: "隐患确认",
active: "1", isHaveNews: false,
searchValue: "", searchValue: "",
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
...@@ -77,23 +74,29 @@ export default { ...@@ -77,23 +74,29 @@ export default {
}; };
}, },
created() { created() {
this.postList() this.postList();
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
console.log(val); console.log(val);
}, },
postList(){ postList() {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
dangerConfirm("/confirm/list").then(res =>{ dangerConfirm("/confirm/list")
this.$toast.clear(); .then(res => {
this.messageList = res.rows this.$toast.clear();
}).catch(() => { this.messageList = res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
})
.catch(() => {
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试");
}); });
...@@ -128,9 +131,9 @@ export default { ...@@ -128,9 +131,9 @@ export default {
goConfirm(data) { goConfirm(data) {
console.log(data); console.log(data);
this.$router.push({ this.$router.push({
name:"affirm-danger", name: "affirm-danger",
params:{ params: {
"taskId":data.taskId taskId: data.taskId
} }
}); });
this.showIndex = null; this.showIndex = null;
...@@ -141,7 +144,7 @@ export default { ...@@ -141,7 +144,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
.con-list { .con-list {
padding: 10px 10px .533333rem; padding: 10px 10px 0.533333rem;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
...@@ -149,9 +152,9 @@ export default { ...@@ -149,9 +152,9 @@ export default {
padding: 10px; padding: 10px;
font-size: 13px; font-size: 13px;
position: relative; position: relative;
.van-row{ .van-row {
margin-bottom: .133333rem; margin-bottom: 0.133333rem;
line-height: .64rem; line-height: 0.64rem;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
...@@ -46,7 +46,13 @@ ...@@ -46,7 +46,13 @@
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 -->
<div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
v-if="isHaveNews"
>
暂无数据
</div>
</div> </div>
</template> </template>
...@@ -64,6 +70,7 @@ export default { ...@@ -64,6 +70,7 @@ export default {
return { return {
text: "延期审批", text: "延期审批",
searchValue: "", searchValue: "",
isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null // 是否显示遮罩层
......
...@@ -47,7 +47,13 @@ ...@@ -47,7 +47,13 @@
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 -->
<div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
v-if="isHaveNews"
>
暂无数据
</div>
</div> </div>
</template> </template>
...@@ -79,6 +85,7 @@ export default { ...@@ -79,6 +85,7 @@ export default {
return { return {
text: "重大隐患", text: "重大隐患",
searchValue: "", searchValue: "",
isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null // 是否显示遮罩层
...@@ -101,6 +108,10 @@ export default { ...@@ -101,6 +108,10 @@ export default {
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows this.messageList = res.rows
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
}) })
.catch(() => { .catch(() => {
......
...@@ -45,7 +45,13 @@ ...@@ -45,7 +45,13 @@
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 -->
<div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
v-if="isHaveNews"
>
暂无数据
</div>
</div> </div>
</template> </template>
...@@ -77,6 +83,7 @@ export default { ...@@ -77,6 +83,7 @@ export default {
return { return {
text: "项目经理督办", text: "项目经理督办",
searchValue: "", searchValue: "",
isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null // 是否显示遮罩层
...@@ -99,6 +106,10 @@ export default { ...@@ -99,6 +106,10 @@ export default {
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.data this.messageList = res.data
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
}) })
.catch(() => { .catch(() => {
......
...@@ -49,6 +49,13 @@ ...@@ -49,6 +49,13 @@
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 -->
<div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
v-if="isHaveNews"
>
暂无数据
</div>
</div> </div>
</template> </template>
...@@ -63,6 +70,7 @@ export default { ...@@ -63,6 +70,7 @@ export default {
return { return {
text: "上报退回", text: "上报退回",
searchValue: "", searchValue: "",
isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null // 是否显示遮罩层
...@@ -83,6 +91,10 @@ export default { ...@@ -83,6 +91,10 @@ export default {
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
......
...@@ -53,6 +53,13 @@ ...@@ -53,6 +53,13 @@
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 -->
<div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
v-if="isHaveNews"
>
暂无数据
</div>
</div> </div>
</template> </template>
...@@ -66,6 +73,7 @@ export default { ...@@ -66,6 +73,7 @@ export default {
data() { data() {
return { return {
text: "隐患复查", text: "隐患复查",
isHaveNews: false,
searchValue: "", searchValue: "",
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
...@@ -91,6 +99,10 @@ export default { ...@@ -91,6 +99,10 @@ export default {
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
......
...@@ -51,6 +51,13 @@ ...@@ -51,6 +51,13 @@
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 -->
<div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
v-if="isHaveNews"
>
暂无数据
</div>
</div> </div>
</template> </template>
...@@ -65,6 +72,7 @@ export default { ...@@ -65,6 +72,7 @@ export default {
return { return {
text: "隐患历史台账", text: "隐患历史台账",
searchValue: "", searchValue: "",
isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null // 是否显示遮罩层
...@@ -89,6 +97,10 @@ export default { ...@@ -89,6 +97,10 @@ export default {
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
......
...@@ -361,9 +361,9 @@ export default { ...@@ -361,9 +361,9 @@ export default {
this.hdRectificationList = res.data.hdRectificationList this.hdRectificationList = res.data.hdRectificationList
this.hdReviewList = res.data.hdReviewList this.hdReviewList = res.data.hdReviewList
this.beifenhdLogList = res.data.hdLogList this.beifenhdLogList = res.data.hdLogList
this.hdLogList = this.beifenhdLogList.slice(0,1) this.hdLogList = this.beifenhdLogList.slice(-1)
this.beifeninstructionsList = res.data.instructionsList this.beifeninstructionsList = res.data.instructionsList
this.instructionsList = this.beifeninstructionsList.slice(0,1) this.instructionsList = this.beifeninstructionsList.slice(-1)
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
...@@ -402,7 +402,7 @@ export default { ...@@ -402,7 +402,7 @@ export default {
} else { } else {
this.journalOpenText = "展开 ▼"; this.journalOpenText = "展开 ▼";
// 只显示第一个数据 // 只显示第一个数据
this.hdLogList = this.beifenhdLogList.slice(0,1) this.hdLogList = this.beifenhdLogList.slice(-1)
} }
}, },
// 督办信息显示或隐藏 // 督办信息显示或隐藏
...@@ -415,7 +415,7 @@ export default { ...@@ -415,7 +415,7 @@ export default {
} else { } else {
// 只渲染一条数据 // 只渲染一条数据
this.superviseOpenText = "展开 ▼"; this.superviseOpenText = "展开 ▼";
this.instructionsList = this.beifeninstructionsList.slice(0,1) this.instructionsList = this.beifeninstructionsList.slice(-1)
} }
} }
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" /> <van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<!-- 内容列表 --> <!-- 内容列表 -->
<!-- 接口对接4 START --> <!-- 接口对接4 START -->
<div class="con-list"> <div class="con-list">
<van-cell-group <van-cell-group
inset inset
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
@touchstart="touchstart(index, item)" @touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)" @touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患编号:</van-col> <van-col span="7">隐患编号:</van-col>
<van-col span="17">{{ item.processInstanceId }}</van-col> <van-col span="17">{{ item.processInstanceId }}</van-col>
...@@ -29,7 +28,7 @@ ...@@ -29,7 +28,7 @@
<van-col span="7">隐患发现时间:</van-col> <van-col span="7">隐患发现时间:</van-col>
<van-col span="17">{{ item.createTime }}</van-col> <van-col span="17">{{ item.createTime }}</van-col>
</van-row> </van-row>
<!-- *接口对接4 END --> <!-- *接口对接4 END -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
...@@ -37,15 +36,20 @@ ...@@ -37,15 +36,20 @@
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @touchstart="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goConfirm(item)" <van-button round type="info" @touchstart="goConfirm(item)"
>批示</van-button >批示</van-button
> >
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 -->
<div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;"
v-if="isHaveNews"
>
暂无数据
</div>
</div> </div>
</template> </template>
...@@ -70,24 +74,24 @@ import { superviseList } from "@/service/danger"; ...@@ -70,24 +74,24 @@ import { superviseList } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader
}, },
data() { data() {
return { return {
text: "隐患督办", text: "隐患督办",
searchValue: "", searchValue: "",
messageList: [], messageList: [],
isHaveNews: false,
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null // 是否显示遮罩层
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
getList() { getList() {
/*接口对接3 START*/ /*接口对接3 START*/
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch(val) { onSearch(val) {
...@@ -112,11 +116,11 @@ export default { ...@@ -112,11 +116,11 @@ export default {
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data); console.log(data);
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params:{ params: {
id: data.pid id: data.pid
} }
}); });
this.showIndex = null; this.showIndex = null;
}, },
...@@ -124,9 +128,9 @@ export default { ...@@ -124,9 +128,9 @@ export default {
goConfirm(data) { goConfirm(data) {
console.log(data); console.log(data);
this.$router.push({ this.$router.push({
name:"super-survey", name: "super-survey",
params:{ params: {
"taskId":data.taskId taskId: data.taskId
} }
}); });
this.showIndex = null; this.showIndex = null;
...@@ -145,9 +149,9 @@ export default { ...@@ -145,9 +149,9 @@ export default {
padding: 10px; padding: 10px;
font-size: 13px; font-size: 13px;
position: relative; position: relative;
.van-row{ .van-row {
margin-bottom: .133333rem; margin-bottom: 0.133333rem;
line-height: .64rem; line-height: 0.64rem;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
......
...@@ -7,16 +7,16 @@ ...@@ -7,16 +7,16 @@
:show-error="false" :show-error="false"
validate-trigger="onSubmit" validate-trigger="onSubmit"
> >
<van-field <van-field
v-if="isShowreturnCause" v-if="isShowreturnCause"
v-model="returnCause" v-model="returnCause"
readonly readonly
rows="1" rows="1"
autosize="" autosize=""
label="退回原因" label="退回原因"
name="returnCause" name="returnCause"
type="textarea" type="textarea"
/> />
<van-field <van-field
v-if="!isShowreturnCause" v-if="!isShowreturnCause"
readonly readonly
...@@ -135,10 +135,7 @@ ...@@ -135,10 +135,7 @@
autosize autosize
placeholder="请输入" placeholder="请输入"
/> />
<van-field <van-field name="定级方式" label=" ">
name="定级方式"
label=" "
>
<template #input> <template #input>
<van-uploader v-model="setRankModeImg" /> <van-uploader v-model="setRankModeImg" />
</template> </template>
...@@ -221,10 +218,7 @@ ...@@ -221,10 +218,7 @@
autosize autosize
placeholder="请输入" placeholder="请输入"
/> />
<van-field <van-field name="技术措施" label=" ">
name="技术措施"
label=" "
>
<template #input> <template #input>
<van-uploader v-model="technologyImg" /> <van-uploader v-model="technologyImg" />
</template> </template>
...@@ -239,10 +233,7 @@ ...@@ -239,10 +233,7 @@
autosize autosize
placeholder="请输入" placeholder="请输入"
/> />
<van-field <van-field name="管理措施" label=" ">
name="管理措施"
label=" "
>
<template #input> <template #input>
<van-uploader v-model="administrationImg" /> <van-uploader v-model="administrationImg" />
</template> </template>
...@@ -257,10 +248,7 @@ ...@@ -257,10 +248,7 @@
autosize autosize
placeholder="请输入" placeholder="请输入"
/> />
<van-field <van-field name="应急措施" label=" ">
name="应急措施"
label=" "
>
<template #input> <template #input>
<van-uploader v-model="urgentImg" /> <van-uploader v-model="urgentImg" />
</template> </template>
...@@ -282,15 +270,23 @@ ...@@ -282,15 +270,23 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { getFormList, postHdSource, postHdType, postHdPeople, postReAdd, postriskConiCause } from "@/service/risk"; import {
getFormList,
postHdSource,
postHdType,
postHdPeople,
postReAdd,
postriskConiCause
} from "@/service/risk";
export default { export default {
components: { components: {
LHeader LHeader
}, },
data() { data() {
return { return {
taskId:"", taskId: "",
text: "新增风险", text: "新增风险",
id:"",
projectId: "", // 所属工程 projectId: "", // 所属工程
projectName: "", // 所属工程 projectName: "", // 所属工程
showProjectName: false, showProjectName: false,
...@@ -319,15 +315,15 @@ export default { ...@@ -319,15 +315,15 @@ export default {
showMainDutyDept: false, showMainDutyDept: false,
columnsMainDutyDept: [], columnsMainDutyDept: [],
mainDutyPeopLe: "", // 主责人员 mainDutyPeopLe: "", // 主责人员
mainDutyPeopLeId :"", mainDutyPeopLeId: "",
showMainDutyPeopLe: false, showMainDutyPeopLe: false,
columnsMainDutyPeopLe: [], columnsMainDutyPeopLe: [],
technology:"", //技术措施文字 technology: "", //技术措施文字
technologyImg:[],//技术措施图片 technologyImg: [], //技术措施图片
administration:"", //管理措施文字 administration: "", //管理措施文字
administrationImg:[],//管理措施图片 administrationImg: [], //管理措施图片
urgent:"", //应急措施文字 urgent: "", //应急措施文字
urgentImg:[],//应急措施图片 urgentImg: [], //应急措施图片
returnCause: "", // 退回原因 returnCause: "", // 退回原因
isShowreturnCause: false isShowreturnCause: false
}; };
...@@ -335,37 +331,46 @@ export default { ...@@ -335,37 +331,46 @@ export default {
created() { created() {
if (this.$route.params.status) { if (this.$route.params.status) {
this.isShowreturnCause = true; this.isShowreturnCause = true;
this.text = "风险上报退回" this.text = "风险上报退回";
this.taskId = this.$route.params.taskId this.taskId = this.$route.params.taskId;
this.postReturnEcho() this.postReturnEcho();
} }
this.getList(); this.getList();
}, },
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values); console.log("submit", values);
let formdata = new FormData() let formdata = new FormData();
formdata.append("pId", this.projectId) formdata.append("pId", this.projectId);
formdata.append("riskFactor", this.factor) formdata.append("riskFactor", this.factor);
formdata.append("riskSource", this.source) formdata.append("riskSource", this.source);
formdata.append("accidentType", this.trouble) formdata.append("accidentType", this.trouble);
formdata.append("level", this.setRank) formdata.append("level", this.setRank);
formdata.append("riskLevel", this.riskRank) formdata.append("riskLevel", this.riskRank);
formdata.append("gradingMethod", this.setRankMode) formdata.append("gradingMethod", this.setRankMode);
formdata.append("riskPosition", this.location) formdata.append("riskPosition", this.location);
formdata.append("controlLevel", this.control) formdata.append("controlLevel", this.control);
formdata.append("responsibilityDept", this.mainDutyDeptId) formdata.append("responsibilityDept", this.mainDutyDeptId);
formdata.append("responsibilityMember", this.mainDutyPeopLeId) formdata.append("responsibilityMember", this.mainDutyPeopLeId);
formdata.append("technicalMeasures", this.technology) formdata.append("technicalMeasures", this.technology);
formdata.append("managementMeasures", this.administration) formdata.append("managementMeasures", this.administration);
formdata.append("emergencyMeasure", this.urgent) formdata.append("emergencyMeasure", this.urgent);
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
postReAdd("/riskMain/add", formdata) let url = "/riskMain/add"
if(this.taskId){
console.log(this.id);
formdata.append("id", this.id);
url = `/riskMain/editSave/${this.taskId}`
}
postReAdd(url, formdata)
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.$toast.success({ this.$toast.success({
...@@ -378,7 +383,6 @@ export default { ...@@ -378,7 +383,6 @@ export default {
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试"); this.$toast.fail("提交失败,请稍后再试");
}); });
}, },
// 请求表单数据 // 请求表单数据
...@@ -391,12 +395,10 @@ export default { ...@@ -391,12 +395,10 @@ export default {
}); });
getFormList("/riskMain/add") getFormList("/riskMain/add")
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.columnsProjectName = res.data.projectInformations; this.columnsProjectName = res.data.projectInformations;
this.columnsFactor = res.data.riskInventories; this.columnsFactor = res.data.riskInventories;
this.columnsMainDutyDept = res.data.organizationList this.columnsMainDutyDept = res.data.organizationList;
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
...@@ -405,7 +407,7 @@ export default { ...@@ -405,7 +407,7 @@ export default {
}, },
// 请求已退回详情数据 // 请求已退回详情数据
postReturnEcho(){ postReturnEcho() {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
...@@ -415,42 +417,45 @@ export default { ...@@ -415,42 +417,45 @@ export default {
postriskConiCause(`/riskMain/edit/${this.taskId}`) postriskConiCause(`/riskMain/edit/${this.taskId}`)
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
// let msg = res.data.hdReport let msg = res.data.riskMain;
// // 对数据进行赋值 // 对数据进行赋值
this.id = msg.id
this.returnCause = res.data.reason; this.returnCause = res.data.reason;
// this.projectId = msg.proId; this.factor = msg.riskFactor;
// // 对所属工程数组筛选出 相同id 的工程名 this.source = msg.riskSource;
// let name = this.columnsProjectName.filter(item =>{ this.trouble = msg.accidentType;
// return item.id == msg.proId this.setRank = msg.riskLevel;
// }) this.riskRank = msg.riskLevel;
// this.projectName = name[0].projectName this.setRankMode = msg.gradingMethod;
// this.range = msg.hdRange this.location = msg.riskPosition;
// this.type = msg.hdType this.control = msg.controlLevel;
// this.dangerName = msg.hdProjectName this.technology = msg.technicalMeasures;
// this.dangerNum = msg.hdProjectId this.administration = msg.managementMeasures;
// this.dangerLevel = msg.hdLev this.urgent = msg.emergencyMeasure;
// this.findTime = msg.hdDiscoveryTime // this.projectId = msg.proId;
// this.source = msg.dangerId // 对主责部门和主责人员筛选出 相同id 的工程名
// this.source1 = msg.dangerSource this.mainDutyDeptId = msg.responsibilityDept;
// this.location = msg.hdPosition this.mainDutyDept = res.data.ResponsibilityMember.organizationName;
// this.describe = msg.hdDescribe this.mainDutyPeopLeId = msg.responsibilityMember;
// this.hdPicture1 = msg.hdPicture1 // 请求主责人员
// this.hdVideo1 = msg.hdVideo1 let formdata1 = new FormData();
// this.expireTime = msg.hdExpirationTime formdata1.append("organizationId", this.mainDutyDeptId);
// this.recPeople = msg.rectificationUser postHdPeople(`/riskMain/getUserList`, formdata1).then(res => {
this.columnsMainDutyPeopLe = res.data;
let deptMingzi = this.columnsMainDutyPeopLe.filter(item => {
return item.userId == msg.responsibilityMember;
});
this.mainDutyPeopLe = deptMingzi[0].userName;
});
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
}); });
}, },
// 所属工程名称 // 所属工程名称
onConProjectName(value) { onConProjectName(value) {
this.projectId = value.id; this.projectId = value.id;
...@@ -464,10 +469,9 @@ export default { ...@@ -464,10 +469,9 @@ export default {
this.source = ""; this.source = "";
this.trouble = ""; this.trouble = "";
// 请求风险源 // 请求风险源
postHdSource(`/riskMain/showSourceName/${this.factor}`).then(res =>{ postHdSource(`/riskMain/showSourceName/${this.factor}`).then(res => {
this.columnsSource = res.data this.columnsSource = res.data;
}) });
}, },
// 风险源 // 风险源
onConSource(value) { onConSource(value) {
...@@ -475,24 +479,26 @@ export default { ...@@ -475,24 +479,26 @@ export default {
this.showSource = false; this.showSource = false;
this.trouble = ""; this.trouble = "";
// 请求事故类型 // 请求事故类型
postHdType(`/riskMain/showaccidentType/${this.factor}/${this.source}`).then(res =>{ postHdType(
this.columnsTrouble = res.data `/riskMain/showaccidentType/${this.factor}/${this.source}`
}) ).then(res => {
this.columnsTrouble = res.data;
});
}, },
// 事故类型 // 事故类型
onConTrouble(value) { onConTrouble(value) {
this.trouble = value.accidentType; this.trouble = value.accidentType;
this.showTrouble = false; this.showTrouble = false;
//
}, },
// 风险定级 // 风险定级
onConSetRank(value) { onConSetRank(value) {
this.setRank = value; this.setRank = value;
this.riskRank = value; this.riskRank = value;
if(value == "重大风险" || value == "较大风险"){ if (value == "重大风险" || value == "较大风险") {
this.control = "企业级" this.control = "企业级";
}else{ } else {
this.control = "项目级" this.control = "项目级";
} }
this.showSetRank = false; this.showSetRank = false;
}, },
...@@ -503,23 +509,20 @@ export default { ...@@ -503,23 +509,20 @@ export default {
}, },
// 主责部门 // 主责部门
onConMainDutyDept(value) { onConMainDutyDept(value) {
this.mainDutyDeptId = value.deptId this.mainDutyDeptId = value.deptId;
this.mainDutyDept = value.deptName; this.mainDutyDept = value.deptName;
this.showMainDutyDept = false; this.showMainDutyDept = false;
this.mainDutyPeopLe = "" this.mainDutyPeopLe = "";
// 请求主责人员 // 请求主责人员
// 请求事故类型 let formdata = new FormData();
let formdata = new FormData() formdata.append("organizationId", this.mainDutyDeptId);
formdata.append("organizationId",this.mainDutyDeptId) postHdPeople(`/riskMain/getUserList`, formdata).then(res => {
postHdPeople(`/riskMain/getUserList`,formdata).then(res =>{ this.columnsMainDutyPeopLe = res.data;
this.columnsMainDutyPeopLe = res.data });
})
}, },
// 主责人员 // 主责人员
onConMainDutyPeopLe(value) { onConMainDutyPeopLe(value) {
this.mainDutyPeopLeId = value.userId this.mainDutyPeopLeId = value.userId;
this.mainDutyPeopLe = value.userName; this.mainDutyPeopLe = value.userName;
this.showMainDutyPeopLe = false; this.showMainDutyPeopLe = false;
}, },
......
<template>
<div>
<LHeader :text="text"></LHeader>
<!-- 内容列表 -->
<div class="con-list">
<div class="cell-wrap">
<p>风险上报</p>
<van-cell-group inset v-for="(item, index) in reportList" :key="index">
<van-row gutter="">
<van-col span="7"
><span class="field-title">所属工程名称:</span></van-col
>
<van-col span="17">{{ item.project }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">风险因素:</span></van-col
>
<van-col span="17">{{ item.subject }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"><span class="field-title">风险源:</span></van-col>
<van-col span="17">{{ item.findTime }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">事故类型:</span></van-col
>
<van-col span="17">{{ item.level }}</van-col>
</van-row>
<!-- 隐藏的字段 -->
<div v-show="reportOpen">
<van-row gutter="">
<van-col span="7"
><span class="field-title">风险等级:</span></van-col
>
<van-col span="17">{{ item.range }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">风险部位:</span></van-col
>
<van-col span="17">{{ item.type }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">管控层级:</span></van-col
>
<van-col span="17">{{ item.dangerNum }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">主责部门:</span></van-col
>
<van-col span="17">{{ item.source }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">主责人员:</span></van-col
>
<van-col span="17">{{ item.source1 }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">定级方式:</span></van-col
>
<van-col span="17">{{ item.location }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">技术措施:</span></van-col
>
<van-col span="17">{{ item.dangerNum }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">技术措施(附件):</span></van-col
>
<van-col span="17">{{ item.describe }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">管理措施:</span></van-col
>
<van-col span="17">{{ item.uploaderImg }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">管理措施(附件):</span></van-col
>
<van-col span="17">{{ item.uploaderVideo }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">应急措施:</span></van-col
>
<van-col span="17">{{ item.expireTime }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7"
><span class="field-title">应急措施(附件):</span></van-col
>
<van-col span="17">{{ item.recPeople }}</van-col>
</van-row>
</div>
</van-cell-group>
<!-- 展开 -->
<div class="more" @click="reportReverse">
{{ reportOpenText }}
</div>
</div>
<div class="journal-wrap">
<p>日志信息</p>
<van-cell-group inset v-for="(item, index) in reportList" :key="index">
<van-steps direction="vertical" :active="999">
<van-step>
<div class="step-wrap">
<van-row>
<van-col span="24"
><div class="info-title">日志信息</div></van-col
>
</van-row>
<van-row>
<van-col span="5"
><span class="field-title">审批人:</span></van-col
>
<van-col span="19">首华建设项目</van-col>
</van-row>
<van-row>
<van-col span="5"
><span class="field-title">节点</span></van-col
>
<van-col span="19">隐患上报</van-col>
</van-row>
<van-row>
<van-col span="5"
><span class="field-title">结果:</span></van-col
>
<van-col span="19">通过</van-col>
</van-row>
<van-row>
<van-col span="5"
><span class="field-title">部门:</span></van-col
>
<van-col span="19">首华建设项目部</van-col>
</van-row>
<van-row>
<van-col span="5"
><span class="field-title">时间:</span></van-col
>
<van-col span="19">2021-10-26 16:30:00</van-col>
</van-row>
</div>
</van-step>
</van-steps>
</van-cell-group>
<!-- 展开 -->
<div class="more" @click="journalReverse">
{{ journalOpenText }}
</div>
</div>
<div class="supervise-wrap">
<p>督办信息</p>
<van-cell-group inset v-for="(item, index) in reportList" :key="index">
<div style="text-align: center;">暂无数据</div>
</van-cell-group>
<!-- 展开 -->
<div class="more" @click="superviseReverse" v-show="false">
{{ superviseOpenText }}
</div>
</div>
</div>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
export default {
components: {
LHeader
},
data() {
return {
text: "风险确认详情",
reportOpen: false,
reportOpenText: "展开 ▼",
journalOpen: false,
journalOpenText: "展开 ▼",
superviseOpen: false,
superviseOpenText: "展开 ▼",
reportList: [
{
project: "朝阳区和平街14区简易住宅楼改造项目",
subject: "临时用电施工组织设计未对盾构施工用电进行专项说明。",
findTime: "2021-10-26 16:30:00",
level: "一般隐患A",
range: "城市轨道交通工程",
type: "临时用电",
dangerNum: "0-03-06-0003",
source: "违规活动",
source1: "人的因素",
location: "临时用电",
describe: "没按规定放置插排",
uploaderImg: [],
uploaderVideo: [],
expireTime: "2021-10-26 16:30:00",
recPeople: "张三"
}
],
journalList: []
};
},
mounted() {},
methods: {
// 上报信息显示或隐藏
reportReverse() {
this.reportOpen = !this.reportOpen;
if (this.reportOpen) {
this.reportOpenText = "收起 ▲";
} else {
this.reportOpenText = "展开 ▼";
}
},
// 日志信息显示或隐藏
journalReverse() {
this.journalOpen = !this.journalOpen;
if (this.journalOpen) {
// 显示所有数据
this.journalOpenText = "收起 ▲";
} else {
// 只渲染一条数据
this.journalOpenText = "展开 ▼";
}
},
// 督办信息显示或隐藏
superviseReverse() {
this.superviseOpen = !this.superviseOpen;
if (this.superviseOpen) {
// 显示所有数据
this.superviseOpenText = "收起 ▲";
} else {
// 只渲染一条数据
this.superviseOpenText = "展开 ▼";
}
}
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0.533333rem;
background-color: #f0f1f5;
.cell-wrap {
position: relative;
}
p {
font-size: 0.4rem;
font-weight: 600;
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;
}
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: bolder;
}
.field-title {
color: black;
font-weight: bolder;
}
.more {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: bolder;
z-index: 99;
}
}
</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