MrShi
2025-01-02 77d8f6ccb72cb64c29e77c39fcc8298781d008bb
admin/src/views/workorder/components/OperaYwWorkorderWindow.vue
@@ -140,7 +140,7 @@
      this.visible = true
      this.getProject()
      this.getCate()
      // 新建
      // 新建
      if (target == null) {
        this.form = {
          id: null,
@@ -192,7 +192,11 @@
    },
    getProject() {
      getProjectList({}).then(res => {
        this.projectList = res
        this.projectList = res || []
        if(this.projectList.length > 0){
          this.$set(this.form, 'projectId', this.projectList[0].id)
          this.getBuild(this.projectList[0].id)
        }
      })
    },
    getBuild(projectId) {
@@ -200,7 +204,11 @@
      this.$set(this.form, 'floorId', '')
      this.$set(this.form, 'roomId', '')
      getBuildList({ projectId }).then(res => {
        this.buildList = res
        this.buildList = res || []
        // if(projectId && this.buildList.length > 0){
        //   this.$set(this.form, 'buildingId', this.buildList[0].id)
        //   this.changeBuild(this.buildList[0].id)
        // }
      })
    },
    changeBuild(e) {