forked from xxhjsb/hbt-prevention-ui
83 lines
4.8 KiB
HTML
83 lines
4.8 KiB
HTML
<div class="common-box dis-flex ">
|
|
<div class="common-tree-box" v-if="treeData">
|
|
<el-tree :data="treeData" :expand-on-click-node="false" default-expand-all highlight-current
|
|
@node-click="handleNodeClick">
|
|
</el-tree>
|
|
</div>
|
|
<div class="common-content-box dis-flex flex-col flex-1">
|
|
<div class="search-box">
|
|
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
|
|
:full-btn="false" @change="callback" btn-position="end"></FormComponent>
|
|
</div>
|
|
<div class="table-box flex-1">
|
|
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
|
|
@actionCallback="callback($event)" @pageNumberChange="callback($event)"
|
|
@pageSizeChange="callback($event)" :footerActions="footerActions" :actions="tableActions">
|
|
|
|
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
|
|
@selection-change="handleSelectionChange" style="width: 100%">
|
|
<el-table-column type="selection" label="全选" width="40">
|
|
</el-table-column>
|
|
<template v-for="item in tableColumn">
|
|
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">
|
|
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
|
|
</el-table-column>
|
|
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key">
|
|
</el-table-column>
|
|
</template>
|
|
<el-table-column label="操作" width="150">
|
|
<template slot-scope="scope">
|
|
<el-button type="text" @click="showUpdateModel(scope.row.userId)">查看</el-button>
|
|
<el-button type="text" @click="showUpdateModel(scope.row.userId)">修改</el-button>
|
|
<el-button type="text" @click="deleteData([scope.row])">删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
</TableComponent>
|
|
</div>
|
|
</div>
|
|
|
|
<el-dialog :close-on-click-modal="false" :title="currentId>0?'详情':currentId===-1?'新增':'编辑'"
|
|
:visible.sync="showUpdate" width="952px" :before-close="handleClose">
|
|
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
|
@actionCallback="callback" :actions="updateActions" :full-btn="true" btnPosition="center">
|
|
<div class="sub-title">工作危害分析法</div>
|
|
|
|
<TableComponent :tableData="tableData" :tableColumn="subTableColumn" @actionCallback="callback($event)"
|
|
:actions="subTableActions" actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
|
|
|
|
<el-table ref="multipleTable" :data="tableData.datas" tooltip-effect="dark" height="250" border
|
|
row-key="checked" @selection-change="handleSelectionChange" style="width: 100%">
|
|
<el-table-column type="selection" label="全选" width="40">
|
|
</el-table-column>
|
|
<template v-for="item in subTableColumn">
|
|
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
|
|
:width="item.width" :key="item.key">
|
|
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
|
|
</el-table-column>
|
|
<el-table-column v-else :prop="item.key" :show-overflow-tooltip="item.showTip"
|
|
:label="item.name" :width="item.width" :key="item.key">
|
|
</el-table-column>
|
|
</template>
|
|
<el-table-column label="操作" width="150">
|
|
<template slot-scope="scope">
|
|
<el-button type="text" @click="">查看</el-button>
|
|
<el-button type="text" @click="">修改</el-button>
|
|
<el-button type="text" @click="">评价</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
</TableComponent>
|
|
</FormComponent>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
<!-- <el-dialog :close-on-click-modal="false" :title="currentId>0?'详情':currentId===-1?'新增':'编辑'"
|
|
:visible.sync="showUpdate" width="952px" :before-close="handleClose">
|
|
<FormComponent :options="updateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right"
|
|
:data.sync="updateParams"></FormComponent>
|
|
</el-dialog> -->
|
|
</div> |