Bladeren bron

修改查看知识库

fanlongfei 8 jaren geleden
bovenliggende
commit
90d148fb1a
2 gewijzigde bestanden met toevoegingen van 127 en 75 verwijderingen
  1. 105 0
      CallCenterWeb.UI/zhiShiKu/addModel.html
  2. 22 75
      CallCenterWeb.UI/zhiShiKu/zhiShiKuChaXun.html

+ 105 - 0
CallCenterWeb.UI/zhiShiKu/addModel.html

1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+    <meta charset="UTF-8">
5
+    <script src="../Script/Common/huayi.load.js"></script>
6
+    <script src="../Script/Common/huayi.config.js"></script>
7
+    <link href="../css/layer/need/layer.css" />
8
+    <link rel="stylesheet" href="../css/init.css" />
9
+    <title>知识库查询</title>
10
+    <style>
11
+        .table{
12
+        	margin: 20px;
13
+        	width: 97%;
14
+        }
15
+
16
+        .table th {
17
+            width: 10%;
18
+            font-weight: bold;
19
+            text-align: center;
20
+        }
21
+		
22
+		.table td{
23
+			width: 90%;
24
+		}
25
+        .table td textarea {
26
+            width: 100%;
27
+        }
28
+		
29
+    </style>
30
+</head>
31
+<body>
32
+    <!--查看弹出内容-->
33
+   
34
+    <table class="table-bordered table">
35
+        <tbody>
36
+            <tr>
37
+                <th>标题:</th>
38
+                <td colspan="3" class="addTitle"></td>
39
+            </tr>
40
+            <tr>
41
+                <th>关键字:</th>
42
+                <td colspan="3" class="addKey"></td>
43
+            </tr>
44
+            <tr>
45
+                <th>内容:</th>
46
+                <td colspan="3" class="addCon"></td>
47
+            </tr>
48
+        </tbody>
49
+    </table>
50
+    
51
+    <script src="../css/layer/layer.js"></script>
52
+</body>
53
+<script>
54
+    var token = $.cookie("token");
55
+    var changeGetid = helper.request.queryString("changeGetid"); 
56
+    getChangeBox(changeGetid);
57
+  
58
+    function getChangeBox(changeGetid) {
59
+        $.ajax({
60
+            type: "post",
61
+            url: huayi.config.callcenter_url + "Knowledge/GetInfo",
62
+            async: true,
63
+            dataType: 'json',
64
+            data: {
65
+                infoid: changeGetid,
66
+                token: token
67
+            },
68
+            success: function (data) {
69
+                var con = data.data;
70
+                $('.addTitle').html(con.F_Title);
71
+                $('.addKey').html(con.F_KeyWords);
72
+                $('.addCon').html(con.F_Content);
73
+            }
74
+        });
75
+
76
+    }
77
+   
78
+</script>
79
+
80
+</html>
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
+

+ 22 - 75
CallCenterWeb.UI/zhiShiKu/zhiShiKuChaXun.html

13
 				padding: 15px 0;
13
 				padding: 15px 0;
14
 				border-bottom: 1px solid #ccc;
14
 				border-bottom: 1px solid #ccc;
15
 			}
15
 			}
