فهرست منبع

Merge branch 'Inspection' into online

wolyshaw 4 سال پیش
والد
کامیت
c9701cbf71

+ 60 - 29
src/views/main/abnormal/index.vue

@@ -19,34 +19,26 @@
       <el-button native-type="reset" type="danger">重置</el-button>
     </save-form>
     <div class="tags">
-      <el-tag v-for="(item, index) in tags" :key="index">{{item.name}}</el-tag>
+      <el-badge
+        :hidden="listByType[item.type].length === 0"
+        :value="listByType[item.type].length"
+        :max="99"
+        v-for="(item, index) in tags"
+        :key="index"
+      >
+        <el-tag
+          :effect="activeKey === item.type ? 'dark' : 'plain'"
+          @click="activeKey = item.type"
+        >{{item.name}}</el-tag>
+      </el-badge>
     </div>
+    <empty desc="暂无需要处理异常" v-if="!activeList.length"/>
     <title-item
-      type="error"
-      :data="[
-        {
-          name: '老师考勤异常',
-          num: 1
-        },
-        {
-          name: '未签到签退',
-          num: 3
-        }
-      ]"
-    >
-      <el-button type="text">立即处理<i class="el-icon-d-arrow-right"/></el-button>
-    </title-item>
-    <title-item
-      :data="[
-        {
-          name: '老师请假',
-          num: 1
-        },
-        {
-          name: '学生请假',
-          num: 3
-        }
-      ]"
+      v-else
+      :type="item[0].isError ? 'error' : 'warning'"
+      v-for="(item, index) in activeList"
+      :key="index"
+      :data="item.map(title => ({name: title.desc, num: title.num}))"
     >
       <el-button type="text">立即处理<i class="el-icon-d-arrow-right"/></el-button>
     </title-item>
@@ -55,6 +47,7 @@
 <script>
 import { getIndexError } from '@/views/main/api'
 import { createNotification } from '@/helpers/notification'
