提交 44dcddd4 编写于 作者: 张磊's avatar 张磊

Merge branch 'feature/zl' into 'release-new'

Feature/zl

See merge request !14
...@@ -18,7 +18,7 @@ VUE_APP_IS_LOCAL=true ...@@ -18,7 +18,7 @@ VUE_APP_IS_LOCAL=true
VUE_APP_APPID=wxf4e66242d31c81c2 VUE_APP_APPID=wxf4e66242d31c81c2
# 本地token # 本地token
VUE_APP_TOKEN=520A62A63FA043CD90593429C5D12D0D VUE_APP_TOKEN=208774C74EAC430EB07EF3532B8F942D
# mock的基础地址 # mock的基础地址
VUE_APP_BASE_MOCK_URL=http://192.168.120.69:40001/mock/ VUE_APP_BASE_MOCK_URL=http://192.168.120.69:40001/mock/
......
...@@ -19,15 +19,22 @@ ...@@ -19,15 +19,22 @@
class="cancel-btn" class="cancel-btn"
@click="cancelSelect" @click="cancelSelect"
>取消</span> >取消</span>
<h3>选择地区</h3> <van-tabs
v-model="activetab"
color="#449284"
@change="tabchange"
>
<van-tab title="地区"></van-tab>
<van-tab title="层级"></van-tab>
</van-tabs>
<button <button
class="submit-btn" class="submit-btn"
@click="confirm" @click="confirm"
> >
确定 确定
</button> </button>
<!-- <button :disabled="isDisabled" class="submit-btn" @click="confirm">确定</button> -->
</div> </div>
<div v-show="activetab == 0">
<div <div
v-show="areaList.currentOrgList.length" v-show="areaList.currentOrgList.length"
class="my-org" class="my-org"
...@@ -182,12 +189,34 @@ ...@@ -182,12 +189,34 @@
</div> </div>
</div> </div>
</div> </div>
<div v-show="activetab == 1">
<div
class="address-content"
@touchmove.stop
>
<ul
>
<li
v-for="(i, index) in hl"
:key="index"
:class="{ active: hlselected.hospitalId == i.hospitalId }"
@click="hlSelect(i, index)"
>
<span>{{ i.hospitalName }}</span>
<span v-show=" hlselected.hospitalId == i.hospitalId">
<img src="../../assets/images/sort-select-icon.png">
</span>
</li>
</ul>
</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters, mapActions } from 'vuex'; import { mapGetters, mapActions } from 'vuex';
import { getAreaOrOrgList } from '../../service'; import { getAreaOrOrgList, getAreaOrOrgList2 } from '../../service';
export default { export default {
name: 'PicaArea', name: 'PicaArea',
...@@ -237,6 +266,9 @@ export default { ...@@ -237,6 +266,9 @@ export default {
regionId: '', regionId: '',
}, },
currentOrgList: [], currentOrgList: [],
activetab: '1',
hl:[],
hlselected: ''
}; };
}, },
computed: { computed: {
...@@ -277,6 +309,7 @@ export default { ...@@ -277,6 +309,7 @@ export default {
this.queryParams.projectId = cQuery.projectId || ''; this.queryParams.projectId = cQuery.projectId || '';
if (this.queryParams.projectId) { if (this.queryParams.projectId) {
this.getProvinceData(this.queryParams); this.getProvinceData(this.queryParams);
this.getOrgData2({projectId:this.queryParams.projectId});
} }
} }
}, },
...@@ -383,6 +416,15 @@ export default { ...@@ -383,6 +416,15 @@ export default {
}); });
}, },
async getOrgData2(params) {
await getAreaOrOrgList2(params).then((res) => {
if (res.code === '000000') {
console.log('-res', res);
this.hl = res.data || [];
}
});
},
// 选择省份的操作 // 选择省份的操作
provinceSelect(item, idx, isCurrent) { provinceSelect(item, idx, isCurrent) {
this.value.regionId = item.id; this.value.regionId = item.id;
...@@ -591,17 +633,24 @@ export default { ...@@ -591,17 +633,24 @@ export default {
} }
}, },
confirm() { confirm() {
this.$emit('confirm', this.value); const v = this.activetab == 0 ? this.value : this.hlselected;
console.log('-this.value', v);
this.$emit('confirm', v);
}, },
cancelSelect() { cancelSelect() {
this.$emit('cancel', false); this.$emit('cancel', false);
}, },
tabchange(e) {
console.log('e', e, this.activetab);
},
hlSelect(i) {
this.hlselected = i;
}
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.select-wrapper { .select-wrapper {
font-family: PingFangSC-Regular;
.mask { .mask {
position: fixed; position: fixed;
z-index: 1000000015; z-index: 1000000015;
...@@ -611,7 +660,6 @@ export default { ...@@ -611,7 +660,6 @@ export default {
bottom: 0; bottom: 0;
background: rgba(55, 56, 57, 0.6); background: rgba(55, 56, 57, 0.6);
} }
.address-wrap { .address-wrap {
position: absolute; position: absolute;
width: 100%; width: 100%;
...@@ -656,7 +704,6 @@ export default { ...@@ -656,7 +704,6 @@ export default {
} }
} }
} }
.address-select { .address-select {
width: 100%; width: 100%;
height: auto; height: auto;
...@@ -702,7 +749,6 @@ export default { ...@@ -702,7 +749,6 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
// flex: 1 0 auto;
&:last-of-type { &:last-of-type {
padding-right: 15px; padding-right: 15px;
} }
...@@ -729,15 +775,14 @@ export default { ...@@ -729,15 +775,14 @@ export default {
} }
} }
} }
}
}
.address-content { .address-content {
position: relative; position: relative;
width: 100%; width: 100%;
// height: 100%;
height: 196px; height: 196px;
overflow: hidden; overflow: hidden;
box-sizing: border-box; box-sizing: border-box;
ul { ul {
width: 100%; width: 100%;
height: 196px; height: 196px;
...@@ -779,8 +824,6 @@ export default { ...@@ -779,8 +824,6 @@ export default {
} }
} }
} }
}
}
.my-org { .my-org {
margin: 0 15px 15px; margin: 0 15px 15px;
& > span { & > span {
......
...@@ -85,6 +85,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -85,6 +85,7 @@ router.beforeEach(async (to, from, next) => {
setCookie('conslToken', params.userToken); setCookie('conslToken', params.userToken);
next(); next();
}); });
// next();
}); });
router.addRoutes(routerConfig); router.addRoutes(routerConfig);
...@@ -19,7 +19,13 @@ export const getAreaOrOrgList = async (params) => { ...@@ -19,7 +19,13 @@ export const getAreaOrOrgList = async (params) => {
url: 'stats/region', url: 'stats/region',
}); });
}; };
export const getAreaOrOrgList2 = async (params) => {
return request({
method: 'get',
withCredentials: true,
url: `hospital/hospitalStats/portal/hospital/deepLowers/${params.projectId}`,
});
};
/** /**
* 获取区域(一般是乡镇)下的机构列表 * 获取区域(一般是乡镇)下的机构列表
*/ */
......
...@@ -422,7 +422,7 @@ export default { ...@@ -422,7 +422,7 @@ export default {
this.CNTParams.projectId = this.projectId; this.CNTParams.projectId = this.projectId;
this.queryParams.projectId = this.projectId; this.queryParams.projectId = this.projectId;
this.getUserInfo(); this.getUserInfo();
// this.getProjectInfo(this.queryParams); this.getProjectInfo(this.queryParams);
}, },
mounted() { mounted() {
window.addEventListener( window.addEventListener(
...@@ -687,6 +687,11 @@ export default { ...@@ -687,6 +687,11 @@ export default {
return; return;
} }
this.clearParams(); this.clearParams();
if(selData.hospitalId) {
console.log('--selData', selData);
this.areaName = selData.hospitalName;
this.queryGDParams.hospitalIdList = [selData.hospitalId];
}
this.queryGDParams.regionId = selData.regionId; this.queryGDParams.regionId = selData.regionId;
this.CNTParams.regionId = selData.regionId; this.CNTParams.regionId = selData.regionId;
this.getHospitalsCNT(this.CNTParams); this.getHospitalsCNT(this.CNTParams);
......
...@@ -35,7 +35,7 @@ module.exports = { ...@@ -35,7 +35,7 @@ module.exports = {
port: 8080, port: 8080,
proxy: { proxy: {
'/proxy': { '/proxy': {
target: 'https://sc.yunqueyi.com', target: 'https://uat-sc.yunqueyi.com',
ws: false, ws: false,
changeOrigin: true, changeOrigin: true,
secure: true, secure: true,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册