瀏覽代碼

提交以下

1
mo 3 年之前
父節點
當前提交
a0cee6da3c

+ 3 - 3
src/api/specialSetting.js

@@ -51,9 +51,9 @@ export function getParentArea (data) {
 // 查询所有子集科目
 export function subSubjectList (data) {
   return request({
-    url: api + `/subject/search`,
-    method: 'get',
-    params: data
+    url: api + `/subject/queryPageByIdOrName`,
+    method: 'post',
+    data:qs.stringify(data)
   })
 }
 

+ 1 - 1
src/constant/guide.js

@@ -68,7 +68,7 @@ export const guideList = {
   vipPrice:{
     name: '小班课课时单价',
     desc: '用于计算学员购买小班课时需要支持的金额',
-    path: '/sysBasics/vipChargeSeting',
+    path: '/baseRulesClassSetting?tabrouter=8',
     permission: '/vipChargeSeting'
   },
   teamActive:{

+ 86 - 33
src/views/categroyManager/globalSubjects.vue

@@ -13,7 +13,7 @@
         @submit="search"
         @reset="onReSet"
       >
-        <el-form-item>
+        <el-form-item prop="search">
           <el-input
             v-model.trim="searchForm.search"
             clearable
@@ -21,11 +21,13 @@
             placeholder="请输入编号、名称"
           ></el-input>
         </el-form-item>
-        <el-form-item>
+        <el-form-item prop="parentSubjectId">
           <el-select
             v-model="searchForm.parentSubjectId"
             placeholder="选择声部分类"
             prop="parentSubjectId"
+            clearable
+            filterable
           >
             <el-option
               v-for="item in fatherList"
@@ -41,7 +43,7 @@
           <el-button native-type="reset" type="danger">重置</el-button>
         </el-form-item>
       </save-form>
-      <auth auths="subject/upset/insert" style="margin-bottom:20px;">
+      <auth auths="subject/upset/insert" style="margin-bottom: 20px">
         <el-button @click="addCategory" type="primary">添加</el-button>
       </auth>
       <div class="tableWrap">
@@ -53,13 +55,30 @@
           <el-table-column
             align="center"
             prop="id"
-            label="分类编号"
+            label="编号"
           ></el-table-column>
           <el-table-column
             align="center"
             prop="name"
-            label="分类名称"
+            label="声部名称"
           ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="parentSubjectName"
+            label="所属分类"
+          ></el-table-column>
+          <el-table-column align="center" prop="name" label="分类图片">
+            <template slot-scope="scope">
+              <el-image
+                v-if="scope.row.img"
+                style="width: 60px; height: 60px"
+                fit="cover"
+                :src="scope.row.img.split(',')[0]"
+                :previewSrcList="scope.row.img.split(',')"
+              >
+              </el-image>
+            </template>
+          </el-table-column>
           <el-table-column align="center" prop="name" label="操作">
             <template slot-scope="scope">
               <div>
@@ -81,18 +100,6 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="name" label="分类图片">
-            <template slot-scope="scope">
-              <el-image
-                v-if="scope.row.img"
-                style="width: 60px; height: 60px"
-                fit="cover"
-                :src="scope.row.img.split(',')[0]"
-                :previewSrcList="scope.row.img.split(',')"
-              >
-              </el-image>
-            </template>
-          </el-table-column>
         </el-table>
         <pagination
           :total.sync="rules.total"
@@ -110,16 +117,51 @@
       v-if="categoryVisible"
     >
       <el-form :model="form" :inline="true" ref="form">
+        <el-form-item prop="parentSubjectId"  label="所属分类" :rules="[{ required: true, message: '请选择声部分类' }]">
+          <el-select
+            v-model="form.parentSubjectId"
+            placeholder="所属分类"
+            prop="parentSubjectId"
+            style="width:365px!important"
+            clearable
+            filterable
+          >
+            <el-option
+              v-for="item in fatherList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+
         <el-form-item
           prop="name"
-          label="分类名称"
+          label="声部名称"
           :rules="{
             required: true,
-            message: '请输入分类名称',
+            message: '请输入声部名称',
             trigger: 'change,blur',
           }"
         >
-          <el-input v-model="form.name"></el-input>
+          <el-input v-model="form.name"   style="width:365px!important"></el-input>
+        </el-form-item>
+        <el-form-item
+          label="声部图标"
+          prop="img"
+          :rules="[{ required: true, message: '请上传声部图标' }]"
+        >
+          <!-- v-if="!addDisabled" -->
+          <upload
+            v-model="form.img"
+            :imageWidthM="260"
+            :imageHeightM="260"
+          ></upload>
+          <!-- <img v-else :src="form.img" alt="" width="120px" height="120px" /> -->
+          <p style="color: red" >
+            请上传260*260像素,大小2M以内,格式为jpg、png、gif图片
+          </p>
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -134,10 +176,15 @@
 import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
+import Upload from "@/components/Upload/index";
 import load from "@/utils/loading";
-import { subjectListTree, subjectUpset,subSubjectList } from "@/api/specialSetting";
+import {
+  subjectListTree,
+  subjectUpset,
+  subSubjectList,
+} from "@/api/specialSetting";
 export default {
-  components: { pagination },
+  components: { pagination, Upload },
   data() {
     return {
       searchForm: {
@@ -147,6 +194,9 @@ export default {
       form: {
         name: null,
         id: null,
+        img:null,
+        parentSubjectId:null
+
       },
       tableList: [],
       organList: [],
@@ -172,7 +222,7 @@ export default {
   methods: {
     init() {
       this.getList();
-      this.getFatherList()
+      this.getFatherList();
     },
     getFatherList() {
       subjectListTree({
@@ -186,26 +236,29 @@ export default {
       });
     },
     getList() {
-      subSubjectList({...this.searchForm}).then(res=>{
-
-      })
+      subSubjectList({ ...this.searchForm,page:this.rules.page,rows:this.rules.limit }).then((res) => {
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total
+      });
     },
     search() {
       this.rules.page = 1;
       this.getList();
     },
     onReSet() {
-      this.$nextTick(()=>{
-        this.search()
-      })
+      this.$nextTick(() => {
+        this.search();
+      });
     },
     resetSubjectCategory(row) {
       this.form.name = row.name;
       this.form.id = row.id;
+      this.form.parentSubjectId = row.parentSubjectId;
+      this.form.img = row.img;
       this.categoryVisible = true;
     },
     removeSubjectCategory(row) {
-      this.$confirm("是否确认删除分类", "提示", {
+      this.$confirm("是否确认删除声部", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
@@ -230,10 +283,8 @@ export default {
       this.$refs.form.validate((valid) => {
         if (valid) {
           subjectUpset({
-            parentSubjectId: 0,
             tenantId: 1,
-            name: this.form.name,
-            id: this.form.id,
+            ...this.form
           }).then((res) => {
             if (res.code == 200) {
               this.messageTips("修改", res);
@@ -247,6 +298,8 @@ export default {
     addCategory() {
       this.form.id = null;
       this.form.name = null;
+      this.form.parentSubjectId = null;
+      this.form.img = null;
       this.categoryVisible = true;
     },
   },

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

@@ -61,7 +61,7 @@
                 </auth>
                 <auth auths="sysCoupon/delete">
                   <el-button type="text" @click="revokeCoupon(scope.row)"
-                    >撤销发</el-button
+                    >撤销发</el-button
                   >
                 </auth>
               </div>

+ 4 - 4
src/views/main/schedule-branch/index.vue

@@ -9,7 +9,6 @@
     >
       <el-form-item prop="organIds">
         <el-select
-          clearable
           filterable
           v-model="search.organId"
           placeholder="请选择分部"
@@ -134,10 +133,11 @@ export default {
       },
     };
   },
-  mounted() {
+ async mounted() {
+  await  this.$store.dispatch("setBranchs");
+  await  this.$store.dispatch("setTeachers");
+    this.$set(this.search, "organId", this.selects.branchs[0].id);
     this.FetchList();
-    this.$store.dispatch("setBranchs");
-    this.$store.dispatch("setTeachers");
   },
   methods: {
     submit() {

+ 3 - 3
src/views/main/teamSchedule/index.vue

@@ -14,7 +14,6 @@
           class="multiple"
           v-model.trim="searchForm.organId"
           filterable
-          clearable
           placeholder="请选择分部"
         >
           <el-option
@@ -186,7 +185,7 @@ export default {
       },
     };
   },
-  mounted() {
+ async mounted() {
     const { query } = this.$route;
     if (query.organId) {
       this.searchForm.organId = query.organId;
@@ -194,7 +193,8 @@ export default {
     if (query.start && query.end) {
       this.searchForm.month = [query.start, query.end];
     }
-    this.$store.dispatch("setBranchs");
+  await  this.$store.dispatch("setBranchs");
+  this.$set(this.searchForm,'organId',this.selects.branchs[0].id)
     this.getList();
   },
   methods: {