lex-xin před 3 roky
rodič
revize
0ea86b1ecb

+ 0 - 1
package.json

@@ -58,7 +58,6 @@
     "vue-router": "3.0.6",
     "vuedraggable": "^2.24.3",
     "vuex": "3.1.0",
-    "wangeditor": "^4.0.0",
     "webpack-dev-server": "^4.5.0",
     "webpack-merge": "^5.3.0"
   },

+ 10 - 0
src/api/appTenant.js

@@ -162,3 +162,13 @@ export function uploadFile(data) {
     data
   })
 }
+
+
+// 上传图片 base64
+export function uploadFileWithBase64(data) {
+  return request({
+    method: 'post',
+    url: '/api-web/uploadFileWithBase64',
+    data
+  })
+}

+ 11 - 12
src/components/ImageCropper/CropperModal.vue

@@ -2,7 +2,7 @@
     <el-dialog :visible.sync="visible" :title="options.title" append-to-body :close-on-click-modal="false" width="800px" @close="cancelHandel">
         <el-row>
             <el-col :xs="24" :md="12" :style="{ height: '350px', width: '350px' }">
-                <vue-cropper ref="cropper" :img="options.img" :info="true" :autoCrop="options.autoCrop" :autoCropWidth="options.autoCropWidth" :autoCropHeight="options.autoCropHeight" :fixedBox="options.fixedBox" @realTime="realTime">
+                <vue-cropper ref="cropper" :img="options.img" :info="true" :autoCrop="options.autoCrop" :autoCropWidth="options.autoCropWidth" :full="options.full" :outputType="options.outputType" :autoCropHeight="options.autoCropHeight" :fixedBox="options.fixedBox" :enlarge="options.enlarge" @realTime="realTime">
                 </vue-cropper>
 
                 <div class="operation">
@@ -31,7 +31,7 @@
 </template>
 <script>
 import { VueCropper } from 'vue-cropper'
