forked from xxhjsb/hbt-prevention-ui
93 lines
6.2 KiB
HTML
93 lines
6.2 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="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,'pageNum')"
|
|
@pageSizeChange="callback($event,'pageSize')" :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" fixed label="全选" width="60">
|
|
</el-table-column>
|
|
<el-table-column label="序号" width="60">
|
|
<template slot-scope="scope">
|
|
{{scope.$index+1}}
|
|
</template>
|
|
</el-table-column>
|
|
<template v-for="item in tableColumn">
|
|
<el-table-column v-if="item.render" :label="item.name" :show-overflow-tooltip="item.showTip"
|
|
:width="item.width" :key="item.key">
|
|
<div :class="item.showTip ?'column-cell-render' :''" slot-scope="scope"
|
|
v-html="item.render(scope.row)" :filters="item.filters"
|
|
:filter-method="item.filterMethod" @click="rowCallback($event,scope.row)"></div>
|
|
</el-table-column>
|
|
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key"
|
|
:filters="item.filters" :filter-method="item.filterMethod"
|
|
:show-overflow-tooltip="item.showTip">
|
|
</el-table-column>
|
|
</template>
|
|
<el-table-column label="操作" fixed="right" width="150">
|
|
<template slot-scope="scope">
|
|
<el-button type="text" @click="showModal(scope.row,true)">查看</el-button>
|
|
<el-button type="text" @click="showModal(scope.row)">修改</el-button>
|
|
<el-button type="text" @click="deleteData([scope.row.id])">删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
</TableComponent>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<el-dialog :close-on-click-modal="false" :title="isReadonly?'详情':updateParams.id ?'编辑': '新增'"
|
|
:visible.sync="showUpdate" width="952px" :before-close="handleClose" destroy-on-close>
|
|
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
|
:isReadonly="isReadonly" ref="basicForm">
|
|
</FormComponent>
|
|
<div class="sub-title">重大危险源主要负责人安全职责</div>
|
|
<el-form :model="secureDutyForm" ref="secureDutyForm" label-width="100px" class="duty-form">
|
|
<el-form-item v-for="(domain, index) in secureDutyForm.mainDuty" :label="domain.label" :key="domain.key"
|
|
:prop="'mainDuty.' + index + '.dutyValue'"
|
|
:rules="{required: true, message: '主要负责人安全职责不能为空', trigger: 'blur'}">
|
|
<el-input :disabled="isReadonly" type="textarea" row="2" v-model="domain.dutyValue" placeholder="请输入职责"></el-input>
|
|
<div class="form-group-img" v-if="!isReadonly">
|
|
<i class="el-icon-circle-plus" @click="dutyOperate(domain,'mainDuty','add')"></i>
|
|
<i class="el-icon-error" v-if="index !==0" @click="dutyOperate(domain,'mainDuty','delete')"></i>
|
|
</div>
|
|
</el-form-item>
|
|
<div class="sub-title">重大危险源技术负责人安全职责</div>
|
|
<el-form-item v-for="(domain, index) in secureDutyForm.techDuty" :label="domain.label" :key="domain.key"
|
|
:prop="'techDuty.' + index + '.dutyValue'"
|
|
:rules="{required: true, message: '主要负责人安全职责不能为空', trigger: 'blur'}">
|
|
<el-input :disabled="isReadonly" type="textarea" row="2" v-model="domain.dutyValue" placeholder="请输入职责"></el-input>
|
|
<div class="form-group-img" v-if="!isReadonly">
|
|
<i class="el-icon-circle-plus" @click="dutyOperate(domain,'techDuty','add')"></i>
|
|
<i class="el-icon-error" v-if="index !==0" @click="dutyOperate(domain,'techDuty','delete')"></i>
|
|
</div>
|
|
</el-form-item>
|
|
<div class="sub-title">重大危险源操作负责人安全职责</div>
|
|
<el-form-item v-for="(domain, index) in secureDutyForm.operateDuty" :label="domain.label" :key="domain.key"
|
|
:prop="'operateDuty.' + index + '.dutyValue'"
|
|
:rules="{required: true, message: '主要负责人安全职责不能为空', trigger: 'blur'}">
|
|
<el-input :disabled="isReadonly" type="textarea" row="2" v-model="domain.dutyValue" placeholder="请输入职责"></el-input>
|
|
<div class="form-group-img" v-if="!isReadonly">
|
|
<i class="el-icon-circle-plus" @click="dutyOperate(domain,'operateDuty','add')"></i>
|
|
<i class="el-icon-error" v-if="index !==0" @click="dutyOperate(domain,'operateDuty','delete')"></i>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form>
|
|
<ButtonListComponent :actions="!isReadonly ? updateActions :[]" @callback="subCallback" btn-position="center" :full-btn="true">
|
|
</ButtonListComponent>
|
|
</el-dialog>
|
|
|
|
<el-dialog v-if="showFile" :close-on-click-modal="false" title="查看图片" :visible.sync="showFile" destroy-on-close
|
|
width="680px">
|
|
<img :src="currentUrl" style="width: 100%;" alt="">
|
|
</el-dialog>
|
|
|
|
</div> |