coys před 2 roky
rodič
revize
53a87968d5

+ 31 - 0
src/api/drillTask.js

@@ -38,6 +38,15 @@ export function drillInfo(data) {
     data
   })
 }
+//演练任务评价
+export function drillSignInfo(data) {
+  return request({
+    url: `/core/drill/task/evaluate`,
+    
+    method: 'post',
+    data
+  })
+}
 //演练登记提交
 export function edittrainingInfo(data) {
   return request({
@@ -64,6 +73,28 @@ export function singrehearsalTask(data) {
   })
 }
 
+//获取演练计划
+export function getrehearsalList(id) {
+  return request({
+    url: `/core/drillPlan/planList/${id}`,
+    headers: {
+      isToken: false
+    },
+    method: 'get',
+    
+  })
+}
+//获取演练计划排名列表
+export function getTableRehearsalList(data) {
+  return request({
+    url: `/core/drill/task/report`,
+    headers: {
+      isToken: false
+    },
+    method: 'post',
+    data
+  })
+}
 //新增调阅接口NFC||图片接口
 export function registration(data) {
   return request({

+ 19 - 0
src/api/optimalLearning.js

@@ -0,0 +1,19 @@
+// 调阅相关接口
+import request from '@/utils/request'
+
+// 获取评优列表数据
+export function getlearningListPage(data) {
+  return request({
+    url: '/core/drill/task/recList',
+    method: 'post',
+    data
+  })
+}
+// 获取案例学习数据
+export function getRecTaskList(data) {
+  return request({
+    url: '/core/drill/task/recTaskList',
+    method: 'post',
+    data
+  })
+}

+ 1 - 0
src/components/layouts/index.vue

@@ -59,6 +59,7 @@ export default {
         this.$store.commit('SET_USER_ID',info.user.id);
         this.$store.commit('SET_USER_ORGID',info.user.orgId);
         this.$store.commit('SET_USER_ORGNAME',info.user.orgName);
+        this.$store.commit('SET_USER_ORGTYPE',info.user.orgType);
       })
       this.$store.dispatch('getOrgTree')
     },

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

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

+ 15 - 1
src/router/router.config.js

@@ -7,6 +7,7 @@ export let routers = [
     path: '/',
     redirect:'/login'
   },
+  
   {
     path: '/login',
     component: () => import('@/views/login'),
@@ -95,6 +96,7 @@ export let routers = [
     component: () => import('@/views/menu/rehearsalTask/components/rehearsalTaskSign.vue'),
     meta: { title: '演练详情', keepAlive: false }
   },
+
   {
     path: '/home',
     component: () => import('@/components/layouts/index'),
@@ -174,7 +176,13 @@ export let routers = [
         path: '/rehearsaloptimal',
         name: 'rehearsaloptimal',
         component: () => import('@/views/menu/rehearsalTask/optimal'),
-        meta: { title: '评优推优', keepAlive: true }
+        meta: { title: '优秀案例管理', keepAlive: true }
+      },
+      {
+        path: '/rehearsallearning',
+        name: 'rehearsallearning',
+        component: () => import('@/views/menu/rehearsalTask/learning'),
+        meta: { title: '优秀案例学习', keepAlive: true }
       },
       {
         path: '/educationStatistics',
@@ -183,6 +191,12 @@ export let routers = [
         meta: { title: '教育培训统计报表', keepAlive: false }
       },
       {
+        path: '/drillStatistics',
+        name: 'drillStatistics',
+        component: () => import('@/views/menu/drillStatistics/index'),
+        meta: { title: '演练统计排名', keepAlive: false }
+      },
+      {
         path: '/securityCheckRegister',
         name: 'securityCheckRegister',
         component: () => import('@/views/menu/securityCheckRegister/index'),

+ 1 - 0
src/store/getters.js

@@ -2,6 +2,7 @@ const getters = {
   userName: state => state.user.userName,
   id: state => state.user.id,
   orgId: state => state.user.orgId,
+  orgType: state => state.user.orgType,
   orgName: state => state.user.orgName,
   roleList: state => state.user.userRoleList,
   orgTree: state => state.app.orgTree,

+ 7 - 0
src/store/modules/user.js

@@ -9,6 +9,8 @@ const state = {
   id:JSON.parse(sessionStorage.getItem("SET_USER_ID"))||null,
   //机构名称
   orgName:JSON.parse(sessionStorage.getItem("SET_USER_ORGNAME"))||null,
+  //机构类型
+  orgType:JSON.parse(sessionStorage.getItem("SET_USER_ORGTYPE"))||null,
 }
 const mutations = {
   SET_USER_NAME(state, name) {
@@ -24,6 +26,11 @@ const mutations = {
     sessionStorage.setItem("SET_USER_ORGID", JSON.stringify(val))
 
   },
+  SET_USER_ORGTYPE(state, val) {
+    state.orgType = val;
+    sessionStorage.setItem("SET_USER_ORGTYPE", JSON.stringify(val))
+
+  },
   SET_USER_ID(state, val) {
     state.id = val;
     sessionStorage.setItem("SET_USER_ID", JSON.stringify(val))

+ 1 - 1
src/utils/date.js

@@ -16,7 +16,7 @@ export function newDateYear(time) {
   return y 
 }
 export function newDateDay(time) {
-  var date = new Date(time)
+  var date =time? new Date(time):new Date()
   var y = date.getFullYear()
   var m = date.getMonth() + 1
   m = m < 10 ? '0' + m : m

+ 2 - 2
src/utils/globalMixins.js

@@ -30,10 +30,10 @@ export default {
      * 组件页面中需要设置:mapGetters(['dictionary']']),
      * */
     getDictItem(key){
-      let item = this.dictionary?.find((v)=>{
+      let item = this.dictionary.find((v)=>{
         return  v.key === key
       })
-      return item?.value
+      return item.value
     },
     //时间范围模板:2020-01-01~2020-01-02
     rangDate(start,end,a){

+ 52 - 46
src/views/home/menu.vue

@@ -1,31 +1,37 @@
 <template>
   <div class="menu-container">
     <top-bar></top-bar>
+    <!-- 天气预警 -->
+    <van-notice-bar :scrollable="false" text="在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。" />
+
     <div class="menu-list">
-      <div class="menu-list-item" v-for="(v,i) in menuList" :key="i">
-        <p @click="onclick">{{v.meta.title}}</p>
+      <div class="menu-list-item" v-for="(v, i) in menuList" :key="i">
+        <p @click="onclick">{{ v.meta.title }}</p>
         <van-grid border :column-num="3">
-          <van-grid-item v-for="(item,index) in v.children" :key="index" :icon="imgUrl(item.meta.icon)" :text="item.meta.title" :to="item.path" />
+          <van-grid-item
+            v-for="(item, index) in v.children"
+            :key="index"
+            :icon="imgUrl(item.meta.icon)"
+            :text="item.meta.title"
+            :to="item.path"
+          />
         </van-grid>
-<!--          <li v-for="(item,index) in v.list" :key="index">-->
-<!--            <div></div>-->
-<!--            <p>{{item.menu}}</p>-->
-<!--          </li>-->
       </div>
     </div>
+    
   </div>
 </template>
 
 <script>
-import TopBar from "@/components/TopBar";
+import TopBar from '@/components/TopBar'
 import { mapGetters } from 'vuex'
-import {getMenu} from "@/api/public";
+import { getMenu } from '@/api/public'
 export default {
   name: 'menus',
-  components:{TopBar},
+  components: { TopBar },
   data() {
     return {
-      menuList:[],
+      menuList: []
     }
   },
   computed: {
@@ -35,52 +41,52 @@ export default {
     this.getMenuList()
   },
   methods: {
-    getMenuList(){
-      getMenu().then(res=>{
+    getMenuList() {
+      getMenu().then(res => {
         this.menuList = res.data
       })
     },
-    onclick(){
+    onclick() {
       this.$router.push('/workTime')
-    },
+    }
   }
 }
 </script>
 
-<style lang="scss" scoped >
-  .menu-container{
-    background-color: rgba(237, 252, 255, 1)
-  }
-  .menu-list{
-    padding: 30px 0;
-    height: calc(100vh - 400px);
-    overflow: auto;
+<style lang="scss" scoped>
+.menu-container {
+  background-color: rgba(237, 252, 255, 1);
+}
+.menu-list {
+  padding: 30px 0;
+  height: calc(100vh - 400px);
+  overflow: auto;
+}
+.menu-list-item {
+  background-color: #fff;
+  border-radius: 10px;
+  box-shadow: 0 10px 20px #eee;
+  margin: 20px;
+  > p {
+    font-size: 30px;
+    padding: 10px 10px 10px 20px;
   }
-  .menu-list-item{
-    background-color: #fff;
-    border-radius: 10px;
-    box-shadow: 0 10px 20px #eee;
-    margin:20px;
-    >p{
-      font-size: 30px;
-      padding: 10px 10px 10px 20px;
-    }
-    >ul{
+  > ul {
+    display: flex;
+    flex-wrap: wrap;
+    font-size: 20px;
+    > li {
+      padding: 30px;
       display: flex;
-      flex-wrap: wrap;
-      font-size: 20px;
-      >li{
-        padding: 30px;
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        >div{
-          width: 60px;
-          height: 60px;
-          background-color: #42b983;
-          margin-bottom: 20px;
-        }
+      flex-direction: column;
+      align-items: center;
+      > div {
+        width: 60px;
+        height: 60px;
+        background-color: #42b983;
+        margin-bottom: 20px;
       }
     }
   }
+}
 </style>

+ 1 - 1
src/views/menu/LZRegister/edit.vue

@@ -248,7 +248,7 @@ export default {
       ImagePreview(this.preViewImages)
     },
     getDicts(s){
-      return this.stateList.find(v=> s == v.dictValue)?.dictLabel;
+      return this.stateList.find(v=> s == v.dictValue).dictLabel;
     },
     //初始化数据
     getData() {

+ 1 - 1
src/views/menu/LZRegister/index.vue

@@ -168,7 +168,7 @@ export default {
   },
   methods:{
     getDicts(s){
-      return this.stateList.find(v=> s == v.dictValue)?.dictLabel;
+      return this.stateList.find(v=> s == v.dictValue).dictLabel;
     },
     handleScroll(e){
       let scrollTop = document.getElementById('lz-container').scrollTop;

+ 289 - 0
src/views/menu/drillStatistics/index.vue

@@ -0,0 +1,289 @@
+<template>
+  <div class="educationStatistics">
+    <NavBar />
+    <div class="statistics-container">
+      <org-tree v-model="cascaderValue" @change="getOrgDataList"></org-tree>
+      <van-row>
+        <van-col span="24"
+          ><van-field
+            v-model="fieldValue"
+            label-width="6em"
+            clearable
+            :disabled="showStatus"
+            label="演练计划名称"
+            placeholder=""
+            @click="showStatus = true"
+            ><van-icon name="arrow-down" slot="button"
+          /></van-field>
+          <van-popup v-model="showStatus" round position="bottom">
+            <van-picker
+              title="演练计划名称"
+              show-toolbar
+              :columns="taskList"
+              @confirm="onConfirm"
+              @cancel="onCancel"
+              :close-on-click-overlay="false"
+            />
+          </van-popup>
+        </van-col>
+      </van-row>
+      <van-row>
+        <van-col span="9">
+          <van-field
+            v-model="currentDate"
+            clearable
+            label-width="3em"
+            label="年份"
+            placeholder=""
+            :disabled="showDate"
+            @click="showDate = true"
+          >
+            <van-icon name="arrow-down" slot="button"
+          /></van-field>
+          <van-popup v-model="showDate" round position="bottom">
+            <van-picker
+              v-model="presentDate"
+              show-toolbar
+              @cancel="onCancel"
+              :columns="yearColumns"
+              @confirm="onDateConfirm"
+              :default-index="yearSelect"
+              title="年份"
+            />
+          </van-popup>
+        </van-col>
+        <van-col span="15">
+          <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-row>
+
+      <div class="card-list">
+        <van-empty description="暂无数据" v-if="!dataList || dataList.length === 0" />
+        <ve-table
+          v-else
+          maxHeight="calc(100vh - 252px)"
+          fixedHeader
+          borderX
+          borderY
+          borderAround
+          :columns="columns"
+          :table-data="dataList"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import NavBar from '@/components/NavBar'
+import OrgTree from '@/components/orgTree'
+import dateCell from '@/components/dateCell'
+import selectCell from '@/components/selectCell'
+import { getrehearsalList, getTableRehearsalList } from '@/api/drillTask.js'
+import { mapGetters } from 'vuex'
+import { formatDate } from '@/filters/filter'
+import { newDateYear } from '@/utils/date.js'
+
+export default {
+  components: {
+    NavBar,
+    OrgTree,
+    dateCell,
+    selectCell
+  },
+  data() {
+    return {
+      active: '01-01',
+      cascaderValue: '',
+      showStatus: false, //状态显示隐藏
+      yearColumns: [],
+      showDate: false, //月份显示隐藏
+      fieldValue: '', //状态名称
+      statusValue: ' ', //状态值
+      taskList: [], //状态数组
+      columnsList: [], //状态数组
+      currentDate: newDateYear(), //年份
+      planList: [],
+      yearSelect: null,
+      prop: {
+        label: 'name',
+        value: 'id'
+      },
+      loading: false,
+      columns: [
+        {
+          field: 'index',
+          key: 'index',
+          title: '序号',
+          width: 50,
+          align: 'center',
+          renderBodyCell: ({ row, column, rowIndex }, h) => {
+            return ++rowIndex
+          }
+        },
+        { field: 'orgName', key: 'a', title: '单位名称', align: 'center' },
+        { field: 'shouldFinish', key: 'b', title: '应演练数', align: 'center' },
+        { field: 'finish', key: 'c', title: '已演练数', align: 'center' },
+        { field: 'score', key: 'd', title: '评分', align: 'center' }
+      ],
+      dataList: []
+    }
+  },
+  created() {
+    this.presentDate = new Date(newDateYear())
+    this.yearData()
+  },
+  mounted() {
+    this.initData()
+  },
+  computed: {},
+  methods: {
+    initData() {
+      this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
+
+      this.getPlanList()
+    },
+    getPlanList() {
+      getrehearsalList(this.cascaderValue).then(res => {
+        if (res.data.length === 0) return this.$toast('暂无教育计划')
+        this.planList = res.data
+        this.taskList=(res.data.map(item => item.name))
+      
+        this.fieldValue=res.data[0].name
+        this.statusValue=res.data[0].id
+        this.getDataList()
+      })
+    },
+    //机构搜索
+    getOrgDataList(val) {
+      
+      this.cascaderValue = val
+      
+      this.getDataList()
+    },
+    getDataList() {
+        
+      let data = {
+        planId: this.statusValue || '',
+        orgId: this.cascaderValue || '',
+        date: this.currentDate + '-' + this.active || ''
+      }
+
+      getTableRehearsalList(data).then(res => {
+        this.dataList = res.data
+      })
+    },
+    //搜索选择状态时触发
+    onConfirm(value, index) {
+      this.fieldValue = value
+      this.planList.forEach(item => {
+        if (value == item.name) {
+          this.statusValue = item.id
+        }
+      })
+      
+      this.getDataList()
+      this.showStatus = false
+    },
+
+    onCancel() {
+      this.show = false
+      this.typeStatus = false
+      this.showDate = false
+      this.showStatus = false
+    },
+    yearData() {
+      // 获取默认显示的时间
+      var nowTime = new Date()
+      let year = nowTime.getFullYear()
+      let month = nowTime.getMonth()
+      let day = nowTime.getDate()
+      // 循环数组 填写最小时间和最大时间范围
+      for (let i = 1980; i < 2099; i++) {
+        this.yearColumns.push(i)
+      }
+      // 格式化时间并截取
+      var years = this.formatDate(new Date(year, month, day))
+      var Year = years.slice(0, 4)
+      // 将截取的年份赋值给绑定值 用于点击弹出日期窗口后显示当前的时间
+      this.yearSelect = this.yearColumns.indexOf(Number(Year))
+    }, 
+    //日期格式
+    formatDate(date) {
+      return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
+    },
+    //日期转换
+    newDate(time) {
+      var date = new Date(time)
+      var y = date.getFullYear()
+      var m = date.getMonth() + 1
+      m = m < 10 ? '0' + m : m
+      var d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      return y
+    },
+    //月份选中触发
+    onDateConfirm(val) {
+      this.currentDate = this.newDate(val + '')
+
+      this.showDate = false
+      this.getDataList()
+    },
+    tbsHandler() {
+      this.getDataList()
+    }
+  }
+}
+</script>
+<style lang="scss">
+.van-cell-group {
+  margin-bottom: 20px;
+}
+.van-cell-group:last-child {
+  margin-bottom: 0;
+}
+.vue-table-root {
+  tr,
+  td,
+  th {
+    font-size: 25px !important;
+    color: #666 !important;
+  }
+}
+</style>
+<style lang="scss" scoped>
+.educationStatistics {
+}
+.statistics-container {
+}
+.card-list {
+  padding: 20px;
+  height: calc(100vh - 420px);
+  overflow: hidden;
+}
+.card-num {
+  display: flex;
+  align-items: center;
+  font-size: 28px;
+  color: #009dff;
+}
+.flex-box {
+  display: flex;
+  align-items: center;
+  > div {
+    margin-right: 40px;
+  }
+}
+.search-flex {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  > div {
+    width: 50%;
+  }
+}
+</style>

+ 89 - 98
src/views/menu/educationStatistics/index.vue

@@ -4,8 +4,15 @@
     <div class="statistics-container">
       <org-tree v-model="query.orgId" @change="getDataList"></org-tree>
       <div class="search-flex">
-        <select-cell class="van-hairline--right" title="教育计划名称" v-model="query.planId" :dataList="planList" :prop="prop" @change="getDataList"/>
-        <date-cell title="统计月份" v-model="query.date" date-type="year-month" @change="getDataList"/>
+        <select-cell
+          class="van-hairline--right"
+          title="教育计划名称"
+          v-model="query.planId"
+          :dataList="planList"
+          :prop="prop"
+          @change="getDataList"
+        />
+        <date-cell title="统计月份" v-model="query.date" date-type="year-month" @change="getDataList" />
       </div>
       <div class="card-list">
         <van-empty description="暂无数据" v-if="!dataList || dataList.length === 0" />
@@ -17,24 +24,8 @@
           borderY
           borderAround
           :columns="columns"
-          :table-data="dataList" />
-<!--        <template v-else>-->
-<!--          <van-cell-group  v-for="(v,i) in dataList">-->
-<!--            <van-cell :title="v.orgName" >-->
-<!--              <template #extra>-->
-<!--                <div class="card-num">-->
-<!--                  {{v.finishRate}}-->
-<!--                </div>-->
-<!--              </template>-->
-<!--              <template #label>-->
-<!--                <div class="flex-box">-->
-<!--                  <div>应培训数:{{v.shouldFinish}}</div>-->
-<!--                  <div>已培训数:{{v.finish}}</div>-->
-<!--                </div>-->
-<!--              </template>-->
-<!--            </van-cell>-->
-<!--          </van-cell-group>-->
-<!--        </template>-->
+          :table-data="dataList"
+        />
       </div>
     </div>
   </div>
@@ -44,9 +35,9 @@ import NavBar from '@/components/NavBar'
 import OrgTree from '@/components/orgTree'
 import dateCell from '@/components/dateCell'
 import selectCell from '@/components/selectCell'
-import {dataList,planList} from './api'
-import {mapGetters} from "vuex";
-import {formatDate} from "@/filters/filter";
+import { dataList, planList } from './api'
+import { mapGetters } from 'vuex'
+import { formatDate } from '@/filters/filter'
 export default {
   components: {
     NavBar,
@@ -56,114 +47,114 @@ export default {
   },
   data() {
     return {
-      query:{
-        date:null,
-        orgId:null,
-        planId:null,
+      query: {
+        date: null,
+        orgId: null,
+        planId: null
       },
-      planList:[],
-      prop:{
-        label:'name',
-        value:'id',
+      planList: [],
+      prop: {
+        label: 'name',
+        value: 'id'
       },
-      loading:false,
-      columns:[
+      loading: false,
+      columns: [
         {
-          field: "index",
-          key: "index",
-          title: "序号",
+          field: 'index',
+          key: 'index',
+          title: '序号',
           width: 50,
-          align: "center",
+          align: 'center',
           renderBodyCell: ({ row, column, rowIndex }, h) => {
-            return ++rowIndex;
-          },
+            return ++rowIndex
+          }
         },
-        { field: "orgName", key: "a", title: "单位名称",align: "center"},
-        { field: "shouldFinish", key: "b", title: "应完成数", align: "center" },
-        { field: "finish", key: "c", title: "已完成数",align: "center" },
-        { field: "finishRate", key: "d", title: "完成率", align: "center" },
+        { field: 'orgName', key: 'a', title: '单位名称', align: 'center' },
+        { field: 'shouldFinish', key: 'b', title: '应完成数', align: 'center' },
+        { field: 'finish', key: 'c', title: '已完成数', align: 'center' },
+        { field: 'finishRate', key: 'd', title: '完成率', align: 'center' }
       ],
-      dataList:[]
+      dataList: []
     }
   },
   mounted() {
-    this.initData();
+    this.initData()
   },
-  computed:{
-    ...mapGetters(['orgId']),
+  computed: {
+    ...mapGetters(['orgId'])
   },
   methods: {
-    initData(){
-      this.query.orgId = this.orgId;
-      this.getPlanList();
+    initData() {
+      this.query.orgId = this.orgId
+      this.getPlanList()
     },
-    getPlanList(){
-      planList(this.query.orgId).then(res=>{
-        this.planList = res.data;
-        if(res.data.length === 0) return this.$toast('暂无教育计划');
-        this.query.planId = res.data[0].id;
-        this.query.date = formatDate(new Date(),'YYYY-MM');
-        this.getDataList();
+    getPlanList() {
+      planList(this.query.orgId).then(res => {
+        this.planList = res.data
+        if (res.data.length === 0) return this.$toast('暂无教育计划')
+        this.query.planId = res.data[0].id
+        this.query.date = formatDate(new Date(), 'YYYY-MM')
+        this.getDataList()
       })
     },
-    getDataList(){
+    getDataList() {
       let data = {
         ...this.query
       }
-      data.date = this.query.date && `${this.query.date}-01`;
-      if(!this.query.orgId) return this.$toast('请选择机构');
-      dataList(data).then(res=>{
-        this.dataList = res.data;
+      data.date = this.query.date && `${this.query.date}-01`
+      if (!this.query.orgId) return this.$toast('请选择机构')
+      dataList(data).then(res => {
+        this.dataList = res.data
       })
     }
   }
 }
 </script>
 <style lang="scss">
-.van-cell-group{
+.van-cell-group {
   margin-bottom: 20px;
 }
-.van-cell-group:last-child{
+.van-cell-group:last-child {
   margin-bottom: 0;
 }
-.vue-table-root{
-  tr,td,th{
-    font-size: 25px!important;
-    color:#666!important;
+.vue-table-root {
+  tr,
+  td,
+  th {
+    font-size: 25px !important;
+    color: #666 !important;
   }
 }
 </style>
 <style lang="scss" scoped>
-  .educationStatistics{
-
-  }
-  .statistics-container{
-
-  }
-  .card-list{
-    padding: 20px;
-    height: calc(100vh - 420px);
-    overflow:  hidden;
-  }
-  .card-num{
-    display: flex;
-    align-items: center;
-    font-size: 28px;
-    color: #009dff;
-  }
-  .flex-box{
-    display: flex;
-    align-items: center;
-    >div{
-      margin-right: 40px;
-    }
+.educationStatistics {
+}
+.statistics-container {
+}
+.card-list {
+  padding: 20px;
+  height: calc(100vh - 420px);
+  overflow: hidden;
+}
+.card-num {
+  display: flex;
+  align-items: center;
+  font-size: 28px;
+  color: #009dff;
+}
+.flex-box {
+  display: flex;
+  align-items: center;
+  > div {
+    margin-right: 40px;
   }
-  .search-flex{
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    >div{
-      width: 50%;
-    }
+}
+.search-flex {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  > div {
+    width: 50%;
   }
+}
 </style>

+ 8 - 8
src/views/menu/monitoringCall/components/consultInfo.vue

@@ -5,15 +5,15 @@
       <van-collapse v-model="activeNames" @open="addActiveNames">
         <div class="titleBox">
 
-          <div class="textTitle">{{ taskData?.taskName }}</div>
-          <div class="text">调阅开始时间:{{ taskData?.taskStartTime }}</div>
-          <div class="text" v-if="taskData?.taskStatus == 2">调阅结束时间:{{ taskData?.taskEndTime }}</div>
+          <div class="textTitle">{{ taskData.taskName }}</div>
+          <div class="text">调阅开始时间:{{ taskData.taskStartTime }}</div>
+          <div class="text" v-if="taskData.taskStatus == 2">调阅结束时间:{{ taskData.taskEndTime }}</div>
         </div>
           
           <!-- 进行调阅 -->
 
           <!-- <div @click="editTaskInfo">进行调阅</div> -->
-          <div v-if="taskData?.taskStatus == 2">
+          <div v-if="taskData.taskStatus == 2">
             <!-- 调阅列表 -->
             <div class="topBox" v-for="item in taskData.coreMonitoringTaskRegistrationMonitorVOList" :key="item.id">
               <!-- //主机列表组件 -->
@@ -24,9 +24,9 @@
           <div v-else>
             <van-collapse-item  :name="item.hostId" v-for="item in hostList" :key="item.hostId">
               <template #title>
-                <div class="textTitle">{{ item?.hostName }}</div>
+                <div class="textTitle">{{ item.hostName }}</div>
               </template>
-              <passage ref="passage" :list="item?.deviceVOS"  :taskId="$route.params.id.split('_')[0]" :hostId="item.hostId" @resetList="getHostHandler"></passage>
+              <passage ref="passage" :list="item.deviceVOS"  :taskId="$route.params.id.split('_')[0]" :hostId="item.hostId" @resetList="getHostHandler"></passage>
             </van-collapse-item>
           </div>
       
@@ -94,7 +94,7 @@ export default {
           this.taskData = data
 
           //如果当前是调阅中则获取视频主机和通道
-          if (data?.taskStatus < 2) {
+          if (data&&data.taskStatus < 2) {
           
             this.getHostHandler()
           }
@@ -118,7 +118,7 @@ export default {
     //结束调阅
     endMontor() {
       //没有记录的时候不能结束调阅
-      if (!this.taskData?.coreMonitoringTaskRegistrationMonitorVOList||this.taskData?.coreMonitoringTaskRegistrationMonitorVOList?.length == 0) {
+      if (!this.taskData.coreMonitoringTaskRegistrationMonitorVOList||this.taskData.coreMonitoringTaskRegistrationMonitorVOList.length == 0) {
         Dialog({ message: '该调阅没有记录不能进行结束操作!' })
         return
       }

+ 2 - 2
src/views/menu/monitoringCall/components/monitoringList.vue

@@ -2,8 +2,8 @@
   <div>
     <div class="topBox">
       
-      <div class="title" style="padding-top: 10px; margin-top: 0px">监控主机:{{ list?.hostName }}</div>
-      <div class="title">视频通道:{{ list?.videoChannelName }}</div>
+      <div class="title" style="padding-top: 10px; margin-top: 0px">监控主机:{{ list.hostName }}</div>
+      <div class="title">视频通道:{{ list.videoChannelName }}</div>
       <van-row class="List titleList">
         <van-col class="vancol" span="6">类型</van-col>
         <van-col class="vancol" span="18">状态</van-col>

+ 2 - 2
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -4,11 +4,11 @@
     <van-form class="bigbox" ref="form">
       <div class="mainItem">
         <div class="label">标题</div>
-        <div>{{ trainingData?.title }}</div>
+        <div>{{ trainingData.title }}</div>
       </div>
       <div class="mainItem">
         <div class="label">单位名称</div>
-        <div>{{ trainingData?.orgName }}</div>
+        <div>{{ trainingData.orgName }}</div>
       </div>
       <!-- 演练时间 -->
       <van-field

+ 133 - 50
src/views/menu/rehearsalTask/components/rehearsalTaskSign.vue

@@ -4,36 +4,36 @@
 
     <div class="mainItem">
       <div class="label">标题</div>
-      <div>{{ trainingData?.title }}</div>
+      <div>{{ trainingData.title }}</div>
     </div>
     <div class="mainItem">
       <div class="label">单位名称</div>
-      <div>{{ trainingData?.orgName }}</div>
+      <div>{{ trainingData.orgName }}</div>
     </div>
     <div class="mainItem">
       <div class="label">演练时间</div>
-      <div>{{ trainingData?.startDate }}</div>
+      <div>{{ trainingData.startDate }}</div>
     </div>
     <div class="mainItem">
       <div class="label">演练地点</div>
-      <div>{{ trainingData?.drillSite }}</div>
+      <div>{{ trainingData.drillSite }}</div>
     </div>
     <div class="mainItem">
       <div class="label">指挥人</div>
-      <div>{{ trainingData?.hostName }}</div>
+      <div>{{ trainingData.hostName }}</div>
     </div>
     <div class="mainItem">
       <div class="label">演练项目</div>
-      <div>{{ trainingData?.typeText }}</div>
+      <div>{{ trainingData.typeText }}</div>
     </div>
     <div class="mainItem">
       <div class="label">预设案由</div>
-      <div>{{ trainingData?.presetCase }}</div>
+      <div>{{ trainingData.presetCase }}</div>
     </div>
 
     <div class="mainItem">
       <div class="label">演练情况</div>
-      <div>{{ trainingData?.drillSituation }}</div>
+      <div>{{ trainingData.drillSituation }}</div>
     </div>
 
     <div class="mainItem">
@@ -49,19 +49,13 @@
 
       <imgCom :width="'100'" v-for="item in imgList" :key="item" :height="'100'" :src="item"></imgCom>
     </div>
-    <div
-      class="mainItem"
-      v-if="peopleShow"
-    >
+    <div class="mainItem" 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>
-    <div
-      class="mainItem"
-      v-if="evaluateShow"
-    >
+    <div class="mainItem" v-if="evaluate">
       <div class="label">评分</div>
       <div><van-rate :disabled="disabledShow" v-model="value" :count="10" /></div>
     </div>
@@ -70,7 +64,6 @@
       required
       :rules="[{ required: true, message: '评语不能为空' }]"
       v-model="content"
-      
       name="content"
       label="评语"
       type="textarea"
@@ -79,6 +72,27 @@
       show-word-limit
       placeholder="请填写评语"
     />
+
+    <div class="mainItem" v-if="disabledShow">
+      <div class="label">评分</div>
+      <div>{{ value }}分</div>
+    </div>
+    <div class="mainItem" v-if="disabledShow">
+      <div class="label">评语</div>
+      <div>{{ content }}</div>
+    </div>
+    <div class="mainItem" v-if="islearning">
+      <div class="label">评优状态</div>
+      <div>{{ content }}</div>
+    </div>
+    <div class="mainItem">
+      <!-- <div class="label"></div> -->
+      <div>
+        <van-checkbox-group v-model="result" direction="horizontal" >
+          <van-checkbox v-for="item in resultList" :key="item.value" @change="clickChekcBox($event,item)" :disabled="disabledCheck(item)" shape="square" :name="item.value">{{ item.name }}</van-checkbox>
+        </van-checkbox-group>
+      </div>
+    </div>
     <van-row>
       <van-col span="24" class="btns">
         <!-- 签名 -->
@@ -99,10 +113,7 @@
         >
       </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>
@@ -111,7 +122,7 @@
 <script>
 import NavBar from '@/components/NavBar'
 import writingPad from '@/components/writingPad/index.vue'
-import { getrehearsalInfo, singrehearsalTask, drillInfo } from '@/api/drillTask.js'
+import { getrehearsalInfo, singrehearsalTask, drillInfo, drillSignInfo } from '@/api/drillTask.js'
 import { upload } from '@/api/public'
 import imgCom from '@/components/imgCom/index.vue'
 import { base64ToBlob } from '@/utils/base64TurnImg.js'
@@ -130,10 +141,13 @@ export default {
   },
   data() {
     return {
+      result: [],
+      orgType: '', //机构类型
       content: '', //评语
       value: 0, //评分
       this_window: window,
       show: false,
+      resultList:[],
       taskUserList: [], //参与人员
       qsUserList: [], //缺席人员
       imgList: [], //图片数组
@@ -144,53 +158,109 @@ export default {
   },
   computed: {
     goBack() {
-      if (this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'edit'||this.$route.params.id.split('_')[1] === 'info') {
+      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') {
         return '/rehearsaloptimal'
+      } else if (this.$route.params.id.split('_')[1] === 'learning') {
+        return '/rehearsallearning'
       }
     },
-    evaluate(){
-      if(this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'comment'){
+    evaluate() {
+      if (this.$route.params.id.split('_')[1] === 'evaluate') {
         return true
-      }else{
+      } 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'){
+
+    disabledShow() {
+      if (
+        this.$route.params.id.split('_')[1] === 'info' ||
+        this.$route.params.id.split('_')[1] === 'comment' ||
+        this.$route.params.id.split('_')[1] === 'learning'
+      ) {
         return true
-      }else{
+      } else {
         return false
       }
     },
-    disabledShow(){
-      if(this.$route.params.id.split('_')[1] === 'info'){
+    islearning() {
+      if (this.$route.params.id.split('_')[1] === 'learning') {
         return true
+      } else {
+        return false
       }
     },
-    peopleShow(){
-      if(this.$route.params.id.split('_')[1] === 'info' || this.$route.params.id.split('_')[1] === 'comment'){
+    peopleShow() {
+      if (
+        this.$route.params.id.split('_')[1] === 'info' ||
+        this.$route.params.id.split('_')[1] === 'comment' ||
+        this.$route.params.id.split('_')[1] === 'learning'
+      ) {
         return true
+      } else {
+        return false
       }
     }
-
   },
   created() {
+    //获取当前登录人机构类型
+    this.orgType = window.sessionStorage.getItem('SET_USER_ORGTYPE')
+    console.log( this.orgType );
+    if (this.orgType == 1) {
+      //省联社
+      this.resultList = [
+        {
+          name: '设置为省级优秀案例',
+          value: 5
+        }
+      ]
+    } else if (this.orgType == 2) {
+      //办事处
+      this.resultList = [
+      {
+          name: '设置为地区优秀案例',
+          value: 3
+        },
+        {
+          name: '推荐为省级优秀案例',
+          value: 4
+        }
+        
+      ]
+    } else if (this.orgType == 3) {
+      //行社
+      this.resultList = [
+      {
+          name: '设置为行社优秀案例',
+          value: 1
+        },
+        {
+          name: '推荐为地区优秀案例',
+          value: 2
+        }
+        
+      ]
+    }
     //获取详情信息
     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.content = data.comment
+        this.value = +data.commentScore
         this.trainingData = data
-        this.trainingData?.taskUserList?.map(item => {
+        this.trainingData.taskUserList.map(item => {
           if (item.type == 1) {
             this.taskUserList.push(item.userName)
           }
         })
         this.taskUserList = this.taskUserList.join(',')
-        this.trainingData?.taskUserList?.map(item => {
+        this.trainingData.taskUserList.map(item => {
           if (item.type == 2) {
             this.qsUserList.push(item.userName)
           }
@@ -211,13 +281,24 @@ export default {
           })
         }
 
-        this.imgList = this.trainingData?.imageList?.split(',') || []
+        this.imgList = this.trainingData.imageList.split(',') || []
       }
     })
   },
-  mounted() {},
+  mounted() {
+    
+  },
 
   methods: {
+    disabledCheck(item){
+      //当前是最后一个复选框禁用
+      if(this.resultList.length>1&&item.value==this.resultList[this.resultList.length-1].value){
+        return true
+      }
+    },
+    clickChekcBox(v,item){
+      console.log(v,item);
+    },
     signatureHandler() {
       this.show = true
     },
@@ -241,20 +322,18 @@ export default {
           message: `是否提交评价?`
         })
           .then(() => {
-            let obj = this.trainingData
-            obj.commentScore = this.value
-            obj.comment = this.content
-            drillInfo({
-              id: this.trainingData.id,
+            drillSignInfo({
+              taskId: this.trainingData.id,
               // type: this.trainingData.type,
-              submitType: 2,
-
-              ...obj
+              score: this.value,
+              comment: this.content
             }).then(res => {
               let { code, msg } = res
               if (code == 200) {
-                Toast('登记成功')
-                this.$router.push('/rehearsalTask')
+                Toast('评价成功')
+                setTimeout(() => {
+                  this.$router.push('/rehearsalTask')
+                }, 1000)
               } else {
                 Toast(msg)
               }
@@ -265,6 +344,10 @@ export default {
           })
       } else {
         //评价推优
+        if(this.result.length==0){
+          Toast('推荐优秀或设置优秀不能为空')
+          return
+        }
       }
     },
     clearHandler() {

+ 13 - 41
src/views/menu/rehearsalTask/index.vue

@@ -82,7 +82,7 @@
                 <van-button type="info" v-if="isSignature(item)" size="mini" @click="signature(item.id)"
                   >签名</van-button
                 >
-                <van-button type="info" v-if="isSignature(item)" size="mini" @click="evaluate(item.id)"
+                <van-button type="info" v-if="evaluateTure(item)" size="mini" @click="evaluate(item.id)"
                   >评价</van-button
                 >
               </div>
@@ -192,30 +192,7 @@ export default {
     Cascader
   },
 
-  filters: {
-    statusFilter: function (value) {
-      let str = ''
-      // 0待调阅,1调阅中,2已调阅,3已超期
-      switch (value) {
-        case 0:
-          str = '待调阅'
-
-          break
-        case 1:
-          str = '调阅中'
-          break
-
-        case 2:
-          str = '已调阅'
-          break
-
-        case 3:
-          str = '已超期'
-          break
-      }
-      return str
-    }
-  },
+ 
 
   created() {
     this.presentDate = new Date(newDateYear())
@@ -235,7 +212,7 @@ export default {
     },
     //判断是否展示签名按钮
     isSignature(list) {
-      return true
+  
       let falg = false
       let timefalg = false
       //value1 当前登陆用户ID
@@ -250,7 +227,7 @@ export default {
           timefalg = true
         }
       }
-      list.userList?.forEach(item => {
+      list.userList.forEach(item => {
         console.log(this.value1, 'sss')
         if (this.value1 == item.userId && item.sign === 0 && item.type == 1) {
           falg = true
@@ -261,9 +238,15 @@ export default {
         return true
       }
     },
+    //判断评价按钮是否展示
+    evaluateTure(item){
+      if(item.status==2){
+        return true
+      }
+    },
     //判断是否展示登记按钮
     isSign(list) {
-      return true
+     
       let falg = false
       let timefalg = false
       //value1 当前登陆用户ID
@@ -281,7 +264,7 @@ export default {
       //当前用户角色ID
       let roleL = JSON.parse(sessionStorage.getItem('SET_USER_ROLELIST'))
       roleL.forEach(i => {
-        list.taskRoleList?.forEach(item => {
+        list.taskRoleList.forEach(item => {
           if (this.cascaderValue == list.orgId && i.roleId == item.roleId) {
             falg = true
           }
@@ -297,18 +280,7 @@ export default {
         return true
       }
     },
-    //清空查询条件
-    clearSearch() {
-      this.fieldValue = ''
-      this.statusValue = ''
-      this.cascaderValue = ''
-      this.currentDate = ''
-      this.typeValue = ''
-      this.typeName = ''
-      this.orgName = ''
-
-      this.selectListAppHandler()
-    },
+   
 
     //初始化
     init() {

+ 361 - 0
src/views/menu/rehearsalTask/learning.vue

@@ -0,0 +1,361 @@
+<template>
+  <div>
+    <div class="topBox">
+      <NavBar :go="{ type: 'push', path: '/menu' }" />
+
+      <van-row>
+        <van-col span="24">
+          <org-tree v-model="cascaderValue" :name="'sss'" @changeItem="getDataList"></org-tree>
+        </van-col>
+      </van-row>
+      <van-row>
+        <van-col span="9">
+          <van-field
+            v-model="currentDate"
+            clearable
+            label-width="3em"
+            label="年份"
+            placeholder=""
+            :disabled="showDate"
+            @click="showDate = true"
+          >
+            <van-icon name="arrow-down" slot="button"
+          /></van-field>
+          <van-popup v-model="showDate" round position="bottom">
+            <van-picker
+              v-model="presentDate"
+              show-toolbar
+              @cancel="onCancel"
+              :columns="yearColumns"
+              @confirm="onDateConfirm"
+              :default-index="yearSelect"
+              title="年份"
+            />
+          </van-popup>
+        </van-col>
+        <van-col span="15">
+          <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-row>
+      <van-row>
+        <van-col span="24">
+          <van-tabs v-model="activeAl" @click="tbsAlHandler">
+            <van-tab name="01-01" title="行社优秀案例"></van-tab>
+            <van-tab name="04-01" title="地区优秀案例"></van-tab>
+            <van-tab name="07-01" title="省级优秀案例"></van-tab>
+           
+          </van-tabs>
+        </van-col>
+      </van-row>
+    </div>
+
+    <!-- //卡片内容区域 -->
+    <div class="navBarclas">
+      <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
+        <van-panel :title="item.title" v-for="item in taskList" :key="item.id" class="card" status="状态">
+          <template #header>
+            <div class="titleClass">
+              <div class="title">{{ item.title }}</div>
+            </div>
+          </template>
+          <div>
+            <div class="mainItem" @click="goInfo(item.id)">
+              <div>单位名称</div>
+              <div>{{ item.orgName }}</div>
+            </div>
+           
+            <div class="mainItem" @click="goInfo(item.id)">
+              <div>演练项目</div>
+              <div>{{ item.typeText }}</div>
+            </div>
+            <div class="mainItem" @click="goInfo(item.id)">
+              <div>演练时间</div>
+              <div>{{ item.drillTime }}</div>
+            </div>
+            
+          </div>
+        </van-panel>
+      </van-list>
+    </div>
+   
+  </div>
+</template>
+<script>
+import NavBar from '@/components/NavBar'
+import { Col, Row, Cascader, Dialog, DatetimePicker, Icon, Picker } from 'vant'
+import { getRecTaskList } from '@/api/optimalLearning.js'
+import { deptTreeList } from '@/api/toConsult.js'
+import { Toast } from 'vant'
+import OrgTree from '@/components/orgTree'
+import { newDateMonth, newDateYear } from '@/utils/date.js'
+export default {
+  data() {
+    return {
+      orgName: '',
+      orgShow: false,
+      presentDate: '', //默认时间
+      pageNum: 1,
+      loading: false, //加载状态
+      finished: false, //是否全部加载完毕
+     
+      yearColumns: [],
+     
+      orgName: JSON.parse(sessionStorage.getItem('SET_USER_ORGNAME')) || '', //机构名称
+      cascaderValue: '', //机构ID
+      show: false, //机构弹框显示隐藏
+      active: '01-01',
+      activeAl: '01-01',
+      fieldNames: {
+        text: 'name',
+        value: 'id',
+        children: 'children'
+      },
+      taskList: [], //列表数据
+      typeValue: ' ', //类型值
+      yearSelect: null,
+      value1: JSON.parse(sessionStorage.getItem('SET_USER_ID')) || '', //输入框model
+
+      showStatus: false, //状态显示隐藏
+      showDate: false, //月份显示隐藏
+      fieldValue: '全部', //状态名称
+      statusValue: ' ', //状态值
+      columns: ['全部'], //状态数组
+      columnsList: [], //状态数组
+      currentDate: newDateYear(), //年份
+  
+    }
+  },
+  components: {
+    NavBar,
+    OrgTree,
+    Dialog,
+    Icon,
+    DatetimePicker,
+    Picker,
+    Col,
+    Row,
+    Cascader
+  },
+
+  created() {
+    this.presentDate = new Date(newDateYear())
+
+    this.yearData()
+  },
+  mounted() {
+    this.init()
+    this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
+  },
+  methods: {
+    //机构搜索
+    getDataList(val) {
+      this.cascaderValue = val.id
+      this.orgName = val.name
+      this.selectListAppHandler()
+    },
+   
+  
+   
+
+    //初始化
+    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 = () => {}) {
+      let obj = {
+        
+        pageNum: this.pageNum,
+        pageSize: 10
+      }
+      if (!type) {
+        obj.pageNum = 1
+        this.pageNum = 1
+      }
+      if (this.statusValue) {
+        obj.status = this.statusValue
+      }
+
+      obj.orgId = this.cascaderValue || JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + '' || ''
+
+      if (this.currentDate) {
+        obj.date = this.currentDate + '-' + this.active
+      }
+      if (this.typeValue) {
+        obj.type = this.typeValue
+      }
+
+      //获取任务列表
+      getRecTaskList(obj).then(res => {
+        let { code, rows, msg } = res
+        if (code == 200) {
+          if (type) {
+            this.taskList.push(...rows)
+            if (rows.length == 0 || rows.length < 10) {
+              //已加载完全部数据
+              this.finished = true
+            }
+            callback()
+          } else {
+            this.finished = false
+            this.taskList = rows
+          }
+        }
+      })
+    },
+
+   
+    tbsHandler() {
+      this.selectListAppHandler()
+    },
+    tbsAlHandler() {
+      this.selectListAppHandler()
+    },
+    //年份选中触发
+    onDateConfirm(val) {
+      this.currentDate = this.newDate(val + '')
+
+      this.showDate = false
+      this.selectListAppHandler()
+    },
+    yearData() {
+      // 获取默认显示的时间
+      var nowTime = new Date()
+      let year = nowTime.getFullYear()
+      let month = nowTime.getMonth()
+      let day = nowTime.getDate()
+      // 循环数组 填写最小时间和最大时间范围
+      for (let i = 1980; i < 2099; i++) {
+        this.yearColumns.push(i)
+      }
+      // 格式化时间并截取
+      var years = this.formatDate(new Date(year, month, day))
+      var Year = years.slice(0, 4)
+      // 将截取的年份赋值给绑定值 用于点击弹出日期窗口后显示当前的时间
+      this.yearSelect = this.yearColumns.indexOf(Number(Year))
+    }, //日期转换
+    newDate(time) {
+      var date = new Date(time)
+      var y = date.getFullYear()
+      var m = date.getMonth() + 1
+      m = m < 10 ? '0' + m : m
+      var d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      return y
+    },
+    //日期格式
+    formatDate(date) {
+      return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
+    },
+
+    //onLoad下拉刷新
+    onLoad() {
+      if (this.pageNum == 1) {
+        this.pageNum = 2
+      }
+      this.loading = true
+      this.selectListAppHandler(1, () => {
+        this.pageNum++
+        this.loading = false
+        console.log(1)
+      })
+    },
+   
+    
+   
+    //跳转详情
+    goInfo(id) {
+      this.$router.push('/rehearsalTasinfo/' + id + '_learning')
+    },
+
+    onCancel() {
+      this.show = false
+      this.typeStatus = false
+      this.showDate = false
+      this.showStatus = false
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.popup {
+  height: 40vh;
+}
+.navBarclas {
+  height: calc(100vh - 380px);
+  overflow: scroll;
+}
+.btnf_box {
+  background-color: #fff;
+}
+.card {
+  margin: 20px;
+  margin-bottom: 0px;
+  box-shadow: 0 8px 12px #ebedf0;
+}
+.btn {
+  float: right;
+  margin-top: 24px;
+  margin-right: 20px;
+  box-sizing: border-box;
+}
+.titleClass {
+  display: flex;
+  align-items: center;
+  height: 100%;
+  padding: 20px;
+//   border-bottom: 1px solid #1989fa;
+
+  .title {
+    font-size: 30px;
+    flex: 1;
+    line-height: 50px;
+  }
+}
+.mainItem {
+  display: flex;
+  font-size: 28px;
+  padding: 20px;
+  justify-content: space-between;
+  .condition {
+    color: #1989fa;
+    text-decoration: underline;
+  }
+}
+.conditionCls {
+  .title {
+    color: #1989fa;
+    margin-left: 30px;
+    // margin-top: 30px;
+  }
+  .people {
+    margin-left: 80px;
+    margin-bottom: 30px;
+    margin-top: 30px;
+  }
+}
+.topBox {
+  overflow: hidden;
+}
+:deep.van-field--disabled {
+  color: #323233;
+}
+:deep.van-field--disabled .van-field__label {
+  color: #323233;
+}
+:deep .van-field__control[disabled] {
+  color: #323233;
+  -webkit-text-fill-color: #323233;
+}
+</style>

+ 43 - 110
src/views/menu/rehearsalTask/optimal.vue

@@ -9,7 +9,7 @@
         </van-col>
       </van-row>
       <van-row>
-        <van-col span="12"
+        <van-col span="15"
           ><van-field
             v-model="fieldValue"
             label-width="3em"
@@ -31,7 +31,7 @@
             />
           </van-popup>
         </van-col>
-        <van-col span="12">
+        <van-col span="9">
           <van-field
             v-model="currentDate"
             clearable
@@ -57,11 +57,11 @@
       </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>
 
@@ -92,15 +92,15 @@
             </div>
             <div class="mainItem" @click="goInfo(item.id)">
               <div>演练项目</div>
-              <div>{{ item.statusText }}</div>
+              <div>{{ item.typeText }}</div>
             </div>
             <div class="mainItem" @click="goInfo(item.id)">
               <div>评分</div>
-              <div>{{ item.typeText }}</div>
+              <div>{{ item.commentScore }}</div>
             </div>
             <div class="mainItem" @click="goInfo(item.id)">
               <div>评分状态</div>
-              <div>{{ item.trainingStartDateTime }}</div>
+              <div>{{ item.recStatusText }}</div>
             </div>
           </div>
         </van-panel>
@@ -112,7 +112,7 @@
 <script>
 import NavBar from '@/components/NavBar'
 import { Col, Row, Cascader, Dialog, DatetimePicker, Icon, Picker } from 'vant'
-import { gettrainingList,  } from '@/api/training.js'
+import { getlearningListPage,  } from '@/api/optimalLearning.js'
 import { deptTreeList } from '@/api/toConsult.js'
 import { Toast } from 'vant'
 import OrgTree from '@/components/orgTree'
@@ -132,22 +132,22 @@ export default {
       orgName: JSON.parse(sessionStorage.getItem('SET_USER_ORGNAME')) || '', //机构名称
       cascaderValue: '', //机构ID
       show: false, //机构弹框显示隐藏
-      active: '0',
+      active: '01-01',
       fieldNames: {
         text: 'name',
         value: 'id',
         children: 'children'
       },
       taskList: [], //列表数据
-      typeValue: ' ', //类型值
+     
       yearSelect: null,
       value1: JSON.parse(sessionStorage.getItem('SET_USER_ID')) || '', //输入框model
-
+      columnsList:[],
       showStatus: false, //状态显示隐藏
       showDate: false, //月份显示隐藏
       fieldValue: '全部', //状态名称
       statusValue: ' ', //状态值
-      columns: ['全部', '待记录', '待签名', '已完成'], //状态数组
+      columns: [], //状态数组
       currentDate: newDateYear(), //年份
     }
   },
@@ -163,34 +163,11 @@ export default {
     Cascader
   },
 
-  filters: {
-    statusFilter: function (value) {
-      let str = ''
-      // 0待调阅,1调阅中,2已调阅,3已超期
-      switch (value) {
-        case 0:
-          str = '待调阅'
-
-          break
-        case 1:
-          str = '调阅中'
-          break
-
-        case 2:
-          str = '已调阅'
-          break
-
-        case 3:
-          str = '已超期'
-          break
-      }
-      return str
-    }
-  },
+  
 
   created() {
     this.presentDate = new Date(newDateYear())
-    console.log(this.presentDate)
+  
     this.yearData()
   },
   mounted() {
@@ -208,38 +185,7 @@ export default {
     //判断是否展示登记按钮
     isSign(list) {
       return true
-      let falg = false
-      let timefalg = false
-      //value1 当前登陆用户ID
-      let date = new Date().getTime()
-      let startDate = Date.parse(new Date(list.startDate))
-      let endDate = Date.parse(new Date(list.endDate))
-      //任务处于待记录状态,且任务在规定完成时间范围内,登录人所在机构和角色与任务培训角色、培训机构一致才显示
-
-      if (list.startDate && list.endDate && list.status == 0) {
-        if (date >= startDate && date <= endDate) {
-          timefalg = true
-        }
-      }
-      //cascaderValue  当前机构ID
-      //当前用户角色ID
-      let roleL = JSON.parse(sessionStorage.getItem('SET_USER_ROLELIST'))
-      roleL.forEach(i => {
-        list.taskRoleList?.forEach(item => {
-          if (this.cascaderValue == list.orgId && i.roleId == item.roleId) {
-            falg = true
-          }
-        })
-      })
-      if (date > endDate) {
-        //当前时间大于结束时间表示已超期
-
-        timefalg = false
-        falg = false
-      }
-      if (falg && timefalg) {
-        return true
-      }
+      
     },
     //清空查询条件
     clearSearch() {
@@ -247,7 +193,7 @@ export default {
       this.statusValue = ''
       this.cascaderValue = ''
       this.currentDate = ''
-      this.typeValue = ''
+    
       this.typeName = ''
       this.orgName = ''
 
@@ -256,11 +202,17 @@ export default {
 
     //初始化
     init() {
+       //获取数据字典
+       this.getDictHandler('drill_task_rec_status', res => {
+        this.columnsList = res
+        this.columns = res.map(item => item.dictLabel)
+        this.columns.unshift('全部')
+      })
       this.selectListAppHandler()
     },
     selectListAppHandler(type = 0, callback = () => {}) {
       let obj = {
-        isAppSelect: 1,
+       
         pageNum: this.pageNum,
         pageSize: 10
       }
@@ -269,20 +221,18 @@ export default {
         this.pageNum = 1
       }
       if (this.statusValue) {
-        obj.status = this.statusValue
+        obj.recStatus = this.statusValue
       }
 
       obj.orgId = this.cascaderValue || JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + '' || ''
 
       if (this.currentDate) {
-        obj.date = this.currentDate
-      }
-      if (this.typeValue) {
-        obj.type = this.typeValue
+        obj.date = this.currentDate+'-'+this.active
       }
+    
 
       //获取任务列表
-      gettrainingList(obj).then(res => {
+      getlearningListPage(obj).then(res => {
         let { code, rows, msg } = res
         if (code == 200) {
           if (type) {
@@ -300,43 +250,26 @@ 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)
@@ -383,7 +316,7 @@ export default {
       this.selectListAppHandler(1, () => {
         this.pageNum++
         this.loading = false
-        console.log(1)
+       
       })
     },
    

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

@@ -4,11 +4,11 @@
     <van-form class="bigbox" ref="form">
       <div class="mainItem">
         <div class="label">标题</div>
-        <div >{{ trainingData?.title }}</div>
+        <div >{{ trainingData.title }}</div>
       </div>
       <div class="mainItem">
         <div class="label">单位名称</div>
-        <div >{{ trainingData?.orgName }}</div>
+        <div >{{ trainingData.orgName }}</div>
       </div>
       <van-field
         readonly

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

@@ -4,31 +4,31 @@
 
     <div class="mainItem">
       <div class="label">标题</div>
-      <div>{{ trainingData?.title }}</div>
+      <div>{{ trainingData.title }}</div>
     </div>
     <div class="mainItem">
       <div class="label">单位名称</div>
-      <div>{{ trainingData?.orgName }}</div>
+      <div>{{ trainingData.orgName }}</div>
     </div>
     <div class="mainItem">
       <div class="label">培训类型</div>
-      <div>{{ trainingData?.typeText }}</div>
+      <div>{{ trainingData.typeText }}</div>
     </div>
     <div class="mainItem">
       <div class="label">培训开始时间</div>
-      <div>{{ trainingData?.trainingStartDateTime }}</div>
+      <div>{{ trainingData.trainingStartDateTime }}</div>
     </div>
     <div class="mainItem">
       <div class="label">培训结束时间</div>
-      <div>{{ trainingData?.trainingEndDateTime }}</div>
+      <div>{{ trainingData.trainingEndDateTime }}</div>
     </div>
     <div class="mainItem">
       <div class="label">主持人</div>
-      <div>{{ trainingData?.hostName }}</div>
+      <div>{{ trainingData.hostName }}</div>
     </div>
     <div class="mainItem">
       <div class="label">记录人</div>
-      <div>{{ trainingData?.recorderName }}</div>
+      <div>{{ trainingData.recorderName }}</div>
     </div>
     <div class="mainItem">
       
@@ -44,11 +44,11 @@
     </div>
     <div class="mainItem">
       <div class="label">培训内容</div>
-      <div>{{ trainingData?.content }}</div>
+      <div>{{ trainingData.content }}</div>
     </div>
     <div class="mainItem">
       <div class="label">总结</div>
-      <div>{{ trainingData?.note }}</div>
+      <div>{{ trainingData.note }}</div>
     </div>
     <div class="mainItem">
       <div class="label">参与人员</div>
@@ -120,13 +120,13 @@ export default {
       let { code, data, msg } = res
       if (code == 200) {
         this.trainingData = data
-        this.trainingData?.taskUserList?.map(item => {
+        this.trainingData.taskUserList.map(item => {
           if (item.type == 1) {
             this.taskUserList.push(item.userName)
           }
         })
         this.taskUserList = this.taskUserList.join(',')
-        this.trainingData?.taskUserList?.map(item => {
+        this.trainingData.taskUserList.map(item => {
           if (item.type == 2) {
             this.qsUserList.push(item.userName)
           }
@@ -147,7 +147,7 @@ export default {
           })
         }
         
-        this.imgList = this.trainingData?.imageList?.split(',') || []
+        this.imgList = this.trainingData.imageList.split(',') || []
       }
     })
   },

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

@@ -265,7 +265,7 @@ export default {
           timefalg = true
         }
       }
-      list.userList?.forEach(item => {
+      list.userList.forEach(item => {
         console.log(this.value1, 'sss')
         if (this.value1 == item.userId && item.sign === 0 && item.type == 1) {
           falg = true
@@ -295,7 +295,7 @@ export default {
       //当前用户角色ID
       let roleL = JSON.parse(sessionStorage.getItem('SET_USER_ROLELIST'))
       roleL.forEach(i => {
-        list.taskRoleList?.forEach(item => {
+        list.taskRoleList.forEach(item => {
           if (this.cascaderValue == list.orgId && i.roleId == item.roleId) {
             falg = true
           }