shuishen
2024-01-17 02e1a2fe30788cb356ecc898ea3c0b563ca54d63
src/views/userHouse/houseHoldList.vue
@@ -59,7 +59,7 @@
                            </el-col>
                        </el-row>
                        <div class="grid-container2" v-if="item.children">
                            <div class="grid-item" :style="{ backgroundColor: item2.color }"
                            <div class="grid-item" :style="{ backgroundColor: getColor(item2.color) }"
                                v-for="(item2, index2) in item.children" @click="changLabel(item2)" :key="index2">
                                {{ item2.name }}
                            </div>
@@ -97,6 +97,7 @@
</template>
<script>
import { setLabelColor } from '@/util/util'
import {
    getList,
    remove,
@@ -699,18 +700,15 @@
                    row: true,
                    dicData: [{
                        label: '撤销',
                        value: '#EBEDF0'
                        value: '#999'
                    }, {
                        label: '绿',
                        // value: '#30D17C'
                        value: 'green'
                    }, {
                        label: '黄',
                        // value: '#FFB42B'
                        value: 'yellow'
                    }, {
                        label: '红',
                        // value: '#EA1F1F'
                        value: 'red'
                    }],
                    rules: [{
@@ -866,6 +864,12 @@
            return (list) => {
                return list.map(item => item.labelName).join(',')
            }
        },
        getColor () {
            return (data) => {
                return setLabelColor(data)
            }
        }
    },
    mounted () { },