瀏覽代碼

学校端修改

1
mo 2 年之前
父節點
當前提交
337c8a9cdb

+ 52 - 55
src/components/save-form/index.vue

@@ -1,104 +1,102 @@
 <template>
   <el-form
     class="save-form"
-    v-bind="{...$attrs, ...$props}"
-
+    v-bind="{ ...$attrs, ...$props }"
     v-on="$listeners"
     @submit.stop.native="submit"
     @reset.stop.native="reset"
     ref="form"
   >
-    <slot/>
+    <slot />
   </el-form>
 </template>
 <script>
-import { Searchs } from '@/helpers'
+import { Searchs } from "@/helpers";
 export default {
-  name: 'save-form',
-  props: ['model', 'save-key', 'noclear'],
+  name: "save-form",
+  props: ["model", "save-key", "noclear"],
   data() {
     return {
-      searchs: null
-    }
+      searchs: null,
+    };
   },
 
   mounted() {
-    this.setFormValue()
+    this.setFormValue();
   },
   methods: {
     setFormValue() {
-
-      const searchs = new Searchs(this.saveKey || this.$route.path)
-      this.searchs = searchs
-      const active = searchs.get()
+      const searchs = new Searchs(this.saveKey || this.$route.path);
+      this.searchs = searchs;
+      const active = searchs.get();
       for (const key in active.form) {
         if (active.form.hasOwnProperty(key)) {
-          const item = active.form[key]
-          this.model[key] = item
+          const item = active.form[key];
+          this.model[key] = item;
         }
       }
       if (this.saveKey) {
-        this.searchs.update(this.$route.path, undefined, 'bind')
+        this.searchs.update(this.$route.path, undefined, "bind");
       }
     },
     submit(evt) {
-      evt.stopPropagation()
-      evt.stopImmediatePropagation()
-      evt.preventDefault()
+      evt.stopPropagation();
+      evt.stopImmediatePropagation();
+      evt.preventDefault();
       if (this.saveKey) {
-        this.searchs.update(this.$route.path, undefined, 'bind')
+        this.searchs.update(this.$route.path, undefined, "bind");
       }
-      this.searchs.update(this.model, undefined, 'form')
-        //  (  new Searchs().searchs)
+      this.searchs.update(this.model, undefined, "form");
+      //  (  new Searchs().searchs)
       if (this.$listeners.submit) {
-        this.$listeners.submit(evt)
+        this.$listeners.submit(evt);
       }
-
     },
     reset(evt) {
-      evt.stopPropagation()
-      evt.stopImmediatePropagation()
-      evt.preventDefault()
-      let setItemEvent = new Event('watchStorage')
-      window.dispatchEvent(setItemEvent)
+      evt.stopPropagation();
+      evt.stopImmediatePropagation();
+      evt.preventDefault();
+      let setItemEvent = new Event("watchStorage");
+      window.dispatchEvent(setItemEvent);
 
       if (this.$listeners.reset) {
         if (this.noclear == undefined) {
           this.$nextTick(() => {
-            this.resetFields()
+            this.resetFields();
             // this.setFormValue()
-          })
+          });
         } else {
-          this.resetFields()
+          this.resetFields();
         }
-        this.$listeners.reset()
+        this.$listeners.reset();
       } else {
-        this.resetFields()
+        this.resetFields();
       }
     },
-    save(search = null, type = 'form') {
-      search = search ? search : this.model
-      this.searchs.update(search, undefined, type)
+    save(search = null, type = "form") {
+      search = search ? search : this.model;
+
+      this.searchs.update(search, undefined, type);
     },
     validate(FC) {
-      this.$refs.form.validate(valid => {
-        FC(valid)
+      this.$refs.form.validate((valid) => {
+        FC(valid);
         if (valid) {
-          this.searchs.update(this.model, undefined, 'form')
+          this.searchs.update(this.model, undefined, "form");
         }
-      })
+      });
     },
     resetFields() {
-      this.$refs.form.resetFields()
-      this.searchs.update(this.model, undefined, 'form')
-      this.searchs.update({}, undefined, 'page')
-    }
+      this.$refs.form.resetFields();
+      this.searchs.update(this.model, undefined, "form");
+      this.searchs.update({}, undefined, "page");
+    },
   },
