Browse Source

Merge branch '11/24SAAS' of http://git.dayaedu.com/yonge/dy-admin-manager into 11/24SAAS

mo 3 years ago
parent
commit
6a04458e42

File diff suppressed because it is too large
+ 1 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-39cab5f4.9e15d3f1.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-7ac36cb9.281f5d29.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-7f4ef7fb.0aeb0983.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-a4c8226a.bf86a21c.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-ad05f9ae.d4a8ba4e.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.12fc6ce6.js


File diff suppressed because it is too large
+ 4 - 0
dist/static/js/chunk-1db2a28f.6e9e4a77.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-39cab5f4.0648787b.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-7ac36cb9.d35cf407.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-a4c8226a.ad75009f.js


File diff suppressed because it is too large
+ 8 - 0
dist/static/js/chunk-ad05f9ae.bc59171f.js


+ 18 - 0
src/views/accompaniment/modals/form.vue

@@ -159,6 +159,22 @@
           v-model="form.sysMusicScore.metronomeUrl"
         />
       </el-form-item>
+      <el-form-item
+        label="MID原音"
+        prop="sysMusicScore.midiUrl"
+        :rules="[
+          {
+            required: true,
+            message: 'MID原音',
+          },
+        ]"
+      >
+        <singe-file-upload
+          tips="仅支持上传 mid 格式音频文件"
+          accept=".mid"
+          v-model="form.sysMusicScore.midiUrl"
+        />
+      </el-form-item>
       <div
         class="files"
         v-for="(song, index) in form.sysMusicScoreAccompaniments"
