瀏覽代碼

伊川知识库调整

miaofuhao 2 年之前
父節點
當前提交
c2ed948903

+ 1 - 1
newUI/Appeal/js/addAppeal.js

@@ -1,6 +1,6 @@
1 1
 var wid = helper.request.queryString("wid");
2 2
 var draftId = helper.request.queryString("draftId")
3
-var sourceID = "7";
3
+var sourceID = helper.request.queryString("sourceID")
4 4
 var F_Id = ""
5 5
 $(document).ready(function() {
6 6
 	

二進制
newUI/img/bac.png


二進制
newUI/img/logo.png


二進制
newUI/img/secBac.png


+ 275 - 0
newUI/zhiShiKu/changeZSDetail.html

@@ -0,0 +1,275 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<script src="../Script/Common/huayi.load.js"></script>
7
+		<script src="../Script/Common/huayi.config.js"></script>
8
+		<link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
9
+		<link rel="stylesheet" href="../css/init.css" />
10
+		<title>编辑知识库详细情</title>
11
+		<style>
12
+			.m-kuang {
13
+				width: 50%;
14
+				background-color: #FFF;
15
+				background-image: none;
16
+				border: 1px solid #ccc;
17
+				border-radius: 1px;
18
+				color: inherit;
19
+				padding: 6px 12px;
20
+				outline: none;
21
+				vertical-align: middle;
22
+			}
23
+			
24
+			table th {
25
+				width: 20%;
26
+				text-align: right;
27
+				border-top: 0!important;
28
+			}
29
+			
30
+			table td {
31
+				border-top: 0!important;
32
+			}
33
+			
34
+			.daoHang {
35
+				border-bottom: 1px solid #ccc;
36
+			}
37
+			
38
+			.content {
39
+				margin-top: 15px;
40
+			}
41
+			.inps{
42
+				    width: 95%;
43
+				    height: 30px;
44
+				    outline: none;
45
+				    border: 0;
46
+				    border-image-width: 0;
47
+				    padding: 0;
48
+				    padding-left: 8px;
49
+			}
50
+			.inpBox{
51
+				    border: 1px solid #ccc;
52
+				    height: 32px;
53
+				    width: 50%;
54
+				    display: inline-block;
55
+				    position: relative;
56
+				    vertical-align: middle;
57
+			}
58
+			.xl{
59
+				 display: inline-block;
60
+			    background: url(../img/dropDown.png) no-repeat;
61
+			    height: 100%;
62
+			    background-position: center center;
63
+			    width: 20px;
64
+			    position: absolute;
65
+			    right: 0;
66
+			    top: 0px;
67
+			    /* background-color: #f7bc8b; */
68
+			    cursor: pointer;
69
+			}
70
+			.addTree {
71
+			    background: #fff;
72
+			    position: absolute;
73
+			    width: 100%;
74
+			    border: 1px solid darkgrey;
75
+			    right: 0;
76
+			    top: 32px;
77
+			    display: none;
78
+				z-index: 1;
79
+			}
80
+			
81
+		</style>
82
+	</head>
83
+
84
+	<body>
85
+		<div class="container-fluid">
86
+			<div class="content">
87
+				<table class="table">
88
+					<tr>
89
+						<th>
90
+							<b>标题:</b>
91
+						</th>
92
+						<td>
93
+							<input type="text " class="m-kuang zs_t" />
94
+						</td>
95
+					</tr>
96
+					<tr>
97
+						<th>
98
+							<b>所属分类:</b>
99
+						</th>
100
+						<td>
101
+							<div class="inpBox">
102
+							<input type="text" class="inps" />
103
+							<i class="xl xl_one"></i>
104
+							<div class="addTree xlAdd">
105
+								<ul id="addTreeDemo" class="ztree">
106
+
107
+								</ul>
108
+							</div>
109
+							</div>
110
+						</td>
111
+					</tr>
112
+					<tr>
113
+						<th>
114
+							<b>内容:</b>
115
+						</th>
116
+						<td>
117
+							<textarea data-adaptheight id="addEditor" name="content" style="width: 80%;height: 200px;"></textarea>
118
+						</td>
119
+					</tr>
120
+					<!--<tr>
121
+
122
+						<td colspan="2" class="text-center">
123
+							<div class="checkbox">
124
+								<label>
125
+							      	<input type="checkbox" style="margin-top: 2px;" class="isCheck"> 是否提交审核
126
+							    </label>
127
+							</div>
128
+						</td>
129
+					</tr>-->
130
+					<tr>
131
+						<td colspan="2" class="text-center">
132
+							<!--<button class="btns">添加</button>-->
133
+							<button class="btns tiJiao">提交</button>
134
+						</td>
135
+					</tr>
136
+				</table>
137
+
138
+			</div>
139
+
140
+		</div>
141
+
142
+		<script src="../css/layer/layer.js"></script>
143
+		<script src="../js/zTree/jquery.ztree.core.js"></script>
144
+		<script src="../js/kindeditor/kindeditor-all-min.js"></script>
145
+		<script src="../js/kindeditor/lang/zh-CN.js"></script>
146
+		<script src="../js/adjustHeight.js"></script>
147
+		<script>
148
+			var bid = helper.request.queryString("id");
149
+			var id = ''; //当前节点id
150
+			var cname; //当前节点name
151
+			var pid; //当前节点父ID
152
+			var pidName; //当前节点父name
153
+			var xlName; //添加弹出框内下拉框内节点name
154
+			var token = $.cookie("token");
155
+			//编辑器配置
156
+			KindEditor.ready(function(K) {
157
+				window.editor = K.create('#addEditor', {
158
+					uploadJson: '../../js/kindeditor/asp.net/upload_json.ashx',
159
+					fileManagerJson: '../../js/kindeditor/asp.net/file_manager_json.ashx',
160
+					allowFileManager: true
161
+				}); //添加弹出框编辑器
162
+			});
163
+
164
+			tree();
165
+			function tree() {
166
+
167
+				$.get(huayi.config.callcenter_url + 'KnowledgeClass/GetList', {
168
+					"token": $.cookie("token"),
169
+					//		"pid": pid
170
+				}, function(result) {
171
+					result = $.parseJSON(result);
172
+					$.fn.zTree.init($("#addTreeDemo"), setting1, result.data); //实例化树形图
173
+				});
174
+			}
175
+			var setting1 = {
176
+				data: {
177
+					key: {
178
+						name: "text"
179
+					},
180
+					simpleData: {
181
+						enable: true,
182
+						idKey: "id",
183
+						rootPId: 0
184
+					}
185
+				},
186
+				callback: {
187
+					onClick: zTreeOnClick
188
+				}
189
+			};
190
+
191
+			function zTreeOnClick(event, treeId, treeNode) {
192
+				//		pid = treeNode.pId;
193
+				id = treeNode.id;
194
+				cname = treeNode.text;
195
+				$('.inps').val(cname);
196
+			};
197
+			//所属分类下拉
198
+			$('.inps').focus(function() {
199
+				$('.xlAdd').css('display', 'block')
200
+			})
201
+			$('.xl').click(function() {
202
+				if($('.xlAdd').css('display') == 'block') {
203
+					$('.xlAdd').css('display', 'none')
204
+				} else {
205
+					$('.xlAdd').css('display', 'block')
206
+				}
207
+			})
208
+			$('.addTree').mouseleave(function() {
209
+				$(this).css('display', 'none')
210
+			})
211
+			
212
+			$.ajax({
213
+				type:"get",
214
+				url:huayi.config.callcenter_url+"Knowledge/GetInfo",
215
+				async:true,
216
+				dataType:'json',
217
+					data:{
218
+						token:$.cookie("token"),
219
+						infoid:bid,//知识库标题
220
+					},
221
+					success:function(data){
222
+						var con=data.data;
223
+						if(data.state.toLowerCase()=='success'){
224
+							$('.zs_t').val(con.F_Title);//标题
225
+							$('.inps').val(con.F_Category);
226
+							cname=con.F_Category;
227
+							editor.html(con.F_Content);
228
+							id=con.F_CategoryId;
229
+						}
230
+					}
231
+			});
232
+			var title;//知识库标题
233
+			var con;//知识库内容
234
+			var issub;//是否提交审核
235
+			function add(title,con,id, issub){
236
+				$.ajax({
237
+					type:"post",
238
+					url:huayi.config.callcenter_url+"Knowledge/EditInfo",
239
+					async:true,
240
+					dataType:'json',
241
+					data:{
242
+						token:$.cookie("token"),
243
+						infoid:bid,
244
+						title:title,//知识库标题
245
+						con:con,//知识库内容
246
+						pid:id,//分类ID
247
+						issub:issub//是否提交审核
248
+					},
249
+					success:function(data){
250
+						if(data.state.toLowerCase()=="success"){
251
+							var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
252
+                    		parent.layer.close(index); //再执行关闭
253
+                    		//debugger;
254
+						  	parent.initTable(id);					 
255
+							parent.layer.msg("编辑成功");
256
+						}
257
+					}
258
+				});
259
+			}
260
+			$('.tiJiao').click(function(){
261
+				if($('.isCheck').is(':checked')==true){
262
+					issub=1;
263
+				}else{
264
+					issub=0;
265
+				}
266
+				title=$('.zs_t').val();
267
+				con=encodeURIComponent(editor.html());
268
+				//debugger;
269
+				add(title,con,id, issub)
270
+			})
271
+		
272
+		</script>
273
+	</body>
274
+
275
+</html>

+ 1 - 0
newUI/zhiShiKu/js/zhiShiKuManger.js

@@ -167,6 +167,7 @@ function addCunTree(addPid, addTitle, addKey, addCon) {
167 167
         data: {
168 168
             title: addTitle,
169 169
             key: addKey,
170
+            issub:0,
170 171
             con: addCon,
171 172
             pid: addPid,
172 173
             token: token

+ 9 - 6
newUI/zhiShiKu/zhiShiKuChaXun.html

@@ -128,7 +128,6 @@
128 128
 
129 129
 	</body>
130 130
 	<script>
131
-		var token = $.cookie("token");
132 131
 		var id; //当前节点id
133 132
 		var pid; //当前父节点ID
134 133
 		var name; //选择的name
@@ -136,12 +135,15 @@
136 135
 		var keyWord; //关键字
137 136
 		var table = $('#table1'); //右边表格
138 137
 		var changeGetid;
138
+		$(document).ready(function(){
139
+			initTable();
140
+		})
139 141
 		//搜索按钮
140 142
 		$('.searchGo').click(function() {
141 143
 			keyWord = $('.searCon').val();
142 144
 			//console.log(keyWord);
143 145
 			if(keyWord) {
144
-				initTable(token, id, keyWord);
146
+				initTable(id, keyWord);
145 147
 			} else {
146 148
 				layer.confirm('请输入搜索内容!', {
147 149
 					btn: ['确定']
@@ -191,7 +193,7 @@
191 193
 			//			console.log(pid);
192 194
 			//		}
193 195
 			keyWord = $('.searCon').val();
194
-			initTable(token, id, keyWord);
196
+			initTable(id, keyWord);
195 197
 		};
196 198
 
197 199
 		//===============添加功能开始=============================
@@ -227,9 +229,9 @@
227 229
 		})
228 230
 
229 231
 		//***********************添加功能结束=============================
230
-		initTable();
232
+		
231 233
 
232
-		function initTable(token, id, keyWord) {
234
+		function initTable( id, keyWord) {
233 235
 			//先销毁表格
234 236
 			table.bootstrapTable('destroy');
235 237
 			//初始化表格,动态从服务器加载数据
@@ -254,7 +256,8 @@
254 256
 					var param = {
255 257
 						page: params.pageNumber,
256 258
 						pagesize: params.pageSize,
257
-						token: token,
259
+						token: $.cookie("token"),
260
+						ispass:1,
258 261
 						pid: id,
259 262
 						keywords: keyWord
260 263
 					};

+ 103 - 0
newUI/zhiShiKu/zhiShiKuDetail.html

@@ -0,0 +1,103 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<script src="../Script/Common/huayi.load.js"></script>
7
+		<script src="../Script/Common/huayi.http.js"></script>
8
+		<script src="../Script/Common/huayi.config.js"></script>
9
+		<link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
10
+		<link rel="stylesheet" href="../css/init.css" />
11
+		<title>知识库详情页面</title>
12
+		<style>
13
+			.treeTable {
14
+				/*height: 400px;*/
15
+				/*overflow-y: auto;*/
16
+				width: 100%;
17
+				border: 1px solid #e5e5e5;
18
+				text-align: center;
19
+				padding: 15px;
20
+			}
21
+			
22
+			.con_title {
23
+				font-weight: bold;
24
+				color: #000;
25
+			}
26
+			
27
+			.con_message {
28
+				border-bottom: 1px solid #e5e5e5;
29
+				padding: 5px;
30
+				margin-bottom: 15px;
31
+			}
32
+			
33
+			.con_content {
34
+				text-align: left;
35
+			}
36
+			
37
+			.icon_r {
38
+				margin-right: 3px;
39
+			}
40
+			.box .btop {
41
+				    background: #00a1cb;
42
+				    }
43
+		</style>
44
+	</head>
45
+
46
+	<body>
47
+		<div class="container-fluid">
48
+			<div class="treeTable">
49
+				<h3 class="con_title"></h3>
50
+				<div class="con_message">
51
+					<span>所属类别:</span>
52
+					<sapn class="lb"></sapn>
53
+					<span>创建人:</span>
54
+					<sapn class="cjr"></sapn>
55
+					<span>审核人:</span>
56
+					<sapn class="shr"></sapn>
57
+					<span>创建日期:</span>
58
+					<sapn class="time"></sapn>
59
+				</div>
60
+				<table class="con_content table table-striped table-hover">
61
+					<tr>
62
+						<td class="content"></td>
63
+					</tr>
64
+				</table>
65
+			</div>
66
+		</div>
67
+
68
+		<script src="../css/laydate/laydate.js"></script>
69
+		<script src="../js/zTree/jquery.ztree.core.js"></script>
70
+		<script src="../js/kindeditor/kindeditor-all-min.js"></script>
71
+		<script src="../js/kindeditor/lang/zh-CN.js"></script>
72
+		<script>
73
+			$(function() {
74
+				var id = helper.request.queryString("id");
75
+				Ajax(id);
76
+				function Ajax(id) {
77
+					$.ajax({
78
+						type: "get",
79
+						url: huayi.config.callcenter_url + "Knowledge/GetInfo",
80
+						async: true,
81
+						dataType: 'json',
82
+						data: {
83
+							token: $.cookie("token"),
84
+							infoid: id
85
+						},
86
+						success: function(data) {
87
+							var con = data.data;
88
+							if(data.state.toLowerCase() == 'success') {
89
+								$('.lb').html(con.F_Category); //所属类别
90
+								$('.cjr').html(con.F_CreateBy); //创建人
91
+								$('.shr').html(con.F_AuditBy); //审核人
92
+								$('.time').html(con.F_CreateOn); //创建日期
93
+								$('.content').html(con.F_Content);
94
+								$('.con_title').html(con.F_Title);
95
+							}
96
+						}
97
+					});
98
+				}
99
+			})
100
+		</script>
101
+	</body>
102
+
103
+</html>