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

修改科室获取接口

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