@@ -304,6 +320,7 @@ export default {
           rankIds: "", // 收费会员编号
           url: "",
           metronomeUrl: "",
+          midiUrl: "",
           order: "",
           musicScoreCategoriesId: [],
           clientType: "",
@@ -338,6 +355,7 @@ export default {
         isOpenMetronome:Number(this.detail.isOpenMetronome),
         name: this.detail.name,
         url: this.detail.url,
+        midiUrl: this.detail.midiUrl,
         rankIds: this.detail.rankIds,
         order: this.detail.order,
         clientType: this.detail.clientType,

+ 26 - 7
src/views/teachManager/index.vue

@@ -56,7 +56,7 @@
       </save-form>
       <div class="btnList">
         <auth auths="sysMusicScoreCategories/save">
-          <el-button type="primary" @click="addTeach">新增教材</el-button>
+          <el-button type="primary" @click="addRoot">新增教材</el-button>
         </auth>
       </div>
       <div class="tableWrap">
@@ -161,16 +161,35 @@
         />
       </div>
     </div>
+
+    <!-- <el-dialog
+      title="新增教材根分类"
+      :visible.sync="teachVisible"
+      width="600px"
+      v-if="teachVisible"
+    >
+      <addRoot
+        @close="teachVisible = false"
+        @getList="getList"
+        ref="addRoot"
+        v-if="teachVisible"
+        :activeRow="activeRow"
+      />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="teachVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitAdd">确 定</el-button>
+      </span>
+    </el-dialog> -->
     <el-dialog
       title="新增教材"
       :visible.sync="teachVisible"
       width="600px"
       v-if="teachVisible"
     >
-      <addTeach
+      <addRoot
         @close="teachVisible = false"
         @getList="getList"
-        ref="addTeach"
+        ref="addRoot"
         v-if="teachVisible"
         :activeRow="activeRow"
       />
@@ -187,14 +206,14 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
-import addTeach from "./modals/addTeach";
+import addRoot from "./modals/addRoot";
 import {
   getSysMusicScoreList,
   enableSysMusicScore,
   removeSysMusicScore,
 } from "./api";
 export default {
-  components: { pagination, addTeach },
+  components: { pagination, addRoot },
   data() {
     return {
       searchForm: {
@@ -258,12 +277,12 @@ export default {
       this.$refs.searchForm.resetFields();
       this.search();
     },
-    addTeach() {
+    addRoot() {
       this.activeRow = null;
       this.teachVisible = true;
     },
     submitAdd() {
-      this.$refs.addTeach.addSubmit();
+      this.$refs.addRoot.addSubmit();
     },
     resetTeach(row) {
       this.activeRow = row;

+ 230 - 0
src/views/teachManager/modals/addRoot.vue

@@ -0,0 +1,230 @@
+<template>
+  <div>
+    <el-alert title="教材信息" :closable="false" class="alert" type="info" />
+    <el-form
+      :model="form"
+      label-width="120px"
+      class="form"
+      ref="form"
+    >
+      <el-form-item
+        label="教材名称"
+        prop="name"
+        :rules="[
+          {
+            required: true,
+            message: '请输入教材名称',
+            trigger: 'blur',
+          },
+        ]"
+      >
+        <el-input v-model="form.name" style="width: 100%"></el-input>
+      </el-form-item>
+      <el-form-item
+        label="适用分部"
+        prop="organId"
+        :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"
+        :rules="[
+          {
+            required: true,
+            message: '请选择音源设置',
+            trigger: 'change',
+          },
+        ]"
+      >
+        <el-select filterable placeholder="请选择音源设置" clearable v-model="form.soundResource" style="width: 100% !important">
+          <el-option label="NotePerformer音源" value="NOTEPERFORMER"></el-option>
+          <el-option label="标准音源" value="TANG"></el-option>
+          <el-option label="官方音源" value="OFFICIAL"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="教材封面图"
+        prop="coverImg"
+        :rules="[
+          {
+            required: true,
+            message: '请上传教材封面图',
+            trigger: 'blur',
+          },
+        ]"
+        label-width="120px"
+      >
+        <upload
+          class="uploadImg"
+          v-model="form.coverImg"
+          :imageWidthM="350"
+          :imageHeightM="140"
+          ref="uploadImg"
+        ></upload>
+        <p style="color: red">
+          请上传350*140像素,大小2M以内,格式为jpg、png、gif图片
+        </p>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+import Upload from "@/components/Upload/index";
+import {
+  addsysMusicScore,
+  getSysMusicScoreDetail,
+  resetsysMusicScore,
+} from "../api";
+export default {
+  props: ["activeRow"],
+  components: {
+    Upload,
+  },
+  data() {
+    return {
+      form: {
+        organId: [],
+        name: null,
+        coverImg: "",
+        soundResource: null,
+        sysMusicScoreCategoriesList: [],
+        delCategoriesIds: [],
+      },
+      index: 0,
+      treeProps: {
+        children: "sysMusicScoreCategoriesList",
+        label: "name",
+      },
+    };
+  },
+  async mounted() {
+    await this.$store.dispatch("setBranchs");
+    if (this.activeRow?.id) {
+      try {
+        const res = await getSysMusicScoreDetail({ id: this.activeRow.id });
+        this.form.name = res.data.name;
+        this.form.organId = res.data.organId.split(",").map((item) => {
+          return Number(item);
+        });
+        this.form.coverImg = res.data.coverImg;
+        this.form.soundResource = res.data.soundResource;
+        this.form.sysMusicScoreCategoriesList =
+          this.recursionDate(res.data.sysMusicScoreCategoriesList) || [];
+      } catch (e) {}
+    }
+  },
+  methods: {
+    // 递归遍历数组
+    recursionDate(arr) {
+      // 这里来了
+      if (arr.length > 0) {
+        let newArr = [];
+        for (let i = 0; i < arr.length; i++) {
+          let obj = {
+            ...arr[i],
+            index: arr[i].id,
+          };
+
+          if (
+            arr[i].sysMusicScoreCategoriesList &&
+            arr[i].sysMusicScoreCategoriesList.length > 0
+          ) {
+            obj.sysMusicScoreCategoriesList = this.recursionDate(
+              arr[i].sysMusicScoreCategoriesList
+            );
+          }
+
+          newArr.push(obj);
+        }
+
+        return newArr;
+      }
+    },
+    addSubmit() {
+      this.$refs.form.validate(async (flag) => {
+        if (flag) {
+          let { organId, delCategoriesIds, ...rest } = this.form;
+          let obj = {
+            ...rest,
+            organId: organId.join(","),
+            delCategoriesIds: delCategoriesIds.join(","),
+          };
+          try {
+            if (this.activeRow?.id) {
+              obj.id = this.activeRow.id;
+              await resetsysMusicScore(obj);
+              this.$message.success("修改成功");
+              this.$emit("getList");
+              this.$emit("close");
+            } else {
+              await addsysMusicScore(obj);
+              this.$message.success("添加成功");
+              this.$emit("getList");
+              this.$emit("close");
+            }
+          } catch (e) {
+            console.log(e);
+          }
+        }
+      });
+    },
+    uploadImg() {
+      this.$refs.uploadImg.$refs.upload.submit();
+    },
+  },
+  computed: {},
+};
+</script>
+<style lang="scss" scoped>
+.alert {
+  margin-bottom: 20px;
+}
+.form {
+  /deep/.el-form-item {
+    margin-right: 0 !important;
+  }
+}
+.addCateBtn {
+  margin-bottom: 20px;
+}
+
+.custom-tree-node {
+  .title {
+    font-size: 16px;
+  }
+  font-size: 14px;
+  i {
+    // font-size: 20px;
+    margin-left: 5px;
+  }
+}
+.uploadImg {
+  /deep/.avatar {
+    width: 350px;
+    height: 140px;
+  }
+}
+</style>

+ 1 - 1
src/views/teamBuild/signupList.vue

@@ -438,7 +438,7 @@
               v-for="(item, index) in gradeList"
               :key="index"
               :label="item.label"
-              :value="item.label"
+              :value="item.value"
             ></el-option>
           </el-select>
         </el-form-item>

+ 2 - 2
src/views/teamDetail/components/studentList.vue

@@ -80,7 +80,7 @@
             v-for="(item, index) in gradeList"
             :key="index"
             :label="item.label"
-            :value="item.label"
+            :value="item.value"
           ></el-option>
         </el-select>
       </el-form-item>
@@ -1326,7 +1326,7 @@ export default {
           this.soundList = res.data;
         }
       });
-      // this.getMusicClass()
+      this.getMusicClass() // 修改问题
       // 获取乐团基本信息
       getMusicGroup({ musicGroupId: this.teamid }).then(
         (res) => (this.baseInfo = res.data)

+ 2 - 2
src/views/tenantSetting/chargingRecord.vue

@@ -107,11 +107,11 @@
         <el-button native-type="reset" type="primary">重置</el-button>
       </el-form-item>
     </save-form>
-    <div style="font-size: 14px; padding-bottom: 10px">
+    <!-- <div style="font-size: 14px; padding-bottom: 10px">
       扣费总额:<span style="color: var(--color-primary)">1,000元</span>
       <i style="width: 10px; display: inline-block"></i>
       冻结金额:<span style="color: var(--color-primary)">1,000元</span>
-    </div>
+    </div> -->
     <!-- 列表 -->
     <div class="tableWrap">
       <el-table

Some files were not shown because too many files changed in this diff