|  | @@ -28,7 +28,7 @@
 | 
	
		
			
				|  |  |      <van-row>
 | 
	
		
			
				|  |  |        <van-col span="12"
 | 
	
		
			
				|  |  |          ><van-field
 | 
	
		
			
				|  |  | -          v-model="statusValue"
 | 
	
		
			
				|  |  | +          v-model="fieldValue"
 | 
	
		
			
				|  |  |            is-link
 | 
	
		
			
				|  |  |            label-width="3em"
 | 
	
		
			
				|  |  |            clearable
 | 
	
	
		
			
				|  | @@ -36,7 +36,7 @@
 | 
	
		
			
				|  |  |            placeholder=""
 | 
	
		
			
				|  |  |            @click="showStatus = true"
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  | -        <van-popup v-model="typeStatus" round position="bottom">
 | 
	
		
			
				|  |  | +        <van-popup v-model="showStatus" round position="bottom">
 | 
	
		
			
				|  |  |            <van-picker
 | 
	
		
			
				|  |  |              title="状态"
 | 
	
		
			
				|  |  |              show-toolbar
 | 
	
	
		
			
				|  | @@ -71,7 +71,7 @@
 | 
	
		
			
				|  |  |      <van-row>
 | 
	
		
			
				|  |  |        <van-col span="18"
 | 
	
		
			
				|  |  |          ><van-field
 | 
	
		
			
				|  |  | -          v-model="typeValue"
 | 
	
		
			
				|  |  | +          v-model="typeName"
 | 
	
		
			
				|  |  |            is-link
 | 
	
		
			
				|  |  |            label-width="3em"
 | 
	
		
			
				|  |  |            clearable
 | 
	
	
		
			
				|  | @@ -84,7 +84,7 @@
 | 
	
		
			
				|  |  |              title="类型"
 | 
	
		
			
				|  |  |              show-toolbar
 | 
	
		
			
				|  |  |              :columns="typeColumns"
 | 
	
		
			
				|  |  | -            @confirm="onConfirm"
 | 
	
		
			
				|  |  | +            @confirm="onConfirmHandler"
 | 
	
		
			
				|  |  |              @cancel="onCancel"
 | 
	
		
			
				|  |  |              @change="onChange"
 | 
	
		
			
				|  |  |              :close-on-click-overlay="false"
 | 
	
	
		
			
				|  | @@ -97,61 +97,57 @@
 | 
	
		
			
				|  |  |        </van-col>
 | 
	
		
			
				|  |  |      </van-row>
 | 
	
		
			
				|  |  |      <!-- //卡片内容区域 -->
 | 
	
		
			
				|  |  | -    <van-panel title="每月例行培训学习" class="card" status="状态">
 | 
	
		
			
				|  |  | +    <van-panel :title="item.title" v-for="item in taskList" :key="item.id" class="card" status="状态">
 | 
	
		
			
				|  |  |        <template #header>
 | 
	
		
			
				|  |  |          <div class="titleClass">
 | 
	
		
			
				|  |  | -          <div class="title">每月例行培训学习</div>
 | 
	
		
			
				|  |  | +          <div class="title">{{ item.title }}</div>
 | 
	
		
			
				|  |  |            <div>
 | 
	
		
			
				|  |  | -            <van-button plain type="info" size="mini" @click="trainSign">培训登记</van-button>
 | 
	
		
			
				|  |  | -            <van-button plain type="info"  size="mini" @click="signature">签名</van-button>
 | 
	
		
			
				|  |  | +            <van-button plain type="info" v-if="item.status == 0" size="mini" @click="trainSign(item.id)"
 | 
	
		
			
				|  |  | +              >培训登记</van-button
 | 
	
		
			
				|  |  | +            >
 | 
	
		
			
				|  |  | +            <van-button plain type="info" v-if="item.status == 1" size="mini" @click="signature(item.id)"
 | 
	
		
			
				|  |  | +              >签名</van-button
 | 
	
		
			
				|  |  | +            >
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |        </template>
 | 
	
		
			
				|  |  |        <div class="mainItem">
 | 
	
		
			
				|  |  |          <div>单位名称</div>
 | 
	
		
			
				|  |  | -        <div>抚琴路支行</div>
 | 
	
		
			
				|  |  | +        <div>{{ item.orgName }}</div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <div class="mainItem">
 | 
	
		
			
				|  |  |          <div>培训状态</div>
 | 
	
		
			
				|  |  | -        <div>待记录</div>
 | 
	
		
			
				|  |  | +        <div>{{ item.statusText }}</div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <div class="mainItem">
 | 
	
		
			
				|  |  |          <div>培训类型</div>
 | 
	
		
			
				|  |  | -        <div>每月安全培训教育</div>
 | 
	
		
			
				|  |  | +        <div>{{ item.typeText }}</div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <div class="mainItem">
 | 
	
		
			
				|  |  |          <div>培训时间</div>
 | 
	
		
			
				|  |  | -        <div>2023-05-01 18:33:12</div>
 | 
	
		
			
				|  |  | +        <div>{{ item.startDate }}</div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <div class="mainItem">
 | 
	
		
			
				|  |  |          <div>签名情况</div>
 | 
	
		
			
				|  |  | -        <div class="condition" @click="signatureCondition">10/10</div>
 | 
	
		
			
				|  |  | +        <div class="condition" @click="signatureCondition">{{ item.signNums }}</div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </van-panel>
 | 
	
		
			
				|  |  |      <!-- 卡片弹框 -->
 | 
	
		
			
				|  |  |      <van-dialog v-model="conditionShow" title="签名情况" show-cancel-button>
 | 
	
		
			
				|  |  | -        <div class="conditionCls">
 | 
	
		
			
				|  |  | -            <div class="title">
 | 
	
		
			
				|  |  | -                已签名人员(5人):
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -            <div class="people">
 | 
	
		
			
				|  |  | -                张三,张三张三张三张三
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -            <div class="title">
 | 
	
		
			
				|  |  | -                未签名人员(5人):
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -            <div class="people">
 | 
	
		
			
				|  |  | -                张三,张三张三张三张三
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -        </div>
 | 
	
		
			
				|  |  | +      <div class="conditionCls">
 | 
	
		
			
				|  |  | +        <div class="title">已签名人员(5人):</div>
 | 
	
		
			
				|  |  | +        <div class="people">张三,张三张三张三张三</div>
 | 
	
		
			
				|  |  | +        <div class="title">未签名人员(5人):</div>
 | 
	
		
			
				|  |  | +        <div class="people">张三,张三张三张三张三</div>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  |      </van-dialog>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import NavBar from '@/components/NavBar'
 | 
	
		
			
				|  |  |  import { Col, Row, Cascader, Dialog, DatetimePicker, Icon, Picker } from 'vant'
 | 
	
		
			
				|  |  | -import {  gettrainingList,  } from '@/api/training.js'
 | 
	
		
			
				|  |  | -import {  deptTreeList,  } from '@/api/toConsult.js'
 | 
	
		
			
				|  |  | +import { gettrainingList } from '@/api/training.js'
 | 
	
		
			
				|  |  | +import { deptTreeList } from '@/api/toConsult.js'
 | 
	
		
			
				|  |  |  import { Toast } from 'vant'
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    data() {
 | 
	
	
		
			
				|  | @@ -166,11 +162,14 @@ export default {
 | 
	
		
			
				|  |  |          value: 'id',
 | 
	
		
			
				|  |  |          children: 'children'
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | +      taskList: [], //列表数据
 | 
	
		
			
				|  |  |        typeValue: '', //类型值
 | 
	
		
			
				|  |  | -      statusValue: '', //状态值
 | 
	
		
			
				|  |  | +      typeName: '', //类型名称
 | 
	
		
			
				|  |  | +      fieldValue: '', //状态值
 | 
	
		
			
				|  |  |        typeStatus: false, //类型显示隐藏
 | 
	
		
			
				|  |  |        showStatus: false, //状态显示隐藏
 | 
	
		
			
				|  |  |        showDate: false, //月份显示隐藏
 | 
	
		
			
				|  |  | +      fieldValue: '', //状态名称
 | 
	
		
			
				|  |  |        columns: ['待记录', '待签名', '已完成'], //状态数组
 | 
	
		
			
				|  |  |        typeColumns: ['每月安全培训教育', '专项安全培训教育'], //类型数组
 | 
	
		
			
				|  |  |        currentDate: '', //月份值
 | 
	
	
		
			
				|  | @@ -220,11 +219,13 @@ export default {
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      //清空查询条件
 | 
	
		
			
				|  |  |      clearSearch() {
 | 
	
		
			
				|  |  | +      this.fieldValue = ''
 | 
	
		
			
				|  |  |        this.statusValue = ''
 | 
	
		
			
				|  |  |        this.cascaderValue = ''
 | 
	
		
			
				|  |  |        this.currentDate = ''
 | 
	
		
			
				|  |  |        this.typeValue = ''
 | 
	
		
			
				|  |  | -     
 | 
	
		
			
				|  |  | +      this.typeName = ''
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        this.selectListAppHandler()
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -240,25 +241,38 @@ export default {
 | 
	
		
			
				|  |  |        this.selectListAppHandler()
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      selectListAppHandler() {
 | 
	
		
			
				|  |  | +      let obj = {
 | 
	
		
			
				|  |  | +        isAppSelect: 1
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      
 | 
	
		
			
				|  |  | +      if (this.statusValue) {
 | 
	
		
			
				|  |  | +        obj.status = this.statusValue
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (this.cascaderValue) {
 | 
	
		
			
				|  |  | +        obj.orgId = this.cascaderValue
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (this.currentDate) {
 | 
	
		
			
				|  |  | +        obj.date = this.currentDate + '-01'
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (this.typeValue) {
 | 
	
		
			
				|  |  | +        obj.type = this.typeValue
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      
 | 
	
		
			
				|  |  | +      
 | 
	
		
			
				|  |  |        //获取任务列表
 | 
	
		
			
				|  |  | -      gettrainingList({
 | 
	
		
			
				|  |  | -        status: this.statusValue || null,
 | 
	
		
			
				|  |  | -        orgId: this.cascaderValue || null,
 | 
	
		
			
				|  |  | -        date: this.currentDate || null,
 | 
	
		
			
				|  |  | -        type: this.typeValue || null,
 | 
	
		
			
				|  |  | -      }).then(res => {
 | 
	
		
			
				|  |  | -        let { code, data, msg } = res
 | 
	
		
			
				|  |  | +      gettrainingList(obj).then(res => {
 | 
	
		
			
				|  |  | +        let { code, rows, msg } = res
 | 
	
		
			
				|  |  |          if (code == 200) {
 | 
	
		
			
				|  |  | -          this.taskList = data
 | 
	
		
			
				|  |  | +          this.taskList = rows
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      //关闭弹框事件
 | 
	
		
			
				|  |  |      closeDialog() {
 | 
	
		
			
				|  |  | -      this.show = false
 | 
	
		
			
				|  |  |        this.selectListAppHandler()
 | 
	
		
			
				|  |  | -      this.orgName=this.value1
 | 
	
		
			
				|  |  | +      this.show = false
 | 
	
		
			
				|  |  | +      this.orgName = this.value1
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 开始调阅事件
 | 
	
		
			
				|  |  |      startMonitorHandler(taskId) {
 | 
	
	
		
			
				|  | @@ -288,28 +302,42 @@ export default {
 | 
	
		
			
				|  |  |        this.fieldValue = value
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        switch (value) {
 | 
	
		
			
				|  |  | -        case '待调阅':
 | 
	
		
			
				|  |  | -          this.str = '0'
 | 
	
		
			
				|  |  | +        case '待记录':
 | 
	
		
			
				|  |  | +          this.statusValue = '0'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |            break
 | 
	
		
			
				|  |  | -        case '调阅中':
 | 
	
		
			
				|  |  | -          this.str = '1'
 | 
	
		
			
				|  |  | +        case '待签名':
 | 
	
		
			
				|  |  | +          this.statusValue = '1'
 | 
	
		
			
				|  |  |            break
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        case '已调阅':
 | 
	
		
			
				|  |  | -          this.str = '2'
 | 
	
		
			
				|  |  | +        case '已完成':
 | 
	
		
			
				|  |  | +          this.statusValue = '2'
 | 
	
		
			
				|  |  |            break
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.selectListAppHandler()
 | 
	
		
			
				|  |  | +      this.showStatus = false
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //类型确认框
 | 
	
		
			
				|  |  | +    onConfirmHandler(value, index) {
 | 
	
		
			
				|  |  | +      this.typeName = value
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      switch (value) {
 | 
	
		
			
				|  |  | +        case '每月安全培训教育':
 | 
	
		
			
				|  |  | +          this.typeValue = '0'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        case '已超期':
 | 
	
		
			
				|  |  | -          this.str = '3'
 | 
	
		
			
				|  |  | +          break
 | 
	
		
			
				|  |  | +        case '专项安全培训教育':
 | 
	
		
			
				|  |  | +          this.typeValue = '1'
 | 
	
		
			
				|  |  |            break
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +      console.log(this.typeValue)
 | 
	
		
			
				|  |  |        this.typeStatus = false
 | 
	
		
			
				|  |  |        this.selectListAppHandler()
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //月份选中触发
 | 
	
		
			
				|  |  |      onDateConfirm() {
 | 
	
		
			
				|  |  |        this.currentDate = this.newDate(this.currentDate)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        this.showDate = false
 | 
	
		
			
				|  |  |        this.selectListAppHandler()
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -321,19 +349,19 @@ export default {
 | 
	
		
			
				|  |  |        m = m < 10 ? '0' + m : m
 | 
	
		
			
				|  |  |        var d = date.getDate()
 | 
	
		
			
				|  |  |        d = d < 10 ? '0' + d : d
 | 
	
		
			
				|  |  | -      return y + '-' + m + '-' + d
 | 
	
		
			
				|  |  | +      return y + '-' + m
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //查看签名情况
 | 
	
		
			
				|  |  |      signatureCondition() {
 | 
	
		
			
				|  |  | -        this.conditionShow=true
 | 
	
		
			
				|  |  | +      this.conditionShow = true
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //培训登记跳转
 | 
	
		
			
				|  |  | -    trainSign(){
 | 
	
		
			
				|  |  | -        this.$router.push('/Addtraining/'+'1111')
 | 
	
		
			
				|  |  | +    trainSign(id) {
 | 
	
		
			
				|  |  | +      this.$router.push('/Addtraining/' + id)
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //签名
 | 
	
		
			
				|  |  | -    signature(){
 | 
	
		
			
				|  |  | -        this.$router.push('/personnelSignature/'+'1111')
 | 
	
		
			
				|  |  | +    signature() {
 | 
	
		
			
				|  |  | +      this.$router.push('/personnelSignature/' + '1111')
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onChange(picker, value, index) {},
 | 
	
		
			
				|  |  |      onCancel() {
 | 
	
	
		
			
				|  | @@ -382,17 +410,16 @@ export default {
 | 
	
		
			
				|  |  |      text-decoration: underline;
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -.conditionCls{
 | 
	
		
			
				|  |  | -    .title{
 | 
	
		
			
				|  |  | -        color: #1989fa;
 | 
	
		
			
				|  |  | -        margin-left: 30px;
 | 
	
		
			
				|  |  | -        // margin-top: 30px;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    .people{
 | 
	
		
			
				|  |  | -        margin-left: 80px;
 | 
	
		
			
				|  |  | -        margin-bottom: 30px;
 | 
	
		
			
				|  |  | -        margin-top: 30px
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +.conditionCls {
 | 
	
		
			
				|  |  | +  .title {
 | 
	
		
			
				|  |  | +    color: #1989fa;
 | 
	
		
			
				|  |  | +    margin-left: 30px;
 | 
	
		
			
				|  |  | +    // margin-top: 30px;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  .people {
 | 
	
		
			
				|  |  | +    margin-left: 80px;
 | 
	
		
			
				|  |  | +    margin-bottom: 30px;
 | 
	
		
			
				|  |  | +    margin-top: 30px;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  </style>
 |