瀏覽代碼

Merge branch 'Inspection' of http://git.dayaedu.com/molingzhide/dy-admin-manager into Inspection

mo 4 年之前
父節點
當前提交
d68596a1b0

+ 6 - 4
src/api/teamServer.js

@@ -1,12 +1,14 @@
 import request from '@/utils/request'
+import request2 from '@/utils/request2'
 // import qs from 'qs'
 let api = '/api-web'
 // 获取分部
 export function getTeamList (data) {
-  return request({
+  return request2({
     url: api + '/musicGroup/queryPage',
-    method: 'get',
-    params: data
+    method: 'post',
+    data: data,
+    requestType: 'form'
   })
 }
 
@@ -17,4 +19,4 @@ export function getPayType (data) {
     method: 'get',
     params: data
   })
-}
+}

+ 9 - 2
src/views/main/abnormal/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="container">
-    <save-form inline :model="search" @submit="FetchList" @reset="FetchList" saveKey="/main/main/abnormal">
+    <save-form inline :model="search" @submit="FetchList" @reset="reset" saveKey="/main/main/abnormal">
       <el-form-item prop="organId">
         <el-select
           clearable
@@ -83,6 +83,9 @@ import { getIndexError } from '@/views/main/api'
 import { createNotification } from '@/helpers/notification'
 import { errorType } from '@/views/main/constant'
 import title from './title'
+const initSearch = {
+  organId: null
+}
 export default {
   components: {
     'title-item': title
@@ -90,7 +93,7 @@ export default {
   data() {
     return {
       search: {
-        organId: null
+        ...initSearch
       },
       listByType: {},
       list: [],
@@ -159,6 +162,10 @@ export default {
         this.listByType = data
       } catch (error) {}
     },
+    reset() {
+      this.search = {...initSearch}
+      this.FetchList()
+    },
     send() {
       createNotification({
         title: '测试发送通知',

+ 20 - 5
src/views/main/baseinfo/business.vue

@@ -13,11 +13,18 @@
         </span>
       </statistic-item>
     </statistic>
-    <ve-histogram style="width: 100%;" height="350px" :data="chartData" :data-empty="dataEmpty"></ve-histogram>
+    <ve-histogram
+      style="width: 100%;"
+      height="350px"
+      :data="chartData"
+      :data-empty="dataEmpty"
+      :data-zoom="dataZoom"
+    ></ve-histogram>
   </el-card>
 </template>
 <script>
 import 'v-charts/lib/style.css'
+import 'echarts/lib/component/dataZoom'
 import countTo from 'vue-count-to'
 import veHistogram from 'v-charts/lib/histogram.common'
 export default {
@@ -35,23 +42,31 @@ export default {
         HOMEWORK_COMMENT_RATE: this.data['HOMEWORK_COMMENT_RATE'] || {},
       }
     },
+    dataZoom() {
+      return [
+        {
+          type: 'slider',
+          start: 60,
+          end: 100
+        }
+      ]
+    },
     chartData() {
-      const data = this.data[this.active] || {}
       const values = Object.values(this.items)
       const months = {}
       for (const item of values) {
         for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).month() + 1 + '月'
+          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
           if (!months[key]) {
             months[key] = {
-              '月份': key,
+              '日期': key,
             }
           }
           months[key][item.title] = row.percent
         }
       }
       return {
-        columns: ['月份', ...values.map(item => item.title)],
+        columns: ['日期', ...values.map(item => item.title)],
         rows: Object.values(months)
       }
     },

+ 20 - 6
src/views/main/baseinfo/curriculum.vue

@@ -14,11 +14,17 @@
       </statistic-item>
     </statistic>
     <ve-line :settings="{
-      area: true,
-    }" :data="chartData" height="350px" :data-empty="dataEmpty"/>
+        area: true,
+      }"
+      :data="chartData"
+      height="350px"
+      :data-empty="dataEmpty"
+      :data-zoom="dataZoom"
+    />
   </el-card>
 </template>
 <script>
+import 'echarts/lib/component/dataZoom'
 import countTo from 'vue-count-to'
 import veLine from 'v-charts/lib/line.common'
 export default {
@@ -35,23 +41,31 @@ export default {
         PRACTICE_GROUP_COURSE: this.data['PRACTICE_GROUP_COURSE'] || {},
       }
     },
+    dataZoom() {
+      return [
+        {
+          type: 'slider',
+          start: 50,
+          end: 100
+        }
+      ]
+    },
     chartData() {
-      const data = this.data[this.active] || {}
       const values = Object.values(this.items)
       const months = {}
       for (const item of values) {
         for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).month() + 1 + '月'
+          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
           if (!months[key]) {
             months[key] = {
-              '月份': key,
+              '日期': key,
             }
           }
           months[key][item.title] = row.percent
         }
       }
       return {
-        columns: ['月份', ...values.map(item => item.title)],
+        columns: ['日期', ...values.map(item => item.title)],
         rows: Object.values(months)
       }
     },

+ 20 - 5
src/views/main/baseinfo/hr.vue

@@ -13,10 +13,17 @@
         </span>
       </statistic-item>
     </statistic>
-    <ve-histogram style="width: 100%;" height="350px" :data="chartData" :data-empty="dataEmpty"></ve-histogram>
+    <ve-histogram
+      style="width: 100%;"
+      height="350px"
+      :data="chartData"
+      :data-empty="dataEmpty"
+      :data-zoom="dataZoom"
+    ></ve-histogram>
   </el-card>
 </template>
 <script>
+import 'echarts/lib/component/dataZoom'
 import countTo from 'vue-count-to'
 import veHistogram from 'v-charts/lib/histogram.common'
 export default {
@@ -34,23 +41,31 @@ export default {
         DIMISSION_NUM: this.data['DIMISSION_NUM'] || {},
       }
     },
+    dataZoom() {
+      return [
+        {
+          type: 'slider',
+          start: 60,
+          end: 100
+        }
+      ]
+    },
     chartData() {
-      const data = this.data[this.active] || {}
       const values = Object.values(this.items)
       const months = {}
       for (const item of values) {
         for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).month() + 1 + '月'
+          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
           if (!months[key]) {
             months[key] = {
-              '月份': key,
+              '日期': key,
             }
           }
           months[key][item.title] = row.percent
         }
       }
       return {
-        columns: ['月份', ...values.map(item => item.title)],
+        columns: ['日期', ...values.map(item => item.title)],
         rows: Object.values(months)
       }
     },