-}
+};
 </script>
 <style lang="less" scoped>
-.save-form{
-  ::v-deep  .el-input__inner{
+.save-form {
+  ::v-deep .el-input__inner {
     width: 180px;
     overflow: hidden;
     text-overflow: ellipsis;
@@ -106,22 +104,21 @@ export default {
   ::v-deep .el-select {
     width: 100%;
   }
-  ::v-deep .el-date-editor.el-input{
+  ::v-deep .el-date-editor.el-input {
     width: 180px;
   }
-  ::v-deep  .el-form-item__content .el-col {
+  ::v-deep .el-form-item__content .el-col {
     width: 180px;
   }
-  ::v-deep  .el-col.line{
-    width: 15px!important;
+  ::v-deep .el-col.line {
+    width: 15px !important;
     text-align: center;
   }
-  ::v-deep  .el-date-editor--daterange{
+  ::v-deep .el-date-editor--daterange {
     width: 375px;
   }
-  ::v-deep  .el-form-item__content .el-col:last-child .el-form-item{
+  ::v-deep .el-form-item__content .el-col:last-child .el-form-item {
     margin-right: 0;
   }
 }
-
 </style>

+ 17 - 13
src/views/categroyManager/insideSetting/branchManager.vue

@@ -136,12 +136,7 @@
                   type="text"
                   >删除</el-button
                 >
-                <el-button
-                  @click="rejuest(scope.row)"
-                  v-permission="'cooperationOrgan/del'"
-                  type="text"
-                  >领队注册</el-button
-                >
+                <el-button @click="rejuest(scope.row)" type="text">领队注册</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -168,6 +163,7 @@
       :title="formTitle[formActionTitle]"
       :visible.sync="teachingStatus"
       width="1060px"
+      v-if="teachingStatus"
     >
       <el-form
         :model="form"
@@ -266,7 +262,7 @@
           <el-form-item label="合作单位logo" :label-width="formLabelWidth">
             <image-cropper
               :options="cropperOptions"
-              bucket_name="cloud-coach"
+              bucket_name="daya"
               :imgSize="2"
               :imageUrl="form.logo"
               showSize
@@ -380,14 +376,15 @@
       :isDown="true"
       ref="qrCode"
     >
-      <el-radio-group v-model="radio" @change="changeRadio">
+      <el-radio-group v-model="radio" @change="changeRadio" class="groupWrap">
+        <el-radio label="SCHOOL_LEADER">分管领导</el-radio>
+        <el-radio label="TEACHER">负责老师</el-radio>
         <el-radio :disabled="staffStat.orchestraLeaderNums > 0" label="ORCHESTRA_LEADER"
           >乐团领队</el-radio
         >
-        <el-radio label="SCHOOL_LEADER">分管领导</el-radio>
-        <el-radio label="TEACHER">负责老师</el-radio>
+
         <el-radio :disabled="staffStat.schoolmasterNums > 0" label="SCHOOLMASTER"
-          >校长</el-radio
+          >学校校长</el-radio
         >
       </el-radio-group>
     </qr-code>
@@ -494,7 +491,7 @@ export default {
       },
       codeStatus: false,
       codeUrl: "www.baidu.com",
-      radio: "ORCHESTRA_LEADER",
+      radio: "SCHOOL_LEADER",
       staffStat: {
         orchestraLeaderNums: 0,
         orchestraNums: 0,
@@ -726,7 +723,8 @@ export default {
     //上传图片成功
     cropSuccess(data) {
       // this.imgUrl = data.data.avatar
-      this.form.logo = data.data.url;
+      // this.form.logo = data.data.url;
+      this.$set(this.form, "logo", data.data.url);
       console.log(this.form.logo, "cropSuccess");
     },
     async rejuest(row) {
@@ -775,6 +773,12 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
+// .groupWrap {
+//   display: flex;
+//   flex-direction: row;
+//   justify-content: space-around;
+//   flex-wrap: wrap;
+// }
 .eidtForm {
   ::v-deep .el-form-item__content {
     display: block !important;

+ 2 - 1
src/views/main/constant.js

@@ -135,7 +135,8 @@ export const errorType = {
     permission: "/schoolPatrol",
     always: true,
     query: {
-      handleStatus: false
+      handleStatus: 'false',
+      evaluateStatus:"UNQUALIFIED"
     }
   },
   MUSIC_PATROL_ITEM: {

+ 10 - 14
src/views/schoolManager/accountManager.vue

@@ -73,7 +73,11 @@
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           :data="tableList"
         >
-          <el-table-column align="center" prop="id" label="编号"></el-table-column>
+          <el-table-column
+            align="center"
+            prop="userId"
+            label="用户编号"
+          ></el-table-column>
           <el-table-column align="center" prop="organName" label="分部"></el-table-column>
           <el-table-column
             align="center"
@@ -123,26 +127,18 @@
                   >
                 </auth>
                 <auth auths="schoolStaff/updateAccount">
-                  <el-button
-                    type="text"
-                    v-if="scope.row.status == 9"
-                    @click="resetCount(scope.row)"
-                    >修改</el-button
-                  >
+                  <el-button type="text" @click="resetCount(scope.row)">修改</el-button>
                 </auth>
-                <auth auths="schoolStaff/remove">
+                <!-- <auth auths="schoolStaff/remove">
                   <el-button
                     type="text"
                     v-if="scope.row.status == 9"
                     @click="removeTeacherCount(scope.row)"
                     >删除</el-button
                   ></auth
-                >
+                > -->
                 <auth auths="schoolStaff/resetPassword">
-                  <el-button
-                    type="text"
-                    v-if="scope.row.status == 9"
-                    @click="resetPwd(scope.row)"
+                  <el-button type="text" @click="resetPwd(scope.row)"
                     >重置密码</el-button
                   ></auth
                 >
@@ -341,7 +337,7 @@ export default {
   watch: {
     "searchForm.organId"(val) {
       if (val) {
-        queryByOrganId({ organId: val }).then((res) => {
+        queryByOrganId({ organId: val, enable: true }).then((res) => {
           if (res.code == 200) {
             this.cooperationList = res.data;
           }

+ 13 - 1
src/views/schoolManager/patrol.vue

@@ -245,6 +245,7 @@ import load from "@/utils/loading";
 import { getTimes } from "@/utils";
 import { queryByOrganId } from "@/api/systemManage";
 import { getCoursePatrolEvaluation } from "./api";
+import { resetQuery } from "@/utils/utils";
 import {
   courseType,
   courseListType,
@@ -289,19 +290,30 @@ export default {
   mounted() {
     // 获取分部
     if (this.$route.query.handleStatus) {
-      console.log(this.$route.query.handleStatus);
       this.$set(
         this.searchForm,
         "handleStatus",
         Boolean(this.$route.query.handleStatus * 1)
       );
     }
+
+    if (this.$route.query.evaluateStatus) {
+      this.$set(this.searchForm, "evaluateStatus", this.$route.query.evaluateStatus);
+    }
+
     this.$store.dispatch("setBranchs");
     this.init();
   },
   methods: {
     init() {
       this.getList();
+      console.log(this.$refs.saveForm, "this.$refs.saveForm", this.$refs.saveForm.save);
+      // this.$refs.saveForm.save();
+      // resetQuery(this, {
+      //   handleStatus: undefined,
+      //   evaluateStatus: undefined,
+      //   filter_type: undefined,
+      // });
     },
     async getList() {
       try {