zhoufan 7 lat temu
rodzic
commit
04085b3d12

+ 75 - 72
WebUI/CallCenterWeb.UI/zhiShiKu/conDetail.html

@@ -1,77 +1,80 @@
1
-<!DOCTYPE html>
1
+<!DOCTYPE html>
2 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
-  		
8
-		<title></title>
9
-		<style>
10
-			.diff-wrapper>div,.diff-wrapper{
11
-				height: 100%;
12
-			}
13
-			.diff-wrapper p{
14
-			font-size: 14px;
15
-		    color: #7a7a7a;
16
-		    margin-bottom: 10px;
17
-		    font-weight: 600;
18
-			}
19
-			.original,.changed,.diff1{
20
-				font-size: 12px;
21
-			    color: #7b8a97;
22
-			    margin-top: 0;
23
-			    margin-bottom: 0;
24
-			    line-height: 25px;
25
-			    word-break:break-all;
26
-			    word-wrap:break-word;
27
-			    background: #f5f5f5;
28
-			    height: 90%;
29
-			        padding: 5px;
30
-			}
31
-			.diff-wrapper{
32
-				padding-top: 20px;
33
-			}
34
-		</style>
35
-	</head>
36
-	<body>
37
-		<div class="container-fluid diff-wrapper">
38
-			
39
-			<div class="before col-md-4">
40
-				<p>修改前内容</p>
41
-				<div class="original"></div>
42
-			</div>
43
-			
44
-			<div class="after col-md-4">
45
-				<p>修改后内容</p>
46
-				<div class="changed">
47
-					
48
-				</div>
49
-			</div>
50
-			
51
-			<div class="col-md-4">
52
-				<p>修改前后对比结果 ( <span style="font-size: 12px; color: red;">注: 红色为已删除   绿色为新增</span>)</p>
53
-				<div class="diff1">
54
-					
55
-				</div>
56
-			</div>
57
-			
58
-		</div>
59
-		<script src="../js/content.min.js?v=1.0.0"></script>
60
-	<script src="../js/plugins/diff_match_patch/diff_match_patch.js"></script>
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
+
8
+    <title></title>
9
+    <style>
10
+        .diff-wrapper > div, .diff-wrapper {
11
+            height: 100%;
12
+        }
13
+
14
+            .diff-wrapper p {
15
+                font-size: 14px;
16
+                color: #7a7a7a;
17
+                margin-bottom: 10px;
18
+                font-weight: 600;
19
+            }
20
+
21
+        .original, .changed, .diff1 {
22
+            font-size: 12px;
23
+            color: #7b8a97;
24
+            margin-top: 0;
25
+            margin-bottom: 0;
26
+            line-height: 25px;
27
+            word-break: break-all;
28
+            word-wrap: break-word;
29
+            background: #f5f5f5;
30
+            height: 90%;
31
+            padding: 5px;
32
+        }
33
+
34
+        .diff-wrapper {
35
+            padding-top: 20px;
36
+        }
37
+    </style>
38
+</head>
39
+<body>
40
+    <div class="container-fluid diff-wrapper">
41
+
42
+        <div class="before col-md-4">
43
+            <p>修改前内容</p>
44
+            <div class="original"></div>
45
+        </div>
46
+
47
+        <div class="after col-md-4">
48
+            <p>修改后内容</p>
49
+            <div class="changed">
50
+
51
+            </div>
52
+        </div>
53
+
54
+        <div class="col-md-4">
55
+            <p>修改前后对比结果 ( <span style="font-size: 12px; color: red;">注: 红色为已删除   绿色为新增</span>)</p>
56
+            <div class="diff1">
57
+
58
+            </div>
59
+        </div>
60
+
61
+    </div>
62
+    <script src="../js/content.min.js?v=1.0.0"></script>
63
+    <script src="../js/plugins/diff_match_patch/diff_match_patch.js"></script>
61 64
     <script src="../js/plugins/preetyTextDiff/jquery.pretty-text-diff.min.js"></script>
62 65
     <script>
