coys 2 年之前
父节点
当前提交
160d92952e

+ 1 - 1
src/api/toConsult.js

@@ -99,7 +99,7 @@ export function getEditInfo(query) {
 //结束调阅
 export function getEndInfo(data) {
   return request({
-    url: `/core/retrievalTask`,
+    url: `/core/registration`,
     method: 'put',
     data
   })

+ 18 - 0
src/router/router.config.js

@@ -28,6 +28,24 @@ export let routers = [
     meta: { title: '添加监控调阅', keepAlive: false }
   },
   {
+    path: '/training',
+    name: 'training',
+    component: () => import('@/views/menu/training/index'),
+    meta: { title: '教育培训', keepAlive: false }
+  },
+  {
+    path: '/Addtraining/:id',
+    name: 'Addtraining',
+    component: () => import('@/views/menu/training/components/addTraining.vue'),
+    meta: { title: '培训登记', keepAlive: false }
+  },
+  // {
+  //   path: '/Addtraining',
+  //   name: 'Addtraining',
+  //   component: () => import('@/views/menu/training/index'),
+  //   meta: { title: '培训参与人员签名', keepAlive: false }
+  // },
+  {
     path: '/home',
     component: () => import('@/components/layouts/index'),
     redirect:'/works',

+ 1 - 0
src/views/home/menu.vue

@@ -88,6 +88,7 @@ export default {
             },
             {
               menu:'培训登记',
+              path:'/training'
             },
           ]
         },

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

@@ -93,7 +93,7 @@ export default {
         id:this.taskData.id,
         taskId:this.$route.params.id
       }).then(res=>{
-        
+this.$router.push('/monitoringCall')
       })
     }
   }
