소스 검색

修改教育统计报表,添加安全检查

凉纪 2 년 전
부모
커밋
9bd4a1c908

+ 2 - 2
src/components/dateCell/index.vue

@@ -1,9 +1,9 @@
 <template>
-  <div class="date-cell van-hairline--bottom" >
+  <div class="date-cell" >
     <van-cell v-if="disabled" :title="title" :label="selected" />
     <van-cell v-else :title="title" is-link :label="selected" @click="clickItem">
       <template #right-icon>
-        <van-icon name="underway-o" class="date-icon"/>
+        <van-icon name="notes-o" class="date-icon"/>
       </template>
     </van-cell>
     <van-popup v-model="showPicker" round  position="bottom" :close-on-popstate="true" get-container="#app">

+ 3 - 6
src/components/orgTree/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="orgTree">
+  <div class="orgTree van-hairline--bottom">
     <tree-select
       @select="onSelect"
       v-model="selected"
@@ -9,9 +9,7 @@
       placeholder="请选择归属机构"
       :normalizer="tenantIdnormalizer"
       :show-count="true"
-      :noChildrenText="''"
-      
-    >
+      :noChildrenText="''">
     </tree-select>
   </div>
 </template>
@@ -68,7 +66,7 @@ export default {
         this.$nextTick(() => {
           this.treeData = res.data
         })
-      
+
       })
     },
     onSelect(value) {
@@ -100,7 +98,6 @@ export default {
     padding: 0 20px;
     border-radius: 0;
     border: none;
-    border-bottom: 1px solid #dcdfe6;
   }
   .vue-treeselect__icon-warning{
     display: none;

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

@@ -164,6 +164,18 @@ export let routers = [
         component: () => import('@/views/menu/securityCheckRegister/index'),
         meta: { title: '安全检查登记', keepAlive: false }
       },
+      {
+        path: '/problemItem',
+        name: 'problemItem',
+        component: () => import('@/views/menu/problemItem/index'),
+        meta: { title: '隐患问题清单', keepAlive: false }
+      },
+      {
+        path: '/problemDetail',
+        name: 'problemDetail',
+        component: () => import('@/views/menu/problemItem/detail'),
+        meta: { title: '隐患问题详情', keepAlive: false }
+      },
     ],
   },
 ]

+ 4 - 4
src/views/menu/educationStatistics/index.vue

@@ -4,8 +4,8 @@
     <div class="statistics-container">
       <org-tree v-model="query.orgId" @change="getDataList"></org-tree>
       <div class="search-flex">
-        <select-cell 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" />
@@ -128,7 +128,8 @@ export default {
 }
 .vue-table-root{
   tr,td,th{
-    font-size: 26px!important;
+    font-size: 25px!important;
+    color:#666!important;
   }
 }
 </style>
@@ -163,7 +164,6 @@ export default {
     justify-content: space-between;
     >div{
       width: 50%;
-      border-right: 1px solid #eaeaea;
     }
   }
 </style>

+ 86 - 0
src/views/menu/problemItem/api.js

@@ -0,0 +1,86 @@
+import request from "@/utils/request";
+//获取列表
+export function dataList(data) {
+  return request({
+    url: "/core/eduTask/report",
+    method: "post",
+    data,
+  });
+}
+//获取计划列表
+export function planList(orgId){
+  return request({
+    url: "/core/plan/planList/"+orgId,
+    method: "get",
+  });
+}
+export const json = {
+  "msg": "操作成功",
+  "code": 200,
+  "data": [
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974731112400,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974794027000,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974794027000,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974794027000,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974794027000,
+      "name": "网点安全员每月培训计划"
+    },
+    {
+      "id": 1698299974794027000,
+      "name": "网点安全员每月培训计划"
+    }
+  ]
+}

+ 15 - 0
src/views/menu/problemItem/detail.vue

@@ -0,0 +1,15 @@
+<template>
+<div>
+  这是详情
+</div>
+</template>
+
+<script>
+export default {
+  name: "detail"
+}
+</script>
+
+<style scoped>
+
+</style>

+ 166 - 0
src/views/menu/problemItem/index.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="problem-item">
+    <NavBar />
+    <div class="page-container">
+      <van-search v-model="query.value" class="van-hairline--bottom" placeholder="请输入搜索关键词" />
+      <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"/>
+      </div>
+      <div class="card-list">
+        <van-empty description="暂无数据" v-if="!dataList || dataList.length === 0" />
+          <template v-else>
+            <van-cell-group  v-for="(v,i) in dataList">
+              <van-cell :title="v.orgName" >
+                <template #extra>
+                  <div class="card-num" v-if="v.finishRate ===''">
+                    {{v.finishRate}}
+                  </div>
+                  <van-button v-else hairline size="mini" type="info" @click="clickItem">信息状态</van-button>
+                </template>
+                <template #label>
+                  <div class="info-box">
+                    <div class="info-item">隐患描述:{{v.shouldFinish}}</div>
+                    <div class="info-item">发现日期:{{v.finish}}</div>
+                  </div>
+                </template>
+              </van-cell>
+            </van-cell-group>
+          </template>
+      </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 {dataList,planList} from './api'
+import {mapGetters} from "vuex";
+import {formatDate} from "@/filters/filter";
+export default {
+  components: {
+    NavBar,
+    OrgTree,
+    dateCell,
+    selectCell
+  },
+  data() {
+    return {
+      query:{
+        value: '',
+        date:null,
+        orgId:null,
+        planId:null,
+      },
+      planList:[],
+      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: "finishRate", key: "d", title: "完成率", align: "center" },
+      ],
+      dataList:[]
+    }
+  },
+  mounted() {
+    this.initData();
+  },
+  computed:{
+    ...mapGetters(['orgId']),
+  },
+  methods: {
+    //初始化数据
+    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();
+      })
+    },
+    //获取数据列表
+    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;
+      })
+    },
+    clickItem(){
+      this.$router.push('/problemDetail');
+    }
+  }
+}
+</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>
+.problem-item{
+
+}
+.app-container{
+
+}
+.card-list{
+  padding: 20px;
+  height: calc(100vh - 420px);
+  overflow:  auto;
+}
+.card-num{
+  display: flex;
+  align-items: center;
+  font-size: 28px;
+  color: #009dff;
+}
+.search-flex{
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  >div{
+    width: 50%;
+  }
+}
+.info-item{
+  height: 50px;
+  line-height: 50px;
+}
+</style>

+ 14 - 2
src/views/menu/securityCheckRegister/index.vue

@@ -3,8 +3,12 @@
     <NavBar />
     <div class="statistics-container">
       <org-tree v-model="query.orgId" @change="getDataList"></org-tree>
-      <select-cell title="教育计划名称" v-model="query.planId" :dataList="planList" :prop="prop" @change="getDataList"/>
-      <date-cell title="统计月份"  v-model="query.date" date-type="year-month" @change="getDataList"/>
+      <org-tree v-model="query.orgId" @change="getDataList"></org-tree>
+      <div class="search-box">
+        <select-cell title="状态" v-model="query.planId" :dataList="planList" :prop="prop" @change="getDataList"/>
+        <select-cell 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" />
         <template v-else>
@@ -122,4 +126,12 @@ export default {
     margin-right: 40px;
   }
 }
+.search-box{
+display: flex;
+  justify-content: space-between;
+  align-items: center;
+  >div{
+    width: 33%;
+  }
+}
 </style>