coys 2 роки тому
батько
коміт
5b865af3d6

+ 59 - 0
src/components/imgCom/index.vue

@@ -0,0 +1,59 @@
+<template>
+  <div>
+    <van-image :width="width" :height="height" :src="src" @click="onClickShow" />
+    <van-overlay :show="show" @click="onClickHide">
+      <div class="imgsty">
+
+          <van-image    :src="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 {
+  props: {
+    width: {
+      type: String,
+      default: '100'
+    },
+    height: {
+      type: String,
+      default: '100'
+    },
+    src: {
+      type: String,
+      default: 'https://img.yzcdn.cn/vant/cat.jpeg'
+    }
+  },
+  name: 'SocAppIndex',
+
+  data() {
+    return {
+      show: false
+    }
+  },
+
+  mounted() {},
+
+  methods: {
+    onClickShow() {
+      this.show = true
+    },
+    onClickHide() {
+      this.show = false
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.imgsty{
+    position:absolute;
+    top: 28%;
+}
+</style>

+ 24 - 7
src/components/peopleList/index.vue

@@ -1,10 +1,11 @@
 <template>
   <div>
+    
     <van-field
       readonly
       clickable
       name="datetimePicker"
-      :value="peoples"
+      v-model="peoples"
       :required="isRequired"
       :label="inpitLabel"
       placeholder="请选择人员"
@@ -57,8 +58,7 @@ export default {
   props: {
     organizationId: {
       //机构ID
-      type: Number,
-      default: 0
+      
     },
     userList: {
       type: Array,
@@ -109,9 +109,18 @@ export default {
       this.orgId = val + ''
       this.getpeople()
     },
+    //监听弹框是否打开
+    show(val){
+      if(val){
+        this.getpeople()
+      }
+    },
     //监听人员数组变化
     userList(val) {
-      this.peoples = val.map(item => item.userName).join(',')
+      this.$set(this.$data,'peoples',val.map(item => item.userName).join(','))
+
+      
+      
       this.peoplesId = [val.map(item => item.userId).join(',')]
     }
   },
@@ -123,9 +132,15 @@ export default {
     onLoad() {},
     getpeople() {
       getOrgPeople(this.orgId).then(res => {
+      
         let { code, data, msg } = res
         if (code == 200) {
           this.peopleList = data
+          this.peopleList.forEach(item=>{
+            item.userName=item.name
+            item.username=item.name
+            item.userId=item.id
+          })
           this.peopleListCpoy = JSON.parse(JSON.stringify(this.peopleList))
          
           this.peopleListCpoy.forEach(item => {
@@ -161,11 +176,13 @@ export default {
           }
         })
       })
-      this.show = false
-      this.peoples = list.map(item => item.name).join(',')
-
+      
+      // this.peoples = list.map(item => item.name).join(',')
+     
+      this.$set(this.$data,'peoples',list.map(item => item.name).join(','))
       // 抛出已选择人员信息
       this.$emit('userList', list)
+      this.show = false
     }
   }
 }

+ 1 - 1
src/config/env.development.js

@@ -2,7 +2,7 @@
 module.exports = {
   title: 'soc-app-dev',
   baseUrl: 'http://localhost:9018', // 项目地址
-  baseApi: '/jingyuanchao', // 本地api请求地址,注意:如果你使用了代理,请设置成'/'
+  baseApi: '/chao', // 本地api请求地址,注意:如果你使用了代理,请设置成'/'
   APPID: 'xxx',
   APPSECRET: 'xxx',
   $cdn: 'https://www.sunniejs.cn/static'  //静态资源

+ 2 - 2
src/views/menu/monitoringCall/index.vue

@@ -66,9 +66,9 @@
           />
         </van-popup>
       </van-col>
-      <van-col span="6" class="btnf_box">
+      <!-- <van-col span="6" class="btnf_box">
         <van-button type="info" class="btn" @click="clearSearch" size="small">重置</van-button>
-      </van-col>
+      </van-col> -->
     </van-row>
     <!-- 调阅列表 -->
     <div class="bigbox">

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

@@ -37,7 +37,7 @@
         @click="showStartDate = true"
       />
       <van-popup v-model="showStartDate" position="bottom">
-        <van-datetime-picker type="datetime" @confirm="onConfirmDate" @cancel="showStartDate = false" />
+        <van-datetime-picker v-model="startDateTime" type="datetime" @confirm="onConfirmDate" @cancel="showStartDate = false" />
       </van-popup>
       <!-- 培训结束时间 -->
       <van-field
@@ -52,7 +52,7 @@
         @click="showEndDate = true"
       />
       <van-popup v-model="showEndDate" position="bottom">
-        <van-datetime-picker type="datetime" @confirm="onConfirmEndDate" @cancel="showEndDate = false" />
+        <van-datetime-picker v-model="endDateTime" type="datetime" @confirm="onConfirmEndDate" @cancel="showEndDate = false" />
       </van-popup>
       <!-- 培训内容 -->
       <van-field
@@ -112,6 +112,8 @@ export default {
   },
   data() {
     return {
+      startDateTime:new Date(),
+      endDateTime:new Date(),
       falg: false, //校验是否通过
       username: '',
       password: '',
@@ -216,9 +218,10 @@ export default {
       list.forEach(item => {
         ;(item.type = 1), (item.userId = item.id)
         item.userName = item.username
+        item.name = item.userName
         delete item.username
       })
-
+      
       this.userPeopleList = list
     },
     lackUserListHandler(list) {

+ 8 - 2
src/views/menu/training/components/personnelSignature.vue

@@ -44,11 +44,15 @@
     </div>
     <div class="mainItem">
       <div>上传图片</div>
-      <van-image width="100" v-for="item in imgList" :key="item" height="100" :src="item" />
+      
+      <imgCom :width="'100'" v-for="item in imgList" :key="item" :height="'100'" :src="item"></imgCom>
+      
     </div>
     <div class="mainItem" v-if="this.$route.params.id.split('_')[1]==='info'">
       <div>参与人员签名图片</div>
-      <van-image width="100" v-for="item in signUserList" :key="item.userId" height="100" :src="item.signImage||''" />
+      <imgCom :width="'100'" v-for="item in signUserList" :key="item.userId" :height="'100'" :src="item.signImage||''"></imgCom>
+
+     
     </div>
     <van-row>
       <van-col span="24" class="btns">
@@ -65,12 +69,14 @@ import NavBar from '@/components/NavBar'
 import writingPad from '@/components/writingPad/index.vue'
 import { gettrainingInfo,signtrainingInfo } from '@/api/training.js'
 import { upload } from '@/api/public'
+import imgCom from '@/components/imgCom/index.vue'
 import {base64ToBlob} from '@/utils/base64TurnImg.js'
 import config from '@/config/index';
 export default {
   name: 'SocAppAddTraining',
   components: {
     NavBar,
+    imgCom,
     writingPad
   },
   data() {

+ 2 - 2
src/views/menu/training/index.vue

@@ -455,8 +455,8 @@ export default {
         console.log(res, 'ssss')
         let { meg, code, data } = res
         data.map(item => {
-          if (item.type === 2) {
-            this.absenceList.push(item.userName)
+          if (item.sign !== 1) {
+            this.absenceList.list.push(item.userName)
             this.absenceList.num++
           } else {
             this.participationList.list.push(item.userName)

+ 8 - 0
vue.config.js

@@ -100,6 +100,14 @@ module.exports = defineConfig({
           '^/dev-serve':'/'
         }
       },
+      '/chao': {
+        target: "http://10.87.10.34:8080",
+        // ws:true,
+        changOrigin:true,
+        pathRewrite:{
+          '^/chao':'/'
+        }
+      },
     }
   },
   css: {