Browse Source

提交 差权限和列表

1
mo 2 years ago
parent
commit
289e7346fc

+ 8 - 7
src/views/resetTeaming/index.vue

@@ -220,14 +220,14 @@
         </el-tab-pane>
 
         <!--   v-if="permission('/resetTeaming/coursePlan')" -->
-        <!-- <el-tab-pane
-          label="乐团档案"
+        <el-tab-pane
+          label="转换记录"
           :disabled="!teamid"
-          name="13"
-          v-if="permission('/teamJournal')"
+          name="14"
+
         >
-          <musicArchives :teamid="teamid" v-if="activeIndex == 13" />
-        </el-tab-pane> -->
+          <convertList :teamid="teamid" v-if="activeIndex == 14" />
+        </el-tab-pane>
       </tab-router>
     </div>
   </div>
@@ -254,7 +254,7 @@ import forecastNameList from "@/views/teamBuild/forecastNameList";
 import musicOrder from "@/views/teamDetail/teamDetailedList";
 import teamJournal from "@/views/teamBuild/components/teamJournal";
 import teamRemainTime from "@/views/teamBuild/components/teamRemainTime";
-
+import convertList from '@/views/teamDetail/components/convertList'
 import merge from "webpack-merge";
 import { permission } from "@/utils/directivePage";
 import { getTeamBaseInfo } from "@/api/buildTeam";
