Parcourir la source

01/04 15:38 优化BUG修复

1
mo il y a 4 ans
Parent
commit
667a0b8f7e

+ 4 - 4
src/views/businessManager/orderManager/businessStatement.vue

@@ -12,7 +12,7 @@
         >导出</el-button
       >
       <!-- 搜索类型 -->
-      <el-form :inline="true" class="searchForm" v-model.trim="searchForm">
+      <save-form :inline="true" class="searchForm" :model="searchForm" @submit="search" @reset="onReSet">
         <el-form-item prop="organId">
           <el-select
             class="multiple"
@@ -61,10 +61,10 @@
           </el-date-picker>
         </el-form-item> -->
         <el-form-item>
-          <el-button @click="search" type="danger">搜索</el-button>
-          <el-button @click="onReSet" type="primary">重置</el-button>
+          <el-button native-type="submit" type="danger">搜索</el-button>
+          <el-button native-type="reset" type="primary">重置</el-button>
         </el-form-item>
-      </el-form>
+      </save-form>
       <!-- 列表 -->
       <div class="tableWrap">
         <el-table

+ 12 - 9
src/views/businessManager/orderManager/payRecord.vue

@@ -348,6 +348,17 @@ export default {
       activeRow: null,
     };
   },
+  created(){
+        if (this.searchForm.orderDate?.length < 1) {
+      var now = new Date();
+      var startDate = dayjs().format("YYYY-MM-DD");
+      var endDate = dayjs().format("YYYY-MM-DD");
+      this.searchForm.orderDate = [];
+      this.searchForm.orderDate.push(startDate);
+      this.searchForm.orderDate.push(endDate);
+      this.searchOrderDate(this.searchForm.orderDate);
+    }
+  },
   mounted() {
     // getEmployeeOrgan().then(res => {
     //   if (res.code == 200) {
@@ -360,15 +371,7 @@ export default {
         this.cooperations = res.data.rows;
       }
     });
-    if (this.searchForm.orderDate.length < 1) {
-      var now = new Date();
-      var startDate = dayjs().format("YYYY-MM-DD");
-      var endDate = dayjs().format("YYYY-MM-DD");
-      this.searchForm.orderDate = [];
-      this.searchForm.orderDate.push(startDate);
-      this.searchForm.orderDate.push(endDate);
-      this.searchOrderDate(this.searchForm.orderDate);
-    }
+
 
     this.getList();
   },

+ 153 - 125
src/views/evaluateManager/evaluateList.vue

@@ -1,143 +1,171 @@
 <template>
-
   <!-- <h2>
       <div class="squrt"></div>评论列表
     </h2> -->
   <div class="m-core">
-    <el-form :inline="true"
-             class="searchForm"
-             v-model.trim="searchForm">
+    <save-form
+      :inline="true"
+      class="searchForm"
+      :model="searchForm"
+      save-key="commentManager-evaluateList"
+      @submit="search"
+      @reset="onReSet"
+    >
       <!-- 状态 指导老师 活动方案-->
       <el-form-item>
-        <el-input v-model.trim="searchForm.search"
-                  @keyup.enter.native="search"
-                  placeholder="请输入课程组名称 ID"></el-input>
+        <el-input
+          v-model.trim="searchForm.search"
+          clearable
+          placeholder="请输入课程组名称 ID"
+        ></el-input>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="请选择分部"
-                   v-model="searchForm.organId"
-                   clearable>
-          <el-option v-for="(item,index) in organList"
-                     :label="item.name"
-                     :value="item.id"
-                     :key="index"></el-option>
+        <el-select
+          placeholder="请选择分部"
+          v-model="searchForm.organId"
+          clearable
+        >
+          <el-option
+            v-for="(item, index) in selects.branchs"
+            :label="item.name"
+            :value="item.id"
+            :key="index"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="请选择状态"
-                   v-model="searchForm.isOver"
-                   clearable>
-          <el-option label="已完成"
-                     value="1"></el-option>
-          <el-option label="进行中"
-                     value="0"></el-option>
+        <el-select
+          placeholder="请选择状态"
+          v-model="searchForm.isOver"
+          clearable
+        >
+          <el-option label="已完成" value="1"></el-option>
+          <el-option label="进行中" value="0"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="请选择指导老师"
-                   v-model="searchForm.teacherId"
-                   clearable
-                   filterable>
-          <el-option v-for="(item,index) in teacherList"
-                     :label="item.realName"
-                     :value="item.id"
-                     :key="index"></el-option>
-        </el-select>
+        <remote-search :commit="'setTeachers'" v-model="searchForm.teacherId" />
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="是否完成评价"
-                   v-model="searchForm.hasReport"
-                   clearable>
-          <el-option label="是"
-                     value="1"></el-option>
-          <el-option label="否"
-                     value="0"></el-option>
+        <el-select
+          placeholder="是否完成评价"
+          v-model="searchForm.hasReport"
+          clearable
+        >
+          <el-option label="是" value="1"></el-option>
+          <el-option label="否" value="0"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-date-picker :clearable='false'
-                        v-model="searchForm.month"
-                        type="month"
-                        value-format="yyyy-MM"
-                        placeholder="选择年月"></el-date-picker>
+        <el-date-picker
+          :clearable="false"
+          v-model="searchForm.month"
+          type="month"
+          value-format="yyyy-MM"
+          placeholder="选择年月"
+        ></el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button @click="search"
-                   type="danger">搜索</el-button>
-        <el-button @click="onReSet"
-                   type="primary">重置</el-button>
+        <el-button native-type="submit" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
       </el-form-item>
-    </el-form>
+    </save-form>
     <div class="tableWrap">
-      <el-table style="width: 100%"
-                :header-cell-style="{background:'#EDEEF0',color:'#444'}"
-                :data="tableData">
-        <el-table-column align="center"
-                         prop="id"
-                         label="课程组编号"></el-table-column>
-        <el-table-column align="center"
-                         prop="name"
-                         label="课程组名称"></el-table-column>
-        <el-table-column align="center"
-                         prop="organName"
-                         label="分部名称"></el-table-column>
+      <el-table
+        style="width: 100%"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        :data="tableData"
+      >
+        <el-table-column align="center" prop="id" label="课程组编号">
+          <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.id }}
+            </copy-text>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="name"
+          label="课程组名称"
+        >
+          <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.name }}
+            </copy-text>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="organName"
+          label="分部名称"
+        >
+           <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.organName }}
+            </copy-text>
+          </template>
+        </el-table-column>
         <!-- <el-table-column align="center" prop="id" label="类型"></el-table-column> -->
-        <el-table-column align="center"
-                         prop="id"
-                         label="收费类型">
+        <el-table-column align="center" prop="id" label="收费类型">
           <template slot-scope="scope">
