浏览代码

权限添加

1
mo 4 年之前
父节点
当前提交
ffbfb6418d

+ 11 - 2
src/views/resetTeaming/components/archicesComponents/api.js

@@ -9,7 +9,7 @@ export const getCourseType = data => request2({
 })
 //   requestType: 'form'
 
-// musicGroupTrainPlan/queryPlanCourseNum
+// 获取训练次数
 export const getPlanCourseNum = data => request2({
   url: '/api-web/musicGroupTrainPlan/queryPlanCourseNum',
   data: data,
@@ -67,7 +67,7 @@ export const getExceptionPlan = data => request2({
 
 })
 
-// 获取乐团档案基本细心
+// 获取乐团档案基本信息
 export const getBasicInfo = data => request2({
   url: '/api-web/musicGroupRecord/queryBasicInfo',
   data ,
@@ -184,5 +184,14 @@ export const resetQuestion = data => request2({
   requestType:'json'
 
 })
+// 删除问卷
+export const delQuestion = data => request2({
+  url: '/api-web/musicGroupQuestionnaire/del',
+  data,
+  method: 'post',
+  requestType:'form'
+
+})
+
 
 

+ 49 - 17
src/views/resetTeaming/components/archicesComponents/survey.vue

@@ -7,8 +7,11 @@
             <span class="shape"></span>
             <p style="margin-right: 5px">满意度调查</p>
           </div>
-
-          <el-button type="text" @click="addSurvey">+新增满意度调查</el-button>
+          <auth auths="musicGroupQuestionnaire/add">
+            <el-button type="text" @click="addSurvey"
+              >+新增满意度调查</el-button
+            >
+          </auth>
         </div>
       </template>
     </el-alert>
@@ -31,15 +34,27 @@
       <el-table-column align="center" prop="id" label="操作">
         <template slot-scope="scope">
           <div>
-            <el-button type="text" @click="lookSurvey(scope.row)"
-              >详情</el-button
-            >
-            <el-button type="text" @click="resetSurvey(scope.row)"
-              >修改</el-button
-            >
-            <el-button type="text" @click="deleteSurvey(scope.row)"
-              >删除</el-button
+            <auth auths="getMusicGroupQuestionnaireDetail">
+              <el-button type="text" @click="lookSurvey(scope.row)"
+                >详情</el-button
+              >
+            </auth>
+            <auth
+              :auths="[
+                'getMusicGroupQuestionnaireDetail',
+                'musicGroupQuestionnaire/update',
+              ]"
+              mulit
             >
+              <el-button type="text" @click="resetSurvey(scope.row)"
+                >修改</el-button
+              >
+            </auth>
+            <auth auths="musicGroupQuestionnaire/del">
+              <el-button type="text" @click="deleteSurvey(scope.row)"
+                >删除</el-button
+              >
+            </auth>
           </div>
         </template>
       </el-table-column>
@@ -79,6 +94,7 @@ import {
   getMusicGroupQuestionnaire,
   getQuestionDetail,
   getMusicGroupQuestionnaireDetail,
+  delQuestion,
 } from "./api";
 import surveyMask from "./modals/surveyMask";
 import pagination from "@/components/Pagination/index";
@@ -122,7 +138,7 @@ export default {
       this.form.musicGroupId = this.$route.query.id;
       this.form.target = null;
       this.form.id = null;
-      this.form.questionTime =null;
+      this.form.questionTime = null;
       let questionnaireUserResult =
         this.questionList.questionnaireQuestionList.map((item) => {
           if (item.type == "radio") {
@@ -143,7 +159,7 @@ export default {
         "questionnaireUserResultList",
         questionnaireUserResult
       );
-      this.$refs.surveyMask.$refs.form.resetFields()
+      this.$refs.surveyMask.$refs.form.resetFields();
     },
     async getList() {
       try {
@@ -159,7 +175,7 @@ export default {
       }
     },
     async lookSurvey(row) {
-       this.surveyTitle = "查看满意度调查"
+      this.surveyTitle = "查看满意度调查";
       await this.setDetail(row);
       this.isdisabled = true;
       this.surveyVisible = true;
@@ -194,15 +210,31 @@ export default {
       }
     },
     async resetSurvey(row) {
-      this.surveyTitle = "修改满意度调查"
+      this.surveyTitle = "修改满意度调查";
       await this.setDetail(row);
       this.isdisabled = false;
       this.surveyVisible = true;
     },
-    deleteSurvey(row) {},
-  async  addSurvey() {
+    async deleteSurvey(row) {
+      this.$confirm("是否删除此次问卷?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          try {
+            const res = await delQuestion({ id: row.id });
+            this.$message.success("删除成功");
+            this.getList();
+          } catch (e) {
+            console.log(e);
+          }
+        })
+        .catch(() => {});
+    },
+    async addSurvey() {
       (this.activeRow = null), (this.surveyTitle = "新增满意度调查");
-     await this.setQuestion();
+      await this.setQuestion();
       this.isdisabled = false;
       this.surveyVisible = true;
     },

+ 10 - 3
src/views/resetTeaming/components/archicesComponents/teamInfo.vue

@@ -7,8 +7,10 @@
             <span class="shape"></span>
             <p style="margin-right: 5px">乐团资讯</p>
           </div>
+        <auth auths="musicGroupNews/add">
+        <el-button type="text" @click="addInfo">+新增乐团资讯</el-button>
+        </auth>
 
-          <el-button type="text" @click="addInfo">+新增乐团资讯</el-button>
         </div>
       </template>
     </el-alert>
@@ -34,8 +36,13 @@
       <el-table-column align="center" prop="id" label="操作">
         <template slot-scope="scope">
           <div>
-            <el-button type="text" @click="resetInfo(scope.row)">修改</el-button>
-            <el-button type="text" @click="deleteInfo(scope.row)">删除</el-button>
+                  <auth auths="musicGroupNews/update">
+          <el-button type="text" @click="resetInfo(scope.row)">修改</el-button>
+        </auth>
+                 <auth auths="musicGroupNews/del">
+          <el-button type="text" @click="deleteInfo(scope.row)">删除</el-button>
+        </auth>
+
           </div>
         </template>
       </el-table-column>

+ 27 - 24
src/views/resetTeaming/components/archicesComponents/trainPlan.vue

@@ -18,10 +18,11 @@
               ></overflow-text>
             </span>
           </div>
-
-          <el-button type="text" style="width: 100px" @click="addPlan"
-            >+新增训练规划</el-button
-          >
+          <auth auths="musicGroupTrainPlan/add">
+            <el-button type="text" style="width: 100px" @click="addPlan"
+              >+新增训练规划</el-button
+            >
+          </auth>
         </div>
       </template>
     </el-alert>
@@ -119,20 +120,24 @@
               <p class="concat">
                 <Tooltip :content="item.plan.value || '暂无规划'" />
               </p>
-              <el-button
-                class="button"
-                :disabled="!item.plan.value || !item.timer"
-                type="text"
-                @click="resetPlan(item)"
-                >修改</el-button
-              >
-              <el-button
-                class="button"
-                :disabled="Boolean(item.timer)"
-                type="text"
-                @click="detelePlan(item)"
-                >删除</el-button
-              >
+              <auth auths="musicGroupTrainPlan/update">
+                <el-button
+                  class="button"
+                  :disabled="!item.plan.value || !item.timer"
+                  type="text"
+                  @click="resetPlan(item)"
+                  >修改</el-button
+                >
+              </auth>
+              <auth auths="musicGroupTrainPlan/del">
+                <el-button
+                  class="button"
+                  :disabled="Boolean(item.timer)"
+                  type="text"
+                  @click="detelePlan(item)"
+                  >删除</el-button
+                >
+              </auth>
             </div>
           </el-timeline-item>
         </el-timeline>
@@ -167,10 +172,8 @@
 import { getMusicGroupAllClass } from "@/api/buildTeam";
 import {
   getCourseType,
-  getPlanCourseNum,
   getMusicGroupTrainPlan,
   deteleMusicGroupTrainPlan,
-  getExceptionPlan,
 } from "./api";
 import { filterCourseType } from "@/constant/index";
 import addplan from "./modals/addPlan";
@@ -320,9 +323,11 @@ export default {
       this.getList(obj);
     },
     async getList(obj) {
-
       try {
-            await this.$emit('getPlanError',{year:this.searchForm.year,term:this.searchForm.term})
+        await this.$emit("getPlanError", {
+          year: this.searchForm.year,
+          term: this.searchForm.term,
+        });
         const res2 = await getMusicGroupTrainPlan(obj);
         let dayjs = this.$helpers.dayjs;
         let timestamp;
@@ -383,8 +388,6 @@ export default {
       } catch (e) {
         console.log(e);
       }
-
-
     },
     // 删除尚未接完
     detelePlan(item) {

+ 1 - 1
src/views/resetTeaming/components/archicesComponents/trainTimer.vue

@@ -6,7 +6,7 @@
           <span class="shape"></span>
           <p style="margin-right:5px">训练时长</p>
           <el-tooltip placement="top" popper-class="mTooltip">
-            <div slot="content">师资安排中第一位为主教老师</div>
+            <div slot="content">声部课包括:声部课、集训声部课;合奏课包括:合奏课、集训合奏课</div>
             <i
               class="el-icon-question micon el-tooltip"
               style="font-size: 18px; color: #f56c6c"

+ 9 - 9
src/views/resetTeaming/components/musicArchices.vue

@@ -4,12 +4,12 @@
       <el-tab-pane
         label="基本信息"
         lazy
-        v-if="permission('/teamBaseInfo')"
+        v-if="permission('/archicesBaseinfo')"
         name="1"
       >
         <baseInfo v-if="activeIndex == 1" />
       </el-tab-pane>
-      <el-tab-pane lazy v-if="permission('/teamBaseInfo')" name="2">
+      <el-tab-pane lazy v-if="permission('/archicesStudeentAndTEacher')" name="2">
         <el-badge
           slot="label"
           class="badge"
@@ -19,7 +19,7 @@
         >
         <studentAndTeacher v-if="activeIndex == 2" />
       </el-tab-pane>
-      <el-tab-pane lazy v-if="permission('/teamBaseInfo')" name="3">
+      <el-tab-pane lazy v-if="permission('/archicesTrainPlan')" name="3">
         <el-badge
           slot="label"
           class="badge"
@@ -33,7 +33,7 @@
       <el-tab-pane
         label="训练时长"
         lazy
-        v-if="permission('/teamBaseInfo')"
+        v-if="permission('/archicesTrainTimer')"
         name="4"
       >
         <trainTimer v-if="activeIndex == 4" />
@@ -41,7 +41,7 @@
       <el-tab-pane
         label="作业情况"
         lazy
-        v-if="permission('/teamBaseInfo')"
+        v-if="permission('/archicesWorkStatus')"
         name="5"
       >
         <workStatus v-if="activeIndex == 5" />
@@ -49,7 +49,7 @@
       <el-tab-pane
         label="训练照片"
         lazy
-        v-if="permission('/teamBaseInfo')"
+        v-if="permission('/archicesTrainingPhotos')"
         name="6"
       >
         <training-photos v-if="activeIndex == 6" />
@@ -57,7 +57,7 @@
       <el-tab-pane
         label="获奖证书"
         lazy
-        v-if="permission('/teamBaseInfo')"
+        v-if="permission('/archicesPhotosDetail')"
         name="9"
       >
         <photo-detail type="SHOW" v-if="activeIndex == 9" />
@@ -65,7 +65,7 @@
       <el-tab-pane
         label="乐团资讯"
         lazy
-        v-if="permission('/teamBaseInfo')"
+        v-if="permission('/archicesTeamInfo')"
         name="7"
       >
         <teamInfo v-if="activeIndex == 7" />
@@ -73,7 +73,7 @@
       <el-tab-pane
         label="满意度调查"
         lazy
-        v-if="permission('/teamBaseInfo')"
+        v-if="permission('/archicesSurver')"
         name="8"
       >
         <survey v-if="activeIndex == 8" />