dataadmin-gov.vue
4.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<template>
<div class="container resource">
<div class="pop-banner clearfix">
<div class="operate-btns">
<a class="fbtn fb-add" v-link="{path:'/dataAdminGovdetail/true'}" >添加</a>
<a href="javascript:;" @click="getData(true)" class="fbtn fb-refresh">刷新</a>
</div>
<h3 class="current-module">政府资料初始化</h3>
</div>
<div class="pd-form fast-search-form">
<div class="group-row">
<div class="form-group">
<label for="cn1" class="label">政府机构</label>
<div class="control">
<input type="text" maxlength="20" style="width:500px" id="cn1" v-model="search.name" v-rule> </div>
</div>
</div>
<div class="group-row t-right">
<button class="fast-search-form-btn btn-d btn-d-lg btn-d-activate btn-d-circle" @click="getData(true)">查 询</button>
</div>
</div>
<!-- start-->
<table class="itable itable-thead-13px">
<thead>
<tr>
<th class="w80">序号</th>
<th class="w240">政府机构</th>
<th class="w120">状态</th>
<th class="w120">联系人</th>
<th class="w120">联系电话</th>
<th class="w100">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="mfmed in listMfmed">
<td>{{$index + 1}}</td>
<td>
<div class="p-lr-10">{{mfmed.name}}</div>
</td>
<td>{{mfmed.bizstate=='Y'?"启用":mfmed.bizstate=='S'?"停用":mfmed.bizstate=='E'?"作废":""}}</td>
<td>{{mfmed.linkman}}</td>
<td>{{mfmed.contacttel}}</td>
<td>
<a class="btn-d btn-d-activate" v-link="{ path: '/dataAdminGovdetail/'+ mfmed.guid}" >明细</a>
</td>
</tr>
</tbody>
</table>
<pagination
@page-change="getData"
:class="['m-20-0']"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages"></pagination>
<!--end-->
</div>
</template>
<script>
module.exports={
data: function(){
return {
listMfmed: [],
search: {
name:'',
pageSize: 10,
page: 1,
totalPages: 0,
},
authoritySetting: {
oneRefreshFlag:false,
oneAddFlag:false,
twoDetailFlag:false,
},
};
},
computed: {
dual: function () {
var self = this;
var curMenuRole = this.$store.state.user.curMenuRole;
if (curMenuRole!=undefined && curMenuRole!=null) {
for (var i=0;i<curMenuRole.length;i++) {
if(curMenuRole[i].menu != null) {
if (curMenuRole[i].menu.name == '医疗机构资料初始化') {
for (var j=0;j<curMenuRole[i].buttonList.length;j++) {
// 一级菜单设置
if (!self.authoritySetting.oneRefreshFlag && curMenuRole[i].buttonList[j].level=='1' && curMenuRole[i].buttonList[j].name =='刷新' && curMenuRole[i].buttonList[j].isvalid=='y') {
self.authoritySetting.oneRefreshFlag = true;
}
if (!self.authoritySetting.oneAddFlag && curMenuRole[i].buttonList[j].level=='1' && curMenuRole[i].buttonList[j].name =='添加' && curMenuRole[i].buttonList[j].isvalid=='y') {
self.authoritySetting.oneAddFlag = true;
}
if (!self.authoritySetting.twoDetailFlag && curMenuRole[i].buttonList[j].level=='2' && curMenuRole[i].buttonList[j].name =='明细' && curMenuRole[i].buttonList[j].isvalid=='y') {
self.authoritySetting.twoDetailFlag = true;
}
}
break;
}
}
}
}
//this.$store.state.user.userName;
return '';
}
},
methods: {
getData:function(){
var self = this;
// /imported/getListMfgov
// /dataadmin/listMfmed
Ajax.post('/imported/getListMfgov',this.search)
.then(function(response){
var data=response.data.data;
self.$set("listMfmed",data.list);
self.search.totalPages=data.totalPages;
})
}
},
route:{
activate : function(){
this.getData();
}
}
};
</script>