+ 53 - 16
src/views/main/baseinfo/index.vue

@@ -3,15 +3,14 @@
     <save-form inline :model="search" @submit="FetchDetail" @reset="reset" saveKey="/main/main/baseInfo">
       <el-form-item prop="year">
         <el-date-picker
-          v-model="search.year"
-          type="year"
-          format="yyyy年"
-          :picker-options="{
-            disabledDate(time) {
-              return time.getTime() > Date.now()
-            }
-          }"
-          placeholder="请选择年份">
+          v-model="search.dates"
+          type="daterange"
+          align="right"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
         </el-date-picker>
       </el-form-item>
       <el-form-item prop="organId">
@@ -41,9 +40,9 @@
       <el-col :xs="24" :sm="24" :md="12">
         <business :data="dataInfo"/>
       </el-col>
-      <!-- <el-col :xs="24" :sm="24" :md="24" :xl="10">
+      <el-col :xs="24" :sm="24" :md="24" :xl="12">
         <management :data="dataInfo"/>
-      </el-col> -->
+      </el-col>
       <el-col :xs="24" :sm="24" :md="12">
         <hrdata :data="dataInfo"/>
       </el-col>
@@ -64,9 +63,15 @@ import management from './management'
 import hrdata from './hr'
 import student from './student'
 import curriculum from './curriculum'
-
+import { getTimes } from '@/utils'
 import { descs } from '../constant'
 
