修改
This commit is contained in:
parent
a66e7a218f
commit
e2ffa2e08a
@ -3,41 +3,47 @@ import request from '@/utils/request'
|
||||
|
||||
// 获取服务项目列表
|
||||
export function getServerlist(query) {
|
||||
return request({
|
||||
url: '/system/screening/project/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获取对应机构树
|
||||
return request({
|
||||
url: '/system/screening/project/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获取对应机构树
|
||||
export function getOrgTree() {
|
||||
return request({
|
||||
url: '/system/hospital/getList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 新增服务项目
|
||||
return request({
|
||||
url: '/system/hospital/getList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 新增服务项目
|
||||
export function addProject(data) {
|
||||
return request({
|
||||
url: '/system/screening/project/add',
|
||||
method: 'post',
|
||||
data: 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
|
||||
})
|
||||
}
|
||||
// 删除服务项目
|
||||
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',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return request({
|
||||
url: `/system/screening/project/delete/${projectId}`,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
//修改启用状态
|
||||
export function changeStatus(data) {
|
||||
return request({
|
||||
url: `/system/screening/project/changeStatus`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ export function listStation(query) {
|
||||
// 查询护理站信息详细
|
||||
export function getStation(id) {
|
||||
return request({
|
||||
url: '/system/station/' + id,
|
||||
url: '/system/station/find/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@ -63,10 +63,12 @@ service.interceptors.request.use(config => {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (witch == '1' && config.method == 'post' && config.url != "/logout" && config.url != '/system/station/updateNurseStationHeads') {
|
||||
if (witch == '1' && config.method == 'post' && config.url != "/logout" && config.url != '/system/station/updateNurseStationHeads'
|
||||
&& config.url != '/system/poser/updatePoserHeads' && config.url != '/system/trainingCategory/uploadTrainingCategoryPicture'
|
||||
&& config.url != '/system/trainingItem/uploadUrl' && config.url != '/system/trainingItem/uploadVideoUrl'
|
||||
) {
|
||||
config.data = encrypt(JSON.stringify(config.data))
|
||||
}
|
||||
console.log(configtwo)
|
||||
return config
|
||||
}, error => {
|
||||
Promise.reject(error)
|
||||
@ -74,11 +76,19 @@ service.interceptors.request.use(config => {
|
||||
|
||||
// 响应拦截器
|
||||
service.interceptors.response.use(res => {
|
||||
if (witch == '1' && res.config.url != "/logout" && res.config.url != "/getInfo" && res.config.url != '/system/station/updateNurseStationHeads') {
|
||||
res.data = decrypt(res.data)
|
||||
res.data = JSON.parse(res.data)
|
||||
if (witch == '1') {
|
||||
const url = res.config.url.split('?')[0]
|
||||
const urltwo = url.split('/')
|
||||
const urls = '/' + urltwo[1] + '/' + urltwo[2] + '/' + urltwo[3] + '/'
|
||||
if (url != "/logout" && url != "/getInfo" && url != '/system/station/updateNurseStationHeads'
|
||||
&& urls != '/system/station/find/' && url != '/system/poser/updatePoserHeads'
|
||||
&& url != '/system/trainingCategory/uploadTrainingCategoryPicture'
|
||||
&& url != '/system/trainingItem/uploadUrl' && url != '/system/trainingItem/uploadVideoUrl'
|
||||
) {
|
||||
res.data = decrypt(res.data)
|
||||
res.data = JSON.parse(res.data)
|
||||
}
|
||||
}
|
||||
console.log(res.data)
|
||||
// 未设置状态码则默认成功状态
|
||||
const code = res.data.code || 200;
|
||||
// 获取错误信息
|
||||
@ -109,6 +119,7 @@ service.interceptors.response.use(res => {
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
console.log(res.data)
|
||||
return res.data & Promise.reject(new Error(msg))
|
||||
} else if (code === 600) {
|
||||
return Promise.reject(new Error(msg))
|
||||
|
||||
@ -14,42 +14,21 @@
|
||||
/>
|
||||
</div>-->
|
||||
<div class="head-container" style="height: 580px; width: 100%">
|
||||
<el-tree
|
||||
node-key="id"
|
||||
:default-expanded-keys="[0]"
|
||||
class="flow-tree"
|
||||
:data="deptOptions"
|
||||
:props="defaultProps"
|
||||
@node-click="handleNodeClick"
|
||||
@node-expand="handleNodeClick"
|
||||
></el-tree>
|
||||
<el-tree node-key="id" :default-expanded-keys="[0]" class="flow-tree" :data="deptOptions"
|
||||
:props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeClick"></el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--用户数据-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="100px">
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||
<el-input
|
||||
v-model="queryParams.goodsCategoryName"
|
||||
placeholder="请输入商品分类名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.goodsCategoryName" placeholder="请输入商品分类名称" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类编码" prop="goodsCategoryCode">
|
||||
<el-input
|
||||
v-model="queryParams.goodsCategoryCode"
|
||||
placeholder="请输入商品分类编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.goodsCategoryCode" placeholder="请输入商品分类编码" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="显示顺序" prop="sort">
|
||||
<el-input
|
||||
@ -66,36 +45,16 @@
|
||||
</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:goodsCategory:add']"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['system:goodsCategory: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:goodsCategory:edit']"
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['system:goodsCategory: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:goodsCategory:remove']"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['system:goodsCategory:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
@ -111,77 +70,34 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="goodsCategoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table v-loading="loading" :data="goodsCategoryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
:show-overflow-tooltip="true"
|
||||
label="商品分类名称"
|
||||
align="center"
|
||||
prop="goodsCategoryName"
|
||||
/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="商品分类名称" align="center" prop="goodsCategoryName" />
|
||||
<el-table-column label="商品分类编码" align="center" prop="goodsCategoryCode" />
|
||||
<!-- <el-table-column label="商品分类图片地址" align="center" prop="goodsCategoryPicture" /> -->
|
||||
<el-table-column
|
||||
label="分类概述"
|
||||
align="center"
|
||||
prop="categoryRemark"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="分类概述" align="center" prop="categoryRemark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="显示顺序" align="center" prop="sort" />
|
||||
<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:goodsCategory:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:goodsCategory:remove']"
|
||||
>删除</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:goodsCategory:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:goodsCategory: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"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改商品分类信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="500px"
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
v-if="open"
|
||||
>
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :before-close="cancel" v-if="open">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="父级分类名称" prop="parentName">
|
||||
<el-cascader
|
||||
:props="treeOption"
|
||||
@change="change"
|
||||
style="width: 340px"
|
||||
:show-all-levels="false"
|
||||
ref="cascader"
|
||||
:placeholder="form.parentName ? form.parentName : '商品主分类'"
|
||||
:key="isResouceShow"
|
||||
></el-cascader>
|
||||
<el-cascader :props="treeOption" @change="change" style="width: 340px" :show-all-levels="false" ref="cascader"
|
||||
:placeholder="form.parentName ? form.parentName : '商品主分类'" :key="isResouceShow"></el-cascader>
|
||||
<!-- <el-input
|
||||
v-model="form.parentName"
|
||||
placeholder="请输入父级分类名称"
|
||||
@ -200,23 +116,15 @@
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="商品分类图片" prop="goodsCategoryPicture">
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
:img="form.goodsCategoryPicture"
|
||||
:type="'goodsCategoryPicture'"
|
||||
/>
|
||||
<stationAcatar @imgUrl="imgUrl" :img="form.goodsCategoryPicture" :type="'goodsCategoryPicture'" />
|
||||
<!-- <img :src="form.goodsCategoryPicture" alt="" /> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="分类概述" prop="categoryRemark">
|
||||
<el-input v-model="form.categoryRemark" placeholder="请输入分类概述" maxlength="300" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" prop="sort">
|
||||
<el-input
|
||||
v-model="form.sort"
|
||||
maxlength="9"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
placeholder="请输入显示顺序(只能输入数字)"
|
||||
/>
|
||||
<el-input v-model="form.sort" maxlength="9" oninput="value=value.replace(/[^\d]/g,'')"
|
||||
placeholder="请输入显示顺序(只能输入数字)" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -442,7 +350,7 @@ export default {
|
||||
}
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then(res => {});
|
||||
updatePicture(obj).then(res => { });
|
||||
}
|
||||
this.open = false;
|
||||
this.reset();
|
||||
@ -528,7 +436,7 @@ export default {
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then(res => {});
|
||||
updatePicture(obj).then(res => { });
|
||||
}
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
@ -557,20 +465,21 @@ export default {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除?")
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return delGoodsCategory(ids);
|
||||
})
|
||||
.then(() => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.goodsCategoryPicture);
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then(res => {});
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.goodsCategoryPicture);
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then(res => { });
|
||||
}
|
||||
}
|
||||
this.getList();
|
||||
this.info();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
@ -592,15 +501,15 @@ export default {
|
||||
::v-deep .el-cascader .el-input input::-webkit-input-placeholder {
|
||||
color: black;
|
||||
}
|
||||
|
||||
::v-deep .el-tree {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
::v-deep .el-tree > .el-tree-node {
|
||||
::v-deep .el-tree>.el-tree-node {
|
||||
display: inline-block;
|
||||
min-width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user