Explorar o código

Merge branch 'V0.0.2' of http://10.87.10.227:4000/jzyd_yyds/soc_app into V0.0.2

coys %!s(int64=2) %!d(string=hai) anos
pai
achega
677d58ec16

+ 1 - 1
src/components/TopBar.vue

@@ -48,7 +48,7 @@ export default {
 
 <style scoped lang="scss">
 .top-bar{
-  height:300px;
+  height: 300px;
   width: 100%;
   background: url("../assets/img/banner.png") no-repeat center;
   background-size: 100% 100%;

+ 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;

+ 5 - 0
src/main.js

@@ -9,6 +9,10 @@ import Vant from 'vant';
 import 'vant/lib/index.css';
 import router from './router'
 import store from './store'
+// 引入样式
+import "vue-easytable/libs/theme-default/index.css";
+// 引入组件库
+import VueEasytable from "vue-easytable";
 import dayjs from "dayjs";
 import {imgUrl} from "@/utils";
 // 设置 js中可以访问 $cdn
@@ -26,6 +30,7 @@ Vue.config.productionTip = false
 import VCalendar from 'v-calendar';
 import globals from "@/utils/global.js"//全局混入
 Vue.use(Vant);
+Vue.use(VueEasytable);
 Vue.use(globals);
 Vue.use(VCalendar,{
   componentPrefix: 'vc',  // Use <vc-calendar /> instead of <v-calendar />

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

@@ -158,6 +158,24 @@ export let routers = [
         component: () => import('@/views/menu/educationStatistics/index'),
         meta: { title: '教育培训统计报表', keepAlive: false }
       },
+      {
+        path: '/securityCheckRegister',
+        name: 'securityCheckRegister',
+        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 }
+      },
     ],
   },
 ]

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

@@ -24,112 +24,7 @@ export default {
   components:{TopBar},
   data() {
     return {
-      menuList:[
-        {
-          name:'系统管理',
-          list:[
-            {
-              menu:'作息管理',
-              path:'/workTime',
-            },
-            {
-              menu:'NFC管理',
-              path:'/nfc',
-            },
-            {
-              menu:'履职登记',
-              path:'/lvzhi',
-            },
-          ]
-        },
-        {
-          name:'履职',
-          list:[
-            {
-              menu:'监控调阅',
-              path:'/monitoringCall'
-            },
-            {
-              menu:'视频调阅',
-            },
-            {
-              menu:'安全检查登记',
-            },
-            {
-              menu:'教育培训统计报表',
-              path:'/educationStatistics',
-            },
-            {
-              menu:'外包评价',
-            },
-          ]
-        },
-        {
-          name:'设备',
-          list:[
-            {
-              menu:'设备管理',
-            },
-            {
-              menu:'防区状态',
-              path:'/protection'
-            },
-          ]
-        },
-        {
-          name:'来访',
-          list:[
-            {
-              menu:'介绍信管理',
-            },
-            {
-              menu:'出入登记',
-            },
-            {
-              menu:'培训登记',
-              path:'/training'
-            },
-          ]
-        },
-        {
-          name:'演练',
-          list:[
-            {
-              menu:'演练登记',
-              path:'/rehearsalTask'
-            },
-            {
-              menu:'演练排名',
-            },
-            {
-              menu:'安全检查登记',
-            },
-            {
-              menu:'优秀案例管理',
-            },
-            {
-              menu:'优秀案例学习',
-            },
-          ]
-        },
-        {
-          name:'统计',
-          list:[
-            {
-              menu:'驾驶舱',
-            },
-            {
-              menu:'每日网点履职报表',
-            },
-            {
-              menu:'每日布撤防报表',
-            },
-            {
-              menu:'教育统计报表',
-            },
-          ]
-        }
-      ],
+      menuList:[],
     }
   },
   computed: {

+ 62 - 21
src/views/menu/educationStatistics/index.vue

@@ -3,27 +3,38 @@
     <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"/>
+      <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.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>
+        <ve-table
+          v-else
+          maxHeight="calc(100vh - 252px)"
+          fixedHeader
+          borderX
+          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>-->
       </div>
     </div>
   </div>
@@ -56,6 +67,22 @@ export default {
         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:[]
     }
   },
@@ -99,6 +126,12 @@ export default {
 .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{
@@ -109,8 +142,8 @@ export default {
   }
   .card-list{
     padding: 20px;
-    height: calc(100vh - 550px);
-    overflow: auto;
+    height: calc(100vh - 420px);
+    overflow:  hidden;
   }
   .card-num{
     display: flex;
@@ -125,4 +158,12 @@ export default {
       margin-right: 40px;
     }
   }
+  .search-flex{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    >div{
+      width: 50%;
+    }
+  }
 </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>

+ 86 - 0
src/views/menu/securityCheckRegister/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": "网点安全员每月培训计划"
+    }
+  ]
+}

+ 137 - 0
src/views/menu/securityCheckRegister/index.vue

@@ -0,0 +1,137 @@
+<template>
+  <div class="check-register">
+    <NavBar />
+    <div class="statistics-container">
+      <org-tree v-model="query.orgId" @change="getDataList"></org-tree>
+      <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>
+          <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>
+      </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:{
+        date:null,
+        orgId:null,
+        planId:null,
+      },
+      planList:[],
+      prop:{
+        label:'name',
+        value:'id',
+      },
+      loading:false,
+      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;
+      })
+    }
+  }
+}
+</script>
+<style lang="scss">
+.van-cell-group{
+  margin-bottom: 20px;
+}
+.van-cell-group:last-child{
+  margin-bottom: 0;
+}
+</style>
+<style lang="scss" scoped>
+.check-register{
+
+}
+.card-list{
+  padding: 20px;
+  height: calc(100vh - 550px);
+  overflow: auto;
+}
+.card-num{
+  display: flex;
+  align-items: center;
+  font-size: 28px;
+  color: #009dff;
+}
+.flex-box{
+  display: flex;
+  align-items: center;
+  >div{
+    margin-right: 40px;
+  }
+}
+.search-box{
+display: flex;
+  justify-content: space-between;
+  align-items: center;
+  >div{
+    width: 33%;
+  }
+}
+</style>