机构类别 科室 细分类别
This commit is contained in:
parent
cb95f361c9
commit
a3484e392c
@ -8,6 +8,13 @@ export function listDepartment(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getDepartmentList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/department/getDepartmentList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询科室信息详细
|
// 查询科室信息详细
|
||||||
export function getDepartment(id) {
|
export function getDepartment(id) {
|
||||||
|
|||||||
44
src/api/system/subdivision.js
Normal file
44
src/api/system/subdivision.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询细分类别信息列表
|
||||||
|
export function listSubdivision(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/subdivision/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询细分类别信息详细
|
||||||
|
export function getSubdivision(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/subdivision/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增细分类别信息
|
||||||
|
export function addSubdivision(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/subdivision',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改细分类别信息
|
||||||
|
export function updateSubdivision(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/subdivision',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除细分类别信息
|
||||||
|
export function delSubdivision(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/subdivision/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -32,27 +32,7 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类别等级" prop="categoryLevel">
|
<!-- <el-form-item label="类别排序" prop="categorySort">
|
||||||
<!-- <el-input v-model="form.categoryLevel" placeholder="请选择类别等级" /> -->
|
|
||||||
<el-select v-model="form.categoryLevel" placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in options"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item label="类别等级,1:一级类型,2:二级类别,3:三级类别等" prop="categoryLevel">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.categoryLevel"
|
|
||||||
placeholder="请输入类别等级,1:一级类型,2:二级类别,3:三级类别等"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="类别排序" prop="categorySort">
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.categorySort"
|
v-model="queryParams.categorySort"
|
||||||
placeholder="请输入类别排序"
|
placeholder="请输入类别排序"
|
||||||
@ -67,7 +47,7 @@
|
|||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -145,13 +125,13 @@
|
|||||||
<el-table-column label="父级类别id" align="center" prop="parentCategoryId" /> -->
|
<el-table-column label="父级类别id" align="center" prop="parentCategoryId" /> -->
|
||||||
<el-table-column label="类别名称" align="center" prop="categoryName" />
|
<el-table-column label="类别名称" align="center" prop="categoryName" />
|
||||||
<el-table-column label="类别编码" align="center" prop="categoryCode" />
|
<el-table-column label="类别编码" align="center" prop="categoryCode" />
|
||||||
<el-table-column label="类别等级" align="center" prop="categoryLevel">
|
<!-- <el-table-column label="类别等级" align="center" prop="categoryLevel">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.status == "1" ? "一级类别" : "" }}
|
{{ scope.row.status == "1" ? "一级类别" : "" }}
|
||||||
{{ scope.row.status == "2" ? "二级类别" : "" }}
|
{{ scope.row.status == "2" ? "二级类别" : "" }}
|
||||||
{{ scope.row.status == "3" ? "三级类别" : "" }}
|
{{ scope.row.status == "3" ? "三级类别" : "" }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="类别排序" align="center" prop="categorySort" />
|
<el-table-column label="类别排序" align="center" prop="categorySort" />
|
||||||
<el-table-column label="类别概述" align="center" prop="categoryRemark" />
|
<el-table-column label="类别概述" align="center" prop="categoryRemark" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -221,8 +201,7 @@
|
|||||||
placeholder="请输入类别编码"
|
placeholder="请输入类别编码"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类别等级" prop="categoryLevel">
|
<!-- <el-form-item label="类别等级" prop="categoryLevel">
|
||||||
<!-- <el-input v-model="form.categoryLevel" placeholder="请选择类别等级" /> -->
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.categoryLevel"
|
v-model="form.categoryLevel"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
@ -236,7 +215,7 @@
|
|||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="类别排序" prop="categorySort">
|
<el-form-item label="类别排序" prop="categorySort">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.categorySort"
|
v-model="form.categorySort"
|
||||||
|
|||||||
@ -342,10 +342,10 @@
|
|||||||
style="width: 205px"
|
style="width: 205px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in optionstype"
|
v-for="item in departmentoptions"
|
||||||
:key="item.value"
|
:key="item.dictValue"
|
||||||
:label="item.label"
|
:label="item.dictLabel"
|
||||||
:value="item.value"
|
:value="item.dictValue"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -392,8 +392,21 @@
|
|||||||
:key="isResouceShow"
|
:key="isResouceShow"
|
||||||
></el-cascader>
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上级科室" prop="parentDepartmentId`">
|
<el-form-item label="上级科室" prop="parentDepartmentId">
|
||||||
<el-cascader
|
<el-select
|
||||||
|
v-model="form.parentDepartmentId"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 205px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in optionsparentDepartment"
|
||||||
|
:key="item.departmentCode"
|
||||||
|
:label="item.departmentName"
|
||||||
|
:value="item.departmentCode"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <el-cascader
|
||||||
:props="{ checkStrictly: true }"
|
:props="{ checkStrictly: true }"
|
||||||
:options="treeOptionsagencyCategoryId"
|
:options="treeOptionsagencyCategoryId"
|
||||||
@change="changeagencyCategoryId($event)"
|
@change="changeagencyCategoryId($event)"
|
||||||
@ -407,7 +420,7 @@
|
|||||||
:show-all-levels="false"
|
:show-all-levels="false"
|
||||||
ref="cascader"
|
ref="cascader"
|
||||||
:key="isResouceShows"
|
:key="isResouceShows"
|
||||||
></el-cascader>
|
></el-cascader> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提供服务类别" prop="provideServiceCategory">
|
<el-form-item label="提供服务类别" prop="provideServiceCategory">
|
||||||
<el-select
|
<el-select
|
||||||
@ -437,9 +450,9 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in optionsubdivisionCategory"
|
v-for="item in optionsubdivisionCategory"
|
||||||
:key="item.value"
|
:key="item.subdivisionCategoryCode"
|
||||||
:label="item.label"
|
:label="item.subdivisionCategoryName"
|
||||||
:value="item.value"
|
:value="item.subdivisionCategoryCode"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -531,14 +544,17 @@ import {
|
|||||||
delDepartment,
|
delDepartment,
|
||||||
addDepartment,
|
addDepartment,
|
||||||
updateDepartment,
|
updateDepartment,
|
||||||
|
getDepartmentList
|
||||||
} from "@/api/system/department";
|
} from "@/api/system/department";
|
||||||
import { agencyList, getAgencytype } from "@/api/system/agency";
|
import { agencyList, getAgencytype } from "@/api/system/agency";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
|
import { listSubdivision, } from "@/api/system/subdivision";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Department",
|
name: "Department",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
optionsparentDepartment:[],
|
||||||
// 细分
|
// 细分
|
||||||
optionsubdivisionCategory:[],
|
optionsubdivisionCategory:[],
|
||||||
// 标准科室对照4
|
// 标准科室对照4
|
||||||
@ -547,7 +563,7 @@ export default {
|
|||||||
nodeTypeoptions: [],
|
nodeTypeoptions: [],
|
||||||
treeOptions: [],
|
treeOptions: [],
|
||||||
treeOptionsagencyCategoryId: [],
|
treeOptionsagencyCategoryId: [],
|
||||||
optionstype:[],
|
departmentoptions:[],
|
||||||
options: [
|
options: [
|
||||||
// {
|
// {
|
||||||
// value: "PUBLIC_HEALTH",
|
// value: "PUBLIC_HEALTH",
|
||||||
@ -668,14 +684,34 @@ export default {
|
|||||||
// this.gettreelistitem();
|
// this.gettreelistitem();
|
||||||
this.info();
|
this.info();
|
||||||
this.infolist();
|
this.infolist();
|
||||||
|
this.getinfo();
|
||||||
|
this.getinfolist();
|
||||||
|
this.infodepartment()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getinfolist(){
|
||||||
|
listSubdivision().then(res=>{
|
||||||
|
this.optionsubdivisionCategory=res.rows
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getinfo(){
|
||||||
|
getDepartmentList().then(res=>{
|
||||||
|
console.log(res,'666')
|
||||||
|
this.optionsparentDepartment=res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
info() {
|
info() {
|
||||||
var dictType = "node_type";
|
var dictType = "node_type";
|
||||||
getAgencytype(dictType).then((res) => {
|
getAgencytype(dictType).then((res) => {
|
||||||
this.nodeTypeoptions = res.data;
|
this.nodeTypeoptions = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
infodepartment() {
|
||||||
|
var dictType = "department_type";
|
||||||
|
getAgencytype(dictType).then((res) => {
|
||||||
|
this.departmentoptions = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
infolist() {
|
infolist() {
|
||||||
var dictType = "provide_service_category";
|
var dictType = "provide_service_category";
|
||||||
getAgencytype(dictType).then((res) => {
|
getAgencytype(dictType).then((res) => {
|
||||||
|
|||||||
282
src/views/system/subdivision/index.vue
Normal file
282
src/views/system/subdivision/index.vue
Normal file
@ -0,0 +1,282 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
|
<el-form-item label="细分类别名称" prop="subdivisionCategoryName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.subdivisionCategoryName"
|
||||||
|
placeholder="请输入细分类别名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="细分类别编码" prop="subdivisionCategoryCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.subdivisionCategoryCode"
|
||||||
|
placeholder="请输入细分类别编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="细分类别排序" prop="sort">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.sort"
|
||||||
|
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:subdivision: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:subdivision: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:subdivision: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:subdivision:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="subdivisionList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||||
|
<el-table-column label="细分类别名称" align="center" prop="subdivisionCategoryName" />
|
||||||
|
<el-table-column label="细分类别编码" align="center" prop="subdivisionCategoryCode" />
|
||||||
|
<el-table-column label="细分类别排序" align="center" prop="sort" />
|
||||||
|
<el-table-column label="细分类别概述" align="center" prop="remark" />
|
||||||
|
<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:subdivision:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:subdivision: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="100px" :inline="true">
|
||||||
|
<el-form-item label="细分类别名称" prop="subdivisionCategoryName">
|
||||||
|
<el-input v-model="form.subdivisionCategoryName" placeholder="请输入细分类别名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="细分类别编码" prop="subdivisionCategoryCode">
|
||||||
|
<el-input v-model="form.subdivisionCategoryCode" placeholder="请输入细分类别编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="细分类别排序" prop="sort">
|
||||||
|
<el-input v-model="form.sort" placeholder="请输入细分类别排序" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="细分类别概述" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入细分类别概述" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listSubdivision, getSubdivision, delSubdivision, addSubdivision, updateSubdivision } from "@/api/system/subdivision";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Subdivision",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 细分类别信息表格数据
|
||||||
|
subdivisionList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
subdivisionCategoryName: null,
|
||||||
|
subdivisionCategoryCode: null,
|
||||||
|
sort: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询细分类别信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listSubdivision(this.queryParams).then(response => {
|
||||||
|
this.subdivisionList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
subdivisionCategoryName: null,
|
||||||
|
subdivisionCategoryCode: null,
|
||||||
|
sort: null,
|
||||||
|
remark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
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.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getSubdivision(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改细分类别信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateSubdivision(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addSubdivision(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除细分类别信息编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delSubdivision(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/subdivision/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `subdivision_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user