Pārlūkot izejas kodu

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie 3 gadi atpakaļ
vecāks
revīzija
73ba26e5e4
1 mainītis faili ar 5 papildinājumiem un 8 dzēšanām
  1. 5 8
      src/views/basicData/basicFeesDesc/index.vue

+ 5 - 8
src/views/basicData/basicFeesDesc/index.vue

@@ -85,6 +85,9 @@ export default {
     //   this.dataList = res.data.data.records
     // })
   },
+  mounted() {
+    this.initData()
+  },
   methods: {
     //展开主页左边类型
     nodeClick(data) {
@@ -125,7 +128,6 @@ export default {
     },
     //新增修改时保存触发
     rowSave(row, done, loading) {
-      console.log(row)
       let type = typeof(row.feesTypeId)
       if (type == 'object') {
         row.feesTypeId = row.feesTypeId.join(',')
@@ -133,14 +135,12 @@ export default {
       typeSave(row).then(res => {
         this.page.currentPage = 1;
         this.onLoad(this.page, {parentId: 0});
-        console.log(res)
         done()
       })
     },
     //查询全部
     initData(){
       getDeptTree().then(res => {
-        console.log(this.form);
         const column = this.findObject(this.option.column, "feesTypeId");
         column.dicData = res.data.data;
       });
@@ -157,14 +157,11 @@ export default {
     beforeOpen(done, type) {
       if (["add"].includes(type)) {
         this.option.column.forEach(e=>{
-          if(e.prop=='feesTypeId'){
-            this.$set(this.option.column,2,{...e,value:this.treeDeptId})
+          if(e.prop=='feesTypeId' && this.treeDeptId){
+            this.$set(this.option.column,3,{...e,value:this.treeDeptId})
           }
         })
       }
-      if (["add", "edit"].includes(type)) {
-        this.initData();
-      }
       if (["edit", "view"].includes(type)) {
         detail(this.form.id).then(res => {
           this.form = res.data.data;