data-indicators-attr.vue
9.45 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<style>
.tr_active{background:#eaf2fb;}
</style>
<template>
<div>
<div class="fheader no-bottom" style="margin-top:20px;">
<h4 class="no-l-icon">属性配置</h4>
</div>
<div class="indicators">
<div class="indicators-left">
<h3>系统表列</h3>
<!--table-->
<table class="itable basic-user-info data-inb-table data-ind-table">
<thead>
<tr>
<th class="w80">序号</th>
<th class="w200">中英文名称</th>
<th class="">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="item in list | filterBy true in 'isselect'"
:class="{'tr_active':item.ename==activeid}">
<td>{{$index+1}}</td>
<td class="txt-left">{{item.cname}}<br>
{{item.ename}}
</td>
<td>
<a class="btn-d btn-d-activate" href="javascript:"
v-on:click="showright(item)">
属性配置</a>
<a class="btn-d btn-d-red btn-w60" href="javascript:"
v-on:click="remove(item)" >
删除</a>
</td>
</tr>
</tbody>
</table>
<!--end table-->
<span class="btn_blue" v-on:click="showtable1()">展示全部指标表</span>
<!--table-->
<table class="itable basic-user-info data-ind-table data-inb-table"
v-show="booltable1">
<thead>
<tr>
<th class="w80">序号</th>
<th class="w250">中英文名称</th>
<th class="">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="item in list ">
<td>{{$index+1}}</td>
<td class="txt-left">{{item.cname}}<br>
{{item.ename}}
</td>
<td>
<a class="btn-d btn-d-activate btn-w60" href="javascript:"
v-on:click="add1(item)"
v-show="item.isselect==false">
添加</a>
<a class="btn-d btn-d-cancel btn-w60"
href="javascript:"
v-show="item.isselect==true">
已添加</a>
</td>
</tr>
</tbody>
</table>
<!--end table-->
</div>
<div class="border-line-1" v-show="boolright"><span>>></span></div>
<div class="indicators-right" v-show="boolright">
<h3>
系统表字段名<sub>(医疗机构专属供应商企业信息)</sub></h3>
<div class="bor_btm_1"></div>
<!--table-->
<table class="itable basic-user-info data-inc-table data-ind-table">
<thead>
<tr>
<th class="w80">序号</th>
<th class="w250 txt-left padd-left-30">中英文名称</th>
<th class="">操作</th>
</tr>
</thead>
<tbody>
<tr
v-for="item in rightlist | filterBy true in 'isselect' ">
<td>{{$index+1}}</td>
<td class="txt-left">{{item.COLUMN_COMMENT}}<br>
{{item.COLUMN_NAME}}
</td>
<td>
<a class="btn-d btn-d-red btn-w60"
href="javascript:"
v-on:click="removeright(item)">
删除</a>
</td>
</tr>
</tbody>
</table>
<!--end table-->
<span class="btn_blue" v-on:click="showtable2()">展示全部属性</span>
<div v-show="booltable2">
<!--table-->
<table class="itable basic-user-info data-inc-table data-ind-table">
<thead>
<tr>
<th class="w80">序号</th>
<th class="w250 txt-left padd-left-30">中英文名称</th>
<th class="">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="item in rightlist ">
<td>{{$index+1}}</td>
<td class="txt-left">{{item.COLUMN_COMMENT}}<br>
{{item.COLUMN_NAME}}
</td>
<td>
<a class="btn-d btn-d-activate btn-w60"
href="javascript:" v-show="item.isselect==false"
v-on:click="add2(item)">
添加</a>
<a class="btn-d btn-d-cancel btn-w60"
href="javascript:"
v-show="item.isselect==true">
已添加</a>
</td>
</tr>
</tbody>
</table>
<!--end table-->
<div class="pagination m-20-0 hide">
<ul>
<li><span>上一页</span></li>
<li><span>下一页</span></li>
</ul>
<em class="page">第1页</em>
<em>共1页</em>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
module.exports={
data:function(){
return {
id:0,list:[],rightlist:[],
search: {
pageSize: 6,
page: 1,
totalPages: 0,searchtxt:''
},boolright:0,booltable1:0,booltable2:0,activeid:0
}
},watch:{
'$route.params':function(){
this.boolright=0;
this.booltable1=0;
this.booltable2=0;
this.getData();
}
},methods:{
getData:function(){//获取左边数据
this.id=this.$route.params.id || 0;
Ajax.post('/systemdata/operator/infor/getProTabList',{
code:this.id}).then(function(res){
var result=res.data;
if(result.data){
this.$set('list',result.data.alllist);
}
}.bind(this))
},showright:function(item){//获取右边数据,并显示
this.activeid=item.ename;
var obj=Object.assign({},item);
obj.code=this.id;
Ajax.post('/systemdata/operator/infor/getProList',
obj).then(function(res){
var result=res.data;
if(result.data && result.data.alllist){
this.$set('rightlist',result.data.alllist);
}
this.boolright=1;
this.booltable2=0;
}.bind(this))
},remove:function(item){//左边删除
var deletecur=item.ename==this.activeid;
var obj=Object.assign({},item);
obj.code=this.id;
this.MessageBox({
title: '提示',
message: '是否删除',
type: 'success',
showCancelButton: true
}).then(function(action) {
if(action=="confirm"){
Ajax.post('/systemdata/operator/infor/delProTab',
obj).then(function(res){
var result=res.data;
if(result.errorCode==0){
item.isselect=false;
if(deletecur){
this.boolright=0;
}
}
}.bind(this))
}
}.bind(this));
},removeright:function(item){//右边删除
var obj=Object.assign({},item);
obj.code=this.id;
obj.ename=this.activeid;
obj.colname=obj.COLUMN_NAME;
this.MessageBox({
title: '提示',
message: '是否删除',
type: 'success',
showCancelButton: true
}).then(function(action) {
if(action=="confirm"){
var id=item.id;
Ajax.post('/systemdata/operator/infor/delPro',
obj).then(function(res){
var result=res.data;
if(result.errorCode==0){
item.isselect=false;
}
}.bind(this))
}
}.bind(this));
},showtable1:function(){ //展示全部指标表 并显示
this.booltable1=1;
},showtable2:function(){ //展示全部属性 并显示
this.booltable2=1;
},add1:function(item){//左边添加
var obj=Object.assign({},item);
obj.code=this.id;
Ajax.post('/systemdata/operator/infor/addProTab',
obj).then(function(res){
var result=res.data;
if(result.errorCode==0){
item.isselect=true;
}
}.bind(this))
},add2:function(item){//右边添加
var obj=Object.assign({},item);
obj.ename=this.activeid;
obj.code=this.id;
obj.colname=obj.COLUMN_NAME;
Ajax.post('/systemdata/operator/infor/addPro',
obj).then(function(res){
var result=res.data;
if(result.errorCode==0){
item.isselect=true;
}
}.bind(this))
}
},ready:function(){
this.getData();
},route:{
activate:function(){
}
}
}
</script>