yunxing před 4 roky
rodič
revize
e4f63658ee

+ 3 - 0
src/App.vue

@@ -143,6 +143,9 @@ export default {
     },
 }
 </script>
+<style >
+/* @import '../src/assets/fonts/iconfont.css'; */
+</style>
 <style lang="less">
 @import './style/common.less';
 .ios-padding {

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 169 - 0
src/assets/fonts/iconfont.css


+ 16 - 1
src/components/ImagePreview.vue

@@ -6,6 +6,9 @@
             v-model='show'
             :images='imgList'
             :show-indicators='true'
+            :closeable='true'
+            close-icon='cross'
+            close-icon-position='top-left'
             @close='close'
             @change='onChange'
         ></van-image-preview>
@@ -15,7 +18,19 @@
 <script>
 /**
  * @description 图片预览组件
- *
+ * @param { Boolean } visible 显隐图片预览组件
+ * @param { Array } imgList 显示的图片数组  ['https://img.yzcdn.cn/vant/apple-1.jpg', 'https://img.yzcdn.cn/vant/apple-2.jpg']
+ * @eg 示例:
+ * 模板中:
+ * <ImagePreview  :visible.sync='showImgPreview' :imgList='imgList' />
+ * import ImagePreview from '../../components/ImagePreview'
+    components: { ImagePreview },
+
+    // 点击按钮时,显示预览组件,设置图片数组
+    showPhoto() {
+        this.imgList = ['https://img.yzcdn.cn/vant/apple-1.jpg', 'https://img.yzcdn.cn/vant/apple-2.jpg']
+        this.showImgPreview = true
+    },
  */
 import Vue from 'vue'
 import { ImagePreview } from 'vant'

+ 19 - 0
src/components/Navbar.vue

@@ -17,6 +17,11 @@ import { NavBar, Icon, Tabbar, TabbarItem } from 'vant'
 Vue.use(NavBar).use(Icon)
 import { mapGetters } from 'vuex'
 import store from '@/store'
+window.scanCallback = function (data) {
+    console.log(11111)
+    console.log(data)
+    alert(data.text)
+}
 export default {
     name: 'navbar',
     props: {},
@@ -33,10 +38,24 @@ export default {
         // 返回工程信息化主菜单
         backApp() {
             console.log('backApp')
+            webkit.messageHandlers.cordova_iab.postMessage(
+                JSON.stringify({
+                    method: 'close',
+                })
+            )
         },
         // 扫码
         scan() {
             console.log('扫码')
+            webkit.messageHandlers.cordova_iab.postMessage(
+                JSON.stringify({
+                    method: 'scan',
+                })
+            )
+        },
+        // 扫码回调函数
+        scanCallback(s) {
+            alert(s.text)
         },
         // 全局搜索
         query() {

+ 4 - 4
src/components/floorMap/canvasFun.vue

@@ -4,7 +4,7 @@
             <div class='small-block'>
                 <el-dropdown size='mini' placement='top-start' @command='handleCommand'>
                     <i>
-                        <img src='../../assets/imgs/dl.png' alt />
+                        <!-- <img src='../../assets/imgs/dl.png' alt /> -->
                     </i>
                     <el-dropdown-menu slot='dropdown'>
                         <el-dropdown-item command='savePng'>保存为png</el-dropdown-item>
@@ -15,16 +15,16 @@
             <div class='small-block' @click='showText'>
                 <i>
                     <el-tooltip v-if='isShow' effect='dark' content='隐藏店铺名称' placement='top'>
-                        <img src='../../assets/imgs/yl.png' alt />
+                        <!-- <img src='../../assets/imgs/yl.png' alt /> -->
                     </el-tooltip>
                     <el-tooltip v-else effect='dark' content='显示店铺名称' placement='top'>
-                        <img src='../../assets/imgs/er.png' alt />
+                        <!-- <img src='../../assets/imgs/er.png' alt /> -->
                     </el-tooltip>
                 </i>
             </div>
             <div class='small-block' @click='fitToWindow'>
                 <i>
-                    <img src='../../assets/imgs/eye2.jpg' alt />
+                    <!-- <img src='../../assets/imgs/eye2.jpg' alt /> -->
                 </i>
             </div>
             <div class='small-size' @click='reduce'>

+ 1 - 1
src/main.ts

@@ -4,7 +4,7 @@ import router from './router'
 import store from './store'
 // 引入lib-flexible
 import 'lib-flexible'
-
+import './assets/fonts/iconfont.css';
 Vue.config.productionTip = false
 // 引入使用fastclick
 // 移动端点击有300ms延迟,主要是为了解决双击缩放,浏览器等待300ms以判断是否是双击操作。

+ 11 - 0
src/router/index.ts

@@ -94,6 +94,17 @@ const routes: Array<RouteConfig> = [
             hideNarBar: true,
         },
     },
+    // 说明书更新记录详情
+    {
+        path: '/updateRecordDetail',
+        name: 'UpdateRecordDetail',
+        component: () => import(/* webpackChunkName: "updateRecord" */ '../views/overview/UpdateRecordDetail.vue'),
+        meta: {
+            keepAlive: false,
+            showTabbar: false,
+            hideNarBar: true,
+        },
+    },
     // 平面图查看
     {
         path: '/mapView',

+ 1 - 1
src/style/common.less

@@ -34,7 +34,7 @@ button,
 input,
 select,
 textarea {
-    font: 12px/1.5 Arial, 'Microsoft YaHei', '\65b0\5b8b\4f53';
+    // font: 12px/1.5 Arial, 'Microsoft YaHei', '\65b0\5b8b\4f53';
 }
 
 h1,

+ 27 - 2
src/views/otherMatter/AuxiliaryRoom.vue

@@ -1,7 +1,13 @@
 <template>
-    <div>AuxiliaryRoom</div>
+    <div>
+        <van-button @click='roateX' type='primary'>横屏</van-button>
+        <van-button @click='roateY' type='primary'>竖屏</van-button>
+    </div>
 </template>
 <script>
+import Vue from 'vue'
+import { Button } from 'vant'
+Vue.use(Button)
 export default {
     name: 'AuxiliaryRoom',
     props: {},
@@ -11,7 +17,26 @@ export default {
     },
     beforeMount() {},
     mounted() {},
-    methods: {},
+    methods: {
+        roateX() {
+            console.log('横屏')
+            webkit.messageHandlers.cordova_iab.postMessage(
+                JSON.stringify({
+                    method: 'roateX',
+                })
+            )
+        },
+
+        // 竖屏
+        roateY() {
+            console.log('竖屏')
+            webkit.messageHandlers.cordova_iab.postMessage(
+                JSON.stringify({
+                    method: 'roateY',
+                })
+            )
+        },
+    },
 }
 </script>
 <style lang='less' scoped>

+ 11 - 5
src/views/otherMatter/ComprehensiveMatter.vue

@@ -1,8 +1,8 @@
 <template>
     <div class='comprehensive-matter'>
-        <van-list v-model='loading' :finished='finished' finished-text='没有更多了' @load='onLoad'>
+        <!-- <van-list v-model='loading' :finished='finished' finished-text='加载到底了' @load='onLoad'>
             <van-cell v-for='item in list' :key='item' :title='item' />
-        </van-list>
+        </van-list> -->
     </div>
 </template>
 <script>
@@ -30,7 +30,7 @@ export default {
             // 异步更新数据
             // setTimeout 仅做示例,真实场景中一般为 ajax 请求
             setTimeout(() => {
-                for (let i = 0; i < 10; i++) {
+                for (let i = 0; i < 5; i++) {
                     this.list.push(this.list.length + 1)
                 }
 
@@ -49,7 +49,13 @@ export default {
 <style lang='less' scoped>
 .comprehensive-matter {
     width: 100%;
-    height: 100px;
-    background-color:lightblue;
+    height: calc(100% - 50px);
+    overflow: auto;
+    background-color: lightblue;
+    /deep/.van-list {
+        width: 100%;
+        height: calc(100%- 150px);
+        background-color: lightgreen;
+    }
 }
 </style>

+ 11 - 1
src/views/otherMatter/index.vue

@@ -34,11 +34,21 @@ export default {
 .other-matter {
     width: 100%;
     height: calc(100% - 50px);
-    background-color: #d3d3d3;
+    // background-color: #d3d3d3;
     .other-tabs {
+        height: 100%;
         /deep/ .van-tab__text {
             font-size: 16px;
         }
+        /deep/ .van-tabs__wrap {
+            height: 45px;
+        }
+        /deep/ .van-tabs__content {
+            height: calc(100% - 45px);
+            .van-tab__pane {
+                height: 100%;
+            }
+        }
     }
 }
 </style>

+ 24 - 7
src/views/overview/UpdateRecord.vue

@@ -13,9 +13,15 @@
                 <div class='right'>
                     <div class='title'>
                         <span class='date'>2020.08.19</span>
-                        <span class='type'>重要维保</span>
                     </div>
-                    <div class='content'>电梯系统-货梯-3-报停后的维保管理建筑-3#直梯光幕更换</div>
+                    <div class='content' @click='goToDetailInfo'>
+                        <p class='type'>重要维保</p>
+                        <p>电梯系统-货梯-3-报停后的维保管理建筑-3#直梯光幕更换</p>
+                    </div>
+                    <div class='content' v-if='i===1'>
+                        <p class='type'>重要维修</p>
+                        <p>电梯系统-货梯-3-报停后的维保管理建筑-3#直梯光幕更换</p>
+                    </div>
                 </div>
             </div>
         </div>
@@ -48,9 +54,13 @@ export default {
     beforeMount() {},
     mounted() {},
     methods: {
+        // 返回上一个页面(项目概况)
         backPage() {
             this.$router.go(-1)
         },
+        goToDetailInfo() {
+            this.$router.push({ name: 'UpdateRecordDetail', params: { a: 1 } })
+        },
     },
 }
 </script>
@@ -67,17 +77,17 @@ export default {
     // 主体内容
     .record {
         width: 100%;
-        height: calc(100% - 100px);
+        height: calc(100% - 95px);
         padding: 15px;
-        // background-color: lightblue;
+        background-color: #f5f6f7;
         overflow: auto;
         .info {
             width: 100%;
-            height: 105px;
+            height: auto;
             display: flex;
             .left {
                 width: 8px;
-                height: 100%;
+                height: auto;
                 display: flex;
                 flex-direction: column;
                 .dot {
@@ -99,6 +109,7 @@ export default {
             .right {
                 flex: 1;
                 padding-left: 10px;
+                padding-bottom: 30px;
                 .title {
                     width: 100%;
                     height: 20px;
@@ -111,12 +122,18 @@ export default {
                 }
                 .content {
                     width: 100%;
-                    height: auto;
+                    height: 95px;
                     margin-top: 8px;
                     font-size: 14px;
                     font-weight: 400;
                     color: #333333;
                     line-height: 25px;
+                    background-color: #fff;
+                    padding: 12px 10px;
+                    .type {
+                        font-weight: 500;
+                        color: #333333;
+                    }
                 }
             }
         }

+ 330 - 0
src/views/overview/UpdateRecordDetail.vue

@@ -0,0 +1,330 @@
+
+
+<template>
+    <div class='update-record-detail'>
+        <van-nav-bar title='重要维保  ...' left-arrow @click-left='backPage' />
+        <div class='info'>
+            <i class="iconfont wanda-nuantong2"></i>
+            <!-- 维保/维修 -->
+            <div v-if='type === 1' class='container-1'>
+                <div class='date'>
+                    <div class='report-date'>
+                        <span>填报时间</span>
+                        <span>2020-08-25</span>
+                    </div>
+                    <div class='acceptance-date'>
+                        <span>验收日期</span>
+                        <span>2020-08-29</span>
+                    </div>
+                </div>
+                <div class='detail'>此处显示事项描述的具体内容,内容过多时自动折行,直到全部显示完成,卡片无固定高度,根据事项描述内容进行自适应高度</div>
+                <ul class='card'>
+                    <li class='title'>更换配件</li>
+                    <li class='name-model'>配件名称型号:VX00223-123</li>
+                    <li class='cost'>费用出处:重点设备维修保养资金</li>
+                    <li class='num-amount'>
+                        <span>数量: 2个</span>
+                        <span>金额: 1.5万元</span>
+                    </li>
+                </ul>
+                <div class='bottom'>
+                    <div class='photo' @click='showPhoto'>现场照片: 3张</div>
+                    <div class='task-No' @click='showTaskInfo'>任务编号: 230238</div>
+                </div>
+            </div>
+            <!--  其他事项-->
+            <div v-else-if='type === 3' class='container-3'>
+                <div class='deal-date'>
+                    <div class='name'>处理时间:</div>
+                    <div>2020-08-25</div>
+                </div>
+                <div class='record'>
+                    <div class='name'>记录事项:</div>
+                    <div>三明万达广场顶层4座空调冷却塔噪声超标 排放(已整改),三明万达广场顶层4座空调冷 却塔噪声超标排放(已整改),三明万达广场 顶层4座空调冷却塔噪声超标排放(已整改)</div>
+                </div>
+                <div class='detail-location'>
+                    <div class='name'>详细位置:</div>
+                    <div>吴忠万达广场(WZ)/商业楼/1楼/娱乐楼/电 梯间/娱乐楼货梯间</div>
+                </div>
+                <div class='deatil-info'>
+                    <div class='name'>具体内容:</div>
+                    <div>三明万达广场顶层4座空调冷却塔噪声超标 排放(已整改),三明万达广场顶层4座空调冷 却塔噪声超标排放(已整改),三明万达广场 顶层4座空调冷却塔噪声超标排放(已整改)</div>
+                </div>
+            </div>
+            <!-- 综合事项 -->
+            <div v-else class='container-4'>
+                <div class='date'>
+                    <div class='name'>日期:</div>
+                    <div>2020-08-25</div>
+                </div>
+                <div class='record'>
+                    <div class='name'>记录事项:</div>
+                    <div>三明万达广场顶层4座空调冷却塔噪声超标 排放(已整改),三明万达广场顶层4座空调冷 却塔噪声超标排放(已整改),三明万达广场 顶层4座空调冷却塔噪声超标排放(已整改)</div>
+                </div>
+                <div class='work'>
+                    <div class='name'>工作要求:</div>
+                    <div>这里是工作要求具体内容</div>
+                </div>
+                <div class='rectification-matters'>
+                    <div class='name'>整改事项:</div>
+                    <div>三明万达广场顶层4座空调冷却塔噪声超标 排放(已整改),三明万达广场顶层4座空调冷 却塔噪声超标排放(已整改),三明万达广场 顶层4座空调冷却塔噪声超标排放(已整改)</div>
+                </div>
+            </div>
+        </div>
+        <!-- 现场找平预览 -->
+        <ImagePreview class='update-img-preview' :visible.sync='showImgPreview' :imgList='imgList' />
+
+        <!-- 任务信息 -->
+        <div class='task-info-container' v-show='showTask'>
+            <van-nav-bar title='任务信息' left-arrow @click-left='showTask = false' />
+            <ul class='task-info'>
+                <li>
+                    <span class='name'>工单编号:</span>
+                    <span class='data'>2890531</span>
+                </li>
+                <li>
+                    <span class='name'>工单状态:</span>
+                    <span class='data'>新建</span>
+                </li>
+                <li>
+                    <span class='name'>工单描述:</span>
+                    <span class='data'>这是一条工单任务描述</span>
+                </li>
+                <li>
+                    <span class='name'>填报人:</span>
+                    <span class='data'>新建</span>
+                </li>
+                <li>
+                    <span class='name'>联系电话:</span>
+                    <span class='data'>18820293022</span>
+                </li>
+                <li>
+                    <span class='name'>填报时间:</span>
+                    <span class='data'>2020-09-21</span>
+                </li>
+                <li>
+                    <span class='name'>验收时间:</span>
+                    <span class='data'>2020-09-21</span>
+                </li>
+            </ul>
+        </div>
+    </div>
+</template>
+<script>
+/**
+ * 说明书更新记录详情页面
+ */
+import Vue from 'vue'
+import { NavBar } from 'vant'
+Vue.use(NavBar)
+import ImagePreview from '../../components/ImagePreview'
+export default {
+    name: 'UpdateRecordDetail',
+    props: {},
+    components: { ImagePreview },
+    data() {
+        return {
+            type: 1,
+            showTask: false,
+            showImgPreview: false,
+            imgList: [],
+        }
+    },
+    beforeMount() {},
+    mounted() {
+        console.log(this.$route.params)
+    },
+    methods: {
+        // 返回上一个页面(项目概况)
+        backPage() {
+            this.$router.go(-1)
+        },
+        // 点击任务编号,显示任务信息
+        showTaskInfo(data) {
+            this.showTask = true
+        },
+        // 显示图片预览弹窗
+        showPhoto() {
+            this.imgList = [
+                'https://img.yzcdn.cn/vant/apple-1.jpg',
+                'https://img.yzcdn.cn/vant/apple-2.jpg',
+                'https://img.yzcdn.cn/vant/apple-1.jpg',
+                'https://img.yzcdn.cn/vant/apple-2.jpg',
+                'https://img.yzcdn.cn/vant/apple-1.jpg',
+                'https://img.yzcdn.cn/vant/apple-2.jpg',
+                'https://img.yzcdn.cn/vant/apple-1.jpg',
+                'https://img.yzcdn.cn/vant/apple-2.jpg',
+            ].slice(0, parseInt(Math.random() * 8 + 1))
+            this.showImgPreview = true
+        },
+    },
+}
+</script>
+<style lang='less' scoped>
+.update-record-detail {
+    width: 100%;
+    height: 100%;
+    background-color: #f5f6f7;
+    // background-color: lightblue;
+    // 下拉菜单
+    /deep/.van-dropdown-menu__item {
+        justify-content: flex-start !important;
+        padding-left: 8px;
+    }
+    // 主体内容
+    .info {
+        width: 100%;
+        height: calc(100% - 50px);
+        // padding: 15px;
+        overflow: auto;
+        .container-1,
+        .container-3,
+        .container-4 {
+            padding: 15px;
+            background-color: #fff;
+        }
+        // 维修/维保
+        .container-1 {
+            .date {
+                width: 100%;
+                height: 17px;
+                display: flex;
+                justify-content: space-between;
+                margin: 5px 0 10px 0;
+                font-size: 12px;
+                font-weight: 400;
+                color: #666666;
+                line-height: 17px;
+            }
+            .detail {
+                width: 100%;
+                height: auto;
+                margin: 10px 0;
+                font-size: 14px;
+                font-weight: 400;
+                color: #333333;
+                line-height: 20px;
+            }
+            .card {
+                width: 100%;
+                height: auto;
+                padding: 8px 16px;
+                background: #eff0f1;
+                border-radius: 4px;
+                color: #666666;
+                font-size: 14px;
+                .title {
+                    height: 20px;
+                    font-size: 14px;
+                    font-weight: 500;
+                    color: #333333;
+                    line-height: 20px;
+                    margin-bottom: 8px;
+                }
+                .name-model,
+                .cost,
+                .num-amount {
+                    margin-top: 4px;
+                }
+                .num-amount {
+                    display: flex;
+                    justify-content: space-between;
+                }
+            }
+            .bottom {
+                width: 100%;
+                height: 17px;
+                display: flex;
+                justify-content: space-between;
+                margin: 5px 0 10px 0;
+                color: #025baa;
+                line-height: 17px;
+                font-size: 14px;
+                font-weight: 400;
+                color: #025baa;
+                margin-top: 20px;
+            }
+        }
+        .container-3 {
+            .deal-date,
+            .record,
+            .detail-location,
+            .deatil-info {
+                display: flex;
+                justify-content: flex-start;
+                font-size: 14px;
+                font-weight: 400;
+                color: #666666;
+                line-height: 20px;
+                margin-bottom: 12px;
+                div {
+                    height: auto;
+                }
+                .name {
+                    width: 70px;
+                }
+                .name + div {
+                    flex: 1;
+                    text-align: left;
+                }
+            }
+        }
+        // 综合事项
+        .container-4 {
+            .date,
+            .record,
+            .work,
+            .rectification-matters {
+                display: flex;
+                justify-content: flex-start;
+                font-size: 14px;
+                font-weight: 400;
+                color: #666666;
+                line-height: 20px;
+                margin-bottom: 12px;
+                div {
+                    height: auto;
+                }
+                .name {
+                    width: 70px;
+                }
+                .name + div {
+                    flex: 1;
+                    text-align: left;
+                }
+            }
+        }
+    }
+    // 全屏的任务信息
+    .task-info-container {
+        width: 100%;
+        height: 100%;
+        position: fixed;
+        top: 0;
+        left: 0;
+        z-index: 1000;
+        background-color: #fff;
+        .task-info {
+            width: 100%;
+            padding: 15px;
+            li {
+                display: flex;
+                justify-content: flex-start;
+                line-height: 20px;
+                font-size: 14px;
+                margin-bottom: 12px;
+                .name {
+                    color: #666666;
+                    width: 70px;
+                    height: auto;
+                }
+                .data {
+                    flex: 1;
+                    height: auto;
+                    color: #333333;
+                }
+            }
+        }
+    }
+}
+</style>

+ 7 - 7
vue.config.js

@@ -37,13 +37,13 @@ module.exports = {
     },
     chainWebpack: (config) => {
         const svgRule = config.module.rule('svg')
-        svgRule.uses.clear()
-        svgRule
-            .use('babel-loader')
-            .loader('babel-loader')
-            .end()
-            .use('vue-svg-loader')
-            .loader('vue-svg-loader')
+        // svgRule.uses.clear()
+        // svgRule
+        // .use('babel-loader')
+        // .loader('babel-loader')
+        // .end()
+        // .use('vue-svg-loader')
+        // .loader('vue-svg-loader')
         config.output.filename('static/js/[name].[hash].js').end()
         config.output.chunkFilename('static/js/[name].[hash].js').end()
     },