-            <div>{{scope.row.buyMonths>0?'付费':'免费'}}</div>
+            <div>{{ scope.row.buyMonths > 0 ? "付费" : "免费" }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         label="状态">
+        <el-table-column align="center" label="状态">
           <template slot-scope="scope">
-            <div>{{ scope.row.coursesExpireDate | coursesStatus}}</div>
+            <div>{{ scope.row.coursesExpireDate | coursesStatus }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         prop="teacherName"
-                         label="指导老师"></el-table-column>
-        <el-table-column align="center"
-                         label="课次">
+        <el-table-column
+          align="center"
+          prop="teacherName"
+          label="指导老师"
+        ></el-table-column>
+        <el-table-column align="center" label="课次">
           <template slot-scope="scope">
-            <div>{{scope.row.currentClassTimes+'/'+scope.row.totalClassTimes}}</div>
+            <div>
+              {{
+                scope.row.currentClassTimes + "/" + scope.row.totalClassTimes
+              }}
+            </div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         prop="id"
-                         label="是否评价">
+        <el-table-column align="center" prop="id" label="是否评价">
           <template slot-scope="scope">
-            <div>{{scope.row.evaluateStatus?'是':'否'}}</div>
+            <div>{{ scope.row.evaluateStatus ? "是" : "否" }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         label="操作">
+        <el-table-column align="center" label="操作">
           <template slot-scope="scope">
             <div>
-              <el-button type="text"
-                         v-permission="'evaluateList/look'"
-                         v-show='scope.row.evaluateStatus'
-                         @click="gotoEvakuateDetail(scope.row)">查看</el-button>
+              <el-button
+                type="text"
+                v-permission="'evaluateList/look'"
+                v-show="scope.row.evaluateStatus"
+                @click="gotoEvakuateDetail(scope.row)"
+                >查看</el-button
+              >
             </div>
           </template>
         </el-table-column>
       </el-table>
-      <pagination :total="rules.total"
-                  :page.sync="rules.page"
-                  :limit.sync="rules.limit"
-                  :page-sizes="rules.page_size"
-                  @pagination="getList" />
+      <pagination
+        sync
+        :total.sync="rules.total"
+        :page.sync="rules.page"
+        :limit.sync="rules.limit"
+        :page-sizes="rules.page_size"
+        @pagination="getList"
+      />
     </div>
   </div>
-
 </template>
 <script>
 import pagination from "@/components/Pagination/index";
 import { getReviews, getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
 export default {
   components: { pagination },
-  data () {
+  data() {
     return {
       searchForm: {
         organId: null,
@@ -145,35 +173,32 @@ export default {
         teacherId: null,
         hasReport: "",
         month: null,
-        search: null
+        search: null,
       },
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
       tableData: [],
       teacherList: [],
       subjectList: [],
-      organList: []
+      organList: [],
     };
   },
-  created () {
+  created() {
     this.init();
   },
-  activated () {
+  activated() {
     this.init();
   },
+  mounted() {
+    this.$store.dispatch("setBranchs");
+  },
   methods: {
-    init () {
-      if (this.$route.query.search) {
-        this.$route.query.search instanceof Object ? this.searchForm = this.$route.query.search : this.searchForm = JSON.parse(this.$route.query.search);
-      }
-      if (this.$route.query.rules) {
-        this.$route.query.rules instanceof Object ? this.rules = this.$route.query.rules : this.rules = JSON.parse(this.$route.query.rules);
-      }
+    init() {
       if (!this.searchForm.month) {
         var now = new Date();
         this.searchForm.month = new Date(
@@ -184,13 +209,14 @@ export default {
       }
 
       // 获取指导老师
-      getTeacher({}).then(res => {
-        if (res.code == 200) {
-          this.teacherList = res.data;
-        }
-      });
+      // getTeacher({}).then(res => {
+      //   if (res.code == 200) {
+      //     this.teacherList = res.data;
+      //   }
+      // });
       // 获取分部
-      getEmployeeOrgan().then(res => {
+
+      getEmployeeOrgan().then((res) => {
         if (res.code == 200) {
           this.organList = res.data;
         }
@@ -198,7 +224,7 @@ export default {
       this.getList();
       // getReviews()
     },
-    getList () {
+    getList() {
       // 数据效验
       let obj = {};
       obj.hasReport = this.searchForm.hasReport || null;
@@ -207,48 +233,50 @@ export default {
       obj.organId = this.searchForm.organId || null;
       obj.page = this.rules.page;
       obj.rows = this.rules.limit;
-      obj.search = this.searchForm.search || null
+      obj.search = this.searchForm.search || null;
       obj.teacherId = this.searchForm.teacherId || null;
-      getReviews(obj).then(res => {
+      getReviews(obj).then((res) => {
         if (res.code == 200) {
           this.tableData = res.data.rows;
           this.rules.total = res.data.total;
         }
       });
     },
-    search () {
+    search() {
       this.rules.page = 1;
       this.getList();
     },
-    onReSet () {
+    onReSet() {
       this.searchForm = {
         organId: null,
         isOver: "",
         teacherId: null,
         hasReport: "",
         month: null,
-        search: null
-      }
+        search: null,
+      };
       var now = new Date();
       this.searchForm.month = new Date(
         Date.UTC(now.getFullYear(), now.getMonth(), now.getDate())
       )
         .toISOString()
         .slice(0, 7);
-
     },
-    gotoEvakuateDetail (row) {
+    gotoEvakuateDetail(row) {
       let id = row.id;
-      let evaluateId = row.evaluateId
-      let search = JSON.stringify(this.searchForm)
-      let rules = JSON.stringify(this.rules)
-      this.$router.push({ path: '/operateManager/evaluateDetail', query: { id, evaluateId, search, rules } })
-    }
+      let evaluateId = row.evaluateId;
+      let search = JSON.stringify(this.searchForm);
+      let rules = JSON.stringify(this.rules);
+      this.$router.push({
+        path: "/operateManager/evaluateDetail",
+        query: { id, evaluateId, search, rules },
+      });
+    },
   },
   filters: {
-    coursesStatus (val) {
+    coursesStatus(val) {
       return new Date().getTime() - new Date(val) > 0 ? "已完成" : "进行中";
-    }
-  }
+    },
+  },
 };
-</script>
+</script>

+ 4 - 5
src/views/evaluateManager/index.vue

@@ -4,8 +4,8 @@
       <div class="squrt"></div>评论管理
     </h2>
     <div class="m-core">
-       <location-hash v-model="activeIndex" @change="handleClick">
-      <el-tabs v-model.trim="activeIndex"
+
+      <tab-router v-model.trim="activeIndex"
                type="card"
                @tab-click="handleClick">
         <el-tab-pane label="月报"
@@ -24,8 +24,7 @@
           <vipEvaluateList v-if="activeIndex == 3">
           </vipEvaluateList>
         </el-tab-pane>
-      </el-tabs>
-       </location-hash>
+      </tab-router>
     </div>
   </div>
 </template>
@@ -43,7 +42,7 @@ export default {
   data () {
      const query = this.$route.query
     return {
-      activeIndex:query.opt|| "1",
+      activeIndex: "1",
       permissionList: {
         evaluateList: permission("/commentManager/evaluateList"),
         networkList: permission("/commentManager/networkList"),

+ 335 - 296
src/views/evaluateManager/networkList.vue

@@ -1,172 +1,178 @@
 <!--  -->
 <template>
   <div class="m-core">
-    <el-form :inline="true"
-             class="searchForm"
-             v-model.trim="searchForm">
+    <save-form
+      :inline="true"
+      class="searchForm"
+      :model="searchForm"
+      @submit="search"
+      @reset="onReSet"
+      save-key="commentManager-networkList"
+    >
       <!-- 状态 指导老师 活动方案-->
       <el-form-item>
-        <el-input v-model.trim="searchForm.search"
-                  @keyup.enter.native="search"
-                  placeholder="请输入课程组名称 ID"></el-input>
+        <el-input
+          v-model.trim="searchForm.search"
+          @keyup.enter.native="search"
+          placeholder="请输入课程组名称 ID"
+        ></el-input>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="请选择分部"
-                   v-model="searchForm.organId"
-                   clearable>
-          <el-option v-for="(item,index) in organList"
-                     :label="item.name"
-                     :value="item.id"
-                     :key="index"></el-option>
+        <el-select
+          placeholder="请选择分部"
+          filterable
+          v-model.trim="searchForm.organId"
+          clearable
+        >
+          <el-option
+            v-for="(item, index) in selects.branchs"
+            :label="item.name"
+            :value="item.id"
+            :key="index"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="指导老师"
-                   v-model="searchForm.teacherId"
-                   clearable
-                   filterable>
-          <el-option v-for="(item,index) in teacherList"
-                     :label="item.realName"
-                     :value="item.id"
-                     :key="index"></el-option>
-        </el-select>
+        <remote-search :commit="'setTeachers'" v-model.trim="searchForm.teacherId" />
       </el-form-item>
       <el-form-item>
-        <el-select v-model.trim="searchForm.eduTeacherId"
-                   filterable
-                   clearable
-                   placeholder="乐团主管">
-          <el-option v-for="(item,index) in educationList"
-                     :key="index"
-                     :value="item.userId"
-                     :label="item.userName"></el-option>
-        </el-select>
+        <remote-search
+          :commit="'setEducations'"
+          v-model.trim="searchForm.eduTeacherId"
+        />
       </el-form-item>
       <el-form-item>
-        <el-select v-model.trim="searchForm.practiceGroupType"
-                   clearable
-                   filterable
-                   placeholder="课程组类型">
-          <el-option v-for="(item,index) in practiceGroupType"
-                     :key="index"
-                     :value="item.value"
-                     :label="item.label"></el-option>
+        <el-select
+          v-model.trim="searchForm.practiceGroupType"
+          clearable
+          filterable
+          placeholder="课程组类型"
+        >
+          <el-option
+            v-for="(item, index) in practiceGroupType"
+            :key="index"
+            :value="item.value"
+            :label="item.label"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="学员评分"
-                   v-model="searchForm.studentReview"
-                   clearable>
-          <el-option v-for="index in 5"
-                     :label="index+'星'"
-                     :value="index"
-                     :key="index"></el-option>
+        <el-select
+          placeholder="学员评分"
+          v-model="searchForm.studentReview"
+          clearable
+        >
+          <el-option
+            v-for="index in 5"
+            :label="index + '星'"
+            :value="index"
+            :key="index"
+          ></el-option>
         </el-select>
       </el-form-item>
-      <!-- <el-form-item>
-        <el-select placeholder="提交作业"
-                   v-model="searchForm.hasHandHomework"
-                   clearable>
-          <el-option label="提交"
-                     value="1"></el-option>
-          <el-option label="未提交"
-                     value="0"></el-option>
-        </el-select>
-      </el-form-item> -->
       <el-form-item>
-        <el-select placeholder="老师评价"
-                   v-model="searchForm.hasReview"
-                   clearable>
-          <el-option label="评价"
-                     value="1"></el-option>
-          <el-option label="评价"
-                     value="0"></el-option>
+        <el-select
+          placeholder="老师评价"
+          v-model="searchForm.hasReview"
+          clearable
+        >
+          <el-option label="评价" value="1"></el-option>
+          <el-option label="未评价" value="0"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="教务评价"
-                   v-model="searchForm.courseReview"
-                   clearable>
-          <el-option label="好"
-                     value="好"></el-option>
-          <el-option label="中"
-                     value="中"></el-option>
-          <el-option label="差"
-                     value="差"></el-option>
+        <el-select
+          placeholder="教务评价"
+          v-model="searchForm.courseReview"
+          clearable
+        >
+          <el-option label="好" value="好"></el-option>
+          <el-option label="中" value="中"></el-option>
+          <el-option label="差" value="差"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="是否到课"
-                   v-model="searchForm.hasArrived"
-                   clearable>
-          <el-option label="到课"
-                     value="1"></el-option>
-          <el-option label="到"
-                     value="0"></el-option>
+        <el-select
+          placeholder="是否到课"
+          v-model="searchForm.hasArrived"
+          clearable
+        >
+          <el-option label="到" value="1"></el-option>
+          <el-option label="未到" value="0"></el-option>
         </el-select>
       </el-form-item>
       <!-- homeWorkReplied -->
       <el-form-item>
-        <el-select placeholder="布置作业"
-                   v-model="searchForm.assignHomework"
-                   clearable>
-          <el-option label="是"
-                     value="1"></el-option>
-          <el-option label="否"
-                     value="0"></el-option>
+        <el-select
+          placeholder="布置作业"
+          v-model="searchForm.assignHomework"
+          clearable
+        >
+          <el-option label="是" value="1"></el-option>
+          <el-option label="否" value="0"></el-option>
         </el-select>
       </el-form-item>
-      <!-- <el-form-item>
-        <el-select placeholder="回复作业"
-                   v-model="searchForm.homeWorkReplied"
-                   clearable>
-          <el-option label="是"
-                     value="1"></el-option>
-          <el-option label="否"
-                     value="0"></el-option>
-        </el-select>
-      </el-form-item> -->
       <el-form-item>
-        <el-date-picker :clearable="false"
-                        v-model="searchForm.month"
-                        type="daterange"
-                        value-format="yyyy-MM-dd"
-                        format="yyyy-MM-dd"
-                        range-separator="-"
-                        :picker-options="{
-        firstDayOfWeek: 1
-    }"
-                        start-placeholder="开始日期"
-                        end-placeholder="结束日期">
-          ></el-date-picker>
+        <el-date-picker
+          :clearable="false"
+          v-model="searchForm.month"
+          type="daterange"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          range-separator="-"
+          :picker-options="{
+            firstDayOfWeek: 1,
+          }"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        >
+          ></el-date-picker
+        >
       </el-form-item>
       <el-form-item>
-        <el-button @click="search"
-                   type="danger">搜索</el-button>
-        <el-button @click="onReSet"
-                   type="primary">重置</el-button>
-        <el-button type="primary"
-                   v-if="tableData.length > 0"
-                   v-permission="'export/courseReviews'"
-                   @click="netWorkExport">导出</el-button>
+        <el-button native-type="submit" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
+        <el-button
+          type="primary"
+          v-if="tableData.length > 0"
+          v-permission="'export/courseReviews'"
+          @click="netWorkExport"
+          >导出</el-button
+        >
       </el-form-item>
-    </el-form>
+    </save-form>
     <div class="tableWrap">
-      <el-table style="width: 100%"
-                :header-cell-style="{background:'#EDEEF0',color:'#444'}"
-                :data="tableData">
-        <el-table-column align="center"
-                         prop="organName"
-                         label="分部名称"></el-table-column>
-        <el-table-column align="center"
-                         prop="id"
-                         label="课程编号"></el-table-column>
-        <el-table-column align="center"
-                         prop="courseName"
-                         label="课程名称"></el-table-column>
-        <el-table-column align="center"
-                         prop="courseName"
-                         label="上课日期">
+      <el-table
+        style="width: 100%"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        :data="tableData"
+      >
+        <el-table-column align="center" prop="organName" label="分部名称">
+          <template slot-scope="scope">
+            <copy-text>
+              {{scope.row.organName}}
+            </copy-text>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="id" label="课程编号">
+          <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.id }}
+            </copy-text>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="courseName"
+          label="课程名称"
+        >
+            <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.courseName }}
+            </copy-text>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="courseName" label="上课日期">
           <template slot-scope="scope">
             <div>
               {{ scope.row.classDate | formatTimer }}
@@ -174,142 +180,163 @@
           </template>
         </el-table-column>
 
-        <el-table-column align="center"
-                         prop="subjectName"
-                         label="声部"></el-table-column>
-        <el-table-column align="center"
-                         prop="teacherName"
-                         label="指导老师"></el-table-column>
-        <el-table-column align="center"
-                         prop="eduTeacherName"
-                         label="乐团主管"></el-table-column>
-        <el-table-column align="center"
-                         prop="type"
-                         label="课程组类型"
-                         width="100">
-          <template slot-scope="scope">
-            <div>
-              <p>{{scope.row.practiceGroupType | comType}}</p>
-            </div>
+        <el-table-column
+          align="center"
+          prop="subjectName"
+          label="声部"
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          prop="teacherName"
+          label="指导老师"
+        >
+            <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.teacherName }}
+            </copy-text>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         label="学员评分">
-          <template slot-scope="scope">
-            <div>{{ scope.row.studentReview | studentReviewFilter}}</div>
+        <el-table-column
+          align="center"
+          prop="eduTeacherName"
+          label="乐团主管"
+        >
+              <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.eduTeacherName }}
+            </copy-text>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         label="老师评价">
+        <el-table-column
+          align="center"
+          prop="type"
+          label="课程组类型"
+          width="100"
+        >
           <template slot-scope="scope">
-            <div>{{scope.row.reviewId>0?'是':'否'}}</div>
+            <div>
+              <p>{{ scope.row.practiceGroupType | comType }}</p>
+            </div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         label="布置作业">
+        <el-table-column align="center" label="学员评分">
           <template slot-scope="scope">
-            <div>{{scope.row.assignHomework?'是':'否'}}</div>
+            <div>{{ scope.row.studentReview | studentReviewFilter }}</div>
           </template>
         </el-table-column>
-        <!-- <el-table-column align="center"
-                         label="提交作业">
+        <el-table-column align="center" label="老师评价">
           <template slot-scope="scope">
-            <div>{{scope.row.handHomework?'是':'否'}}</div>
+            <div>{{ scope.row.reviewId > 0 ? "是" : "否" }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         label="回复作业">
+        <el-table-column align="center" label="布置作业">
           <template slot-scope="scope">
-            <div>{{scope.row.homeWorkReplied>0?'是':'否'}}</div>
+            <div>{{ scope.row.assignHomework ? "是" : "否" }}</div>
           </template>
-        </el-table-column> -->
-        <el-table-column align="center"
-                         prop="courseReview"
-                         label="教务评价"></el-table-column>
-        <el-table-column align="center"
-                         label="是否到课">
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="courseReview"
+          label="教务评价"
+        ></el-table-column>
+        <el-table-column align="center" label="是否到课">
           <template slot-scope="scope">
-            <div>{{scope.row.attendanceId>0?'到课':'未到'}}</div>
+            <div>{{ scope.row.attendanceId > 0 ? "到课" : "未到" }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         label="操作">
+        <el-table-column align="center" label="操作">
           <!-- v-permission="'evaluateList/look'" -->
           <template slot-scope="scope">
             <div>
-              <el-button type="text"
-                         v-if="scope.row.reviewId"
-                         @click="lookDetail(scope.row)">查看</el-button>
+              <el-button
+                type="text"
+                v-if="scope.row.reviewId"
+                @click="lookDetail(scope.row)"
+                >查看</el-button
+              >
             </div>
           </template>
         </el-table-column>
       </el-table>
-      <pagination :total="rules.total"
-                  :page.sync="rules.page"
-                  :limit.sync="rules.limit"
-                  :page-sizes="rules.page_size"
-                  @pagination="getList" />
+      <pagination
+        sync
+        :total.sync="rules.total"
+        :page.sync="rules.page"
+        :limit.sync="rules.limit"
+        :page-sizes="rules.page_size"
+        @pagination="getList"
+      />
     </div>
-    <el-dialog title="网管课评价详情"
-               :visible.sync="netWorkVisible"
-               width="800px">
+    <el-dialog
+      title="网管课评价详情"
+      :visible.sync="netWorkVisible"
+      width="800px"
+    >
       <div class="wrap">
         <div class="commitLeft">
-          <div class="leftCell"
-               v-if="teacherClassHeadInfo">
+          <div class="leftCell" v-if="teacherClassHeadInfo">
             <p>课程班名称</p>
-            <p>{{teacherClassHeadInfo.classGroupName}}</p>
+            <p>{{ teacherClassHeadInfo.classGroupName }}</p>
           </div>
-          <div class="leftCell"
-               v-if="teacherClassHeadInfo">
+          <div class="leftCell" v-if="teacherClassHeadInfo">
             <p>上课时间</p>
-            <p>{{teacherClassHeadInfo.classDate+' '+teacherClassHeadInfo.startClassTime+'-'+teacherClassHeadInfo.endClassTime}}</p>
+            <p>
+              {{
+                teacherClassHeadInfo.classDate +
+                " " +
+                teacherClassHeadInfo.startClassTime +
+                "-" +
+                teacherClassHeadInfo.endClassTime
+              }}
+            </p>
           </div>
-          <div class="leftCell"
-               v-if="teacherClassHeadInfo">
+          <div class="leftCell" v-if="teacherClassHeadInfo">
             <p>乐器</p>
-            <p>{{teacherClassHeadInfo.subjectNames}}</p>
+            <p>{{ teacherClassHeadInfo.subjectNames }}</p>
           </div>
-          <div class="leftCell"
-               v-if="teacherClassHeadInfo">
+          <div class="leftCell" v-if="teacherClassHeadInfo">
             <p>指导老师</p>
-            <p>{{teacherClassHeadInfo.bishopTeacher}}</p>
+            <p>{{ teacherClassHeadInfo.bishopTeacher }}</p>
           </div>
-          <div class="leftCell"
-               v-if="teacherClassHeadInfo">
+          <div class="leftCell" v-if="teacherClassHeadInfo">
             <p>学员</p>
-            <p>{{teacherClassHeadInfo.studentNames}}</p>
+            <p>{{ teacherClassHeadInfo.studentNames }}</p>
           </div>
-          <div class="leftCell"
-               v-if="courseScheduleReview">
+          <div class="leftCell" v-if="courseScheduleReview">
             <p>回访日期</p>
-            <p>{{ courseScheduleReview.createTime.substring(0,10) }}</p>
+            <p>{{ courseScheduleReview.createTime.substring(0, 10) }}</p>
           </div>
-          <div class="leftCell"
-               v-if="courseScheduleReview">
+          <div class="leftCell" v-if="courseScheduleReview">
             <p>是否双向沟通</p>
-            <p>{{courseScheduleReview.hasLiaison?'是':'否'}}</p>
+            <p>{{ courseScheduleReview.hasLiaison ? "是" : "否" }}</p>
           </div>
-          <div class="leftCell"
-               v-if="courseScheduleReview">
+          <div class="leftCell" v-if="courseScheduleReview">
             <p>是否提交作业</p>
-            <p>{{courseScheduleReview.handHomework?'是':'否'}}</p>
+            <p>{{ courseScheduleReview.handHomework ? "是" : "否" }}</p>
           </div>
-          <div class="leftCell"
-               v-if="courseScheduleReview">
+          <div class="leftCell" v-if="courseScheduleReview">
             <p>乐团主管</p>
-            <p>{{courseScheduleReview.eduTeacherName}}</p>
+            <p>{{ courseScheduleReview.eduTeacherName }}</p>
           </div>
           <div class="leftCell">
             <p>课程评价</p>
             <div class="chioseWrap">
-              <el-tag :type="mychiose =='好'?'danger':'info'"
-                      @click="courseScheduleReview.courseReview='好'">好</el-tag>
+              <el-tag
+                :type="mychiose == '好' ? 'danger' : 'info'"
+                @click="courseScheduleReview.courseReview = '好'"
+                >好</el-tag
+              >
 
-              <el-tag :type="mychiose == '中'?'danger':'info'"
-                      @click="courseScheduleReview.courseReview='中'">中</el-tag>
-              <el-tag :type="mychiose == '差'?'danger':'info'"
-                      @click="courseScheduleReview.courseReview='差'">差</el-tag>
+              <el-tag
+                :type="mychiose == '中' ? 'danger' : 'info'"
+                @click="courseScheduleReview.courseReview = '中'"
+                >中</el-tag
+              >
+              <el-tag
+                :type="mychiose == '差' ? 'danger' : 'info'"
+                @click="courseScheduleReview.courseReview = '差'"
+                >差</el-tag
+              >
             </div>
           </div>
         </div>
@@ -318,70 +345,77 @@
             <div class="rightCell">
               <p>学员评价</p>
               <div class="chioseWrap">
-                <el-rate v-model="courseScheduleComplaints[0].score"
-                         disabled
-                         text-color="#ff9900"></el-rate>
+                <el-rate
+                  v-model="courseScheduleComplaints[0].score"
+                  disabled
+                  text-color="#ff9900"
+                ></el-rate>
               </div>
             </div>
-            <el-input type="textarea"
-                      v-model="courseScheduleComplaints[0].reason"
-                      disabled></el-input>
+            <el-input
+              type="textarea"
+              v-model="courseScheduleComplaints[0].reason"
+              disabled
+            ></el-input>
           </div>
           <div v-if="courseScheduleReview">
-            <div class="rightCell"
-                 v-if="courseScheduleReview">
+            <div class="rightCell" v-if="courseScheduleReview">
               <p>教材内容</p>
             </div>
-            <el-input type="textarea"
-                      disabled
-                      v-model="teachingMaterial"></el-input>
-            <div class="leftCell"
-                 v-if="courseScheduleReview">
+            <el-input
+              type="textarea"
+              disabled
+              v-model="teachingMaterial"
+            ></el-input>
+            <div class="leftCell" v-if="courseScheduleReview">
               <p>曲目</p>
               <p>{{ courseScheduleReview.song }}</p>
             </div>
-            <div class="rightCell"
-                 v-if="courseScheduleReview">
+            <div class="rightCell" v-if="courseScheduleReview">
               <p>发音</p>
               <div class="chioseWrap">
-                <el-rate v-model="courseScheduleReview.pronunciation"
-                         disabled
-                         text-color="#ff9900"></el-rate>
+                <el-rate
+                  v-model="courseScheduleReview.pronunciation"
+                  disabled
+                  text-color="#ff9900"
+                ></el-rate>
               </div>
             </div>
-            <div class="rightCell"
-                 v-if="courseScheduleReview">
+            <div class="rightCell" v-if="courseScheduleReview">
               <p>节奏</p>
               <div class="chioseWrap">
-                <el-rate v-model="courseScheduleReview.tempo"
-                         disabled
-                         text-color="#ff9900"></el-rate>
+                <el-rate
+                  v-model="courseScheduleReview.tempo"
+                  disabled
+                  text-color="#ff9900"
+                ></el-rate>
               </div>
             </div>
-            <div class="rightCell"
-                 v-if="courseScheduleReview">
+            <div class="rightCell" v-if="courseScheduleReview">
               <p>乐理</p>
               <div class="chioseWrap">
-                <el-rate v-model="courseScheduleReview.musicTheory"
-                         disabled
-                         text-color="#ff9900"></el-rate>
+                <el-rate
+                  v-model="courseScheduleReview.musicTheory"
+                  disabled
+                  text-color="#ff9900"
+                ></el-rate>
               </div>
             </div>
             <div class="rightCell">
               <p>评价备注</p>
             </div>
-            <el-input type="textarea"
-                      disabled
-                      v-model="courseScheduleReview.memo"
-                      v-if="courseScheduleReview"></el-input>
+            <el-input
+              type="textarea"
+              disabled
+              v-model="courseScheduleReview.memo"
+              v-if="courseScheduleReview"
+            ></el-input>
           </div>
         </div>
       </div>
-      <div slot="footer"
-           class="dialog-footer">
+      <div slot="footer" class="dialog-footer">
         <el-button @click="netWorkVisible = false">取 消</el-button>
-        <el-button type="primary"
-                   @click="submitNetwork">确定</el-button>
+        <el-button type="primary" @click="submitNetwork">确定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -399,11 +433,11 @@ import {
   findEducationUsers,
   getPracticeGroup,
   getReviewInfo,
-  updateReviewInfo
+  updateReviewInfo,
 } from "@/api/buildTeam";
 export default {
   components: { pagination },
-  data () {
+  data() {
     return {
       netWorkVisible: false,
       searchForm: {
@@ -419,7 +453,7 @@ export default {
         homeWorkReplied: null,
         assignHomework: null,
         month: [],
-        practiceGroupType: null
+        practiceGroupType: null,
       },
       practiceGroupType: practiceGroupType,
       organList: [],
@@ -431,26 +465,27 @@ export default {
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
       value: null,
       teacherClassHeadInfo: null,
       courseScheduleReview: null,
       courseScheduleComplaints: null,
-      activeId: null
+      activeId: null,
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created () { },
+  created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
+  mounted() {
+    this.$store.dispatch("setBranchs");
     this.init();
   },
-  activated () {
+  activated() {
     this.init();
   },
   methods: {
-    init () {
+    init() {
       // 获取默认月份
       if (this.searchForm.month.length <= 0) {
         var now = new Date();
@@ -473,19 +508,19 @@ export default {
       }
 
       // 获取指导老师
-      getTeacher({}).then(res => {
+      getTeacher({}).then((res) => {
         if (res.code == 200) {
           this.teacherList = res.data;
         }
       });
       // 获取分部
-      getEmployeeOrgan().then(res => {
+      getEmployeeOrgan().then((res) => {
         if (res.code == 200) {
           this.organList = res.data;
         }
       });
       // 获取教务
-      findEducationUsers().then(res => {
+      findEducationUsers().then((res) => {
         if (res.code == 200) {
           this.educationList = res.data;
         }
@@ -493,7 +528,7 @@ export default {
 
       this.getList();
     },
-    getList () {
+    getList() {
       let obj = {};
       obj.organId = this.searchForm.organId || null;
       obj.teacherId = this.searchForm.teacherId || null;
@@ -512,22 +547,22 @@ export default {
         obj.startTime = this.searchForm.month[0];
         obj.endTime = this.searchForm.month[1];
       } else {
-        this.$message.error('请选择时间范围')
-        return
+        this.$message.error("请选择时间范围");
+        return;
       }
 
       obj.page = this.rules.page;
       obj.rows = this.rules.limit;
-      getPracticeGroup(obj).then(res => {
+      getPracticeGroup(obj).then((res) => {
         if (res.code == 200) {
           this.tableData = res.data.rows;
           this.rules.total = res.data.total;
         }
       });
     },
-    lookDetail (row) {
+    lookDetail(row) {
       this.activeId = row.reviewId;
-      getReviewInfo({ id: this.activeId }).then(res => {
+      getReviewInfo({ id: this.activeId }).then((res) => {
         if (res.code == 200) {
           this.teacherClassHeadInfo = res.data.teacherClassHeadInfo;
           this.courseScheduleReview = res.data.courseScheduleReview;
@@ -543,15 +578,15 @@ export default {
         }
       });
     },
-    submitNetwork () {
+    submitNetwork() {
       if (!this.courseScheduleReview.courseReview) {
         this.$message.error("请评价课程");
         return;
       }
       updateReviewInfo({
         id: this.activeId,
-        courseReview: this.courseScheduleReview.courseReview
-      }).then(res => {
+        courseReview: this.courseScheduleReview.courseReview,
+      }).then((res) => {
         if (res.code == 200) {
           this.$message.success("评价成功");
           this.netWorkVisible = false;
@@ -559,11 +594,11 @@ export default {
         }
       });
     },
-    search () {
+    search() {
       this.rules.page = 1;
       this.getList();
     },
-    onReSet () {
+    onReSet() {
       this.rules.page = 1;
       this.searchForm = {
         organId: null,
@@ -578,7 +613,7 @@ export default {
         hasArrived: null,
         homeWorkReplied: null,
         assignHomework: null,
-        practiceGroupType: null
+        practiceGroupType: null,
       };
       var now = new Date();
 
@@ -598,7 +633,7 @@ export default {
       this.searchForm.month.push(endDate);
       this.getList();
     },
-    netWorkExport () {
+    netWorkExport() {
       let url = "/api-web/export/courseReviews";
       let obj = {};
       this.searchForm.organId ? (obj.organId = this.searchForm.organId) : null;
@@ -628,34 +663,38 @@ export default {
       this.searchForm.homeWorkReplied
         ? (obj.homeWorkReplied = this.searchForm.homeWorkReplied)
         : null;
-      this.searchForm.assignHomework ? obj.assignHomework = this.searchForm.assignHomework : null
+      this.searchForm.assignHomework
+        ? (obj.assignHomework = this.searchForm.assignHomework)
+        : null;
       if (this.searchForm.month && this.searchForm.month.length > 0) {
         obj.startTime = this.searchForm.month[0];
         obj.endTime = this.searchForm.month[1];
       } else {
-        this.$message.error('请选择时间范围')
-        return
+        this.$message.error("请选择时间范围");
+        return;
       }
-      this.searchForm.practiceGroupType ? obj.practiceGroupType = this.searchForm.practiceGroupType : null;
+      this.searchForm.practiceGroupType
+        ? (obj.practiceGroupType = this.searchForm.practiceGroupType)
+        : null;
       const options = {
         method: "POST",
         headers: {
-          Authorization: getToken()
+          Authorization: getToken(),
         },
         data: qs.stringify(obj),
         url,
-        responseType: "blob"
+        responseType: "blob",
       };
       this.$confirm("您确定导出评价列表", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
-          axios(options).then(res => {
+          axios(options).then((res) => {
             let blob = new Blob([res.data], {
               // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-              type: "application/vnd.ms-excel;charset=utf-8"
+              type: "application/vnd.ms-excel;charset=utf-8",
               //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
             });
             let objectUrl = URL.createObjectURL(blob);
@@ -678,17 +717,17 @@ export default {
             link.click();
           });
         })
-        .catch(() => { });
-    }
+        .catch(() => {});
+    },
   },
   filters: {
-    studentReviewFilter (val) {
+    studentReviewFilter(val) {
       let arr = ["未评价", "1星", "2星", "3星", "4星", "5星"];
       return arr[val];
-    }
+    },
   },
   computed: {
-    teachingMaterial () {
+    teachingMaterial() {
       if (
         this.courseScheduleReview &&
         this.courseScheduleReview.teachingMaterial
@@ -698,14 +737,14 @@ export default {
         return "";
       }
     },
-    mychiose () {
+    mychiose() {
       if (this.courseScheduleReview && this.courseScheduleReview.courseReview) {
         return this.courseScheduleReview.courseReview;
       } else {
         return "";
       }
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang='scss' scoped>

+ 295 - 252
src/views/evaluateManager/vipEvaluateList.vue

@@ -1,167 +1,187 @@
 <!--  -->
 <template>
   <div class="m-core">
-    <el-form :inline="true"
-             class="searchForm"
-             v-model.trim="searchForm">
+    <save-form
+      :inline="true"
+      save-key="commentManager-vipEvaluateList"
+      class="searchForm"
+      :model="searchForm"
+      @submit="search"
+      @reset="onReSet"
+    >
       <!-- 状态 指导老师 活动方案-->
       <el-form-item>
-        <el-input v-model.trim="searchForm.search"
-                  @keyup.enter.native="search"
-                  placeholder="请输入课程组名称 ID"></el-input>
+        <el-input
+          v-model.trim="searchForm.search"
+          @keyup.enter.native="search"
+          clearable
+          placeholder="请输入课程组名称 ID"
+        ></el-input>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="请选择分部"
-                   v-model="searchForm.organId"
-                   clearable>
-          <el-option v-for="(item,index) in organList"
-                     :label="item.name"
-                     :value="item.id"
-                     :key="index"></el-option>
+        <el-select
+          placeholder="请选择分部"
+          v-model="searchForm.organId"
+          clearable
+        >
+          <el-option
+            v-for="(item, index) in selects.branchs"
+            :label="item.name"
+            :value="item.id"
+            :key="index"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="指导老师"
-                   v-model="searchForm.teacherId"
-                   clearable
-                   filterable>
-          <el-option v-for="(item,index) in teacherList"
-                     :label="item.realName"
-                     :value="item.id"
-                     :key="index"></el-option>
+        <el-select
+          placeholder="指导老师"
+          v-model="searchForm.teacherId"
+          clearable
+          filterable
+        >
+          <el-option
+            v-for="(item, index) in teacherList"
+            :label="item.realName"
+            :value="item.id"
+            :key="index"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-select v-model.trim="searchForm.eduTeacherId"
-                   filterable
-                   clearable
-                   placeholder="乐团主管">
-          <el-option v-for="(item,index) in educationList"
-                     :key="index"
-                     :value="item.userId"
-                     :label="item.userName"></el-option>
+        <el-select
+          v-model.trim="searchForm.eduTeacherId"
+          filterable
+          clearable
+          placeholder="乐团主管"
+        >
+          <el-option
+            v-for="(item, index) in educationList"
+            :key="index"
+            :value="item.userId"
+            :label="item.userName"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-select placeholder="老师评价"
-                   v-model="searchForm.hasReview"
-                   clearable>
-          <el-option label="评价"
-                     value="1"></el-option>
-          <el-option label="评价"
-                     value="0"></el-option>
+        <el-select
+          placeholder="老师评价"
+          v-model="searchForm.hasReview"
+          clearable
+        >
+          <el-option label="评价" value="1"></el-option>
+          <el-option label="未评价" value="0"></el-option>
         </el-select>
       </el-form-item>
-      <!-- <el-form-item>
-        <el-select placeholder="教务评价"
-                   v-model="searchForm.courseReview"
-                   clearable>
-          <el-option label="好"
-                     value="好"></el-option>
-          <el-option label="中"
-                     value="中"></el-option>
-          <el-option label="差"
-                     value="差"></el-option>
-        </el-select>
-      </el-form-item> -->
-      <!-- <el-form-item>
-        <el-select placeholder="是否到课"
-                   v-model="searchForm.hasArrived"
-                   clearable>
-          <el-option label="到课"
-                     value="1"></el-option>
-          <el-option label="未到"
-                     value="0"></el-option>
-        </el-select>
-      </el-form-item> -->
-      <!-- homeWorkReplied -->
       <el-form-item>
-        <el-select placeholder="布置作业"
-                   v-model="searchForm.assignHomework"
-                   clearable>
-          <el-option label="是"
-                     value="1"></el-option>
-          <el-option label="否"
-                     value="0"></el-option>
+        <el-select
+          placeholder="布置作业"
+          v-model="searchForm.assignHomework"
+          clearable
+        >
+          <el-option label="是" value="1"></el-option>
+          <el-option label="否" value="0"></el-option>
         </el-select>
       </el-form-item>
-      <!-- <el-form-item>
-        <el-select placeholder="回复作业"
-                   v-model="searchForm.homeWorkReplied"
-                   clearable>
-          <el-option label="是"
-                     value="1"></el-option>
-          <el-option label="否"
-                     value="0"></el-option>
-        </el-select>
-      </el-form-item> -->
       <el-form-item>
-        <el-date-picker :clearable="false"
-                        v-model="searchForm.month"
-                        type="daterange"
-                        value-format="yyyy-MM-dd"
-                        format="yyyy-MM-dd"
-                        :picker-options="{
-        firstDayOfWeek: 1
-    }"
-                        range-separator="-"
-                        start-placeholder="开始日期"
-                        end-placeholder="结束日期">
-          ></el-date-picker>
+        <el-date-picker
+          :clearable="false"
+          v-model="searchForm.month"
+          type="daterange"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          :picker-options="{
+            firstDayOfWeek: 1,
+          }"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        >
+          ></el-date-picker
+        >
       </el-form-item>
-      <br>
+      <br />
       <el-form-item>
-        <el-button @click="search"
-                   type="danger">搜索</el-button>
-        <el-button @click="onReSet"
-                   type="primary">重置</el-button>
-        <el-button type="primary"
-                   v-if="tableData.length > 0"
-                   v-permission="'export/courseReviews'"
-                   @click="netWorkExport">导出</el-button>
+        <el-button native-type="submit" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
+        <el-button
+          type="primary"
+          v-if="tableData.length > 0"
+          v-permission="'export/courseReviews'"
+          @click="netWorkExport"
+          >导出</el-button
+        >
       </el-form-item>
-    </el-form>
+    </save-form>
     <div class="tableWrap">
-      <el-table style="width: 100%"
-                :header-cell-style="{background:'#EDEEF0',color:'#444'}"
-                :data="tableData">
-        <el-table-column align="center"
-                         prop="organName"
-                         label="分部名称"></el-table-column>
-        <el-table-column align="center"
-                         prop="id"
-                         label="课程编号"></el-table-column>
-        <el-table-column align="center"
-                         prop="courseName"
-                         label="课程名称"></el-table-column>
-        <el-table-column align="center"
-                         prop="courseName"
-                         label="上课日期">
+      <el-table
+        style="width: 100%"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        :data="tableData"
+      >
+        <el-table-column align="center" prop="organName" label="分部名称">
+          <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.organName }}
+            </copy-text>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="id" label="课程编号">
+          <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.id }}
+            </copy-text>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="courseName" label="课程名称">
+          <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.courseName }}
+            </copy-text>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="courseName" label="上课日期">
           <template slot-scope="scope">
             <div>
               {{ scope.row.classDate | formatTimer }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         prop="subjectName"
-                         label="声部"></el-table-column>
-        <el-table-column align="center"
-                         prop="teacherName"
-                         label="指导老师"></el-table-column>
-        <el-table-column align="center"
-                         prop="eduTeacherName"
-                         label="乐团主管"></el-table-column>
-        <el-table-column align="center"
-                         label="老师评价">
+        <el-table-column
+          align="center"
+          prop="subjectName"
+          label="声部"
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          prop="teacherName"
+          label="指导老师"
+        >
+             <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.teacherName }}
+            </copy-text>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="eduTeacherName"
+          label="乐团主管"
+        >
+              <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.eduTeacherName }}
+            </copy-text>
+          </template>
+
+        </el-table-column>
+        <el-table-column align="center" label="老师评价">
           <template slot-scope="scope">
-            <div>{{scope.row.reviewId>0?'评价':'未评价'}}</div>
+            <div>{{ scope.row.reviewId > 0 ? "评价" : "未评价" }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
-                         label="布置作业">
+        <el-table-column align="center" label="布置作业">
           <template slot-scope="scope">
-            <div>{{scope.row.assignHomework?'是':'否'}}</div>
+            <div>{{ scope.row.assignHomework ? "是" : "否" }}</div>
           </template>
         </el-table-column>
         <!-- <el-table-column align="center"
@@ -170,158 +190,176 @@
             <div>{{scope.row.attendanceId>0?'到课':'未到'}}</div>
           </template>
         </el-table-column> -->
-        <el-table-column align="center"
-                         label="操作">
+        <el-table-column align="center" label="操作">
           <!-- v-permission="'evaluateList/look'" -->
           <template slot-scope="scope">
             <div>
-              <el-button type="text"
-                         v-if="scope.row.reviewId"
-                         @click="lookDetail(scope.row)">查看</el-button>
+              <el-button
+                type="text"
+                v-if="scope.row.reviewId"
+                @click="lookDetail(scope.row)"
+                >查看</el-button
+              >
             </div>
           </template>
         </el-table-column>
       </el-table>
-      <pagination :total="rules.total"
-                  :page.sync="rules.page"
-                  :limit.sync="rules.limit"
-                  :page-sizes="rules.page_size"
-                  @pagination="getList" />
+      <pagination
+        sync
+        :total.sync="rules.total"
+        :page.sync="rules.page"
+        :limit.sync="rules.limit"
+        :page-sizes="rules.page_size"
+        @pagination="getList"
+      />
     </div>
-    <el-dialog title="vip评价详情"
-               :visible.sync="netWorkVisible"
-               width="800px">
+    <el-dialog title="vip评价详情" :visible.sync="netWorkVisible" width="800px">
       <div class="wrap">
         <div class="commitLeft">
-          <div class="leftCell"
-               v-if="teacherClassHeadInfo">
+          <div class="leftCell" v-if="teacherClassHeadInfo">
             <p>课程班名称</p>
-            <p>{{teacherClassHeadInfo.classGroupName}}</p>
+            <p>{{ teacherClassHeadInfo.classGroupName }}</p>
           </div>
-          <div class="leftCell"
-               v-if="teacherClassHeadInfo">
+          <div class="leftCell" v-if="teacherClassHeadInfo">
             <p>上课时间</p>
-            <p>{{teacherClassHeadInfo.classDate+' '+teacherClassHeadInfo.startClassTime+'-'+teacherClassHeadInfo.endClassTime}}</p>
+            <p>
+              {{
+                teacherClassHeadInfo.classDate +
+                " " +
+                teacherClassHeadInfo.startClassTime +
+                "-" +
+                teacherClassHeadInfo.endClassTime
+              }}
+            </p>
           </div>
-          <div class="leftCell"
-               v-if="teacherClassHeadInfo">
+          <div class="leftCell" v-if="teacherClassHeadInfo">
             <p>乐器</p>
-            <p>{{teacherClassHeadInfo.subjectNames}}</p>
+            <p>{{ teacherClassHeadInfo.subjectNames }}</p>
           </div>
-          <div class="leftCell"
-               v-if="teacherClassHeadInfo">
+          <div class="leftCell" v-if="teacherClassHeadInfo">
             <p>指导老师</p>
-            <p>{{teacherClassHeadInfo.bishopTeacher}}</p>
+            <p>{{ teacherClassHeadInfo.bishopTeacher }}</p>
           </div>
-          <div class="leftCell"
-               v-if="teacherClassHeadInfo">
+          <div class="leftCell" v-if="teacherClassHeadInfo">
             <p>学员</p>
-            <p>{{teacherClassHeadInfo.studentNames}}</p>
+            <p>{{ teacherClassHeadInfo.studentNames }}</p>
           </div>
-          <div class="leftCell"
-               v-if="courseScheduleReview">
+          <div class="leftCell" v-if="courseScheduleReview">
             <p>回访日期</p>
-            <p>{{ courseScheduleReview.createTime.substring(0,10) }}</p>
+            <p>{{ courseScheduleReview.createTime.substring(0, 10) }}</p>
           </div>
           <!-- <div class="leftCell"
                v-if="courseScheduleReview">
             <p>是否双向沟通</p>
             <p>{{courseScheduleReview.hasLiaison?'是':'否'}}</p>
           </div> -->
-          <div class="leftCell"
-               v-if="courseScheduleReview">
+          <div class="leftCell" v-if="courseScheduleReview">
             <p>是否提交作业</p>
-            <p>{{courseScheduleReview.handHomework?'是':'否'}}</p>
+            <p>{{ courseScheduleReview.handHomework ? "是" : "否" }}</p>
           </div>
-          <div class="leftCell"
-               v-if="courseScheduleReview">
+          <div class="leftCell" v-if="courseScheduleReview">
             <p>乐团主管</p>
-            <p>{{courseScheduleReview.eduTeacherName}}</p>
+            <p>{{ courseScheduleReview.eduTeacherName }}</p>
           </div>
           <div class="leftCell">
             <p>课程评价</p>
             <div class="chioseWrap">
-              <el-tag :type="mychiose =='好'?'danger':'info'"
-                      @click="courseScheduleReview.courseReview='好'">好</el-tag>
-              <el-tag :type="mychiose == '中'?'danger':'info'"
-                      @click="courseScheduleReview.courseReview='中'">中</el-tag>
-              <el-tag :type="mychiose == '差'?'danger':'info'"
-                      @click="courseScheduleReview.courseReview='差'">差</el-tag>
+              <el-tag
+                :type="mychiose == '好' ? 'danger' : 'info'"
+                @click="courseScheduleReview.courseReview = '好'"
+                >好</el-tag
+              >
+              <el-tag
+                :type="mychiose == '中' ? 'danger' : 'info'"
+                @click="courseScheduleReview.courseReview = '中'"
+                >中</el-tag
+              >
+              <el-tag
+                :type="mychiose == '差' ? 'danger' : 'info'"
+                @click="courseScheduleReview.courseReview = '差'"
+                >差</el-tag
+              >
             </div>
           </div>
         </div>
         <div class="commitRight">
           <div v-if="courseScheduleComplaints">
-            <div v-for="(item,index) in   courseScheduleComplaints"
-                 :key="index">
+            <div v-for="(item, index) in courseScheduleComplaints" :key="index">
               <div class="rightCell">
-                <p>{{item.username}}</p>
+                <p>{{ item.username }}</p>
                 <div class="chioseWrap">
-                  <el-rate v-model="item.score"
-                           disabled
-                           text-color="#ff9900"></el-rate>
+                  <el-rate
+                    v-model="item.score"
+                    disabled
+                    text-color="#ff9900"
+                  ></el-rate>
                 </div>
               </div>
-              <el-input type="textarea"
-                        v-model="item.reason"
-                        disabled></el-input>
+              <el-input
+                type="textarea"
+                v-model="item.reason"
+                disabled
+              ></el-input>
             </div>
           </div>
           <div v-if="courseScheduleReview">
-            <div class="rightCell"
-                 v-if="courseScheduleReview">
+            <div class="rightCell" v-if="courseScheduleReview">
               <p>教材内容</p>
             </div>
-            <el-input type="textarea"
-                      disabled
-                      v-model="teachingMaterial"></el-input>
-            <div class="leftCell"
-                 v-if="courseScheduleReview">
+            <el-input
+              type="textarea"
+              disabled
+              v-model="teachingMaterial"
+            ></el-input>
+            <div class="leftCell" v-if="courseScheduleReview">
               <p>曲目</p>
               <p>{{ courseScheduleReview.song }}</p>
             </div>
-            <div class="rightCell"
-                 v-if="courseScheduleReview">
+            <div class="rightCell" v-if="courseScheduleReview">
               <p>发音</p>
               <div class="chioseWrap">
-                <el-rate v-model="courseScheduleReview.pronunciation"
-                         disabled
-                         text-color="#ff9900"></el-rate>
+                <el-rate
+                  v-model="courseScheduleReview.pronunciation"
+                  disabled
+                  text-color="#ff9900"
+                ></el-rate>
               </div>
             </div>
-            <div class="rightCell"
-                 v-if="courseScheduleReview">
+            <div class="rightCell" v-if="courseScheduleReview">
               <p>节奏</p>
               <div class="chioseWrap">
-                <el-rate v-model="courseScheduleReview.tempo"
-                         disabled
-                         text-color="#ff9900"></el-rate>
+                <el-rate
+                  v-model="courseScheduleReview.tempo"
+                  disabled
+                  text-color="#ff9900"
+                ></el-rate>
               </div>
             </div>
-            <div class="rightCell"
-                 v-if="courseScheduleReview">
+            <div class="rightCell" v-if="courseScheduleReview">
               <p>乐理</p>
               <div class="chioseWrap">
-                <el-rate v-model="courseScheduleReview.musicTheory"
-                         disabled
-                         text-color="#ff9900"></el-rate>
+                <el-rate
+                  v-model="courseScheduleReview.musicTheory"
+                  disabled
+                  text-color="#ff9900"
+                ></el-rate>
               </div>
             </div>
             <div class="rightCell">
               <p>评价备注</p>
             </div>
-            <el-input type="textarea"
-                      disabled
-                      v-model="courseScheduleReview.memo"
-                      v-if="courseScheduleReview"></el-input>
+            <el-input
+              type="textarea"
+              disabled
+              v-model="courseScheduleReview.memo"
+              v-if="courseScheduleReview"
+            ></el-input>
           </div>
         </div>
       </div>
-      <div slot="footer"
-           class="dialog-footer">
+      <div slot="footer" class="dialog-footer">
         <el-button @click="netWorkVisible = false">取 消</el-button>
-        <el-button type="primary"
-                   @click="submitNetwork">确定</el-button>
+        <el-button type="primary" @click="submitNetwork">确定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -339,11 +377,11 @@ import {
   findEducationUsers,
   getReviewInfo,
   updateReviewInfo,
-  getVipGroup
+  getVipGroup,
 } from "@/api/buildTeam";
 export default {
   components: { pagination },
-  data () {
+  data() {
     return {
       netWorkVisible: false,
       searchForm: {
@@ -359,7 +397,7 @@ export default {
         homeWorkReplied: null,
         assignHomework: null,
         month: [],
-        practiceGroupType: null
+        practiceGroupType: null,
       },
       practiceGroupType: practiceGroupType,
       organList: [],
@@ -371,26 +409,27 @@ export default {
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
       value: null,
       teacherClassHeadInfo: null,
       courseScheduleReview: null,
       courseScheduleComplaints: null,
-      activeId: null
+      activeId: null,
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created () { },
+  created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
+  mounted() {
+    this.$store.dispatch("setBranchs");
     this.init();
   },
-  activated () {
+  activated() {
     this.init();
   },
   methods: {
-    init () {
+    init() {
       // 获取默认月份
       if (this.searchForm.month.length <= 0) {
         var now = new Date();
@@ -413,19 +452,19 @@ export default {
       }
 
       // 获取指导老师
-      getTeacher({}).then(res => {
+      getTeacher({}).then((res) => {
         if (res.code == 200) {
           this.teacherList = res.data;
         }
       });
       // 获取分部
-      getEmployeeOrgan().then(res => {
+      getEmployeeOrgan().then((res) => {
         if (res.code == 200) {
           this.organList = res.data;
         }
       });
       // 获取教务
-      findEducationUsers().then(res => {
+      findEducationUsers().then((res) => {
         if (res.code == 200) {
           this.educationList = res.data;
         }
@@ -433,7 +472,7 @@ export default {
 
       this.getList();
     },
-    getList () {
+    getList() {
       let obj = {};
       obj.organId = this.searchForm.organId || null;
       obj.teacherId = this.searchForm.teacherId || null;
@@ -452,22 +491,22 @@ export default {
         obj.startTime = this.searchForm.month[0];
         obj.endTime = this.searchForm.month[1];
       } else {
-        this.$message.error('请选择时间范围')
-        return
+        this.$message.error("请选择时间范围");
+        return;
       }
 
       obj.page = this.rules.page;
       obj.rows = this.rules.limit;
-      getVipGroup(obj).then(res => {
+      getVipGroup(obj).then((res) => {
         if (res.code == 200) {
           this.tableData = res.data.rows;
           this.rules.total = res.data.total;
         }
       });
     },
-    lookDetail (row) {
+    lookDetail(row) {
       this.activeId = row.reviewId;
-      getReviewInfo({ id: this.activeId }).then(res => {
+      getReviewInfo({ id: this.activeId }).then((res) => {
         if (res.code == 200) {
           this.teacherClassHeadInfo = res.data.teacherClassHeadInfo;
           this.courseScheduleReview = res.data.courseScheduleReview;
@@ -483,15 +522,15 @@ export default {
         }
       });
     },
-    submitNetwork () {
+    submitNetwork() {
       if (!this.courseScheduleReview.courseReview) {
         this.$message.error("请评价课程");
         return;
       }
       updateReviewInfo({
         id: this.activeId,
-        courseReview: this.courseScheduleReview.courseReview
-      }).then(res => {
+        courseReview: this.courseScheduleReview.courseReview,
+      }).then((res) => {
         if (res.code == 200) {
           this.$message.success("评价成功");
           this.netWorkVisible = false;
@@ -499,11 +538,11 @@ export default {
         }
       });
     },
-    search () {
+    search() {
       this.rules.page = 1;
       this.getList();
     },
-    onReSet () {
+    onReSet() {
       this.rules.page = 1;
       this.searchForm = {
         organId: null,
@@ -518,7 +557,7 @@ export default {
         hasArrived: null,
         homeWorkReplied: null,
         assignHomework: null,
-        practiceGroupType: null
+        practiceGroupType: null,
       };
       var now = new Date();
 
@@ -538,7 +577,7 @@ export default {
       this.searchForm.month.push(endDate);
       this.getList();
     },
-    netWorkExport () {
+    netWorkExport() {
       let url = "/api-web/export/courseReviews";
       let obj = {};
       this.searchForm.organId ? (obj.organId = this.searchForm.organId) : null;
@@ -568,34 +607,38 @@ export default {
       this.searchForm.homeWorkReplied
         ? (obj.homeWorkReplied = this.searchForm.homeWorkReplied)
         : null;
-      this.searchForm.assignHomework ? obj.assignHomework = this.searchForm.assignHomework : null
+      this.searchForm.assignHomework
+        ? (obj.assignHomework = this.searchForm.assignHomework)
+        : null;
       if (this.searchForm.month && this.searchForm.month.length > 0) {
         obj.startTime = this.searchForm.month[0];
         obj.endTime = this.searchForm.month[1];
       } else {
-        this.$message.error('请选择时间范围')
-        return
+        this.$message.error("请选择时间范围");
+        return;
       }
-      this.searchForm.practiceGroupType ? obj.practiceGroupType = this.searchForm.practiceGroupType : null;
+      this.searchForm.practiceGroupType
+        ? (obj.practiceGroupType = this.searchForm.practiceGroupType)
+        : null;
       const options = {
         method: "POST",
         headers: {
-          Authorization: getToken()
+          Authorization: getToken(),
         },
         data: qs.stringify(obj),
         url,
-        responseType: "blob"
+        responseType: "blob",
       };
       this.$confirm("您确定导出评价列表", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
-          axios(options).then(res => {
+          axios(options).then((res) => {
             let blob = new Blob([res.data], {
               // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-              type: "application/vnd.ms-excel;charset=utf-8"
+              type: "application/vnd.ms-excel;charset=utf-8",
               //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
             });
             let objectUrl = URL.createObjectURL(blob);
@@ -618,17 +661,17 @@ export default {
             link.click();
           });
         })
-        .catch(() => { });
-    }
+        .catch(() => {});
+    },
   },
   filters: {
-    studentReviewFilter (val) {
+    studentReviewFilter(val) {
       let arr = ["未评价", "1星", "2星", "3星", "4星", "5星"];
       return arr[val];
-    }
+    },
   },
   computed: {
-    teachingMaterial () {
+    teachingMaterial() {
       if (
         this.courseScheduleReview &&
         this.courseScheduleReview.teachingMaterial
@@ -638,14 +681,14 @@ export default {
         return "";
       }
     },
-    mychiose () {
+    mychiose() {
       if (this.courseScheduleReview && this.courseScheduleReview.courseReview) {
         return this.courseScheduleReview.courseReview;
       } else {
         return "";
       }
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang='scss' scoped>

+ 10 - 4
src/views/luckyDraw/trophyManager.vue

@@ -158,6 +158,7 @@ import trophyCreate from './trophyCreate'
 import dayjs from 'dayjs';
 import numeral from 'numeral';
 import cleanDeep from 'clean-deep';
+import { Searchs } from '@/helpers'
 import { luckDrawPrizeList, luckDrawPrizeUpdate, luckDrawGroupFindAll } from './api'
 const validNumber1 = (rule, value, callback) => {
     const re = /^[0-9]+$/
@@ -221,12 +222,13 @@ export default {
         };
     },
     //生命周期 - 创建完成(可以访问当前this实例)
-    created () {
+    async created () {
         // 设置默认为当前周
+          await this.__init()
     },
     //生命周期 - 挂载完成(可以访问DOM元素)
-    async mounted () {
-        await this.__init()
+    mounted () {
+
     },
     methods: {
         async __init() {
@@ -236,6 +238,10 @@ export default {
                 if(res.code == 200) {
                     this.groupList = result?.length > 0 ? result : []
                     this.searchForm.groupId = query.groupId ? Number(query.groupId) : this.groupList[0]?.id
+                     const searchs = new Searchs(this.$route.path)
+                     if(searchs.get().form?.groupId){
+                        this.searchForm.groupId = searchs.get().form?.groupId
+                     }
                 }
             })
 
@@ -310,4 +316,4 @@ export default {
         }
     }
 };
-</script>
+</script>

+ 2 - 7
src/views/studentManager/components/studentRecord.vue

@@ -316,13 +316,8 @@ export default {
     },
     onReSet () {
       // 重置搜索
-      this.searchForm = {
-        studentId: this.$route.query.userId,
-        classGroupType: null,
-        attendanceStatus: null,
-        classGroupName: null,
-        teacherName: null
-      };
+      this.$refs.searchForm.resetFields();
+      this.searchForm.studentId = this.$route.query.userId;
       this.getList();
     }
   }