<template>
    <Page>
        <div class="engineering">
            <el-table
                stripe
                style="width: 100%"
                :data="tableData"
                height="calc(100vh - 136px)"
                border
                highlight-current-row
                v-loading="loading"
                :header-cell-style="{
                    //background:'#5E95E8',
                    //color:'#FFFFFF',
                    height: '25px',
                    padding: '0px'
                }"
                header-cell-class-name="table_header"
                :row-style="{ height: '28px' }"
                :cell-style="{ padding: '0px' }"
                row-key="id"
                :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
            >
                <el-table-column align="left" prop="name" label="名称"></el-table-column>
                <el-table-column align="center" prop="area" label="区域">
                    <template slot-scope="scope">
                        {{ scope.row.area || '/' }}
                    </template>
                </el-table-column>
                <el-table-column align="center" prop="remark" label="备注">
                    <template slot-scope="scope">
                        {{ scope.row.remark || '/' }}
                    </template>
                </el-table-column>
                <!--                <el-table-column align="center" label="操作" width="260">-->
                <!--                    <template slot-scope="scope">-->
                <!--                        <div class="table-operation">-->
                <!--                             <el-button size="mini" type="primary" @click="edit(scope.row)" icon="el-icon-edit" >编辑</el-button>-->
                <!--                            <el-button size="mini" type="primary" @click="jumpProject(scope.row)" icon="el-icon-search">项目</el-button>-->
                <!--                            <el-button size="mini" type="danger" @click="del(scope.row)" icon="el-icon-delete">删除</el-button> -->
                <!--                        </div>-->
                <!--                    </template>-->
                <!--                </el-table-column>-->
            </el-table>
        </div>
    </Page>
</template>

<script>
import { engineeringTree } from '@/api/app/engineering'

export default {
    name: 'GovernManageEngineering',
    data() {
        return {
            loading: false,
            total: 0,
            tableData: [],
            tabHeight: 'calc(100vh - 116px)'
        }
    },
    computed: {
        vth() {
            return window.sessionStorage.getItem('appheight') - 10
        }
    },

    created() {
        this.search()
    },
    methods: {
        search() {
            engineeringTree().then(res => {
                console.warn(res)
                this.tableData = res.data
                this.loading = false
            })
        }
    }
}
</script>
<style lang="scss">
.project {
}
</style>
