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

console.log

parent 0ecfb8f0
......@@ -23,7 +23,7 @@
data () {
return {
transitionName: 'slide-left',
cachePage:["add-danger","change-info","affirm-danger","risk-affirm","manager-survey","super-survey","major-survey"]
cachePage:["add-danger","change-info","affirm-danger","risk-affirm","manager-survey","super-survey","major-survey","risk-add"]
}
},
watch: {
......
......@@ -53,6 +53,24 @@ export function postReAdd(url,data) {
data
})
}
// 风险上报矩阵式定级
export function postMatrix(url,data) {
return request({
url: url,
method: 'post',
data
})
}
// 矩阵式定级判读风险等级的接口
export function postCalRiskLevel(url,data) {
return request({
url: url,
method: 'post',
data
})
}
// 风险确认列表
export function postriskConList(url,data) {
return request({
......
......@@ -302,7 +302,6 @@ export default {
},
beforeRouteLeave(to, from, next) {
if (to.name != "choose-people") {
// 如果去的路由是
this.projectId = ""; // 所属工程
this.taskId = "";
this.projectName = "";
......@@ -388,7 +387,6 @@ export default {
},
methods: {
onSubmit(values) {
console.log("submit", values);
let formdata = new FormData();
formdata.append("proId", this.projectId);
......@@ -520,7 +518,6 @@ export default {
this.dangerNum = "";
this.dangerLevel = "";
// 请求隐患项目名称的数据
console.log(this.range);
postHdName(`/hdreport/showHdName/${this.range}/${this.type}`).then(
(res) => {
this.columnsDangerName = res.data;
......
......@@ -136,7 +136,6 @@ export default {
activated() {},
methods: {
onSubmit(values) {
console.log("submit", values);
this.$toast.loading({
message: "提交中...",
forbidClick: true,
......
......@@ -74,7 +74,6 @@ export default {
},
methods: {
onSubmit(values) {
console.log("submit", values);
this.$toast.loading({
message: "提交中...",
forbidClick: true,
......
......@@ -89,7 +89,6 @@ export default {
},
methods: {
onSearch(val) {
console.log(val);
},
postList(){
this.$toast.loading({
......@@ -128,7 +127,6 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params: {
......@@ -139,7 +137,6 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data);
this.$router.push({
name:"change-info",
params:{
......@@ -150,7 +147,6 @@ export default {
},
// 延期
goDelay(data) {
console.log(data);
this.$router.push({
name:"delay-info",
params:{
......
......@@ -227,7 +227,6 @@ export default {
// 保存时的操作
onSubmit(values) {
console.log("submit", values);
if (!this.taskId) {
return;
}
......
......@@ -78,7 +78,6 @@ export default {
},
methods: {
onSearch(val) {
console.log(val);
},
postList() {
this.$toast.loading({
......@@ -118,7 +117,6 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params: {
......@@ -129,7 +127,6 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data);
this.$router.push({
name: "affirm-danger",
params: {
......
......@@ -106,7 +106,6 @@ export default {
/*接口对接3 END*/
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
......@@ -126,7 +125,6 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "risk-big-detail",
params: {
......@@ -137,7 +135,6 @@ export default {
},
// 审批
goConfirm(data) {
console.log(data);
this.$router.push({
name:"ratify-info",
params:{
......
......@@ -90,7 +90,6 @@ export default {
methods: {
onSubmit(values) {
console.log("submit", values);
this.$toast.loading({
message: "提交中...",
forbidClick: true,
......
......@@ -120,7 +120,6 @@ export default {
/*接口对接3 END*/
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
......@@ -140,7 +139,6 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params:{
......@@ -151,7 +149,6 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data);
this.$router.push({
name: "major-survey",
params: {
......
......@@ -151,7 +151,6 @@ export default {
},
onSubmit(values) {
console.log("submit", values);
this.$toast.loading({
message: "提交中...",
forbidClick: true,
......
......@@ -118,7 +118,6 @@ export default {
/*接口对接3 END*/
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
......@@ -138,7 +137,6 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params:{
......@@ -149,7 +147,6 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data);
this.$router.push({
name: "manager-survey",
params: {
......
......@@ -77,7 +77,6 @@ export default {
if (from.name === "manager-danger") {
vm.messageList = [];
let paramsData = to.params.data;
console.log(paramsData);
vm.taskId = paramsData.taskId;
vm.pid = paramsData.pid;
vm.messageList.push(paramsData);
......@@ -88,7 +87,6 @@ export default {
created() {},
methods: {
onSubmit(values) {
console.log("submit", values);
this.$toast.loading({
message: "提交中...",
forbidClick: true,
......
......@@ -103,7 +103,6 @@ export default {
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
......@@ -122,7 +121,6 @@ export default {
// 提交
goSubmit(data) {
console.log(data);
this.$router.push({
name: "add-danger",
params: {
......@@ -134,7 +132,6 @@ export default {
},
// 删除
goDelete(data) {
console.log(data);
this.$toast.loading({
message: "删除中...",
forbidClick: true,
......
......@@ -85,7 +85,6 @@ export default {
},
methods: {
onSearch(val) {
console.log(val);
},
postList() {
......@@ -127,7 +126,6 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params: {
......@@ -138,7 +136,6 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data);
this.$router.push({
name: "review-add",
params: {
......
......@@ -148,7 +148,6 @@ export default {
},
onSubmit(values) {
console.log("submit", values);
this.$toast.loading({
message: "提交中...",
forbidClick: true,
......
......@@ -83,7 +83,6 @@ export default {
},
methods: {
onSearch(val) {
console.log(val);
},
postList() {
......@@ -125,7 +124,6 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params:{
......
......@@ -114,7 +114,6 @@ export default {
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
......@@ -134,7 +133,6 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params: {
......@@ -145,7 +143,6 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data);
this.$router.push({
name: "super-survey",
params: {
......
......@@ -88,7 +88,6 @@ export default {
created() {},
methods: {
onSubmit(values) {
console.log("submit", values);
this.$toast.loading({
message: "提交中...",
forbidClick: true,
......
......@@ -104,7 +104,6 @@ export default {
methods: {
// 点击类别
clickCategory(index, data) {
console.log(12312312310);
this.activeIndex = index;
this.activeVal = this.messageCategory[index].category;
// 点击全部还是已读还是未读
......@@ -113,7 +112,6 @@ export default {
// 搜索事件
onSearch(val) {
console.log(val);
},
// 封装全部 已读 和 未读的方法
......@@ -129,7 +127,6 @@ export default {
// 点击消息条目时的点击事件 变成已读
read(data) {
console.log("触发了点击事件");
// 判断showIndex是否等于null 如果不等于则先将showIndex改为null
this.showIndex = null;
if (data.status == "未读") {
......@@ -216,12 +213,10 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.showIndex = null;
},
// 删除
goDelete(data) {
console.log(123);
this.showIndex = null;
}
}
......
......@@ -74,7 +74,6 @@ export default {
// 点击类别
selectCategory(index, data) {
this.activeIndex = index;
console.log(data);
},
// 搜索事件
......
......@@ -74,13 +74,11 @@ export default {
// 点击类别
selectCategory(index, data) {
this.activeIndex = index;
console.log(data);
},
// 搜索事件
onSearch(val) {
if (val !== "") {
console.log(val);
}
},
......
......@@ -119,7 +119,6 @@ export default {
/*接口对接3 END*/
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
......@@ -139,7 +138,6 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "risk-big-detail",
params: {
......
......@@ -299,9 +299,73 @@ import {
postRiskShowMeasures
} from "@/service/risk";
export default {
name:"risk-add",
components: {
LHeader
},
activated() {
this.showSetRank = false // 再次关闭弹出层 以防万一
if (this.$route.params.status) {
this.isShowreturnCause = true;
this.text = "风险上报退回";
this.taskId = this.$route.params.taskId;
this.postReturnEcho();
}
this.getList();
this.$bus.$on("riskLevelBus", res => {
this.showSetRank = false // 再次关闭弹出层 以防万一
this.riskRank = res
});
},
beforeRouteLeave(to, from, next) {
if (to.name != "matrix-grad") {
this.taskId = "",
this.id = "",
this.projectId = "", // 所属工程
this.projectName = "", // 所属工程
this.showProjectName = false,
this.columnsProjectName = [],
this.factor = "", //风险因素
this.showFactor = false,
this.columnsFactor = [],
this.source = "", //风险源
this.showSource = false,
this.columnsSource = [],
this.trouble = "", //事故类型
this.showTrouble = false,
this.columnsTrouble = [],
this.setRank = "", //风险定级
this.showSetRank = false,
this.columnsSetRank = ["矩阵式定级", "其他定级方式"],
this.riskRank = "", // 风险等级
this.showRiskRank = false,
this.columnsRiskRank = ["一般风险", "较小风险", "较大风险", "重大风险"],
this.setRankMode = "", // 定级方式文字
this.setRankModeImg = [], // 定级方式图片
this.location = "", //风险部位
this.control = "", //管控层级
this.showControl = false,
this.columnsControl = ["项目级", "企业级"],
this.mainDutyDept = "", // 主责部门
this.mainDutyDeptId = "",
this.showMainDutyDept = false,
this.columnsMainDutyDept = [],
this.mainDutyPeopLe = "", // 主责人员
this.mainDutyPeopLeId = "",
this.showMainDutyPeopLe = false,
this.columnsMainDutyPeopLe = [],
this.technology = "", //技术措施文字
this.technologyImg = [], //技术措施图片
this.administration = "", //管理措施文字
this.administrationImg = [], //管理措施图片
this.urgent = "", //应急措施文字
this.urgentImg = [], //应急措施图片
this.returnCause = "", // 退回原因
this.isShowreturnCause = false
}
next();
},
data() {
return {
taskId: "",
......@@ -361,7 +425,6 @@ export default {
},
methods: {
onSubmit(values) {
console.log("submit", values);
let formdata = new FormData();
formdata.append("pId", this.projectId);
formdata.append("riskFactor", this.factor);
......@@ -515,7 +578,6 @@ export default {
postRiskShowMeasures(
`/riskMain/showmeasures/${this.factor}/${this.source}/${this.trouble}`
).then(res => {
console.log(res.data);
this.technology = res.data[0].measuresProject;
this.administration = res.data[0].measuresAdministration;
this.urgent = res.data[0].measuresEmergency;
......@@ -523,10 +585,11 @@ export default {
},
// 风险定级
onConSetRank(value) {
this.showSetRank = false;
this.setRank = value;
this.riskRank = "";
this.showSetRank = false;
if (this.setRank == "矩阵式定级") {
this.showSetRank = false;
this.$router.push({
name: "matrix-grad"
});
......
......@@ -4,7 +4,7 @@
<div class="content-wrap">
<van-checkbox-group v-model="happenSelect">
<van-cell-group>
<van-cell title="发生可能性" is-link arrow-direction="down" />
<van-cell title="发生可能性" is-link arrow-direction="down" />
<van-cell
v-for="(item, index) in happenList"
clickable
......@@ -24,7 +24,7 @@
<div class="content-wrap">
<van-checkbox-group v-model="resultSelect">
<van-cell-group>
<van-cell title="发生可能性" is-link arrow-direction="down" />
<van-cell title="后果严重性" is-link arrow-direction="down" />
<van-cell
v-for="(item, index) in resultList"
clickable
......@@ -47,43 +47,52 @@ export default {
data() {
return {
happenList: [
"企业半年内发生2起一般安全生产事故的",
"企业1年内发生3起一般安全生产事故的",
"企业1年内发生1起较大及其以上生产安全事故的",
"超限高层建筑",
"采用新技术、新工艺、新设备、新材料、尚无国家、行业及地方技术标准",
"工程项目施工工期压缩超过30%或者工期压缩未采用技术措施的",
"企业半年内发生2起一般安全生产事故的",
"企业1年内发生3起一般安全生产事故的",
"企业1年内发生1起较大及其以上生产安全事故的",
"超限高层建筑",
"采用新技术、新工艺、新设备、新材料、尚无国家、行业及地方技术标准",
"工程项目施工工期压缩超过30%或者工期压缩未采用技术措施的"
],
happenSelect: [],
resultList: [
"企业半年内发生2起一般安全生产事故的",
"企业1年内发生3起一般安全生产事故的",
"企业1年内发生1起较大及其以上生产安全事故的",
"超限高层建筑",
"采用新技术、新工艺、新设备、新材料、尚无国家、行业及地方技术标准",
"工程项目施工工期压缩超过30%或者工期压缩未采用技术措施的",
"企业半年内发生2起一般安全生产事故的",
"企业1年内发生3起一般安全生产事故的",
"企业1年内发生1起较大及其以上生产安全事故的",
"超限高层建筑",
"采用新技术、新工艺、新设备、新材料、尚无国家、行业及地方技术标准",
"工程项目施工工期压缩超过30%或者工期压缩未采用技术措施的"
],
resultSelect: [],
resultSelect: []
};
},
mounted() {},
methods: {
happenToggle(index, val) {
this.$refs.happen[index].toggle();
console.log(this.$refs.happen[index].name);
},
resultToggle(index, val) {
this.$refs.result[index].toggle();
console.log(this.$refs.result[index].name);
},
compute() {
if (this.happenSelect.length == 0) {
this.$toast.fail("必须选择发生可能性");
return;
} else if (this.resultSelect.length == 0) {
this.$toast.fail("必须选择后果严重性");
return;
}
let topNum = 5;
let bottomNum = 5;
return {a:topNum, b:bottomNum}
}
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.content-wrap{
margin-bottom: .266667rem;
.content-wrap {
margin-bottom: 0.266667rem;
}
</style>
<template>
<div>
<div>
<LHeader :text="text"></LHeader>
<van-tabs v-model="active" @click="onClick" title-inactive-colo="#d0d1d1" color="#247df7"
title-active-color="#000000">
<van-tab title="指标评估">
<target></target>
</van-tab>
<van-tab title="条件评估">
<condition></condition>
</van-tab>
</van-tabs>
<!-- <div style="margin:10px 16px 0px;padding-bottom:16px">
<van-button round block type="info" @click.native="onDefine"
<!-- 内容列表 -->
<div class="con-list">
<van-tabs
v-model="active"
@click="onClick"
title-inactive-colo="#d0d1d1"
color="#247df7"
title-active-color="#000000"
>
<van-tab title="指标评估">
<target ref="target"></target>
</van-tab>
<van-tab title="条件评估">
<condition ref="condition"></condition>
</van-tab>
</van-tabs>
<div style="background-color: white; padding: 16px">
<van-button round block type="info" @click.native="onDefine"
>确认</van-button
>
<br>
<van-button round block type="warning" @click.native="cancel"
>取消</van-button
>
</div> -->
<br />
<van-button round block type="warning" @click.native="cancel"
>取消</van-button
>
</div>
</div>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import Target from './target.vue';
import Condition from './condition.vue';
import Target from "./target.vue";
import Condition from "./condition.vue";
import { postCalRiskLevel } from "@/service/risk";
export default {
name: "matrix-grad",
components: {
......@@ -39,15 +49,53 @@ export default {
active: "0"
};
},
mounted() {},
methods: {
onClick(val) {
console.log(val);
},
onDefine(){
onDefine() {
if (this.active == 0) {
let objDataTarget = this.$refs.target.compute();
if (objDataTarget) {
let { a, b } = objDataTarget;
this.getLevel(a, b);
}
} else {
let objDatacondition = this.$refs.condition.compute();
if (objDatacondition) {
let { a, b } = objDatacondition;
this.getLevel(a, b);
}
}
},
cancel() {
// 计算风险等级的接口
getLevel(possibilityLevel, consequenceLevel) {
this.$toast.loading({
message: "提交中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
postCalRiskLevel(
`/riskMain/calRiskLevel/${possibilityLevel}/${consequenceLevel}`
)
.then(res => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000
});
this.$bus.$emit("riskLevelBus", res.data.evaluateLevel)
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
},
cancel() {
this.$router.go(-1);
}
}
......@@ -55,4 +103,7 @@ export default {
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.con-list {
background-color: #f0f1f5;
}
</style>
......@@ -114,7 +114,6 @@ export default {
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
......@@ -133,7 +132,6 @@ export default {
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "risk-big-detail",
params: {
......@@ -144,7 +142,6 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data);
this.$router.push({
name: "risk-affirm",
params: {
......
......@@ -64,7 +64,7 @@
</van-field>
<!-- 同意时的选项 -->
<div class="agree" v-if="radio == 1">
<div class="agree" v-if="radio == '1'">
<van-field
v-model="agreeIdea"
label="意见"
......@@ -130,7 +130,7 @@ export default {
vm.taskId = paramsData.taskId;
vm.messageList.push(paramsData);
vm.agreeIdea = "";
vm.disagreeIdea = []; // 隐患整改人
vm.disagreeIdea = ""; // 隐患整改人
}
});
},
......@@ -141,7 +141,6 @@ export default {
},
onSubmit(values) {
console.log("submit", values);
if (!this.taskId) {
return;
}
......
......@@ -114,7 +114,6 @@ export default {
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
......@@ -133,7 +132,6 @@ export default {
// 重新上报
goDetail(data) {
console.log(data);
this.$router.push({
name: 'risk-add',
params: {
......@@ -145,7 +143,6 @@ export default {
},
// 删除
goDelete(data) {
console.log(data);
this.$toast.loading({
message: "删除中...",
forbidClick: true,
......
......@@ -43,7 +43,7 @@
<!-- 风控分级管控 -->
<van-cell-group inset v-if="finalRiskList.length > 0">
<van-cell value="风分级管控" />
<van-cell value="风分级管控" />
<van-grid :column-num="5">
<van-grid-item
@click="riskJump(item.path)"
......@@ -262,7 +262,6 @@ export default {
},
methods: {
myClick(data) {
console.log(data);
},
jump(path) {
if (path) {
......@@ -281,7 +280,6 @@ export default {
},
// 搜索事件
onSearch(val) {
console.log(val);
},
// 请求工作台列表
getWorkList() {
......
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