Loading src/router/index.js +21 −8 Original line number Original line Diff line number Diff line Loading @@ -253,24 +253,26 @@ const routes = [ component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/my'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/my'), }, }, { { path: '/danger', path: '/add-danger', name: 'danger', name: 'add-danger', meta: { meta: { title:'隐患上报', title:'新增隐患', index: 1 index: 1 }, }, component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/addDanger'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/addDanger/addDanger'), }, }, { { path: '/add-danger', path: '/report-return', name: 'add-danger', name: 'report-return', meta: { meta: { title:'新增隐患', title:'隐患上报已退回', index: 1 index: 1 }, }, component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/addDanger/addDanger'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/reportReturn'), }, }, { { path: '/confirme-danger', path: '/confirme-danger', name: 'confirme-danger', name: 'confirme-danger', Loading Loading @@ -393,6 +395,17 @@ const routes = [ }, }, component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd'), }, }, { path: '/risk-return', name: 'risk-return', meta: { title:'风险上报', index: 1 }, component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskReturn'), }, { { path: '/risk-confirme', path: '/risk-confirme', name: 'risk-confirme', name: 'risk-confirme', Loading src/views/danger/addDanger/addDanger.vue +43 −19 Original line number Original line Diff line number Diff line <template> <template> <div> <div> <LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader> <van-form <van-form @submit="onSubmit" @submit="onSubmit" :scroll-to-error="true" :scroll-to-error="true" :show-error='false' :show-error="false" validate-trigger="onSubmit" validate-trigger="onSubmit" > > <van-field v-if="isShowreturnCause" v-model="returnCause" readonly rows="1" autosize="" label="退回原因" name="退回原因" type="textarea" /> <van-field <van-field readonly readonly clickable clickable Loading @@ -26,7 +39,6 @@ /> /> </van-popup> </van-popup> <van-field <van-field readonly readonly clickable clickable Loading Loading @@ -119,7 +131,6 @@ /> /> </van-popup> </van-popup> <van-field <van-field readonly readonly clickable clickable Loading Loading @@ -242,7 +253,7 @@ <script> <script> import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue"; import { timestampToTime } from '@/utils/format' import { timestampToTime } from "@/utils/format"; export default { export default { components: { components: { LHeader LHeader Loading @@ -261,7 +272,12 @@ export default { columnsType: ["隐患类型1", "隐患类型2", "隐患类型3", "隐患类型4"], columnsType: ["隐患类型1", "隐患类型2", "隐患类型3", "隐患类型4"], dangerName: "", //隐患项目名称 dangerName: "", //隐患项目名称 showDangerName: false, showDangerName: false, columnsDangerName: ["隐患项目名称1", "隐患项目名称2", "隐患项目名称3", "隐患项目名称4"], columnsDangerName: [ "隐患项目名称1", "隐患项目名称2", "隐患项目名称3", "隐患项目名称4" ], dangerNum: "", //隐患项目编号 dangerNum: "", //隐患项目编号 dangerLevel: "", //隐患项目级别 dangerLevel: "", //隐患项目级别 findTime: "", //隐患发现时间 findTime: "", //隐患发现时间 Loading @@ -281,10 +297,18 @@ export default { recPeople: "", recPeople: "", showRecPeople: false, showRecPeople: false, columnsRecPeople: ["张三", "李四", "王五"] columnsRecPeople: ["张三", "李四", "王五"], returnCause: "你这不行啊", // 退回原因 isShowreturnCause: false }; }; }, }, mounted() {}, created() { if (this.$route.query.status) { this.isShowreturnCause = true; this.text = "隐患上报退回" } }, methods: { methods: { onSubmit(values) { onSubmit(values) { console.log("submit", values); console.log("submit", values); Loading @@ -311,7 +335,7 @@ export default { }, }, // 隐患发现时间 // 隐患发现时间 onConFindTime(date) { onConFindTime(date) { this.findTime = timestampToTime(date,'DT1',true) this.findTime = timestampToTime(date, "DT1", true); this.showFindTime = false; this.showFindTime = false; }, }, // 风险源 // 风险源 Loading @@ -326,7 +350,7 @@ export default { }, }, // 隐患到期时间 // 隐患到期时间 onConExpireTime(date) { onConExpireTime(date) { this.expireTime = timestampToTime(date,'DT1',true) this.expireTime = timestampToTime(date, "DT1", true); this.showExpireTime = false; this.showExpireTime = false; }, }, // 隐患整改人 // 隐患整改人 Loading @@ -337,7 +361,7 @@ export default { cancel() { cancel() { this.$router.go(-1); this.$router.go(-1); }, } } } }; }; </script> </script> Loading src/views/danger/addDanger/returned.vuedeleted 100644 → 0 +0 −145 Original line number Original line Diff line number Diff line <template> <div> <!-- 内容列表 --> <div class="con-list"> <van-cell-group inset v-for="(item, index) in messageList" :key="index" @click="read(item)" @touchstart="touchstart(index, item)" @touchend.prevent="touchend(index)" > <div class="messgae-title">{{ item.noticeTitle }}</div> <div class="message-content"> {{ item.upcomingUserName }},您好!您有一条来自{{ item.createUserName }}的{{ item.noticeTitle }}相关的待处理任务... </div> <!-- 长按显示遮罩层 --> <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="goDelete(item)" >修改</van-button > </div> </van-overlay> </van-cell-group> </div> <!-- 加号 --> <div class="add" @click="goAdd">+</div> </div> </template> <script> import { dangerReturn } from "@/service/danger"; export default { data() { return { messageList: [ { noticeTitle: "隐患上报消息", upcomingUserName: "张某某", createUserName: "李某某", noticeTitle: "重要任务" } ], Loop: "", // 定时器 showIndex: null // 是否显示遮罩层 }; }, created() { this.postList() }, methods: { // 请求已退回列表数据 postList(){ dangerReturn('hdreport/list').then(res =>{ if(res.code == 0){ console.log(res); } }) }, goAdd(){ this.$router.push('/add-danger'); }, read(){}, 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); }, // 详情 goDetail(data){ console.log(data); this.showIndex = null }, // 删除 goDelete(data){ console.log(data); this.showIndex = null }, } }; </script> <style lang="less" scoped> /* @import url(); 引入css类 */ // 内容 .con-list { padding: 10px 10px 0; background-color: #f0f1f5; .van-cell-group--inset { margin: 0; margin-bottom: 10px; padding: 10px; font-size: 13px; position: relative; .message-content { margin-top: 10px; } .van-overlay{ position: absolute; .wrapper { display: flex; align-items: center; justify-content: space-evenly; height: 100%; } } } } .add{ width: 1.333333rem; height: 1.333333rem; color: white; font-weight: bold; font-size: 1.48rem; background-color: #02a7f0; text-align: center; line-height: 1.333333rem; border-radius: 50%; position: fixed; right: .533333rem; bottom: 1.866667rem; } </style> src/views/danger/addDanger/index.vue→src/views/danger/reportReturn/index.vue +2 −22 Original line number Original line Diff line number Diff line Loading @@ -2,42 +2,22 @@ <div> <div> <LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader> <van-search v-model="searchValue" placeholder="搜索" @search="onSearch" /> <van-search v-model="searchValue" placeholder="搜索" @search="onSearch" /> <van-tabs v-model="active" color="#247df7" title-inactive-colo="#d0d1d1" title-active-color="#000000" > <van-tab title="待提交"> <wait-submit></wait-submit> </van-tab> <van-tab title="已提交"> <committed></committed> </van-tab> <van-tab title="已退回"> <returned></returned> <returned></returned> </van-tab> </van-tabs> </div> </div> </template> </template> <script> <script> import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue"; import WaitSubmit from "./waitSubmit"; import Returned from "./returned"; import Returned from "./returned"; import Committed from './committed'; export default { export default { components: { components: { LHeader: LHeader, LHeader: LHeader, WaitSubmit, Returned, Returned, Committed }, }, data() { data() { return { return { text: "隐患上报", text: "上报退回", active: "1", searchValue: "" searchValue: "" }; }; }, }, Loading src/views/danger/addDanger/waitSubmit.vue→src/views/danger/reportReturn/returned.vue +35 −44 Original line number Original line Diff line number Diff line Loading @@ -10,12 +10,23 @@ @touchstart="touchstart(index, item)" @touchstart="touchstart(index, item)" @touchend.prevent="touchend(index)" @touchend.prevent="touchend(index)" > > <div class="messgae-title">{{ item.noticeTitle }}</div> <van-row gutter=""> <div class="message-content"> <van-col span="7">所属工程名称:</van-col> {{ item.upcomingUserName }},您好!您有一条来自{{ <van-col span="17">{{ item.project }}</van-col> item.createUserName </van-row> }}的{{ item.noticeTitle }}相关的待处理任务... <van-row gutter=""> </div> <van-col span="7">隐患项目名称:</van-col> <van-col span="17">{{ item.subject }}</van-col> </van-row> <van-row gutter=""> <van-col span="7">隐患发现时间:</van-col> <van-col span="17">{{ item.findTime }}</van-col> </van-row> <van-row gutter=""> <van-col span="7">隐患级别:</van-col> <van-col span="17">{{ item.level }}</van-col> </van-row> <!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 --> <van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index"> Loading @@ -23,16 +34,13 @@ <van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @touchstart="goDetail(item)" >详情</van-button >详情</van-button > > <van-button round type="info" @touchstart="goDelete(item)" <van-button round type="warning" @touchstart="goDelete(item)" >修改</van-button >删除</van-button > > </div> </div> </van-overlay> </van-overlay> </van-cell-group> </van-cell-group> </div> </div> <!-- 加号 --> <div class="add" @click="goAdd">+</div> </div> </div> </template> </template> Loading @@ -42,10 +50,10 @@ export default { return { return { messageList: [ messageList: [ { { noticeTitle: "隐患上报消息", project: "朝阳区和平街14区简易住宅楼改造项目", upcomingUserName: "张某某", subject: "临时用电施工组织设计未对盾构施工用电进行专项说明。", createUserName: "李某某", findTime: "2021-10-26 16:30:00", noticeTitle: "重要任务" level: "一般隐患A" } } ], ], Loop: "", // 定时器 Loop: "", // 定时器 Loading @@ -54,20 +62,16 @@ export default { }, }, mounted() {}, mounted() {}, methods: { methods: { goAdd(){ this.$router.push('/add-danger'); }, read() {}, read() {}, 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.Loop = setTimeout(() => { this.showIndex = index this.showIndex = index; }, 300); // 这里的1000是指需要长按的时间,单位为ms }, 300); // 这里的1000是指需要长按的时间,单位为ms }, }, touchend(index) { touchend(index) { Loading @@ -78,19 +82,22 @@ export default { // 详情 // 详情 goDetail(data) { goDetail(data) { console.log(data); console.log(data); this.showIndex = null this.$router.push({ path: '/add-danger', query: {status: "退回"} }); this.showIndex = null; }, }, // 删除 // 删除 goDelete(data) { goDelete(data) { console.log(data); console.log(data); this.showIndex = null this.showIndex = null; }, } } } }; }; </script> </script> <style lang="less" scoped> <style lang="less" scoped> /* @import url(); 引入css类 */ /* @import url(); 引入css类 */ // 内容 .con-list { .con-list { padding: 10px 10px 0; padding: 10px 10px 0; background-color: #f0f1f5; background-color: #f0f1f5; Loading @@ -100,10 +107,9 @@ export default { padding: 10px; padding: 10px; font-size: 13px; font-size: 13px; position: relative; position: relative; .van-row{ .message-content { margin-bottom: .133333rem; margin-top: 10px; line-height: .64rem; } } .van-overlay { .van-overlay { position: absolute; position: absolute; Loading @@ -114,21 +120,6 @@ export default { height: 100%; height: 100%; } } } } } } } .add{ width: 1.333333rem; height: 1.333333rem; color: white; font-weight: bold; font-size: 1.48rem; background-color: #02a7f0; text-align: center; line-height: 1.333333rem; border-radius: 50%; position: fixed; right: .533333rem; bottom: 1.866667rem; } } </style> </style> Loading
src/router/index.js +21 −8 Original line number Original line Diff line number Diff line Loading @@ -253,24 +253,26 @@ const routes = [ component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/my'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/my'), }, }, { { path: '/danger', path: '/add-danger', name: 'danger', name: 'add-danger', meta: { meta: { title:'隐患上报', title:'新增隐患', index: 1 index: 1 }, }, component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/addDanger'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/addDanger/addDanger'), }, }, { { path: '/add-danger', path: '/report-return', name: 'add-danger', name: 'report-return', meta: { meta: { title:'新增隐患', title:'隐患上报已退回', index: 1 index: 1 }, }, component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/addDanger/addDanger'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/reportReturn'), }, }, { { path: '/confirme-danger', path: '/confirme-danger', name: 'confirme-danger', name: 'confirme-danger', Loading Loading @@ -393,6 +395,17 @@ const routes = [ }, }, component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd'), }, }, { path: '/risk-return', name: 'risk-return', meta: { title:'风险上报', index: 1 }, component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskReturn'), }, { { path: '/risk-confirme', path: '/risk-confirme', name: 'risk-confirme', name: 'risk-confirme', Loading
src/views/danger/addDanger/addDanger.vue +43 −19 Original line number Original line Diff line number Diff line <template> <template> <div> <div> <LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader> <van-form <van-form @submit="onSubmit" @submit="onSubmit" :scroll-to-error="true" :scroll-to-error="true" :show-error='false' :show-error="false" validate-trigger="onSubmit" validate-trigger="onSubmit" > > <van-field v-if="isShowreturnCause" v-model="returnCause" readonly rows="1" autosize="" label="退回原因" name="退回原因" type="textarea" /> <van-field <van-field readonly readonly clickable clickable Loading @@ -26,7 +39,6 @@ /> /> </van-popup> </van-popup> <van-field <van-field readonly readonly clickable clickable Loading Loading @@ -119,7 +131,6 @@ /> /> </van-popup> </van-popup> <van-field <van-field readonly readonly clickable clickable Loading Loading @@ -242,7 +253,7 @@ <script> <script> import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue"; import { timestampToTime } from '@/utils/format' import { timestampToTime } from "@/utils/format"; export default { export default { components: { components: { LHeader LHeader Loading @@ -261,7 +272,12 @@ export default { columnsType: ["隐患类型1", "隐患类型2", "隐患类型3", "隐患类型4"], columnsType: ["隐患类型1", "隐患类型2", "隐患类型3", "隐患类型4"], dangerName: "", //隐患项目名称 dangerName: "", //隐患项目名称 showDangerName: false, showDangerName: false, columnsDangerName: ["隐患项目名称1", "隐患项目名称2", "隐患项目名称3", "隐患项目名称4"], columnsDangerName: [ "隐患项目名称1", "隐患项目名称2", "隐患项目名称3", "隐患项目名称4" ], dangerNum: "", //隐患项目编号 dangerNum: "", //隐患项目编号 dangerLevel: "", //隐患项目级别 dangerLevel: "", //隐患项目级别 findTime: "", //隐患发现时间 findTime: "", //隐患发现时间 Loading @@ -281,10 +297,18 @@ export default { recPeople: "", recPeople: "", showRecPeople: false, showRecPeople: false, columnsRecPeople: ["张三", "李四", "王五"] columnsRecPeople: ["张三", "李四", "王五"], returnCause: "你这不行啊", // 退回原因 isShowreturnCause: false }; }; }, }, mounted() {}, created() { if (this.$route.query.status) { this.isShowreturnCause = true; this.text = "隐患上报退回" } }, methods: { methods: { onSubmit(values) { onSubmit(values) { console.log("submit", values); console.log("submit", values); Loading @@ -311,7 +335,7 @@ export default { }, }, // 隐患发现时间 // 隐患发现时间 onConFindTime(date) { onConFindTime(date) { this.findTime = timestampToTime(date,'DT1',true) this.findTime = timestampToTime(date, "DT1", true); this.showFindTime = false; this.showFindTime = false; }, }, // 风险源 // 风险源 Loading @@ -326,7 +350,7 @@ export default { }, }, // 隐患到期时间 // 隐患到期时间 onConExpireTime(date) { onConExpireTime(date) { this.expireTime = timestampToTime(date,'DT1',true) this.expireTime = timestampToTime(date, "DT1", true); this.showExpireTime = false; this.showExpireTime = false; }, }, // 隐患整改人 // 隐患整改人 Loading @@ -337,7 +361,7 @@ export default { cancel() { cancel() { this.$router.go(-1); this.$router.go(-1); }, } } } }; }; </script> </script> Loading
src/views/danger/addDanger/returned.vuedeleted 100644 → 0 +0 −145 Original line number Original line Diff line number Diff line <template> <div> <!-- 内容列表 --> <div class="con-list"> <van-cell-group inset v-for="(item, index) in messageList" :key="index" @click="read(item)" @touchstart="touchstart(index, item)" @touchend.prevent="touchend(index)" > <div class="messgae-title">{{ item.noticeTitle }}</div> <div class="message-content"> {{ item.upcomingUserName }},您好!您有一条来自{{ item.createUserName }}的{{ item.noticeTitle }}相关的待处理任务... </div> <!-- 长按显示遮罩层 --> <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="goDelete(item)" >修改</van-button > </div> </van-overlay> </van-cell-group> </div> <!-- 加号 --> <div class="add" @click="goAdd">+</div> </div> </template> <script> import { dangerReturn } from "@/service/danger"; export default { data() { return { messageList: [ { noticeTitle: "隐患上报消息", upcomingUserName: "张某某", createUserName: "李某某", noticeTitle: "重要任务" } ], Loop: "", // 定时器 showIndex: null // 是否显示遮罩层 }; }, created() { this.postList() }, methods: { // 请求已退回列表数据 postList(){ dangerReturn('hdreport/list').then(res =>{ if(res.code == 0){ console.log(res); } }) }, goAdd(){ this.$router.push('/add-danger'); }, read(){}, 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); }, // 详情 goDetail(data){ console.log(data); this.showIndex = null }, // 删除 goDelete(data){ console.log(data); this.showIndex = null }, } }; </script> <style lang="less" scoped> /* @import url(); 引入css类 */ // 内容 .con-list { padding: 10px 10px 0; background-color: #f0f1f5; .van-cell-group--inset { margin: 0; margin-bottom: 10px; padding: 10px; font-size: 13px; position: relative; .message-content { margin-top: 10px; } .van-overlay{ position: absolute; .wrapper { display: flex; align-items: center; justify-content: space-evenly; height: 100%; } } } } .add{ width: 1.333333rem; height: 1.333333rem; color: white; font-weight: bold; font-size: 1.48rem; background-color: #02a7f0; text-align: center; line-height: 1.333333rem; border-radius: 50%; position: fixed; right: .533333rem; bottom: 1.866667rem; } </style>
src/views/danger/addDanger/index.vue→src/views/danger/reportReturn/index.vue +2 −22 Original line number Original line Diff line number Diff line Loading @@ -2,42 +2,22 @@ <div> <div> <LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader> <van-search v-model="searchValue" placeholder="搜索" @search="onSearch" /> <van-search v-model="searchValue" placeholder="搜索" @search="onSearch" /> <van-tabs v-model="active" color="#247df7" title-inactive-colo="#d0d1d1" title-active-color="#000000" > <van-tab title="待提交"> <wait-submit></wait-submit> </van-tab> <van-tab title="已提交"> <committed></committed> </van-tab> <van-tab title="已退回"> <returned></returned> <returned></returned> </van-tab> </van-tabs> </div> </div> </template> </template> <script> <script> import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue"; import WaitSubmit from "./waitSubmit"; import Returned from "./returned"; import Returned from "./returned"; import Committed from './committed'; export default { export default { components: { components: { LHeader: LHeader, LHeader: LHeader, WaitSubmit, Returned, Returned, Committed }, }, data() { data() { return { return { text: "隐患上报", text: "上报退回", active: "1", searchValue: "" searchValue: "" }; }; }, }, Loading
src/views/danger/addDanger/waitSubmit.vue→src/views/danger/reportReturn/returned.vue +35 −44 Original line number Original line Diff line number Diff line Loading @@ -10,12 +10,23 @@ @touchstart="touchstart(index, item)" @touchstart="touchstart(index, item)" @touchend.prevent="touchend(index)" @touchend.prevent="touchend(index)" > > <div class="messgae-title">{{ item.noticeTitle }}</div> <van-row gutter=""> <div class="message-content"> <van-col span="7">所属工程名称:</van-col> {{ item.upcomingUserName }},您好!您有一条来自{{ <van-col span="17">{{ item.project }}</van-col> item.createUserName </van-row> }}的{{ item.noticeTitle }}相关的待处理任务... <van-row gutter=""> </div> <van-col span="7">隐患项目名称:</van-col> <van-col span="17">{{ item.subject }}</van-col> </van-row> <van-row gutter=""> <van-col span="7">隐患发现时间:</van-col> <van-col span="17">{{ item.findTime }}</van-col> </van-row> <van-row gutter=""> <van-col span="7">隐患级别:</van-col> <van-col span="17">{{ item.level }}</van-col> </van-row> <!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 --> <van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index"> Loading @@ -23,16 +34,13 @@ <van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @touchstart="goDetail(item)" >详情</van-button >详情</van-button > > <van-button round type="info" @touchstart="goDelete(item)" <van-button round type="warning" @touchstart="goDelete(item)" >修改</van-button >删除</van-button > > </div> </div> </van-overlay> </van-overlay> </van-cell-group> </van-cell-group> </div> </div> <!-- 加号 --> <div class="add" @click="goAdd">+</div> </div> </div> </template> </template> Loading @@ -42,10 +50,10 @@ export default { return { return { messageList: [ messageList: [ { { noticeTitle: "隐患上报消息", project: "朝阳区和平街14区简易住宅楼改造项目", upcomingUserName: "张某某", subject: "临时用电施工组织设计未对盾构施工用电进行专项说明。", createUserName: "李某某", findTime: "2021-10-26 16:30:00", noticeTitle: "重要任务" level: "一般隐患A" } } ], ], Loop: "", // 定时器 Loop: "", // 定时器 Loading @@ -54,20 +62,16 @@ export default { }, }, mounted() {}, mounted() {}, methods: { methods: { goAdd(){ this.$router.push('/add-danger'); }, read() {}, read() {}, 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.Loop = setTimeout(() => { this.showIndex = index this.showIndex = index; }, 300); // 这里的1000是指需要长按的时间,单位为ms }, 300); // 这里的1000是指需要长按的时间,单位为ms }, }, touchend(index) { touchend(index) { Loading @@ -78,19 +82,22 @@ export default { // 详情 // 详情 goDetail(data) { goDetail(data) { console.log(data); console.log(data); this.showIndex = null this.$router.push({ path: '/add-danger', query: {status: "退回"} }); this.showIndex = null; }, }, // 删除 // 删除 goDelete(data) { goDelete(data) { console.log(data); console.log(data); this.showIndex = null this.showIndex = null; }, } } } }; }; </script> </script> <style lang="less" scoped> <style lang="less" scoped> /* @import url(); 引入css类 */ /* @import url(); 引入css类 */ // 内容 .con-list { .con-list { padding: 10px 10px 0; padding: 10px 10px 0; background-color: #f0f1f5; background-color: #f0f1f5; Loading @@ -100,10 +107,9 @@ export default { padding: 10px; padding: 10px; font-size: 13px; font-size: 13px; position: relative; position: relative; .van-row{ .message-content { margin-bottom: .133333rem; margin-top: 10px; line-height: .64rem; } } .van-overlay { .van-overlay { position: absolute; position: absolute; Loading @@ -114,21 +120,6 @@ export default { height: 100%; height: 100%; } } } } } } } .add{ width: 1.333333rem; height: 1.333333rem; color: white; font-weight: bold; font-size: 1.48rem; background-color: #02a7f0; text-align: center; line-height: 1.333333rem; border-radius: 50%; position: fixed; right: .533333rem; bottom: 1.866667rem; } } </style> </style>