coys 2 سال پیش
والد
کامیت
82b09befc9

+ 61 - 0
src/components/imgAndPDF/index.vue

@@ -0,0 +1,61 @@
+<template>
+  <div>
+    <van-overlay :show="show" @click="onClickHide">
+      <van-swipe @onChange="onChange">
+        <van-swipe-item v-for="item in studyList" :key="item.url">
+          <van-image v-if="item.url && item.type == 0" class="imageC" :src="this_window + item.src" />
+          <div class="imgsty" v-else>
+            <VuePdf :src="this_window + item.src"></VuePdf>
+          </div>
+
+          <!-- <imgCom :width="'100'" v-if="item.url && item.type == 0" :height="'100'" :src="item.url"></imgCom>
+         
+          <VuePdf v-else :src="item.url"></VuePdf> -->
+        </van-swipe-item>
+
+        <template #indicator>
+          <div class="custom-indicator">{{ current + 1 }}/4</div>
+        </template>
+      </van-swipe>
+    </van-overlay>
+  </div>
+</template>
+<script>
+// import imgCom from '@/components/imgCom/index.vue'
+// import VuePdfCom from '@/components/pdfCom/index.vue'
+import VuePdf from 'vue-pdf'
+export default {
+  name: 'SocAppIndex',
+  props: {
+    studyList: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    }
+  },
+  components: {
+    // imgCom,
+    VuePdf
+  },
+  data() {
+    return {
+      current: 0,
+      show: false,
+      this_window: process.env.NODE_ENV === 'development' ? '/dev' : window.origin
+    }
+  },
+
+  mounted() {},
+
+  methods: {
+    onChange(index) {
+      this.current = index
+    },
+    onClickHide() {
+      this.show = false
+    }
+  }
+}
+</script>
+<style lang="scss" scoped></style>

+ 7 - 6
src/components/imgCom/index.vue

@@ -4,16 +4,12 @@
     <van-overlay :show="show" @click="onClickHide">
       <div class="imgsty">
 
-          <van-image    :src="this_window+src" />
+          <van-image class="imageC"    :src="this_window+src" />
         </div>
       
     </van-overlay>
   </div>
