Merge remote-tracking branch 'origin/dev'
This commit is contained in:
commit
faa610bb0f
44
src/api/system/classifyItem.js
Normal file
44
src/api/system/classifyItem.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询护理机构和护理项目分类信息列表
|
||||
export function listInfo(query) {
|
||||
return request({
|
||||
url: '/classifyItem/info/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询护理机构和护理项目分类信息详细
|
||||
export function getInfo(id) {
|
||||
return request({
|
||||
url: '/classifyItem/info/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增护理机构和护理项目分类信息
|
||||
export function addInfo(data) {
|
||||
return request({
|
||||
url: '/classifyItem/info/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改护理机构和护理项目分类信息
|
||||
export function updateInfo(data) {
|
||||
return request({
|
||||
url: '/classifyItem/info/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除护理机构和护理项目分类信息
|
||||
export function delInfo(id) {
|
||||
return request({
|
||||
url: '/classifyItem/info/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
74
src/api/system/poser.js
Normal file
74
src/api/system/poser.js
Normal file
@ -0,0 +1,74 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询泉医到家系统海报模块信息(包含咨询简介信息)列表
|
||||
export function listPoser(query) {
|
||||
return request({
|
||||
url: '/system/poser/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//取消
|
||||
export function updatePicture(data) {
|
||||
return request({
|
||||
url: '/system/patientArchives/updatePicture',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 查询护理机构和护理项目分类信息列表
|
||||
export function listInfo(query) {
|
||||
return request({
|
||||
url: '/classifyItem/info/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询泉医到家系统海报模块信息(包含咨询简介信息)详细
|
||||
|
||||
export function getPoser(moduleType, nurseStationId, nurseItemId) {
|
||||
return request({
|
||||
url: `/system/poser/getModuleType?moduleType=${moduleType}&nurseStationId=${nurseStationId}&nurseItemId=${nurseItemId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增泉医到家系统海报模块信息(包含咨询简介信息)
|
||||
export function addPoser(data) {
|
||||
return request({
|
||||
url: 'system/poser/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getListByUser(query) {
|
||||
return request({
|
||||
url: '/system/station/list',
|
||||
method: 'GET',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getListBy(query) {
|
||||
return request({
|
||||
url: '/system/user/getListByUser',
|
||||
method: 'GET',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 修改泉医到家系统海报模块信息(包含咨询简介信息)
|
||||
export function updatePoser(data) {
|
||||
return request({
|
||||
url: 'system/poser/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除泉医到家系统海报模块信息(包含咨询简介信息)
|
||||
export function delPoser(nurseStationId, moduleType, nurseItemId) {
|
||||
return request({
|
||||
url: `/system/poser/deletePoserInfo?moduleType=${moduleType}&nurseStationId=${nurseStationId}&nurseItemId=${nurseItemId}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -36,7 +36,14 @@ export function updateStation(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询护理机构分类信息列表
|
||||
export function listStationClassify(query) {
|
||||
return request({
|
||||
url: '/system/stationClassify/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 删除护理站信息
|
||||
export function delStation(id) {
|
||||
return request({
|
||||
|
||||
@ -9,8 +9,16 @@ export function updateNurseStationHeads(data) {
|
||||
})
|
||||
}
|
||||
|
||||
//海报视频上传
|
||||
|
||||
|
||||
export function updatePoserHeads(data) {
|
||||
return request({
|
||||
url: '/system/poser/updatePoserHeads',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function posts(data) {
|
||||
return request({
|
||||
|
||||
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'
|
||||
})
|
||||
}
|
||||
@ -73,7 +73,8 @@ export default {
|
||||
],
|
||||
// goodAttributeDetailsLists:[],
|
||||
goodDetailsLists: [],
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
ids: [],
|
||||
// 查询参数
|
||||
shangjia: {
|
||||
id: null,
|
||||
@ -201,28 +202,28 @@ export default {
|
||||
// if (this.goodDetailsLists.length == 5) {
|
||||
// this.$message.error("最多只能5条");
|
||||
// } else {
|
||||
this.ids++;
|
||||
this.idd++;
|
||||
var obj = {
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
attributeDetailsSort: null,
|
||||
ids: this.ids,
|
||||
idd: this.idd,
|
||||
};
|
||||
this.goodDetailsLists.push(obj);
|
||||
// }
|
||||
},
|
||||
// 删除
|
||||
delgoodAttributeDetail(item) {
|
||||
if (item.ids && !item.attributeDetailsId) {
|
||||
if (item.idd && !item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.goodDetailsLists = this.goodDetailsLists.filter(
|
||||
(e) => e.ids != item.ids
|
||||
(e) => e.idd != item.idd
|
||||
);
|
||||
}
|
||||
} else if (!item.ids && item.attributeDetailsId) {
|
||||
} else if (!item.idd && item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
@ -321,7 +322,7 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
attributeDetailsSort: null,
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -362,7 +363,7 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: null,
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
this.open = true;
|
||||
},
|
||||
@ -461,13 +462,13 @@ export default {
|
||||
},
|
||||
attributePitureitem(item) {
|
||||
let items = JSON.parse(item);
|
||||
if (items.ids && !items.id) {
|
||||
if (items.idd && !items.id) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.ids == items.ids) {
|
||||
if (e.idd == items.idd) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
}
|
||||
});
|
||||
} else if (!items.ids && items.attributeDetailsId) {
|
||||
} else if (!items.idd && items.attributeDetailsId) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.attributeDetailsId == items.attributeDetailsId) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
@keyup.enter.native="handleQuery"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in handstationlist"
|
||||
|
||||
562
src/views/system/classifyItem/index.vue
Normal file
562
src/views/system/classifyItem/index.vue
Normal file
@ -0,0 +1,562 @@
|
||||
<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.number="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:classifyItem: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:classifyItem: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:classifyItem: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="['classify:info:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="infoList"
|
||||
@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="classifyType">
|
||||
<template slot-scope="scope"
|
||||
>{{ scope.row.classifyType == "NURSE_AGNECY" ? "护理机构分类" : "" }}
|
||||
{{ scope.row.classifyType == "NURSE_ITEM" ? "护理项目分类" : "" }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<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:classifyItem:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:classifyItem: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
|
||||
maxLength="30"
|
||||
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.number="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="'nurseItemClassifyUrl'"
|
||||
: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="请输入分类名称"
|
||||
maxLength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类图标" prop="classifyPictureUrl">
|
||||
<stationAcatar
|
||||
@imgUrl="imgclassifyPictureUrl"
|
||||
@item="imgclassifyPictureitem"
|
||||
:img="form.classifyPictureUrl"
|
||||
:type="'nurseItemClassifyUrl'"
|
||||
:item="form"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类排序" prop="classifySort">
|
||||
<el-input
|
||||
v-model.number="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 stationAcatar from "../stationAvatar/index.vue";
|
||||
import {
|
||||
listInfo,
|
||||
getInfo,
|
||||
delInfo,
|
||||
addInfo,
|
||||
updateInfo,
|
||||
} from "@/api/system/classifyItem.js";
|
||||
import { updatePicture } from "@/api/system/station";
|
||||
export default {
|
||||
name: "classify",
|
||||
components: { stationAcatar },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 护理机构和护理项目分类信息表格数据
|
||||
infoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
editopen: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
parentId: null,
|
||||
classifyCode: null,
|
||||
classifyName: null,
|
||||
classifyLevel: null,
|
||||
classifyType: null,
|
||||
classifyPictureUrl: null,
|
||||
classifySort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseClassifyInfoList: [],
|
||||
},
|
||||
idd: 0,
|
||||
classifyPictureUrl: null,
|
||||
// 表单校验
|
||||
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: {
|
||||
//添加时删除item
|
||||
delnurseClassifyitem(index) {
|
||||
this.form.nurseClassifyInfoList.splice(index, 1);
|
||||
},
|
||||
//添加时新增item
|
||||
addnurseClassifyitem() {
|
||||
this.idd++;
|
||||
var obj = {
|
||||
classifyName: "",
|
||||
classifyPictureUrl: "",
|
||||
classifySort: null,
|
||||
idd: this.idd,
|
||||
};
|
||||
if (this.form.nurseClassifyInfoList.length == 5) {
|
||||
this.$message.error("最多批量添加5条");
|
||||
} else {
|
||||
this.form.nurseClassifyInfoList.push(obj);
|
||||
}
|
||||
},
|
||||
//接收图片
|
||||
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;
|
||||
}
|
||||
},
|
||||
/** 查询护理机构和护理项目分类信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInfo(this.queryParams).then((response) => {
|
||||
this.infoList = 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: null,
|
||||
idd: this.idd,
|
||||
},
|
||||
],
|
||||
};
|
||||
this.open = true;
|
||||
this.title = "添加护理项目分类信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getInfo(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.classifyPictureUrl = response.data.classifyPictureUrl;
|
||||
this.editopen = true;
|
||||
this.title = "修改护理项目分类信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.classifySort = Number(this.form.classifySort);
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateInfo(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 {
|
||||
addInfo(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
console.log(row);
|
||||
this.$modal
|
||||
.confirm("是否确认删除?")
|
||||
.then(function() {
|
||||
return delInfo(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"classify/info/export",
|
||||
{
|
||||
...this.queryParams
|
||||
},
|
||||
`info_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -75,7 +75,8 @@ export default {
|
||||
],
|
||||
// goodAttributeDetailsLists:[],
|
||||
goodDetailsLists: [],
|
||||
ids: 9999999,
|
||||
ids: [],
|
||||
idd: 9999999,
|
||||
// 查询参数
|
||||
shangjia: {
|
||||
id: null,
|
||||
@ -210,29 +211,28 @@ export default {
|
||||
if (this.goodDetailsLists.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.ids++;
|
||||
this.idd++;
|
||||
var obj = {
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: null,
|
||||
ids: this.ids,
|
||||
idd: this.idd,
|
||||
};
|
||||
this.goodDetailsLists.push(obj);
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
delgoodAttributeDetail(item) {
|
||||
console.log(item);
|
||||
if (item.ids && !item.attributeDetailsId) {
|
||||
if (item.idd && !item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.goodDetailsLists = this.goodDetailsLists.filter(
|
||||
(e) => e.ids != item.ids
|
||||
(e) => e.idd != item.idd
|
||||
);
|
||||
}
|
||||
} else if (!item.ids && item.attributeDetailsId) {
|
||||
} else if (!item.idd && item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
@ -318,7 +318,7 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: null,
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -361,7 +361,7 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: null,
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
this.open = true;
|
||||
},
|
||||
@ -482,13 +482,13 @@ export default {
|
||||
},
|
||||
attributePitureitem(item) {
|
||||
let items = JSON.parse(item);
|
||||
if (items.ids && !items.id) {
|
||||
if (items.idd && !items.id) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.ids == items.ids) {
|
||||
if (e.idd == items.idd) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
}
|
||||
});
|
||||
} else if (!items.ids && items.attributeDetailsId) {
|
||||
} else if (!items.idd && items.attributeDetailsId) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.attributeDetailsId == items.attributeDetailsId) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
|
||||
@ -9,17 +9,13 @@
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
>
|
||||
<el-select @change="handleQuery" v-model="queryParams.nurseStationId" placeholder="请选择护理站">
|
||||
<el-option
|
||||
v-for="item in handstationlist"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
@ -41,17 +37,13 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select
|
||||
v-model="queryParams.goodsPurpose"
|
||||
placeholder="请选择商品用途"
|
||||
>
|
||||
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择商品用途">
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@ -62,22 +54,13 @@
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</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-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">
|
||||
@ -89,8 +72,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:goodsInfo:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -101,38 +83,17 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:goodsInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="goodsInfoList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table v-loading="loading" :data="goodsInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="所属护理站"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
/>
|
||||
<el-table-column label="所属护理站" align="center" prop="nurseStationName" />
|
||||
<el-table-column label="商品编码" align="center" prop="goodsCode" />
|
||||
<el-table-column
|
||||
label="商品名称"
|
||||
align="center"
|
||||
prop="goodsName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="商品分类名称"
|
||||
align="center"
|
||||
prop="goodsCategoryName"
|
||||
/>
|
||||
<el-table-column label="商品名称" align="center" prop="goodsName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="商品分类名称" align="center" prop="goodsCategoryName" />
|
||||
|
||||
<el-table-column label="商品用途" align="center" prop="goodsPurpose">
|
||||
<template slot-scope="scope">
|
||||
@ -147,16 +108,10 @@
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@change="upwhetherShelf(scope.row)"
|
||||
>
|
||||
</el-switch>
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="上架时间"
|
||||
align="center"
|
||||
prop="shelfTime"
|
||||
width="180"
|
||||
>
|
||||
<el-table-column label="上架时间" align="center" prop="shelfTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.whetherShelf">{{ scope.row.shelfTime }}</div>
|
||||
<div v-else></div>
|
||||
@ -165,11 +120,8 @@
|
||||
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>chaxun
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
chaxun
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -177,16 +129,14 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:goodsInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:goodsInfo:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -205,13 +155,7 @@
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px" :inline="true">
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="form.nurseStationName"
|
||||
@ -239,8 +183,7 @@
|
||||
:key="isResouceShow"
|
||||
ref="cascader"
|
||||
:placeholder="form.goodsCategoryName ? form.goodsCategoryName : ''"
|
||||
>
|
||||
</el-cascader>
|
||||
></el-cascader>
|
||||
<!-- <el-select
|
||||
style="width: 210px"
|
||||
v-model="form.goodsCategoryId"
|
||||
@ -257,40 +200,23 @@
|
||||
</el-select>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select
|
||||
v-model="form.goodsPurpose"
|
||||
placeholder="请选择商品用途"
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-select v-model="form.goodsPurpose" placeholder="请选择商品用途" style="width: 210px">
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品度量单位" prop="goodsUnit">
|
||||
<el-input
|
||||
v-model="form.goodsUnit"
|
||||
placeholder="请输入商品度量单位"
|
||||
style="width: 210px"
|
||||
/>
|
||||
<el-input v-model="form.goodsUnit" placeholder="请输入商品度量单位" style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品顺序" prop="sort">
|
||||
<el-input
|
||||
v-model.number="form.sort"
|
||||
placeholder="值越大排名越靠前"
|
||||
style="width: 210px"
|
||||
/>
|
||||
<el-input v-model.number="form.sort" placeholder="值越大排名越靠前" style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品图片" prop="goodsPictureUrl">
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
:img="form.goodsPictureUrl"
|
||||
:type="'goodsPictureUrl'"
|
||||
/>
|
||||
<stationAcatar @imgUrl="imgUrl" :img="form.goodsPictureUrl" :type="'goodsPictureUrl'" />
|
||||
</el-form-item>
|
||||
|
||||
<el-table
|
||||
@ -301,10 +227,7 @@
|
||||
>
|
||||
<el-table-column label="商品属性名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.attributeName"
|
||||
maxlength="40"
|
||||
></el-input>
|
||||
<el-input v-model="scope.row.attributeName" maxlength="40"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品单价" align="center">
|
||||
@ -350,23 +273,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="addgoodAttributeDetail"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="delgoodAttributeDetail(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button size="mini" type="text" @click="addgoodAttributeDetail">新增</el-button>
|
||||
<el-button size="mini" type="text" @click="delgoodAttributeDetail(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-form-item
|
||||
label="商品概述"
|
||||
prop="goodsRemark"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<el-form-item label="商品概述" prop="goodsRemark" style="margin-top: 20px">
|
||||
<editor
|
||||
@imgs="imgs"
|
||||
:min-height="100"
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in handstationlist"
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in handstationlist"
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
@keyup.enter.native="handleQuery"
|
||||
@change='handleQuery'
|
||||
>
|
||||
<el-option
|
||||
v-for="item in handstationlist"
|
||||
|
||||
1014
src/views/system/poser/index.vue
Normal file
1014
src/views/system/poser/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,15 +16,14 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="getListByUserquery.nurseStationName"
|
||||
placeholder="请输入护理站"
|
||||
placeholder="请输入护理站名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -38,7 +37,6 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
@ -78,10 +76,9 @@
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="info"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseStationlist"
|
||||
@ -100,7 +97,6 @@
|
||||
prop="nurseStationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column label="所属区域" align="center" prop="area">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
@ -148,7 +144,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
@ -156,7 +151,7 @@
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
<!-- 新增护理站信息对话框 -->
|
||||
<!-- 新增修改护理站信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
@ -270,13 +265,40 @@
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
placeholder="请输入排序"
|
||||
v-model="form.sort"
|
||||
maxlength="8"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
/>
|
||||
<el-form-item label="护理机构分类" >
|
||||
<template>
|
||||
<el-button
|
||||
@click="clickinnerVisible()"
|
||||
type=""
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #c0c4cc;
|
||||
margin-top: -10px;
|
||||
"
|
||||
v-if="form.classifyNameList == '请选择护理站所属机构分类'"
|
||||
>{{ form.classifyNameList }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickinnerVisible()"
|
||||
type=""
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: -10px;
|
||||
"
|
||||
v-else
|
||||
>{{ form.classifyNameList }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="dutyPerson">
|
||||
<el-input
|
||||
@ -292,6 +314,70 @@
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
placeholder="请输入排序"
|
||||
v-model.number="form.sort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="营业概述" prop="openingHoursDescribe">
|
||||
<el-input
|
||||
style="width: 208px"
|
||||
v-model="form.openingHoursDescribe"
|
||||
placeholder="请输入护理站营业概述"
|
||||
maxlength="150"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="上午营业时间" >
|
||||
<el-time-select
|
||||
style="width: 208px"
|
||||
placeholder="上午营业开始时间"
|
||||
v-model="form.morningOpenStartTime"
|
||||
:picker-options="{
|
||||
start: '07:00',
|
||||
step: '00:30',
|
||||
end: '14:00',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
<el-time-select
|
||||
style="width: 208px; margin-left: 10px"
|
||||
placeholder="上午营业结束时间"
|
||||
v-model="form.morningOpenEndTime"
|
||||
:picker-options="{
|
||||
start: '08:00',
|
||||
step: '00:30',
|
||||
end: '14:30',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="下午营业时间" >
|
||||
<el-time-select
|
||||
style="width: 208px"
|
||||
placeholder="下午营业开始时间"
|
||||
v-model="form.afternoonOpenStartTime"
|
||||
:picker-options="{
|
||||
start: '12:00',
|
||||
step: '00:30',
|
||||
end: '18:00',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
<el-time-select
|
||||
style="width: 208px; margin-left: 10px"
|
||||
placeholder="下午营业结束时间"
|
||||
v-model="form.afternoonOpenEndTime"
|
||||
:picker-options="{
|
||||
start: '13:00',
|
||||
step: '00:30',
|
||||
end: '20:00',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站总概述" prop="nurseStationDescription">
|
||||
<el-input
|
||||
style="width: 540px"
|
||||
@ -354,9 +440,9 @@
|
||||
<el-table-column label="排序" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.labelSort"
|
||||
maxlength="10"
|
||||
v-model.number="scope.row.labelSort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="5"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -384,6 +470,101 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 护理分类 -->
|
||||
<el-dialog
|
||||
title="选择护理机构分类"
|
||||
:visible.sync="Classifyshow"
|
||||
width="1100px"
|
||||
append-to-body
|
||||
:before-close="cancelClassifyshow"
|
||||
>
|
||||
<el-form :model="classifyquery" label-width="150px" :inline="true">
|
||||
<el-form-item label="护理机构分类编码" prop="classifyCode">
|
||||
<el-input
|
||||
v-model="classifyquery.classifyCode"
|
||||
placeholder="请输入护理机构分类编码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理机构分类名称" prop="classifyName">
|
||||
<el-input
|
||||
v-model="classifyquery.classifyName"
|
||||
placeholder="请输入护理机构分类名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="classifylistInfo"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="classifylistcancel"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="classifylist"
|
||||
@cell-dblclick="setCheckedData"
|
||||
>
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="setCheckedData(scope.row)"
|
||||
v-if="checkedDataList.find((e) => e == scope.row.id)"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
v-else
|
||||
@click="setCheckedData(scope.row)"
|
||||
>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="classifyCode"
|
||||
label="护理项目分类编码"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="classifyName"
|
||||
label="护理项目分类名称"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="classifytotal > 0"
|
||||
:total="classifytotal"
|
||||
:page.sync="classifyquery.pageNum"
|
||||
:limit.sync="classifyquery.pageSize"
|
||||
@pagination="classifylistInfo"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="choiceclassify"
|
||||
style="
|
||||
margin-top: 30px;
|
||||
margin-left: 85%;
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
font-size: 15px;
|
||||
"
|
||||
>选择完成</el-button
|
||||
>
|
||||
</el-dialog>
|
||||
<!-- //导入 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
@ -424,11 +605,15 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- station/list -->
|
||||
<script>
|
||||
// import stationjs from "./stationjs";
|
||||
// export default stationjs;
|
||||
|
||||
import {
|
||||
listStation,
|
||||
getStation,
|
||||
delStation,
|
||||
listStationClassify,
|
||||
addStation,
|
||||
updateStation,
|
||||
getFirstLevelInfo,
|
||||
@ -443,38 +628,37 @@ export default {
|
||||
components: { stationAcatar, editor },
|
||||
name: "Station",
|
||||
data() {
|
||||
var checkMobile = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
};
|
||||
// var checkMobile = (rule, value, cb) => {
|
||||
// // 验证手机号的正则表达式
|
||||
// const regMobile =
|
||||
// /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
// if (regMobile.test(value)) {
|
||||
// return cb();
|
||||
// }
|
||||
// cb(new Error("请输入正确的联系电话"));
|
||||
// };
|
||||
// 验证手机号的规则
|
||||
var checkMobile2 = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (!value) {
|
||||
//所以当没有值的时候,我们直接callback,让他不校验直接执行下一步
|
||||
return cb();
|
||||
} else {
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
} else {
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
}
|
||||
}
|
||||
};
|
||||
// var checkMobile2 = (rule, value, cb) => {
|
||||
// // 验证手机号的正则表达式
|
||||
// const regMobile =
|
||||
// /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
// if (!value) {
|
||||
// //所以当没有值的时候,我们直接callback,让他不校验直接执行下一步
|
||||
// return cb();
|
||||
// } else {
|
||||
// if (regMobile.test(value)) {
|
||||
// return cb();
|
||||
// } else {
|
||||
// cb(new Error("请输入正确的联系电话"));
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
return {
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
imageUrl: "",
|
||||
imageUrl2: "",
|
||||
imgtwo: "",
|
||||
imgone: "",
|
||||
handstationlist: [], //页面搜索list
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
@ -486,8 +670,7 @@ export default {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url:
|
||||
process.env.VUE_APP_BASE_API +
|
||||
url: process.env.VUE_APP_BASE_API +
|
||||
"/system/station/insertNurseStationImportList",
|
||||
},
|
||||
//护理类型
|
||||
@ -505,53 +688,60 @@ export default {
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
total2: 0,
|
||||
//所属护理类型
|
||||
typelooks: [],
|
||||
classifytotal: 0,
|
||||
//所属标签
|
||||
looknurseStationLabel: [
|
||||
{
|
||||
looknurseStationLabel: [{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
},
|
||||
],
|
||||
sort: null,
|
||||
idd: 1,
|
||||
},],
|
||||
// 护理站信息表格数据
|
||||
stationList: [
|
||||
{
|
||||
sysAreaVOList: [
|
||||
{
|
||||
stationList: [{
|
||||
sysAreaVOList: [{
|
||||
provinceName: null,
|
||||
cityName: null,
|
||||
streetName: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},],
|
||||
},],
|
||||
nurseStationlist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
typeopen: false,
|
||||
nurseStationLabelopen: false,
|
||||
Classifyshow: false,
|
||||
afternoonOpenStartTimeStr: "",
|
||||
afternoonOpenEndTimeStr: "",
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 查询参数
|
||||
// 表单参数
|
||||
form: {},
|
||||
ids: 1,
|
||||
form: {
|
||||
nurseStationClassifyIds: [],
|
||||
},
|
||||
idd: 1,
|
||||
provincelist: [],
|
||||
arealist: [],
|
||||
citylist: [],
|
||||
streetlist: [],
|
||||
classifylist: [],
|
||||
classifyquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
classifyCode: "",
|
||||
classifyName: "",
|
||||
},
|
||||
resid: null,
|
||||
// 表单校验
|
||||
rules: {
|
||||
// morningOpenStartTime: [
|
||||
// { required: true, message: "请选择上午营业时间", trigger: "blur" },
|
||||
// ],
|
||||
// afternoonOpenStartTimeStr: [
|
||||
// { required: true, message: "请选择下午营业时间", trigger: "blur" },
|
||||
// ],
|
||||
agencyIntroduce: [
|
||||
{ required: true, message: "请输入护理站简介", trigger: "blur" },
|
||||
],
|
||||
@ -564,22 +754,18 @@ export default {
|
||||
nurseStationDescription: [
|
||||
{ required: true, message: "护理站总概述不能为空", trigger: "blur" },
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
phone: [{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
// validator: checkMobile,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
message: "请输入手机号",
|
||||
},],
|
||||
|
||||
dutyPhone: [
|
||||
{
|
||||
validator: checkMobile2,
|
||||
dutyPhone: [{
|
||||
// validator: checkMobile2,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
message: "请输入联系电话",
|
||||
},],
|
||||
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
|
||||
address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
||||
longitude: [
|
||||
@ -598,12 +784,14 @@ export default {
|
||||
{ required: true, message: "请选择护理站类型", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
|
||||
checkedDataList: []// 选择的护理机构分类
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getaddress();
|
||||
this.info();
|
||||
this.infos();
|
||||
this.classifylistInfo();
|
||||
},
|
||||
methods: {
|
||||
imgs(item) {
|
||||
@ -620,34 +808,28 @@ export default {
|
||||
console.log();
|
||||
// this.looknurseStationLabel.splice(index,1)
|
||||
if (this.looknurseStationLabel.length === 1) {
|
||||
this.looknurseStationLabel = [
|
||||
{
|
||||
this.looknurseStationLabel = [{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
},
|
||||
];
|
||||
sort: null,
|
||||
idd: 1,
|
||||
},];
|
||||
} else {
|
||||
this.looknurseStationLabel.splice(index, 1);
|
||||
}
|
||||
|
||||
console.log(this.form.nurseStationLabelList);
|
||||
},
|
||||
addnurseStationLabelList() {
|
||||
if (this.looknurseStationLabel.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.ids++;
|
||||
this.idd++;
|
||||
var obj = {
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: this.ids,
|
||||
sort: null,
|
||||
idd: this.idd,
|
||||
};
|
||||
this.looknurseStationLabel.push(obj);
|
||||
}
|
||||
console.log(this.looknurseStationLabel);
|
||||
},
|
||||
|
||||
//点击街道
|
||||
clickstreet(item) {
|
||||
this.form.areaCode = item.areaCode;
|
||||
@ -680,12 +862,15 @@ export default {
|
||||
this.citylist = res.data;
|
||||
});
|
||||
},
|
||||
/** 查询护理站信息列表 */
|
||||
/** 获取省列表 */
|
||||
getaddress() {
|
||||
getFirstLevelInfo().then((res) => {
|
||||
this.provincelist = res.data;
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
this.info();
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
var obj = { pictureUrlList: [] };
|
||||
@ -698,16 +883,15 @@ export default {
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
|
||||
if (this.imgsurl.pictureUrlList.length > 0) {
|
||||
updatePicture(this.imgsurl).then((res) => { });
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
this.open = false;
|
||||
this.reset();
|
||||
this.arealist = [];
|
||||
this.citylist = [];
|
||||
this.streetlist = [];
|
||||
this.arealist = []
|
||||
this.citylist = []
|
||||
this.streetlist = []
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
@ -731,13 +915,81 @@ export default {
|
||||
sort: null,
|
||||
nurseStationLabelList: [],
|
||||
streetCode: null,
|
||||
openingHoursDescribe: null,
|
||||
afternoonOpenStartTimeStr: "00:00:00", //下午开始
|
||||
afternoonOpenEndTimeStr: "00:00:00", //下午结束
|
||||
morningOpenEndTimeStr: "00:00:00", //上午结束
|
||||
morningOpenStartTimeStr: "00:00:00", //上午开始
|
||||
nurseStationClassifyIds: [],
|
||||
classifyNameList: '请选择护理站所属机构分类',
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
liststationinfo() {
|
||||
this.loading = true;
|
||||
this.info();
|
||||
//护理机构分类
|
||||
clickinnerVisible() {
|
||||
this.classifylistInfo();
|
||||
// 回显数据
|
||||
this.checkedDataList = JSON.parse(JSON.stringify(this.form.nurseStationClassifyIds));
|
||||
this.Classifyshow = true;
|
||||
},
|
||||
classifylistcancel() {
|
||||
this.classifyquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
classifyCode: "",
|
||||
classifyName: "",
|
||||
};
|
||||
this.classifylistInfo();
|
||||
},
|
||||
// 设置已选数据
|
||||
setCheckedData(e) {
|
||||
// 若已存在id 则为删除
|
||||
if (this.checkedDataList.find(el => el == e.id)) {
|
||||
this.checkedDataList = this.checkedDataList.filter(ele => ele != e.id)
|
||||
}
|
||||
else {
|
||||
// 不存在 添加进id
|
||||
this.checkedDataList.push(e.id);
|
||||
}
|
||||
},
|
||||
// 完成选择
|
||||
choiceclassify() {
|
||||
this.form.nurseStationClassifyIds = JSON.parse(JSON.stringify(this.checkedDataList));
|
||||
// 根据id获取到所有name
|
||||
if (this.form.nurseStationClassifyIds.length == 0) {
|
||||
this.form.classifyNameList = '请选择护理站所属机构分类'
|
||||
} else {
|
||||
this.form.classifyNameList = "";
|
||||
this.form.nurseStationClassifyIds.forEach(f => {
|
||||
let classify = this.classifylist.find(d => d.id == f)
|
||||
if (!classify)
|
||||
return;
|
||||
this.form.classifyNameList += classify.classifyName + ","
|
||||
})
|
||||
this.form.classifyNameList = this.form.classifyNameList.substring(0, this.form.classifyNameList.length - 1)
|
||||
}
|
||||
this.cancelClassifyshow();
|
||||
},
|
||||
/** 查询护理机构分类信息列表 */
|
||||
classifylistInfo() {
|
||||
listStationClassify(this.classifyquery).then((response) => {
|
||||
this.classifylist = response.rows;
|
||||
this.classifytotal = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
cancelClassifyshow() {
|
||||
// this.classifylistInfo();
|
||||
this.Classifyshow = false;
|
||||
},
|
||||
//护理站列表
|
||||
info() {
|
||||
this.loading = true
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.loading = true;
|
||||
@ -778,13 +1030,11 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.looknurseStationLabel = [
|
||||
{
|
||||
this.looknurseStationLabel = [{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
},
|
||||
];
|
||||
sort: null,
|
||||
idd: 1,
|
||||
},];
|
||||
this.title = "添加护理站信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
@ -793,6 +1043,12 @@ export default {
|
||||
this.loading = true;
|
||||
const id = row.id || this.ids;
|
||||
getStation(id).then((response) => {
|
||||
if (response.data.nurseClassifyInfoList) {
|
||||
response.data.nurseStationClassifyIds = []
|
||||
response.data.nurseClassifyInfoList.forEach(e => {
|
||||
response.data.nurseStationClassifyIds.push(e.id)
|
||||
})
|
||||
}
|
||||
this.form = response.data;
|
||||
this.form.streetCode = this.form.streetName;
|
||||
this.imgone = this.form.stationIntroducePcitureUrl;
|
||||
@ -805,9 +1061,28 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
if (this.form.afternoonOpenStartTime) {
|
||||
this.form.afternoonOpenStartTimeStr= this.form.afternoonOpenStartTime
|
||||
}else{
|
||||
this.form.afternoonOpenStartTimeStr= "00:00:00"
|
||||
}
|
||||
if (!this.form.afternoonOpenEndTime) {
|
||||
this.form.afternoonOpenEndTimeStr= "00:00:00"
|
||||
}else{
|
||||
this.form.afternoonOpenEndTimeStr= this.form.afternoonOpenEndTime
|
||||
}
|
||||
if (!this.form.morningOpenStartTime) {
|
||||
this.form.morningOpenStartTimeStr= "00:00:00"
|
||||
}else{
|
||||
this.form.morningOpenStartTimeStr= this.form. morningOpenStartTime
|
||||
}
|
||||
if (!this.form.morningOpenEndTime) {
|
||||
this.form.morningOpenEndTimeStr= "00:00:00"
|
||||
}else{
|
||||
this.form.morningOpenEndTimeStr= this.form.morningOpenEndTime
|
||||
}
|
||||
this.form.nurseStationLabelList = this.looknurseStationLabel;
|
||||
this.form.nurseStationType = this.nurseStationType2;
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.areaCode = Number(this.form.areaCode);
|
||||
@ -821,20 +1096,20 @@ export default {
|
||||
if (this.imgtwo != this.form.stationPictureUrl) {
|
||||
obj.pictureUrlList.push(this.imgtwo);
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.info();
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addStation(this.form).then((response) => {
|
||||
if (response.code) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.info();
|
||||
this.getList();
|
||||
} else {
|
||||
this.form.nurseStationType = obj;
|
||||
}
|
||||
@ -858,7 +1133,7 @@ export default {
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
this.info();
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
@ -866,8 +1141,7 @@ export default {
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/station/export",
|
||||
{
|
||||
"system/station/export", {
|
||||
...this.getListByUserquery,
|
||||
},
|
||||
`station_${new Date().getTime()}.xlsx`
|
||||
@ -881,8 +1155,7 @@ export default {
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download(
|
||||
"/system/station/downloadTemplate?fileType=nurseStation",
|
||||
{},
|
||||
"/system/station/downloadTemplate?fileType=nurseStation", {},
|
||||
`护理站信息导入模板.xlsx`
|
||||
);
|
||||
},
|
||||
@ -899,34 +1172,14 @@ export default {
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
"</div>",
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
"导入结果", { dangerouslyUseHTMLString: true }
|
||||
);
|
||||
this.info();
|
||||
this.getList();
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
//护理站限列表
|
||||
info() {
|
||||
//加个所属区域
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
infos() {
|
||||
var queryFor = {
|
||||
pageNum: 1,
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -2,9 +2,18 @@
|
||||
<div>
|
||||
<div
|
||||
class="user-info-head"
|
||||
:class="video.VideoPath ? 'wihi' : ''"
|
||||
@click="editCropper()"
|
||||
style="width: 100px; height: 100px"
|
||||
>
|
||||
<video
|
||||
style="width: 208px; height: 208px"
|
||||
v-if="video.VideoPath"
|
||||
v-bind:src="video.VideoPath"
|
||||
class="avatar video-avatar"
|
||||
controls="controls"
|
||||
>
|
||||
您的浏览器不支持视频播放
|
||||
</video>
|
||||
<img
|
||||
v-if="options.img"
|
||||
v-bind:src="options.img"
|
||||
@ -12,7 +21,7 @@
|
||||
style="width: 100px; height: 100px; line-height: 200px"
|
||||
/>
|
||||
<i
|
||||
v-else
|
||||
v-else-if="!options.img && !video.VideoPath"
|
||||
class="el-icon-plus avatar-uploader-icon"
|
||||
style="
|
||||
position: absolute;
|
||||
@ -24,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
title="上传图片"
|
||||
:title="title"
|
||||
:visible.sync="openimg"
|
||||
width="950px"
|
||||
append-to-body
|
||||
@ -47,6 +56,15 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
|
||||
<div class="avatar-upload-preview">
|
||||
<video
|
||||
style="width: 100%; height: 100%"
|
||||
v-if="videoForm.showVideoPath"
|
||||
v-bind:src="videoForm.showVideoPath"
|
||||
class="avatar video-avatar"
|
||||
controls="controls"
|
||||
>
|
||||
您的浏览器不支持视频播放
|
||||
</video>
|
||||
<img
|
||||
style="width: 100%; height: 100%"
|
||||
v-if="previews.url"
|
||||
@ -54,6 +72,9 @@
|
||||
/>
|
||||
<div v-else></div>
|
||||
</div>
|
||||
<div class="title" v-if="types != 'posterVideoUrl'&&types!='posterPictureUrl'">
|
||||
请上传图片为800x800px的正方形
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<br />
|
||||
@ -71,7 +92,7 @@
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 1, offset: 2 }" :md="2">
|
||||
<!-- <el-col :lg="{ span: 1, offset: 2 }" :md="2">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
size="small"
|
||||
@ -98,8 +119,8 @@
|
||||
size="small"
|
||||
@click="rotateRight()"
|
||||
></el-button>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 2, offset: 6 }" :md="2">
|
||||
</el-col> -->
|
||||
<el-col :lg="{ span: 2, offset: 20 }" :md="2">
|
||||
<el-button type="primary" size="small" @click="uploadImg()"
|
||||
>提 交</el-button
|
||||
>
|
||||
@ -112,12 +133,16 @@
|
||||
<script>
|
||||
import { VueCropper } from "vue-cropper";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
import { updateNurseStationHeads, posts } from "@/api/system/stationAvatar.js";
|
||||
import {
|
||||
updateNurseStationHeads,
|
||||
posts,
|
||||
updatePoserHeads,
|
||||
} from "@/api/system/stationAvatar.js";
|
||||
|
||||
export default {
|
||||
components: { VueCropper },
|
||||
|
||||
props: ["img", "type", "item"],
|
||||
props: ["img", "type", "item", "tovideo"],
|
||||
data() {
|
||||
return {
|
||||
imageUrl: "",
|
||||
@ -127,7 +152,7 @@ export default {
|
||||
// 是否显示cropper
|
||||
visible: false,
|
||||
// 弹出层标题
|
||||
title: "上传头像",
|
||||
title: "上传图片/视频",
|
||||
options: {
|
||||
img: null, //裁剪图片的地址
|
||||
autoCrop: true, // 是否默认生成截图框
|
||||
@ -137,11 +162,26 @@ export default {
|
||||
},
|
||||
previews: {},
|
||||
items: {},
|
||||
//显示上传按钮
|
||||
videoForm: {
|
||||
showVideoPath: null, //回显的变量
|
||||
},
|
||||
video: {
|
||||
VideoPath: null, //回显的变量
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.types = this.type;
|
||||
this.items = this.item;
|
||||
if (this.tovideo == null) {
|
||||
this.video.VideoPath = null;
|
||||
} else if (this.tovideo == "") {
|
||||
this.video.VideoPath = null;
|
||||
} else {
|
||||
this.video.VideoPath = baseurl + this.tovideo;
|
||||
}
|
||||
console.log(this.video);
|
||||
if (this.img == null) {
|
||||
this.options.img = null;
|
||||
} else if (this.img == "") {
|
||||
@ -149,8 +189,16 @@ export default {
|
||||
} else {
|
||||
this.options.img = baseurl + this.img;
|
||||
}
|
||||
if (this.types == "posterVideoUrl") {
|
||||
this.title = "上传视频";
|
||||
} else {
|
||||
this.title = "上传图片";
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tovideo: {
|
||||
handler(newimg, oldimg) {},
|
||||
},
|
||||
item: {
|
||||
handler(newimg, oldimg) {
|
||||
this.items = this.item;
|
||||
@ -199,6 +247,16 @@ export default {
|
||||
},
|
||||
// 上传预处理
|
||||
beforeUpload(file) {
|
||||
if (this.types == "posterVideoUrl") {
|
||||
const reader = new FileReader();
|
||||
this.previews.data = file;
|
||||
this.previews.url = URL.createObjectURL(file);
|
||||
this.videoForm.showVideoPath = URL.createObjectURL(file);
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = () => {
|
||||
// this.options.img = reader.result;
|
||||
};
|
||||
} else {
|
||||
if (file.type.indexOf("image/") == -1) {
|
||||
this.$modal.msgError(
|
||||
"文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
||||
@ -212,27 +270,49 @@ export default {
|
||||
// this.options.img = reader.result;
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上传图片
|
||||
uploadImg() {
|
||||
let formData = new FormData();
|
||||
if (this.previews.data) {
|
||||
formData.append("file", this.previews.data);
|
||||
formData.append("type", this.types);
|
||||
if (this.types == "posterVideoUrl") {
|
||||
updatePoserHeads(formData).then((response) => {
|
||||
this.video.VideoPath = baseurl + response.imgUrl;
|
||||
this.$emit("imgUrl", response.imgUrl);
|
||||
this.openimg = false;
|
||||
});
|
||||
} else {
|
||||
updateNurseStationHeads(formData).then((response) => {
|
||||
this.options.img = baseurl + response.imgUrl;
|
||||
this.$emit("imgUrl", response.imgUrl);
|
||||
console.log(this.items);
|
||||
console.log(this.types);
|
||||
if (this.types == "attributePitureUrl") {
|
||||
this.items.attributePitureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
if (this.types == "nurseItemClassifyUrl") {
|
||||
this.items.classifyPictureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
if (this.types == "nurseStationClassifyUrl") {
|
||||
this.items.classifyPictureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
if (this.types == "posterPictureUrl") {
|
||||
this.items.posterPictureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
this.openimg = false;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.openimg = false;
|
||||
}
|
||||
},
|
||||
// 实时预览
|
||||
realTime(data) {
|
||||
console.log(data);
|
||||
this.previews = data;
|
||||
},
|
||||
// 关闭窗口
|
||||
@ -244,6 +324,12 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.title {
|
||||
position: absolute;
|
||||
bottom: 5%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0%);
|
||||
}
|
||||
.avatar-upload-preview {
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
@ -258,8 +344,9 @@ export default {
|
||||
.user-info-head {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: 120px;
|
||||
background: #fafafa;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.user-info-head:hover:after {
|
||||
@ -279,4 +366,12 @@ export default {
|
||||
line-height: 110px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.wihi {
|
||||
background-color: #fff;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.wihi:hover:after {
|
||||
transform: translate(50%, 50%);
|
||||
}
|
||||
</style>
|
||||
551
src/views/system/stationClassify/index.vue
Normal file
551
src/views/system/stationClassify/index.vue
Normal file
@ -0,0 +1,551 @@
|
||||
<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.number="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="800px"
|
||||
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
|
||||
maxLength="30"
|
||||
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.number="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="请输入分类名称"
|
||||
maxLength="30"
|
||||
/>
|
||||
</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.number="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>
|
||||
@ -10,6 +10,7 @@
|
||||
>
|
||||
<el-form-item label="护理站名称" prop="">
|
||||
<el-select
|
||||
@change="handleQuery"
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user