| | |
| | | <div class="tree"> |
| | | <div v-for="(item, index) of list" :key="index" @click.stop="clickIten(item)"> |
| | | <div class="tree_item"> |
| | | <i class="el-icon-caret-bottom" :class="{ 'activeColor': item.fsStatus === 1 }" v-show="item.fsStatus === 1 && item.childList.length > 0"></i> |
| | | <i class="el-icon-caret-right color" v-show="item.childList.length > 0 && (item.fsStatus === 0 || !item.fsStatus)"></i> |
| | | <div class="tree_item_label long-title-style" :title="item.name" :class="{ 'activeColor': item.fsDate === 1 && item.childList.length === 0 }">{{ item.name }}</div> |
| | | <i class="el-icon-caret-bottom" :class="{ 'activeColor': item.fsStatus === 1 }" v-show="item.fsStatus === 1 && item.childList && item.childList.length > 0"></i> |
| | | <i class="el-icon-caret-right color" v-show="item.childList && item.childList.length > 0 && (item.fsStatus === 0 || !item.fsStatus)"></i> |
| | | <div class="tree_item_label long-title-style" :title="item.name" :class="{ 'activeColor': item.fsDate === 1 &&(!item.childList || item.childList.length === 0) }">{{ item.name }}</div> |
| | | <!-- <i class="el-icon-caret-bottom" :class="{ 'activeColor': item[defaultProps.status] }" v-show="item[defaultProps.status] && item[defaultProps.children]"></i>--> |
| | | <!-- <i class="el-icon-caret-right color" v-show="item[defaultProps.children] && !item[defaultProps.status]"></i>--> |
| | | <!-- <div class="tree_item_label long-title-style" :title="item[defaultProps.name]" :class="{ 'activeColor': item[defaultProps.status] && !item[defaultProps.children] }">{{ item[defaultProps.name] }}</div>--> |
| | |
| | | i.fsDate = 0 |
| | | }) |
| | | item.fsDate = fsDate |
| | | if (item.childList.length > 0) { |
| | | if (item.childList &&item.childList.length > 0) { |
| | | item.fsStatus === 0 || !item.fsStatus ? item.fsStatus = 1 : item.fsStatus = 0 |
| | | } |
| | | this.$emit('callback', item, item) |
| | |
| | | recursion (children) { |
| | | children.forEach(item => { |
| | | item.fsDate = 0 |
| | | if (item.childList.length > 0) { |
| | | if (item.childList && item.childList.length > 0) { |
| | | this.recursion(item.childList) |
| | | } |
| | | // item[this.defaultProps.status] = false |