Commit b944ff54 authored by BlueWhite's avatar BlueWhite

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

parents 336cfe56 a9a1a5b1
......@@ -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","notice"]
}
},
watch: {
......
......@@ -3,9 +3,8 @@
<van-tabbar v-model="active" @change="onChange">
<van-tabbar-item
v-for="(item,index) in tabBarList"
:key="item.key"
:icon="active == index?item.imgUrlActive: item.imgUrl"
:to="item.path"
:key="index"
:icon="active==item.name?item.imgUrlActive: item.imgUrl"
>{{ item.text }}</van-tabbar-item
>
</van-tabbar>
......@@ -54,15 +53,18 @@ export default {
},
mounted() {
this.active = this.index
this.tabBarList.forEach((item)=>{
if(item.name==this.active){
this.$router.push(item.path)
}
})
},
methods: {
onChange(index) {
this.active = index;
if(this.active==index){
this.tabBarList.forEach((item)=>{
if(item.name==this.active){
this.$router.push(item.path)
}
})
}else{
}
}
}
};
......
......@@ -535,12 +535,6 @@ const routes = [{
]
const router = new VueRouter({
......
......@@ -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({
......
......@@ -29,16 +29,19 @@
<div>检查地点:{{item.address}}</div>
<div>是否提交:{{item.finish?'已提交':'未提交'}}</div>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'checked',
components: {
"LHeader":LHeader
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
......
......@@ -11,7 +11,7 @@
<template>
<div>
<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">
<table border="1" cellspacing="0">
<thead>
......@@ -46,15 +46,18 @@
</van-tab> -->
</van-tabs>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'formwork',
components: {
"LHeader":LHeader
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
......
......@@ -19,21 +19,24 @@
<div>检查地点:{{nums.address}}</div>
</div>
<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="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="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="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>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'problem',
components: {
"LHeader":LHeader
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
......
......@@ -74,16 +74,19 @@
<van-button round block type="info" native-type="submit">提交</van-button>
</div>
</van-form>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'list',
components: {
"LHeader":LHeader
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
......
......@@ -25,17 +25,20 @@
<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>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { ContactList } from 'vant';
import { getFun,postFun } from '@/service/table'
export default {
name: 'note',
components: {
"LHeader":LHeader
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
......
......@@ -130,7 +130,7 @@
type="datetime"
@confirm="onConFindTime"
@cancel="showFindTime = false"
v-model="findDateTime"
v-model="currentDate"
/>
</van-popup>
......@@ -230,6 +230,7 @@
<van-popup v-model="showExpireTime" position="bottom">
<van-datetime-picker
type="datetime"
v-model="currentDate"
@confirm="onConExpireTime"
@cancel="showExpireTime = false"
/>
......@@ -301,7 +302,6 @@ export default {
},
beforeRouteLeave(to, from, next) {
if (to.name != "choose-people") {
// 如果去的路由是
this.projectId = ""; // 所属工程
this.taskId = "";
this.projectName = "";
......@@ -379,7 +379,7 @@ export default {
columnsRecPeople: [],
isShowreturnCause: false,
returnCause: "", // 退回原因
findDateTime : new Date()
currentDate : new Date()
};
},
created() {
......@@ -387,7 +387,6 @@ export default {
},
methods: {
onSubmit(values) {
console.log("submit", values);
let formdata = new FormData();
formdata.append("proId", this.projectId);
......@@ -519,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;
......
......@@ -44,7 +44,6 @@ export default {
},
created() {
this.source = this.$route.params.source
console.log(this.source);
if(this.source){
this.getList()
}
......@@ -72,7 +71,6 @@ export default {
this.$refs.checkboxes[index].toggle();
},
confirm() {
console.log(this.result);
this.$bus.$emit("sourceAyy",this.result)
this.$router.go(-1)
},
......
......@@ -136,7 +136,6 @@ export default {
activated() {},
methods: {
onSubmit(values) {
console.log("submit", values);
this.$toast.loading({
message: "提交中...",
forbidClick: true,
......
......@@ -20,6 +20,7 @@
<van-popup v-model="showDelayTime" position="bottom">
<van-datetime-picker
type="datetime"
v-model="currentDate"
@confirm="onConDelayTime"
@cancel="showDelayTime = false"
/>
......@@ -64,6 +65,7 @@ export default {
delayTime: "", // 延迟时间
showDelayTime: false,
delayApply: "", // 延迟理由
currentDate: new Date(),
};
},
......@@ -72,7 +74,6 @@ export default {
},
methods: {
onSubmit(values) {
console.log("submit", values);
this.$toast.loading({
message: "提交中...",
forbidClick: true,
......
......@@ -8,8 +8,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="5">所属项目:</van-col>
......@@ -44,13 +43,13 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<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 round type="info" @touchstart="goConfirm(item)"
<van-button round type="info" @click="goConfirm(item)"
>确认</van-button
>
<van-button round type="info" @touchstart="goDelay(item)"
<van-button round type="info" @click="goDelay(item)"
>延期</van-button
>
</div>
......@@ -89,7 +88,6 @@ export default {
},
methods: {
onSearch(val) {
console.log(val);
},
postList(){
this.$toast.loading({
......@@ -112,23 +110,14 @@ export default {
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params: {
......@@ -139,7 +128,6 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data);
this.$router.push({
name:"change-info",
params:{
......@@ -150,7 +138,6 @@ export default {
},
// 延期
goDelay(data) {
console.log(data);
this.$router.push({
name:"delay-info",
params:{
......
......@@ -67,7 +67,7 @@
type="datetime"
@confirm="onConfirm"
@cancel="showCalendar = false"
v-model="endDateTime"
v-model="currentDate"
/>
</van-popup>
......@@ -176,7 +176,7 @@ export default {
showPickerReview: false,
valueIdea: "",
returnReason: "",
endDateTime: new Date()
currentDate: new Date()
};
},
......@@ -227,7 +227,6 @@ export default {
// 保存时的操作
onSubmit(values) {
console.log("submit", values);
if (!this.taskId) {
return;
}
......
......@@ -9,8 +9,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="5">所属项目:</van-col>
......@@ -35,10 +34,10 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<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 round type="info" @touchstart="goConfirm(item)"
<van-button round type="info" @click="goConfirm(item)"
>确认</van-button
>
</div>
......@@ -78,7 +77,6 @@ export default {
},
methods: {
onSearch(val) {
console.log(val);
},
postList() {
this.$toast.loading({
......@@ -102,23 +100,15 @@ export default {
});
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params: {
......@@ -129,7 +119,6 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data);
this.$router.push({
name: "affirm-danger",
params: {
......
......@@ -9,8 +9,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
......@@ -35,10 +34,10 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<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 round type="info" @touchstart="goConfirm(item)"
<van-button round type="info" @click="goConfirm(item)"
>审批</van-button
>
</div>
......@@ -106,27 +105,18 @@ export default {
/*接口对接3 END*/
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "risk-big-detail",
params: {
......@@ -137,7 +127,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,
......
......@@ -9,8 +9,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
......@@ -35,10 +34,10 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<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 round type="info" @touchstart="goConfirm(item)"
<van-button round type="info" @click="goConfirm(item)"
>审批</van-button
>
</div>
......@@ -120,27 +119,17 @@ export default {
/*接口对接3 END*/
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params:{
......@@ -151,7 +140,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,
......
......@@ -9,8 +9,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
......@@ -34,10 +33,10 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<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 round type="info" @touchstart="goConfirm(item)"
<van-button round type="info" @click="goConfirm(item)"
>批示</van-button
>
</div>
......@@ -118,27 +117,18 @@ export default {
/*接口对接3 END*/
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params:{
......@@ -149,7 +139,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,
......
......@@ -8,8 +8,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="5">所属项目:</van-col>
......@@ -39,10 +38,10 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<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 round type="warning" @touchstart="goDelete(item)"
<van-button round type="warning" @click="goDelete(item)"
>删除</van-button
>
</div>
......@@ -103,26 +102,16 @@ export default {
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 提交
goSubmit(data) {
console.log(data);
this.$router.push({
name: "add-danger",
params: {
......@@ -134,7 +123,6 @@ export default {
},
// 删除
goDelete(data) {
console.log(data);
this.$toast.loading({
message: "删除中...",
forbidClick: true,
......
......@@ -8,8 +8,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="5">所属项目:</van-col>
......@@ -43,10 +42,10 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<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 round type="info" @touchstart="goConfirm(item)"
<van-button round type="info" @click="goConfirm(item)"
>确认</van-button
>
</div>
......@@ -85,7 +84,6 @@ export default {
},
methods: {
onSearch(val) {
console.log(val);
},
postList() {
......@@ -111,23 +109,15 @@ export default {
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params: {
......@@ -138,7 +128,6 @@ export default {
},
// 确认
goConfirm(data) {
console.log(data);
this.$router.push({
name: "review-add",
params: {
......
......@@ -74,7 +74,6 @@
<van-field
name="uploader"
label="隐患复查照片"
:rules="[{ required: true, message: '隐患复查照片不能为空' }]"
>
<template #input>
<van-uploader v-model="uploaderImg" />
......@@ -148,7 +147,6 @@ export default {
},
onSubmit(values) {
console.log("submit", values);
this.$toast.loading({
message: "提交中...",
forbidClick: true,
......@@ -159,9 +157,11 @@ export default {
formdata.append('reviewResult', this.radio)
formdata.append('reviewDetails', values.reviewDetails)
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
values.uploader.forEach(item => {
formdata.append("reviewPicture1[]", item.file);
});
if (values.uploader) {
values.uploader.forEach(item => {
formdata.append("reviewPicture1[]", item.file);
});
}
dangerReviewAdd(`/review/add1/${this.taskId}`,formdata)
.then(res => {
......
......@@ -8,9 +8,9 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="5">所属项目:</van-col>
<van-col span="19">{{ item.proId }}</van-col>
......@@ -44,7 +44,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)"
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
</div>
......@@ -83,7 +83,6 @@ export default {
},
methods: {
onSearch(val) {
console.log(val);
},
postList() {
......@@ -109,23 +108,14 @@ export default {
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params:{
......
......@@ -9,8 +9,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="7">隐患编号:</van-col>
......@@ -33,10 +32,10 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<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 round type="info" @touchstart="goConfirm(item)"
<van-button round type="info" @click="goConfirm(item)"
>批示</van-button
>
</div>
......@@ -114,27 +113,17 @@ export default {
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "normal-detail",
params: {
......@@ -145,7 +134,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,
......
......@@ -3,9 +3,6 @@
<div class="message-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
class="my-tag-style"
:class="index == activeIndex ? 'active' : ''"
......@@ -34,10 +31,9 @@
inset
v-for="(item, index) in messageList"
:key="index"
@click="read(item)"
@touchstart="touchstart(index, item)"
@touchend="touchend(index)"
@click="touchstart(index, item)"
>
<!--@touchend.prevent="touchend(index)" 长按备份-->
<div class="messgae-title">{{ item.noticeTitle }}</div>
<div class="message-content">
{{ item.upcomingUserName }},您好!您有一条来自{{
......@@ -49,12 +45,20 @@
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)"
>详情</van-button
>
<van-button round type="info" @touchstart="goConfirm(item)"
>整改</van-button
>
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
<!-- @touchstart="goDetail(item)" 长按备份-->
<van-button round type="info" @click="goConfirm(item)"
>整改</van-button
>
<van-button
round
type="warning"
@click="read(item)"
v-if="item.status == '未读'"
>已读</van-button
>
</div>
</van-overlay>
</van-cell-group>
......@@ -74,7 +78,7 @@ export default {
messageCategory: [
{
key: "0",
category: "全部"
category: "未读"
},
{
key: "1",
......@@ -82,11 +86,11 @@ export default {
},
{
key: "2",
category: "未读"
category: "全部"
}
],
activeIndex: 0,
activeVal: "全部",
activeVal: "未读",
searchVal: "",
messageList: [], // 消息列表
// refreshing: false, // 下拉刷新开关
......@@ -98,13 +102,13 @@ export default {
};
},
created() {
this.getMessageList();
this.unRead();
},
methods: {
// 点击类别
clickCategory(index, data) {
console.log(12312312310);
// 关闭遮罩层
this.showIndex = null;
this.activeIndex = index;
this.activeVal = this.messageCategory[index].category;
// 点击全部还是已读还是未读
......@@ -112,9 +116,7 @@ export default {
},
// 搜索事件
onSearch(val) {
console.log(val);
},
onSearch(val) {},
// 封装全部 已读 和 未读的方法
selectCategory(data) {
......@@ -129,7 +131,6 @@ export default {
// 点击消息条目时的点击事件 变成已读
read(data) {
console.log("触发了点击事件");
// 判断showIndex是否等于null 如果不等于则先将showIndex改为null
this.showIndex = null;
if (data.status == "未读") {
......@@ -155,6 +156,8 @@ export default {
if (res.code == 0) {
// 向父组件发送消息条数
this.$emit("messageLength", res.total);
// 给消息列表赋值
this.messageList = res.rows;
}
});
},
......@@ -197,31 +200,30 @@ export default {
// }
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
// clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
// return;
}
this.Loop = setTimeout(
function() {
this.showIndex = index;
}.bind(this),
300
); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearTimeout(this.Loop);
this.showIndex = index;
// this.Loop = setTimeout(
// function() {
// this.showIndex = index;
// }.bind(this),
// 0
// ); // 这里的1000是指需要长按的时间,单位为ms
},
// touchend(index) {
// // 这个方法主要是用来将每次手指移出之后将计时器清零 长按备份
// clearTimeout(this.Loop);
// },
// 详情
goDetail(data) {
console.log(data);
this.showIndex = null;
},
// 删除
goDelete(data) {
console.log(123);
// 整改
goConfirm(data) {
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);
}
},
......
......@@ -21,16 +21,19 @@
<div>是否完成检查:{{item.finish?'':''}}</div>
<div>问题数量:{{item.troubleNumber}}</div>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'notice',
components: {
"LHeader":LHeader
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
......@@ -61,7 +64,8 @@ export default {
sessionStorage.setItem('id',item.id)
this.$router.push({
name:'noticeList',
query:{
params:{
name:'notice',
id:item.id
}
})
......
......@@ -58,28 +58,35 @@
/>
<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="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">
<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>
</div>
</van-tab>
</van-tabs>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'notice',
components: {
"LHeader":LHeader
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
istext:true,//是否显示文字
isImg:false,//是否显示图片
istext2:true,//是否显示文字2
isImg2:false,//是否显示图片2
resultImg:'',//电子签名图片
resultImg2:'',//电子签名图片2
noticeQuestionList:[],//整改通知问题记录列表
active: 0,//tab选中状态
checkedAll:false,//全选状态
......@@ -90,11 +97,54 @@ export default {
id:'',//整改通知id
showCalendar: false,//弹出层状态
finish:'',//检查状态
status:false,//提交状态
isFinish:false,//提交状态
}
},
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() {
//获取检查id
......@@ -106,20 +156,6 @@ export default {
this.finish=sessionStorage.getItem('finish')
}
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: {
/* 同步请求上报状态列表问题记录列表 */
......@@ -145,21 +181,40 @@ export default {
problem(){
this.noticeQuestionList=[]
getFun('check/notify/trouble/list',{planId:this.id}).then((Response)=>{
/* ---新增---- */
this.isFinish=Response.data.isFinish
this.noticeQuestionList=Response.data.list
this.value=Response.data.finishTime
this.resultImg=Response.data.leaderSign
if(this.resultImg){
console.log(this.resultImg)
this.istext=false
this.isImg=true
}
this.status=Response.data.status
console.log(this.status)
this.noticeQuestionList.forEach((item)=>{
if(item.checkSubmitId){
this.result.push(parseInt(item.checkSubmitId))
/* ----详情---- */
if(this.isFinish){
//获取选中状态数组
this.noticeQuestionList.forEach((item)=>{
if(item.checkSubmitId){
this.result.push(parseInt(item.checkSubmitId))
}
})
//日期数据回显
if(Response.data.finishTime){
this.value=Response.data.finishTime
}
})
//电子签名数据回显
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 {
}
}
},
//电子签名
//电子签名1
sign(){
//点击电子签名,保存用户选择的日期和复选框回显值
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 {
planId:this.id,
troubleIds:checkedList,
finishTime:this.value,
leaderSign:this.resultImg
leaderSign:this.resultImg,
managerSign:this.resultImg2
}
this.$dialog.confirm({
title: '提示',
......@@ -250,6 +313,7 @@ export default {
postFun('check/notify/trouble',obj).then((Response)=>{
this.$toast.clear()
this.$toast.success('提交成功')
this.init()
this.$router.push('/notice')
}).catch(()=>{
this.$toast.clear()
......@@ -295,10 +359,19 @@ export default {
margin-left:0.4rem ;
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{
color: #323233
}
.sign-img{
.sign-img,.sign-img2{
width: 2rem;
height: 1rem;
}
......
......@@ -9,16 +9,18 @@
<van-button round type="primary" size="large" @click="handleReset">清空画板</van-button>
<van-button round type="info" size="large" @click="handleGenerate">生成图片</van-button>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
export default {
name: 'sign',
components: {
"LHeader":LHeader
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
......@@ -30,14 +32,15 @@ export default {
isCrop: false,
value:'',
result:[],
checkedAll:''
checkedAll:'',
img:'',
img2:''
};
},
mounted(){
if(this.$route.name=='sign'){
this.value=this.$route.query.value
this.result=this.$route.query.result
this.checkedAll=this.$route.query.checkedAll
this.img=this.$route.query.img
this.img2=this.$route.query.img2
}
},
methods: {
......@@ -52,8 +55,13 @@ export default {
this.resultImg = res //把base64赋给img
//生成图片后存储到session中并跳转把图片是否显示的boolean带过去
console.log(this.value)
this.$router.push({name:'noticeList',query:{isImg:true,value:this.value,result:this.result,checkedAll:this.checkedAll}})
sessionStorage.setItem('resultImg',this.resultImg)
this.$router.push({name:'noticeList',query:{img:this.img,img2:this.img2}})
//判断是检查组签字还是项目经理签字
if(this.img){
sessionStorage.setItem('resultImg',this.resultImg)
}else if(this.img2){
sessionStorage.setItem('resultImg2',this.resultImg)
}
}).catch(err => {
// 画布没有签字时会执行这里
this.$dialog.alert({
......
......@@ -9,8 +9,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
......@@ -38,7 +37,7 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)"
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
</div>
......@@ -119,27 +118,17 @@ export default {
/*接口对接3 END*/
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
this.showIndex = index;
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
},
// 详情
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>
......@@ -9,8 +9,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="5">所属项目:</van-col>
......@@ -47,10 +46,10 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<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 round type="info" @touchstart="goConfirm(item)"
<van-button round type="info" @click="goConfirm(item)"
>确认</van-button
>
</div>
......@@ -114,26 +113,16 @@ export default {
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 详情
goDetail(data) {
console.log(data);
this.$router.push({
name: "risk-big-detail",
params: {
......@@ -144,7 +133,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;
}
......
......@@ -8,8 +8,7 @@
inset
v-for="(item, index) in messageList"
:key="index"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
@change="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="5">所属项目:</van-col>
......@@ -48,10 +47,10 @@
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<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 round type="warning" @touchstart="goDelete(item)"
<van-button round type="warning" @click="goDelete(item)"
>删除</van-button
>
</div>
......@@ -114,26 +113,16 @@ export default {
},
onSearch(val) {
console.log(val);
},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.Loop = setTimeout(() => {
this.showIndex = index;
}, 300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
this.showIndex = index;
},
// 重新上报
goDetail(data) {
console.log(data);
this.$router.push({
name: 'risk-add',
params: {
......@@ -145,7 +134,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