浏览代码

修改问题

lex-xin 5 年之前
父节点
当前提交
00da1324e8

+ 59 - 44
src/views/categroyManager/insideSetting/branchActiveOperation.vue

@@ -41,7 +41,7 @@
             <el-form-item prop="organIdList" label="适用分部" style="width: 500px">
                  <el-select style="width: 100% !important;" v-model="result.organIdList" multiple placeholder="请选择">
                     <el-option v-for="item in branchList"
-                        :key="item.value" :label="item.label" :value="item.value"> </el-option>
+                        :key="item.value" :label="item.label" :value="item.value" :disabled="item.disabled"> </el-option>
                 </el-select>
             </el-form-item>
             <el-form-item>
@@ -64,6 +64,7 @@ export default {
         pageType: this.$route.query.type,
         id: this.$route.query.id,
         branchList: [],
+        useBranchId: [], // 使用的分部编号
         result: {
             name: null,
             rewardMode: null,
@@ -89,56 +90,70 @@ export default {
       this.__init()
   },
   methods: {
-    __init() {
+    async __init() {
         this.$refs.form.resetFields()
-        branchQueryPage({
-            delFlag: 0,
-            rows: 9999
-        }).then(res => {
-            if(res.code == 200) {
-                res.data.rows.forEach(item =>{
-                    this.branchList.push({
+        // 获取已经配置过的分部编号
+        let result = await queryOrganIdList()
+        let branchList = await branchQueryPage({ delFlag: 0, rows: 9999 })
+        if(result.code == 200) {
+            this.useBranchId = result.data
+        }
+        if(branchList.code == 200) {
+            branchList.data.rows.forEach(item =>{
+                let tempArr = {}
+                if(this.useBranchId.indexOf(item.id) != -1) {
+                    tempArr = {
                         label: item.name,
-                        value: item.id
-                    })
-                })
-            }
-        })
-
-        queryOrganIdList().then(res => {
-            let result = res.data
-            console.log(result)
-        })
-
-        if(this.pageType == 'update') {
-            courseScheduleRewardsQuery({ id: this.id}).then(res => {
-                if(res.code == 200) {
-                    let data = res.data
-                    let tempList = []
-                    if(data.organIdList) {
-                        data.organIdList.split(',').forEach(item => {
-                            tempList.push(parseInt(item))
-                        })
+                        value: item.id,
+                        disabled: true
                     }
-                    this.result = {
-                        id: data.id,
-                        name: data.name,
-                        rewardMode: data.rewardMode,
-                        organIdList: tempList,
-                        courseScheduleType: data.courseScheduleType,
-                        domains: data.rewardsRulesJson ? 
-                                JSON.parse(data.rewardsRulesJson) : [{
-                                    min: null,
-                                    max: null,
-                                    money: null,
-                                    disabled: false,
-                                    key: Date.now()
-                                }],
-                        errorText: null
+                } else {
+                    tempArr = {
+                        label: item.name,
+                        value: item.id
                     }
                 }
+                this.branchList.push(tempArr)
             })
         }
+
+        if(this.pageType == 'update') {
+            let courseScheduleRewards = await courseScheduleRewardsQuery({ id: this.id})
+            if(courseScheduleRewards.code == 200) {
+                let data = courseScheduleRewards.data
+                let tempList = []
+                if(data.organIdList) {
+                    data.organIdList.split(',').forEach(item => {
+                        tempList.push(parseInt(item))
+                    })
+                }
+                this.result = {
+                    id: data.id,
+                    name: data.name,
+                    rewardMode: data.rewardMode,
+                    organIdList: tempList,
+                    courseScheduleType: data.courseScheduleType,
+                    domains: data.rewardsRulesJson ? 
+                            JSON.parse(data.rewardsRulesJson) : [{
+                                min: null,
+                                max: null,
+                                money: null,
+                                disabled: false,
+                                key: Date.now()
+                            }],
+                    errorText: null
+                }
+                
+                // 修改可以取消选中
+                this.branchList.forEach(item => {
+                    if(tempList.indexOf(item.value) != -1) {
+                        item.disabled = false
+                    }
+                })
+            }
+        }
+
+        
     },
     onSubmit(formName) {
         this.$refs[formName].validate((valid) => {

+ 2 - 0
src/views/journal/journalItem.vue

@@ -131,6 +131,8 @@ export default {
             this.showRight = true
             this.showMessage = item
             item.readStatus = 1
+            
+            this.noReadMessage--
           }
         })
       }

+ 2 - 1
src/views/journal/leaveOperation.vue

@@ -255,12 +255,13 @@ export default {
           if(res.code == 200) {
             item.readStatus = 1
             this.getLeaveItem(item.memo)
+
+            this.noReadMessage--
           }
         })
       }
     },
     getLeaveItem(memo) {
-      console.log(memo)
       memo = JSON.parse(memo)
       leaveQueryDetail({ id: memo.leaveRecordId }).then(res => {
         if(res.code == 200) {

+ 1 - 0
src/views/journal/musicGroup.vue

@@ -209,6 +209,7 @@ export default {
           if(res.code == 200) {
             item.readStatus = 1
             this.getItemInfo(item.memo)
+            this.noReadMessage--
           }
         })
       }

+ 2 - 0
src/views/journal/studentComplain.vue

@@ -195,6 +195,8 @@ export default {
           if(res.code == 200) {
             item.readStatus = 1
             this.getCourseDetail(memo.courseScheduleComplaintsId)
+
+            this.noReadMessage--
           }
         })
       }

+ 2 - 0
src/views/journal/vipApply.vue

@@ -202,6 +202,8 @@ export default {
           if(res.code == 200) {
             item.readStatus = 1
             this.getVipGroupItem(item.memo)
+
+            this.noReadMessage--
           }
         })
       }

+ 1 - 6
src/views/studentManager/components/studentRecord.vue

@@ -122,11 +122,6 @@ export default {
         { label: '试听课', value: 'DEMO' }
       ],
       att: [
-        // { value: "NORMAL", label: "正常" },
-        // { value: "TRUANT", label: "旷课" },
-        // { value: "LEAVE", label: "请假" },
-        // { value: "QUIT_SCHOOL", label: "休学" },
-        // { value: "DROP_OUT", label: "退学" }
         { value: "NORMAL", label: "正常" },
         { value: "TRUANT", label: "旷课" },
         { value: "LEAVE", label: "请假" },
@@ -163,7 +158,7 @@ export default {
     },
     onReSet () { // 重置搜索
       this.searchForm = {
-        userId: this.$route.query.userId,
+        studentId: this.$route.query.userId,
         classGroupType: null,
         attendanceStatus: null,
         classGroupName: null,

+ 9 - 9
src/views/studentManager/index.vue

@@ -10,31 +10,31 @@
                @tab-click="handleClick">
         <el-tab-pane label="基本信息"
                      name="1">
-          <studentInfo v-if="acitveStatus[0]" />
+          <studentInfo v-if="activeIndex == 1" />
         </el-tab-pane>
         <el-tab-pane label="乐团&课程"
                      name="2">
-          <teamAndcourse v-if="acitveStatus[1]" />
+          <teamAndcourse v-if="activeIndex == 2" />
         </el-tab-pane>
         <el-tab-pane label="VIP课"
                      name="3">
-          <studentVip v-if="acitveStatus[2]" />
+          <studentVip v-if="activeIndex == 3" />
         </el-tab-pane>
         <el-tab-pane label="上课记录"
                      name="4">
-          <studentRecord v-if="acitveStatus[3]" />
+          <studentRecord v-if="activeIndex == 4" />
         </el-tab-pane>
         <el-tab-pane label="扣费记录"
                      name="5">
-          <studentPayList v-if="acitveStatus[4]" />
+          <studentPayList v-if="activeIndex == 5" />
         </el-tab-pane>
         <el-tab-pane label="学员订单"
                      name="6">
-          <studentOrder v-if="acitveStatus[5]" />
+          <studentOrder v-if="activeIndex == 6" />
         </el-tab-pane>
         <el-tab-pane label="学员提现"
                      name="7">
-          <studentCashout v-if="acitveStatus[6]" />
+          <studentCashout v-if="activeIndex == 7" />
         </el-tab-pane>
       </el-tabs>
     </div>
@@ -62,7 +62,7 @@ export default {
   data () {
     return {
       activeIndex: '1',
-      acitveStatus: [true, false, false, false, false, false, false]
+      // acitveStatus: [true, false, false, false, false, false, false]
     }
   },
   methods: {
@@ -71,7 +71,7 @@ export default {
     },
     handleClick (val) {
       this.activeIndex = val.name
-      this.acitveStatus[val.name - 1] = true
+      // this.acitveStatus[val.name - 1] = true
     }
   }
 }

+ 9 - 9
src/views/teacherManager/teacherDetail/index.vue

@@ -11,31 +11,31 @@
                @tab-click="handleClick">
         <el-tab-pane label="基本信息"
                      name="0">
-          <teacherInfo v-if="activeStatus[0]" />
+          <teacherInfo v-if="activeName == 0" />
         </el-tab-pane>
         <el-tab-pane label="乐团课"
                      name="1">
-          <courseInfo v-if="activeStatus[1]" />
+          <courseInfo v-if="activeName == 1" />
         </el-tab-pane>
         <el-tab-pane label="VIP课"
                      name="2">
-          <courseInfo1 v-if="activeStatus[2]" />
+          <courseInfo1 v-if="activeName == 2" />
         </el-tab-pane>
         <el-tab-pane label="试听课"
                      name="3">
-          <courseInfo2 v-if="activeStatus[3]" />
+          <courseInfo2 v-if="activeName == 3" />
         </el-tab-pane>
         <el-tab-pane label="上课记录"
                      name="4">
-          <teacherRecord v-if="activeStatus[4]" />
+          <teacherRecord v-if="activeName == 4" />
         </el-tab-pane>
         <el-tab-pane label="请假记录"
                      name="5">
-          <leaveRecord v-if="activeStatus[5]" />
+          <leaveRecord v-if="activeName == 5" />
         </el-tab-pane>
         <el-tab-pane label="上课结算列表"
                      name="6">
-          <settlement v-if="activeStatus[6]" />
+          <settlement v-if="activeName == 6" />
         </el-tab-pane>
       </el-tabs>
     </div>
@@ -58,13 +58,13 @@ export default {
     return {
       teacherName: this.$route.query.teacherName,
       activeName: "0",
-      activeStatus: [true, false, false, false, false, false, false]
+      // activeStatus: [true, false, false, false, false, false, false]
     }
   },
   methods: {
     handleClick (val, event) {
       this.activeName = val.name
-      this.activeStatus[val.name] = true
+      // this.activeStatus[val.name] = true
     },
     onCancel() {
       this.$router.push('/business/teacherList')

+ 2 - 2
vue.config.js

@@ -19,8 +19,8 @@ const name = defaultSettings.title || '大雅后台管理系统' // page title
 // let target = 'http://192.168.3.27:8000' // 箭河
 // let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:8000' //勇哥
-let target = 'http://47.99.212.176:8000' // 测试服
-// let target = 'http://192.168.3.48:8000' // 乔
+// let target = 'http://47.99.212.176:8000' // 测试服
+let target = 'http://192.168.3.48:8000' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**