16
-			.box {
17
-				width: 52%;
18
-			}
19
-			.boxCon {
20
-				height: 340px;
21
-			}
22
-			.boxCon table th {
23
-				width: 20%;
24
-			}
25
-			
26
-			.boxCon table td textarea {
27
-				width: 100%;
28
-			}
29
-			
30
-		
31
 			.treeTable {
16
 			.treeTable {
32
 				height: 400px;
17
 				height: 400px;
33
 				/*overflow-y: auto;*/
18
 				/*overflow-y: auto;*/
117
 			</div>
102
 			</div>
118
 
103
 
119
 		</div>
104
 		</div>
120
-		<!--查看弹出内容-->
121
-		<div class="model addModel">
122
-			<div class="box">
123
-				<div class="btop clearfix">
124
-					<p class="btl">查看知识库</p>
125
-					<p class="btr addBtr" title="关闭">X</p>
126
-				</div>
127
-				<div class="boxCon">
128
-					<table class="table-bordered table">
129
-						<tbody >
130
-							<tr>
131
-								<th>标题:</th>
132
-								<td colspan="3" class="addTitle" ></td>
133
-							</tr>
134
-							<tr>
135
-								<th>关键字:</th>
136
-								<td colspan="3" class="addKey"></td>
137
-							</tr>
138
-							<tr>
139
-								<th>内容:</th>
140
-								<td colspan="3" class="addCon"></td>
141
-							</tr>
142
-						</tbody>
143
-					</table>
144
-				</div>
145
-			</div>
146
-
147
-		</div>
148
 	<script src="../js/zTree/jquery.ztree.core.js"></script>
105
 	<script src="../js/zTree/jquery.ztree.core.js"></script>
149
 	<script src="../css/layer/layer.js"></script>
106
 	<script src="../css/layer/layer.js"></script>
150
 	<!--<script src="../js/kindeditor/kindeditor.js"></script>
107
 	<!--<script src="../js/kindeditor/kindeditor.js"></script>
225
 	
182
 	
226
 		var changes = $.map( $('#table1').bootstrapTable('getSelections'), function(row) {
183
 		var changes = $.map( $('#table1').bootstrapTable('getSelections'), function(row) {
227
 					return row.F_RepositoryId;
184
 					return row.F_RepositoryId;
228
-				});
229
-			if(changes.length <= 0) {
230
-						layer.confirm('请选择查看行!', {
231
-				btn: ['确定']
232
-			});
233
-			return;
234
-				}else{
235
-					$('.addModel').css('display', 'block');
236
-				}
237
-				changeGetid=changes;
238
-				getChangeBox(changeGetid);
239
-	})
240
-	$('.addBtr').click(function() {
241
-		$('.addModel').css('display', 'none');
242
-	})
243
-	function getChangeBox(changeGetid){
244
-			$.ajax({
245
-			type: "post",
246
-			url: huayi.config.callcenter_url+"Knowledge/GetInfo",
247
-			async: true,
248
-			dataType:'json',
249
-			data: {
250
-				infoid:changeGetid,
251
-				token:token
252
-			},
253
-			success: function(data) {
254
-            var con=data.data;
255
-            $('.addTitle').html(con.F_Title);
256
-           $('.addKey').html(con.F_KeyWords);
257
-           $('.addCon').html(con.F_Content);
258
-			}
259
 		});
185
 		});
186
+		if ((changes.length <= 0 ) || (changes.length > 1)) {
187
+            layer.confirm('请选择查一行查看!', {
188
+                btn: ['确定']
189
+            });
190
+            return;
191
+        } else {
192
+            //iframe窗
193
+		    layer.open({
194
+		      	type: 2,
195
+		      	title: '查看知识库',
196
+		      	shadeClose: true, //是否开启点击遮罩关闭
197
+		      	shade: 0.4, //遮罩
198
+		     	maxmin: true, //开启最大化最小化按钮
199
+		     	id: 'LAY_layuipro',//防止重复弹出
200
+		     	moveType: 1,//拖拽类型 默认的拖拽风格正如你所见到的,会有个过度的透明框。但是如果你不喜欢,你可以设定moveType: 1切换到传统的拖拽模式
201
+		     	moveOut: true, //拖拽到窗口外
202
+		     	//resize: true,//是否允许拉伸
203
+		      	area: ['70%', '50%'],
204
+		      	content: 'addModel.html?changeGetid='+ changes +''
205
+		    });
206
+        }
260
 		
207
 		
261
-	}
208
+	})
262
 	//***********************添加功能结束=============================
209
 	//***********************添加功能结束=============================
263
 	initTable();
210
 	initTable();
264
 	function initTable(token,id,keyWord) {
211
 	function initTable(token,id,keyWord) {