专病筛查列表 服务项目
This commit is contained in:
parent
6f1677c171
commit
be9a570e5f
122
src/api/system/Specializedlist.js
Normal file
122
src/api/system/Specializedlist.js
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
//患者管理
|
||||||
|
export function thList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/screening/record/screeningList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//评估字典
|
||||||
|
export function business() {
|
||||||
|
return request({
|
||||||
|
url: '/business/assessdic/list',
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//终止
|
||||||
|
export function zzg(query) {
|
||||||
|
return request({
|
||||||
|
url: '/business/patient/terminateManage',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//筛查时间轴
|
||||||
|
export function timelineList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/screening/timelineList/' + data,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 风险评估记录保存
|
||||||
|
export function saveRate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/register/updateManage',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 筛查保存
|
||||||
|
export function projectRecordypdata(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/screening/record/update',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//筛查时间轴
|
||||||
|
export function screening(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/screening/record/detail/' + data,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取预约项目列表
|
||||||
|
export function projecttList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/screening/project/getList',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 登记
|
||||||
|
export function receivescreening(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/screening/record/receive/' + data,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查看
|
||||||
|
export function viewfiled(filePath) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/screening/record/fileview?filePath=${filePath}`,
|
||||||
|
method: 'get',
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取机构
|
||||||
|
export function getOrgnList() {
|
||||||
|
return request({
|
||||||
|
url: '/system/hospital/getList',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 查询角色详细
|
||||||
|
export function getRole(roleId) {
|
||||||
|
return request({
|
||||||
|
url: '/system/role/' + roleId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 角色状态修改
|
||||||
|
export function changeRoleStatus(roleId, status) {
|
||||||
|
const data = {
|
||||||
|
roleId,
|
||||||
|
status
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url: '/system/role/changeStatus',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 根据角色ID查询部门树结构
|
||||||
|
export function deptTreeSelect(roleId) {
|
||||||
|
return request({
|
||||||
|
url: '/system/role/deptTree/' + roleId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
43
src/api/system/serveItemManage.js
Normal file
43
src/api/system/serveItemManage.js
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取服务项目列表
|
||||||
|
export function getServerlist(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/screening/project/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取对应机构树
|
||||||
|
export function getOrgTree() {
|
||||||
|
return request({
|
||||||
|
url: '/system/hospital/getList',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增服务项目
|
||||||
|
export function addProject(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/screening/project/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改服务项目
|
||||||
|
export function changeProject(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/screening/project/update',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除服务项目
|
||||||
|
export function delProject(projectId) {
|
||||||
|
return request({
|
||||||
|
url: `/system/screening/project/delete/${projectId}`,
|
||||||
|
method: 'post',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
3105
src/views/system/Specializedlist/index.vue
Normal file
3105
src/views/system/Specializedlist/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
851
src/views/system/serveItemManage/index.vue
Normal file
851
src/views/system/serveItemManage/index.vue
Normal file
@ -0,0 +1,851 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
>
|
||||||
|
<el-form-item label="项目名称" prop="projectName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.projectName"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="服务提供" prop="provider">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.provider"
|
||||||
|
placeholder="服务提供"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in providerList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="所属机构" prop="hospitalId" label-width="100">
|
||||||
|
<treeselect
|
||||||
|
v-model="queryParams.hospitalId"
|
||||||
|
:options="deptOptions"
|
||||||
|
:normalizer="normalizer"
|
||||||
|
placeholder="选择所属机构"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否启用" prop="status">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.status"
|
||||||
|
placeholder="是否启用"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in statusList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间">
|
||||||
|
<el-date-picker
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期"
|
||||||
|
v-model="queryParams.createTime"
|
||||||
|
style="width: 100%"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
></el-date-picker>
|
||||||
|
</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"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
@click="amendFun(scope.row)"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
@click="delet(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain size="mini" @click="setDetail"
|
||||||
|
>设置明细</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-if="refreshTable"
|
||||||
|
v-loading="loading"
|
||||||
|
:data="deptList"
|
||||||
|
@row-click="getRowData"
|
||||||
|
:default-expand-all="isExpandAll"
|
||||||
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
|
>
|
||||||
|
<el-table-column align="center" width="35">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- 可以手动的修改label的值,从而控制选择哪一项 -->
|
||||||
|
<el-radio
|
||||||
|
class="radio"
|
||||||
|
v-model="templateSelection"
|
||||||
|
:label="scope.row.id"
|
||||||
|
>{{
|
||||||
|
}}</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" prop="projectName" label="项目类型">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- <div v-if="scope.row.projectType == '1'">检查项目</div>
|
||||||
|
<div v-if="scope.row.projectType == '2'">套餐项目</div> -->
|
||||||
|
|
||||||
|
<div v-if="scope.row.projectType == '1'">检查项目</div>
|
||||||
|
<div v-if="scope.row.projectType == '2'">套餐项目</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="projectId"
|
||||||
|
label="项目编号"
|
||||||
|
></el-table-column> -->
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="projectName"
|
||||||
|
label="项目名称"
|
||||||
|
></el-table-column>
|
||||||
|
<!-- <el-table-column align="center" prop="provider" label="服务提供">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div v-if="scope.row.provider == '1'">三高之家</div>
|
||||||
|
<div v-if="scope.row.provider == '2'">三高基地</div>
|
||||||
|
<div v-if="scope.row.provider == '3'">三高中心</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column align="center" prop="hospitalName" label="所属机构">
|
||||||
|
<!-- <template slot-scope="scope">
|
||||||
|
{{ scope.row.dept.deptName }}
|
||||||
|
</template> -->
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="price"
|
||||||
|
label="单价(元/次)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="discount"
|
||||||
|
label="折扣"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="是否启用" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.status"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
@change="switchChange(scope.row)"
|
||||||
|
inactive-value="1"
|
||||||
|
active-value="0"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="createTime"
|
||||||
|
label="创建时间"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="amendFun(scope.row)"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
>删除</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="amendStatus"
|
||||||
|
center
|
||||||
|
width="900px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="RowData"
|
||||||
|
:model="RowData"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" v-if="RowData.hospitalId !== 0">
|
||||||
|
<el-form-item label="所属机构" prop="hospitalId">
|
||||||
|
<treeselect
|
||||||
|
v-model="RowData.hospitalId"
|
||||||
|
:options="deptOptions"
|
||||||
|
:normalizer="normalizer"
|
||||||
|
placeholder="选择上级部门"
|
||||||
|
@select="changetreeselect"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item
|
||||||
|
label="项目名称"
|
||||||
|
label-width="100px"
|
||||||
|
prop="projectName"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
maxlength="30"
|
||||||
|
v-model="RowData.projectName"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item
|
||||||
|
label="项目类型"
|
||||||
|
label-width="100px"
|
||||||
|
prop="projectType"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="RowData.projectType"
|
||||||
|
placeholder="套餐项目"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in TypeList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10" v-if="RowData.hospitalId !== 0"> </el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="单价(元)" prop="price">
|
||||||
|
<el-input
|
||||||
|
type="number"
|
||||||
|
style="width: 200px"
|
||||||
|
v-model="RowData.price"
|
||||||
|
placeholder="请输入单价(元)"
|
||||||
|
oninput="if (value.indexOf('.') > 0) { value = value.slice(0, value.indexOf('.') + 3)} if (value.length > 8) { value = value.slice(0, 8) }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="折扣" prop="discount">
|
||||||
|
<el-input
|
||||||
|
type="number"
|
||||||
|
max="10"
|
||||||
|
min="1"
|
||||||
|
v-model="RowData.discount"
|
||||||
|
placeholder="请输入折扣"
|
||||||
|
oninput="value=value.replace(/^0|[^0-9]/g,'')"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否启用" prop="status">
|
||||||
|
<el-select
|
||||||
|
v-model="RowData.status"
|
||||||
|
placeholder="是否启用"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in statusList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="elDialogData(diaQuery)"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
title="服务项目明细"
|
||||||
|
center
|
||||||
|
:visible.sync="detailsVisible"
|
||||||
|
destroy-on-close
|
||||||
|
>
|
||||||
|
<project-details
|
||||||
|
:PDList="PDList"
|
||||||
|
:projectId="RowData.projectId"
|
||||||
|
></project-details>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
addDept,
|
||||||
|
|
||||||
|
} from "@/api/system/dept";
|
||||||
|
import {
|
||||||
|
getServerlist,
|
||||||
|
getOrgTree,
|
||||||
|
changeStatus,
|
||||||
|
changeProject,
|
||||||
|
addProject,
|
||||||
|
delProject,
|
||||||
|
getProDetilList,
|
||||||
|
} from "@/api/system/serveItemManage";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Dept",
|
||||||
|
dicts: ["sys_normal_disable"],
|
||||||
|
components: { Treeselect },
|
||||||
|
data() {
|
||||||
|
var checkMaxVal = (rule, value, callback) => {
|
||||||
|
console.log(value)
|
||||||
|
// if(!value){
|
||||||
|
// callback(new Error('折扣不能为空'));
|
||||||
|
|
||||||
|
// }
|
||||||
|
if (value > 10) {
|
||||||
|
callback(new Error('折扣最大为10,请正确输入'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
|
||||||
|
|
||||||
|
statusList: [
|
||||||
|
{
|
||||||
|
label: "启用",
|
||||||
|
value: "0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "未启用",
|
||||||
|
value: "1",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// providerList: [
|
||||||
|
// {
|
||||||
|
// label: "三高之家",
|
||||||
|
// value: "1",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: "三高基地",
|
||||||
|
// value: "2",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: "三高中心",
|
||||||
|
// value: "3",
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
TypeList: [
|
||||||
|
{
|
||||||
|
label: "检查项目",
|
||||||
|
value: "1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "套餐项目",
|
||||||
|
value: "2",
|
||||||
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
PDList: [],
|
||||||
|
// 修改弹出层的显示状态
|
||||||
|
amendStatus: false,
|
||||||
|
detailsVisible: false,
|
||||||
|
// 判断是否选中
|
||||||
|
templateSelection: "",
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 表格树数据
|
||||||
|
deptList: [],
|
||||||
|
// 部门树选项
|
||||||
|
deptOptions: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 是否展开,默认全部展开
|
||||||
|
isExpandAll: true,
|
||||||
|
// 重新渲染表格状态
|
||||||
|
refreshTable: true,
|
||||||
|
deptOptions1: "",
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
createBy: undefined,
|
||||||
|
createTime: undefined,
|
||||||
|
hospitalId: undefined,
|
||||||
|
hospitalName: undefined,
|
||||||
|
discount: undefined,
|
||||||
|
orderNum: undefined,
|
||||||
|
price: undefined,
|
||||||
|
projectId: undefined,
|
||||||
|
provider: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
searchValue: undefined,
|
||||||
|
status: undefined,
|
||||||
|
updateBy: undefined,
|
||||||
|
updateTime: undefined,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
// 某一行的数据
|
||||||
|
RowData: {
|
||||||
|
hospitalId: "",
|
||||||
|
hospitalName: "",
|
||||||
|
projectName: "",
|
||||||
|
provider: "",
|
||||||
|
price: "",
|
||||||
|
discount: "",
|
||||||
|
status: "",
|
||||||
|
orderNum: "",
|
||||||
|
serviceContent: "",
|
||||||
|
projectType: "",
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
total: 0,
|
||||||
|
diaQuery: "",
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
hospitalId: [
|
||||||
|
{ required: true, message: "上级部门不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
projectName: [
|
||||||
|
{ required: true, message: "项目名称不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
projectType: [
|
||||||
|
{ required: true, message: "项目类型不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
// price: [
|
||||||
|
// {
|
||||||
|
// required: true,
|
||||||
|
// message: "单价不能为空",
|
||||||
|
// trigger: "blur",
|
||||||
|
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
discount: [
|
||||||
|
{ message: "", trigger: "blur", validator: checkMaxVal, },
|
||||||
|
],
|
||||||
|
// status: [
|
||||||
|
// { required: true, message: "是否有效不能为空", trigger: "blur" },
|
||||||
|
// ],
|
||||||
|
|
||||||
|
phone: [
|
||||||
|
{
|
||||||
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||||
|
message: "请输入正确的手机号码",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
getOrgTree().then((res) => {
|
||||||
|
this.deptOptions = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
"RowData.hospitalId": {
|
||||||
|
deep: true,
|
||||||
|
handler: function (val) {
|
||||||
|
this.getTreeItem(this.deptOptions, val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changetreeselect(e){
|
||||||
|
this.RowData.hospitalName=e.hospitalName
|
||||||
|
this.RowData.hospitalId=e.hospitalId
|
||||||
|
console.log(e,'999')
|
||||||
|
|
||||||
|
},
|
||||||
|
getTreeItem(data, id) {
|
||||||
|
console.log(data)
|
||||||
|
|
||||||
|
data.map((item) => {
|
||||||
|
|
||||||
|
if (item.id == id) {
|
||||||
|
this.deptOptions1 = item.label;
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
if (item.children) {
|
||||||
|
this.getTreeItem(item.children, id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete(row) {
|
||||||
|
console.log(row)
|
||||||
|
const _this = this;
|
||||||
|
// if (!this.templateSelection) {
|
||||||
|
// this.$message({
|
||||||
|
// message: "请选择一条数据",
|
||||||
|
// type: "error",
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
this.$confirm("此操作将删除本条数据, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
delProject(row.projectId).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "删除成功!",
|
||||||
|
});
|
||||||
|
_this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: "info",
|
||||||
|
message: "已取消删除",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
getpdList(id) {
|
||||||
|
getProDetilList(id).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.PDList = res.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 设置明细方法
|
||||||
|
setDetail() {
|
||||||
|
if (!this.templateSelection) {
|
||||||
|
this.$message({
|
||||||
|
message: "请选择一条数据",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.getpdList(this.RowData.projectId);
|
||||||
|
this.detailsVisible = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 启用禁用状态
|
||||||
|
switchChange(e) {
|
||||||
|
this.startForbidden(e);
|
||||||
|
},
|
||||||
|
// 启用/禁用
|
||||||
|
startForbidden(row) {
|
||||||
|
let text = row.status === "0" ? "启用" : "禁用";
|
||||||
|
let a = {
|
||||||
|
status: row.status
|
||||||
|
}
|
||||||
|
this.$modal.confirm('此操作将' + text + '状态,是否继续?')
|
||||||
|
.then(() => {
|
||||||
|
changeStatus(row).then((res) => {
|
||||||
|
this.$modal.msgSuccess(text + "成功");
|
||||||
|
this.getList()
|
||||||
|
// this.$message({
|
||||||
|
// type: "success",
|
||||||
|
// message: "启用成功!",
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(function () {
|
||||||
|
row.status = row.status === "0" ? "1" : "0";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// startForbidden(e) {
|
||||||
|
// if (e.status == "0") {
|
||||||
|
// this.$confirm("此操作将启用状态, 是否继续?", "提示", {
|
||||||
|
// distinguishCancelAndClose: true,
|
||||||
|
// confirmButtonText: "确定",
|
||||||
|
// cancelButtonText: "取消",
|
||||||
|
// type: "warning",
|
||||||
|
// })
|
||||||
|
// .then(() => {
|
||||||
|
// changeStatus(e).then((res) => {
|
||||||
|
// this.$message({
|
||||||
|
// type: "success",
|
||||||
|
// message: "启用成功!",
|
||||||
|
// });
|
||||||
|
// this.getList()
|
||||||
|
// });
|
||||||
|
// })
|
||||||
|
// .catch((action) => {
|
||||||
|
// console.log("action", action);
|
||||||
|
// if (action == "cancel" || action == "close") {
|
||||||
|
// this.$message({
|
||||||
|
// type: "info",
|
||||||
|
// message:
|
||||||
|
// action === "cancel" || "close"
|
||||||
|
// ? (e.status = "1") + "已取消启用"
|
||||||
|
// : (e.status = "0"),
|
||||||
|
// // message: "已取消启用",
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// this.$confirm("此操作将禁用状态, 是否继续?", "提示", {
|
||||||
|
// distinguishCancelAndClose: true,
|
||||||
|
// confirmButtonText: "确定",
|
||||||
|
// cancelButtonText: "取消",
|
||||||
|
// type: "warning",
|
||||||
|
// })
|
||||||
|
// .then(() => {
|
||||||
|
// changeStatus(e).then((res) => {
|
||||||
|
// this.$message({
|
||||||
|
// type: "success",
|
||||||
|
// message: "禁用成功!",
|
||||||
|
// });
|
||||||
|
// this.getList()
|
||||||
|
// });
|
||||||
|
// })
|
||||||
|
// .catch((action) => {
|
||||||
|
// if (action == "cancel" || action == "close") {
|
||||||
|
// this.$message({
|
||||||
|
// type: "info",
|
||||||
|
// message:
|
||||||
|
// action === "cancel" || "close"
|
||||||
|
// ? (e.status = "0") + "已取消禁用"
|
||||||
|
// : (e.status = "1"),
|
||||||
|
// // message: "已取消启用",
|
||||||
|
// });
|
||||||
|
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
|
||||||
|
// 获取某一行的数据
|
||||||
|
getRowData(row) {
|
||||||
|
// console.log(row);
|
||||||
|
},
|
||||||
|
/** 查询部门列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getServerlist(this.queryParams).then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.deptList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 添加弹出层
|
||||||
|
handleAdd() {
|
||||||
|
this.deptOptions1 = "";
|
||||||
|
this.amendStatus = true;
|
||||||
|
this.RowData = {};
|
||||||
|
// this.reset()
|
||||||
|
this.diaQuery = 1;
|
||||||
|
this.title = "新增服务项目";
|
||||||
|
},
|
||||||
|
// 弹出修改弹出层
|
||||||
|
amendFun(row) {
|
||||||
|
console.log(row)
|
||||||
|
this.reset()
|
||||||
|
this.getList()
|
||||||
|
this.RowData = row;
|
||||||
|
// this.deptOptions1 = row.deptName;
|
||||||
|
// this.RowData = {};
|
||||||
|
// if (!this.templateSelection) {
|
||||||
|
// this.$message({
|
||||||
|
// message: "请选择一条数据",
|
||||||
|
// type: "error",
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
this.amendStatus = true;
|
||||||
|
this.diaQuery = 2;
|
||||||
|
this.title = "修改服务项目";
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
/** 转换部门数据结构 */
|
||||||
|
normalizer(node) {
|
||||||
|
console.log(node,'9999')
|
||||||
|
// if (node.children && !node.children.length) {
|
||||||
|
// delete node.children;
|
||||||
|
// }
|
||||||
|
// console.log(node);
|
||||||
|
return {
|
||||||
|
id: node.id,
|
||||||
|
label: node.hospitalName,
|
||||||
|
children: node.children,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
// this.open = false;
|
||||||
|
this.reset();
|
||||||
|
this.amendStatus = false;
|
||||||
|
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
projectName: undefined,
|
||||||
|
provider: undefined,
|
||||||
|
hospitalId: undefined,
|
||||||
|
createTime: undefined,
|
||||||
|
status: undefined,
|
||||||
|
};
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.RowData = {
|
||||||
|
hospitalId: "",
|
||||||
|
hospitalName: "",
|
||||||
|
projectName: "",
|
||||||
|
provider: "",
|
||||||
|
price: "",
|
||||||
|
discount: "",
|
||||||
|
status: "",
|
||||||
|
orderNum: "",
|
||||||
|
serviceContent: "",
|
||||||
|
projectType: "",
|
||||||
|
};
|
||||||
|
this.resetForm("RowData");
|
||||||
|
},
|
||||||
|
/** 展开/折叠操作 */
|
||||||
|
toggleExpandAll() {
|
||||||
|
this.refreshTable = false;
|
||||||
|
this.isExpandAll = !this.isExpandAll;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.refreshTable = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
|
||||||
|
/** 提交按钮添加 */
|
||||||
|
submitForm: function () {
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// if (!this.form.deptId) {
|
||||||
|
|
||||||
|
// } else {
|
||||||
|
this.form.delFlag = "0";
|
||||||
|
addDept(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.amendStatus = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 修改确定
|
||||||
|
elDialogData(e) {
|
||||||
|
this.$refs["RowData"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (e == 2) {
|
||||||
|
// this.RowData.deptName = this.deptOptions1;
|
||||||
|
this.RowData.delFlag = "0";
|
||||||
|
changeProject(this.RowData).then((response) => {
|
||||||
|
console.log(response);
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.amendStatus = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// this.RowData.deptName = this.deptOptions1;
|
||||||
|
addProject(this.RowData).then((response) => {
|
||||||
|
console.log(response);
|
||||||
|
this.$modal.msgSuccess("添加成功");
|
||||||
|
this.amendStatus = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.vue-treeselect {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user