@@ -104,7 +104,7 @@ export default {
   height: calc(100vh - 260px);
   overflow: scroll;
   // height: 100vh;
-  // background-color: #d5d8d8;
+  background-color: #f2f2f2;
   .textTitle {
     font-size: 40px;
     font-weight: bold;

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

@@ -16,7 +16,7 @@
         <van-col class="vancol" span="6">{{ item.project|proJectListFilter(this_) }}</van-col>
 
         <van-col class="vancol" span="6"
-          ><span :style="{ color: item.situation == 1 ? '#d97b7e' : '#7de46f' }">{{
+          ><span :style="{ color: item.situation == 1 ? '#d97b7e' : '#12b533' }">{{
             item.situation | dictFilter(this_)
           }}</span></van-col
         >
@@ -92,7 +92,7 @@ export default {
 <style lang="scss" scoped>
 .topBox {
   position: relative;
-  background-color: #abc9d1;
+  background-color: #fff;
   width: 100%;
   border-radius: 10px;
   padding: 10px;
@@ -110,7 +110,7 @@ export default {
 
 .List {
   border: 1px solid #ccc;
-  background-color: #dfeaee;
+  background-color: #fff;
   margin-bottom: -1px;
   text-align: left;
 }

+ 18 - 8
src/views/menu/monitoringCall/index.vue

@@ -37,11 +37,12 @@
           <van-datetime-picker v-model="currentDate" @cancel="onCancel" @confirm="onDateConfirm"  type="year-month" title="月份" />
         </van-popup>
       </van-col>
-      <van-col span="6" class="">
+      <van-col span="6" class="btnf_box">
         <van-button type="info" class="btn" @click="clearSearch" size="small">重置</van-button>
       </van-col>
     </van-row>
     <!-- 调阅列表 -->
+    <div class="bigbox">
     <div class="topBox" @click="endMonitorHandler(item.status, item.id)" v-for="item in taskList" :key="item.id">
       <div class="sonLeftBox">
         <!-- 待调阅按钮 -->
@@ -55,6 +56,7 @@
       <div class="startMonitor" v-if="item.status == 0" @click="startMonitorHandler(item.id)">开始调阅</div>
       <div class="endMonitor" v-else @click="lookInfoHandler(item.id)"><van-icon name="arrow" /></div>
     </div>
+  </div>
 
     <!-- 扫描弹框 -->
     <van-dialog v-model="showDialog" title="" width="" :showConfirmButton="false">
@@ -298,12 +300,12 @@ export default {
 .topBox {
   border: 1px solid #ccc;
   margin: 20px;
-
+  
   display: flex;
   .sonLeftBox {
     padding: 10px;
     flex: 1;
-    background-color: #e6ebeb;
+    background-color: #f5f5f9;
   }
 }
 .monitor {
@@ -333,16 +335,16 @@ export default {
   font-size: 32px;
 }
 .startMonitor {
-  background-color: #87b2be;
-  color: white;
+  background-color: #f5f5f9;
+  color: #1989fa;
   width: 160px;
   line-height: 200px;
   font-size: 36px;
   text-align: center;
 }
 .endMonitor {
-  background-color: #e6ebeb;
-  color: #87b2be;
+  background-color: #f5f5f9;
+  color: #1989fa;
   width: 160px;
   line-height: 200px;
   font-size: 36px;
@@ -374,6 +376,9 @@ export default {
     }
   }
 }
+.btnf_box{
+  background-color: #fff;
+}
 .van-dialog {
   padding: 30px;
 }
@@ -387,7 +392,12 @@ export default {
 }
 .btn{
   float: right;
-  margin-top:20px;
+  margin-top:24px;
   margin-right: 20px;
+  box-sizing: border-box;
+}
+.bigbox{
+  height:calc(100vh - 300px);
+  background-color: #fff;
 }
 </style>

+ 149 - 0
src/views/menu/training/components/addTraining.vue

@@ -0,0 +1,149 @@
+<template>
+  <div>
+    <NavBar />
+    <van-form @submit="onSubmit">
+      <div class="mainItem">
+        <div>标题</div>
+        <div>抚琴路支行</div>
+      </div>
+      <div class="mainItem">
+        <div>单位名称</div>
+        <div>抚琴路支行</div>
+      </div>
+      <van-field
+        readonly
+        clickable
+        required
+        name="picker"
+        :value="form.value"
+        label="培训类型"
+        placeholder="请选择培训类型"
+        @click="showPicker = true"
+      />
+      <van-popup v-model="showPicker" position="bottom">
+        <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
+      </van-popup>
+      <!-- 培训开始时间 -->
+      <van-field
+        readonly
+        clickable
+        name="datetimePicker"
+        :value="form.startDate"
+        required
+        label="培训开始时间"
+        placeholder="请选择培训开始时间"
+        @click="showStartDate = true"
+      />
+      <van-popup v-model="showStartDate" position="bottom">
+        <van-datetime-picker type="date" @confirm="onConfirmDate" @cancel="showStartDate = false" />
+      </van-popup>
+      <!-- 培训结束时间 -->
+      <van-field
+        readonly
+        clickable
+        name="datetimePicker"
+        :value="form.endDate"
+        required
+        label="培训结束时间"
+        placeholder="请选择培训结束时间"
+        @click="showEndDate = true"
+      />
+      <van-popup v-model="showEndDate" position="bottom">
+        <van-datetime-picker type="date" @confirm="onConfirmEndDate" @cancel="showEndDate = false" />
+      </van-popup>
+      <!-- 培训内容 -->
+      <van-field
+        required
+        v-model="username"
+        name="用户名"
+        label="培训内容"
+        type="textarea"
+        row="3"
+        placeholder="请填写培训内容"
+        
+      />
+      <!-- 总结 -->
+      <van-field
+        required
+        v-model="username"
+        name="用户名"
+        label="总结"
+        type="textarea"
+        row="3"
+        placeholder="请结合网点进行总结"
+        
+      />
+      <div class="btns">
+        <van-button type="info" native-type="submit">保存</van-button>
+        <van-button type="info" native-type="submit">提交</van-button>
+      </div>
+    </van-form>
+  </div>
+</template>
+<script>
+import NavBar from '@/components/NavBar'
+export default {
+  name: 'SocAppAddTraining',
+  components: {
+    NavBar
+  },
+  data() {
+    return {
+      username: '',
+      password: '',
+      form: {
+        value: '',
+        startDate: '', //开始时间
+        endDate: '' //开始时间
+      },
+      showPicker: false, //培训类型显示隐藏
+      showStartDate: false, //开始时间显示隐藏
+      showEndDate: false, //结束时间显示隐藏
+      columns: ['每月安全培训教育', '专项安全培训教育']
+    }
+  },
+
+  mounted() {},
+
+  methods: {
+    onSubmit(values) {
+      console.log('submit', values)
+    },
+    //培训类型确认
+    onConfirm(val) {
+      this.form.value = val //培训类型赋值
+      this.showPicker = false
+    },
+    //开始时间确认
+    onConfirmDate(val) {
+      this.form.startDate = val
+      this.showStartDate = false
+    },
+    //结束时间
+    onConfirmEndDate(val) {
+      this.form.endDate = val
+      this.showEndDate = false
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.mainItem {
+  display: flex;
+  font-size: 28px;
+  padding: 34px;
+  justify-content: space-between;
+  background-color: #fff;
+}
+.btns {
+  position: fixed;
+  bottom: 2%;
+  // margin: 16px;
+  display: flex;
+  justify-content: space-around;
+  .van-button {
+    width: 300px;
+    margin-left: 50px;
+  }
+}
+</style>

+ 391 - 0
src/views/menu/training/index.vue

@@ -0,0 +1,391 @@
+<template>
+  <div>
+    <NavBar />
+    <van-row>
+      <van-col span="24"
+        ><van-field
+          v-model="orgName"
+          is-link
+          label-width="4em"
+          clearable
+          label="组织机构"
+          placeholder=""
+          @click="show = true"
+        />
+        <van-popup v-model="show" round position="bottom" :close-on-click-overlay="false">
+          <van-cascader
+            v-model="cascaderValue"
+            title="组织机构"
+            :options="options"
+            @close="closeDialog"
+            @change="changeCascader"
+            @finish="onFinish"
+            :field-names="fieldNames"
+          />
+        </van-popup>
+      </van-col>
+    </van-row>
+    <van-row>
+      <van-col span="12"
+        ><van-field
+          v-model="statusValue"
+          is-link
+          label-width="3em"
+          clearable
+          label="状态"
+          placeholder=""
+          @click="showStatus = true"
+        />
+        <van-popup v-model="typeStatus" round position="bottom">
+          <van-picker
+            title="状态"
+            show-toolbar
+            :columns="columns"
+            @confirm="onConfirm"
+            @cancel="onCancel"
+            @change="onChange"
+            :close-on-click-overlay="false"
+          />
+        </van-popup>
+      </van-col>
+      <van-col span="12">
+        <van-field
+          v-model="currentDate"
+          clearable
+          label-width="3em"
+          label="月份"
+          placeholder=""
+          @click="showDate = true"
+        />
+        <van-popup v-model="showDate" round position="bottom">
+          <van-datetime-picker
+            v-model="currentDate"
+            @cancel="onCancel"
+            @confirm="onDateConfirm"
+            type="year-month"
+            title="月份"
+          />
+        </van-popup>
+      </van-col>
+    </van-row>
+    <van-row>
+      <van-col span="18"
+        ><van-field
+          v-model="typeValue"
+          is-link
+          label-width="3em"
+          clearable
+          label="类型"
+          placeholder=""
+          @click="typeStatus = true"
+        />
+        <van-popup v-model="typeStatus" round position="bottom">
+          <van-picker
+            title="类型"
+            show-toolbar
+            :columns="typeColumns"
+            @confirm="onConfirm"
+            @cancel="onCancel"
+            @change="onChange"
+            :close-on-click-overlay="false"
+          />
+        </van-popup>
+      </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>
+    <!-- //卡片内容区域 -->
+    <van-panel title="每月例行培训学习" class="card" status="状态">
+      <template #header>
+        <div class="titleClass">
+          <div class="title">每月例行培训学习</div>
+          <div>
+            <van-button plain type="info" size="mini" @click="trainSign">培训登记</van-button>
+            <!-- <van-button plain type="info">签名</van-button> -->
+          </div>
+        </div>
+      </template>
+      <div class="mainItem">
+        <div>单位名称</div>
+        <div>抚琴路支行</div>
+      </div>
+      <div class="mainItem">
+        <div>培训状态</div>
+        <div>待记录</div>
+      </div>
+      <div class="mainItem">
+        <div>培训类型</div>
+        <div>每月安全培训教育</div>
+      </div>
+      <div class="mainItem">
+        <div>培训时间</div>
+        <div>2023-05-01 18:33:12</div>
+      </div>
+      <div class="mainItem">
+        <div>签名情况</div>
+        <div class="condition" @click="signatureCondition">10/10</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>
+    </van-dialog>
+  </div>
+</template>
+<script>
+import NavBar from '@/components/NavBar'
+import { Col, Row, Cascader, Dialog, DatetimePicker, Icon, Picker } from 'vant'
+import { deptTreeList, selectListApp, registration } from '@/api/toConsult.js'
+import { Toast } from 'vant'
+export default {
+  data() {
+    return {
+      orgName: '', //机构名称
+      orgId: '', //机构ID
+      show: false, //机构弹框显示隐藏
+      cascaderValue: '',
+      options: [], //机构数组
+      fieldNames: {
+        text: 'name',
+        value: 'id',
+        children: 'children'
+      },
+      typeValue: '', //类型值
+      statusValue: '', //状态值
+      typeStatus: false, //类型显示隐藏
+      showStatus: false, //状态显示隐藏
+      showDate: false, //月份显示隐藏
+      columns: ['待记录', '待签名', '已完成'], //状态数组
+      typeColumns: ['每月安全培训教育', '专项安全培训教育'], //类型数组
+      currentDate: '', //月份值
+      conditionShow: false, //机构弹框显示隐藏
+      show: false, //机构弹框显示隐藏
+      show: false //机构弹框显示隐藏
+    }
+  },
+  components: {
+    NavBar,
+    Dialog,
+    Icon,
+    DatetimePicker,
+    Picker,
+    Col,
+    Row,
+    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.init()
+  },
+  methods: {
+    //清空查询条件
+    clearSearch() {
+      this.str = ''
+      this.cascaderValue = ''
+      this.value1 = ''
+      this.currentDate = ''
+      this.fieldValue = ''
+      this.selectListAppHandler()
+    },
+
+    //初始化
+    init() {
+      //获取组织机构数据
+      deptTreeList().then(res => {
+        let { code, data, msg } = res
+        if (code == 200) {
+          this.options = data
+        }
+      })
+      this.selectListAppHandler()
+    },
+    selectListAppHandler() {
+      //获取任务列表
+      selectListApp({
+        status: this.str || '',
+        orgId: this.cascaderValue || '',
+        moth: this.currentDate || ''
+      }).then(res => {
+        let { code, data, msg } = res
+        if (code == 200) {
+          this.taskList = data
+        }
+      })
+    },
+
+    //关闭弹框事件
+    closeDialog() {
+      this.show = false
+      this.selectListAppHandler()
+    },
+    // 开始调阅事件
+    startMonitorHandler(taskId) {
+      this.taskId = taskId
+      this.showDialog = true
+    },
+    //已调阅事件
+    endMonitorHandler(status, taskId) {
+      // 0待调阅,1调阅中,2已调阅,3已超期
+      //跳转详情
+      if (status <= 1) return
+      this.$router.push('/consultInfo/' + taskId)
+    },
+
+    //级联选择当前任意层级触发
+    changeCascader(val) {
+      console.log(val)
+      let { selectedOptions } = val
+      //级联值
+      this.cascaderValue = selectedOptions[selectedOptions.length - 1].id
+      //输入框值
+      this.value1 = selectedOptions[selectedOptions.length - 1].name
+    },
+    onFinish() {},
+    //搜索选择状态时触发
+    onConfirm(value, index) {
+      this.fieldValue = value
+
+      switch (value) {
+        case '待调阅':
+          this.str = '0'
+
+          break
+        case '调阅中':
+          this.str = '1'
+          break
+
+        case '已调阅':
+          this.str = '2'
+          break
+
+        case '已超期':
+          this.str = '3'
+          break
+      }
+      this.typeStatus = false
+      this.selectListAppHandler()
+    },
+    //月份选中触发
+    onDateConfirm() {
+      this.currentDate = this.newDate(this.currentDate)
+      this.showDate = false
+      this.selectListAppHandler()
+    },
+    //日期转换
+    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 + '-' + m + '-' + d
+    },
+    //查看签名情况
+    signatureCondition() {
+        this.conditionShow=true
+    },
+    //培训登记跳转
+    trainSign(){
+        this.$router.push('/Addtraining/'+'1111')
+    },
+    onChange(picker, value, index) {},
+    onCancel() {
+      this.show = false
+      this.typeStatus = false
+      this.showDate = false
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.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 #ccc;
+
+  .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
+    }
+}
+
+</style>