提交 8326cd65 编写于 作者: qian.jie's avatar qian.jie

修改科室获取接口

上级 d230c59d
import request from 'mn-template/plugins/http'; import request from 'mn-template/plugins/http';
export const getFirstLevelLable = async () => { export const getFirstLevelLable = async () => {
return request({ return request({
url: '/contents/admin/label/getFirstLevelLable/1', url: '/basic-data/constants/lvOne/P128',
method: 'get', method: 'get',
}); });
}; };
export const childLabelList = async (data) => { export const childLabelList = async (data) => {
return request({ return request({
url: '/contents/admin/label/childLabelList', url: `/basic-data/constants/subordinate/${data}`,
params: data, params: data,
method: 'get', method: 'get',
}); });
......
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
v-model="searchParam.idNamePhone" v-model="searchParam.idNamePhone"
clearable clearable
class="serviceSchedule-idNamePhone" class="serviceSchedule-idNamePhone"
placeholder="输入问诊单号/医生姓名/手机号" placeholder="医生姓名/手机号"
style="width: 280px" style="width: 250px"
/> />
<el-button <el-button
type="primary" type="primary"
...@@ -182,8 +182,8 @@ ...@@ -182,8 +182,8 @@
innerform: [], innerform: [],
props: { props: {
// props定义的值根据接口返回的数据定的 // props定义的值根据接口返回的数据定的
label: 'name', label: 'value',
value: 'id', value: 'no',
children: 'interface', children: 'interface',
}, },
searchParam: { searchParam: {
...@@ -245,11 +245,16 @@ ...@@ -245,11 +245,16 @@
// 通过监听expand-change事件(当展开节点发生变化时触发)获取第二层数据,组装interfaceOptions数据 // 通过监听expand-change事件(当展开节点发生变化时触发)获取第二层数据,组装interfaceOptions数据
handleItemChange(val) { handleItemChange(val) {
const value = val[0]; const value = val[0];
childLabelList({ parentId: value, publish: 1 }).then((res) => { childLabelList(value).then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
const interfaceArr = res.data || []; const interfaceArr = (res.data || []).map(item => {
return {
value:item.name,
no:item.id
};
});
this.interfaceOptions.filter((item) => { this.interfaceOptions.filter((item) => {
if (item.id === value) { if (item.no === value) {
this.$set(item, 'interface', interfaceArr); this.$set(item, 'interface', interfaceArr);
} }
return; return;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册