| | |
| | | |
| | | <script> |
| | | // 使用说明:v-model时,必须传带有带有省,市,区拼音的字段 |
| | | import request from '@/utils/request' |
| | | import request from "@/utils/request"; |
| | | import store from "@/store"; |
| | | |
| | | export default { |
| | | name: "li_area_select", |
| | | //通过 model 选项配置子组件接收的 prop 名以及派发的事件名 |
| | | model: { |
| | | prop: "caddress", |
| | | event: "change", |
| | | event: "change" |
| | | }, |
| | | props: { |
| | | caddress: { |
| | | type: Object, |
| | | }, |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | //areaJson: './../address.json', |
| | | addressArray: [], //所有数据 |
| | | cityArray: [], |
| | | areaArray: [], |
| | | areaArray: [] |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | getAddressData() { |
| | | var that = this; |
| | | console.log(store.getters.addressArray,'addressArray'); |
| | | |
| | | if (store.getters.addressArray.length) { |
| | | that.addressArray = store.getters.addressArray.length; |
| | | //默认值赋值获取城市数组 |
| | | if (that.caddress.sheng) { |
| | | for (let ad of that.addressArray) { |
| | | if (ad.areaname === that.caddress.sheng) { |
| | | that.cityArray = ad.subarea; |
| | | //--- |
| | | //默认赋值获取区域数组 |
| | | if (that.caddress.shi) { |
| | | for (let area of that.cityArray) { |
| | | if (area.areaname === that.caddress.shi) { |
| | | that.areaArray = area.subarea; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | request({ |
| | | url: that.areaJson, |
| | | method: "get", |
| | | method: "get" |
| | | }).then(function (response) { |
| | | if (response.code === 200) { |
| | | //获取地址 |
| | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | //选择省份 |
| | | getCityData(val) { |
| | |
| | | }, |
| | | |
| | | getSheng(){ |
| | | let list= this.addressArray.filter(r=>r.areaname == this.caddress.sheng); |
| | | let list = this.addressArray.filter( |
| | | r => r.areaname == this.caddress.sheng |
| | | ); |
| | | if(list.length>0){ |
| | | return list[0].areacode; |
| | | } |
| | | else{ |
| | | return ''; |
| | | } else { |
| | | return ""; |
| | | } |
| | | }, |
| | | getShi(){ |
| | | let list= this.cityArray.filter(r=>r.areaname == this.caddress.shi); |
| | | if(list.length>0){ |
| | | return list[0].areacode; |
| | | } |
| | | else{ |
| | | return ''; |
| | | } else { |
| | | return ""; |
| | | } |
| | | }, |
| | | getQu(){ |
| | | let list= this.areaArray.filter(r=>r.areaname == this.caddress.qu); |
| | | if(list.length>0){ |
| | | return list[0].areacode; |
| | | } |
| | | else{ |
| | | return ''; |
| | | } else { |
| | | return ""; |
| | | } |
| | | }, |
| | | clean(){ |
| | |
| | | this.caddress.shi=""; |
| | | this.caddress.qu=""; |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | cachedViews: state => state.tagsView.cachedViews, |
| | | token: state => state.user.token, |
| | | avatar: state => state.user.avatar, |
| | | addressArray: state => state.user.addressArray, |
| | | name: state => state.user.name, |
| | | organization: state => state.user.organization, |
| | | introduction: state => state.user.introduction, |
| | |
| | | roles: [], |
| | | permissions: [], |
| | | organization:[], |
| | | addressArray:[], |
| | | }, |
| | | |
| | | mutations: { |
| | |
| | | SET_ROLES: (state, roles) => { |
| | | state.roles = roles |
| | | }, |
| | | SET_addressArray: (state, addressArray) => { |
| | | state.addressArray = addressArray |
| | | }, |
| | | SET_PERMISSIONS: (state, permissions) => { |
| | | state.permissions = permissions |
| | | }, |
| | |
| | | align="center" |
| | | width="220" |
| | | prop="hospitalno" |
| | | v-if="actives == 6" |
| | | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <org-selecter |
| | |
| | | } |
| | | }); |
| | | |
| | | |
| | | // 表单数据 |
| | | getDonatebaseinfo(this.infoid).then(response => { |
| | | this.form = response.data; |
| | |
| | | } else { |
| | | this.showTerminationBtn = 0; |
| | | } |
| | | |
| | | |
| | | this.actives = response.data.workflow; |
| | | this.workflow = response.data.workflow; |
| | | response.data.sex = parseInt(response.data.sex); |
| | | this.form.id = response.data.id; |
| | | |
| | | |
| | | this.form.diseasetype = this.form.diseasetype.split(","); |
| | | this.form.infectious = this.form.infectious.split(","); |
| | | this.form.selfwill = this.form.selfwill.split(","); |
| | |
| | | this.form.infosources = this.form.infosources.split(","); |
| | | this.form.kinship = this.form.kinship.split(","); |
| | | this.form.patientstate = this.form.patientstate.split(","); |
| | | |
| | | |
| | | this.open = true; |
| | | this.title = "人体器官潜在捐献者登记表"; |
| | | this.registerAddresss.sheng = response.data.registerprovincename; |
| | |
| | | this.residenceAddresss.shi = response.data.residencecityname; |
| | | this.residenceAddresss.qu = response.data.residencetownname; |
| | | this.registerAddresss.qu = response.data.registertownname; |
| | | |
| | | |
| | | // 获取二级表 |
| | | this.GetAttacheddata(); |
| | | }); |
| | |
| | | if (this.transplantdata[0] && !this.istb) { |
| | | return; |
| | | } |
| | | console.log("完成登记"); |
| | | |
| | | listDonatecomporgan(searchParam).then(res => { |
| | | if (res.code == 200) { |
| | |
| | | import { listOrganallocation } from "@/api/project/organallocation"; |
| | | |
| | | import RankChart from "./components/rankbarchart"; |
| | | import request from '@/utils/request' |
| | | import OrganNumChart from "./components/organnumchart"; |
| | | import { listDonatebaseinfo } from "@/api/project/donatebaseinfo"; |
| | | import dayjs from "dayjs"; |
| | |
| | | year: "选择年份", |
| | | isloading: false, |
| | | maxHeight: 0, |
| | | areaJson: "/project/dict/treeselect", // 提前存储地址数据接口 |
| | | CommonOrgan: null, |
| | | provinceData: [ |
| | | { label: "全部地市", value: "" }, |
| | |
| | | this.value = "杭州市"; |
| | | this.GetOrgDonateNumNew(); |
| | | this.GetOrgDonateNum(); |
| | | this.getAddressData(); |
| | | }); |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // 提前缓存数据 |
| | | getAddressData() { |
| | | var that = this; |
| | | request({ |
| | | url: that.areaJson, |
| | | method: "get", |
| | | }).then(function (response) { |
| | | if (response.code === 200) { |
| | | //获取地址 |
| | | let addressArray = response.data; |
| | | this.$store.commit('updateMyData', addressArray); |
| | | } |
| | | }); |
| | | }, |
| | | // 确定已读 |
| | | clickMessageDetailed(item) { |
| | | let data = item; |