Browse Source

公共模版

gzb
guozhongbo 9 months ago
parent
commit
a575e43b5d

+ 1
- 1
src/views/schoolSection/strategy/strategyManage.vue View File

@@ -115,11 +115,11 @@ export default {
115 115
         this.showLoading = false;
116 116
         if (res.code === 0) {
117 117
           this.schoolInfo = res.obj;
118
+          this.curClass = this.schoolInfo;
118 119
           if (this.schoolInfo.children.length > 0 && !this.curClass.id) {
119 120
             this.schoolInfo.children.forEach((item) => {
120 121
               item.schoolid = this.schoolInfo.id;
121 122
             });
122
-            this.curClass = this.schoolInfo.children[0];
123 123
           }
124 124
           this.strategy = this.strategy ? this.strategy : 1; //渲染页面
125 125
         } else {

+ 1
- 16
src/views/schoolSection/strategy/strategyTemplate.vue View File

@@ -703,13 +703,11 @@ export default {
703 703
         form.rversion = this.strategyInfo.rversion;
704 704
       }
705 705
       let api = this.strategyInfo.model === "编辑" ? stPad_edit : stPad_add;
706
-      console.log(form);
707 706
       api(form).then((res) => {
708 707
         if (res.code === 0) {
709 708
           this.$Message.success(res.msg);
710 709
           this.searchList();
711 710
           this.strategyInfo.show = false;
712
-          console.log(res.obj);
713 711
         } else {
714 712
           this.$Message.error(res.msg);
715 713
         }
@@ -766,7 +764,6 @@ export default {
766 764
       if (this.empowerInfo.classids.length > 0) {
767 765
         form.classids = this.empowerInfo.classids;
768 766
       }
769
-      console.log(form);
770 767
       this.empowerInfo.show = true;
771 768
       stPad_add_empower(form).then((data) => {
772 769
         if (data.code === 0) {
@@ -822,9 +819,8 @@ export default {
822 819
       }).then((res) => {
823 820
         this.showLoading = false;
824 821
         if (res.code === 0) {
825
-          this.searchForm.list = res.obj;
822
+          this.searchForm.list = res.obj.data;
826 823
           this.searchForm.total = res.total;
827
-          console.log(res.obj);
828 824
         } else {
829 825
           this.$Message.error(res.msg);
830 826
         }
@@ -851,7 +847,6 @@ export default {
851 847
         hasviolate: false, //是否开启违规通知:0否 1是
852 848
         padViolates: [] //设备违规
853 849
       };
854
-      console.log(this.strategyInfo);
855 850
     },
856 851
     async getAppList() {
857 852
       //获取应用列表
@@ -866,17 +861,10 @@ export default {
866 861
           v.checked = false;
867 862
           return v;
868 863
         });
869
-        console.log(this.padApps);
870 864
       } else {
871 865
         this.$Message.error(res.msg);
872 866
       }
873 867
     },
874
-    // 保存新建
875
-    saveAddInfo() {},
876
-    // 查看
877
-    toView(row) {
878
-      this.initData();
879
-    },
880 868
     // 编辑
881 869
     async toEdit(row, type) {
882 870
       //type 1查看 2编辑
@@ -886,7 +874,6 @@ export default {
886 874
       stPad_detail({ padid: row.padid }).then((res) => {
887 875
         this.showLoading = false;
888 876
         if (res.code === 0) {
889
-          console.log(res.obj);
890 877
           //数据回显
891 878
           this.strategyInfo.model = type === 1 ? "查看" : "编辑";
892 879
           this.strategyInfo.name = res.obj.name;
@@ -935,7 +922,6 @@ export default {
935 922
             });
936 923
           }
937 924
           this.strategyInfo.show = true;
938
-          console.log(this.strategyInfo);
939 925
         } else {
940 926
           this.$Message.error(res.msg);
941 927
         }
@@ -981,7 +967,6 @@ export default {
981 967
             schoolid: res.obj.id,
982 968
             classids: []
983 969
           };
984
-          console.log(this.empowerInfo);
985 970
         } else {
986 971
           this.$Message.error(res.msg);
987 972
         }

Loading…
Cancel
Save