+const getInitDate = () => {
+  const end = new Date();
+  const start = new Date();
+  start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+  return [start, end]
+}
 export default {
   components: {
     operate,
@@ -78,8 +83,39 @@ export default {
   },
   data () {
     return {
+      pickerOptions: {
+        disabledDate: a => {
+          const { dayjs } = this.$helpers
+          return dayjs(a).isAfter(dayjs())
+        },
+        shortcuts: [{
+          text: '最近一周',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      },
       search: {
-        year: '',
+        dates: [],
         organId: null
       },
       dataInfo: {},
@@ -97,16 +133,17 @@ export default {
   },
   methods: {
     reset() {
-      this.$set(this.search, 'year', this.$helpers.dayjs())
+      this.$set(this.search, 'dates', getInitDate())
       this.$set(this.search, 'organId', null)
       this.FetchDetail()
     },
     async FetchDetail() {
       const data = {}
       try {
+        const {dates, ...rest} = this.search
         const res = await getIndex({
-          ...this.search,
-          year: this.$helpers.dayjs(this.search.year).year() || '',
+          ...rest,
+          ...getTimes(dates, ['startDate', 'endDate'])
         })
         for (const item of res.data) {
           data[item.dataType] = {

+ 23 - 11
src/views/main/baseinfo/management.vue

@@ -14,11 +14,17 @@
       </statistic-item>
     </statistic>
     <ve-line :settings="{
-      area: true,
-    }" :data="chartData" height="350px" :data-empty="dataEmpty"/>
+        area: true,
+      }"
+      :data="chartData"
+      height="350px"
+      :data-empty="dataEmpty"
+      :data-zoom="dataZoom"
+    />
   </el-card>
 </template>
 <script>
+import 'echarts/lib/component/dataZoom'
 import countTo from 'vue-count-to'
 import veLine from 'v-charts/lib/line.common'
 export default {
@@ -30,30 +36,36 @@ export default {
   computed: {
     items() {
       return {
-        SHOULD_INCOME_MONEY: this.data['SHOULD_INCOME_MONEY'] || {},
-        ANTICIPATED_INCOME_MONEY: this.data['ANTICIPATED_INCOME_MONEY'] || {},
-        SHOULD_EXPEND_MONEY: this.data['SHOULD_EXPEND_MONEY'] || {},
-        ANTICIPATED_EXPEND_MONEY: this.data['ANTICIPATED_EXPEND_MONEY'] || {},
-        REVENUE_MONEY: this.data['REVENUE_MONEY'] || {},
+        FINANCE_PAY: this.data['FINANCE_PAY'] || {},
+        FINANCE_BALANCE_AMOUNT: this.data['FINANCE_BALANCE_AMOUNT'] || {},
+        FINANCE_AMOUNT: this.data['FINANCE_AMOUNT'] || {},
       }
     },
+    dataZoom() {
+      return [
+        {
+          type: 'slider',
+          start: 50,
+          end: 100
+        }
+      ]
+    },
     chartData() {
-      const data = this.data[this.active] || {}
       const values = Object.values(this.items)
       const months = {}
       for (const item of values) {
         for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).month() + 1 + '月'
+          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
           if (!months[key]) {
             months[key] = {
-              '月份': key,
+              '日期': key,
             }
           }
           months[key][item.title] = row.percent
         }
       }
       return {
-        columns: ['月份', ...values.map(item => item.title)],
+        columns: ['日期', ...values.map(item => item.title)],
         rows: Object.values(months)
       }
     },

+ 20 - 5
src/views/main/baseinfo/operate.vue

@@ -13,10 +13,17 @@
         </span>
       </statistic-item>
     </statistic>
-    <ve-histogram style="width: 100%;" height="350px" :data="chartData" :data-empty="dataEmpty"></ve-histogram>
+    <ve-histogram
+      style="width: 100%;"
+      height="350px"
+      :data="chartData"
+      :data-empty="dataEmpty"
+      :data-zoom="dataZoom"
+    ></ve-histogram>
   </el-card>
 </template>
 <script>
+import 'echarts/lib/component/dataZoom'
 import countTo from 'vue-count-to'
 import veHistogram from 'v-charts/lib/histogram.common'
 export default {
@@ -34,23 +41,31 @@ export default {
         OTHER_STUDENT: this.data['OTHER_STUDENT'] || {},
       }
     },
+    dataZoom() {
+      return [
+        {
+          type: 'slider',
+          start: 60,
+          end: 100
+        }
+      ]
+    },
     chartData() {
-      const data = this.data[this.active] || {}
       const values = Object.values(this.items)
       const months = {}
       for (const item of values) {
         for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).month() + 1 + '月'
+          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
           if (!months[key]) {
             months[key] = {
-              '月份': key,
+              '日期': key,
             }
           }
           months[key][item.title] = row.percent
         }
       }
       return {
-        columns: ['月份', ...values.map(item => item.title)],
+        columns: ['日期', ...values.map(item => item.title)],
         rows: Object.values(months)
       }
     },

+ 21 - 6
src/views/main/baseinfo/student.vue

@@ -21,7 +21,14 @@
         </span>
       </statistic-item>
     </statistic>
-    <ve-histogram v-if="isHistogram" style="width: 100%;" height="350px" :data="chartData" :data-empty="dataEmpty"></ve-histogram>
+    <ve-histogram
+      style="width: 100%;"
+      height="350px"
+      :data="chartData"
+      :data-empty="dataEmpty"
+      :data-zoom="dataZoom"
+       v-if="isHistogram"
+    ></ve-histogram>
     <ve-funnel v-else style="width: 100%;" height="350px" :data="funnelData" :data-empty="dataEmpty"></ve-funnel>
   </el-card>
 </template>
@@ -44,23 +51,31 @@ export default {
         STUDENT_CONVERSION: this.data['STUDENT_CONVERSION'] || {},
       }
     },
+    dataZoom() {
+      return [
+        {
+          type: 'slider',
+          start: 60,
+          end: 100
+        }
+      ]
+    },
     chartData() {
-      const data = this.data[this.active] || {}
-      const values = Object.values(this.items).filter(item => item.dataType !== 'STUDENT_CONVERSION')
+      const values = Object.values(this.items)
       const months = {}
       for (const item of values) {
         for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).month() + 1 + '月'
+          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
           if (!months[key]) {
             months[key] = {
-              '月份': key,
+              '日期': key,
             }
           }
           months[key][item.title] = row.percent
         }
       }
       return {
-        columns: ['月份', ...values.map(item => item.title)],
+        columns: ['日期', ...values.map(item => item.title)],
         rows: Object.values(months)
       }
     },

+ 11 - 3
src/views/main/reminders/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="container">
-    <save-form inline :model="search" @submit="FetchList" @reset="FetchList" saveKey="/main/main/reminders">
+    <save-form inline :model="search" @submit="FetchList" @reset="reset" saveKey="/main/main/reminders">
       <el-form-item prop="organIds">
         <el-select
           clearable
@@ -42,6 +42,9 @@
 <script>
 import { getRemindMatterData } from '@/views/main/api'
 import title from '../abnormal/title'
+const initSearch = {
+  organId: null
+}
 export default {
   components: {
     'title-item': title
@@ -49,13 +52,14 @@ export default {
   data() {
     return {
       search: {
-        organId: null
+        ...initSearch
       },
       list: [],
     }
   },
   mounted() {
     this.FetchList()
+    this.$store.dispatch('setBranchs')
   },
   methods: {
     async FetchList() {
@@ -65,7 +69,11 @@ export default {
         })
         this.list = res.data
       } catch (error) {}
-    }
+    },
+    reset() {
+      this.search = {...initSearch}
+      this.FetchList()
+    },
   }
 }
 </script>

+ 6 - 8
src/views/main/teamSchedule/index.vue

@@ -182,11 +182,6 @@ export default {
     };
   },
   mounted() {
-    if(this.$route.query.ids){
-      this.searchForm.ids = this.$route.query.ids
-    }else{
-       this.searchForm.ids = ''
-    }
     this.$store.dispatch("setBranchs");
     this.getList();
   },
@@ -204,9 +199,12 @@ export default {
     },
     async getList() {
       try {
-        this.searchForm.page = this.rules.page;
-        this.searchForm.rows = this.rules.limit;
-        const res = await getInspectionItem(this.searchForm);
+        const res = await getInspectionItem({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          ids: this.$route.query.ids,
+        });
         this.tableList = res.data.rows;
         this.rules.total = res.data.total;
       } catch (e) {

+ 5 - 6
src/views/musicInspection/index.vue

@@ -144,17 +144,17 @@
                 <el-table-column align="center"
                                 width="250px"
                                 label="操作">
-                    <template slot-scope="scope" v-if="scope.row.status != 0">
-                        <auth auths="inspectionItemPlanConclusion/getPlanConclusion">
+                    <template slot-scope="scope">
+                        <auth auths="inspectionItemPlanConclusion/getPlanConclusion" v-if="scope.row.status != 0">
                             <el-button type="text" @click="onLook(scope.row)">查看</el-button>
                         </auth>
-                        <auth auths="inspectionItemPlanConclusion/GPS-INFO">
+                        <auth auths="inspectionItemPlanConclusion/GPS-INFO" v-if="scope.row.status != 0">
                             <el-button type="text" @click="onGPS(scope.row)">GPS定位</el-button>
                         </auth>
-                        <auth auths="inspectionItemPlanConclusion/exportPlanConclusion">
+                        <auth auths="inspectionItemPlanConclusion/exportPlanConclusion" v-if="scope.row.status != 0">
                             <el-button type="text" @click="onExport(scope.row)">下载</el-button>
                         </auth>
-                        <auth auths="inspectionItemPlan/updateMemo" v-if="scope.row.conclusionStatus == 1 || scope.row.conclusionStatus == 0">
+                        <auth auths="inspectionItemPlan/updateMemo" v-if="scope.row.conclusionStatus == 1 || scope.row.status == 0">
                             <el-button type="text" @click="handleClick(scope.row)">处理方式</el-button>
                         </auth>
                     </template>
@@ -277,7 +277,6 @@ export default {
                     ...getTimes(createTimer, ["startTime", "endTime"]),
                 }
                 const res = await inspectionItemPlan(params)
-                console.log(res)
                 this.tableList = res.data.rows
                 this.pageInfo.total = res.data.total
             } catch(err) {}

+ 10 - 0
src/views/recodeManager/api.js

@@ -17,3 +17,13 @@ export const addComplaints = data => {
     requestType: 'form',
   })
 }
+
+// 处理意见
+export const teacherAttendanceUpdate = data => {
+  return request({
+    url: '/api-web/teacherAttendance/update',
+    method: 'post',
+    data,
+    requestType: 'form',
+  })
+}

+ 46 - 0
src/views/recodeManager/modals/hand.vue

@@ -0,0 +1,46 @@
+<template>
+  <div>
+    <el-form :model="quitForm" ref="quitForm" :rules="quitRules">
+      <el-form-item prop="disposeContent">
+        <el-input type="textarea" v-model.trim="quitForm.disposeContent" placeholder="请填写处理意见"></el-input>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer" style="text-align: right;">
+      <el-button @click="$emit('close')">取 消</el-button>
+      <el-button type="primary" @click="submit">确 定</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { teacherAttendanceUpdate } from '../api'
+export default {
+  props: ['detail'],
+  data() {
+    return {
+      quitForm: {
+        reason: null,
+      },
+      quitRules: {
+        reason: [{ required: true, message: "请填写退团退费原因" }],
+      },
+    }
+  },
+  methods: {
+    submit() {
+      this.$refs.quitForm.validate(async valid => {
+        if (valid) {
+          try {
+            await teacherAttendanceUpdate({
+              id: this.detail.teacherAttendanceId,
+              ...this.quitForm
+            })
+            this.$emit('close')
+            this.$emit('submited')
+            this.$message.success("提交成功")
+          } catch (error) {}
+        }
+      })
+    }
+  }
+}
+</script>

+ 35 - 5
src/views/recodeManager/recodeList.vue

@@ -239,14 +239,30 @@
             align="center"
             label="操作"
             fixed="right"
+            width="220px"
           >
-            <template slot-scope="scope" v-if="scope.row.jobNature === 'PART_TIME'">
-              <el-button type="text" v-if="scope.row.complaintsStatus ==2 " @click="unappeal(scope.row)">撤销申诉</el-button>
-              <el-button v-if="scope.row.complaintsStatus == null || scope.row.complaintsStatus == 3" type="text" @click="appeal(scope.row)">申诉</el-button>
+            <template slot-scope="scope">
+              <el-button
+                type="text"
+                v-if="scope.row.jobNature === 'PART_TIME' && scope.row.complaintsStatus ==2 "
+                @click="unappeal(scope.row)"
+                v-permission="'teacherAttendance/repealComplaints'"
+              >撤销申诉</el-button>
+              <el-button
+                v-if="scope.row.jobNature === 'PART_TIME' && (scope.row.complaintsStatus == null || scope.row.complaintsStatus == 3)"
+                type="text"
+                @click="appeal(scope.row)"
+                v-permission="'teacherAttendance/addComplaints'"
+              >申诉</el-button>
+              <el-button
+                type="text"
+                v-permission="'teacherAttendance/update'"
+                @click="hand(scope.row)"
+              >处理意见</el-button>
             </template>
           </el-table-column>
         </el-table>
-        <el-dialog title="申诉" :visible.sync="appealVisible">
+        <el-dialog title="申诉" width="400px" :visible.sync="appealVisible">
           <appeal
             v-if="appealVisible && detail"
             :detail="detail"
@@ -254,6 +270,14 @@
             @submited="getList"
           />
         </el-dialog>
+        <el-dialog title="处理意见" width="400px" :visible.sync="handVisible">
+          <hand
+            v-if="handVisible && detail"
+            :detail="detail"
+            @close="handVisible = false"
+            @submited="getList"
+          />
+        </el-dialog>
         <pagination
           sync
           :total.sync="rules.total"
@@ -279,6 +303,7 @@ import { queryTeacherAttendances } from "@/api/recodeManager";
 import { jobNature, courseType } from "@/utils/searchArray";
 import { repealComplaints } from './api'
 import appeal from './modals/appeal'
+import hand from './modals/hand'
 let nowTime = new Date();
 nowTime =
   nowTime.getFullYear() +
@@ -287,7 +312,7 @@ nowTime =
   "-" +
   nowTime.getDate();
 export default {
-  components: { pagination, appeal },
+  components: { pagination, appeal, hand },
   data() {
     return {
       searchForm: {
@@ -299,6 +324,7 @@ export default {
       },
       detail: null,
       appealVisible: false,
+      handVisible: false,
       jobNature: jobNature, // 工作类型
       courseTime: [nowTime, nowTime],
       courseType,
@@ -402,6 +428,10 @@ export default {
       this.$refs["searchForm"].resetFields();
       this.search();
     },
+    hand(row) {
+      this.handVisible = true
+      this.detail = row
+    },
     appeal(row) {
       this.appealVisible = true
       this.detail = row

+ 33 - 1
src/views/stuRecodeManager/index.vue

@@ -275,7 +275,30 @@
               </div>
             </template>
           </el-table-column>
+          <el-table-column
+            align="center"
+            fixed="right"
+            label="操作"
+            v-if="permission('visit/add')"
+          >
+            <template slot-scope="scope">
+              <el-button
+                type="text"
+                v-if="permission('visit/add')"
+                @click="addVisit(scope.row)"
+              >新增回访</el-button>
+            </template>
+          </el-table-column>
         </el-table>
+        <el-dialog title="新增回访" width="500px" :visible.sync="visitVisible">
+          <visit
+            v-if="visitVisible && detail"
+            :detail="detail"
+            :username="detail.username"
+            @close="visitVisible = false"
+            @submited="getList"
+          />
+        </el-dialog>
         <pagination
           sync
           :total.sync="rules.total"
@@ -296,15 +319,19 @@ import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { getTimes } from "@/utils";
 import qs from 'qs';
+import { permission } from '@/utils/directivePage'
 import { findStudentAttendance } from "@/api/buildTeam";
 import { Export } from '@/utils/downLoadFile'
 import cleanDeep from 'clean-deep'
 // import { queryTeacherAttendances } from "@/api/recodeManager";
 import { courseType, courseListType, stuAttendance } from "@/utils/searchArray";
+import visit from '@/views/withdrawal-application/modals/visit'
 export default {
-  components: { pagination },
+  components: { pagination, visit },
   data() {
     return {
+      visitVisible: false,
+      detail: null,
       searchForm: {
         studentID: "",
         groupType: "",
@@ -346,10 +373,15 @@ export default {
   },
 
   methods: {
+    permission,
     async init() {
       await this.$store.dispatch("setBranchs");
       this.getList();
     },
+    addVisit(row) {
+      this.visitVisible = true
+      this.detail = row
+    },
     // 导出
     async onExport () {
       const { dates, ...rest } = this.searchForm;

+ 23 - 4
src/views/withdrawal-application/index.vue

@@ -59,9 +59,9 @@
         <el-table-column
           align="center"
           fixed="right"
-          width="160px;"
+          width="200px;"
           label="操作"
-          v-if="permission('musicGroupQuit/quitMusicGroup/quit') || permission('musicGroupQuit/quitMusicGroup/quit-only')"
+          v-if="permission('musicGroupQuit/quitMusicGroup/quit') || permission('musicGroupQuit/quitMusicGroup/quit-only') || permission('visit/add/tuituanliebiao')"
         >
           <template slot-scope="scope">
             <el-button
@@ -76,6 +76,11 @@
               :disabled="scope.row.status != 'PROCESSING'"
               @click="quieTeam(scope.row)"
             >退团</el-button>
+            <el-button
+              type="text"
+              v-if="permission('visit/add/tuituanliebiao')"
+              @click="addVisit(scope.row)"
+            >新增回访</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -96,7 +101,7 @@
         @submited="FetchList"
       />
     </el-dialog>
-    <el-dialog title="退团" width="640px" :visible.sync="quitOnlyVisible">
+    <el-dialog title="退团" width="500px" :visible.sync="quitOnlyVisible">
       <quitOnlyModal
         v-if="quitOnlyVisible && detail"
         :detail="detail"
@@ -104,6 +109,14 @@
         @submited="FetchList"
       />
     </el-dialog>
+    <el-dialog title="新增回访" width="500px" :visible.sync="visitVisible">
+      <visit
+        v-if="visitVisible && detail"
+        :detail="detail"
+        @close="visitVisible = false"
+        @submited="FetchList"
+      />
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -111,16 +124,18 @@ import pagination from "@/components/Pagination/index";
 import { permission } from '@/utils/directivePage'
 import quitModal from './modals/quit'
 import quitOnlyModal from './modals/quitOnly'
+import visit from './modals/visit'
 import { musicGroupQuitQeryPage } from './api'
 const initSearch = {
   search: ''
 }
 export default {
-  components: { pagination, quitModal, quitOnlyModal },
+  components: { pagination, quitModal, quitOnlyModal, visit },
   data() {
     return {
       quitVisible: false,
       quitOnlyVisible: false,
+      visitVisible: false,
       detail: null,
       list: [],
       searchForm: {
@@ -156,6 +171,10 @@ export default {
       this.quitOnlyVisible = true
       this.detail = row
     },
+    addVisit(row) {
+      this.visitVisible = true
+      this.detail = row
+    },
     async FetchList() {
       try {
         const res = await musicGroupQuitQeryPage({

+ 2 - 3
src/views/withdrawal-application/modals/quitOnly.vue

@@ -10,7 +10,7 @@
         >
       </el-form-item>
       <el-form-item label="退团原因" prop="reason">
-        <el-input type="textarea" v-model.trim="quitForm.reason" placeholder="请填写退团退费原因"></el-input>
+        <el-input type="textarea" v-model.trim="quitForm.reason" placeholder="请填写退团原因"></el-input>
       </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer" style="text-align: right;">
@@ -47,8 +47,7 @@ export default {
               type: 'warning',
             })
             await quitMusicGroup({
-              musicGroupId: this.detail.musicGroupId,
-              userId: this.detail.userId,
+              id: this.detail.id,
               ...this.quitForm
             })
             this.$emit('close')

+ 122 - 0
src/views/withdrawal-application/modals/visit.vue

@@ -0,0 +1,122 @@
+<template>
+  <div>
+    <el-form
+      :model="visitForm"
+      label-width="120px"
+      label-position="right"
+      ref="visitForm"
+      :rules="visitRules"
+    >
+      <el-form-item label="学生姓名">
+        <p>{{ userName }}</p>
+      </el-form-item>
+      <el-form-item label="回访类型" prop="visitType">
+        <el-cascader
+          expand-trigger="hover"
+          clearable
+          style="width: 80% !important"
+          placeholder="请选择回访类型"
+          :options="visitChiose"
+          v-model="visitForm.visitType"
+        >
+        </el-cascader>
+      </el-form-item>
+      <el-form-item label="回访日期" prop="visitTime">
+        <el-date-picker
+          v-model.trim="visitForm.visitTime"
+          align="right"
+          type="date"
+          style="width: 80% !important"
+          placeholder="选择日期"
+          value-format="yyyy-MM-dd"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="学员情况" prop="overview">
+        <el-input
+          type="textarea"
+          v-model="visitForm.overview"
+          style="width: 80% !important"
+          placeholder="请输入学员情况"
+          :rows="3"
+          maxlength="50"
+          show-word-limit
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="家长反馈" prop="feedback">
+        <el-input
+          type="textarea"
+          v-model="visitForm.feedback"
+          style="width: 80% !important"
+          placeholder="请输入家长反馈"
+          :rows="3"
+          maxlength="50"
+          show-word-limit
+        ></el-input>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer" style="text-align: right;margin-right: 15%;">
+      <el-button @click="$emit('close')">取 消</el-button>
+      <el-button type="primary" @click="submitAddVisit">确 定</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import cleanDeep from 'clean-deep'
+import { visitChiose } from "@/utils/searchArray";
+import { addVisit } from "@/views/returnVisitManager/api"
+export default {
+  props: ['detail', 'username'],
+  data() {
+    return {
+      visitChiose,
+      visitForm: {
+        musicGroupId: "",
+        overview: "",
+        purpose: "",
+        studentId: "",
+        type: "",
+        visitTime: "",
+        visitType: "",
+        feedback: "",
+        studentName: "",
+      },
+      visitRules: {
+        overview: [{ required: true, message: "请输入学生近况" }],
+        feedback: [{ required: true, message: "请输入家长反馈" }],
+        visitTime: [{ required: true, message: "请输入回访时间" }],
+        visitType: [{ required: true, message: "请选择回访类型" }],
+      },
+    }
+  },
+  computed: {
+    userName() {
+      return this.username || this.detail.user?.username
+    }
+  },
+  methods: {
+    submitAddVisit() {
+      this.$refs.visitForm.validate((res) => {
+        if (res) {
+          const { visitType, ...rest } = this.visitForm
+          const data = {
+            ...rest,
+            objectId: this.detail.id,
+            studentName: this.userName,
+            musicGroupId: this.detail.musicGroupId,
+            studentId: this.detail.userId,
+            type: visitType[0],
+            purpose: visitType[1],
+          }
+          addVisit(cleanDeep(data)).then((res) => {
+            if (res.code === 200) {
+              this.$message.success("新增成功");
+              this.$emit('close')
+              this.$emit('submited')
+            }
+          });
+        }
+      });
+    },
+  }
+}
+</script>

+ 2 - 2
vue.config.js

@@ -21,8 +21,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 测试服
-// let target = 'http://192.168.3.196:80' // 乔
+// let target = 'http://dev.dayaedu.com' // 测试服
+let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**