-import { uploadFile } from '@/api/appTenant'
+import { uploadFileWithBase64 } from '@/api/appTenant'
 export default {
   name: 'CropperModal',
   components: {
@@ -50,6 +50,8 @@ export default {
         autoCropWidth: 180, //默认生成截图框宽度
         autoCropHeight: 180, //默认生成截图框高度
         fixedBox: true, //是否固定截图框大小 不允许改变
+        full: false,
+        enlarge: 1, // 是否按照截图框比例输出 默认为1 
         previewsCircle: true, //预览图是否是原圆形
         centerBox: true,
         outputType: 'png',
@@ -84,17 +86,14 @@ export default {
       const that = this
       that.confirmLoading = true
       // 获取截图的base64 数据 getCropBlob getCropData
-      this.$refs.cropper.getCropBlob(async (data) => {
-        // let blobObject = new Blob([data]);
+      this.$refs.cropper.getCropData(async (data) => {
+        const name = (this.options.name ? this.options.name.split('.')[0] : +new Date()) + '.png'
         let form = new FormData()
-	      form.append('file', data, this.options.name || 'aa.jpg')
-	      // form.append('file', this.base64ToFile(data), this.options.name || 'aa.jpg')
-        // console.log(data, 'blob', form)
-
-        // const reader = new FileReader();
-        // reader.readAsDataURL(file)
+	      form.append('base64Str', data)
+        form.append('fileName', name)
+        form.append('extName', 'png')
         try {
-          const res = await uploadFile(form)
+          const res = await uploadFileWithBase64(form)
           that.$emit('cropper-ok', res)
         } catch(err) {
           that.$message.error(err)
@@ -154,7 +153,7 @@ export default {
   box-shadow: 0 0 4px #ccc;
   overflow: hidden;
   img {
-    background-color: red;
+    background-color: #f7f7f7;
     height: 100%;
   }
 }

+ 21 - 4
src/components/ImageCropper/index.vue

@@ -2,10 +2,10 @@
     <div class="ant-upload-preview">
         <div style="width: 100%">
             <el-upload class="avatar-uploader" :class="[disabled ? 'uploadDisabled' : null]" :disabled="disabled" :accept="accept" :show-file-list="false" action :before-upload="beforeUpload" :http-request="handleChange">
-                <img v-if="imageUrl" :src="imageUrl" class="avatar" />
+                <img v-if="imageUrl" :src="imageUrl" class="avatar" :style="showBox" />
                 <span v-else>
-                    <i v-if="loading" class="el-icon-loading avatar-uploader-icon"></i>
-                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                    <i v-if="loading" class="el-icon-loading avatar-uploader-icon" :style="showBox"></i>
+                    <i v-else class="el-icon-plus avatar-uploader-icon" :style="showBox"></i>
                     <span class="upload-desc">添加上传图片</span>
                 </span>
             </el-upload>
@@ -36,6 +36,10 @@ export default {
         }
       }
     },
+    showSize: {
+      type: Boolean,
+      default: false,
+    },
     // 上传图片的大小,单位M
     imgSize: {
       type: Number,
@@ -67,7 +71,20 @@ export default {
       isStopRun: false
     }
   },
-
+  computed: {
+    showBox() {
+      let styleList = {}
+      if(this.showSize) {
+        styleList = {
+          width: this.options.autoCropWidth + 'px',
+          height: this.options.autoCropHeight + 'px',
+          lineHeight: this.options.autoCropHeight + 'px',
+        }
+      }
+      console.log(styleList)
+      return styleList
+    }
+  },
   methods: {
     //从本地选择文件
     handleChange(info) {

+ 2 - 0
src/router/index.js

@@ -486,6 +486,8 @@ export const asyncRoutes = {
   serviceManager: () => import('@/views/courseListManager'),
   serviceList: () => import('@/views/platformManager/serviceManager/index'),
   serviceOperation: () => import('@/views/platformManager/serviceManager/form'),
+   // 机构申请
+   tenantApply: () => import('@/views/platformManager/tenantApply'),
   // 团练宝流量包
   cloudTrafficPackage: () => import('@/views/platformManager/cloudTrafficPackage'),
   accompanyBaseConfig: () => import('@/views/categroyManager/accompanyBaseConfig'),

+ 25 - 1
src/styles/iconfont/iconfont.css

@@ -1,6 +1,6 @@
 @font-face {
   font-family: "iconfont"; /* Project id  */
-  src: url('iconfont.ttf?t=1641903083235') format('truetype');
+  src: url('iconfont.ttf?t=1642586418878') format('truetype');
 }
 
 .iconfont {
@@ -383,3 +383,27 @@
   content: "\e678";
 }
 
+.icon-koufeiguize:before {
+  content: "\e679";
+}
+
+.icon-yunjiaoshibanben:before {
+  content: "\e67a";
+}
+
+.icon-yunjiaoshiyue:before {
+  content: "\e67b";
+}
+
+.icon-koufeibiaozhun:before {
+  content: "\e67c";
+}
+
+.icon-banbenhuiyuantubiao:before {
+  content: "\e67d";
+}
+
+.icon-jigouruzhu:before {
+  content: "\e67e";
+}
+

binární
src/styles/iconfont/iconfont.ttf


+ 6 - 2
src/utils/vueFilter.js

@@ -675,8 +675,12 @@ Vue.filter('numberFormat', value => {
 })
 
 // 金额格式化
-Vue.filter('moneyFormat', value => {
-  return numeral(value).format('0,0.00')
+Vue.filter('moneyFormat', (value, unit = false) => {
+  if(unit) {
+    return numeral(value).format('0,0.00') + '元'
+  } else {
+    return numeral(value).format('0,0.00')
+  }
 })
 Vue.filter('hasMoneyFormat', value => {
   if(value){

+ 1 - 1
src/views/contentManager/components/activity.vue

@@ -71,7 +71,7 @@
         <el-table-column align="center" label="跳转链接">
           <template slot-scope="scope">
             <overflow-text
-              :text="scope.row.linkUrl + '/' + scope.row.id"
+              :text="scope.row.linkUrl"
             ></overflow-text>
           </template>
         </el-table-column>

+ 1 - 1
src/views/contentManager/components/banner.vue

@@ -56,7 +56,7 @@
         <el-table-column align="center" label="跳转链接">
           <template slot-scope="scope">
             <overflow-text
-              :text="scope.row.linkUrl + '/' + scope.row.id"
+              :text="scope.row.linkUrl"
             ></overflow-text>
             <!-- {{ scope.row.linkUrl + '/' + scope.row.id }} -->
           </template>

+ 1 - 1
src/views/contentManager/components/information.vue

@@ -70,7 +70,7 @@
         <el-table-column align="center" label="跳转链接">
           <template slot-scope="scope">
             <overflow-text
-              :text="scope.row.linkUrl + '/' + scope.row.id"
+              :text="scope.row.linkUrl"
             ></overflow-text>
             <!-- {{ scope.row.linkUrl + '/' + scope.row.id }} -->
           </template>

+ 1 - 1
src/views/contentManager/components/knowledge.vue

@@ -94,7 +94,7 @@
           <template slot-scope="scope">
             <overflow-text
               width="100%"
-              :text="scope.row.linkUrl + '/' + scope.row.id"
+              :text="scope.row.linkUrl"
             ></overflow-text>
             <!-- {{ scope.row.linkUrl + '/' + scope.row.id }} -->
           </template>

+ 144 - 99
src/views/contentManager/contentOperation.vue

@@ -13,10 +13,10 @@
                style="width: 100%">
         <el-form-item label="标题"
                       prop="title">
-          <el-input v-model.trim="form.title"></el-input>
+          <el-input v-model.trim="form.title" placeholder="请输入标题"></el-input>
         </el-form-item>
-        <el-form-item label="排序值">
-          <el-input v-model.trim="form.order"></el-input>
+        <el-form-item label="排序值" prop="order">
+          <el-input v-model.trim="form.order" placeholder=""></el-input>
         </el-form-item>
         <!-- 平台的功能不需要选择分部 -->
         <el-form-item label="所属分部"
@@ -46,19 +46,23 @@
         </el-form-item>
 
 
-        <!-- banner图 && app按钮管理,才需要添加版本号 -->
-        <el-form-item label="版本号"
+        <!-- banner图 && app按钮管理, 广告管理才需要添加版本号 -->
+        <el-form-item label="版本号" prop="memo"
                       v-if="type == 3 || type == 6 || type == 8">
           <el-input v-model="form.memo"></el-input>
         </el-form-item>
-        <!--  -->
-        <!-- <el-form-item v-if="type == 3 || type == 6 || type == 5 || type == 8" label="链接地址">
-          <el-input v-model.trim="form.linkUrl"></el-input>
-        </el-form-item> -->
+
+        <!-- 1 2 4 7 -->
+        <el-form-item label="跳转方式" v-if="type == 1 || type == 2 || type == 4 || type == 7">
+            <el-radio-group v-model="outUrlRadio">
+                <el-radio :label="1">外部链接</el-radio>
+                <el-radio :label="0">内容跳转</el-radio>
+            </el-radio-group>
+        </el-form-item>
         <!-- :rules='[{ required: type == 3 || type == 6 || type == 5 || type == 8 ? false : true, message: "请输入链接地址", trigger: "blur" }]' -->
-        <el-form-item label="链接地址"
-                      prop="linkUrl"
-                      >
+        <!-- 1 2 4 7 -->
+        <el-form-item label="链接地址" prop="linkUrl" v-if="outUrlRadio == 1"
+          :rules='[{ required: (type == 3 || type == 6 || type == 5 || type == 8) ? false : true, message: "请输入链接地址", trigger: "blur" }]'>
           <el-input v-model.trim="form.linkUrl"></el-input>
         </el-form-item>
 
@@ -108,24 +112,23 @@
                       key="coverImage"
                       :label="type == 8 ? '广告图' : '封面图'"
                       prop="coverImage">
-          <el-upload class="avatar-uploader"
+          <!-- <el-upload class="avatar-uploader"
                      action="/api-web/uploadFile"
                      :headers="headers"
                      :show-file-list="false"
+                     v-loading="uploadCoverLoading"
                      accept=".jpg, .jpeg, .png, .gif"
                      :on-success="handleAvatarSuccess"
+                     :on-error="handleAvatarError"
                      :before-upload="beforeAvatarUpload">
-            <!-- 判断是图片还是视频 -->
             <img v-if="form.coverImage"
                  :src="form.coverImage"
                  class="avatar" />
             <i v-else
                class="el-icon-plus avatar-uploader-icon"></i>
-          </el-upload>
-          <p class="imageSize"
-             v-if="imageSize">
-             <template v-if="type == 4 || type == 5 || type == 6 || type == 7">上传图片尺寸为:</template>
-             {{ imageSize }}</p>
+          </el-upload> -->
+          <image-cropper :options="cropperOptions" :imgSize="2" :imageUrl="form.coverImage" @crop-upload-success="cropSuccess" />
+          <p class="imageSize">图片不能超过 2M;</p>
         </el-form-item>
         <!-- 广告管理才有时长 -->
         <el-form-item label="显示时长(秒)"
@@ -144,19 +147,11 @@
                       :rules="[{ required: true, message: (type == 7 ? '请选择知识类别' : '请选择资讯类别'), trigger: 'change' }]">
           <el-select v-model="form.subType" style="width: 400px !important">
             <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
-            <!-- <el-option label="演奏小技巧"
-                       :value="1"></el-option>
-            <el-option label="乐理基础"
-                       :value="2"></el-option>
-            <el-option label="乐器保养"
-                       :value="3"></el-option>
-            <el-option label="乐曲演奏展示"
-                       :value="4"></el-option> -->
           </el-select>
         </el-form-item>
         <!-- 闪页管理 BANNER管理 APP按钮管理 广告管理 -->
         <el-form-item label="内容"
-                      v-show="type != 8 && type != 5 && type != 3 && type != 6"
+                      v-show="type != 8 && type != 5 && type != 3 && type != 6 && outUrlRadio != 1"
                       prop="content"
                       :rules="[{ required: type != 8 && type != 5 && type != 3 && type != 6 ? true : false, message: '请编辑内容', trigger: 'blur' }]">
           <quill-editor class="ql-editor"
@@ -287,8 +282,6 @@ import { newsQueryId, newsAdd, newsUpdate, newsTypeList } from "@/api/contentMan
 import store from "@/store";
 import { getToken } from "@/utils/auth";
 import { vaildStudentUrl } from "@/utils/validate";
-// import E from 'wangeditor'
-// require styles
 import "quill/dist/quill.core.css";
 import "quill/dist/quill.snow.css";
 import "quill/dist/quill.bubble.css";
@@ -348,6 +341,7 @@ let validNum = (rule, value, callback) => {
     callback()
   }
 }
+import ImageCropper from '@/components/ImageCropper'
 // 这里引入修改过的video模块并注册
 import Video from "../quill/video.js";
 import dayjs from 'dayjs'
@@ -355,7 +349,8 @@ Quill.register(Video, true);
 export default {
   name: "contentOperation",
   components: {
-    quillEditor
+    quillEditor,
+    ImageCropper
   },
   data () {
     let that = this;
@@ -391,6 +386,7 @@ export default {
         updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
         content: null
       },
+      outUrlRadio: 1, // 默认使用内部连接跳转
       editorIndex: 0, // 光标位置
       editorOption: {
         placeholder: "请输入内容",
@@ -424,8 +420,9 @@ export default {
         url: null,
         videoUrl: null
       },
-      uploadLoading: false,
-      uploadImgLoading: false,
+      uploadCoverLoading: false,
+      uploadLoading: false, // 上传视屏loading
+      uploadImgLoading: false, // 上传封面图地址 loading
       fileList: [],
       dialogFormRules: {
         url: [{ required: true, message: "请输入视频地址", trigger: "blur" }],
@@ -445,7 +442,7 @@ export default {
         content: null,
         subType: null,
         actionTime: null,
-        organIdList: null,
+        organIdList: [],
       },
       rules: {
         title: [
@@ -457,38 +454,22 @@ export default {
         ],
         organIdList: [{ required: true, message: "请选择分部", trigger: "change" }],
       },
-      imageSize: null,
       typeList: [], //子分类列表
+      cropperOptions: {
+        autoCrop: true, //是否默认生成截图框
+        autoCropWidth: 300, //默认生成截图框宽度
+        autoCropHeight: 300, //默认生成截图框高度
+        fixedBox: true, //是否固定截图框大小 不允许改变
+        previewsCircle: false, //预览图是否是圆形
+        full: true,
+        title: '上传图片', //模态框上显示的标题
+      },
     };
   },
   created () { },
   mounted () {
     const query = this.$route.query
     if (query.pageType == "create") {
-      let url = ''
-      if (query.type == 7) {
-        url = vaildStudentUrl() + "/#/knowledge"
-      } else if (query.type == 8 || query.type == 5) {
-        url = ''
-      } else {
-        url = vaildStudentUrl() + "/#/specialdetail"
-      }
-      this.form = {
-        title: null,
-        order: null,
-        coverImage: null,
-        videoCoverImage: null,
-        attribute1: null,
-        linkUrl: null,
-        type: query.type,
-        subjectIdList: null,
-        status: 1,
-        content: null,
-        // tenantId: null,
-        organIdList: null,
-        subType: null,
-        actionTime: null
-      };
       this.$refs["form"].clearValidate();
 
       this.dialogForm = {
@@ -507,27 +488,84 @@ export default {
   },
   methods: {
     init () {
-      this.getList();
-      this.addQuillTitle();
       const query = this.$route.query
       this.type = query.type;
       this.pageType = query.pageType;
-
-      // this.form.type
-      let tempTitle = {
-        1: "468px * 552px;图片不能超过 2M;",
-        2: "456px * 288px; 图片不能超过 2M;",
-        3: "686px * 140px; 图片不能超过 2M;",
-        4: "图片不能超过 2M;",
-        5: "图片不能超过 2M;",
-        6: "图片不能超过 2M;",
-        7: "图片不能超过 2M;",
-        8: "1242px * 2208px; 图片不能超过 2M;"
-      };
-      this.imageSize = tempTitle[this.form.type];
-
+      this.initCrop()
+      this.getList();
+      this.addQuillTitle();
       this.$refs["form"].clearValidate();
     },
+    initCrop() {
+      // this.form.type
+      // 1: "精彩活动",
+      // 2: "热门资讯",
+      // 4: "专项训练",
+      // 5: "闪页管理",
+      // 3: "BANNER管理",
+      // 6: "APP按钮管理",
+      // 7: "知识库管理",
+      // 8: "广告管理"
+      // let tempTitle = {
+      //   1: "468px * 552px;图片不能超过 2M;", 2
+      //   2: "456px * 288px; 图片不能超过 2M;", 1.56
+      //   3: "686px * 140px; 图片不能超过 2M;", 2.63
+      //   4: "图片不能超过 2M;", 1
+      //   5: "图片不能超过 2M;", 0.73
+      //   6: "图片不能超过 2M;", 60 * 60  1
+      //   7: "图片不能超过 2M;", 2
+      //   8: "1242px * 2208px; 图片不能超过 2M;" 1.77
+      // };
+      // this.imageSize = tempTitle[this.form.type];
+      // console.log(this.imageSize)
+      let type = Number(this.type)
+      let corp = {}
+      switch(type) {
+        case 1: case 7:
+          corp = {
+            enlarge: 2,
+            autoCropWidth: 200,
+            autoCropHeight: 80
+          }
+          break;
+        case 2:
+          corp = {
+            enlarge: 2,
+            autoCropWidth: 350,
+            autoCropHeight: 224
+          }
+          break;
+        case 3:
+          corp = {
+            enlarge: 2.63,
+            autoCropWidth: 350,
+            autoCropHeight: 133
+          }
+          break;
+        case 5:
+          corp = {
+            enlarge: 0.73,
+            autoCropWidth: 255,
+            autoCropHeight: 350
+          }
+          break;
+        case 6:
+          corp = {
+            enlarge: 1,
+            autoCropWidth: 112,
+            autoCropHeight: 134
+          }
+          break;
+      }
+      const { cropperOptions } = this
+      this.cropperOptions = Object.assign({}, cropperOptions, corp)
+      console.log(this.cropperOptions, cropperOptions, type, corp)
+    },
+    //上传图片成功
+    cropSuccess(data) {
+      // this.imgUrl = data.data.avatar
+      this.form.coverImage = data.data.url;
+    },
     addAdvVideo () {
       this.dialogFormVisible = true
       let dialogForm = this.dialogForm
@@ -585,23 +623,28 @@ export default {
       this.$refs[diologForm].resetFields()
     },
     addQuillTitle () {
-      const oToolBar = document.querySelector(".ql-toolbar"),
-        aButton = oToolBar.querySelectorAll("button"),
-        aSelect = oToolBar.querySelectorAll("select");
-      aButton.forEach(function (item) {
-        if (item.className === "ql-script") {
-          item.value === "sub" ? (item.title = "下标") : (item.title = "上标");
-        } else if (item.className === "ql-indent") {
-          item.value === "+1"
-            ? (item.title = "向右缩进")
-            : (item.title = "向左缩进");
-        } else {
-          item.title = titleConfig[item.classList[0]];
+      this.$nextTick(() => {
+        const oToolBar = document.querySelector(".ql-toolbar")
+        console.log(oToolBar)
+        if(oToolBar) {
+          const aButton = oToolBar.querySelectorAll("button")
+          const aSelect = oToolBar.querySelectorAll("select");
+          aButton.forEach(function (item) {
+            if (item.className === "ql-script") {
+              item.value === "sub" ? (item.title = "下标") : (item.title = "上标");
+            } else if (item.className === "ql-indent") {
+              item.value === "+1"
+                ? (item.title = "向右缩进")
+                : (item.title = "向左缩进");
+            } else {
+              item.title = titleConfig[item.classList[0]];
+            }
+          });
+          aSelect.forEach(function (item) {
+            item.parentNode.title = titleConfig[item.classList[0]];
+          });
         }
-      });
-      aSelect.forEach(function (item) {
-        item.parentNode.title = titleConfig[item.classList[0]];
-      });
+      })
     },
     onSubmit (formName) {
       this.$refs[formName].validate(valid => {
@@ -688,14 +731,6 @@ export default {
     },
     onReSet (formName) {
       const query = this.$route.query
-      let url = ''
-      if (query.type == 7) {
-        url = vaildStudentUrl() + "/#/knowledge"
-      } else if (query.type == 8 || query.type == 5) {
-        url = ''
-      } else {
-        url = vaildStudentUrl() + "/#/specialdetail"
-      }
       this.form = {
         title: null,
         order: null,
@@ -764,6 +799,11 @@ export default {
             }
             let subject = result.subjectIdList ? result.subjectIdList.split(',') : []
             let organ = result.organIdList ? result.organIdList.split(',') : []
+            if(result.linkUrl) {
+              this.outUrlRadio = 1
+            } else {
+              this.outUrlRadio = 0
+            }
             this.form = {
               id: result.id,
               title: result.title,
@@ -820,12 +860,16 @@ export default {
       return isImage && isLt2M;
     },
     handleAvatarSuccess (res, file) {
+      this.uploadCoverLoading = false
       if (res.code == 200) {
         this.form.coverImage = res.data.url;
       } else {
         this.$message.error('上传失败')
       }
     },
+    handleAvatarError() {
+      this.uploadCoverLoading = false
+    },
     beforeAvatarUpload (file) {
       const imageType = {
         "image/png": true,
@@ -841,6 +885,7 @@ export default {
       if (!isLt2M) {
         this.$message.error("上传图片大小不能超过 2M!");
       }
+      this.uploadCoverLoading = true
       return isImage && isLt2M;
     },
     typeChange (type) {

+ 1 - 1
src/views/couponManager/couponGiveList.vue

@@ -100,7 +100,7 @@
     </div>
     <!--  -->
     <el-dialog
-      title="激活团练"
+      title="激活团练"
       :visible.sync="couponDetailVisible"
       width="1000px"
       append-to-body

+ 8 - 0
src/views/platformManager/tenantApply/api.js

@@ -0,0 +1,8 @@
+
+import request2 from '@/utils/request2'
+
+export const tenantApplyList = data => request2({
+  url: '/api-web/tenantApply/list',
+  method: 'get',
+  params: data,
+})

+ 158 - 0
src/views/platformManager/tenantApply/index.vue

@@ -0,0 +1,158 @@
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>
+      申请机构
+    </h2>
+    <div class="m-core">
+      <save-form
+        :inline="true"
+        class="searchForm"
+        ref="searchForm"
+        @submit="search"
+        @reset="reset"
+        :saveKey="'tenantApply'"
+        :model.sync="searchForm"
+      >
+        <el-form-item prop="name">
+          <el-input
+            v-model="searchForm.name"
+            placeholder="机构名称"
+          ></el-input>
+        </el-form-item>
+        <el-form-item prop="createTimer">
+          <el-date-picker
+            v-model.trim="searchForm.createTimer"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="申请开始时间"
+            end-placeholder="申请结束时间"
+            :default-time="['00:00:00', '23:59:59']"
+            :picker-options="{ firstDayOfWeek: 1 }"
+          ></el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button native-type="submit" type="danger">搜索</el-button>
+          <el-button native-type="reset" type="primary">重置</el-button>
+        </el-form-item>
+      </save-form>
+      <!-- 列表 -->
+      <div class="tableWrap">
+        <el-table
+          :data="tableList"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        >
+          <el-table-column align="center" label="所在城市" prop="city">
+          </el-table-column>
+          <el-table-column align="center" label="机构名称" prop="name">
+          </el-table-column>
+          <el-table-column align="center" label="联系人" prop="linkman">
+          </el-table-column>
+          <el-table-column align="center" label="联系人电话" prop="mobileNo">
+          </el-table-column>
+          <el-table-column align="center" label="申请时间" prop="createTime">
+          </el-table-column>
+          <!-- <el-table-column align="center" label="推荐人姓名" prop="productName">
+          </el-table-column>
+          <el-table-column align="center" label="上次沟通时间" prop="productName">
+          </el-table-column>
+          <el-table-column align="center" label="沟通结果" prop="productName">
+          </el-table-column>
+          <el-table-column align="center" label="沟通人" prop="productName">
+          </el-table-column> -->
+          <!-- <el-table-column align="center" label="操作">
+            <template slot-scope="scope">
+              <el-button
+                @click="openService('update', scope.row)"
+                v-permission="'platformServe/update'"
+                type="text"
+                >修改
+              </el-button>
+              <el-button
+                @click="delService(scope.row)"
+                v-permission="'platformServe/delete'"
+                type="text"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column> -->
+        </el-table>
+        <pagination
+          :saveKey="'tenantApply'"
+          sync
+          :total.sync="pageInfo.total"
+          :page.sync="pageInfo.page"
+          :limit.sync="pageInfo.limit"
+          :page-sizes="pageInfo.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import {
+  tenantApplyList
+} from "./api";
+import { getTimes } from "@/utils";
+const initSearch = {
+  name: null,
+  createTimer: null,
+};
+export default {
+  components: {
+    pagination
+  },
+  data() {
+    return {
+      tableList: [],
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      searchForm: {
+        ...initSearch
+      },
+    };
+  },
+  mounted() {
+    this.getList();
+  },
+  methods: {
+    async getList() {
+      try {
+        const { name, createTimer } = this.searchForm
+        const res = await tenantApplyList({
+          name,
+          ...getTimes(createTimer, ["startDateTime", "endDateTime"], "YYYY-MM-DD HH:mm:ss"),
+          page: this.pageInfo.page,
+          rows: this.pageInfo.limit,
+        });
+        this.pageInfo.total = res.data.total;
+        this.tableList = res.data.rows;
+      } catch (e) {}
+    },
+    search() {
+      this.pageInfo.page = 1;
+      this.$refs.searchForm.save(this.searchForm);
+      this.$refs.searchForm.save(this.pageInfo, "page");
+      this.getList();
+    },
+    reset() {
+      this.searchForm = {
+        ...initSearch
+      };
+      this.search();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.courseMask .el-dialog__body {
+  padding-bottom: 0;
+}
+</style>

+ 2 - 2
src/views/resetTeaming/components/giveMemberList.vue

@@ -33,7 +33,7 @@
     <!-- <div class="newBand"
          @click="resetPays"
          v-permission="'musicGroupStudentFee/batchUpdateCourseFee'">修改缴费金额</div> -->
-    <el-button @click="addMember" v-if="$helpers.permission('cloudTeacherOrder/pay')" type="primary" style="margin-bottom: 20px">激活团练</el-button>
+    <el-button @click="addMember" v-if="$helpers.permission('cloudTeacherOrder/pay')" type="primary" style="margin-bottom: 20px">激活团练</el-button>
 
     <div class="tableWrap">
       <el-table
@@ -102,7 +102,7 @@
     </div>
 
     <el-dialog
-      title="激活团练"
+      title="激活团练"
       :visible.sync="giveMemberVisible"
       width="1000px"
       v-if="giveMemberVisible"

+ 1 - 1
src/views/resetTeaming/modals/giveMemberModel.vue

@@ -54,7 +54,7 @@
     </span>
 
     <el-dialog
-      title="激活团练"
+      title="激活团练"
       :visible.sync="payMentVisible"
       :before-close="onClose"
       v-if="payMentVisible"

+ 1 - 1
src/views/resetTeaming/modals/giveMemberPayment.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="chioseWrap">
-    <p>您将为<span>{{tableList.length}}</span>位学员激活团练<br />共需支付<span>{{ selectStudentMoney | moneyFormat }}</span>元</p>
+    <p>您将为<span>{{tableList.length}}</span>位学员激活团练<br />共需支付<span>{{ selectStudentMoney | moneyFormat }}</span>元</p>
     <p>请扫描二维码支付,支付功能后学员团练宝即刻激活</p>
 
     <vue-qr :text="codeUrl" style="width: 250px" :margin="0"></vue-qr>

+ 1 - 1
src/views/studentManager/modals/recordDetail.vue

@@ -4,7 +4,7 @@
     <descriptions :column="3" style="margin-bottom: 20px;">
       <descriptions-item label="团练宝单位">{{ detail.period | memberEnumType }}</descriptions-item>
       <descriptions-item label="周期数">{{ detail.memberNum }}</descriptions-item>
-      <descriptions-item label="缴费金额(元)">{{ detail.actualAmount | hasMoneyFormat }}</descriptions-item>
+      <descriptions-item label="缴费金额(元)">{{ detail.actualAmount | moneyFormat(true) }}</descriptions-item>
       <descriptions-item label="已缴费人数/总人数">{{ detail.paymentUserNum }}/{{ detail.userNum }}</descriptions-item>
       <descriptions-item label="创建人">{{ detail.operatorName }}</descriptions-item>
       <descriptions-item label="创建时间">{{ detail.createTime }}</descriptions-item>

+ 2 - 2
src/views/studentManager/studentGroupPractice.vue

@@ -22,7 +22,7 @@
       <!-- <div class="newBand"
           @click="resetPays"
           v-permission="'musicGroupStudentFee/batchUpdateCourseFee'">修改缴费金额</div> -->
-      <el-button @click="addMember" v-if="$helpers.permission('cloudTeacherOrder/pay/student')" type="primary" style="margin-bottom: 20px">激活团练</el-button>
+      <el-button @click="addMember" v-if="$helpers.permission('cloudTeacherOrder/pay/student')" type="primary" style="margin-bottom: 20px">激活团练</el-button>
 
       <div class="tableWrap">
         <el-table
@@ -92,7 +92,7 @@
     </div>
 
     <el-dialog
-      title="激活团练"
+      title="激活团练"
       :visible.sync="giveMemberVisible"
       width="1000px"
       v-if="giveMemberVisible"

+ 2 - 2
src/views/studentManager/studentGroupRecord.vue

@@ -64,7 +64,7 @@
             label="缴费金额(元)"
           >
             <template slot-scope="scope">
-              {{ scope.row.actualAmount | hasMoneyFormat }}
+              {{ scope.row.actualAmount | moneyFormat(true) }}
             </template>
           </el-table-column>
           <el-table-column
@@ -111,7 +111,7 @@
     </div>
 
     <el-dialog
-      title="激活团练"
+      title="激活团练"
       :visible.sync="recordVisible"
       width="1000px"
       v-if="recordVisible"

+ 27 - 35
src/views/teachManager/modals/addRoot.vue

@@ -20,35 +20,6 @@
       >
         <el-input v-model="form.name" placeholder="请输入教材名称" style="width: 100%"></el-input>
       </el-form-item>
-      <!-- <el-form-item
-        label="适用分部"
-        prop="organId"
-        v-if="!(activeRow && activeRow.id)"
-        :rules="[
-          {
-            required: true,
-            message: '请选择适用分部',
-            trigger: 'change',
-          },
-        ]"
-      >
-        <select-all
-          v-model.trim="form.organId"
-           style="width: 100%"
-          class="organSelect"
-          filterable
-          placeholder="请选择分部"
-          multiple
-          clearable
-        >
-          <el-option
-            v-for="(item, index) in selects.branchs"
-            :key="index"
-            :label="item.name"
-            :value="item.id"
-          ></el-option>
-        </select-all>
-      </el-form-item> -->
       <el-form-item
         label="音源设置"
         prop="soundResource"
@@ -79,16 +50,16 @@
         ]"
         label-width="120px"
       >
-        <upload
+        <!-- <upload
           :class="[imageWidthM == 350 ? 'uploadImg' : 'uploadSmallImg']"
           v-model="form.coverImg"
           :imageWidthM="imageWidthM"
           :imageHeightM="imageHeightM"
           ref="uploadImg"
-        ></upload>
-        <!-- <image-cropper :options="cropperOptions" :disabled="isDisabled" :imgSize="2" :accept="acceptUpload" :imageUrl="form.logo" @crop-upload-close="cropClose" @crop-upload-success="cropSuccess" /> -->
+        ></upload> -->
+        <image-cropper :options="cropperOptions" :imgSize="2" :imageUrl="form.coverImg" showSize @crop-upload-success="cropSuccess" />
         <p style="color: red">
-          请上传{{ imageWidthM }}*{{ imageHeightM }}像素,大小2M以内,格式为jpg、png、gif图片
+          大小2M以内,格式为jpg、png、gif图片
         </p>
       </el-form-item>
     </el-form>
@@ -110,6 +81,7 @@ export default {
   props: ["type", "activeRow"],
   components: {
     Upload,
+    ImageCropper
   },
   data() {
     return {
@@ -129,6 +101,14 @@ export default {
         label: "name",
       },
       level: 0, // 当前添加或修改第几层
+      cropperOptions: {
+        autoCrop: true, //是否默认生成截图框
+        autoCropWidth: 350, //默认生成截图框宽度
+        autoCropHeight: 140, //默认生成截图框高度
+        fixedBox: true, //是否固定截图框大小 不允许改变
+        previewsCircle: false, //预览图是否是圆形
+        title: '上传机构LOGO', //模态框上显示的标题
+      },
     };
   },
   async mounted() {
@@ -136,8 +116,10 @@ export default {
     if (this.activeRow?.id) {
       // 判断是否是根元素处理
       if(this.activeRow?.parentId != 0 || this.type == 'create' ) {
-        this.imageWidthM = 210
-        this.imageHeightM = 268
+        // this.imageWidthM = 210
+        // this.imageHeightM = 268
+        this.cropperOptions.autoCropWidth = 210
+        this.cropperOptions.autoCropHeight = 268
       }
       console.log(this.activeRow, 'level')
       this.level = this.activeRow?.level || 0
@@ -214,6 +196,16 @@ export default {
     uploadImg() {
       this.$refs.uploadImg.$refs.upload.submit();
     },
+    //上传操作结束
+    cropClose() {
+      console.log('上传操作结束')
+    },
+    //上传图片成功
+    cropSuccess(data) {
+      // this.imgUrl = data.data.avatar
+      this.form.coverImg = data.data.url;
+      console.log(this.form.coverImg)
+    },
   },
   computed: {},
 };