Commit fffe0074 by honghong

配置菜单栏

parent f45dfb8e
import request from '@/utils/request'
// 查询医生列表
export function listDoctor(query) {
return request({
url: '/system/doctor/list',
method: 'get',
params: query
})
}
// 查询医生详细
export function getDoctor(id) {
return request({
url: '/system/doctor/' + id,
method: 'get'
})
}
// 新增医生
export function addDoctor(data) {
return request({
url: '/system/doctor',
method: 'post',
data: data
})
}
// 修改医生
export function updateDoctor(data) {
return request({
url: '/system/doctor',
method: 'put',
data: data
})
}
// 删除医生
export function delDoctor(id) {
return request({
url: '/system/doctor/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询医院列表
export function listHospital(query) {
return request({
url: '/system/hospital/list',
method: 'get',
params: query
})
}
// 查询医院详细
export function getHospital(id) {
return request({
url: '/system/hospital/' + id,
method: 'get'
})
}
// 新增医院
export function addHospital(data) {
return request({
url: '/system/hospital',
method: 'post',
data: data
})
}
// 修改医院
export function updateHospital(data) {
return request({
url: '/system/hospital',
method: 'put',
data: data
})
}
// 删除医院
export function delHospital(id) {
return request({
url: '/system/hospital/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询科室列表
export function listDepartment(query) {
return request({
url: '/system/department/list',
method: 'get',
params: query
})
}
// 查询科室详细
export function getDepartment(id) {
return request({
url: '/system/department/' + id,
method: 'get'
})
}
// 新增科室
export function addDepartment(data) {
return request({
url: '/system/department',
method: 'post',
data: data
})
}
// 修改科室
export function updateDepartment(data) {
return request({
url: '/system/department',
method: 'put',
data: data
})
}
// 删除科室
export function delDepartment(id) {
return request({
url: '/system/department/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询文章列表
export function listArticle(query) {
return request({
url: '/system/article/list',
method: 'get',
params: query
})
}
// 查询文章详细
export function getArticle(id) {
return request({
url: '/system/article/' + id,
method: 'get'
})
}
// 新增文章
export function addArticle(data) {
return request({
url: '/system/article',
method: 'post',
data: data
})
}
// 修改文章
export function updateArticle(data) {
return request({
url: '/system/article',
method: 'put',
data: data
})
}
// 删除文章
export function delArticle(id) {
return request({
url: '/system/article/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询业务列表
export function listBusiness(query) {
return request({
url: '/system/business/list',
method: 'get',
params: query
})
}
// 查询业务详细
export function getBusiness(id) {
return request({
url: '/system/business/' + id,
method: 'get'
})
}
// 新增业务
export function addBusiness(data) {
return request({
url: '/system/business',
method: 'post',
data: data
})
}
// 修改业务
export function updateBusiness(data) {
return request({
url: '/system/business',
method: 'put',
data: data
})
}
// 删除业务
export function delBusiness(id) {
return request({
url: '/system/business/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询轮播图列表
export function listCarousel(query) {
return request({
url: '/system/carousel/list',
method: 'get',
params: query
})
}
// 查询轮播图详细
export function getCarousel(id) {
return request({
url: '/system/carousel/' + id,
method: 'get'
})
}
// 新增轮播图
export function addCarousel(data) {
return request({
url: '/system/carousel',
method: 'post',
data: data
})
}
// 修改轮播图
export function updateCarousel(data) {
return request({
url: '/system/carousel',
method: 'put',
data: data
})
}
// 删除轮播图
export function delCarousel(id) {
return request({
url: '/system/carousel/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询新闻资讯列表
export function listInformation(query) {
return request({
url: '/system/information/list',
method: 'get',
params: query
})
}
// 查询新闻资讯详细
export function getInformation(id) {
return request({
url: '/system/information/' + id,
method: 'get'
})
}
// 新增新闻资讯
export function addInformation(data) {
return request({
url: '/system/information',
method: 'post',
data: data
})
}
// 修改新闻资讯
export function updateInformation(data) {
return request({
url: '/system/information',
method: 'put',
data: data
})
}
// 删除新闻资讯
export function delInformation(id) {
return request({
url: '/system/information/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询公告列表
export function listNotice(query) {
return request({
url: '/system/notices/list',
method: 'get',
params: query
})
}
// 查询公告详细
export function getNotice(id) {
return request({
url: '/system/notices/' + id,
method: 'get'
})
}
// 新增公告
export function addNotice(data) {
return request({
url: '/system/notices',
method: 'post',
data: data
})
}
// 修改公告
export function updateNotice(data) {
return request({
url: '/system/notices',
method: 'put',
data: data
})
}
// 删除公告
export function delNotice(id) {
return request({
url: '/system/notices/' + id,
method: 'delete'
})
}
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="上级科室" prop="parentId">
<el-input
v-model="queryParams.parentId"
placeholder="请输入上级科室"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="排序" prop="order">
<el-input
v-model="queryParams.order"
placeholder="请输入排序"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="名称" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:department:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:department:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:department:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:department:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="departmentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="上级科室" align="center" prop="parentId" />
<el-table-column label="排序" align="center" prop="order" />
<el-table-column label="名称" align="center" prop="title" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:department:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:department:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改科室对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="上级科室" prop="parentId">
<el-input v-model="form.parentId" placeholder="请输入上级科室" />
</el-form-item>
<el-form-item label="排序" prop="order">
<el-input v-model="form.order" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="名称" prop="title">
<el-input v-model="form.title" placeholder="请输入名称" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listDepartment, getDepartment, delDepartment, addDepartment, updateDepartment } from "@/api/hispotalManage/office";
export default {
name: "Department",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 科室表格数据
departmentList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
parentId: undefined,
order: undefined,
title: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询科室列表 */
getList() {
this.loading = true;
listDepartment(this.queryParams).then(response => {
this.departmentList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
parentId: undefined,
order: undefined,
title: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined,
delFlag: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加科室";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getDepartment(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改科室";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateDepartment(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addDepartment(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除科室编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delDepartment(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/department/export', {
...this.queryParams
}, `department_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="提供医院" prop="hospitals">
<el-input
v-model="queryParams.hospitals"
placeholder="请输入提供医院"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="业务名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入业务名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:business:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:business:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:business:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:business:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="businessList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="提供医院" align="center" prop="hospitals" />
<el-table-column label="业务名称" align="center" prop="name" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:business:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:business:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改业务对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="提供医院" prop="hospitals">
<el-input v-model="form.hospitals" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="业务名称" prop="name">
<el-input v-model="form.name" placeholder="请输入业务名称" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listBusiness, getBusiness, delBusiness, addBusiness, updateBusiness } from "@/api/operation/business";
export default {
name: "Business",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 业务表格数据
businessList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
hospitals: undefined,
name: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询业务列表 */
getList() {
this.loading = true;
listBusiness(this.queryParams).then(response => {
this.businessList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
hospitals: undefined,
name: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined,
delFlag: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加业务";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getBusiness(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改业务";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateBusiness(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addBusiness(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除业务编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delBusiness(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/business/export', {
...this.queryParams
}, `business_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="城市" prop="cityId">
<el-input
v-model="queryParams.cityId"
placeholder="请输入城市"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="内容" prop="info">
<el-input
v-model="queryParams.info"
placeholder="请输入内容"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="位置" prop="site">
<el-input
v-model="queryParams.site"
placeholder="请输入位置"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:notice:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:notice:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:notice:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:notice:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="城市" align="center" prop="cityId" />
<el-table-column label="内容" align="center" prop="info" />
<el-table-column label="位置" align="center" prop="site" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:notice:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:notice:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改公告对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="城市" prop="cityId">
<el-input v-model="form.cityId" placeholder="请输入城市" />
</el-form-item>
<el-form-item label="内容" prop="info">
<el-input v-model="form.info" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="位置" prop="site">
<el-input v-model="form.site" placeholder="请输入位置" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/operation/notice";
export default {
name: "Notice",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 公告表格数据
noticeList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
cityId: undefined,
info: undefined,
site: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询公告列表 */
getList() {
this.loading = true;
listNotice(this.queryParams).then(response => {
this.noticeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
cityId: undefined,
info: undefined,
site: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加公告";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getNotice(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改公告";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateNotice(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addNotice(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除公告编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delNotice(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/notice/export', {
...this.queryParams
}, `notice_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
...@@ -35,7 +35,8 @@ module.exports = { ...@@ -35,7 +35,8 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8080`, // target: `http://localhost:8080`,
target: `http://192.168.0.169:8089`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment