coys 2 anni fa
parent
commit
49292f2f17

+ 77 - 0
src/api/drillTask.js

@@ -0,0 +1,77 @@
+// 调阅相关接口
+import request from '@/utils/request'
+
+
+// 获取演练登记接口
+export function getdrillTask(query) {
+  return request({
+    url: '/core/drill/task/list',
+    
+    method: 'get',
+    params:query
+  })
+}
+//获取演练登记详情
+export function getrehearsalInfo(query) {
+  return request({
+    url: `/core/drill/task/${query}`,
+    
+    method: 'get',
+    
+  })
+}
+//演练库列表
+export function drillDictionaryList(query) {
+  return request({
+    url: `/core/drillDictionary/listData`,
+    
+    method: 'get',
+    params:query
+  })
+}
+//编辑演练登记登记
+export function drillInfo(data) {
+  return request({
+    url: `/core/drill/task`,
+    
+    method: 'put',
+    data
+  })
+}
+//演练登记提交
+export function edittrainingInfo(data) {
+  return request({
+    url: `/core/eduTask`,
+    
+    method: 'put',
+    data
+  })
+}
+//获取签名情况
+export function getsignUserList(id) {
+  return request({
+    url: `/core/drill/task/signUserList/${id}`,
+    method: 'get',
+    
+  })
+}
+//签名提交
+export function singrehearsalTask(data) {
+  return request({
+    url: `/core/drill/task/sign`,
+    method: 'post',
+    data
+  })
+}
+
+//新增调阅接口NFC||图片接口
+export function registration(data) {
+  return request({
+    url: '/core/registration',
+    headers: {
+      isToken: false
+    },
+    method: 'post',
+    data
+  })
+}

+ 4 - 3
src/components/imgCom/index.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <van-image :width="width" :height="height" :src="src" @click="onClickShow" />
+    <van-image :width="width" :height="height" :src="this_window+src" @click="onClickShow" />
     <van-overlay :show="show" @click="onClickHide">
       <div class="imgsty">
 
-          <van-image    :src="src" />
+          <van-image    :src="this_window+src" />
         </div>
       
     </van-overlay>