63
-    	var bef = helper.request.queryString("bef");
64
-    	var aft = helper.request.queryString("aft");
65
-    		bef=unescape(decodeURI(bef));
66
-    		aft=unescape(decodeURI(aft));
67
-		    $('.original').html(bef);	
68
-		    $('.changed').html(aft);	
69
-		    $(document).ready(function(){
70
-		    	$(".diff-wrapper").prettyTextDiff({
71
-				diffContainer: ".diff1"
72
-			});
73
-		    })
74
-    	
66
+        var bef = $('#pre', parent.document).val();
67
+        var aft = $('#aft', parent.document).val();
68
+        bef = decodeURIComponent(bef) ;
69
+        aft = decodeURIComponent(aft);
70
+        $('.original').html(bef);
71
+        $('.changed').html(aft);
72
+        $(document).ready(function () {
73
+            $(".diff-wrapper").prettyTextDiff({
74
+                diffContainer: ".diff1"
75
+            });
76
+        })
77
+
75 78
     </script>
76
-	</body>
79
+</body>
77 80
 </html>

+ 38 - 47
WebUI/CallCenterWeb.UI/zhiShiKu/js/zhiShiKuShenHe.js

@@ -55,11 +55,11 @@ function setCode(val, row, index) {
55 55
 function oper(val,row) {
56 56
     if (val) {
57 57
         var con = helper.filter.Transcoding(val);
58
-        return '<div onclick="seeConDetail(\''+row.F_PreDescription +'\',\''+ row.F_AfterDescription +'\')"> '+ con.substr(0, 20) + "..."; +'</div>'
58
+        return '<div pre=\'' + encodeURIComponent(row.F_PreDescription) + '\' aft=\'' + encodeURIComponent(row.F_AfterDescription) +'\' onclick="seeConDetail(this)"> '+ con.substr(0, 20) + "..."; +'</div>'
59 59
         
60 60
     }
61 61
     else {
62
-        return '<div onclick="seeConDetail('+ row.F_PreDescription +','+  row.F_AfterDescription +')></div>';
62
+        return '<div pre=\'' + encodeURIComponent(row.F_PreDescription) + '\' aft=\'' + encodeURIComponent(row.F_AfterDescription) +'\' onclick="seeConDetail(this)"></div>';
63 63
     }
64 64
 }
65 65
 
@@ -113,50 +113,41 @@ function check(state){
113 113
     }   
114 114
 }
115 115
 var strs='<textarea class="detail" rows="5"  placeholder="请输入审核详情......"></textarea>'
116
- function shenHe(state,did) {
117
-//          layer.open({
118
-////              type: 2,
119
-////              content: "ShenHeDetail.html?state=" + state +'&id='+did, //iframe的url,no代表不显示滚动条
120
-//              content: strs, //iframe的url,no代表不显示滚动条
121
-//              title: '审核详情',
122
-////              area: ['40%', '40%'], //宽高
123
-//          });
124
-        var lay=layer.open({
125
-				  title: '审核详情'
126
-				  ,content: strs,
127
-				  area: ['60%', '80%'], //宽高
128
-				  yes:function(){
129
-				  	$.ajax({
130
-					type:"post",
131
-					url:huayi.config.callcenter_url+"Knowledge/AuditR",
132
-					async:true,
133
-					dataType:'json',
134
-					data:{
135
-						ids:did,
136
-						auditremark:$('.detail').val(),
137
-						ispass:state,
138
-						token: $.cookie("token")
139
-					},
140
-					success:function(data){
141
-						if(data.state.toLowerCase()=='success'){
142
-								layer.msg(data.message);
143
-								initTable(action,isPass);
144
-						}
145
-					}
146
-				});
147
-				  }
148
-				});  
149
-	}
116
+function shenHe(state, did) {
117
+    var lay = layer.open({
118
+        title: '审核详情'
119
+        , content: strs,
120
+        area: ['60%', '80%'], //宽高
121
+        yes: function () {
122
+            $.ajax({
123
+                type: "post",
124
+                url: huayi.config.callcenter_url + "Knowledge/AuditR",
125
+                async: true,
126
+                dataType: 'json',
127
+                data: {
128
+                    ids: did,
129
+                    auditremark: $('.detail').val(),
130
+                    ispass: state,
131
+                    token: $.cookie("token")
132
+                },
133
+                success: function (data) {
134
+                    if (data.state.toLowerCase() == 'success') {
135
+                        layer.msg(data.message);
136
+                        initTable(action, isPass);
137
+                    }
138
+                }
139
+            });
140
+        }
141
+    });
142
+}
150 143
 
