lin
2024-03-22 ebfc739bdbbc0dd0fccd0bf47b7d2d5397c3c511
src/views/property/ownersCommittee.vue
@@ -27,9 +27,10 @@
                </el-tag>
            </template>
            <template slot-scope="{ row, size }" slot="iscomment">
                <el-tag :size="size" :type="showStatus(row.iscomment, 2).type" v-text="showStatus(row.iscomment, 2).text">
                </el-tag>
            <template slot-scope="{ row }" slot="iscomment">
                <el-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'"
                    :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc">
                </el-switch>
            </template>
        </avue-crud>
@@ -104,7 +105,7 @@
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                border: false,
                border: true,
                //stripe:true,
                index: true,
                viewBtn: true,
@@ -118,6 +119,7 @@
                    row: true,
                    searchSpan: 4,
                    search: true,
                    searchLabelWidth: 46,
                    rules: [{
                        required: true,
                        message: "请输入业主大会标题",
@@ -140,6 +142,24 @@
                    span: 24,
                },
                {
                    hide: true,
                    parent: false,
                    label: "公示范围",
                    prop: "articleList",
                    type: 'tree',
                    dicData: [],
                    props: {
                        label: "name",
                        value: 'id'
                    },
                    span: 12,
                    rules: [{
                        required: true,
                        message: "请选择公示范围",
                        trigger: "blur",
                    },],
                },
                {
                    width: 100,
                    label: "业主大会类型",
                    prop: "type",
@@ -158,37 +178,6 @@
                        value: 5,
                    }],
                },
                // {
                //   label: "招标来源",
                //   prop: "sourceName",
                //   search: true,
                //   searchSpan: 4,
                //   span: 24,
                //   rules: [{
                //     required: true,
                //     message: "请输入招标类型",
                //     trigger: "blur",
                //   }, ],
                // },
                {
                    hide: true,
                    parent: false,
                    label: "公示范围",
                    prop: "articleList",
                    type: 'tree',
                    dicData: [],
                    props: {
                        label: "name",
                        value: 'id'
                    },
                    span: 12,
                    rules: [{
                        required: true,
                        message: "请选择公示范围",
                        trigger: "blur",
                    },],
                },
                {
                    label: "发布时间",
                    prop: "dateTime",
@@ -215,6 +204,29 @@
                    type: "date",
                    format: "yyyy-MM-dd",
                    valueFormat: "yyyy-MM-dd HH:mm:ss",
                },
                {
                    width: 110,
                    label: "所属街道",
                    addDisplay: false,
                    editDisplay: false,
                    viewDisplay: false,
                    prop: "streetName",
                    search: true,
                    searchSpan: 4
                },
                {
                    width: 156,
                    overHidden: true,
                    label: "所属社区",
                    addDisplay: false,
                    editDisplay: false,
                    viewDisplay: false,
                    prop: "communityName",
                    search: true,
                    searchSpan: 4
                },
                {
@@ -247,7 +259,10 @@
                    label: "评论区",
                    prop: "iscomment",
                    slot: true,
                    type: "select",
                    type: "switch",
                    activeColor: "#13ce66",
                    inactiveColor: "#ccc",
                    value: '1',
                    dicData: [{
                        label: "关闭",
                        value: "0",
@@ -341,6 +356,14 @@
        }
    },
    methods: {
        iscommentInput (e, data) {
            upcomment(data.id, e).then(() => {
                this.$message({
                    type: "success",
                    message: "操作成功!",
                })
            })
        },
        openDilog (row, type) {
            this.dialogVisibles = true
@@ -393,7 +416,10 @@
                })
                row.url = urls.join(",")
            }
            add(row).then(
            add({
                ...row,
                districtId: row.articleList
            }).then(
                () => {
                    this.onLoad(this.page)
                    this.$message({
@@ -420,7 +446,10 @@
                row.url = urls.join(",")
            }
            update(row).then(
            update({
                ...row,
                district_id: row.articleList
            }).then(
                () => {
                    this.onLoad(this.page)
                    this.$message({
@@ -530,8 +559,8 @@
            if (dateTime) {
                values = {
                    ...params,
                    startTime: dateTime[0],
                    endTime: dateTime[1],
                    startTime: dateTime[0] + ' 00:00:01',
                    endTime: dateTime[1] + ' 23:59:59',
                    ...this.query,
                }
                values.dateTime = null
@@ -556,7 +585,9 @@
                this.loading = false
                this.selectionClear()
            })
            getDistrictTree(params = {}).then((res) => {
            getDistrictTree({
                filterFlag: 1
            }).then((res) => {
                const data = res.data.data
                this.districtTree = data
                const column = this.findObject(this.option.column, "articleList")
@@ -640,8 +671,15 @@
}
</script>
<style>
<style lang="scss" scoped>
.avue-upload__icon {
    line-height: 6;
}
</style>
:deep(.avue-form__menu--center) {
    text-align: left;
}
:deep(.avue-form__menu--center .el-button) {
    margin: 0 5px 0 0;
}</style>