@@ -35,7 +35,8 @@ export default {
 
   data() {
     return {
-      show: false
+      show: false,
+      this_window:process.env.NODE_ENV === "development"? '/dev':window.origin
     }
   },
 

+ 5 - 4
src/components/pdfCom/index.vue

@@ -1,10 +1,10 @@
 <template>
   <div @click="lookPdf">
-    <VuePdf   :src="src"></VuePdf>
-    <!-- <VuePdf @click="lookPdf" v-else  :src="this_window.origin+item.url"></VuePdf> -->
+    <VuePdf   :src="this_window+src"></VuePdf>
+    <!-- <VuePdf @click="lookPdf" v-else  :src="this_window+item.url"></VuePdf> -->
     <van-overlay :show="show" @click="onClickHide">
       <div class="imgsty">
-        <VuePdf :src="src"></VuePdf>
+        <VuePdf :src="this_window+src"></VuePdf>
       </div>
     </van-overlay>
   </div>
@@ -25,7 +25,8 @@ export default {
   },
   data() {
     return {
-        show:false
+        show:false,
+        this_window:process.env.NODE_ENV === "development"? '/dev':window.origin
     }
   },
 

+ 2 - 1
src/components/upload/index.vue

@@ -50,8 +50,9 @@ export default {
 
             let imgUrl =
               process.env.NODE_ENV === "development"
-                ?  config.baseUrl + v.path
+                ?  '/dev' + v.path
                 : window.origin + v.path;
+                console.log(imgUrl);
             return {
               name: v.name,
               url:  imgUrl,

+ 61 - 55
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -15,7 +15,7 @@
         readonly
         clickable
         name="datetimePicker"
-        :value="form.trainingStartDateTime"
+        :value="form.drillTime"
         required
         :rules="[{ required: true, message: '演练时间不能为空' }]"
         label="演练时间"
@@ -34,8 +34,8 @@
       <van-field
         required
         :rules="[{ required: true, message: '演练地点不能为空' }]"
-        v-model="form.content"
-        name="content"
+        v-model="form.drillSite"
+        name="drillSite"
         label="演练地点"
         type="textarea"
         row="3"
@@ -60,15 +60,17 @@
       </van-popup>
       <!-- 参考预案演练库 -->
       <div class="mainItem">
-        <div class="label labelPeople"><van-button size="small" type="info">参考预案演练库</van-button></div>
+        <div class="label labelPeople"><van-button size="small" @click="rehearsalHandler" type="info">参考预案演练库</van-button></div>
       </div>
+      <!-- 演练库选择组件 -->
+      <yldialog ref="yldialog" :dictValue="form.type" @checkList="checkList"></yldialog>
       <!-- 预设案由 -->
 
       <van-field
         required
         :rules="[{ required: true, message: '预设案由不能为空' }]"
-        v-model="form.content"
-        name="content"
+        v-model="form.presetCase"
+        name="presetCase"
         label="预设案由"
         type="textarea"
         row="3"
@@ -77,13 +79,12 @@
         placeholder="请填写预设案由"
       />
 
-     
       <!-- 演练情况 -->
       <van-field
         required
         :rules="[{ required: true, message: '演练情况不能为空' }]"
-        v-model="form.content"
-        name="content"
+        v-model="form.drillSituation"
+        name="drillSituation"
         label="演练情况"
         type="textarea"
         row="3"
@@ -91,7 +92,6 @@
         show-word-limit
         placeholder="请填写演练情况"
       />
-     
 
       <!-- 参与人员 -->
 
@@ -130,15 +130,17 @@ 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 { gettrainingInfo, edittrainingInfo } from '@/api/training.js'
+import { getrehearsalInfo, drillInfo } from '@/api/drillTask.js'
 import { newDateTime } from '@/utils/date.js'
 import { Dialog, Toast } from 'vant'
+import yldialog from './dialog.vue'
 import VuePdf from '@/components/pdfCom/index.vue'
 
 export default {
   name: 'SocAppAddTraining',
   components: {
     VuePdf,
+    yldialog,
     NavBar,
     imgCom,
     Upload,
@@ -149,30 +151,38 @@ export default {
       // this_window: window,
       // studyList: [], //学习资料数组
       startDateTime: new Date(),
-     
+
       falg: false, //校验是否通过
-    
+
       form: {
-        typeText: '', //培训类型
-        type: '', //培训value
-        content: '', //培训内容
-        note: '', //培训总结
+        typeText: '', //演练项目类型
+        type: '', //演练value
+        drillSite: '', //演练地点
+        note: '', //演练总结
         taskUserList: [], //人员数组
         imageList: [], //图片数组
-        trainingStartDateTime: '', //开始时间
+        drillTime: '', //开始时间
+        presetCase: '', //预设案由
+        drillSituation: '', //演练情况
         trainingEndDateTime: '' //结束时间
       },
       trainingData: {},
       userPeopleList: [], //参与人员数组
       lackPeopleList: [], //缺席人员数组
-      showPicker: false, //培训类型显示隐藏
+      showPicker: false, //演练类型显示隐藏
       showStartDate: false, //开始时间显示隐藏
-      columns: ['每月安全培训教育', '专项安全培训教育']
+      columns: [],
+      columnsList: []
     }
   },
   created() {
+    //获取数据字典
+    this.getDictHandler('core_drill_type', res => {
+      this.columnsList = res
+      this.columns = res.map(item => item.dictLabel)
+    })
     //获取详情信息
-    gettrainingInfo(this.$route.params.id).then(res => {
+    getrehearsalInfo(this.$route.params.id).then(res => {
       let { code, data, msg } = res
       if (code == 200) {
         this.trainingData = data
@@ -189,7 +199,7 @@ export default {
         //     } else {
         //       i.type = 0
         //     }
-            this.studyList.push(i)
+        // this.studyList.push(i)
         //   })
         // }
         if (!data.imageList) {
@@ -232,42 +242,35 @@ export default {
   mounted() {},
 
   methods: {
+    //预案演练选中数据
+    checkList(list){
+     this.form.presetCase=list[0].defaultCause
    
-    onSubmit(values) {
-      console.log('submit', values)
-      Dialog.confirm({
-        title: '',
-        message: '是否提交培训数据?'
-      })
-        .then(() => {
-          // on confirm
-        })
-        .catch(() => {
-          // on cancel
-        })
+     
     },
-    //培训类型确认
+    //打开演练库弹框
+    rehearsalHandler(){
+      this.$refs.yldialog.init()
+    },
+  
+    //演练类型确认
     onConfirm(val) {
-      this.form.typeText = val //培训类型赋值
-
-      switch (val) {
-        case '每月安全培训教育':
-          this.form.type = '0'
+      this.form.typeText = val //演练类型赋值
+      this.columnsList.forEach(item => {
+        if (val == item.dictLabel) {
+          this.form.type = item.dictValue
+        }
+      })
 
-          break
-        case '专项安全培训教育':
-          this.form.type = '1'
-          break
-      }
       this.showPicker = false
     },
     //开始时间确认
     onConfirmDate(val) {
-      this.form.trainingStartDateTime = newDateTime(val)
+      this.form.drillTime = newDateTime(val)
 
       this.showStartDate = false
     },
-    
+
     userListHandler(list) {
       list.forEach(item => {
         ;(item.type = 1), (item.userId = item.id)
@@ -289,13 +292,12 @@ export default {
     },
     //上传附件成功
     listHandler(list) {
-    
       this.form.imageList = list || []
     },
     //表单提交前校验
     beforSubmitV() {
       this.falg = false
-      let startDate = JSON.parse(JSON.stringify(this.form.trainingStartDateTime))
+      let startDate = JSON.parse(JSON.stringify(this.form.drillTime))
       startDate = Date.parse(new Date(startDate))
 
       let endDate = JSON.parse(JSON.stringify(this.form.trainingEndDateTime))
@@ -348,7 +350,7 @@ export default {
     submitHandler(type) {
       Dialog.confirm({
         title: '',
-        message: `是否${type === 2 ? '提交' : '保存'}培训数据?`
+        message: `是否${type === 2 ? '提交' : '保存'}演练数据?`
       })
         .then(() => {
           if (type === 1) {
@@ -377,10 +379,11 @@ export default {
       obj.taskUserList = []
 
       obj.taskUserList.push(...this.userPeopleList, ...this.lackPeopleList)
-
-      edittrainingInfo({
+      console.log(obj);
+      
+      drillInfo({
         id: this.trainingData.id,
-        type: this.trainingData.type,
+        // type: this.trainingData.type,
         submitType: type,
 
         ...obj
@@ -388,7 +391,7 @@ export default {
         let { code, msg } = res
         if (code == 200) {
           Toast('登记成功')
-          this.$router.push('/training')
+          this.$router.push('/rehearsalTask')
         } else {
           Toast(msg)
         }
@@ -409,10 +412,13 @@ export default {
     text-align: left;
   }
   .label {
-    
+    width: 200px;
     flex: none;
     text-align: left;
   }
+  .labelPeople {
+    width: 300px;
+  }
 }
 .bigbox {
   height: calc(100vh - 200px);

+ 177 - 0
src/views/menu/rehearsalTask/components/dialog.vue

@@ -0,0 +1,177 @@
+<template>
+  <div>
+    <van-action-sheet class="bigsheetbox" v-model="show" position="bottom" title="选择演练库">
+      <van-row>
+        <van-col span="24">
+          <div class="line"></div>
+        </van-col>
+      </van-row>
+
+      <van-row>
+        <van-col span="24">
+          <van-search
+            v-model="searchVal"
+            show-action
+            placeholder="请输入搜索关键词"
+            @input="onSearch"
+            @cancel="onCancel"
+          />
+        </van-col>
+      </van-row>
+
+      <van-row>
+        <van-col span="24">
+          <van-checkbox-group v-model="result" @change="changeCheckBox">
+            <van-cell-group>
+              <van-cell v-for="item in peopleListCpoy" clickable :key="item.id" :title="`${item.defaultCause}`">
+                <template #right-icon>
+                  <van-checkbox :name="item.id" ref="checkboxes" />
+                </template>
+              </van-cell>
+            </van-cell-group>
+          </van-checkbox-group>
+        </van-col>
+      </van-row>
+      <van-row class="bottomdiv">
+        <van-col span="24">
+          <van-button class="btns" size="small" type="info" @click="submitHandler">确认</van-button>
+        </van-col>
+      </van-row>
+    </van-action-sheet>
+  </div>
+</template>
+<script>
+import { deptTreeList } from '@/api/toConsult.js'
+import { drillDictionaryList } from '@/api/drillTask.js'
+import OrgTree from '@/components/orgTree'
+import { list } from '@/api/protection'
+export default {
+  name: 'SocAppIndex',
+  components: {
+    OrgTree
+  },
+  props: {
+    userList: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    dictValue: {},
+    organizationId: {
+      //机构ID
+      type: String,
+      default: JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
+    },
+
+    inpitLabel: {
+      type: String,
+      default: '参与人员'
+    },
+    fieldNames: {
+      //树行配置映射项
+      type: Object,
+      default: () => {
+        return {
+          text: 'name',
+          value: 'id',
+          children: 'children'
+        }
+      }
+    }
+  },
+  data() {
+    return {
+      orgId: this.organizationId || '',
+      show: false,
+      value1: '',
+      showcascader: false,
+      cascaderValue: '',
+      loading: false,
+      options: [], //机构列表
+      result: [], //人员ID集合
+      searchVal: '', //搜索值
+      peopleList: [], //人员列表
+      peopleListCpoy: [], //人员列表2
+      orgName: '' //机构名称
+    }
+  },
+  created() {},
+  mounted() {},
+
+  methods: {
+    //复选框发生变化
+    changeCheckBox(list) {
+      if (list && list.length > 1) {
+        this.result = [list[list.length - 1]]
+      }
+    },
+    init() {
+      this.show = true
+      this.getpeople()
+    },
+    onLoad() {},
+    getpeople() {
+      drillDictionaryList({ orgId: this.orgId, dictValue: this.dictValue }).then(res => {
+        let { code, data, msg } = res
+        if (code == 200) {
+          console.log(res)
+          this.peopleList = data
+          this.peopleListCpoy = JSON.parse(JSON.stringify(this.peopleList))
+          this.peopleListCpoy.forEach(item => {
+            this.$set(item, 'checked', false)
+          })
+        }
+      })
+    },
+
+    onSearch(val) {
+      this.peopleListCpoy = this.peopleList.filter(item => {
+        if (item.defaultCause.indexOf(val) != -1) {
+          return item
+        }
+      })
+    },
+    onCancel() {
+      this.searchVal = ''
+      this.peopleListCpoy = this.peopleList
+    },
+    submitHandler() {
+      let list = []
+      this.peopleListCpoy.filter(item => {
+        this.result.forEach(r => {
+          if (r == item.id) {
+            list.push(item)
+          }
+        })
+      })
+      this.show = false
+    
+
+      // 抛出已选择人员信息
+      this.$emit('checkList', list)
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.van-action-sheet {
+  min-height: 90%;
+}
+.btns {
+  width: 100%;
+}
+.bottomdiv {
+  width: 100%;
+  bottom: 0%;
+  position: fixed;
+}
+.bigsheetbox {
+  height: calc(100vh - 100px);
+}
+.line {
+  width: 100%;
+  height: 3px;
+  background-color: #1989fa;
+}
+</style>

+ 103 - 39
src/views/menu/rehearsalTask/components/rehearsalTaskSign.vue

@@ -12,39 +12,28 @@
     </div>
     <div class="mainItem">
       <div class="label">演练时间</div>
-      <div>{{ trainingData?.typeText }}</div>
+      <div>{{ trainingData?.startDate }}</div>
     </div>
     <div class="mainItem">
       <div class="label">演练地点</div>
-      <div>{{ trainingData?.trainingStartDateTime }}</div>
+      <div>{{ trainingData?.drillSite }}</div>
     </div>
     <div class="mainItem">
       <div class="label">指挥人</div>
-      <div>{{ trainingData?.trainingEndDateTime }}</div>
+      <div>{{ trainingData?.hostName }}</div>
     </div>
     <div class="mainItem">
       <div class="label">演练项目</div>
-      <div>{{ trainingData?.hostName }}</div>
+      <div>{{ trainingData?.typeText }}</div>
     </div>
     <div class="mainItem">
       <div class="label">预设案由</div>
-      <div>{{ trainingData?.recorderName }}</div>
+      <div>{{ trainingData?.presetCase }}</div>
     </div>
-    <!-- <div class="mainItem">
-      
-      <div class="label labelPeople">培训资料</div>
-      <template v-for="item in studyList">
-        <div :key="item.url" class="imglIST" style="{width:'100px',height: '100px';}">
 
-          <imgCom :width="'100'"  v-if="this_window.origin+item.url&&item.type==0"  :height="'100'" :src="this_window.origin+item.url"></imgCom>
-          
-          <VuePdf v-else  :src="this_window.origin+item.url"></VuePdf>
-        </div>
-      </template>
-    </div> -->
     <div class="mainItem">
       <div class="label">演练情况</div>
-      <div>{{ trainingData?.content }}</div>
+      <div>{{ trainingData?.drillSituation }}</div>
     </div>
 
     <div class="mainItem">
@@ -62,26 +51,26 @@
     </div>
     <div
       class="mainItem"
-      v-if="this.$route.params.id.split('_')[1] === 'info' || this.$route.params.id.split('_')[1] === 'comment'"
+      v-if="peopleShow"
     >
       <div class="label labelPeople">参与人员签名图片</div>
       <template v-for="item in signUserList">
         <imgCom :width="'100'" v-if="item.signImage" :key="item.userId" :height="'100'" :src="item.signImage"></imgCom>
       </template>
     </div>
-    <!-- <van-rate value="{{ value }}" count="{{ 6 }}" bind:change="onChange" /> -->
     <div
       class="mainItem"
-      v-if="this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'comment'"
+      v-if="evaluateShow"
     >
       <div class="label">评分</div>
-      <div><van-rate v-model="value" :count="10" /></div>
+      <div><van-rate :disabled="disabledShow" v-model="value" :count="10" /></div>
     </div>
     <van-field
-      v-if="this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'comment'"
+      v-if="evaluate"
       required
       :rules="[{ required: true, message: '评语不能为空' }]"
       v-model="content"
+      
       name="content"
       label="评语"
       type="textarea"
@@ -100,18 +89,20 @@
           @click="signatureHandler"
           >签名</van-button
         >
-         <!-- 评价 || 评优推优选  -->
+        <!-- 评价 || 评优推优选  -->
         <van-button
           type="info"
           class="btn"
           v-if="this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'comment'"
-          @click="signatureHandler"
+          @click="submitHandler"
           >提交</van-button
         >
-        
-        
       </van-col>
     </van-row>
+    <div class="mainItem" v-if="disabledShow">
+      <div class="label">评语</div>
+      <div>{{ content }}</div>
+    </div>
     <van-action-sheet v-model="show" title="签署名字" class="sheet">
       <writingPad ref="esign" @resultImg="resultImg"></writingPad>
     </van-action-sheet>
@@ -120,16 +111,19 @@
 <script>
 import NavBar from '@/components/NavBar'
 import writingPad from '@/components/writingPad/index.vue'
-import { gettrainingInfo, signtrainingInfo } from '@/api/training.js'
+import { getrehearsalInfo, singrehearsalTask, drillInfo } from '@/api/drillTask.js'
 import { upload } from '@/api/public'
 import imgCom from '@/components/imgCom/index.vue'
 import { base64ToBlob } from '@/utils/base64TurnImg.js'
 import config from '@/config/index'
+import { Toast, Dialog } from 'vant'
 import VuePdf from '@/components/pdfCom/index.vue'
 export default {
   name: 'SocAppAddTraining',
   components: {
     NavBar,
+    Dialog,
+    Toast,
     VuePdf,
     imgCom,
     writingPad
@@ -148,21 +142,47 @@ export default {
       trainingData: {} //详情数据
     }
   },
-  computed:{
-    goBack(){
-      if(this.$route.params.id.split('_')[1] === 'evaluate'){
+  computed: {
+    goBack() {
+      if (this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'edit'||this.$route.params.id.split('_')[1] === 'info') {
         return '/rehearsalTask'
-      }else if(this.$route.params.id.split('_')[1] === 'comment'){
+      } else if (this.$route.params.id.split('_')[1] === 'comment') {
         return '/rehearsaloptimal'
       }
-      
+    },
+    evaluate(){
+      if(this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'comment'){
+        return true
+      }else{
+        return false
+      }
+    },
+    evaluateShow(){
+      if(this.$route.params.id.split('_')[1] === 'info'||this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'comment'){
+        return true
+      }else{
+        return false
+      }
+    },
+    disabledShow(){
+      if(this.$route.params.id.split('_')[1] === 'info'){
+        return true
+      }
+    },
+    peopleShow(){
+      if(this.$route.params.id.split('_')[1] === 'info' || this.$route.params.id.split('_')[1] === 'comment'){
+        return true
+      }
     }
+
   },
   created() {
     //获取详情信息
-    gettrainingInfo(this.$route.params.id.split('_')[0]).then(res => {
+    getrehearsalInfo(this.$route.params.id.split('_')[0]).then(res => {
       let { code, data, msg } = res
       if (code == 200) {
+        this.content=data.comment
+        this.value=data.commentScore
         this.trainingData = data
         this.trainingData?.taskUserList?.map(item => {
           if (item.type == 1) {
@@ -181,7 +201,7 @@ export default {
         if (list.length > 0) {
           list.forEach(item => {
             let i = JSON.parse(item)
-            console.log(i)
+
             if (i.url.split('.')[1] == 'pdf') {
               i.type = 1
             } else {
@@ -201,12 +221,56 @@ export default {
     signatureHandler() {
       this.show = true
     },
+    //评价提交
+    submitHandler() {
+      //判断当前是评价 还是评价推优
+      if (this.$route.params.id.split('_')[1] === 'evaluate') {
+        //评价
+        if (!this.content) {
+          //评语不能为空
+          Toast('评语不能为空')
+          return
+        } else if (this.value == 0) {
+          //评分不能为0分
+          Toast('评分不能为0分')
+          return
+        }
+
+        Dialog.confirm({
+          title: '',
+          message: `是否提交评价?`
+        })
+          .then(() => {
+            let obj = this.trainingData
+            obj.commentScore = this.value
+            obj.comment = this.content
+            drillInfo({
+              id: this.trainingData.id,
+              // type: this.trainingData.type,
+              submitType: 2,
+
+              ...obj
+            }).then(res => {
+              let { code, msg } = res
+              if (code == 200) {
+                Toast('登记成功')
+                this.$router.push('/rehearsalTask')
+              } else {
+                Toast(msg)
+              }
+            })
+          })
+          .catch(() => {
+            // on cancel
+          })
+      } else {
+        //评价推优
+      }
+    },
     clearHandler() {
       this.$refs.esign.handleReset()
     },
-    submitHandler() {
-      console.log(this.file)
-    },
+
     //上传签名图到服务器
     resultImg(img) {
       let obj = base64ToBlob(img)
@@ -231,11 +295,11 @@ export default {
 
     //提交到后端数据
     submitSign(url) {
-      signtrainingInfo({
+      singrehearsalTask({
         id: this.trainingData.id,
         signImage: url
       }).then(res => {
-        this.$router.push('/training')
+        this.$router.push('/rehearsalTask')
       })
     }
   }

+ 40 - 51
src/views/menu/rehearsalTask/index.vue

@@ -46,6 +46,7 @@
           <van-popup v-model="showDate" round position="bottom">
             <van-picker
               v-model="presentDate"
+              show-toolbar
               @cancel="onCancel"
               :columns="yearColumns"
               @confirm="onDateConfirm"
@@ -57,17 +58,13 @@
       </van-row>
       <van-row>
         <van-col span="24">
-          <van-tabs v-model="active">
-            <van-tab title="Q1"></van-tab>
-            <van-tab title="Q2"></van-tab>
-            <van-tab title="Q3"></van-tab>
-            <van-tab title="Q4"></van-tab>
+          <van-tabs v-model="active" @click="tbsHandler">
+            <van-tab name="01-01" title="Q1"></van-tab>
+            <van-tab name="04-01" title="Q2"></van-tab>
+            <van-tab name="07-01" title="Q3"></van-tab>
+            <van-tab name="10-01" title="Q4"></van-tab>
           </van-tabs>
         </van-col>
-
-        <!-- <van-col span="6" class="btnf_box">
-        <van-button type="info" class="btn" @click="clearSearch" size="small">重置</van-button>
-      </van-col> -->
       </van-row>
     </div>
 
@@ -88,7 +85,6 @@
                 <van-button type="info" v-if="isSignature(item)" size="mini" @click="evaluate(item.id)"
                   >评价</van-button
                 >
-                
               </div>
             </div>
           </template>
@@ -107,7 +103,7 @@
             </div>
             <div class="mainItem" @click="goInfo(item.id)">
               <div>演练时间</div>
-              <div>{{ item.trainingStartDateTime }}</div>
+              <div>{{ item.startDate }}</div>
             </div>
             <div class="mainItem">
               <div>签名情况</div>
@@ -137,11 +133,11 @@
 <script>
 import NavBar from '@/components/NavBar'
 import { Col, Row, Cascader, Dialog, DatetimePicker, Icon, Picker } from 'vant'
-import { gettrainingList, getsignUserList } from '@/api/training.js'
+import { getdrillTask, getsignUserList } from '@/api/drillTask.js'
 import { deptTreeList } from '@/api/toConsult.js'
 import { Toast } from 'vant'
 import OrgTree from '@/components/orgTree'
-import { newDateMonth,newDateYear } from '@/utils/date.js'
+import { newDateMonth, newDateYear } from '@/utils/date.js'
 export default {
   data() {
     return {
@@ -163,7 +159,7 @@ export default {
       orgName: JSON.parse(sessionStorage.getItem('SET_USER_ORGNAME')) || '', //机构名称
       cascaderValue: '', //机构ID
       show: false, //机构弹框显示隐藏
-      active: '0',
+      active: '01-01',
       fieldNames: {
         text: 'name',
         value: 'id',
@@ -178,7 +174,8 @@ export default {
       showDate: false, //月份显示隐藏
       fieldValue: '全部', //状态名称
       statusValue: ' ', //状态值
-      columns: ['全部', '待记录', '待签名', '已完成'], //状态数组
+      columns: ['全部'], //状态数组
+      columnsList: [], //状态数组
       currentDate: newDateYear(), //年份
       conditionShow: false //机构弹框显示隐藏
     }
@@ -222,7 +219,7 @@ export default {
 
   created() {
     this.presentDate = new Date(newDateYear())
-    console.log(this.presentDate);
+
     this.yearData()
   },
   mounted() {
@@ -315,6 +312,13 @@ export default {
 
     //初始化
     init() {
+      //获取数据字典
+      this.getDictHandler('drill_task_status', res => {
+        this.columnsList = res
+        this.columns = res.map(item => item.dictLabel)
+        this.columns.unshift('全部')
+      })
+      //获取分页列表
       this.selectListAppHandler()
     },
     selectListAppHandler(type = 0, callback = () => {}) {
@@ -334,14 +338,14 @@ export default {
       obj.orgId = this.cascaderValue || JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + '' || ''
 
       if (this.currentDate) {
-        obj.date = this.currentDate 
+        obj.date = this.currentDate + '-' + this.active
       }
       if (this.typeValue) {
         obj.type = this.typeValue
       }
 
       //获取任务列表
-      gettrainingList(obj).then(res => {
+      getdrillTask(obj).then(res => {
         let { code, rows, msg } = res
         if (code == 200) {
           if (type) {
@@ -359,46 +363,31 @@ export default {
       })
     },
 
-    // 开始调阅事件
-    startMonitorHandler(taskId) {
-      this.taskId = taskId
-      this.showDialog = true
-    },
-    //已调阅事件
-    endMonitorHandler(status, taskId) {
-      // 0待调阅,1调阅中,2已调阅,3已超期
-      //跳转详情
-      if (status <= 1) return
-      this.$router.push('/consultInfo/' + taskId)
-    },
+  
+   
 
     //搜索选择状态时触发
     onConfirm(value, index) {
       this.fieldValue = value
-
-      switch (value) {
-        case '待记录':
-          this.statusValue = '0'
-
-          break
-        case '待签名':
-          this.statusValue = '1'
-          break
-
-        case '已完成':
-          this.statusValue = '2'
-          break
-        case '全部':
-          this.statusValue = ' '
-          break
+      this.columnsList.forEach(item => {
+        if (value == item.dictLabel) {
+          this.statusValue = item.dictValue
+        }
+      })
+      if (value == '全部') {
+        this.statusValue = ' '
       }
+
       this.selectListAppHandler()
       this.showStatus = false
     },
-
+    tbsHandler(){
+      this.selectListAppHandler()
+    },
     //月份选中触发
-    onDateConfirm() {
-      this.currentDate = this.newDate(this.presentDate)
+    onDateConfirm(val) {
+      
+      this.currentDate = this.newDate(val+'')
 
       this.showDate = false
       this.selectListAppHandler()
@@ -473,12 +462,12 @@ export default {
       this.$router.push('/rehearsalTaskSign/' + id + '_edit')
     },
     //评价
-    evaluate(id){
+    evaluate(id) {
       this.$router.push('/rehearsalTaskSign/' + id + '_evaluate')
     },
     //关闭弹框
     beforeClose() {
-      console.log('sssssssss')
+     
       ;(this.participationList = {
         list: [], // 参与人员
         num: 0 //人数

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

@@ -69,9 +69,9 @@
       <template v-for="item in studyList">
         <div :key="item.url" class="imglIST" style="{width:'100px',height: '100px';}">
 
-          <imgCom :width="'100'" v-if="this_window.origin+item.url&&item.type==0"  :height="'100'" :src="this_window.origin+item.url"></imgCom>
-          <!-- <VuePdf v-else :src="this_window.origin+item.url"></VuePdf> -->
-          <VuePdf  v-else  :src="this_window.origin+item.url"></VuePdf>
+          <imgCom :width="'100'" v-if="item.url&&item.type==0"  :height="'100'" :src="item.url"></imgCom>
+          <!-- <VuePdf v-else :src="item.url"></VuePdf> -->
+          <VuePdf  v-else  :src="item.url"></VuePdf>
         </div>
       </template>
     </div>

+ 3 - 3
src/views/menu/training/components/personnelSignature.vue

@@ -36,9 +36,9 @@
       <template v-for="item in studyList">
         <div :key="item.url" class="imglIST" style="{width:'100px',height: '100px';}">
 
-          <imgCom :width="'100'"  v-if="this_window.origin+item.url&&item.type==0"  :height="'100'" :src="this_window.origin+item.url"></imgCom>
-          <!-- <VuePdf v-else :src="this_window.origin+item.url"></VuePdf> -->
-          <VuePdf v-else  :src="this_window.origin+item.url"></VuePdf>
+          <imgCom :width="'100'"  v-if="item.url&&item.type==0"  :height="'100'" :src="item.url"></imgCom>
+          <!-- <VuePdf v-else :src="item.url"></VuePdf> -->
+          <VuePdf v-else  :src="item.url"></VuePdf>
         </div>
       </template>
     </div>