Lou
2024-02-22 fcfacc83b3905fcef555b5ab3d5fa817e67c6da7
src/views/property/propertyCapitalApply.vue
@@ -29,6 +29,35 @@
        </el-button>
      </template>
    </avue-crud>
    <el-dialog  title="详情" append-to-body :visible.sync="showDialog" width="80%">
      <avue-crud :option="optionList"   ref="crud2"  :data="optionData"   :span-method="spanMethod">
        </avue-crud>
        </el-dialog>
    <!-- <el-dialog   title="详情" :visible.sync="showDialog" width="80%"  z-index="55555"  :before-close="showDialog = false">
      <span>
        1111
      </span>
      <avue-crud :option="optionList"   ref="crud2">
          <template slot="menuLeft" v-if="!editFlag">
            <el-button type="primary" size="small" plain icon="el-icon-circle-plus-outline" @click="add()">添加
            </el-button>
          </template>
          <template #icon="scope">
            <i :class="scope.row.icon" style="font-size:14px"></i>
          </template>
           <template #menu="{ row, size }">
            <el-button v-if="row.level === 1" :size="size" text type="primary" @click="edit(row)">编辑</el-button>
            <el-button v-if="row.level === 1" :size="size" text type="danger" @click="deletes(row)">删除</el-button>
            <el-button v-if="row.level === 2" :size="size" text type="primary" @click="openUser(row, 1)">
              选择此项人数:{{ row.number }} 详情</el-button>
          </template>
        </avue-crud>
    </el-dialog>     -->
  </basic-container>
</template>
@@ -48,6 +77,7 @@
  export default {
    data() {
      return {
        showDialog:false,
        form: {
          // constructionSchemeUrls:[]
        },
@@ -284,6 +314,35 @@
              value: '0.00'
            },
            {
              hide: true,
              parent: false,
              label: "议事标题",
              prop: "districtId",
              search: false,
              type: 'select',
              dicUrl: `/api/blade-district/district/getDistrictTree?filterFlag=1`,
              props: {
                label: "name",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              width: 260,
              rules: [{
                required: true,
                message: "请选择议事",
                trigger: "blur",
              }, ],
              change:(val)=>{
                console.log ("val===>",  val)
                if(val.value){
                  this.showDialog = true;
                }
              }
            },
            {
              label: "项目摘要",
              span: 24,
              hide: true,
@@ -321,9 +380,66 @@
          ],
        },
        data: [],
        optionList: {
          hander:false,
          menu: false,
          headerAlign: 'center',
          align: 'center',
          border: true,
          addBtn: false,
          editBtn: false,
          delBtn: false,
          defaultExpandAll: true,
          rowKey: 'id',
          rowParentKey: 'parentId',
          column: [{
              label: '标题',
              prop: 'title',
            },
            {
              label: '选项内容',
              prop: 'content',
            },
            {
              label: '人数',
              prop: 'count',
            }
          ]
        },
        optionData:[
           {
               title:"测试",
               content:"选项1",
               count:1
           },
           {
               title:"测试",
               content:"选项2",
               count:2
           },
           {
               title:"测试",
               content:"选项",
               count:2
           },
       ]
      }
    },
    watch: {},
    watch: {
      // 'form.districtId':{
      //   handler(newVal,oldVal){
      //     console.log("val===>", newVal)
      //     if(newVal){
      //         this.showDialog = true;
      //       }
      //   },
      //   deep: true,
         //    immediate: true
      // }
    },
    computed: {
      ...mapGetters(["permission", "userInfo"]),
      permissionList() {
@@ -451,6 +567,7 @@
        done()
      },
      selectionChange(list) {
        console.log(111);
        this.selectionList = list
      },
      selectionClear() {
@@ -541,8 +658,24 @@
          this.loading = false
          this.selectionClear()
        })
      },
      spanMethod({ row, column, rowIndex, columnIndex }) {
        if (columnIndex === 0) {
          if (rowIndex % 2 === 0) {
            return {
              rowspan: 2,
              colspan: 1
            }
          } else {
            return {
              rowspan: 0,
              colspan: 0
            }
          }
        }
      }
    }
  }
</script>