Commit 736408fb authored by 薄玉虎's avatar 薄玉虎

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

parents 62fddfc7 58e79dee
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
data () { data () {
return { return {
transitionName: 'slide-left', 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","notice"]
} }
}, },
watch: { watch: {
......
...@@ -3,9 +3,8 @@ ...@@ -3,9 +3,8 @@
<van-tabbar v-model="active" @change="onChange"> <van-tabbar v-model="active" @change="onChange">
<van-tabbar-item <van-tabbar-item
v-for="(item,index) in tabBarList" v-for="(item,index) in tabBarList"
:key="item.key" :key="index"
:icon="active == index?item.imgUrlActive: item.imgUrl" :icon="active==item.name?item.imgUrlActive: item.imgUrl"
:to="item.path"
>{{ item.text }}</van-tabbar-item >{{ item.text }}</van-tabbar-item
> >
</van-tabbar> </van-tabbar>
...@@ -54,15 +53,18 @@ export default { ...@@ -54,15 +53,18 @@ export default {
}, },
mounted() { mounted() {
this.active = this.index this.active = this.index
this.tabBarList.forEach((item)=>{
if(item.name==this.active){
this.$router.push(item.path)
}
})
}, },
methods: { methods: {
onChange(index) { onChange(index) {
this.active = index; this.active = index;
if(this.active==index){
this.tabBarList.forEach((item)=>{
if(item.name==this.active){
this.$router.push(item.path)
}
})
}else{
}
} }
} }
}; };
......
...@@ -53,6 +53,24 @@ export function postReAdd(url,data) { ...@@ -53,6 +53,24 @@ export function postReAdd(url,data) {
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) { export function postriskConList(url,data) {
return request({ return request({
......
...@@ -29,16 +29,19 @@ ...@@ -29,16 +29,19 @@
<div>检查地点:{{item.address}}</div> <div>检查地点:{{item.address}}</div>
<div>是否提交:{{item.finish?'已提交':'未提交'}}</div> <div>是否提交:{{item.finish?'已提交':'未提交'}}</div>
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue' import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table' import { getFun,postFun } from '@/service/table'
export default { export default {
name: 'checked', name: 'checked',
components: { components: {
"LHeader":LHeader "LHeader":LHeader,
"tabBar":tabBar
}, },
data() { data() {
return { return {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<template> <template>
<div> <div>
<LHeader v-bind:text="text"></LHeader> <LHeader v-bind:text="text"></LHeader>
<van-tabs v-model="active"> <van-tabs v-model="active" :swipe-threshold="3" >
<van-tab v-for="(item,index) in tableData" :key="index" :title="item.title"> <van-tab v-for="(item,index) in tableData" :key="index" :title="item.title">
<table border="1" cellspacing="0"> <table border="1" cellspacing="0">
<thead> <thead>
...@@ -46,15 +46,18 @@ ...@@ -46,15 +46,18 @@
</van-tab> --> </van-tab> -->
</van-tabs> </van-tabs>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue' import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table' import { getFun,postFun } from '@/service/table'
export default { export default {
name: 'formwork', name: 'formwork',
components: { components: {
"LHeader":LHeader "LHeader":LHeader,
"tabBar":tabBar
}, },
data() { data() {
return { return {
......
...@@ -19,21 +19,24 @@ ...@@ -19,21 +19,24 @@
<div>检查地点:{{nums.address}}</div> <div>检查地点:{{nums.address}}</div>
</div> </div>
<div class="button-more"> <div class="button-more">
<van-button type="primary" round size="large" @click="problem" :disabled="finish=='true'?true:false">检查问题上报{{nums.addTroubleNumber}}</van-button> <van-button type="primary" round size="large" @click="problem" :disabled="finish=='true'?true:false">检查问题上报{{'('+nums.addTroubleNumber+')'}}</van-button>
<van-button type="primary" round size="large" @click="formwork">检查清单模板{{nums.listNumber}}</van-button> <van-button type="primary" round size="large" @click="formwork">检查清单模板{{'('+nums.listNumber+')'}}</van-button>
<van-button type="primary" round size="large" @click="note" :disabled="nums.troubleNumber<1?true:false">检查问题记录{{nums.troubleNumber}}</van-button> <van-button type="primary" round size="large" @click="note" :disabled="nums.troubleNumber<1?true:false">检查问题记录{{'('+nums.troubleNumber+')'}}</van-button>
<van-button type="primary" round size="large" @click="end" :disabled="finish=='true'?true:false">结束上报</van-button> <van-button type="primary" round size="large" @click="end" :disabled="finish=='true'?true:false">结束上报</van-button>
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue' import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table' import { getFun,postFun } from '@/service/table'
export default { export default {
name: 'problem', name: 'problem',
components: { components: {
"LHeader":LHeader "LHeader":LHeader,
"tabBar":tabBar
}, },
data() { data() {
return { return {
......
...@@ -74,16 +74,19 @@ ...@@ -74,16 +74,19 @@
<van-button round block type="info" native-type="submit">提交</van-button> <van-button round block type="info" native-type="submit">提交</van-button>
</div> </div>
</van-form> </van-form>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue' import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table' import { getFun,postFun } from '@/service/table'
export default { export default {
name: 'list', name: 'list',
components: { components: {
"LHeader":LHeader "LHeader":LHeader,
"tabBar":tabBar
}, },
data() { data() {
return { return {
......
...@@ -25,17 +25,20 @@ ...@@ -25,17 +25,20 @@
<van-button round type="defult" @click="cancel" :disabled="finish=='true'?true:false">取消</van-button> <van-button round type="defult" @click="cancel" :disabled="finish=='true'?true:false">取消</van-button>
<van-button round type="info" @click="commit" :disabled="finish=='true'?true:false">提交</van-button> <van-button round type="info" @click="commit" :disabled="finish=='true'?true:false">提交</van-button>
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue' import LHeader from '@/components/header.vue'
import { ContactList } from 'vant'; import { ContactList } from 'vant';
import { getFun,postFun } from '@/service/table' import { getFun,postFun } from '@/service/table'
export default { export default {
name: 'note', name: 'note',
components: { components: {
"LHeader":LHeader "LHeader":LHeader,
"tabBar":tabBar
}, },
data() { data() {
return { return {
......
...@@ -302,7 +302,6 @@ export default { ...@@ -302,7 +302,6 @@ export default {
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
if (to.name != "choose-people") { if (to.name != "choose-people") {
// 如果去的路由是
this.projectId = ""; // 所属工程 this.projectId = ""; // 所属工程
this.taskId = ""; this.taskId = "";
this.projectName = ""; this.projectName = "";
...@@ -388,7 +387,6 @@ export default { ...@@ -388,7 +387,6 @@ export default {
}, },
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values);
let formdata = new FormData(); let formdata = new FormData();
formdata.append("proId", this.projectId); formdata.append("proId", this.projectId);
...@@ -520,7 +518,6 @@ export default { ...@@ -520,7 +518,6 @@ export default {
this.dangerNum = ""; this.dangerNum = "";
this.dangerLevel = ""; this.dangerLevel = "";
// 请求隐患项目名称的数据 // 请求隐患项目名称的数据
console.log(this.range);
postHdName(`/hdreport/showHdName/${this.range}/${this.type}`).then( postHdName(`/hdreport/showHdName/${this.range}/${this.type}`).then(
(res) => { (res) => {
this.columnsDangerName = res.data; this.columnsDangerName = res.data;
......
...@@ -44,7 +44,6 @@ export default { ...@@ -44,7 +44,6 @@ export default {
}, },
created() { created() {
this.source = this.$route.params.source this.source = this.$route.params.source
console.log(this.source);
if(this.source){ if(this.source){
this.getList() this.getList()
} }
...@@ -72,7 +71,6 @@ export default { ...@@ -72,7 +71,6 @@ export default {
this.$refs.checkboxes[index].toggle(); this.$refs.checkboxes[index].toggle();
}, },
confirm() { confirm() {
console.log(this.result);
this.$bus.$emit("sourceAyy",this.result) this.$bus.$emit("sourceAyy",this.result)
this.$router.go(-1) this.$router.go(-1)
}, },
......
...@@ -136,7 +136,6 @@ export default { ...@@ -136,7 +136,6 @@ export default {
activated() {}, activated() {},
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values);
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
......
...@@ -74,7 +74,6 @@ export default { ...@@ -74,7 +74,6 @@ export default {
}, },
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values);
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
......
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="5">所属项目:</van-col>
...@@ -44,13 +43,13 @@ ...@@ -44,13 +43,13 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>确认</van-button >确认</van-button
> >
<van-button round type="info" @touchstart="goDelay(item)" <van-button round type="info" @click="goDelay(item)"
>延期</van-button >延期</van-button
> >
</div> </div>
...@@ -89,7 +88,6 @@ export default { ...@@ -89,7 +88,6 @@ export default {
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
console.log(val);
}, },
postList(){ postList(){
this.$toast.loading({ this.$toast.loading({
...@@ -112,23 +110,14 @@ export default { ...@@ -112,23 +110,14 @@ export default {
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
...@@ -139,7 +128,6 @@ export default { ...@@ -139,7 +128,6 @@ export default {
}, },
// 确认 // 确认
goConfirm(data) { goConfirm(data) {
console.log(data);
this.$router.push({ this.$router.push({
name:"change-info", name:"change-info",
params:{ params:{
...@@ -150,7 +138,6 @@ export default { ...@@ -150,7 +138,6 @@ export default {
}, },
// 延期 // 延期
goDelay(data) { goDelay(data) {
console.log(data);
this.$router.push({ this.$router.push({
name:"delay-info", name:"delay-info",
params:{ params:{
......
...@@ -227,7 +227,6 @@ export default { ...@@ -227,7 +227,6 @@ export default {
// 保存时的操作 // 保存时的操作
onSubmit(values) { onSubmit(values) {
console.log("submit", values);
if (!this.taskId) { if (!this.taskId) {
return; return;
} }
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="5">所属项目:</van-col>
...@@ -35,10 +34,10 @@ ...@@ -35,10 +34,10 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>确认</van-button >确认</van-button
> >
</div> </div>
...@@ -78,7 +77,6 @@ export default { ...@@ -78,7 +77,6 @@ export default {
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
console.log(val);
}, },
postList() { postList() {
this.$toast.loading({ this.$toast.loading({
...@@ -102,23 +100,15 @@ export default { ...@@ -102,23 +100,15 @@ export default {
}); });
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
...@@ -129,7 +119,6 @@ export default { ...@@ -129,7 +119,6 @@ export default {
}, },
// 确认 // 确认
goConfirm(data) { goConfirm(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "affirm-danger", name: "affirm-danger",
params: { params: {
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
...@@ -35,10 +34,10 @@ ...@@ -35,10 +34,10 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>审批</van-button >审批</van-button
> >
</div> </div>
...@@ -106,27 +105,18 @@ export default { ...@@ -106,27 +105,18 @@ export default {
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch(val) { onSearch(val) {
console.log(val);
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "risk-big-detail", name: "risk-big-detail",
params: { params: {
...@@ -137,7 +127,6 @@ export default { ...@@ -137,7 +127,6 @@ export default {
}, },
// 审批 // 审批
goConfirm(data) { goConfirm(data) {
console.log(data);
this.$router.push({ this.$router.push({
name:"ratify-info", name:"ratify-info",
params:{ params:{
......
...@@ -90,7 +90,6 @@ export default { ...@@ -90,7 +90,6 @@ export default {
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values);
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
...@@ -35,10 +34,10 @@ ...@@ -35,10 +34,10 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>审批</van-button >审批</van-button
> >
</div> </div>
...@@ -120,27 +119,17 @@ export default { ...@@ -120,27 +119,17 @@ export default {
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch(val) { onSearch(val) {
console.log(val);
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params:{ params:{
...@@ -151,7 +140,6 @@ export default { ...@@ -151,7 +140,6 @@ export default {
}, },
// 确认 // 确认
goConfirm(data) { goConfirm(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "major-survey", name: "major-survey",
params: { params: {
......
...@@ -151,7 +151,6 @@ export default { ...@@ -151,7 +151,6 @@ export default {
}, },
onSubmit(values) { onSubmit(values) {
console.log("submit", values);
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
...@@ -34,10 +33,10 @@ ...@@ -34,10 +33,10 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>批示</van-button >批示</van-button
> >
</div> </div>
...@@ -118,27 +117,18 @@ export default { ...@@ -118,27 +117,18 @@ export default {
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch(val) { onSearch(val) {
console.log(val);
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params:{ params:{
...@@ -149,7 +139,6 @@ export default { ...@@ -149,7 +139,6 @@ export default {
}, },
// 确认 // 确认
goConfirm(data) { goConfirm(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "manager-survey", name: "manager-survey",
params: { params: {
......
...@@ -77,7 +77,6 @@ export default { ...@@ -77,7 +77,6 @@ export default {
if (from.name === "manager-danger") { if (from.name === "manager-danger") {
vm.messageList = []; vm.messageList = [];
let paramsData = to.params.data; let paramsData = to.params.data;
console.log(paramsData);
vm.taskId = paramsData.taskId; vm.taskId = paramsData.taskId;
vm.pid = paramsData.pid; vm.pid = paramsData.pid;
vm.messageList.push(paramsData); vm.messageList.push(paramsData);
...@@ -88,7 +87,6 @@ export default { ...@@ -88,7 +87,6 @@ export default {
created() {}, created() {},
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values);
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
......
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="5">所属项目:</van-col>
...@@ -39,10 +38,10 @@ ...@@ -39,10 +38,10 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goSubmit(item)" <van-button round type="primary" @click="goSubmit(item)"
>上报</van-button >上报</van-button
> >
<van-button round type="warning" @touchstart="goDelete(item)" <van-button round type="warning" @click="goDelete(item)"
>删除</van-button >删除</van-button
> >
</div> </div>
...@@ -103,26 +102,16 @@ export default { ...@@ -103,26 +102,16 @@ export default {
}, },
onSearch(val) { onSearch(val) {
console.log(val);
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 提交 // 提交
goSubmit(data) { goSubmit(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "add-danger", name: "add-danger",
params: { params: {
...@@ -134,7 +123,6 @@ export default { ...@@ -134,7 +123,6 @@ export default {
}, },
// 删除 // 删除
goDelete(data) { goDelete(data) {
console.log(data);
this.$toast.loading({ this.$toast.loading({
message: "删除中...", message: "删除中...",
forbidClick: true, forbidClick: true,
......
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="5">所属项目:</van-col>
...@@ -43,10 +42,10 @@ ...@@ -43,10 +42,10 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>确认</van-button >确认</van-button
> >
</div> </div>
...@@ -85,7 +84,6 @@ export default { ...@@ -85,7 +84,6 @@ export default {
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
console.log(val);
}, },
postList() { postList() {
...@@ -111,23 +109,15 @@ export default { ...@@ -111,23 +109,15 @@ export default {
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
...@@ -138,7 +128,6 @@ export default { ...@@ -138,7 +128,6 @@ export default {
}, },
// 确认 // 确认
goConfirm(data) { goConfirm(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "review-add", name: "review-add",
params: { params: {
......
...@@ -147,7 +147,6 @@ export default { ...@@ -147,7 +147,6 @@ export default {
}, },
onSubmit(values) { onSubmit(values) {
console.log("submit", values);
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="5">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col> <van-col span="19">{{ item.proId }}</van-col>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
</div> </div>
...@@ -83,7 +83,6 @@ export default { ...@@ -83,7 +83,6 @@ export default {
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
console.log(val);
}, },
postList() { postList() {
...@@ -109,23 +108,14 @@ export default { ...@@ -109,23 +108,14 @@ export default {
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params:{ params:{
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患编号:</van-col> <van-col span="7">隐患编号:</van-col>
...@@ -33,10 +32,10 @@ ...@@ -33,10 +32,10 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>批示</van-button >批示</van-button
> >
</div> </div>
...@@ -114,27 +113,17 @@ export default { ...@@ -114,27 +113,17 @@ export default {
}, },
onSearch(val) { onSearch(val) {
console.log(val);
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
...@@ -145,7 +134,6 @@ export default { ...@@ -145,7 +134,6 @@ export default {
}, },
// 确认 // 确认
goConfirm(data) { goConfirm(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "super-survey", name: "super-survey",
params: { params: {
......
...@@ -88,7 +88,6 @@ export default { ...@@ -88,7 +88,6 @@ export default {
created() {}, created() {},
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values);
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
<div class="message-wrap"> <div class="message-wrap">
<!-- 标签 --> <!-- 标签 -->
<div class="category-wrap"> <div class="category-wrap">
<!-- <span class="my-tag-style active">全部</span>
<span class="my-tag-style">已读</span>
<span class="my-tag-style">未读</span> -->
<span <span
class="my-tag-style" class="my-tag-style"
:class="index == activeIndex ? 'active' : ''" :class="index == activeIndex ? 'active' : ''"
...@@ -34,10 +31,9 @@ ...@@ -34,10 +31,9 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@click="read(item)" @click="touchstart(index, item)"
@touchstart="touchstart(index, item)"
@touchend="touchend(index)"
> >
<!--@touchend.prevent="touchend(index)" 长按备份-->
<div class="messgae-title">{{ item.noticeTitle }}</div> <div class="messgae-title">{{ item.noticeTitle }}</div>
<div class="message-content"> <div class="message-content">
{{ item.upcomingUserName }},您好!您有一条来自{{ {{ item.upcomingUserName }},您好!您有一条来自{{
...@@ -49,12 +45,16 @@ ...@@ -49,12 +45,16 @@
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goConfirm(item)" <!-- @touchstart="goDetail(item)" 长按备份-->
<van-button round type="info" @click="goConfirm(item)"
>整改</van-button >整改</van-button
> >
<van-button round type="warning" @click="read(item)" v-if="item.status == '未读'"
>已读</van-button
>
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
messageCategory: [ messageCategory: [
{ {
key: "0", key: "0",
category: "全部" category: "未读"
}, },
{ {
key: "1", key: "1",
...@@ -82,11 +82,11 @@ export default { ...@@ -82,11 +82,11 @@ export default {
}, },
{ {
key: "2", key: "2",
category: "未读" category: "全部"
} }
], ],
activeIndex: 0, activeIndex: 0,
activeVal: "全部", activeVal: "未读",
searchVal: "", searchVal: "",
messageList: [], // 消息列表 messageList: [], // 消息列表
// refreshing: false, // 下拉刷新开关 // refreshing: false, // 下拉刷新开关
...@@ -98,13 +98,13 @@ export default { ...@@ -98,13 +98,13 @@ export default {
}; };
}, },
created() { created() {
this.getMessageList();
this.unRead(); this.unRead();
}, },
methods: { methods: {
// 点击类别 // 点击类别
clickCategory(index, data) { clickCategory(index, data) {
console.log(12312312310); // 关闭遮罩层
this.showIndex = null;
this.activeIndex = index; this.activeIndex = index;
this.activeVal = this.messageCategory[index].category; this.activeVal = this.messageCategory[index].category;
// 点击全部还是已读还是未读 // 点击全部还是已读还是未读
...@@ -155,6 +155,8 @@ export default { ...@@ -155,6 +155,8 @@ export default {
if (res.code == 0) { if (res.code == 0) {
// 向父组件发送消息条数 // 向父组件发送消息条数
this.$emit("messageLength", res.total); this.$emit("messageLength", res.total);
// 给消息列表赋值
this.messageList = res.rows
} }
}); });
}, },
...@@ -197,30 +199,31 @@ export default { ...@@ -197,30 +199,31 @@ export default {
// } // }
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器 // clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return; // return;
} }
this.Loop = setTimeout( this.showIndex = index;
function() { // this.Loop = setTimeout(
this.showIndex = index; // function() {
}.bind(this), // this.showIndex = index;
300 // }.bind(this),
); // 这里的1000是指需要长按的时间,单位为ms // 0
}, // ); // 这里的1000是指需要长按的时间,单位为ms
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearTimeout(this.Loop);
}, },
// touchend(index) {
// // 这个方法主要是用来将每次手指移出之后将计时器清零 长按备份
// clearTimeout(this.Loop);
// },
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data); console.log(data);
this.showIndex = null; this.showIndex = null;
}, },
// 删除 // 整改
goDelete(data) { goConfirm(data) {
console.log(123); console.log(123);
this.showIndex = null; this.showIndex = null;
} }
......
...@@ -74,7 +74,6 @@ export default { ...@@ -74,7 +74,6 @@ export default {
// 点击类别 // 点击类别
selectCategory(index, data) { selectCategory(index, data) {
this.activeIndex = index; this.activeIndex = index;
console.log(data);
}, },
// 搜索事件 // 搜索事件
......
...@@ -74,13 +74,11 @@ export default { ...@@ -74,13 +74,11 @@ export default {
// 点击类别 // 点击类别
selectCategory(index, data) { selectCategory(index, data) {
this.activeIndex = index; this.activeIndex = index;
console.log(data);
}, },
// 搜索事件 // 搜索事件
onSearch(val) { onSearch(val) {
if (val !== "") { if (val !== "") {
console.log(val);
} }
}, },
......
...@@ -21,16 +21,19 @@ ...@@ -21,16 +21,19 @@
<div>是否完成检查:{{item.finish?'':''}}</div> <div>是否完成检查:{{item.finish?'':''}}</div>
<div>问题数量:{{item.troubleNumber}}</div> <div>问题数量:{{item.troubleNumber}}</div>
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue' import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table' import { getFun,postFun } from '@/service/table'
export default { export default {
name: 'notice', name: 'notice',
components: { components: {
"LHeader":LHeader "LHeader":LHeader,
"tabBar":tabBar
}, },
data() { data() {
return { return {
...@@ -61,7 +64,8 @@ export default { ...@@ -61,7 +64,8 @@ export default {
sessionStorage.setItem('id',item.id) sessionStorage.setItem('id',item.id)
this.$router.push({ this.$router.push({
name:'noticeList', name:'noticeList',
query:{ params:{
name:'notice',
id:item.id id:item.id
} }
}) })
......
...@@ -58,28 +58,35 @@ ...@@ -58,28 +58,35 @@
/> />
<van-calendar v-model="showCalendar" @confirm="onConfirm" /> <van-calendar v-model="showCalendar" @confirm="onConfirm" />
<div class="sign"><span>检查组负责人签字确认:</span><van-tag color="#ffe1e1" :disabled="finish=='true'?true:false"><p v-show="istext" @click="sign" >电子签字</p><img class="sign-img" v-show="isImg" :src="resultImg" alt=""></van-tag></div> <div class="sign"><span>检查组负责人签字确认:</span><van-tag color="#ffe1e1" :disabled="finish=='true'?true:false"><p v-show="istext" @click="sign" >电子签字</p><img class="sign-img" v-show="isImg" :src="resultImg" alt=""></van-tag></div>
<div class="sign2"><span>项目经理签字确认:</span><van-tag color="#ffe1e1" :disabled="finish=='true'?true:false"><p v-show="istext2" @click="sign2" >电子签字</p><img class="sign-img2" v-show="isImg2" :src="resultImg2" alt=""></van-tag></div>
<div class="page-footer-button"> <div class="page-footer-button">
<van-button round type="info" size="large" @click="commit" :disabled="finish=='true'?true:status==true?true:false">生成整改通知单</van-button> <van-button round type="info" size="large" @click="commit" :disabled="finish=='true'?true:isFinish==true?true:false">生成整改通知单</van-button>
<van-button round type="defult" size="large" @click="cancel" :disabled="finish=='true'?true:false">取消</van-button> <van-button round type="defult" size="large" @click="cancel" :disabled="finish=='true'?true:false">取消</van-button>
</div> </div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue' import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table' import { getFun,postFun } from '@/service/table'
export default { export default {
name: 'notice', name: 'notice',
components: { components: {
"LHeader":LHeader "LHeader":LHeader,
"tabBar":tabBar
}, },
data() { data() {
return { return {
istext:true,//是否显示文字 istext:true,//是否显示文字
isImg:false,//是否显示图片 isImg:false,//是否显示图片
istext2:true,//是否显示文字2
isImg2:false,//是否显示图片2
resultImg:'',//电子签名图片 resultImg:'',//电子签名图片
resultImg2:'',//电子签名图片2
noticeQuestionList:[],//整改通知问题记录列表 noticeQuestionList:[],//整改通知问题记录列表
active: 0,//tab选中状态 active: 0,//tab选中状态
checkedAll:false,//全选状态 checkedAll:false,//全选状态
...@@ -90,11 +97,54 @@ export default { ...@@ -90,11 +97,54 @@ export default {
id:'',//整改通知id id:'',//整改通知id
showCalendar: false,//弹出层状态 showCalendar: false,//弹出层状态
finish:'',//检查状态 finish:'',//检查状态
status:false,//提交状态 isFinish:false,//提交状态
} }
}, },
watch:{ watch:{
},
activated(){
//判断是否由整改通知管理跳转进来--执行问题记录的缓存方法
if(this.$route.params.name=='notice'){
//清空表单
this.value=""
this.checkedAll=false
this.result=[];
this.resultImg=""
this.resultImg2=""
this.isImg=false;
this.istext=true
this.isImg2=false;
this.istext2=true
//获取检查id
if(sessionStorage.getItem('id')){
this.id=sessionStorage.getItem('id')
}
//获取检查状态
if(sessionStorage.getItem('finish')){
this.finish=sessionStorage.getItem('finish')
}
this.init()
}
//判断是否从电子签名跳转过来-获取图片是否显示的布尔值
if(this.$route.name=='noticeList'){
if(this.$route.query.img==true){
this.istext=false
this.isImg=true
//从session中获取签名生成的图片1
if(sessionStorage.getItem('resultImg')){
this.resultImg=sessionStorage.getItem('resultImg')
}
}else if(this.$route.query.img2==true){
//从session中获取签名生成的图片2
if(sessionStorage.getItem('resultImg2')){
this.resultImg2=sessionStorage.getItem('resultImg2')
}
this.istext2=false
this.isImg2=true
}
this.active=1
}
}, },
mounted() { mounted() {
//获取检查id //获取检查id
...@@ -106,20 +156,6 @@ export default { ...@@ -106,20 +156,6 @@ export default {
this.finish=sessionStorage.getItem('finish') this.finish=sessionStorage.getItem('finish')
} }
this.init() this.init()
//从session中获取签名生成的图片
if(sessionStorage.getItem('resultImg')){
this.resultImg=sessionStorage.getItem('resultImg')
}
//获取图片是否显示的布尔值
if(this.$route.query.isImg){
console.log(this.$route.query)
this.istext=false
this.isImg=true
this.active=1
this.value=this.$route.query.value
this.checkedAll=this.$route.query.checkedAll
this.result=this.$route.query.result
}
}, },
methods: { methods: {
/* 同步请求上报状态列表问题记录列表 */ /* 同步请求上报状态列表问题记录列表 */
...@@ -145,21 +181,40 @@ export default { ...@@ -145,21 +181,40 @@ export default {
problem(){ problem(){
this.noticeQuestionList=[] this.noticeQuestionList=[]
getFun('check/notify/trouble/list',{planId:this.id}).then((Response)=>{ getFun('check/notify/trouble/list',{planId:this.id}).then((Response)=>{
/* ---新增---- */
this.isFinish=Response.data.isFinish
this.noticeQuestionList=Response.data.list this.noticeQuestionList=Response.data.list
this.value=Response.data.finishTime /* ----详情---- */
this.resultImg=Response.data.leaderSign if(this.isFinish){
if(this.resultImg){ //获取选中状态数组
console.log(this.resultImg) this.noticeQuestionList.forEach((item)=>{
this.istext=false if(item.checkSubmitId){
this.isImg=true this.result.push(parseInt(item.checkSubmitId))
} }
this.status=Response.data.status })
console.log(this.status) //日期数据回显
this.noticeQuestionList.forEach((item)=>{ if(Response.data.finishTime){
if(item.checkSubmitId){ this.value=Response.data.finishTime
this.result.push(parseInt(item.checkSubmitId))
} }
}) //电子签名数据回显
if(Response.data.leaderSign){
this.resultImg=Response.data.leaderSign
}
//电子签名数据2回显
if(Response.data.managerSign){
this.resultImg2=Response.data.managerSign
}
//判断是否有签名
if(this.resultImg){
this.istext=false
this.isImg=true
}
//判断是否有签名
if(this.resultImg2){
this.istext2=false
this.isImg2=true
}
}
}) })
}, },
/* 全选点击事件---只让全选框的触发全不选事件 */ /* 全选点击事件---只让全选框的触发全不选事件 */
...@@ -213,11 +268,18 @@ export default { ...@@ -213,11 +268,18 @@ export default {
} }
} }
}, },
//电子签名 //电子签名1
sign(){ sign(){
//点击电子签名,保存用户选择的日期和复选框回显值 //点击电子签名,保存用户选择的日期和复选框回显值
if(this.finish=='false'){ if(this.finish=='false'){
this.$router.push({name:'sign',query:{value:this.value,result:this.result,checkedAll:this.checkedAll}}) this.$router.push({name:'sign',query:{img:true}})
}
},
//电子签名2
sign2(){
//点击电子签名,保存用户选择的日期和复选框回显值
if(this.finish=='false'){
this.$router.push({name:'sign',query:{img2:true}})
} }
}, },
//提交问题记录 //提交问题记录
...@@ -235,7 +297,8 @@ export default { ...@@ -235,7 +297,8 @@ export default {
planId:this.id, planId:this.id,
troubleIds:checkedList, troubleIds:checkedList,
finishTime:this.value, finishTime:this.value,
leaderSign:this.resultImg leaderSign:this.resultImg,
managerSign:this.resultImg2
} }
this.$dialog.confirm({ this.$dialog.confirm({
title: '提示', title: '提示',
...@@ -250,6 +313,7 @@ export default { ...@@ -250,6 +313,7 @@ export default {
postFun('check/notify/trouble',obj).then((Response)=>{ postFun('check/notify/trouble',obj).then((Response)=>{
this.$toast.clear() this.$toast.clear()
this.$toast.success('提交成功') this.$toast.success('提交成功')
this.init()
this.$router.push('/notice') this.$router.push('/notice')
}).catch(()=>{ }).catch(()=>{
this.$toast.clear() this.$toast.clear()
...@@ -295,10 +359,19 @@ export default { ...@@ -295,10 +359,19 @@ export default {
margin-left:0.4rem ; margin-left:0.4rem ;
font-size: 0.37333rem; font-size: 0.37333rem;
} }
.sign2{
width: 90%;
height: 2rem;
display: flex;
align-items: center;
margin-top: 0.1rem;
margin-left:0.4rem ;
font-size: 0.37333rem;
}
.van-tag{ .van-tag{
color: #323233 color: #323233
} }
.sign-img{ .sign-img,.sign-img2{
width: 2rem; width: 2rem;
height: 1rem; height: 1rem;
} }
......
...@@ -9,16 +9,18 @@ ...@@ -9,16 +9,18 @@
<van-button round type="primary" size="large" @click="handleReset">清空画板</van-button> <van-button round type="primary" size="large" @click="handleReset">清空画板</van-button>
<van-button round type="info" size="large" @click="handleGenerate">生成图片</van-button> <van-button round type="info" size="large" @click="handleGenerate">生成图片</van-button>
</div> </div>
<tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue' import LHeader from '@/components/header.vue'
export default { export default {
name: 'sign', name: 'sign',
components: { components: {
"LHeader":LHeader "LHeader":LHeader,
"tabBar":tabBar
}, },
data() { data() {
return { return {
...@@ -30,14 +32,15 @@ export default { ...@@ -30,14 +32,15 @@ export default {
isCrop: false, isCrop: false,
value:'', value:'',
result:[], result:[],
checkedAll:'' checkedAll:'',
img:'',
img2:''
}; };
}, },
mounted(){ mounted(){
if(this.$route.name=='sign'){ if(this.$route.name=='sign'){
this.value=this.$route.query.value this.img=this.$route.query.img
this.result=this.$route.query.result this.img2=this.$route.query.img2
this.checkedAll=this.$route.query.checkedAll
} }
}, },
methods: { methods: {
...@@ -52,8 +55,13 @@ export default { ...@@ -52,8 +55,13 @@ export default {
this.resultImg = res //把base64赋给img this.resultImg = res //把base64赋给img
//生成图片后存储到session中并跳转把图片是否显示的boolean带过去 //生成图片后存储到session中并跳转把图片是否显示的boolean带过去
console.log(this.value) console.log(this.value)
this.$router.push({name:'noticeList',query:{isImg:true,value:this.value,result:this.result,checkedAll:this.checkedAll}}) this.$router.push({name:'noticeList',query:{img:this.img,img2:this.img2}})
sessionStorage.setItem('resultImg',this.resultImg) //判断是检查组签字还是项目经理签字
if(this.img){
sessionStorage.setItem('resultImg',this.resultImg)
}else if(this.img2){
sessionStorage.setItem('resultImg2',this.resultImg)
}
}).catch(err => { }).catch(err => {
// 画布没有签字时会执行这里 // 画布没有签字时会执行这里
this.$dialog.alert({ this.$dialog.alert({
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
...@@ -38,7 +37,7 @@ ...@@ -38,7 +37,7 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
</div> </div>
...@@ -119,27 +118,17 @@ export default { ...@@ -119,27 +118,17 @@ export default {
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch(val) { onSearch(val) {
console.log(val);
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
}, },
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
},
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "risk-big-detail", name: "risk-big-detail",
params: { params: {
......
...@@ -299,9 +299,73 @@ import { ...@@ -299,9 +299,73 @@ import {
postRiskShowMeasures postRiskShowMeasures
} from "@/service/risk"; } from "@/service/risk";
export default { export default {
name:"risk-add",
components: { components: {
LHeader 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() { data() {
return { return {
taskId: "", taskId: "",
...@@ -361,7 +425,6 @@ export default { ...@@ -361,7 +425,6 @@ export default {
}, },
methods: { methods: {
onSubmit(values) { onSubmit(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);
...@@ -515,7 +578,6 @@ export default { ...@@ -515,7 +578,6 @@ export default {
postRiskShowMeasures( postRiskShowMeasures(
`/riskMain/showmeasures/${this.factor}/${this.source}/${this.trouble}` `/riskMain/showmeasures/${this.factor}/${this.source}/${this.trouble}`
).then(res => { ).then(res => {
console.log(res.data);
this.technology = res.data[0].measuresProject; this.technology = res.data[0].measuresProject;
this.administration = res.data[0].measuresAdministration; this.administration = res.data[0].measuresAdministration;
this.urgent = res.data[0].measuresEmergency; this.urgent = res.data[0].measuresEmergency;
...@@ -523,10 +585,11 @@ export default { ...@@ -523,10 +585,11 @@ export default {
}, },
// 风险定级 // 风险定级
onConSetRank(value) { onConSetRank(value) {
this.showSetRank = false;
this.setRank = value; this.setRank = value;
this.riskRank = ""; this.riskRank = "";
this.showSetRank = false;
if (this.setRank == "矩阵式定级") { if (this.setRank == "矩阵式定级") {
this.showSetRank = false;
this.$router.push({ this.$router.push({
name: "matrix-grad" name: "matrix-grad"
}); });
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="content-wrap"> <div class="content-wrap">
<van-checkbox-group v-model="happenSelect"> <van-checkbox-group v-model="happenSelect">
<van-cell-group> <van-cell-group>
<van-cell title="发生可能性" is-link arrow-direction="down" /> <van-cell title="发生可能性" is-link arrow-direction="down" />
<van-cell <van-cell
v-for="(item, index) in happenList" v-for="(item, index) in happenList"
clickable clickable
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="content-wrap"> <div class="content-wrap">
<van-checkbox-group v-model="resultSelect"> <van-checkbox-group v-model="resultSelect">
<van-cell-group> <van-cell-group>
<van-cell title="发生可能性" is-link arrow-direction="down" /> <van-cell title="后果严重性" is-link arrow-direction="down" />
<van-cell <van-cell
v-for="(item, index) in resultList" v-for="(item, index) in resultList"
clickable clickable
...@@ -47,43 +47,52 @@ export default { ...@@ -47,43 +47,52 @@ export default {
data() { data() {
return { return {
happenList: [ happenList: [
"企业半年内发生2起一般安全生产事故的", "企业半年内发生2起一般安全生产事故的",
"企业1年内发生3起一般安全生产事故的", "企业1年内发生3起一般安全生产事故的",
"企业1年内发生1起较大及其以上生产安全事故的", "企业1年内发生1起较大及其以上生产安全事故的",
"超限高层建筑", "超限高层建筑",
"采用新技术、新工艺、新设备、新材料、尚无国家、行业及地方技术标准", "采用新技术、新工艺、新设备、新材料、尚无国家、行业及地方技术标准",
"工程项目施工工期压缩超过30%或者工期压缩未采用技术措施的", "工程项目施工工期压缩超过30%或者工期压缩未采用技术措施的"
], ],
happenSelect: [], happenSelect: [],
resultList: [ resultList: [
"企业半年内发生2起一般安全生产事故的", "企业半年内发生2起一般安全生产事故的",
"企业1年内发生3起一般安全生产事故的", "企业1年内发生3起一般安全生产事故的",
"企业1年内发生1起较大及其以上生产安全事故的", "企业1年内发生1起较大及其以上生产安全事故的",
"超限高层建筑", "超限高层建筑",
"采用新技术、新工艺、新设备、新材料、尚无国家、行业及地方技术标准", "采用新技术、新工艺、新设备、新材料、尚无国家、行业及地方技术标准",
"工程项目施工工期压缩超过30%或者工期压缩未采用技术措施的", "工程项目施工工期压缩超过30%或者工期压缩未采用技术措施的"
], ],
resultSelect: [], resultSelect: []
}; };
}, },
mounted() {}, mounted() {},
methods: { methods: {
happenToggle(index, val) { happenToggle(index, val) {
this.$refs.happen[index].toggle(); this.$refs.happen[index].toggle();
console.log(this.$refs.happen[index].name);
}, },
resultToggle(index, val) { resultToggle(index, val) {
this.$refs.result[index].toggle(); 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> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
.content-wrap{ .content-wrap {
margin-bottom: .266667rem; margin-bottom: 0.266667rem;
} }
</style> </style>
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<van-tabs v-model="active" @click="onClick" title-inactive-colo="#d0d1d1" color="#247df7" <!-- 内容列表 -->
title-active-color="#000000"> <div class="con-list">
<van-tab title="指标评估"> <van-tabs
<target></target> v-model="active"
</van-tab> @click="onClick"
<van-tab title="条件评估"> title-inactive-colo="#d0d1d1"
<condition></condition> color="#247df7"
</van-tab> title-active-color="#000000"
</van-tabs> >
<!-- <div style="margin:10px 16px 0px;padding-bottom:16px"> <van-tab title="指标评估">
<van-button round block type="info" @click.native="onDefine" <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 >确认</van-button
> >
<br> <br />
<van-button round block type="warning" @click.native="cancel" <van-button round block type="warning" @click.native="cancel"
>取消</van-button >取消</van-button
> >
</div> --> </div>
</div>
</div> </div>
</template> </template>
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import Target from './target.vue'; import Target from "./target.vue";
import Condition from './condition.vue'; import Condition from "./condition.vue";
import { postCalRiskLevel } from "@/service/risk";
export default { export default {
name: "matrix-grad", name: "matrix-grad",
components: { components: {
...@@ -39,15 +49,53 @@ export default { ...@@ -39,15 +49,53 @@ export default {
active: "0" active: "0"
}; };
}, },
mounted() {},
methods: { methods: {
onClick(val) { 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); this.$router.go(-1);
} }
} }
...@@ -55,4 +103,7 @@ export default { ...@@ -55,4 +103,7 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
.con-list {
background-color: #f0f1f5;
}
</style> </style>
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @click="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="5">所属项目:</van-col>
...@@ -47,10 +46,10 @@ ...@@ -47,10 +46,10 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goConfirm(item)" <van-button round type="info" @click="goConfirm(item)"
>确认</van-button >确认</van-button
> >
</div> </div>
...@@ -114,26 +113,16 @@ export default { ...@@ -114,26 +113,16 @@ export default {
onSearch(val) { onSearch(val) {
console.log(val);
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "risk-big-detail", name: "risk-big-detail",
params: { params: {
...@@ -144,7 +133,6 @@ export default { ...@@ -144,7 +133,6 @@ export default {
}, },
// 确认 // 确认
goConfirm(data) { goConfirm(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: "risk-affirm", name: "risk-affirm",
params: { params: {
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</van-field> </van-field>
<!-- 同意时的选项 --> <!-- 同意时的选项 -->
<div class="agree" v-if="radio == 1"> <div class="agree" v-if="radio == '1'">
<van-field <van-field
v-model="agreeIdea" v-model="agreeIdea"
label="意见" label="意见"
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
vm.taskId = paramsData.taskId; vm.taskId = paramsData.taskId;
vm.messageList.push(paramsData); vm.messageList.push(paramsData);
vm.agreeIdea = ""; vm.agreeIdea = "";
vm.disagreeIdea = []; // 隐患整改人 vm.disagreeIdea = ""; // 隐患整改人
} }
}); });
}, },
...@@ -141,7 +141,6 @@ export default { ...@@ -141,7 +141,6 @@ export default {
}, },
onSubmit(values) { onSubmit(values) {
console.log("submit", values);
if (!this.taskId) { if (!this.taskId) {
return; return;
} }
......
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
:key="index" :key="index"
@touchstart="touchstart(index, item)" @change="touchstart(index, item)"
@touchend.prevent="touchend(index)"
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="5">所属项目:</van-col> <van-col span="5">所属项目:</van-col>
...@@ -48,10 +47,10 @@ ...@@ -48,10 +47,10 @@
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>上报</van-button >上报</van-button
> >
<van-button round type="warning" @touchstart="goDelete(item)" <van-button round type="warning" @click="goDelete(item)"
>删除</van-button >删除</van-button
> >
</div> </div>
...@@ -114,26 +113,16 @@ export default { ...@@ -114,26 +113,16 @@ export default {
}, },
onSearch(val) { onSearch(val) {
console.log(val);
}, },
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return;
} }
this.Loop = setTimeout(() => { this.showIndex = index;
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
}, },
// 重新上报 // 重新上报
goDetail(data) { goDetail(data) {
console.log(data);
this.$router.push({ this.$router.push({
name: 'risk-add', name: 'risk-add',
params: { params: {
...@@ -145,7 +134,6 @@ export default { ...@@ -145,7 +134,6 @@ export default {
}, },
// 删除 // 删除
goDelete(data) { goDelete(data) {
console.log(data);
this.$toast.loading({ this.$toast.loading({
message: "删除中...", message: "删除中...",
forbidClick: true, forbidClick: true,
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<!-- 风控分级管控 --> <!-- 风控分级管控 -->
<van-cell-group inset v-if="finalRiskList.length > 0"> <van-cell-group inset v-if="finalRiskList.length > 0">
<van-cell value="风分级管控" /> <van-cell value="风分级管控" />
<van-grid :column-num="5"> <van-grid :column-num="5">
<van-grid-item <van-grid-item
@click="riskJump(item.path)" @click="riskJump(item.path)"
...@@ -262,7 +262,6 @@ export default { ...@@ -262,7 +262,6 @@ export default {
}, },
methods: { methods: {
myClick(data) { myClick(data) {
console.log(data);
}, },
jump(path) { jump(path) {
if (path) { if (path) {
...@@ -281,7 +280,6 @@ export default { ...@@ -281,7 +280,6 @@ export default {
}, },
// 搜索事件 // 搜索事件
onSearch(val) { onSearch(val) {
console.log(val);
}, },
// 请求工作台列表 // 请求工作台列表
getWorkList() { 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