Tang 3 年之前
父節點
當前提交
91adc3b13d

+ 2 - 2
src/components/tableList.vue

@@ -920,7 +920,7 @@
                 : scope.row[item.prop] === 0
                 ? "未通过"
                 : scope.row[item.prop] === 1
-                ? "通过"
+                ? "通过"
                 : scope.row[item.prop] === 3
                 ? "审核中"
                 : ""
@@ -938,7 +938,7 @@
                 : scope.row[item.prop] === 0
                 ? "未通过"
                 : scope.row[item.prop] === 1
-                ? "通过"
+                ? "通过"
                 : scope.row[item.prop] === 3
                 ? "审核中"
                 : ""

+ 58 - 37
src/views/education/classManageMent/classHoursReview/studyTimes.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="classHoursReview">
-    <div>
-      <div class="dis_fs">
+    <div class="topBoxStyle">
+      <div class="dis_fs" :style="showBox ? '' : 'height:0px;'">
         <ul class="ul_ls">
           <li>学员编码:{{ userData.studentCode }}</li>
           <li>学员姓名:{{ userData.realName }}</li>
@@ -11,15 +11,15 @@
         <div class="photoSty1">
           <img
             style="width: 100%; height: 100%"
-            v-if="!recent_photos"
+            v-if="!userData.oneInchPhotos"
             src="@/assets/404_images/wuyuxaog.png"
             alt=""
           />
           <el-image
             v-else
             style="width: 100%; height: 100%"
-            :src="$methodsTools.splitImgHost(recent_photos)"
-            :preview-src-list="[$methodsTools.splitImgHost(recent_photos)]"
+            :src="$methodsTools.splitImgHost(userData.oneInchPhotos)"
+            :preview-src-list="[$methodsTools.splitImgHost(userData.oneInchPhotos)]"
           >
           </el-image>
           <div class="pos_bottom">一寸头像图</div>
@@ -27,38 +27,45 @@
         <div class="photoSty2">
           <img
             style="width: 100%; height: 100%"
-            v-if="!idcard_face_photo"
+            v-if="!userData.idCardImg1"
             src="@/assets/404_images/wuyuxaog.png"
             alt=""
           />
           <el-image
             v-else
             style="width: 100%; height: 100%"
-            :src="$methodsTools.splitImgHost(idcard_face_photo)"
-            :preview-src-list="[$methodsTools.splitImgHost(idcard_face_photo)]"
+            :src="$methodsTools.splitImgHost(userData.idCardImg1)"
+            :preview-src-list="[$methodsTools.splitImgHost(userData.idCardImg1)]"
           >
           </el-image>
-          <div class="pos_bottom">身份证正面照片</div>
+          <div class="pos_bottom">身份证头像照</div>
         </div>
         <div class="photoSty2" style="margin-right: 0px">
           <img
             style="width: 100%; height: 100%"
-            v-if="!idcard_national_photo"
+            v-if="!userData.idCardImg2"
             src="@/assets/404_images/wuyuxaog.png"
             alt=""
           />
           <el-image
             v-else
             style="width: 100%; height: 100%"
-            :src="$methodsTools.splitImgHost(idcard_national_photo)"
+            :src="$methodsTools.splitImgHost(userData.idCardImg2)"
             :preview-src-list="[
-              $methodsTools.splitImgHost(idcard_national_photo),
+              $methodsTools.splitImgHost(userData.idCardImg2),
             ]"
           >
           </el-image>
-          <div class="pos_bottom">身份证背面照片</div>
+          <div class="pos_bottom">身份证国徽照</div>
         </div>
       </div>
+      <el-button
+        class="btn_styleShow"
+        type="primary"
+        size="mini"
+        @click="showBox = !showBox"
+        >{{ showBox ? "收起" : "展开" }}</el-button
+      >
     </div>
 
     <div class="dis_fls">
@@ -257,7 +264,8 @@
                   <el-button
                     :disabled="scope.row.status !== 2"
                     class="btnstyles"
-                    size="mini"
+                    size="small"
+                    type="success"
                     :loading="disabledBtn"
                     @click="changeStatus(scope.row, 1, scope.$index)"
                     >通过</el-button
@@ -265,7 +273,8 @@
                   <el-button
                     :disabled="scope.row.status !== 2"
                     class="btnstyles"
-                    size="mini"
+                    size="small"
+                    type="warning"
                     @click="changeStatus(scope.row, 2, scope.$index)"
                     >作弊</el-button
                   >
@@ -381,7 +390,8 @@
                         <el-button
                           :disabled="scope2.row.status !== 2"
                           class="btnstyles"
