소스 검색

乐团主管课程安排

1
mo 4 년 전
부모
커밋
6febc95290
6개의 변경된 파일244개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 0
      src/constant/index.js
  2. 12 0
      src/utils/vueFilter.js
  3. 6 0
      src/views/main/api.js
  4. 5 0
      src/views/main/index.vue
  5. 214 0
      src/views/main/teamSchedule/index.vue
  6. 2 2
      vue.config.js

+ 5 - 0
src/constant/index.js

@@ -206,3 +206,8 @@ export const musicClassType = {
   HIGH_ONLINE:'线上基础技能班',
   MUSIC_NETWORK:"乐团网管课"
 }
+
+export const inspectionItem = {
+  INSPECT:'下校巡查',
+  VISIT:'学员回访'
+}

+ 12 - 0
src/utils/vueFilter.js

@@ -139,6 +139,13 @@ Vue.filter('dayjsFormat', (value) => {
     return value
   }
 })
+Vue.filter('dayjsFormatWeek', (value) => {
+  if (value) {
+    return dayjs(value).format('YYYY-MM')
+  } else {
+    return value
+  }
+})
 
 Vue.filter('dayjsFormatMinute', (value) => {
   if (value) {
@@ -707,3 +714,8 @@ Vue.filter('rewardModeTypeFormat', value => {
 Vue.filter('journalTypeFormat', value => {
   return constant.journalType[value]
 })
+
+// 日程安排 inspectionItem
+Vue.filter('inspectionItemFormat', value => {
+  return constant.inspectionItem[value]
+})

+ 6 - 0
src/views/main/api.js

@@ -6,3 +6,9 @@ export const getIndex = data => request2({
   params: data,
   method: 'get',
 })
+export const getInspectionItem = data => request2({
+  url: '/api-web/inspectionItem/queryPage',
+  params: data,
+  method: 'get',
+})
+

+ 5 - 0
src/views/main/index.vue

@@ -11,6 +11,9 @@
         <!-- <el-tab-pane lazy label="异常处理" name="abnormal">
           <abnormal/>
         </el-tab-pane> -->
+        <el-tab-pane lazy label="【乐团主管】日程安排" name="teamSchedule">
+          <teamSchedule />
+        </el-tab-pane>
       </tab-router>
     </div>
   </div>
@@ -18,11 +21,13 @@
 <script>
 import baseinfo from './baseinfo'
 import abnormal from './abnormal'
+import teamSchedule from './teamSchedule'
 export default {
   name: 'Main',
   components: {
     baseinfo,
     abnormal,
+    teamSchedule
   },
 }
 </script>

+ 214 - 0
src/views/main/teamSchedule/index.vue

@@ -0,0 +1,214 @@
+<template>
+  <div>
+    <save-form
+      :inline="true"
+      :model="searchForm"
+      ref="searchForm"
+      @submit="search"
+      @reset="onReSet"
+      save-key="teamSchedule"
+    >
+      <el-form-item prop="organId">
+        <el-select
+          class="multiple"
+          v-model.trim="searchForm.organId"
+          filterable
+          clearable
+          placeholder="请选择分部"
+        >
+          <el-option
+            v-for="(item, index) in selects.branchs"
+            :key="index"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="userId">
+        <remote-search :commit="'setEducations'" v-model="searchForm.userId" />
+      </el-form-item>
+      <el-form-item prop="month">
+        <el-date-picker
+          v-model="searchForm.month"
+          value-format="yyyy-MM"
+          type="month"
+          placeholder="请选择月"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button native-type="submit" type="primary">搜索</el-button>
+        <el-button native-type="reset" type="danger">重置</el-button>
+      </el-form-item>
+    </save-form>
+    <el-table
+      style="width: 100%"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      :data="tableList"
+    >
+      <el-table-column align="center" prop="organName" label="分部">
+        <template slot-scope="scope">
+          <div>
+            <copy-text>{{ scope.row.organName }}</copy-text>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="month" label="工作周期">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.month | dayjsFormatWeek }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="userName" label="乐团主管">
+        <template slot-scope="scope">
+          <div>
+            <copy-text>{{ scope.row.userName }}</copy-text>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="item" label="任务事项">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.item | inspectionItemFormat }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="times"
+        label="任务次数"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="plannedTimes"
+        label="已安排日程次数"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="submittedTimes"
+        label="已提交任务数"
+      >
+        <template slot-scope="scope">
+          <div
+            :style="
+              scope.row.times > scope.row.submittedTimes ? 'color:red' : ''
+            "
+          >
+            {{ scope.row.submittedTimes }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="memo" label="处理意见">
+        <template slot-scope="scope">
+          <overflow-text :text="scope.row.linkUrl"></overflow-text>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="studentId" label="操作">
+        <template slot-scope="scope">
+          <div>
+            <el-button type="text">安排日程</el-button>
+            <auth :auths="['inspectionItem/update']">
+              <el-button
+                type="text"
+                :disabled="scope.row.times < scope.row.submittedTimes"
+                @click="resetLine(scope.row)"
+                >处理方式</el-button
+              >
+            </auth>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      sync
+      :total.sync="rules.total"
+      save-key="teamSchedule"
+      :page.sync="rules.page"
+      :limit.sync="rules.limit"
+      :page-sizes="rules.page_size"
+      @pagination="getList"
+    />
+    <el-dialog title="处理方式" width="700px" :visible.sync="handleVisible">
+      <el-form :model="handleForm">
+        <el-form-item label="请填写处理方式" prop="memo">
+          <el-input
+            type="textarea"
+            :rows="3"
+            v-model="handleForm.memo"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="handleVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitHandle">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { getInspectionItem } from "../api";
+import { permission } from "@/utils/directivePage";
+import pagination from "@/components/Pagination/index";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        userId: "",
+        organId: "",
+        month: "",
+      },
+      handleForm: {
+        memo: "",
+        id: "",
+      },
+      tableList: [],
+      handleVisible: false,
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  mounted() {
+    this.$store.dispatch("setBranchs");
+    this.getList();
+  },
+  methods: {
+    permission(str) {
+      return permission(str);
+    },
+    onReSet() {
+      this.rules.page = 1;
+      this.$refs.searchForm.resetFields();
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    async getList() {
+      try {
+        this.searchForm.page = this.rules.page;
+        this.searchForm.rows = this.rules.limit;
+        const res = await getInspectionItem(this.searchForm);
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    resetLine(row) {
+      let { id, memo } = row;
+      this.handleForm = { id, memo };
+      this.handleVisible = true;
+    },
+    submitHandle() {},
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 2 - 2
vue.config.js

@@ -18,10 +18,10 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // //  https://online.dayaedu.com
 // let target = 'https://online.dayaedu.com' //线上
 // let target = 'http://dyme.utools.club' //test环境
-// let target = 'http://192.168.3.139:8000' // 箭河
+let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 测试服
+// let target = 'http://dev.dayaedu.com' // 测试服
 // let target = 'http://192.168.3.196' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {