This commit is contained in:
wangchengming 2025-07-01 15:21:59 +08:00
parent b5c48e74a0
commit 201c7b2984

View File

@ -4,11 +4,11 @@
<div class="app-container clearBoth">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-row class="myRow">
<el-col :span="20">
<el-col :span="20">
<el-form-item label="科室名称" prop="keyword">
<el-input v-model="queryParams.keyword" placeholder="请输入科室名称" clearable style="width: 200px"
@keyup.enter="handleQuery" />
</el-form-item>
</el-form-item>
</el-col>
<el-col :span="4" style="text-align: right;">
<el-button type="primary" class="seachBtn" @click="handleQuery">查询</el-button>
@ -16,30 +16,18 @@
</el-col>
</el-row>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd"
v-hasPermi="['system:section:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
v-hasPermi="['system:section:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
v-hasPermi="['system:section:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport"
v-hasPermi="['system:section:export']">导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> -->
<div class="optionBtn">
<el-button type="primary" class="qualificationApplyBtn" @click="handleAdd"
v-hasPermi="['system:locality:add']">
<img :src="addIcon" class="custom-icon" />
新增
</el-button>
</div>
<div class="borderLine"></div>
<el-table v-loading="loading" height="calc(100% - 162px)" :data="postList">
<el-table-column label="编号" align="center" width="60" prop="sectionId" />
<el-table-column label="科室名称" align="left" min-width="150" prop="sectionName" />
<el-table v-loading="loading" height="calc(100% - 162px)" :data="postList">
<el-table-column label="编号" align="center" width="60" prop="sectionId" />
<el-table-column label="科室名称" align="left" min-width="150" prop="sectionName" />
<el-table-column label="状态" align="center" width="80" prop="status">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
@ -68,13 +56,13 @@
<el-form ref="postRef" :model="form" :rules="rules" label-width="120px">
<el-form-item label="科室名称" prop="sectionName">
<el-input v-model="form.sectionName" placeholder="请输入科室名称" />
</el-form-item>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :value="dict.value">{{ dict.label
}}</el-radio>
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
@ -89,6 +77,7 @@
<script setup name="Post">
import { getSysSectionPage, addSysSection, deleteSysSection, getSysSection, updateSysSection } from "@/api/system/section"
import Breadcrumb from '@/components/Breadcrumb'
import addIcon from '@/assets/images/addIcon.png'
const { proxy } = getCurrentInstance()
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
@ -96,10 +85,7 @@ const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
const postList = ref([])
const open = ref(false)
const loading = ref(true)
const showSearch = ref(true)
const ids = ref([])
const single = ref(true)
const multiple = ref(true)
const showSearch = ref(true)
const total = ref(0)
const title = ref("")
@ -108,10 +94,10 @@ const data = reactive({
queryParams: {
pageIndex: 1,
pageSize: 10,
keyword: undefined,
keyword: undefined,
},
rules: {
sectionName: [{ required: true, message: "科室名称不能为空", trigger: "blur" }],
sectionName: [{ required: true, message: "科室名称不能为空", trigger: "blur" }],
}
})
@ -137,7 +123,7 @@ function cancel() {
function reset() {
form.value = {
sectionId: undefined,
sectionName: undefined,
sectionName: undefined,
status: "0"
}
proxy.resetForm("postRef")
@ -153,7 +139,7 @@ function handleQuery() {
function resetQuery() {
proxy.resetForm("queryRef")
handleQuery()
}
}
/** 新增按钮操作 */
function handleAdd() {
@ -204,7 +190,7 @@ function handleDelete(row) {
proxy.$modal.msgSuccess("删除成功")
}).catch(() => { })
}
getList()
</script>
<style lang='scss'>
@ -224,6 +210,26 @@ getList()
margin-right: 0 !important;
}
.optionBtn {
padding-bottom: 12px;
}
.qualificationApplyBtn {
// width: 84px !important;
height: 32px;
border-radius: 4px 4px 4px 4px;
background: #4276d1;
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
text-align: center;
color: #FFFFFF;
}
.qualificationApplyBtn:hover {
background: #4276d1;
}
.el-form--inline .el-form-item {
display: inline-flex;
margin-right: 26px;