151
-function seeConDetail(bef,aft) {
152
-//	var con='<div class="before original"> '+ bef +'</div>'+
153
-//			
154
-//			'<div class="after changed">aaaaaaa</div>'
155
-		
156
-	layer.open({
157
-		type: 2,
158
-		content: "conDetail.html?bef=" + bef + "&aft=" + aft, //iframe的url,no代表不显示滚动条
159
-		title: '查看内容详情',
160
-		area: ['60%', '70%'], //宽高
161
-		});
144
+function seeConDetail(obj) {
145
+    $("#pre").val($(obj).attr("pre"));
146
+    $("#aft").val($(obj).attr("aft"));
147
+    layer.open({
148
+        type: 2,
149
+        content: "conDetail.html", //iframe的url,no代表不显示滚动条
150
+        title: '查看内容详情',
151
+        area: ['60%', '70%'], //宽高
152
+    });
162 153
 }

+ 27 - 21
WebUI/CallCenterWeb.UI/zhiShiKu/zhiShiKuShenHe.html

@@ -115,10 +115,11 @@
115 115
             text-overflow: ellipsis;
116 116
             text-align: left;
117 117
         }
118
-        .detail{
119
-        	width: 80%;
120
-        	display: block;
121
-        	margin: 0 auto;
118
+
119
+        .detail {
120
+            width: 80%;
121
+            display: block;
122
+            margin: 0 auto;
122 123
         }
123 124
     </style>
124 125
 </head>
@@ -132,29 +133,33 @@
132 133
         </div>
133 134
         <div class="toolBar clearfix">
134 135
             <div class="toolRight">
135
-                <span>动作:<select name="" id="action" class="select_">
136
-                    <option value="" selected="selected">全部</option>
137
-                	<option value="1">添加</option>
138
-                	<option value="2">修改</option>
139
-                	<option value="3">删除</option>
140
-                </select></span>
141
-                <span>审核状态:<select name="" id="isPass" class="select_">
142
-                    <option value="">全部</option>
143
-                    <option value="1">通过</option>
144
-                	<option value="0" selected="selected">未审核</option>
145
-                	<option value="-1">未通过</option>
146
-                </select></span>
136
+                <span>
137
+                    动作:<select name="" id="action" class="select_">
138
+                        <option value="" selected="selected">全部</option>
139
+                        <option value="1">添加</option>
140
+                        <option value="2">修改</option>
141
+                        <option value="3">删除</option>
142
+                    </select>
143
+                </span>
144
+                <span>
145
+                    审核状态:<select name="" id="isPass" class="select_">
146
+                        <option value="">全部</option>
147
+                        <option value="1">通过</option>
148
+                        <option value="0" selected="selected">未审核</option>
149
+                        <option value="-1">未通过</option>
150
+                    </select>
151
+                </span>
147 152
                 <button class="btns searchGo">搜索</button>
148 153
             </div>
149 154
 
150 155
         </div>
151 156
         <div class="treeTable clearfix">
152
-          
157
+
153 158
             <div class="tableCon col-md-12">
154 159
                 <table id="table1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
155 160
                     <thead>
156 161
                         <tr>
157
-                        	<th data-checkbox="true" data-align="center"></th>
162
+                            <th data-checkbox="true" data-align="center"></th>
158 163
                             <th data-align="center" data-formatter="setCode">编号</th>
159 164
                             <th data-field="F_Action" data-formatter="shaction" data-align="left">动作</th>
160 165
                             <th data-field="F_Title" data-align="center">标题</th>
@@ -168,10 +173,11 @@
168 173
                     <tbody id="tbody"></tbody>
169 174
                 </table>
170 175
                 <p style="margin-top:15px ;">
171
-                	<button class="btns pass">审核通过</button>
172
-                <button class="btns noPass">审核不通过</button>
176
+                    <button class="btns pass">审核通过</button>
177
+                    <button class="btns noPass">审核不通过</button>
173 178
                 </p>
174
-                
179
+                <input id="pre" type="hidden" />
180
+                <input id="aft" type="hidden" />
175 181
             </div>
176 182
         </div>
177 183