| | |
| | | <el-button size="default" type="primary" class="ml10" @click="onSubmit"> |
| | | 查询 |
| | | </el-button> |
| | | <el-button size="default" class="ml10" @click="submitReset"> |
| | | <el-button size="default" class="ml10"> |
| | | 重置 |
| | | </el-button> |
| | | </el-form-item> |
| | |
| | | <el-table-column prop="attachments" label="相关附件" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column label="操作" width="200" align="center" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary" @click="onOpenSee(scope.row)"> |
| | | <el-button size="small" text type="primary" @click="onOpenAdd('查看',scope.row)"> |
| | | <el-icon style="margin-right: 5px;"> |
| | | <View /> |
| | | </el-icon>查看 |
| | | </el-button> |
| | | <el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary" @click="onOpenAdd('修改',scope.row)"> |
| | | <el-button size="small" text type="primary" @click="onOpenAdd('修改',scope.row)"> |
| | | <el-icon style="margin-right: 5px;"> |
| | | <EditPen /> |
| | | </el-icon>修改 |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | class="mt15" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="formInline.pageIndex" |
| | | background |
| | | v-model:page-size="formInline.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="tableData.total" |
| | | > |
| | | </el-pagination> |
| | | <div class="pages"> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | class="mt15" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="formInline.pageIndex" |
| | | background |
| | | v-model:page-size="formInline.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="tableData.total" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </el-card> |
| | | <OpenAdd ref="addRef" @refreshRoleList="initTableData"/> |
| | | <OpenSee ref="seeRef" /> |
| | | <!-- <OpenEdit ref="editRef" />--> |
| | | <OpenSee ref="seeRef" @refreshRoleList="initTableData"/> |
| | | <upData ref="upShow"></upData> |
| | | </div> |
| | | </template> |
| | |
| | | EditPen, |
| | | } from '@element-plus/icons-vue' |
| | | import OpenAdd from '/@/views/contingencyManagement/contingency/component/openAdd.vue'; |
| | | // import OpenEdit from '/@/views/contingencyManagement/contingency/component/openEdit.vue'; |
| | | import OpenSee from '/@/views/contingencyManagement/contingency/component/openSee.vue'; |
| | | import UpData from '/@/views/contingencyManagement/contingency/component/upData.vue'; |
| | | import {contingencyApi} from "/@/api/contingency"; |
| | | import {useRoleApi} from "/@/api/system/role"; |
| | | |
| | | |
| | | // 定义表格数据类型 |
| | |
| | | components: { |
| | | OpenAdd, |
| | | OpenSee, |
| | | // OpenEdit, |
| | | View, |
| | | EditPen, |
| | | Plus, |
| | |
| | | }; |
| | | //查看用户弹窗 |
| | | const seeRef = ref(); |
| | | const onOpenSee = (row: TableDataRow) => { |
| | | seeRef.value.openDialog(row); |
| | | const onOpenSee = (type: string, value: any) => { |
| | | seeRef.value.openDialog(type, value); |
| | | }; |
| | | // 打开新增应急队伍弹窗 |
| | | const addRef = ref(); |
| | | const onOpenAdd = (type: string, value: any) => { |
| | | addRef.value.openDialog(type, value); |
| | | }; |
| | | // 打开修改用户弹窗 |
| | | // const editRef = ref(); |
| | | // const onOpenEdit = (row: TableDataRow) => { |
| | | // editRef.value.openDialog(row); |
| | | // }; |
| | | // 删除用户 |
| | | const onRowDel = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将永久删除队伍名称:“${row}”,是否继续?`, '提示', { |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then(async () => { |
| | | let res = await useRoleApi().deleteEmergencyTeam({roleId:row.roleId}) |
| | | let res = await contingencyApi().deleteEmergencyTeam({principalUid:row.principalUid}) |
| | | if(res.data.code ==='200'){ |
| | | ElMessage({ |
| | | type:'success', |
| | |
| | | initTableData, |
| | | onOpenSee, //查看 |
| | | seeRef, |
| | | // onOpenEdit, //编辑 |
| | | // editRef, |
| | | onOpenAdd, //新增 |
| | | addRef, |
| | | onRowDel, |
| | |
| | | justify-content: space-between; |
| | | margin-bottom: 10px; |
| | | } |
| | | .pages{ |
| | | padding-top: 20px; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | .el-form .el-form-item:last-of-type{ |
| | | margin-bottom: 22px!important; |
| | | //分页 |
| | | .pages{ |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | margin-top: 15px; |
| | | } |
| | | .el-form .el-form-item{ |
| | | margin-bottom: 0px!important; |
| | | } |
| | | //弹窗底部边框线 |
| | | ::v-deep .el-dialog__footer{ |