+import { errorType } from '@/views/main/constant'
 import title from './title'
 export default {
   components: {
@@ -62,22 +55,49 @@ export default {
   },
   data() {
     return {
+      activeKey: '',
       search: {
         organIds: []
       },
+      listByType: {},
       list: [],
     }
   },
   computed: {
     tags() {
-      return this.list.map(item => ({name: item.desc, type: item.errorType}))
-    }
+      const tags = this.list.map(item => ({name: item.desc, type: item.errorType}))
+      if (tags.length && !this.activeKey) {
+        this.activeKey = tags[0].type
+      }
+      return tags
+    },
+    activeList() {
+      const list = this.listByType[this.activeKey] || []
+      return list
+    },
   },
   mounted() {
     this.FetchList()
     this.$store.dispatch('setBranchs')
   },
   methods: {
+    formatData(data) {
+      const list = {}
+      for (const item of data) {
+        const row = errorType[item.errorType] || {}
+        const key = row.parent || item.errorType
+        if (!list[key]) {
+          list[key] = []
+        }
+        list[key].push(
+          {
+            ...item,
+            isError: row.isError
+          }
+        )
+      }
+      return Object.values(list)
+    },
     async FetchList() {
       try {
         const res = await getIndexError({
@@ -85,6 +105,11 @@ export default {
           organIds: this.search.organIds.join(',')
         })
         this.list = res.data.data
+        const data = {}
+        for (const item of this.list) {
+          data[item.errorType] = this.formatData(item?.result || [])
+        }
+        this.listByType = data
       } catch (error) {}
     },
     send() {
@@ -100,5 +125,11 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-
+  .tags{
+    margin-bottom: 20px;
+    >div{
+      margin-right: 20px;
+      cursor: pointer;
+    }
+  }
 </style>

+ 50 - 0
src/views/main/api.js

@@ -17,3 +17,53 @@ export const getIndexError = data => request2({
   params: data,
   method: 'get',
 })
+
+// 获取事项提醒
+export const getRemindMatterData = data => request2({
+  url: '/api-web/getRemindMatterData',
+  params: data,
+  method: 'get',
+})
+
+// 处理乐团主管日程安排
+export const resetInspectionItem = data => request2({
+  url: '/api-web/inspectionItem/update',
+  data: data,
+  method: 'post',
+  requestType:'form'
+})
+
+// 添加巡查任务
+export const inspectionAdd = data => request2({
+  url: '/api-web/inspection/add',
+  data: data,
+  method: 'post',
+})
+
+// 删除巡查任务
+export const inspectionDelete = data => request2({
+  url: '/api-web/inspection/delete',
+  params: data,
+  method: 'post',
+})
+
+// 查看巡查任务详情
+export const inspectionGetInfo = data => request2({
+  url: '/api-web/inspection/getInfo',
+  params: data,
+  method: 'get',
+})
+
+// 巡查任务列表
+export const inspectionQueryPage = data => request2({
+  url: '/api-web/inspection/queryPage',
+  data: data,
+  method: 'get',
+})
+
+// 修改巡查任务
+export const inspectionUpdate = data => request2({
+  url: '/api-web/inspection/update',
+  data: data,
+  method: 'post',
+})

+ 1 - 0
src/views/main/baseinfo/index.vue

@@ -5,6 +5,7 @@
         <el-date-picker
           v-model="search.year"
           type="year"
+          format="yyyy年"
           :picker-options="{
             disabledDate(time) {
               return time.getTime() > Date.now()

+ 61 - 18
src/views/main/constant.js

@@ -1,25 +1,68 @@
 export const descs = {
-  SCHOOL: '当月【开启】状态【合作单位】总数',
-  MUSIC_GROUP_NUM: '当月【进行中】乐团总数',
-  MUSIC_GROUP_STUDENT: '当月乐团【在读】学员总数(去重)',
-  OTHER_STUDENT: '当月VIP、网管课【在读】学员总数(去重)',
-  ACTIVATION_RATE: '本年度截止到当月激活人数总数/本年度截止到当月注册总人数*100%',
-  HOMEWORK_CREATE_RATE: '本年度截止到当月服务指标【实际安排次数】/本年度截止到当月服务指标【预期安排次数】*100%',
-  HOMEWORK_SUBMIT_RATE: '本年度截止到当月服务指标【提交次数】/本年度截止到当月服务指标【实际安排】*100%',
-  HOMEWORK_COMMENT_RATE: '本年度截止到当月服务指标【评价次数】/本年度截止到当月服务指标【提交次数】',
+  SCHOOL: '截止到昨日,【进行中】乐团的【合作单位】总数',
+  MUSIC_GROUP_NUM: '截止到昨日,【进行中】乐团总数',
+  MUSIC_GROUP_STUDENT: '截止到昨日,【进行中】乐团【在读】学员总数,分部下去重',
+  OTHER_STUDENT: '截止到昨日,学员有剩余VIP/网管未上课时的人数总数,分部下去重',
+  ACTIVATION_RATE: '截止到昨日,平台注册学员激活率,平台注册学员设置密码人数/注册学员总数',
+  HOMEWORK_CREATE_RATE: '本月截止到昨日,服务指标的作业布置率',
+  HOMEWORK_SUBMIT_RATE: '本月截止到昨日,已布置的作业学员提交率',
+  HOMEWORK_COMMENT_RATE: '本月截止到昨日,学员已提交的作业老师点评率',
   SHOULD_INCOME_MONEY: '本年度截止到当月所有缴费项目应收金额总和',
   ANTICIPATED_INCOME_MONEY: '本年度截止到当月已缴费但实际还未产生费用金额总和',
   SHOULD_EXPEND_MONEY: '本年度截止到当月预计支出费用总和(暂无此数据)',
   ANTICIPATED_EXPEND_MONEY: '本年度截止到当月应付金额总和(暂无此数据)',
   REVENUE_MONEY: '本年度截止到当月营收金额总和',
-  TEACHER_NUM: '当月【非冻结】状态老师总数',
-  FULL_TIME_NUM: '当月【非冻结】且【工作类型】为【全职】总数',
-  PART_TIME_NUM: '当月【非冻结】且【工作类型】为【兼职】总数',
-  DIMISSION_NUM: '本年度截止到当月【离职】+【冻结】总人数',
-  NEWLY_STUDENT_NUM: '本年度截止到当月新增【乐团】学员总数',
-  QUIT_MUSIC_GROUP_STUDENT_NUM: '本年度截止到当月【退团】学员总数',
-  STUDENT_CONVERSION: '本年度新增【乐团】学员中,购买VIP、网管课人数(去重)/本年度截止到当月新增【乐团】学员总数',
-  MUSIC_GROUP_COURSE: '本年度截止到当月乐团课【已完成】+【未开始】总数',
-  VIP_GROUP_COURSE: '本年度截止到当月VIP课【已完成】+【未开始】总数',
-  PRACTICE_GROUP_COURSE: '本年度截止到当月网管课【已完成】+【未开始】总数',
+  TEACHER_NUM: '截止到昨日【非冻结】且未设置【离职时间】的老师总数',
+  FULL_TIME_NUM: '截止到昨日【非冻结】且未设置【离职时间】,工作类型为【全职】的老师总数',
+  PART_TIME_NUM: '截止到昨日【非冻结】且未设置【离职时间】,工作类型为【兼职】的老师总数',
+  DIMISSION_NUM: '截止到昨日【冻结】或以设置【离职时间】的老师总数',
+  NEWLY_STUDENT_NUM: '本年度截止到昨日,新增的乐团【在读】学员总数(去重)',
+  QUIT_MUSIC_GROUP_STUDENT_NUM: '本年度截止到昨日,乐团退团学员总数(去重)',
+  STUDENT_CONVERSION: '度截止到昨日,乐团预报名学员中正式报名缴费的学员购买VIP/网管课的转化率(不包括退团学员)',
+  MUSIC_GROUP_COURSE: '截止到昨日,【已结束】乐团课程总数',
+  VIP_GROUP_COURSE: '截止到昨日,【已结束】VIP课程总数',
+  PRACTICE_GROUP_COURSE: '截止到昨日,【已结束】网管课程总数',
+}
+
+export const errorType = {
+  MUSIC_PATROL_ITEM: {
+    isError: false,
+  },
+  HIGH_CLASS_STUDENT_LESS_THAN_THREE: {
+    isError: true,
+  },
+  STUDENT_NOT_PAYMENT: {
+    isError: true,
+  },
+  STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP: {
+    isError: true
+  },
+  WAIT_CREATE_PAYMENT_CALENDER: {
+    isError: true
+  },
+  COURSE_TRUANT_STUDENT_NUM: {
+    isError: true
+  },
+  COURSE_LEAVE_STUDENT_NUM: {
+    isError: true,
+    parent: 'COURSE_TRUANT_STUDENT_NUM'
+  },
+  TEACHER_EXCEPTION_ATTENDANCE: {
+    isError: true
+  },
+  TEACHER_NOT_A_CLASS: {
+    isError: true,
+    parent: 'TEACHER_EXCEPTION_ATTENDANCE'
+  },
+  TEACHER_LEAVE: {
+    isError: false
+  },
+  TEACHER_EXPECT_SALARY_BE_LOW: {
+    isError: false
+  },
+}
+
+export const matterTypes = {
+  INSPECT: '下校巡查',
+  VISIT: '学员回访',
 }

+ 14 - 9
src/views/main/index.vue

@@ -5,34 +5,39 @@
     </h2>
     <div class="m-core">
       <tab-router>
-        <el-tab-pane lazy label="基本信息" name="baseinfo">
+        <el-tab-pane v-permission="'newIndex'" lazy label="基本信息" name="baseinfo">
           <baseinfo/>
         </el-tab-pane>
-        <el-tab-pane lazy label="异常处理" name="abnormal">
+        <!-- <el-tab-pane lazy label="异常处理" name="abnormal">
           <abnormal/>
         </el-tab-pane>
+        <el-tab-pane lazy label="事项提醒" name="reminders">
+          <reminders/>
+        </el-tab-pane>
         <el-tab-pane lazy label="【乐团主管】日程安排" name="teamSchedule">
           <teamSchedule />
         </el-tab-pane>
         <el-tab-pane lazy label="【分部经理】日程安排" name="ScheduleBranch">
           <ScheduleBranch/>
-        </el-tab-pane>
+        </el-tab-pane> -->
       </tab-router>
     </div>
   </div>
 </template>
 <script>
 import baseinfo from './baseinfo'
-import abnormal from './abnormal'
-import teamSchedule from './teamSchedule'
-import ScheduleBranch from './schedule-branch'
+// import abnormal from './abnormal'
+// import teamSchedule from './teamSchedule'
+// import ScheduleBranch from './schedule-branch'
+// import reminders from './reminders'
 export default {
   name: 'Main',
   components: {
     baseinfo,
-    abnormal,
-    teamSchedule,
-    ScheduleBranch,
+    // abnormal,
+    // teamSchedule,
+    // ScheduleBranch,
+    // reminders,
   },
 }
 </script>

+ 65 - 0
src/views/main/reminders/index.vue

@@ -0,0 +1,65 @@
+<template>
+  <div>
+    <save-form inline :model="search" @submit="FetchList" @reset="FetchList">
+      <el-form-item prop="organIds">
+        <el-select
+          multiple
+          clearable
+          filterable
+          collapse-tags
+          v-model="search.organIds"
+        >
+          <el-option v-for="(item,index) in selects.branchs"
+            :key="index"
+            :label="item.name"
+            :value="item.id"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-button native-type="submit" type="primary">搜索</el-button>
+      <el-button native-type="reset" type="danger">重置</el-button>
+    </save-form>
+    <empty desc="暂无需要处理异常" v-if="!list.length"/>
+    <title-item
+      v-else
+      type="warning"
+      v-for="(item, index) in list"
+      :key="index"
+      :data="[{name: item.desc, num: item.num}]"
+    >
+      <el-button @click="$router.push({
+        path: '/business/teamDetail',
+        query: {
+          search: (item.result || []).join(',')
+        }
+      })" type="text">立即处理<i class="el-icon-d-arrow-right"/></el-button>
+    </title-item>
+  </div>
+</template>
+<script>
+import { getRemindMatterData } from '@/views/main/api'
+import title from '../abnormal/title'
+export default {
+  components: {
+    'title-item': title
+  },
+  data() {
+    return {
+      search: {
+        organIds: []
+      },
+      list: [],
+    }
+  },
+  mounted() {
+    this.FetchList()
+  },
+  methods: {
+    async FetchList() {
+      try {
+        const res = await getRemindMatterData()
+        this.list = res.data
+      } catch (error) {}
+    }
+  }
+}
+</script>

+ 91 - 12
src/views/main/schedule-branch/index.vue

@@ -48,59 +48,111 @@
     >
       <el-table-column
         label="分部"
-        prop="分部"
+        prop="organName"
       ></el-table-column>
       <el-table-column
         label="工作周期"
-        prop="工作周期"
-      ></el-table-column>
+        prop="month"
+      >
+        <span slot-scope="scope">{{$helpers.dayjs(scope.row.month).format('YYYY-MM')}}</span>
+      </el-table-column>
       <el-table-column
         label="乐团主管"
-        prop="乐团主管"
+        prop="userName"
       ></el-table-column>
       <el-table-column
         label="任务事项数量"
-        prop="任务事项数量"
+        prop="itemNum"
       ></el-table-column>
       <el-table-column
         label="任务总次数"
-        prop="任务总次数"
+        prop="times"
       ></el-table-column>
       <el-table-column
         label="操作"
         prop="操作"
       >
         <template slot-scope="scope">
-          <el-button type="text">查看</el-button>
-          <el-button type="text">修改任务</el-button>
-          <el-button type="text">删除</el-button>
+          <el-button type="text" @click="view(scope.row)">查看</el-button>
+          <el-button type="text" @click="edit(scope.row)">修改任务</el-button>
+          <el-button type="text" @click="remove(scope.row.id)">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
+    <pagination :total.sync="rules.total"
+      :page.sync="rules.page"
+      :limit.sync="rules.limit"
+      :page-sizes="rules.page_size"
+      @pagination="FetchList"
+    />
     <el-dialog
       :visible.sync="visible"
       title="创建任务"
       width="800px"
     >
-      <create/>
+      <create
+        v-if="visible"
+        @close="visible = false"
+        @submited="FetchList"
+      />
+    </el-dialog>
+    <el-dialog
+      :visible.sync="editVisible"
+      title="修改任务"
+      width="800px"
+    >
+      <create
+        v-if="editVisible && detail"
+        :id="detail.id"
+        @close="editVisible = false"
+        @submited="FetchList"
+      />
+    </el-dialog>
+    <el-dialog
+      :visible.sync="viewVisible"
+      title="查看任务"
+      width="800px"
+    >
+      <view-detail
+        v-if="viewVisible && detail"
+        :id="detail.id"
+        @close="viewVisible = false"
+        @submited="FetchList"
+      />
     </el-dialog>
   </div>
 </template>
 <script>
+import pagination from "@/components/Pagination/index";
+import { inspectionQueryPage, inspectionDelete } from '@/views/main/api'
 import create from './modals/create'
+import view from './modals/view'
+import View from './modals/view.vue';
 const initSearch = {
   organIds: [],
   month: '',
 }
 export default {
   components: {
-    create
+    create,
+    'view-detail': view,
+    pagination,
   },
   data() {
     return {
       search: {...initSearch},
       list: [],
       visible: false,
+      viewVisible: false,
+      editVisible: false,
+      detail: null,
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      },
     }
   },
   mounted() {
@@ -113,12 +165,39 @@ export default {
       this.FetchList()
     },
     reset() {
+      this.rules.page = 1
       this.search = {...initSearch}
       this.FetchList()
     },
+    view(row) {
+      this.viewVisible = true
+      this.detail = row
+    },
+    edit(row) {
+      this.editVisible = true
+      this.detail = row
+    },
+    async remove(id) {
+      try {
+        await this.$confirm('是否确认删除此条数据?', '提示', {
+          type: 'warning'
+        })
+        await inspectionDelete({
+          id
+        })
+        this.$message.success('删除成功')
+        this.FetchList()
+      } catch (error) {}
+    },
     async FetchList() {
       try {
-
+        const res = await inspectionQueryPage({
+          ...this.search,
+          page: this.rules.page,
+          rows: this.rules.limit,
+        })
+        this.list = res.data.rows
+        this.rules.total = res.data.total
       } catch (error) {}
     }
   }

+ 86 - 30
src/views/main/schedule-branch/modals/create.vue

@@ -39,57 +39,48 @@
         <el-col :span="6">
           <el-form-item
             label="乐团主管"
-            :prop="`group.${groupIndex}.zhuguan`"
+            :prop="`group.${groupIndex}.userId`"
             :rules="[{required: true, message: '请选择乐团主管'}]"
           >
             <el-select
               clearable
               filterable
-              v-model="groupItem.zhuguan"
-              placeholder="请选择分部"
+              v-model="groupItem.userId"
+              placeholder="请选择乐团主管"
             >
-              <el-option v-for="(item,index) in selects.branchs"
+              <el-option v-for="(item,index) in technicians"
                 :key="index"
-                :label="item.name"
-                :value="item.id"></el-option>
+                :label="item.realName"
+                :value="item.userId"></el-option>
             </el-select>
           </el-form-item>
         </el-col>
         <template v-for="(matterItem, matterIndex) in groupItem.matter">
           <el-col :offset="matterIndex === 0 ? 0 : 6" :span="6" :key="groupIndex + '-' + matterIndex">
+            {{groupIndex + '-' + matterIndex}}
             <el-form-item
               :label="'任务事项' + (matterIndex + 1)"
-              :prop="`group.${groupIndex}.matter.${matterIndex}.type`"
+              :prop="`group.${groupIndex}.matter.${matterIndex}.item`"
             >
               <el-select
                 clearable
                 filterable
-                v-model="matterItem.type"
+                v-model="matterItem.item"
                 placeholder="请选择任务事项"
               >
-                <el-option v-for="(item,index) in selects.branchs"
+                <el-option v-for="(item,index) in matterTypesOptions"
                   :key="index"
-                  :label="item.name"
-                  :value="item.id"></el-option>
+                  :label="item.label"
+                  :value="item.value"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="6" :key="groupIndex + '-' + matterIndex">
             <el-form-item
               :label="'任务次数' + (matterIndex + 1)"
-              :prop="`group.${groupIndex}.matter.${matterIndex}.num`"
+              :prop="`group.${groupIndex}.matter.${matterIndex}.times`"
             >
-              <el-select
-                clearable
-                filterable
-                v-model="matterItem.num"
-                placeholder="请输入次数"
-              >
-                <el-option v-for="(item,index) in selects.branchs"
-                  :key="index"
-                  :label="item.name"
-                  :value="item.id"></el-option>
-              </el-select>
+              <el-input clearable v-model="matterItem.times" placeholder="请输入次数" />
             </el-form-item>
           </el-col>
           <el-col :span="6" :key="groupIndex + '-' + matterIndex">
@@ -113,7 +104,7 @@
                   ></el-button>
                 </el-tooltip>
               </span>
-              <el-tooltip content="删除乐团主管" placement="top" :open-delay=".5">
+              <el-tooltip  v-if="isCreate" content="删除乐团主管" placement="top" :open-delay=".5">
                 <el-button
                   icon="el-icon-delete"
                   circle
@@ -128,7 +119,7 @@
           </el-col>
         </template>
       </el-row>
-      <el-button @click="createGroup" plain block style="width: 100%">添加乐团主管</el-button>
+      <el-button v-if="isCreate" @click="createGroup" plain block style="width: 100%">添加乐团主管</el-button>
     </el-form>
     <div slot="footer" style="text-align: right;margin-top: 20px;">
       <el-button>取消</el-button>
@@ -137,26 +128,72 @@
   </div>
 </template>
 <script>
+import { findTechnician } from '@/api/repairManager'
+import { matterTypes } from '@/views/main/constant'
+import { objectToOptions } from '@/utils'
+import { createRandom } from '@/helpers/uuidv4'
+import { inspectionAdd, inspectionGetInfo, inspectionUpdate } from '@/views/main/api'
 const emptyMatter = {
-  name: '',
-  num: ''
+  item: '',
+  times: ''
 }
 export default {
+  props: ['id'],
   data() {
     return {
       form: {
         organId: '',
         group: [{
-          person: '',
+          _uuid: createRandom(),
+          userId: '',
           matter: [{...emptyMatter}]
         }]
+      },
+      technicians: []
+    }
+  },
+  computed: {
+    matterTypesOptions() {
+      return objectToOptions(matterTypes)
+    },
+    isCreate() {
+      return !this.id
+    },
+  },
+  watch: {
+    async 'form.organId'() {
+      if (this.form.organId) {
+        try {
+          const res = await findTechnician({
+            organId: this.form.organId
+          })
+          this.technicians = res.data
+          this.$set(this.form, 'group', group.map(item => ({...item, userId: ''})))
+        } catch (error) {}
       }
     }
   },
+  async mounted() {
+    try {
+      const res = await inspectionGetInfo({
+        id: this.id
+      })
+      this.form = {
+        ...this.form,
+        organId: res.data.organId,
+        month: res.data.month,
+        group: [{
+          _uuid: createRandom(),
+          userId: res.data.userId,
+          matter: res.data.inspectionItems.map(item => ({item: item.item, times: item.times}))
+        }]
+      }
+    } catch (error) {}
+  },
   methods: {
     createGroup() {
       this.form.group.push({
-        person: '',
+        userId: '',
         matter: [{...emptyMatter}]
       })
     },
@@ -178,7 +215,26 @@ export default {
       try {
         this.$refs.form.validate(async valid => {
           if (valid) {
-            console.log(this.form)
+            const data = this.form.group.map(item => ({
+              organId: this.form.organId,
+              month: this.form.month,
+              userId: item.userId,
+              inspectionItems: item.matter.map(m => ({
+                ...m,
+                organId: this.form.organId,
+                month: this.form.month,
+              }))
+            }))
+            if (this.isCreate) {
+              await inspectionAdd(data)
+              this.$message.success('创建成功')
+            } else {
+              await inspectionUpdate({
+                ...data[0],
+                id: this.id,
+              })
+              this.$message.success('修改成功')
+            }
             this.$emit('close')
             this.$emit('submited')
           }

+ 60 - 0
src/views/main/schedule-branch/modals/view.vue

@@ -0,0 +1,60 @@
+<template>
+  <div>
+    <descriptions :column="3">
+      <descriptions-item label="分部">{{detail.organName}}</descriptions-item>
+      <descriptions-item label="工作周期">{{$helpers.dayjs(detail.month).format('YYYY-MM')}}</descriptions-item>
+      <descriptions-item label="乐团主管">{{detail.userName}}</descriptions-item>
+      <descriptions-item label="处理意见">{{detail.memo}}</descriptions-item>
+    </descriptions>
+    <el-table
+      :data="detail.inspectionItems || []"
+      style="width: 100%;margin-top: 20px;"
+      max-height="500px"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+    >
+      <el-table-column
+        label="任务事项"
+        prop="item"
+      >
+        <template slot-scope="scope">{{matterTypes[scope.row.item]}}</template>
+      </el-table-column>
+      <el-table-column
+        label="任务次数"
+        prop="times"
+      />
+      <el-table-column
+        label="实际安排"
+        prop="plannedTimes"
+      />
+    </el-table>
+    <div slot="footer" style="text-align: right;margin-top: 20px;">
+      <el-button type="primary" @click="$emit('close')">确认</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { inspectionGetInfo } from '@/views/main/api'
+import { matterTypes } from '@/views/main/constant'
+export default {
+  props: ['id'],
+  data() {
+    return {
+      matterTypes,
+      detail: {},
+    }
+  },
+  mounted() {
+    this.FetchDetail()
+  },
+  methods: {
+    async FetchDetail() {
+      try {
+        const res = await inspectionGetInfo({
+          id: this.id
+        })
+        this.detail = res.data
+      } catch (error) {}
+    }
+  }
+}
+</script>

+ 18 - 5
src/views/main/teamSchedule/index.vue

@@ -99,15 +99,15 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column align="center" prop="memo" label="处理意见">
+      <el-table-column align="center" prop="memo" label="处理意见" width="220">
         <template slot-scope="scope">
-          <overflow-text :text="scope.row.linkUrl"></overflow-text>
+          <overflow-text :text="scope.row.memo"></overflow-text>
         </template>
       </el-table-column>
       <el-table-column align="center" prop="studentId" label="操作">
         <template slot-scope="scope">
           <div>
-            <el-button type="text">安排日程</el-button>
+            <el-button type="text"  @click="gotoHander(scope.row)">安排日程</el-button>
             <auth :auths="['inspectionItem/update']">
               <el-button
                 type="text"
@@ -147,7 +147,7 @@
   </div>
 </template>
 <script>
-import { getInspectionItem } from "../api";
+import { getInspectionItem, resetInspectionItem } from "../api";
 import { permission } from "@/utils/directivePage";
 import pagination from "@/components/Pagination/index";
 export default {
@@ -206,7 +206,20 @@ export default {
       this.handleForm = { id, memo };
       this.handleVisible = true;
     },
-    submitHandle() {},
+    async submitHandle() {
+      console.log(this.handleForm);
+      try {
+        const res = await resetInspectionItem(this.handleForm);
+        this.$message.success('提交成功')
+        this.getList()
+        console.log(res);
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    gotoHander(row){
+
+    }
   },
 };
 </script>

+ 1 - 1
src/views/teamDetail/teamCourseList.vue

@@ -271,7 +271,7 @@
               <div>
                 <el-button type="text"
                   @click="removeCourse(scope.row)"
-                  v-permission="'courseSchedule/batchDelete'">删除</el-button>
+                  v-permission="'courseSchedule/batchDelete?page=teamCourseList'">删除</el-button>
                 <el-button type="text"
                            v-if="permission('teamCourseList/details')"
                            @click="lookDetail(scope.row)">详情</el-button>

+ 10 - 0
src/views/teamDetail/teamList.vue

@@ -337,6 +337,7 @@ export default {
     closeStudens
   },
   mounted () {
+    this.$set(this.topForm, 'teamName', this.$route.query.search)
     this.init();
   },
   activated () {
@@ -368,6 +369,15 @@ export default {
     reset () {
       this.rules.page = 1;
       this.$refs['topForm'].resetFields();
+      if (this.$route.query.search) {
+        this.$router.replace({
+          path: this.$route.path,
+          query: {
+            ...this.$route.query,
+            search: undefined
+          }
+        })
+      }
       this.getList()
     },
     search () {