123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- new Vue({
- el: '#main',
- data: {
- roles: [{
- "code": "350205",
- "level": "3",
- "name": "海沧区",
- "isManage": "1",
- "authOperate": "1",
- "areas": "350205"
- }, {
- "code": "350200",
- "level": "2",
- "name": "厦门市卫生与计划生育委员会",
- "isManage": "1",
- "authOperate": "1",
- "areas": "350200"
- }, {
- "code": "3502050100",
- "level": "4",
- "name": "海沧区嵩屿街道社区卫生服务中心",
- "isManage": "1",
- "authOperate": "1",
- "areas": "3502050100"
- }],
- selectedRole: "",
- isopen: true,
- signAnalysis: [{
- photo: '../../images/qianyujingzhan_icon.png',
- label: '签约进展',
- url: 'sign-progress.html'
- }, {
- photo: '../../images/xuqianjingzhan_icon.png',
- label: '续签进展',
- url: 'renew-progress.html'
- }, {
- photo: '../../images/jumingfenxi_icon.png',
- label: '居民分析',
- url: 'resident-analysis.html'
- }, {
- photo: '../../images/tuigaiqian_icon.png',
- label: '退改签',
- url: 'change-back.html'
- }, {
- photo: '../../images/lianglvfenxi_icon.png',
- label: '两率分析',
- url: 'two-rate-analysis.html'
- }],
- serviceAnalysis: [{
- photo: '../../images/zongtifenxi_icon.png',
- label: '总体分析',
- url: 'comprehensive-analysis.html'
- }, {
- photo: '../../images/zixunfenxi_icon.png',
- label: '咨询分析',
- url: 'consulting-analysis.html'
- }, {
- photo: '../../images/pijianfenxi_icon.png',
- label: '评价分析',
- url: 'estimate-analysis.html'
- }, {
- photo: '../../images/changcufangfenxi_icon.png',
- label: '长处方分析',
- url: 'prescription-analysis.html'
- }]
- },
- methods: {
- open: function() {
- EventBus.$emit('open-click', {});
- },
- showDetail: function(url) {
- window.location.href = url;
- }
- },
- mounted: function() {
- var selected = window.localStorage.getItem("selectedRole");
- if(selected) {
- this.selectedRole = JSON.parse(selected).code;
- } else {
- this.selectedRole = this.roles[0].code;
- var selected = this.roles[0];
- window.localStorage.setItem("selectedRole", JSON.stringify(selected));
- }
- },
- watch: {
- selectedRole: function(val) {
- var selected = _.findWhere(this.roles, {
- code: val
- });
- window.localStorage.setItem("selectedRole", JSON.stringify(selected));
- }
- }
- })
|