hbt-prevention-ui/src/views/risk/areaUnit.component.html

75 lines
4.4 KiB
HTML

<div class="common-box dis-flex ">
<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="change" btn-position="end"></FormComponent>
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn"
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border
@selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" label="全选">
</el-table-column>
<template v-for="item in tableColumn">
<el-table-column v-if="item.render" :label="item.name" :filters="item.filters"
:filter-method="item.filterMethod" :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" :filters="item.filters" :label="item.name"
:filter-method="item.filterMethod" :width="item.width" :key="item.key">
</el-table-column>
</template>
<el-table-column label="操作" width="245">
<template slot-scope="scope">
<el-button type="text" @click="showUpdateModel(scope.row,true)">查看</el-button>
<el-button type="text" @click="showUpdateModel(scope.row)">修改</el-button>
<el-button type="text" @click="deleteData([scope.row.id])">删除</el-button>
<el-button type="text" @click="getQrCode(scope.row)">二维码</el-button>
<el-button type="text" v-if="!isArea && scope.row.status===1"
@click="doTurnOff(scope.row,0)">停用</el-button>
<el-button type="text" v-if="!isArea && scope.row.status===0 "
@click="doTurnOff(scope.row,1)">恢复</el-button>
</template>
</el-table-column>
</el-table>
</TableComponent>
</div>
</div>
<div class="model-box" v-if="showDraw">
<div class="mask"></div>
<DrawComponent :model.sync="drawModel" :isReadonly="isReadonly" :data.sync="updateParams" :show.sync="showDraw"
@onClose="getTableData"></DrawComponent>
</div>
<el-dialog :close-on-click-modal="false" :title="isReadonly?'详情':currentId===-1?'新增':'编辑'"
:visible.sync="showUpdate" width="952px" :before-close="handleClose">
<FormComponent :options="updateOptions" :isReadonly="isReadonly" labelWidth="110px" labelAlign="right"
:data.sync="updateParams" @actionCallback="callback" :actions="updateActions" :full-btn="true"
@change="change" btn-position="center">
<span class="tips" v-if="isArea">*注:安全风险分析对象编码即危险化学品登记综合服务系统中的危险源编码</span>
<div class="sub-title" v-if="!isArea && isReadonly">停用/检修记录</div>
<TableComponent v-if="!isArea && isReadonly" :tableData="repairTableData" :tableColumn="repairTableColumn"
:showFooter="false" style="margin-bottom: 20px;">
</TableComponent>
</FormComponent>
</el-dialog>
<el-dialog :close-on-click-modal="false" :title="'查看二维码'" :visible.sync="showQrCode">
<img :src="qrUrl" style="width: 100%;" alt="">
</el-dialog>
<el-dialog :close-on-click-modal="false" v-if="!isArea" width="500px" :title="'停用/恢复登记'"
:visible.sync="showTurnOff">
<FormComponent :options="turnOffForm" labelWidth="110px" labelAlign="right" :data.sync="turnOffParams"
@actionCallback="doTurnOffAction" :actions="turnOffAction" btn-position="center">
</FormComponent>
</el-dialog>
</div>