Commit 1999bc96 authored by 13841799530's avatar 13841799530

解决冲突

parents daae1bdb 500a387e
...@@ -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","notice"] cachePage:["add-danger","change-info","affirm-danger","risk-affirm","manager-survey","super-survey","major-survey","risk-add","notice"]
} }
}, },
watch: { watch: {
......
...@@ -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({
......
...@@ -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: {
......
...@@ -148,7 +148,6 @@ export default { ...@@ -148,7 +148,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);
} }
}, },
......
...@@ -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