-  <!-- <van-overlay :show="false">
-    <view class="wrapper">
-      <van-image :width="width" :height="height" :src="src" />
-    </view>
-  </van-overlay> -->
+
 </template>
 <script>
 export default {
@@ -57,4 +53,9 @@ export default {
     position:absolute;
     top: 28%;
 }
+.imageC{
+  min-height: 200px;
+  min-width: 200px;
+ 
+}
 </style>

+ 14 - 8
src/components/pdfCom/index.vue

@@ -1,12 +1,16 @@
 <template>
-  <div @click="lookPdf">
-    <VuePdf   :src="this_window+src"></VuePdf>
+  <div >
+    <div @click="lookPdf"> <VuePdf   :src="this_window+src"></VuePdf></div>
+   
     <!-- <VuePdf @click="lookPdf" v-else  :src="this_window+item.url"></VuePdf> -->
-    <van-overlay :show="show" @click="onClickHide">
-      <div class="imgsty">
-        <VuePdf :src="this_window+src"></VuePdf>
-      </div>
-    </van-overlay>
+    
+
+      <van-overlay :show="show" @click="onClickHide">
+        <div class="imgsty">
+          <VuePdf :src="this_window+src"></VuePdf>
+        </div>
+      </van-overlay>
+   
   </div>
 </template>
 <script>
@@ -36,7 +40,7 @@ export default {
     //查看pdf
     lookPdf() {
        
-      this.show = true
+      this.show = !this.show
     },
 
     onClickHide() {
@@ -49,5 +53,7 @@ export default {
 .imgsty {
   position: absolute;
   top: 28%;
+  width: 100%;
+  height: 100%;
 }
 </style>

+ 0 - 51
src/views/menu/monitoringCall/1.vue

@@ -1,51 +0,0 @@
-<
-<template>
-  <div>
-    <div v-for="item in list">
-        
-    </div>
-  </div>
-</template>
-<script>
-export default {
-  name: 'SocApp1',
-
-  data() {
-    return {
-      list: [
-        {
-          title: '每日履职',
-          dictValue:'0',
-          data: {
-            a: '网点安全员',
-            b: '',
-            c: '',
-            d: ''
-          }
-        },
-        {
-          title: '每月履职',
-          dictValue:'1',
-        },
-        {
-          title: '每季履职'
-        },
-        {
-          title: '半年履职'
-        },
-        {
-          title: '每年履职'
-        }
-      ]
-    }
-  },
-
-  mounted() {},
-
-  methods: {
-    submitHandler() {
-      aaaaaa(this.list).then(res => {})
-    }
-  }
-}
-</script>

+ 12 - 9
src/views/menu/monitoringCall/components/consultInfo.vue

@@ -68,6 +68,7 @@ import { base64ToBlob } from '@/utils/base64TurnImg.js'
 export default {
   data() {
     return {
+      endNum: false, //判断是否能结束调阅
       taskData: {},
       hostList: [], //主机列表
       activeNames: []
@@ -104,7 +105,9 @@ export default {
         }
       })
     },
-    getHostHandler() {
+    getHostHandler(num = '') {
+      this.endNum = num == 1 ? true : false
+
       getSysDeviceByTaskId({ taskId: this.$route.params.id.split('_')[0] }).then(res => {
         let { code, data, msg } = res
         if (code == 200) {
@@ -115,12 +118,10 @@ export default {
               // on close
               this.$router.push('/monitoringCall')
             })
-          }else{
-
+          } else {
             this.hostList = data
             this.activeNames = [this.hostList[0].hostId]
           }
-          
         }
       })
     },
@@ -131,13 +132,15 @@ export default {
     //结束调阅
     endMontor() {
       //没有记录的时候不能结束调阅
-      if (
-        !this.taskData.coreMonitoringTaskRegistrationMonitorVOList ||
-        this.taskData.coreMonitoringTaskRegistrationMonitorVOList.length == 0
-      ) {
+      let falg=this.taskData.coreMonitoringTaskRegistrationMonitorVOList
+      if(this.endNum||(falg&&falg.length>0)){
+        this.$refs.scandialog.visible = true
+      }else{
         Dialog({ message: '该调阅没有记录不能进行结束操作!' })
         return
       }
+      
+     
 
       // let startDate = JSON.parse(JSON.stringify(this.taskData.taskStartTime))
 
@@ -147,7 +150,7 @@ export default {
       //   Dialog({ message: '该调阅未满一个小时请确认' })
       //   // 未满一小时不能结束调阅
       // } else {
-      this.$refs.scandialog.visible = true
+      // this.$refs.scandialog.visible = true
 
       //   startDate = new Date(startDate)
       // }

+ 1 - 1
src/views/menu/monitoringCall/components/passage.vue

@@ -64,7 +64,7 @@ export default {
       this.$refs.taskInfo.init(this.taskId,videoId,this.hostId)
     },
     resetList(){
-        this.$emit('resetList')
+        this.$emit('resetList',1)
     }
   }
 }

+ 5 - 4
src/views/menu/monitoringCall/index.vue

@@ -60,7 +60,7 @@
             :key="item.id"
             size="large"
             :label="item.planStartTime+'~'+item.planEndTime"
-            is-link
+            :is-link="item.status!=3"
             @click="linkHandler(item.status,item.id,item)"
           >
             <template #title>
@@ -412,7 +412,7 @@ export default {
   font-size: 20px;
 }
 .monitor {
-  color: #ed6a0c;
+  color: #1989fa;
   padding-left: 10px;
   padding-right: 10px;
  
@@ -422,7 +422,7 @@ export default {
   // background-color: #8cb585;
 }
 .monitored {
-  color: #1989fa;
+  color: #fd8104;
 
   padding-left: 10px;
   padding-right: 10px;
@@ -442,7 +442,8 @@ export default {
   // background-color: #25da0b;
 }
 .waringtoring {
-  color:  #e46962;
+  color:  #f16363;
+  
   padding-left: 10px;
   padding-right: 10px;
   float: right;

+ 15 - 6
src/views/menu/training/components/addTraining.vue

@@ -66,11 +66,11 @@
       </van-popup>
       <div class="mainItem">
       <div class="label labelPeople">培训资料</div>
+      <!-- <PDFAndImgLook ref="PDFAndImgLook" :studyList="studyList"></PDFAndImgLook> -->
+      
       <template v-for="item in studyList">
-        <div :key="item.url" class="imglIST" style="{width:'100px',height: '100px';}">
-
-          <imgCom :width="'100'" v-if="item.url&&item.type==0"  :height="'100'" :src="item.url"></imgCom>
-          <!-- <VuePdf v-else :src="item.url"></VuePdf> -->
+        <div :key="item.url" class="imglIST" style="{width:'100px',height: '100px';}" @click="clikHadner">
+          <imgCom  :width="'100'" v-if="item.url&&item.type==0"  :height="'100'" :src="item.url"></imgCom>
           <VuePdf  v-else  :src="item.url"></VuePdf>
         </div>
       </template>
@@ -139,22 +139,25 @@ import NavBar from '@/components/NavBar'
 import CheckPeople from '@/components/peopleList/index.vue'
 import Upload from '@/components/upload/index.vue'
 import imgCom from '@/components/imgCom/index.vue'
+import VuePdf from "@/components/pdfCom/index.vue"
 import { gettrainingInfo, edittrainingInfo } from '@/api/training.js'
 import { newDateTime } from '@/utils/date.js'
 import { Dialog, Toast } from 'vant'
-import VuePdf from "@/components/pdfCom/index.vue"
-
+import PDFAndImgLook from '@/components/imgAndPDF/index.vue'
 export default {
   name: 'SocAppAddTraining',
   components: {
     VuePdf,
     NavBar,
+    PDFAndImgLook,
     imgCom,
     Upload,
     CheckPeople
   },
   data() {
     return {
+      
+      current:0,
       this_window:window,
       studyList: [], //学习资料数组
       startDateTime: new Date(),
@@ -243,6 +246,12 @@ export default {
   mounted() {},
 
   methods: {
+    clikHadner(){
+      this.$refs.PDFAndImgLook.show=true
+    },
+    onChange(index) {
+      this.current = index
+    },
     // 查看pdf
     
     onSubmit(values) {