Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zhongtai-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
chenweiping
zhongtai-ui
Commits
040424db
提交
040424db
authored
5月 09, 2022
作者:
chenweiping
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
0510
上级
b334dcec
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
54 行增加
和
29 行删除
+54
-29
hospital.js
src/api/backstage/hospital.js
+2
-2
index.vue
src/views/backstage/hospital/index.vue
+52
-27
没有找到文件。
src/api/backstage/hospital.js
浏览文件 @
040424db
...
@@ -53,10 +53,10 @@ export function exportHospital(query) {
...
@@ -53,10 +53,10 @@ export function exportHospital(query) {
}
}
// 状态修改
// 状态修改
export
function
changeStatus
(
id
,
status
)
{
export
function
changeStatus
(
id
,
isEnable
)
{
const
data
=
{
const
data
=
{
id
,
id
,
status
isEnable
}
}
return
request
({
return
request
({
url
:
'/backstage/hospital/changeStatus'
,
url
:
'/backstage/hospital/changeStatus'
,
...
...
src/views/backstage/hospital/index.vue
浏览文件 @
040424db
...
@@ -10,18 +10,18 @@
...
@@ -10,18 +10,18 @@
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"
status
"
>
<el-form-item
label=
"状态"
prop=
"
isEnable
"
>
<el-select
<el-select
v-model=
"queryParams.
status
"
v-model=
"queryParams.
isEnable
"
placeholder=
"状态"
placeholder=
"状态"
clearable
clearable
size=
"small"
size=
"small"
>
>
<el-option
<el-option
v-for=
"
dict in status
Options"
v-for=
"
item in isEnable
Options"
:key=
"
dict.dictV
alue"
:key=
"
item.v
alue"
:label=
"
dict.dictL
abel"
:label=
"
item.l
abel"
:value=
"
dict.dictV
alue"
:value=
"
item.v
alue"
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -41,6 +41,14 @@
...
@@ -41,6 +41,14 @@
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"省市区"
>
<el-cascader
size=
"large"
:options=
"options"
ref=
"cascader"
@
change=
"handleProvinceChange"
>
</el-cascader>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"cyan"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
type=
"cyan"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
...
@@ -111,9 +119,9 @@
...
@@ -111,9 +119,9 @@
<el-table-column
label=
"状态"
align=
"center"
>
<el-table-column
label=
"状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-switch
<el-switch
v-model=
"scope.row.
status
"
v-model=
"scope.row.
isEnable
"
active-value=
"0
"
:active-value=
"1
"
inactive-value=
"1
"
:inactive-value=
"0
"
@
change=
"handleStatusChange(scope.row)"
@
change=
"handleStatusChange(scope.row)"
></el-switch>
></el-switch>
</
template
>
</
template
>
...
@@ -209,7 +217,6 @@
...
@@ -209,7 +217,6 @@
ref=
"cascader"
ref=
"cascader"
@
change=
"handleChange"
>
@
change=
"handleChange"
>
</el-cascader>
</el-cascader>
</el-form-item>
</el-form-item>
<el-form-item
label=
"医院地址"
prop=
"addr"
>
<el-form-item
label=
"医院地址"
prop=
"addr"
>
<el-input
v-model=
"form.addr"
placeholder=
"请输入医院地址"
/>
<el-input
v-model=
"form.addr"
placeholder=
"请输入医院地址"
/>
...
@@ -234,13 +241,13 @@
...
@@ -234,13 +241,13 @@
<el-form-item
label=
"微信号"
prop=
"wechat"
>
<el-form-item
label=
"微信号"
prop=
"wechat"
>
<el-input
v-model=
"form.wechat"
placeholder=
"请输入微信号"
/>
<el-input
v-model=
"form.wechat"
placeholder=
"请输入微信号"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-form-item
label=
"状态"
prop=
"isEnable"
>
<el-radio-group
v-model=
"form.
status
"
>
<el-radio-group
v-model=
"form.
isEnable
"
>
<el-radio
<el-radio
v-for=
"dict in status
Options"
v-for=
"item in isEnable
Options"
:key=
"dict.dictV
alue"
:key=
"item.v
alue"
:label=
"dict.dictV
alue"
:label=
"item.v
alue"
>
{{dict.dictL
abel}}
</el-radio>
>
{{item.l
abel}}
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -290,12 +297,19 @@ export default {
...
@@ -290,12 +297,19 @@ export default {
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
// 状态数据字典
// 状态数据字典
statusOptions
:
[],
isEnableOptions
:
[{
value
:
1
,
label
:
'上架'
},
{
value
:
0
,
label
:
'停用'
}],
//医院分类数据字典
//医院分类数据字典
dataTypeOptions
:
[],
dataTypeOptions
:
[],
options
:
regionDataPlus
,
options
:
regionDataPlus
,
selectedOptions
:
[],
selectedOptions
:
[],
selectedLabelOptions
:
[],
selectedLabelOptions
:
[],
provinceOptions
:
[],
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
...
@@ -328,10 +342,15 @@ export default {
...
@@ -328,10 +342,15 @@ export default {
days
:
null
,
days
:
null
,
isSaturday
:
null
,
isSaturday
:
null
,
isSunday
:
null
,
isSunday
:
null
,
dataType
:
null
dataType
:
null
,
provinceCode
:
''
,
cityNameCode
:
''
,
districtCode
:
''
,
},
},
// 表单参数
// 表单参数
form
:
{},
form
:
{
isEnable
:
1
},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
name
:[
name
:[
...
@@ -360,9 +379,6 @@ export default {
...
@@ -360,9 +379,6 @@ export default {
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getDicts
(
"sys_normal_disable"
).
then
(
response
=>
{
this
.
statusOptions
=
response
.
data
;
});
this
.
getDicts
(
"data_type"
).
then
(
response
=>
{
this
.
getDicts
(
"data_type"
).
then
(
response
=>
{
this
.
dataTypeOptions
=
response
.
data
;
this
.
dataTypeOptions
=
response
.
data
;
});
});
...
@@ -374,9 +390,17 @@ export default {
...
@@ -374,9 +390,17 @@ export default {
this
.
selectedOptions
=
value
;
this
.
selectedOptions
=
value
;
this
.
selectedLabelOptions
=
this
.
$refs
[
"cascader"
].
getCheckedNodes
()[
0
].
pathLabels
;
this
.
selectedLabelOptions
=
this
.
$refs
[
"cascader"
].
getCheckedNodes
()[
0
].
pathLabels
;
},
},
handleProvinceChange
(
value
)
{
this
.
provinceOptions
=
value
;
},
/** 查询【请填写功能名称】列表 */
/** 查询【请填写功能名称】列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
if
(
JSON
.
stringify
(
this
.
provinceOptions
)
!=
'[]'
){
this
.
queryParams
.
provinceCode
=
this
.
provinceOptions
[
0
];
this
.
queryParams
.
cityNameCode
=
this
.
provinceOptions
[
1
];
this
.
queryParams
.
districtCode
=
this
.
provinceOptions
[
2
];
}
listHospital
(
this
.
queryParams
).
then
(
response
=>
{
listHospital
(
this
.
queryParams
).
then
(
response
=>
{
this
.
hospitalList
=
response
.
rows
;
this
.
hospitalList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
...
@@ -420,8 +444,7 @@ export default {
...
@@ -420,8 +444,7 @@ export default {
days
:
null
,
days
:
null
,
isSaturday
:
null
,
isSaturday
:
null
,
isSunday
:
null
,
isSunday
:
null
,
dataType
:
null
,
dataType
:
null
status
:
"0"
};
};
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form"
);
},
},
...
@@ -475,6 +498,8 @@ export default {
...
@@ -475,6 +498,8 @@ export default {
})
})
this
.
images1
=
iList
this
.
images1
=
iList
}
}
this
.
selectedOptions
=
[];
this
.
selectedLabelOptions
=
[];
this
.
selectedOptions
.
push
(
this
.
form
.
provinceCode
);
this
.
selectedOptions
.
push
(
this
.
form
.
provinceCode
);
this
.
selectedOptions
.
push
(
this
.
form
.
cityNameCode
);
this
.
selectedOptions
.
push
(
this
.
form
.
cityNameCode
);
this
.
selectedOptions
.
push
(
this
.
form
.
districtCode
);
this
.
selectedOptions
.
push
(
this
.
form
.
districtCode
);
...
@@ -587,17 +612,17 @@ export default {
...
@@ -587,17 +612,17 @@ export default {
},
},
// 状态修改
// 状态修改
handleStatusChange
(
row
)
{
handleStatusChange
(
row
)
{
let
text
=
row
.
status
===
"0"
?
"启用"
:
"停用"
;
let
text
=
row
.
isEnable
===
1
?
"启用"
:
"停用"
;
this
.
$confirm
(
'确认要"'
+
text
+
'"该医院吗?'
,
"警告"
,
{
this
.
$confirm
(
'确认要"'
+
text
+
'"该医院吗?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
type
:
"warning"
}).
then
(
function
()
{
}).
then
(
function
()
{
return
changeStatus
(
row
.
id
,
row
.
status
);
return
changeStatus
(
row
.
id
,
row
.
isEnable
);
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
msgSuccess
(
text
+
"成功"
);
this
.
msgSuccess
(
text
+
"成功"
);
}).
catch
(
function
()
{
}).
catch
(
function
()
{
row
.
status
=
row
.
status
===
"0"
?
"1"
:
"0"
;
row
.
isEnable
=
row
.
isEnable
===
1
?
1
:
0
;
});
});
},
},
//删除上传文件
//删除上传文件
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论