-                          size="mini"
+                          size="small"
+                          type="success"
                           :loading="disabledBtn"
                           @click="
                             changeStatusCharpter(
@@ -396,7 +406,8 @@
                         <el-button
                           :disabled="scope2.row.status !== 2"
                           class="btnstyles"
-                          size="mini"
+                          size="small"
+                          type="warning"
                           @click="
                             changeStatusCharpter(
                               scope2.row,
@@ -500,7 +511,8 @@
                               <el-button
                                 :disabled="scope3.row.status !== 2"
                                 class="btnstyles"
-                                size="mini"
+                                size="small"
+                                type="success"
                                 :loading="disabledBtn"
                                 @click="
                                   changeStatusModule(
@@ -516,7 +528,8 @@
                               <el-button
                                 :disabled="scope3.row.status !== 2"
                                 class="btnstyles"
-                                size="mini"
+                                size="small"
+                                type="warning"
                                 @click="
                                   changeStatusModule(
                                     scope3.row,
@@ -544,7 +557,13 @@
                       >
                         <template slot-scope="scope3">
                           <span v-if="item.scope === 'select'">
-                            <span v-for="(k, ds) in item.options" :key="ds">
+                            <span
+                              v-for="(k, ds) in item.options"
+                              :key="ds"
+                              :style="
+                                scope3.row[item.prop] === 0 ? 'color:red;' : ''
+                              "
+                            >
                               {{
                                 k.value == scope3.row[item.prop] ? k.label : ""
                               }}
@@ -632,7 +651,11 @@
                 >
                   <template slot-scope="scope2">
                     <span v-if="item.scope === 'select'">
-                      <span v-for="(k, ds) in item.options" :key="ds">
+                      <span
+                        v-for="(k, ds) in item.options"
+                        :key="ds"
+                        :style="scope2.row[item.prop] === 0 ? 'color:red;' : ''"
+                      >
                         {{ k.value == scope2.row[item.prop] ? k.label : "" }}
                       </span>
                     </span>
@@ -713,7 +736,11 @@
           >
             <template slot-scope="scope">
               <span v-if="item.scope === 'select'">
-                <span v-for="(k, ds) in item.options" :key="ds">
+                <span
+                  v-for="(k, ds) in item.options"
+                  :key="ds"
+                  :style="scope.row[item.prop] === 0 ? 'color:red;' : ''"
+                >
                   {{ k.value == scope.row[item.prop] ? k.label : "" }}
                 </span>
               </span>
@@ -939,6 +966,7 @@
 export default {
   data() {
     return {
+      showBox: true,
       disabledBtn: false,
       msgTitle: [
         { label: "学习拍照异常", value: 1 },
@@ -1686,21 +1714,6 @@ export default {
             goodsId: this.$route.query.goodsId,
           })
           .then((res) => {
-            if (res.rows[0].keyValue) {
-              var data = JSON.parse(res.rows[0].keyValue);
-              this.recent_photos = data.recent_photos
-                ? data.recent_photos.value
-                : "";
-              this.idcard_face_photo = data.idcard_face_photo
-                ? data.idcard_face_photo.value
-                : "";
-              this.idcard_national_photo = data.idcard_national_photo
-                ? data.idcard_national_photo.value
-                : "";
-              this.realName = data.name.value;
-              this.idCard = data.idcard.value;
-              this.telPhone = data.telphone.value;
-            }
             this.userData = res.rows[0];
             resolve();
           });
@@ -1844,6 +1857,14 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.topBoxStyle {
+  position: relative;
+  .btn_styleShow {
+    position: absolute;
+    top: 0;
+    right: 0;
+  }
+}
 .li_sty {
   cursor: pointer;
   transition: all 0.3s;

+ 21 - 3
src/views/education/classManageMent/learningHoursRecordList/hoursTimesRecord.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="classHoursReview">
+  <div id="hoursTimesRecord">
     <div style="margin-bottom: 10px">
       <span style="margin-left: 10px"
         ><strong style="color: red">「1」</strong>所在班级:{{
@@ -22,8 +22,16 @@
         }}
         - {{ $methodsTools.onlyForma(userData.studyEndTime, false) }}</span
       >
+
+      <el-button
+        class="btn_styleShow"
+        type="primary"
+        size="mini"
+        @click="showBox = !showBox"
+        >{{ showBox ? "收起" : "展开" }}</el-button
+      >
     </div>
-    <div class="dis_fs">
+    <div class="dis_fs" :style="showBox ? '' : 'height:0px;'">
       <ul class="ul_ls">
         <li>学员编码:{{ userData.studentCode }}</li>
         <li>学员姓名:{{ userData.realName }}</li>
@@ -81,7 +89,7 @@
         <div class="pos_bottom">身份证背面照片</div>
       </div>
     </div>
-    <div style="margin-top: 12px">
+    <div style="margin-top: 12px; overflow: auto;height:100%;">
       <el-table
         v-loading="loading"
         ref="multipleTable"
@@ -198,6 +206,7 @@ export default {
         // pageNum: 1,
       },
       total: 0,
+      showBox: true,
     };
   },
   mounted() {
@@ -265,6 +274,14 @@ export default {
 </script>
 
 <style lang="less" scoped>
+#hoursTimesRecord {
+  max-height: 710px;
+  display: flex;
+  flex-direction: column;
+}
+.btn_styleShow {
+  float: right;
+}
 .styFlex {
   width: 80px;
   text-align: center;
@@ -284,6 +301,7 @@ export default {
   background-color: #eee;
   padding: 0px 30px;
   overflow: auto;
+  flex-shrink: 0;
   .ul_ls {
     margin-right: 30px;
     align-self: flex-start;

+ 109 - 83
src/views/education/classManageMent/learningHoursRecordList/studyTimesRecord.vue

@@ -22,66 +22,77 @@
         }}
         - {{ $methodsTools.onlyForma(userData.studyEndTime, false) }}</span
       >
+      <el-button
+        class="btn_styleShow"
+        type="primary"
+        size="mini"
+        @click="showBox = !showBox"
+        >{{ showBox ? "收起" : "展开" }}</el-button
+      >
+      <div style="clear:both;"></div>
     </div>
-
-    <div class="dis_fs">
-      <ul class="ul_ls">
-        <li>学员编码:{{ userData.studentCode }}</li>
-        <li>学员姓名:{{ userData.realName }}</li>
-        <li>学员身份证号码:{{ userData.idCard }}</li>
-        <li>绑定手机号码:{{ userData.telPhone }}</li>
-      </ul>
-      <div class="photoSty1">
-        <img
-          style="width: 100%; height: 100%"
-          v-if="!recent_photos"
-          src="@/assets/404_images/wuyuxaog.png"
-          alt=""
-        />
-        <el-image
-          v-else
-          style="width: 100%; height: 100%"
-          :src="$methodsTools.splitImgHost(recent_photos)"
-          :preview-src-list="[$methodsTools.splitImgHost(recent_photos)]"
-        >
-        </el-image>
-        <div class="pos_bottom">一寸头像图</div>
-      </div>
-      <div class="photoSty2">
-        <img
-          style="width: 100%; height: 100%"
-          v-if="!idcard_face_photo"
-          src="@/assets/404_images/wuyuxaog.png"
-          alt=""
-        />
-        <el-image
-          v-else
-          style="width: 100%; height: 100%"
-          :src="$methodsTools.splitImgHost(idcard_face_photo)"
-          :preview-src-list="[$methodsTools.splitImgHost(idcard_face_photo)]"
-        >
-        </el-image>
-        <div class="pos_bottom">身份证正面照片</div>
-      </div>
-      <div class="photoSty2" style="margin-right: 0px">
-        <img
-          style="width: 100%; height: 100%"
-          v-if="!idcard_national_photo"
-          src="@/assets/404_images/wuyuxaog.png"
-          alt=""
-        />
-        <el-image
-          v-else
-          style="width: 100%; height: 100%"
-          :src="$methodsTools.splitImgHost(idcard_national_photo)"
-          :preview-src-list="[
-            $methodsTools.splitImgHost(idcard_national_photo),
-          ]"
-        >
-        </el-image>
-        <div class="pos_bottom">身份证背面照片</div>
+      <div class="dis_fs" :style="showBox ? '' : 'height:0px;'">
+        <ul class="ul_ls">
+          <li>学员编码:{{ userData.studentCode }}</li>
+          <li>学员姓名:{{ userData.realName }}</li>
+          <li>学员身份证号码:{{ userData.idCard }}</li>
+          <li>绑定手机号码:{{ userData.telPhone }}</li>
+        </ul>
+        <div class="photoSty1">
+          <img
+            style="width: 100%; height: 100%"
+            v-if="!userData.oneInchPhotos"
+            src="@/assets/404_images/wuyuxaog.png"
+            alt=""
+          />
+          <el-image
+            v-else
+            style="width: 100%; height: 100%"
+            :src="$methodsTools.splitImgHost(userData.oneInchPhotos)"
+            :preview-src-list="[
+              $methodsTools.splitImgHost(userData.oneInchPhotos),
+            ]"
+          >
+          </el-image>
+          <div class="pos_bottom">一寸头像图</div>
+        </div>
+        <div class="photoSty2">
+          <img
+            style="width: 100%; height: 100%"
+            v-if="!userData.idCardImg1"
+            src="@/assets/404_images/wuyuxaog.png"
+            alt=""
+          />
+          <el-image
+            v-else
+            style="width: 100%; height: 100%"
+            :src="$methodsTools.splitImgHost(userData.idCardImg1)"
+            :preview-src-list="[
+              $methodsTools.splitImgHost(userData.idCardImg1),
+            ]"
+          >
+          </el-image>
+          <div class="pos_bottom">身份证头像照</div>
+        </div>
+        <div class="photoSty2" style="margin-right: 0px">
+          <img
+            style="width: 100%; height: 100%"
+            v-if="!userData.idCardImg2"
+            src="@/assets/404_images/wuyuxaog.png"
+            alt=""
+          />
+          <el-image
+            v-else
+            style="width: 100%; height: 100%"
+            :src="$methodsTools.splitImgHost(userData.idCardImg2)"
+            :preview-src-list="[
+              $methodsTools.splitImgHost(userData.idCardImg2),
+            ]"
+          >
+          </el-image>
+          <div class="pos_bottom">身份证国徽照</div>
+        </div>
       </div>
-    </div>
 
     <div class="dis_fls">
       <div class="s_sd">
@@ -159,7 +170,7 @@
         </span>
       </div>
     </div>
-    <div style="max-height: 350px; overflow: auto">
+    <div style="overflow: auto">
       <el-checkbox-group
         v-model="checkList"
         @change="handleCheckedCitiesChange"
@@ -279,7 +290,8 @@
                   <el-button
                     :disabled="scope.row.status !== 2"
                     class="btnstyles"
-                    size="mini"
+                    size="small"
+                    type="success"
                     :loading="disabledBtn"
                     @click="changeStatus(scope.row, 1, scope.$index)"
                     >通过</el-button
@@ -287,7 +299,8 @@
                   <el-button
                     :disabled="scope.row.status !== 2"
                     class="btnstyles"
-                    size="mini"
+                    size="small"
+                    type="warning"
                     @click="changeStatus(scope.row, 2, scope.$index)"
                     >作弊</el-button
                   >
@@ -403,7 +416,8 @@
                         <el-button
                           :disabled="scope2.row.status !== 2"
                           class="btnstyles"
-                          size="mini"
+                          size="small"
+                          type="success"
                           :loading="disabledBtn"
                           @click="
                             changeStatusCharpter(
@@ -418,7 +432,8 @@
                         <el-button
                           :disabled="scope2.row.status !== 2"
                           class="btnstyles"
-                          size="mini"
+                          size="small"
+                          type="warning"
                           @click="
                             changeStatusCharpter(
                               scope2.row,
@@ -522,7 +537,8 @@
                               <el-button
                                 :disabled="scope3.row.status !== 2"
                                 class="btnstyles"
-                                size="mini"
+                                size="small"
+                                type="success"
                                 :loading="disabledBtn"
                                 @click="
                                   changeStatusModule(
@@ -538,7 +554,8 @@
                               <el-button
                                 :disabled="scope3.row.status !== 2"
                                 class="btnstyles"
-                                size="mini"
+                                size="small"
+                                type="warning"
                                 @click="
                                   changeStatusModule(
                                     scope3.row,
@@ -566,7 +583,13 @@
                       >
                         <template slot-scope="scope3">
                           <span v-if="item.scope === 'select'">
-                            <span v-for="(k, ds) in item.options" :key="ds">
+                            <span
+                              v-for="(k, ds) in item.options"
+                              :key="ds"
+                              :style="
+                                scope3.row[item.prop] === 0 ? 'color:red;' : ''
+                              "
+                            >
                               {{
                                 k.value == scope3.row[item.prop] ? k.label : ""
                               }}
@@ -654,7 +677,11 @@
                 >
                   <template slot-scope="scope2">
                     <span v-if="item.scope === 'select'">
-                      <span v-for="(k, ds) in item.options" :key="ds">
+                      <span
+                        v-for="(k, ds) in item.options"
+                        :key="ds"
+                        :style="scope2.row[item.prop] === 0 ? 'color:red;' : ''"
+                      >
                         {{ k.value == scope2.row[item.prop] ? k.label : "" }}
                       </span>
                     </span>
@@ -735,7 +762,11 @@
           >
             <template slot-scope="scope">
               <span v-if="item.scope === 'select'">
-                <span v-for="(k, ds) in item.options" :key="ds">
+                <span
+                  v-for="(k, ds) in item.options"
+                  :key="ds"
+                  :style="scope.row[item.prop] === 0 ? 'color:red;' : ''"
+                >
                   {{ k.value == scope.row[item.prop] ? k.label : "" }}
                 </span>
               </span>
@@ -1163,6 +1194,7 @@ export default {
       allArrays: [], //审核中-所有数据
       popback: false, //打回待审核弹窗
       approvedOK: false, //确认审核通过结果
+      showBox: true,
     };
   },
   computed: {
@@ -1719,21 +1751,6 @@ export default {
             goodsId: this.objs.goodsId,
           })
           .then((res) => {
-            if (res.rows[0].keyValue) {
-              var data = JSON.parse(res.rows[0].keyValue);
-              this.recent_photos = data.recent_photos
-                ? data.recent_photos.value
-                : "";
-              this.idcard_face_photo = data.idcard_face_photo
-                ? data.idcard_face_photo.value
-                : "";
-              this.idcard_national_photo = data.idcard_national_photo
-                ? data.idcard_national_photo.value
-                : "";
-              this.realName = data.name.value;
-              this.idCard = data.idcard.value;
-              this.telPhone = data.telphone.value;
-            }
             this.userData = res.rows[0];
             resolve();
           });
@@ -1877,6 +1894,14 @@ export default {
 </script>
 
 <style lang="less" scoped>
+#classHoursReview {
+  max-height: 710px;
+  display: flex;
+  flex-direction: column;
+}
+.btn_styleShow {
+  float: right;
+}
 .li_sty {
   cursor: pointer;
   transition: all 0.3s;
@@ -1915,6 +1940,7 @@ export default {
   background-color: #eee;
   padding: 0px 30px;
   overflow: auto;
+  flex-shrink: 0;
   .ul_ls {
     margin-right: 30px;
     align-self: flex-start;

+ 15 - 362
src/views/education/notificationManageMent/notificationList/add/index.vue

@@ -18,6 +18,9 @@
             </el-select>
           </el-form-item>
           <el-form-item label="收件人:" prop="userId">
+            <el-button size="mini" type="primary" @click="checkUser"
+              >选择学员</el-button
+            >
             <ul>
               <li
                 style="float: left; margin-right: 6px"
@@ -161,106 +164,6 @@
           </div>
         </div>
       </el-col>
-      <el-col :span="8">
-        <header>
-          收件人
-          <span style="color: red; font-size: 14px"
-            >已选择{{ listData.userId.length }}</span
-          >
-        </header>
-        <div>
-          <div style="margin: 12px 0px">
-            <el-button
-              size="mini"
-              :type="active == 1 ? 'primary' : ''"
-              @click="activeBtns(1)"
-              >班级选择</el-button
-            >
-            <el-button
-              size="mini"
-              :type="active == 2 ? 'primary' : ''"
-              @click="activeBtns(2)"
-              >未分班学员</el-button
-            >
-            <el-button
-              size="mini"
-              :type="active == 3 ? 'primary' : ''"
-              @click="activeBtns(3)"
-              >层级选择</el-button
-            >
-          </div>
-          <div v-if="active === 1">
-            <el-input
-              style="margin-bottom: 10px"
-              size="small"
-              placeholder="输入关键字进行过滤"
-              v-model="filterText"
-            >
-            </el-input>
-            <div v-if="loadingBox" style="text-align: center">
-              <i class="el-icon-loading"></i
-              ><span style="font-size: 13px; margin-left: 8px"
-                >数据量大,正在加载中...</span
-              >
-            </div>
-            <el-tree
-              v-else
-              class="filter-tree"
-              :data="data"
-              :props="defaultProps"
-              node-key="onlyId"
-              show-checkbox
-              :render-after-expand="false"
-              :filter-node-method="filterNode"
-              ref="tree"
-              @check-change="activeChange"
-            >
-            </el-tree>
-          </div>
-          <div v-if="active === 2">
-            <el-input
-              style="margin-bottom: 10px"
-              size="small"
-              placeholder="输入关键字进行过滤"
-              v-model="filterTextTwo"
-            >
-            </el-input>
-            <el-tree
-              class="filter-tree"
-              :data="data1"
-              :props="defaultProps"
-              node-key="onlyId"
-              :render-after-expand="false"
-              show-checkbox
-              :filter-node-method="filterNode"
-              ref="tree1"
-              @check-change="activeChangeTwo"
-            >
-            </el-tree>
-          </div>
-          <div v-if="active === 3">
-            <el-input
-              style="margin-bottom: 10px"
-              size="small"
-              placeholder="输入关键字进行过滤"
-              v-model="filterTextThree"
-            >
-            </el-input>
-            <el-tree
-              class="filter-tree"
-              :data="data2"
-              :props="defaultProps"
-              :render-after-expand="false"
-              node-key="onlyId"
-              show-checkbox
-              :filter-node-method="filterNode"
-              ref="tree2"
-              @check-change="activeChangeThree"
-            >
-            </el-tree>
-          </div>
-        </div>
-      </el-col>
       <el-col :span="24" style="text-align: center; margin-top: 14px">
         <el-button @click="backPage">取消</el-button>
         <el-button type="primary" @click="submit('listData', 1)"
@@ -319,7 +222,7 @@
               <el-option
                 v-for="(item, index) in newBusinessLevel"
                 :key="index"
-                :label="item.businessName"
+                :label="item.projectName + item.businessName"
                 :value="item.id"
               >
               </el-option>
@@ -473,16 +376,18 @@
       </span>
     </el-dialog>
     <bankInfo ref="bankInfo" />
+    <check-user ref="checkUser" />
   </div>
 </template>
 
 <script>
+import checkUser from "../checkUser";
 import bankInfo from "@/components/bankInfo";
 import { mapGetters } from "vuex";
 import Editor from "@/components/Editor";
 export default {
   name: "NotificationListAdd",
-  components: { Editor, bankInfo },
+  components: { Editor, bankInfo, checkUser },
   data() {
     return {
       dialogCG: false,
@@ -496,6 +401,7 @@ export default {
         userId: [],
         informCourseAddBo: [],
         informExamAddBo: [],
+        userFrom:"",
       },
       arrays: [],
       loadingBox: true,
@@ -542,14 +448,7 @@ export default {
       userList: [], //学员列表
       options: [],
       uploadStatus: 2,
-      filterText: "",
-      filterTextTwo: "",
-      filterTextThree: "",
-      data: [],
-      data1: [],
-      data2: [],
       dataCourse: [], //商品课程树形
-      active: 1,
       defaultProps: {
         children: "children",
         label: "onlyName",
@@ -592,15 +491,6 @@ export default {
     },
   },
   watch: {
-    filterText(val) {
-      this.$refs.tree.filter(val);
-    },
-    filterTextTwo(val) {
-      this.$refs.tree1.filter(val);
-    },
-    filterTextThree(val) {
-      this.$refs.tree2.filter(val);
-    },
     "informCourseAdd.educationId"(v) {
       this.informCourseAdd = {
         educationId: v,
@@ -641,6 +531,13 @@ export default {
     });
   },
   methods: {
+    backUserList(int,arr){
+      this.listData.userFrom = int
+      this.listData.userId = arr
+    },
+    checkUser() {
+      this.$refs.checkUser.diavosFun(this.listData.userFrom,this.listData.userId);
+    },
     seeBank(item) {
       this.$refs.bankInfo.$emit("childmethod", item);
     },
@@ -883,113 +780,6 @@ export default {
         this.activeThree();
       }
     },
-    activeChange(a, isStatus) {
-      if (isNaN(a.onlyId)) {
-        if (isStatus) {
-          this.data[0].children.map((item) => {
-            item.children.map((items) => {
-              if (items.userId == a.onlyId.split("-").map(Number)[1]) {
-                this.$refs.tree.setChecked(items.onlyId, true);
-                if (
-                  this.listData.userId.indexOf(
-                    a.onlyId.split("-").map(Number)[1]
-                  ) == -1
-                ) {
-                  this.listData.userId.push(a.onlyId.split("-").map(Number)[1]);
-                }
-              }
-            });
-          });
-        } else {
-          this.data[0].children.map((item) => {
-            item.children.map((items) => {
-              if (items.userId == a.onlyId.split("-").map(Number)[1]) {
-                this.$refs.tree.setChecked(items.onlyId, false);
-                if (
-                  this.listData.userId.indexOf(
-                    a.onlyId.split("-").map(Number)[1]
-                  ) !== -1
-                ) {
-                  this.listData.userId.splice(
-                    this.listData.userId.indexOf(
-                      a.onlyId.split("-").map(Number)[1]
-                    ),
-                    1
-                  );
-                }
-              }
-            });
-          });
-        }
-      }
-    },
-    activeChangeTwo(a, isStatus) {
-      if (!isNaN(a.onlyId)) {
-        if (isStatus && this.listData.userId.indexOf(a.onlyId) == -1) {
-          this.listData.userId.push(a.onlyId);
-        }
-        if (!isStatus && this.listData.userId.indexOf(a.onlyId) !== -1) {
-          this.listData.userId.splice(
-            this.listData.userId.indexOf(a.onlyId),
-            1
-          );
-        }
-      }
-    },
-    activeChangeThree(a, isStatus) {
-      if (a.onlyId.split("-").map(Number).length === 4) {
-        if (isStatus) {
-          this.data2[0].children.map((item) => {
-            item.children.map((items) => {
-              items.children.map((itemsxs) => {
-                itemsxs.children.map((j) => {
-                  if (j.userId == a.onlyId.split("-").map(Number)[3]) {
-                    this.$refs.tree2.setChecked(j.onlyId, true);
-                    if (
-                      this.listData.userId.indexOf(
-                        a.onlyId.split("-").map(Number)[3]
-                      ) == -1
-                    ) {
-                      this.listData.userId.push(
-                        a.onlyId.split("-").map(Number)[3]
-                      );
-                    }
-                  }
-                });
-              });
-            });
-          });
-        } else {
-          this.data2[0].children.map((item) => {
-            item.children.map((items) => {
-              items.children.map((itemsxs) => {
-                itemsxs.children.map((j) => {
-                  if (j.userId == a.onlyId.split("-").map(Number)[3]) {
-                    this.$refs.tree2.setChecked(j.onlyId, false);
-                    if (
-                      this.listData.userId.indexOf(
-                        a.onlyId.split("-").map(Number)[3]
-                      ) !== -1
-                    ) {
-                      this.listData.userId.splice(
-                        this.listData.userId.indexOf(
-                          a.onlyId.split("-").map(Number)[3]
-                        ),
-                        1
-                      );
-                    }
-                  }
-                });
-              });
-            });
-          });
-        }
-      }
-    },
-    filterNode(value, data) {
-      if (!value) return true;
-      return data.onlyName.indexOf(value) !== -1;
-    },
     //返回上一页
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
@@ -1101,148 +891,11 @@ export default {
         });
       });
     },
-    recurFunc(x, y, total) {
-      this.$api
-        .inquiresysteminformlistGrade({ status: 1, pageNum: x, pageSize: y })
-        .then((res) => {
-          res.rows.forEach((item) => {
-            item.onlyId = item.gradeId;
-            item.onlyName = item.className;
-            item.children = item.classGradeStudentVos;
-            item.children.forEach((items) => {
-              items.onlyId = items.gradeId + "-" + items.userId;
-              items.onlyName = items.realName;
-            });
-          });
-          this.arrays = this.arrays.concat(res.rows);
-          if (this.arrays.length == total) {
-            this.data = [
-              {
-                onlyId: 99999999,
-                onlyName: "所有班级",
-                children: this.arrays,
-              },
-            ];
-            this.activeOne();
-            this.loadingBox = false;
-          }
-        });
-    },
     //初始获取备注分类
     getMes() {
       this.$api.inquiresystemclassifylist({ status: 1 }).then((res) => {
         this.options = this.handleTree(res.rows, "classifyId", "parentId");
       });
-      this.$api
-        .inquiresysteminformlistGrade({ status: 1, pageNum: 1, pageSize: 1 })
-        .then((res) => {
-          let total = res.total;
-          let pagesize = 20; // 一页多少条
-          for (let i = 0; i < Math.ceil(total / pagesize); i++) {
-            this.recurFunc(i + 1, pagesize, total);
-          }
-        });
-      this.$api.inquiresysteminformlistGradeStudy({ status: 1 }).then((res) => {
-        res.rows.forEach((item, index) => {
-          item.onlyId = item.userId;
-          item.onlyName = item.realName;
-        });
-        this.data1 = [
-          {
-            onlyId: "1-1",
-            onlyName: "所有人",
-            children: res.rows,
-          },
-        ];
-      });
-      this.$api
-        .inquiresysteminformlistGradeService({ status: 1 })
-        .then((res) => {
-          res.rows.forEach((item) => {
-            item.onlyId = item.id + "";
-            item.onlyName = item.educationName;
-            item.children = item.courseUserProjectTypeVo;
-            item.children.forEach((items) => {
-              items.onlyName = items.projectName;
-              items.onlyId = items.educationId + "-" + items.id;
-              items.children = items.courseUserBusiness;
-              items.children.forEach((itemsxs) => {
-                itemsxs.onlyId =
-                  itemsxs.educationId +
-                  "-" +
-                  itemsxs.projectId +
-                  "-" +
-                  itemsxs.id;
-                itemsxs.onlyName = itemsxs.businessName;
-                itemsxs.children = itemsxs.classGradeStudentVos;
-                itemsxs.children.forEach((j) => {
-                  j.onlyName = j.realName;
-                  j.onlyId = itemsxs.onlyId + "-" + j.userId;
-                });
-              });
-            });
-          });
-          this.data2 = [
-            {
-              onlyId: "999999999",
-              onlyName: "所有层级",
-              children: res.rows,
-            },
-          ];
-        });
-    },
-    // int===1
-    activeOne() {
-      this.$nextTick(() => {
-        this.data[0].children.forEach((item, index) => {
-          item.children.forEach((items) => {
-            if (this.listData.userId.length) {
-              this.listData.userId.map((itemsxs) => {
-                if (itemsxs == items.userId) {
-                  this.$refs.tree.setChecked(items.onlyId, true);
-                }
-              });
-            }
-          });
-        });
-      });
-    },
-    // int===2
-    activeTwo() {
-      this.$nextTick(() => {
-        this.data1.forEach((item, index) => {
-          item.children.forEach((items) => {
-            if (this.listData.userId.length) {
-              this.listData.userId.map((itemsxs) => {
-                if (itemsxs == items.userId) {
-                  this.$refs.tree1.setChecked(items.onlyId, true);
-                }
-              });
-            }
-          });
-        });
-      });
-    },
-    // int===3
-    activeThree() {
-      var self = this;
-      self.$nextTick(() => {
-        self.data2[0].children.forEach((item, index) => {
-          item.children.forEach((items) => {
-            items.children.forEach((itemsxs) => {
-              itemsxs.children.forEach((j) => {
-                if (self.listData.userId.length) {
-                  self.listData.userId.map((k) => {
-                    if (k == j.userId) {
-                      self.$refs.tree2.setChecked(j.onlyId, true);
-                    }
-                  });
-                }
-              });
-            });
-          });
-        });
-      });
     },
     //清空时间
     changeIssueStatus(v) {

+ 205 - 0
src/views/education/notificationManageMent/notificationList/checkUser.vue

@@ -0,0 +1,205 @@
+<template>
+  <div id="checkUser">
+    <el-dialog
+      :visible.sync="diavos"
+      width="640px"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">收件人</div>
+        <div class="rightBoxs">
+          <img src="@/assets/images/Close@2x.png" alt="" @click="clears" />
+        </div>
+      </div>
+      <div>
+        <div>
+          <el-radio-group v-model="radio" @change="changeRadio">
+            <el-radio :label="1">按学员</el-radio>
+            <el-radio :label="2">按商品</el-radio>
+            <el-radio :label="3">按班级</el-radio>
+          </el-radio-group>
+        </div>
+        <div class="max_height">
+          <el-tree
+            v-if="radio == 1"
+            ref="tree1"
+            default-expand-all	
+            :props="props"
+            :load="loadNode"
+            lazy
+            node-key="userId"
+            show-checkbox
+            @check-change="handleCheckChange"
+          >
+          </el-tree>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="clears">取 消</el-button>
+        <el-button @click="submit">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      diavos: false,
+      radio: "",
+      props: {
+        label: "realname",
+        children: "children",
+        isLeaf: "leaf",
+      },
+      setKey: [],
+    };
+  },
+  watch: {},
+  methods: {
+    submit() {
+      let ary = this.$refs.tree1.getCheckedNodes(true);
+      let arrays = ary.map((item) => {
+        return item.userId;
+      });
+      this.$parent.backUserList(this.radio, arrays);
+      this.diavos = false;
+      // console.log(this.$refs.tree1.getCheckedNodes(true))
+      // this.$refs.tree1.setCheckedKeys([4,6])
+    },
+    changeRadio(){
+        this.setKey = []
+    },
+    /**
+     * 按学员
+     */
+    loadNode(node, resolve) {
+      if (node.level === 0) {
+        return resolve([{ realname: "所有人" }]);
+      }
+      if (node.level === 1) {
+        this.$api.inquiregradestudentlistStudent({ status: 1 }).then((res) => {
+          res.rows.forEach((item) => {
+            item.leaf = true;
+          });
+          this.$refs.tree1.setCheckedKeys(this.setKey);
+          resolve(res.rows);
+        });
+      }
+      if(node.level === 2){
+          resolve([])
+      }
+    },
+    handleCheckChange(data, checked, indeterminate) {
+      console.log(data, checked, indeterminate);
+    },
+    diavosFun(int, item) {
+      this.radio = int;
+      this.setKey = item;
+      this.diavos = true;
+    },
+    clears() {
+      this.diavos = false;
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.max_height {
+  margin-top: 14px;
+  max-height: 700px;
+  overflow: auto;
+}
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+</style>