lin
2024-05-14 2bced02c1156d7fdcea4310c389c01b5a674cb98
src/views/property/process/maintenanceFundApply/edit.vue
@@ -78,8 +78,9 @@
      <el-button type="danger" @click="handleDisagree">关闭申请</el-button>
    </div>
    <deitDiscussion ref="DeitDiscussion">
    </deitDiscussion>
    <deitDiscussion ref="DeitDiscussion"> </deitDiscussion>
    <userList ref="userList" @selectPersonList="selectPersonList"></userList>
  </basic-container>
</template>
@@ -89,6 +90,7 @@
    historyFlowList,
    leaveDetail
  } from "@/api/work/process";
  import userList from "../../components/userList.vue";
  import {
    getList,
@@ -106,7 +108,8 @@
  import deitDiscussion from "../../components/deitDiscussion.vue"
  export default {
    components: {
      deitDiscussion
      deitDiscussion,
      userList
    },
    data() {
      return {
@@ -162,6 +165,33 @@
                message: "请选择小区",
                trigger: "blur",
              }, ],
            },
            {
              disabled: true,
              label: "户室",
              prop: "houseNames",
              tags: true,
              type: "input",
              span: 12,
              remote: true,
              rules: [{
                required: true,
                message: '请选择户室',
                trigger: 'blur'
              }],
              focus: ({
                value,
                column
              }) => {
                if (!this.form.districtId) {
                  this.$message({
                    type: "error",
                    message: "请先选择小区后,再选择户室!",
                  })
                  return
                }
                this.$refs.userList.show(this.form.districtId)
              },
            },
            {
              label: '维修项目名称',
@@ -291,7 +321,6 @@
              viewDisabled: false,
              type: 'select',
              dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`,
              // slot: true,
              formslot: true,
              cascader: ['vote'],
              props: {
@@ -308,9 +337,6 @@
              }, ],
              change: (val) => {
                console.log("val===>", val)
                // console.log("form===>",this.form)
              }
            },
@@ -341,19 +367,6 @@
              labelWidth: 140,
              type: "textarea",
            },
            // {
            //   label: "批复意见",
            //   span: 24,
            //   hide: true,
            //   prop: "comment",
            //   labelWidth: 140,
            //   type: "textarea",
            //   rules: [{
            //     required: true,
            //     message: "请输入批复意见",
            //     trigger: "blur",
            //   }, ],
            // },
            {
              label: '施工方案附件',
              prop: 'constructionSchemeUrls',
@@ -426,6 +439,43 @@
      }
    },
    methods: {
      uploadAfter(res, done, loading, column) {
        console.log(res, column)
        // this.form.attachment = []
        this.form.attachment.push({
          fileName: column.label,
          fileUrl: res.link,
          fileType: this.getFileExtension(res.originalName),
        })
        done()
        // this.$message.success('上传后的方法')
      },
      getFileExtension(filename) {
        var lastDotIndex = filename.lastIndexOf('.');
        if (lastDotIndex !== -1) {
          return filename.substring(lastDotIndex + 1);
        }
        return '';
      },
      selectPersonList(personList) {
        console.log(personList, "++++++++++++")
        this.personList = personList
        let houseNameList = personList.map(e => {
          if (e.houseName) {
            return e.houseName
          }
        })
        this.form.houseName = houseNameList.join(",")
        let addressCodeList = personList.map(e => {
          if (e.addressCode) {
            return e.addressCode
          }
        })
        this.form.addressCodes = addressCodeList.join(",")
      },
      handleSubmit(form, done, loading) {
        if (form.constructionSchemeUrls.length > 0) {
          var urls = []