Loading src/App.vue +30 −8 Original line number Diff line number Diff line Loading @@ -9,7 +9,8 @@ --> <template> <div id="app"> <div :style="{ height: showTab ?appHeight:'100%' }" id="app-content"> <!-- :style="{ height: showTab ?appHeight:'100%' }" 之前是给id为app-content 设置的内联样式 id="app-content" --> <div> <transition :name="transitionName"> <keep-alive :include="cachePage"> <router-view class="router-view" /> Loading Loading @@ -111,17 +112,21 @@ export default { <style lang="less"> body{ background-color: #f0f1f5; } #app { font-family: "Avenir", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; // text-align: center; color: #2c3e50; box-sizing: border-box; overflow: hidden; position: relative; overflow: hidden; height: 100vh; // box-sizing: border-box; // overflow: hidden; // position: relative; // overflow: hidden; // height: 100vh; // background-color: #f0f1f5; // z-index:999999999999 } #app-content { Loading @@ -132,18 +137,35 @@ export default { top: 0; width: 100%; overflow: hidden; // padding-bottom: 1.3333rem; height: 100%; // 此处新增height 为了解决ios适配问题 } .router-view { // width: 100%; // height: 100%; // position: absolute; // top: 0; // bottom: 0; // margin: 0 auto; // -webkit-overflow-scrolling: touch; // background-color: #f0f1f5; // overflow: auto; width: 100%; height: auto; -webkit-overflow-scrolling: touch; background-color: #f0f1f5; overflow: auto; position: absolute; top: 0; bottom: 0; margin: 0 auto; -webkit-overflow-scrolling: touch; background-color: #f0f1f5; overflow: auto; padding-bottom: 50px; box-sizing: border-box; } .slide-right-enter-active, Loading src/utils/format.js +2 −2 Original line number Diff line number Diff line export function timestampToTime (time,type,zero,num) { if(!time){return ''} try{ var date = new Date(time) var date = new Date(time.toString().replace(/-/g, "/")) if(num&&typeof parseInt(num)=="number"){ date = new Date(new Date(time).getTime()+num*60*60*24*1000)//时间戳以毫秒为单位,也可用其他日期格式 date = new Date(new Date(time.toString().replace(/-/g, "/")).getTime()+num*60*60*24*1000)//时间戳以毫秒为单位,也可用其他日期格式 } let yy = date.getFullYear();//年 let mm = date.getMonth()+1;//月 Loading src/views/danger/dangerPatrol/dangerPatrolTime/index.vue +8 −3 Original line number Diff line number Diff line Loading @@ -24,8 +24,8 @@ <div class="icon_wrap_text"> <div class="icon_wrap_text1">{{ item.content }}</div> <span class="icon_wrap_text2" v-if="item.content=='日查清单'">{{util.timestampToTime(item.startTime,'DT7',true)}}</span> <span class="icon_wrap_text2" v-else>{{util.timestampToTime(item.startTime,'DT7',true)}}至{{util.timestampToTime(item.validityTime,'DT7',true)}}</span> <span class="icon_wrap_text2" v-if="item.content=='日查清单'">{{ item.startTime| formatDate }}</span> <span class="icon_wrap_text2" v-else>{{ item.startTime| formatDate }}至{{ item.validityTime| formatDate }}</span> </div> </div> Loading Loading @@ -129,7 +129,12 @@ export default { } }); } } }, filters: { formatDate (time) { return timestampToTime(time, "DT7", true) } }, }; </script> <style lang="less" scoped> Loading src/views/danger/dangerPatrol/implement/index.vue +2 −2 Original line number Diff line number Diff line Loading @@ -426,9 +426,9 @@ export default { } .operation-btn { width: 95%; margin: 10px 10px; margin: 20px 10px 10px; position: fixed; bottom: 50px; bottom: 1.3333rem; right: 0; left: 0; } Loading vue.config.js +2 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,8 @@ module.exports = { proxy: { '/app-api': { // target: 'http://192.168.0.108:8096', target: 'http://192.168.15.146:8096', target: 'http://192.168.124.7:8096', // target: 'http://192.168.15.169:8096', // changeOrigin: true, // logLevel:'debug', } Loading Loading
src/App.vue +30 −8 Original line number Diff line number Diff line Loading @@ -9,7 +9,8 @@ --> <template> <div id="app"> <div :style="{ height: showTab ?appHeight:'100%' }" id="app-content"> <!-- :style="{ height: showTab ?appHeight:'100%' }" 之前是给id为app-content 设置的内联样式 id="app-content" --> <div> <transition :name="transitionName"> <keep-alive :include="cachePage"> <router-view class="router-view" /> Loading Loading @@ -111,17 +112,21 @@ export default { <style lang="less"> body{ background-color: #f0f1f5; } #app { font-family: "Avenir", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; // text-align: center; color: #2c3e50; box-sizing: border-box; overflow: hidden; position: relative; overflow: hidden; height: 100vh; // box-sizing: border-box; // overflow: hidden; // position: relative; // overflow: hidden; // height: 100vh; // background-color: #f0f1f5; // z-index:999999999999 } #app-content { Loading @@ -132,18 +137,35 @@ export default { top: 0; width: 100%; overflow: hidden; // padding-bottom: 1.3333rem; height: 100%; // 此处新增height 为了解决ios适配问题 } .router-view { // width: 100%; // height: 100%; // position: absolute; // top: 0; // bottom: 0; // margin: 0 auto; // -webkit-overflow-scrolling: touch; // background-color: #f0f1f5; // overflow: auto; width: 100%; height: auto; -webkit-overflow-scrolling: touch; background-color: #f0f1f5; overflow: auto; position: absolute; top: 0; bottom: 0; margin: 0 auto; -webkit-overflow-scrolling: touch; background-color: #f0f1f5; overflow: auto; padding-bottom: 50px; box-sizing: border-box; } .slide-right-enter-active, Loading
src/utils/format.js +2 −2 Original line number Diff line number Diff line export function timestampToTime (time,type,zero,num) { if(!time){return ''} try{ var date = new Date(time) var date = new Date(time.toString().replace(/-/g, "/")) if(num&&typeof parseInt(num)=="number"){ date = new Date(new Date(time).getTime()+num*60*60*24*1000)//时间戳以毫秒为单位,也可用其他日期格式 date = new Date(new Date(time.toString().replace(/-/g, "/")).getTime()+num*60*60*24*1000)//时间戳以毫秒为单位,也可用其他日期格式 } let yy = date.getFullYear();//年 let mm = date.getMonth()+1;//月 Loading
src/views/danger/dangerPatrol/dangerPatrolTime/index.vue +8 −3 Original line number Diff line number Diff line Loading @@ -24,8 +24,8 @@ <div class="icon_wrap_text"> <div class="icon_wrap_text1">{{ item.content }}</div> <span class="icon_wrap_text2" v-if="item.content=='日查清单'">{{util.timestampToTime(item.startTime,'DT7',true)}}</span> <span class="icon_wrap_text2" v-else>{{util.timestampToTime(item.startTime,'DT7',true)}}至{{util.timestampToTime(item.validityTime,'DT7',true)}}</span> <span class="icon_wrap_text2" v-if="item.content=='日查清单'">{{ item.startTime| formatDate }}</span> <span class="icon_wrap_text2" v-else>{{ item.startTime| formatDate }}至{{ item.validityTime| formatDate }}</span> </div> </div> Loading Loading @@ -129,7 +129,12 @@ export default { } }); } } }, filters: { formatDate (time) { return timestampToTime(time, "DT7", true) } }, }; </script> <style lang="less" scoped> Loading
src/views/danger/dangerPatrol/implement/index.vue +2 −2 Original line number Diff line number Diff line Loading @@ -426,9 +426,9 @@ export default { } .operation-btn { width: 95%; margin: 10px 10px; margin: 20px 10px 10px; position: fixed; bottom: 50px; bottom: 1.3333rem; right: 0; left: 0; } Loading
vue.config.js +2 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,8 @@ module.exports = { proxy: { '/app-api': { // target: 'http://192.168.0.108:8096', target: 'http://192.168.15.146:8096', target: 'http://192.168.124.7:8096', // target: 'http://192.168.15.169:8096', // changeOrigin: true, // logLevel:'debug', } Loading