1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import history from "../../utils/history";
- import { getHospitalDistrictList } from "./service";
- import { getRegisteredAnnouncement } from "../../../../core/utils/ywtService";
- Component({
- props: {
- height: "100vh",
- componentData: {},
- },
- methods: {
- getExtInfo() {
- const { componentData } = this.props;
- const { componentExtInfo } = componentData;
- return componentExtInfo || {};
- },
- async onService() {
- const list = await getHospitalDistrictList();
- return {
- list,
- pagination: {
- total: list.length,
- },
- };
- },
- onItemTap({ target: { dataset } }) {
- this.toNextPage(dataset.item);
- },
- async toNextPage(item, replace) {
- const { name, hospitalDistrictId, extInfo, address } = item;
- const { componentData } = this.props;
- const { query = {} } = this.$page.data;
- history[replace ? "replace" : "push"]({
- query: {
- ...query,
- name,
- hospitalDistrictId,
- hospitalId: extInfo.hospitalId || "",
- subHospitalId: extInfo.subHospitalId || "",
- subHospitalTitle: `${name}(${address})`,
- },
- componentData,
- title: "医院介绍",
- pageType: "hospital-introduce",
- });
- return;
- },
- },
- });
|