Lou
2024-02-27 953890b950f73a64a538238f207ee43684059c78
src/views/property/process/maintenanceFundApply/handle.vue
@@ -11,7 +11,25 @@
        <div slot="header">
          <span>审批信息</span>
        </div>
        <avue-form :option="option" v-model="form"></avue-form>
        <avue-form :option="option" v-model="form">
          <template slot-scope="{ row, size, index }" slot="vote">
            <div>{{ topicTitle }}</div>
            <el-table :data="topictData" v-if="topictData.length">
              <el-table-column width="300" property="optionContent" label="选项"
                label-class-name="workOrderStyle"></el-table-column>
              <el-table-column width="300" property="number" label="人数" label-class-name="workOrderStyle">
              </el-table-column>
              <el-table-column width="300">
                <template slot-scope="scope">
                  <el-button slot="reference" type="primary" size="mini"
                    @click="openUserPopup(scope.row, 1)">详情</el-button>
                </template>
              </el-table-column>
            </el-table>
          </template>
        </avue-form>
      </el-card>
      <el-card shadow="hover">
@@ -57,7 +75,8 @@
      <el-button type="primary" @click="handleAgree">同意</el-button>
      <el-button type="danger" @click="handleDisagree">驳回</el-button>
    </div>
    <deitDiscussion ref="DeitDiscussion">
    </deitDiscussion>
  </basic-container>
</template>
@@ -78,8 +97,15 @@
  completeTask
} from "@/api/work/work"
import website from '@/config/website'
import {
  getLists
} from "@/api/discuss/topics"
import deitDiscussion from "../../components/deitDiscussion.vue"
export default {
  components: {
    deitDiscussion
  },
  data() {
    return {
      taskId: '',
@@ -125,8 +151,7 @@
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          labelWidth: 120,
          width: 220,
          labelWidth: 140,
          overHidden: true,
          rules: [{
            required: true,
@@ -143,6 +168,7 @@
          search: true,
          span: 12,
          labelWidth: 140,
          width: 220,
          rules: [{
            required: true,
            message: "请输入维修项目名称",
@@ -186,14 +212,14 @@
          labelWidth: 140,
          value: '按建筑面积分摊',
          span: 12,
          row: true,
          // row: true,
          disabled: true
        },
        {
          label: '联系人',
          prop: 'linkman',
          span: 12,
          labelWidth: 120,
          labelWidth: 140,
          search: true,
          searchSpan: 4,
          rules: [{
@@ -260,6 +286,7 @@
          disabled: true
        },
        {
          disabled: true,
          display: false,
          hide: true,
          parent: false,
@@ -278,7 +305,7 @@
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          width: 260,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请选择议事",
@@ -287,10 +314,23 @@
          change: (val) => {
            console.log("val===>", val)
            // console.log("form===>",this.form)
          }
        },
        {
          disabled: true,
          display: false,
          span: 24,
          hide: true,
          prop: "vote",
          // formslot: true,
          slot:true,
          label: "投票详情",
          labelWidth:140
        },
        {
          label: "项目摘要",
          span: 24,
@@ -345,19 +385,38 @@
          },],
        }
        ],
      }
      },
      topictData: [],
      topicTitle: "",
      articleRange: ""
    }
  },
  'form.districtId': {
    handler(newData) {
      const column = this.findObject(this.option.column, "articleId")
      if (newData) {
        column.display = true;
      } else {
        column.display = false
  watch: {
    'form.districtId': {
      handler(newData) {
        const column = this.findObject(this.option.column, "articleId")
        if (newData && this.form.articleId) {
          column.display = true;
        } else {
          column.display = false
        }
      }
    }
    },
    'form.articleId': {
      handler(newData) {
        console.log("data===>", newData)
        this.getVoteDetail(this.form.articleId, this.articleRange)
        const column = this.findObject(this.option.column, "vote")
        if (newData) {
          column.display = true;
        } else {
          column.display = false
        }
      }
    },
  },
  created() {
    this.init()
  },
@@ -442,7 +501,24 @@
      this.$router.push({
        path: `/property/todo`
      })
    }
    },
    getVoteDetail(articleId, districtId) {
      let params = {
        level: 1,
        articleId: articleId,
        districtId: districtId
      }
      getLists(1, 10, params).then(res => {
        const data = res.data.data
        if (data.length) {
          this.topictData = data[0].children;
          this.topicTitle = data[0].discussContent;
        }
      })
    },
    openUserPopup(row) {
      this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
    },
  }
}
</script>
@@ -459,4 +535,7 @@
  left: 50%;
  transform: translateX(-50%);
}
.workOrderStyle {
  font-weight: normal;
}
</style>