修改
This commit is contained in:
parent
dc618517e0
commit
a24820e864
44
src/api/system/stationClassify.js
Normal file
44
src/api/system/stationClassify.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询护理机构分类信息列表
|
||||||
|
export function listStationClassify(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/stationClassify/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询护理机构分类信息详细
|
||||||
|
export function getStationClassify(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/stationClassify/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增护理机构分类信息
|
||||||
|
export function addStationClassify(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/stationClassify/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改护理机构分类信息
|
||||||
|
export function updateStationClassify(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/stationClassify/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除护理机构分类信息
|
||||||
|
export function delStationClassify(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/stationClassify/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -24,17 +24,6 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="分类类型" prop="classifyType">
|
|
||||||
<el-select v-model="queryParams.classifyType" 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="分类排序" prop="classifySort">
|
<el-form-item label="分类排序" prop="classifySort">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.classifySort"
|
v-model="queryParams.classifySort"
|
||||||
@ -326,17 +315,6 @@ export default {
|
|||||||
classifyPictureUrl: null,
|
classifyPictureUrl: null,
|
||||||
classifySort: null,
|
classifySort: null,
|
||||||
},
|
},
|
||||||
//分类所属类型
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
value: "NURSE_AGNECY",
|
|
||||||
label: "护理机构分类",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "NURSE_ITEM",
|
|
||||||
label: "护理项目分类",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
nurseClassifyInfoList: [],
|
nurseClassifyInfoList: [],
|
||||||
|
|||||||
@ -231,6 +231,10 @@ export default {
|
|||||||
this.items.classifyPictureUrl = response.imgUrl;
|
this.items.classifyPictureUrl = response.imgUrl;
|
||||||
this.$emit("item", JSON.stringify(this.items));
|
this.$emit("item", JSON.stringify(this.items));
|
||||||
}
|
}
|
||||||
|
if (this.types == "nurseStationClassifyUrl") {
|
||||||
|
this.items.classifyPictureUrl = response.imgUrl;
|
||||||
|
this.$emit("item", JSON.stringify(this.items));
|
||||||
|
}
|
||||||
this.openimg = false;
|
this.openimg = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
544
src/views/system/stationClassify/index.vue
Normal file
544
src/views/system/stationClassify/index.vue
Normal file
@ -0,0 +1,544 @@
|
|||||||
|
<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="classifyCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.classifyCode"
|
||||||
|
placeholder="请输入分类编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分类名称" prop="classifyName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.classifyName"
|
||||||
|
placeholder="请输入分类名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分类排序" prop="classifySort">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.classifySort"
|
||||||
|
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:stationClassify: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:stationClassify: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:stationClassify: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:stationClassify:export']"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="stationClassifyList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="分类编码" align="center" prop="classifyCode" />
|
||||||
|
<el-table-column label="分类名称" align="center" prop="classifyName" />
|
||||||
|
<el-table-column label="分类排序" align="center" prop="classifySort" />
|
||||||
|
<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:stationClassify:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:stationClassify: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="1000px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="cancel"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
:inline="true"
|
||||||
|
:before-close="cancel"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in form.nurseClassifyInfoList"
|
||||||
|
:key="index"
|
||||||
|
style="margin-bottom: 30px"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="分类名称"
|
||||||
|
:rules="rules.nurseClassifyInfoList.classifyName"
|
||||||
|
:prop="`nurseClassifyInfoList.${index}.classifyName`"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
v-model="item.classifyName"
|
||||||
|
placeholder="请输入分类名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="分类排序"
|
||||||
|
:rules="rules.nurseClassifyInfoList.classifySort"
|
||||||
|
:prop="`nurseClassifyInfoList.${index}.classifySort`"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
v-model="item.classifySort"
|
||||||
|
placeholder="请输入分类排序"
|
||||||
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
|
maxLength="10"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="分类图标"
|
||||||
|
:rules="rules.nurseClassifyInfoList.classifyPictureUrl"
|
||||||
|
:prop="`nurseClassifyInfoList.${index}.classifyPictureUrl`"
|
||||||
|
>
|
||||||
|
<stationAcatar
|
||||||
|
style="margin-top: -25px"
|
||||||
|
@imgUrl="imgclassifyPictureUrl"
|
||||||
|
@item="imgclassifyPictureitem"
|
||||||
|
:img="item.classifyPictureUrl"
|
||||||
|
:type="'nurseStationClassifyUrl'"
|
||||||
|
:item="item"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-circle-plus-outline"
|
||||||
|
style="margin-top: 2px; margin-left: 50px"
|
||||||
|
v-if="index == 0"
|
||||||
|
@click="addnurseClassifyitem"
|
||||||
|
></el-button>
|
||||||
|
<!-- circle -->
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
plain
|
||||||
|
style="margin-top: 2px; margin-left: 50px"
|
||||||
|
v-if="index != 0"
|
||||||
|
@click="delnurseClassifyitem(index)"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</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>
|
||||||
|
<!-- 修改护理项目分类信息对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="editopen"
|
||||||
|
width="500px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="cancel"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="分类名称" prop="classifyName">
|
||||||
|
<el-input v-model="form.classifyName" placeholder="请输入分类名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分类图标" prop="classifyPictureUrl">
|
||||||
|
<stationAcatar
|
||||||
|
@imgUrl="imgclassifyPictureUrl"
|
||||||
|
@item="imgclassifyPictureitem"
|
||||||
|
:img="form.classifyPictureUrl"
|
||||||
|
:type="'nurseStationClassifyUrl'"
|
||||||
|
:item="form"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分类排序" prop="classifySort">
|
||||||
|
<el-input
|
||||||
|
v-model="form.classifySort"
|
||||||
|
placeholder="请输入分类排序"
|
||||||
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
|
maxLength="10"
|
||||||
|
/>
|
||||||
|
</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 {
|
||||||
|
listStationClassify,
|
||||||
|
getStationClassify,
|
||||||
|
delStationClassify,
|
||||||
|
addStationClassify,
|
||||||
|
updateStationClassify,
|
||||||
|
} from "@/api/system/stationClassify";
|
||||||
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
|
import { updatePicture } from "@/api/system/station";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "StationClassify",
|
||||||
|
components: { stationAcatar },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 护理机构分类信息表格数据
|
||||||
|
stationClassifyList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
editopen: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
classifyCode: null,
|
||||||
|
classifyName: null,
|
||||||
|
classifySort: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
classifyPictureUrl: null,
|
||||||
|
idd: 0,
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
nurseClassifyInfoList: {
|
||||||
|
classifyName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入分类名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
classifyPictureUrl: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择分类图标",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
classifySort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入分类排序",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
classifyName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入分类名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
classifyPictureUrl: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择分类图标",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
classifySort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入分类排序",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//接收图片
|
||||||
|
imgclassifyPictureUrl(e) {},
|
||||||
|
//接收图片所属的item
|
||||||
|
imgclassifyPictureitem(item) {
|
||||||
|
let items = JSON.parse(item);
|
||||||
|
if (items.idd && !items.id) {
|
||||||
|
this.form.nurseClassifyInfoList.forEach((e) => {
|
||||||
|
if (e.idd == items.idd) {
|
||||||
|
e.classifyPictureUrl = items.classifyPictureUrl;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (!items.idd && items.id) {
|
||||||
|
this.form.classifyPictureUrl = items.classifyPictureUrl;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//添加时删除item
|
||||||
|
delnurseClassifyitem(index) {
|
||||||
|
this.form.nurseClassifyInfoList.splice(index, 1);
|
||||||
|
},
|
||||||
|
//添加时新增item
|
||||||
|
addnurseClassifyitem() {
|
||||||
|
this.idd++;
|
||||||
|
var obj = {
|
||||||
|
classifyName: "",
|
||||||
|
classifyPictureUrl: "",
|
||||||
|
classifySort: "",
|
||||||
|
idd: this.idd,
|
||||||
|
};
|
||||||
|
if (this.form.nurseClassifyInfoList.length == 5) {
|
||||||
|
this.$message.error("最多批量添加5条");
|
||||||
|
} else {
|
||||||
|
this.form.nurseClassifyInfoList.push(obj);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 查询护理机构分类信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listStationClassify(this.queryParams).then((response) => {
|
||||||
|
this.stationClassifyList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
if (this.editopen) {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
if (this.form.classifyPictureUrl != this.classifyPictureUrl) {
|
||||||
|
obj.pictureUrlList.push(this.classifyPictureUrl);
|
||||||
|
}
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
this.editopen = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (this.open) {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
if (this.form.nurseClassifyInfoList) {
|
||||||
|
this.form.nurseClassifyInfoList.forEach((e) => {
|
||||||
|
obj.pictureUrlList.push(e.classifyPictureUrl);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
this.open = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
parentId: null,
|
||||||
|
classifyCode: null,
|
||||||
|
classifyName: null,
|
||||||
|
classifyLevel: null,
|
||||||
|
classifyType: null,
|
||||||
|
classifyPictureUrl: null,
|
||||||
|
classifySort: 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.form = {
|
||||||
|
nurseClassifyInfoList: [
|
||||||
|
{
|
||||||
|
classifyName: "",
|
||||||
|
classifyPictureUrl: "",
|
||||||
|
classifySort: "",
|
||||||
|
idd: this.idd,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加护理机构分类信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getStationClassify(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.classifyPictureUrl = response.data.classifyPictureUrl;
|
||||||
|
this.editopen = true;
|
||||||
|
this.title = "修改护理机构分类信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
console.log(this.form);
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateStationClassify(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
if (this.form.classifyPictureUrl != this.classifyPictureUrl) {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
obj.pictureUrlList.push(this.classifyPictureUrl);
|
||||||
|
updatePicture(obj).then((res) => {});
|
||||||
|
}
|
||||||
|
this.editopen = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addStationClassify(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 delStationClassify(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download(
|
||||||
|
"system/stationClassify/export",
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`stationClassify_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user