@@ -278,6 +278,7 @@ export default {
     musicArchives,
     forecastNameList,
     giveMemberList,
+    convertList
   },
   name: "resetTeaming",
   data() {

+ 16 - 0
src/views/teamDetail/api.js

@@ -71,3 +71,19 @@ export const courseScheduleConvert = data => request2({
   data,
   method: 'post'
 })
+
+
+// 获取转换后的课程
+export const getConvertList = data => request2({
+  url: '/api-web/courseScheduleConvert/queryPage',
+  data,
+  method: 'post'
+})
+
+// 课程还原
+export const revokeConvert = data => request2({
+  url: '/api-web/courseScheduleConvert/revoke',
+  data,
+  params: data,
+  method: 'get'
+})

+ 240 - 0
src/views/teamDetail/components/convertList.vue

@@ -0,0 +1,240 @@
+
+<template>
+  <div>
+    <save-form
+      :inline="true"
+      class="searchForm"
+      save-key="teamDetails-convertList"
+      @submit="search"
+      @reset="onReSet"
+      :model="searchForm"
+    >
+      <el-form-item prop="search">
+        <el-input
+          v-model.trim="searchForm.search"
+          clearable
+          placeholder="转换前班级名称"
+          @keyup.enter.native="
+            (e) => {
+              e.target.blur();
+              $refs.searchForm.save();
+              search();
+            }
+          "
+        ></el-input>
+      </el-form-item>
+      <el-form-item prop="operator">
+        <el-input
+          v-model.trim="searchForm.operator"
+          clearable
+          placeholder="操作人"
+          @keyup.enter.native="
+            (e) => {
+              e.target.blur();
+              $refs.searchForm.save();
+              search();
+            }
+          "
+        ></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-date-picker
+          v-model.trim="searchForm.date"
+          style="width: 400"
+          type="daterange"
+          align="right"
+          unlink-panels
+          range-separator="-"
+          start-placeholder="操作开始日期"
+          end-placeholder="操作结束日期"
+          value-format="yyyy-MM-dd"
+          :picker-options="pickerOptions"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="search" type="danger">搜索</el-button>
+        <el-button type="primary" native-type="reset">重置</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="oldClassName">
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="convertCourseNum"
+          label="转换课时数"
+        >
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="convertAfterClassNum"
+          label="转换后班级数"
+        >
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="convertAfterCourseNum"
+          label="转换后课时数"
+        >
+        </el-table-column>
+        <el-table-column align="center" prop="operatorName" label="操作人">
+        </el-table-column>
+        <el-table-column align="center" prop="createTime" label="操作时间">
+        </el-table-column>
+
+        <el-table-column align="center" label="操作">
+          <template slot-scope="scope">
+            <div>
+              <!--       -->
+              <el-button
+                type="text"
+                :disabled="!scope.row.revokeFlag"
+                v-if="permission('courseSchedule/queryTeacherSalary')"
+                @click="revokeCourse(scope.row)"
+                >还原</el-button
+              >
+              <el-button
+                type="text"
+                v-if="permission('courseSchedule/queryTeacherSalary')"
+                @click="setCourseInfo(scope.row)"
+                >查看</el-button
+              >
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        save-key="teamDetails-convertList"
+        :total.sync="rules.total"
+        :page.sync="rules.page"
+        :limit.sync="rules.limit"
+        :page-sizes="rules.page_size"
+        @pagination="getList"
+      />
+    </div>
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import { permission } from "@/utils/directivePage";
+import { getConvertList, revokeConvert } from "../api";
+import { getTimes } from "@/utils";
+export default {
+  name: "tsalaryList",
+  data() {
+    return {
+      dialogTableVisible: false,
+      innerVisible: false,
+      searchForm: {
+        timer: [], // 时间选择器返回的值
+        operator: "",
+        search: "",
+      },
+      pickerOptions: {
+        firstDayOfWeek: 1,
+      }, // 时间选择器默认选项
+      tableList: [], // table列表
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      searchLsit: [],
+      activeTeacherList: [{ 1: 1 }],
+      teacherMask: {
+        salary: "",
+        subsidy: "",
+        radio: "",
+      },
+      courseScheduleId: "",
+      teacherRules: {
+        salary: [
+          { required: true, message: "请输入课程课酬", trigger: "blur" },
+        ],
+        subsidy: [
+          { required: true, message: "请输入课时补贴", trigger: "blur" },
+        ],
+        radio: [{ required: true, message: "请选择调整范围", trigger: "blur" }],
+      },
+      tempSelectRow: {}, // 选中班级数据
+    };
+  },
+  components: {
+    pagination,
+  },
+  mounted() {
+    this.getList();
+  },
+  methods: {
+    permission(str) {
+      return permission(str);
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.$refs.searchForm.resetFields();
+      this.search();
+    },
+    getList() {
+      this.teamid = this.$route.query.id;
+
+      const { timer, ...rest } = this.searchForm;
+      // try {
+      //   const res = await getLiveBroadcastList({
+      //     ...rest,
+      //     ...getTimes(timer, ["startTime", "endTime"]),
+      //     rows: this.rules.limit,
+      //     page: this.rules.page,
+      //   });
+      //   this.tableList = res.data.rows;
+      //   this.rules.total = res.data.total;
+      // } catch (e) {
+      //   console.log(e);
+      // }
+
+      // searchForm.date
+      // if (!this.searchForm.date) {
+      //   this.searchForm.date = [];
+      // }
+
+      let obj = {
+        musicGroupId: this.teamid,
+        ...rest,
+        ...getTimes(timer, ["startTime", "endTime"]),
+        page: this.rules.page,
+        rows: this.rules.limit,
+      };
+      getConvertList(obj).then((res) => {
+        if (res.code == 200) {
+          this.tableList = res.data.rows;
+          this.rules.total = res.data.total;
+        }
+      });
+    },
+    async revokeCourse(row) {
+      try {
+        await this.$confirm("是否确还原转换课程?", "提示", {
+          type: "warning",
+        });
+        const res = await revokeConvert({ courseConvertId: row.id });
+        this.getList();
+      } catch (e) {
+        console.log(e);
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scope>
+</style>

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

@@ -27,7 +27,7 @@
     <save-form
       ref="searchForm"
       :inline="true"
-      :save-key="saveKey"
+      :save-key="saveKey" 
       class="searchForm"
       @submit="search"
       @reset="onReSet"

+ 2 - 2
vue.config.js

@@ -17,11 +17,11 @@ const name = defaultSettings.title || "管乐迷后台管理系统"; // page tit
 // //  https://online.dayaedu.com
 // let target = 'https://online.dayaedu.com' //线上
 // let target = 'http://192.168.3.251:8000' // 何国威
-let target = 'http://192.168.3.20:8000' //邹璇
+// let target = 'http://192.168.3.20:8000' //邹璇
 // let target = 'http://192.168.3.119:8000' //勇哥
 // let target = 'http://192.168.3.146:8000' //王昭
 // let target = 'http://dev.dayaedu.com' // 开发环境
-// let target = "https://test.dayaedu.com"; //测试环境
+let target = "https://test.dayaedu.com"; //测试环境
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**