Pārlūkot izejas kodu

试题管理 ,问卷设置

d123 8 gadi atpakaļ
vecāks
revīzija
48bd69b368

+ 2 - 1
CallCenterWeb.UI/Questionnaire/AddRight.html

@@ -53,6 +53,7 @@
53 53
 			.Show {
54 54
 				display: block;
55 55
 			}
56
+			
56 57
 		</style>
57 58
 	</head>
58 59
 
@@ -94,7 +95,7 @@
94 95
 					</table>
95 96
 
96 97
 				</div>
97
-				
98
+
98 99
 				<div style="text-align: center; margin-top: 50px;">
99 100
 					<button class="btns add size-14">保存</button>
100 101
 				</div>

+ 30 - 118
CallCenterWeb.UI/Questionnaire/QuestionSetting.html

@@ -79,6 +79,19 @@
79 79
 			label {
80 80
 				margin-right: 10px;
81 81
 			}
82
+			#tbr{
83
+				display: none;
84
+			}
85
+			.WJmessage{
86
+				line-height: 20px;
87
+				border-bottom: 1px solid #ccc;
88
+    padding-bottom: 10px;
89
+			}
90
+			.IMG_box{
91
+				text-align: center;
92
+				padding: 10px;
93
+				border: 1px solid #ccc;
94
+			}
82 95
 		</style>
83 96
 	</head>
84 97
 
@@ -125,34 +138,39 @@
125 138
 			</div>
126 139
 			<!--右边/-->
127 140
 			<div class="tbright" style="width: 70%;">
128
-				<h4 style="line-height: 20px;">问卷信息</h4>
141
+				<h4 style="" class="WJmessage">问卷信息</h4>
142
+				<div class="IMG_content">
143
+					<div class="IMG_box">
144
+						<img src="../img/wjdc.jpg" alt="" />
145
+					</div>
146
+				</div>
129 147
 				<table id="tbr" style="width: 100%;">
130 148
 					<thead>
131 149
 						<tr>
132 150
 
133
-							<th>问卷名称:</th>
134
-							<td>问卷说明问卷说明问卷说明问卷说明</td>
151
+							<th style='width: 150px;'>问卷名称:</th>
152
+							<td colspan="7" ><span class="Title"></span></td>
135 153
 
136 154
 						</tr>
137 155
 						<tr>
138 156
 
139
-							<th>问卷说明:</th>
140
-							<td>问卷说明:问卷说明问卷说明问卷说明问卷说明</td>
157
+							<th style='width: 150px;'>问卷说明:</th>
158
+							<td  ><span class="F_Remark"></span></td>
141 159
 
142 160
 						</tr>
143 161
 					</thead>
144
-					<tbody>
162
+					<tbody class="tbody">
145 163
 						<tr class="Back">
146 164
 							<td colspan="2">
147 165
 								<h3 class="size-14">1、对我们的产品是否满意? </h3>
148 166
 							</td>
149 167
 						</tr>
150
-						<tr>
168
+						<tr class="">
151 169
 							<td colspan="2">
152 170
 								<div class="Message_box">
153
-									<label style="font-weight: normal;"><input type="radio" value="537" name="ltype" checked="checked"> 一般</label>
154
-									<label style="font-weight: normal;"><input type="radio" value="538" name="ltype" checked="checked"> 满意</label>
155
-									<label style="font-weight: normal;"><input type="radio" value="539" name="ltype" checked="checked">不满意</label>
171
+									<label style="font-weight: normal;"><input type="checkbox" value="537" name="ltype" > 一般</label>
172
+									<label style="font-weight: normal;"><input type="checkbox" value="538" name="ltype" > 满意</label>
173
+									<label style="font-weight: normal;"><input type="checkbox" value="539" name="ltype" >不满意</label>
156 174
 								</div>
157 175
 							</td>
158 176
 						</tr>
@@ -172,114 +190,8 @@
172 190
 				</table>
173 191
 			</div>
174 192
 		</div>
175
-		<div class="model">
176
-			<!--右边弹框-->
177
-			<div class="rightBox">
178
-				<div class="btop clearfix">
179
-					<p class="rbtl">&nbsp;&nbsp;<span class="tps" style="color: red;"></span></p>
180
-					<p class="rbtr" title="关闭">X</p>
181
-
182
-				</div>
183
-
184
-				<div class="sqzx">
185
-					<table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
186
-						<tr>
187
-							<th>所属分类:</th>
188
-							<td>
189
-								<div class="inpBox">
190
-									<input type="text" class="inps  inps2 _CategoryName tree" id="clbmname" />
191
-									<input type="hidden" class="inps" id="zrbm" />
192
-									<i class="xl xl_two"></i>
193
-									<b class="de_icon">X</b>
194
-									<div class="addTree">
195
-										<ul id="clbmtree" class="ztree"></ul>
196
-									</div>
197
-								</div>
198
-							</td>
199
-						</tr>
200
-						<tr>
201
-							<th>指标标题:</th>
202
-							<td>
203
-								<div class="inpBox">
204
-									<input type="text" class="inps  inps2 F_Title" />
205
-								</div>
206
-							</td>
207
-						</tr>
208
-						<tr>
209
-							<th>指标描述:</th>
210
-							<td colspan="5">
211
-
212
-								<textarea name="" rows="3" cols="20" class="F_Remark"></textarea>
213
-
214
-							</td>
215
-						</tr>
216
-						<tr>
217
-							<th>指标分值:</th>
218
-							<td>
219
-								<div class="inpBox">
220
-									<input type="text" class="inps  inps2 _Score" />
221
-								</div>
222
-							</td>
223
-						</tr>
224
-						<tr>
225
-							<th>排列序号:</th>
226
-							<td>
227
-								<div class="inpBox">
228
-									<input type="text" class="inps  inps2 _Sort" />
229
-								</div>
230
-							</td>
231
-						</tr>
232
-					</table>
233
-					<div class="btn_">
234
-						<input type="button" value="保存" class="btns" id="xg_btn" />
235
-						<input type="button" value="保存" class="btns" id="add" />
236
-					</div>
237
-				</div>
238
-			</div>
239
-			<!--左边弹框-->
240
-			<div class="leftBox">
241
-				<div class="btop clearfix">
242
-					<p class="rbtl">&nbsp;&nbsp;<span class="tps" style="color: red;"></span></p>
243
-					<p class="rbtr" title="关闭">X</p>
244
-
245
-				</div>
246
-
247
-				<div class="sqzx">
248
-					<table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
249
-						<tr>
250
-							<th>所属分类:</th>
251
-							<td>
252
-								<div class="inpBox">
253
-									<select name="" id="Left_ParentId">
254
-
255
-									</select>
256
-								</div>
257
-							</td>
258
-						</tr>
259
-						<tr>
260
-							<th>分类名称:</th>
261
-							<td>
262
-								<div class="inpBox">
263
-									<input type="text" class="inps  inps2 " id="Left_CategoryName" />
264
-								</div>
265
-							</td>
266
-						</tr>
267
-						<tr>
268
-							<th>排列序号:</th>
269
-							<td>
270
-								<div class="inpBox">
271
-									<input type="text" class="inps  inps2 " id="Left_Sort" />
272
-								</div>
273
-							</td>
274
-						</tr>
275
-					</table>
276
-					<div class="btn_">
277
-						<input type="button" value="保存" class="btns" id="Left_xgbtn" />
278
-						<input type="button" value="保存" class="btns" id="Left_add" />
279
-					</div>
280
-				</div>
281
-			</div>
282
-		</div>
193
+		
194
+			
283 195
 	</body>
284 196
 	<script src="../js/jquery.min.js?v=2.1.4"></script>
285 197
 	<script src="../js/bootstrap.min.js"></script>

+ 11 - 114
CallCenterWeb.UI/Questionnaire/QuestionsManagement.html

@@ -60,6 +60,11 @@
60 60
 			.w{
61 61
 				color: #e43926;
62 62
 			}
63
+			.Title_box{
64
+				line-height: 20px;
65
+				border-bottom: 1px solid #ccc;
66
+				padding-bottom: 10px;
67
+			}
63 68
 		</style>
64 69
 	</head>
65 70
 
@@ -90,7 +95,7 @@
90 95
 		</div>
91 96
 		<div class='wrap'>
92 97
 			<div class="tbleft">
93
-				<h4 style="line-height: 20px;"><i class="fa fa-file-text-o size-14"></i>试题分类</h4>
98
+				<h4  class="Title_box">试题分类</h4>
94 99
 				<div class="anniu " class="toolbar1  ">
95 100
 					<button class="leftAdd btn size-14"><i class="fa fa-plus size-14"></i>增加</button>
96 101
 					<button class="leftChange btn size-14"><i class="fa fa-pencil size-14"></i>修改</button>
@@ -101,7 +106,6 @@
101 106
 						<tr>
102 107
 							<th data-field="checkbox" data-align="center" data-formatter="setCode"></th>
103 108
 							<th data-align="center" data-field="F_CategoryName">试题分类</th>
104
-
105 109
 						</tr>
106 110
 					</thead>
107 111
 					<tbody>
@@ -110,7 +114,7 @@
110 114
 			</div>
111 115
 			<!--右边/-->
112 116
 			<div class="tbright">
113
-				<h4 style="line-height: 20px;">试题列表</h4>
117
+				<h4  class="Title_box">试题列表</h4>
114 118
 				<div class="anniu" class="toolbar2">
115 119
 					<button class="rightAdd btn size-14"><i class="fa fa-plus size-14"></i>增加</button>
116 120
 					<button class="rightChange btn size-14"><i class="fa fa-pencil size-14"></i>修改</button>
@@ -121,11 +125,11 @@
121 125
 					<thead>
122 126
 						<tr>
123 127
 							<th data-align="center" data-field="id" data-formatter="setCode"></th>
124
-							<th data-align="center" data-field="F_CategoryName">试题分类</th>
125
-							<th data-align="center"  data-field="F_Type" data-formatter="Type">试题类型</th>
128
+							<th data-align="center" data-field="F_CategoryName" >试题分类</th>
129
+							<th data-align="center"  data-field="F_Type"  data-formatter="Type">试题类型</th>
126 130
 							<th data-align="center" data-field="F_Title">试题标题</th>
127 131
 							<th data-align="center" data-field="F_Content">试题内容</th>
128
-							<th data-align="center" data-field="F_Type"data-formatter="Code">操作</th>
132
+							<!--<th data-align="center" data-field="F_Type"data-formatter="Code">操作</th>-->
129 133
 						</tr>
130 134
 					</thead>
131 135
 					<tbody>
@@ -133,114 +137,7 @@
133 137
 				</table>
134 138
 			</div>
135 139
 		</div>
136
-		<div class="model">
137
-			<!--右边弹框-->
138
-			<div class="rightBox">
139
-				<div class="btop clearfix">
140
-					<p class="rbtl">&nbsp;&nbsp;<span class="tps" style="color: red;"></span></p>
141
-					<p class="rbtr" title="关闭">X</p>
142
-
143
-				</div>
144
-
145
-				<div class="sqzx">
146
-					<table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
147
-						<tr>
148
-							<th>所属分类:</th>
149
-							<td>
150
-								<div class="inpBox">
151
-									<input type="text" class="inps  inps2 _CategoryName tree" id="clbmname" />
152
-									<input type="hidden" class="inps" id="zrbm" />
153
-									<i class="xl xl_two"></i>
154
-									<b class="de_icon">X</b>
155
-									<div class="addTree">
156
-										<ul id="clbmtree" class="ztree"></ul>
157
-									</div>
158
-								</div>
159
-							</td>
160
-						</tr>
161
-						<tr>
162
-							<th>指标标题:</th>
163
-							<td>
164
-								<div class="inpBox">
165
-									<input type="text" class="inps  inps2 F_Title" />
166
-								</div>
167
-							</td>
168
-						</tr>
169
-						<tr>
170
-							<th>指标描述:</th>
171
-							<td colspan="5">
172
-
173
-								<textarea name="" rows="3" cols="20" class="F_Remark"></textarea>
174
-
175
-							</td>
176
-						</tr>
177
-						<tr>
178
-							<th>指标分值:</th>
179
-							<td>
180
-								<div class="inpBox">
181
-									<input type="text" class="inps  inps2 _Score" />
182
-								</div>
183
-							</td>
184
-						</tr>
185
-						<tr>
186
-							<th>排列序号:</th>
187
-							<td>
188
-								<div class="inpBox">
189
-									<input type="text" class="inps  inps2 _Sort" />
190
-								</div>
191
-							</td>
192
-						</tr>
193
-					</table>
194
-					<div class="btn_">
195
-						<input type="button" value="保存" class="btns" id="xg_btn" />
196
-						<input type="button" value="保存" class="btns" id="add" />
197
-					</div>
198
-				</div>
199
-			</div>
200
-			<!--左边弹框-->
201
-			<div class="leftBox">
202
-				<div class="btop clearfix">
203
-					<p class="rbtl">&nbsp;&nbsp;<span class="tps" style="color: red;"></span></p>
204
-					<p class="rbtr" title="关闭">X</p>
205
-
206
-				</div>
207
-
208
-				<div class="sqzx">
209
-					<table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
210
-						<tr>
211
-							<th>所属分类:</th>
212
-							<td>
213
-								<div class="inpBox">
214
-									<select name="" id="Left_ParentId">
215
-
216
-									</select>
217
-								</div>
218
-							</td>
219
-						</tr>
220
-						<tr>
221
-							<th>分类名称:</th>
222
-							<td>
223
-								<div class="inpBox">
224
-									<input type="text" class="inps  inps2 " id="Left_CategoryName" />
225
-								</div>
226
-							</td>
227
-						</tr>
228
-						<tr>
229
-							<th>排列序号:</th>
230
-							<td>
231
-								<div class="inpBox">
232
-									<input type="text" class="inps  inps2 " id="Left_Sort" />
233
-								</div>
234
-							</td>
235
-						</tr>
236
-					</table>
237
-					<div class="btn_">
238
-						<input type="button" value="保存" class="btns" id="Left_xgbtn" />
239
-						<input type="button" value="保存" class="btns" id="Left_add" />
240
-					</div>
241
-				</div>
242
-			</div>
243
-		</div>
140
+		
244 141
 	</body>
245 142
 	<script src="../js/jquery.min.js?v=2.1.4"></script>
246 143
 	<script src="../js/bootstrap.min.js"></script>

+ 1 - 27
CallCenterWeb.UI/Questionnaire/XgRight.html

@@ -42,13 +42,6 @@
42 42
 				width: 100%;
43 43
 			}
44 44
 			
45
-			.tab {
46
-				border-bottom: 1px solid #ccc;
47
-			}
48
-			
49
-			.Check_box {
50
-				display: none;
51
-			}
52 45
 		</style>
53 46
 	</head>
54 47
 
@@ -90,21 +83,6 @@
90 83
 					</table>
91 84
 
92 85
 				</div>
93
-				<div class="Check_box">
94
-					<h3>试题选项</h3>
95
-					<h3 style="font-size: 14px; text-align: right;"><i class="fa fa-plus size-14" id="Add"></i>添加选项</h3>
96
-					<table id="tbr" style="width: 100%;">
97
-						<thead>
98
-							<tr>
99
-								<th data-align="center" data-field="id" data-formatter="setCode">序号</th>
100
-								<th data-align="center" data-field="F_CategoryName" data-formatter="Check">选项</th>
101
-								<th data-align="center" data-field="F_Title" data-formatter="Remove">操作</th>
102
-							</tr>
103
-						</thead>
104
-						<tbody>
105
-						</tbody>
106
-					</table>
107
-				</div>
108 86
 				<div style="text-align: center; margin-top: 50px;">
109 87
 					<button class="btns add size-14">保存</button>
110 88
 				</div>
@@ -133,11 +111,7 @@
133 111
 							QuestionId=data.data.F_QuestionId;
134 112
 							$("#CheckQuestion").val(data.data.F_Type); //问题类型F_Title
135 113
 							$('.F_Remark').val(data.data.F_Title)//标题
136
-							if(data.data.F_Type == "1") {
137
-								$(".Check_box").hide();
138
-							} else {
139
-								$(".Check_box").show();
140
-							}
114
+
141 115
 						}
142 116
 
143 117
 					}

+ 1 - 0
CallCenterWeb.UI/Questionnaire/modify.html

@@ -75,6 +75,7 @@
75 75
 							if(data.state == "success") {
76 76
 								var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
77 77
 								parent.layer.close(index); //再执行关闭
78
+								parent.IndexCategoryGe();
78 79
 								parent.layer.msg("修改成功");
79 80
 							}
80 81
 

+ 167 - 0
CallCenterWeb.UI/Questionnaire/xgWenjuanxinxi.html

@@ -0,0 +1,167 @@
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 href="../css/Table/table1.css" rel="stylesheet" />
9
+		<link href="../css/init.css" rel="stylesheet" />
10
+		<link rel="stylesheet" href="../css/Quality/bootstrap-editable.css" />
11
+		<script src="../js/Questions/bootstrap-editable.js"></script>
12
+		<title></title>
13
+		<style>
14
+			table tr {
15
+				margin-bottom: 20px;
16
+			}
17
+			
18
+			table tr td {
19
+				text-align: left;
20
+				padding: 5px;
21
+			}
22
+			
23
+			.Content {
24
+				padding: 10px;
25
+			}
26
+			
27
+			.btn {
28
+				background: #1ab394;
29
+			}
30
+			
31
+			.Btn_box {
32
+				margin-top: 20px;
33
+				color: #fff;
34
+			}
35
+			
36
+			.inpBox select {
37
+				width: 150px;
38
+				padding: 3px 6px;
39
+			}
40
+			
41
+			.F_Remark {
42
+				width: 100%;
43
+			}
44
+			
45
+			.tab {
46
+				border-bottom: 1px solid #ccc;
47
+			}
48
+			
49
+			.Check_box {
50
+				display: none;
51
+			}
52
+			
53
+			.Show {
54
+				display: block;
55
+			}
56
+			
57
+			#sqzx th {
58
+				width: 100px;
59
+			}
60
+			
61
+			.d {
62
+				color: forestgreen;
63
+			}
64
+			
65
+			.du {
66
+				color: #0064B6;
67
+			}
68
+			
69
+			.w {
70
+				color: #e43926;
71
+			}
72
+		</style>
73
+	</head>
74
+
75
+	<body>
76
+		<div>
77
+			<div class="Content">
78
+				<div class="tab">
79
+
80
+					<table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
81
+						<tr>
82
+							<th>问卷名称:</th>
83
+							<td colspan="5">
84
+								<input type="text" class="Title" />
85
+							</td>
86
+						</tr>
87
+						<tr>
88
+							<th>问卷说明:</th>
89
+							<td colspan="5">
90
+								<textarea name="" rows="3" cols="20" class="F_Remark"></textarea>
91
+
92
+							</td>
93
+						</tr>
94
+
95
+					</table>
96
+
97
+				</div>			
98
+				<div style="text-align: center; margin-top: 50px;">
99
+					<button class="btns add size-14">保存</button>
100
+				</div>
101
+			</div>
102
+		</div>
103
+		<script>
104
+		var wid = helper.request.queryString("Str");
105
+			$(document).ready(function() {
106
+				//获取问卷信息
107
+				if(wid){
108
+					$.ajax({
109
+					type: "get",
110
+					url: huayi.config.callcenter_url + "/Questionnaire/GetPagerInfoModel",
111
+					async: true,
112
+					dataType: "json",
113
+					data: {
114
+						pid:wid,
115
+						token: $.cookie("token"),
116
+
117
+					},
118
+					success: function(data) {
119
+						if(data.state.toLowerCase() == 'success') {
120
+							  console.log(data);
121
+							  $('.Title').val(data.data.F_Title);
122
+							  $(".F_Remark").val(data.data.F_Remark);
123
+
124
+						}
125
+					}
126
+				});
127
+				}
128
+				//增加
129
+			$(".add").click(function() {
130
+				var Title = $(".Title").val(); //问卷名称
131
+				var Remark = $(".F_Remark").val(); //问卷内容
132
+				if(!Remark) {
133
+					layer.msg("内容不能为空");
134
+				} else if(!Title) {
135
+					layer.msg("标题不能为空");
136
+				}
137
+				$.ajax({
138
+					type: "post",
139
+					url: huayi.config.callcenter_url + "/Questionnaire/CreateOrUpdatePager",
140
+					async: true,
141
+					dataType: "json",
142
+					data: {
143
+						Id:wid,
144
+						Title:  Title, 
145
+						Remark:Remark , 
146
+						token: $.cookie("token"),
147
+
148
+					},
149
+					success: function(data) {
150
+						if(data.state.toLowerCase() == 'success') {
151
+							var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
152
+							parent.layer.close(index); //再执行关闭
153
+							parent.IndexCategoryGe()
154
+							parent.layer.msg(data.message);
155
+
156
+						}
157
+					}
158
+				});
159
+			})
160
+			});
161
+
162
+			
163
+
164
+		</script>
165
+	</body>
166
+
167
+</html>

+ 2 - 2
CallCenterWeb.UI/Script/Common/huayi.config.js

@@ -4,8 +4,8 @@
4 4
 huayi.config = {
5 5
     //callcenter_url: "http://192.168.1.88:9026/",//生产环境
6 6
 
7
-    callcenter_url: "http://localhost:63597/",//测试环境
8
-
7
+//  callcenter_url: "http://localhost:63597/",//测试环境
8
+ callcenter_url: "http://192.168.4.18:9090/",//测试环境
9 9
     socket_ip: "192.168.5.7",//ip
10 10
     socket_port: "8081",//端口
11 11
     menuworktime: 30000,//菜单工单数量刷新间隔

BIN
CallCenterWeb.UI/img/wjdc.jpg


+ 92 - 174
CallCenterWeb.UI/js/Questions/QuestionSetting.js

@@ -69,9 +69,9 @@ $tableLeft1.on("click-row.bs.table", function(e, row, ele) {
69 69
 	$('.success').removeClass('success'); //去除之前选中的行的,选中样式
70 70
 	$(ele).addClass('success'); //添加当前选中的 success样式用于区别
71 71
 	Left_Cids = row.F_PagerId; //问卷ID
72
-
73
-	console.log(Left_Cids);
74
-	Right(Left_Cids);///获取问卷
72
+	$(".IMG_content").hide();
73
+   $('#tbr').show();
74
+	XQ(Left_Cids); ///获取问卷
75 75
 });
76 76
 //z获取问卷列表
77 77
 function IndexCategoryGe() {
@@ -109,35 +109,25 @@ function IndexCategoryGe() {
109 109
 		}
110 110
 	});
111 111
 }
112
+//编号
113
+function setCode(val, row, index) {
114
+	return index + 1;
115
+}
116
+
112 117
 //操作
113
-function Code(val){
114
-	return'<a  onclick="Add('+val+')">操作</a>'
118
+function Code(val) {
119
+	return '<a  onclick="Add(' + val + ')">操作</a>'
115 120
 }
116 121
 //右边操作
117
-function Add(val){
118
-		layer.open({
122
+function Add(val) {
123
+	layer.open({
119 124
 		type: 2,
120
-		content: "../Questionnaire/addSetting.html?str="+val, //iframe的url,no代表不显示滚动条
125
+		content: "../Questionnaire/addSetting.html?str=" + val, //iframe的url,no代表不显示滚动条
121 126
 		title: '问卷信息',
122 127
 		area: ['80%', '75%'], //宽高
123 128
 	});
124 129
 }
125
-//问卷信息
126
- function Right(Left_Cids){
127
- 	$.ajax({
128
-		type: "get",
129
-		url: huayi.config.callcenter_url + "Questionnaire/GetPagerInfoQ",
130
-		dataType: 'json',
131
-		data: {
132
-			pid: Left_Cids,
133
-			token: token
134
-		},
135
-		async: true,
136
-		success: function(data) {
137
-			
138
-		}
139
-	});
140
- }
130
+
141 131
 //删除
142 132
 $('.leftDelete').click(function() {
143 133
 	if(Left_Cids) {
@@ -151,7 +141,7 @@ $('.leftDelete').click(function() {
151 141
 function DelIndexCategory(Left_Cids) {
152 142
 	$.ajax({
153 143
 		type: "get",
154
-		url: huayi.config.callcenter_url + "IndexCategory/DelIndexCategory",
144
+		url: huayi.config.callcenter_url + "/Questionnaire/DeletePagerInfo",
155 145
 		//url: '//117.158.196.116:8878/IndexCategory/DelIndexCategory',
156 146
 		dataType: 'json',
157 147
 		data: {
@@ -166,12 +156,13 @@ function DelIndexCategory(Left_Cids) {
166 156
 }
167 157
 ///修改功能
168 158
 $(".leftChange ").click(function() {
159
+	var Str = Left_Cids;
169 160
 	if(Left_Cids) {
170 161
 		layer.open({
171 162
 			type: 2,
172
-			content: "../Questionnaire/modify.html", //iframe的url,no代表不显示滚动条
173
-			title: '修改分类',
174
-			area: ['35%', '30%'], //宽高
163
+			content: "../Questionnaire/xgWenjuanxinxi.html?str=" + Str, //iframe的url,no代表不显示滚动条
164
+			title: '修改问卷',
165
+			area: ['35%', '40%'], //宽高
175 166
 		});
176 167
 
177 168
 	} else {
@@ -202,169 +193,96 @@ function Select() {
202 193
 		}
203 194
 	});
204 195
 }
205
-//编辑指标分类
206
-function EditIndexCategory(Left_Cids, Left_CategoryName, Left_Sort, Left_Pid) {
207
-	$.ajax({
208
-		type: "post",
209
-		url: huayi.config.callcenter_url + "IndexCategory/EditIndexCategory",
210
-		//			url: '//117.158.196.116:8878/IndexCategory/EditIndexCategory',
211
-		dataType: 'json',
212
-		data: {
213
-			cid: Left_Cids,
214
-			categoryName: Left_CategoryName,
215
-			sort: Left_Sort,
216
-			pid: Left_Pid,
217
-			token: token
218
-		},
219
-		async: true,
220
-		success: function(data) {
221
-			layer.msg("修改成功");
222
-			IndexCategoryGe();
223
-			Left_clean();
224
-		}
225
-	});
226
-}
227 196
 
228
-$("#Left_xgbtn").click(function() {
229
-	Left_CategoryName = escape($("#Left_CategoryName").val());
230
-	Left_Sort = $("#Left_Sort").val();
231
-	EditIndexCategory(Left_Cids, Left_CategoryName, Left_Sort, Left_Pid);
232
-})
197
+
233 198
 //增加
234 199
 $(".leftAdd").click(function() {
235
- var Str=Left_Cids;
236
- console.log(Str);
200
+	var Str = Left_Cids;
201
+	console.log(Str);
237 202
 	layer.open({
238 203
 		type: 2,
239 204
 		content: "../Questionnaire/addSWenjuanxinxi.html?", //iframe的url,no代表不显示滚动条
240 205
 		title: '问卷信息',
241 206
 		area: ['35%', '40%'], //宽高
242 207
 	});
243
-//	layer.open({
244
-//		type: 2,
245
-//		content: "../Questionnaire/addSetting.html?str="+Str, //iframe的url,no代表不显示滚动条
246
-//		title: '问卷信息',
247
-//		area: ['80%', '75%'], //宽高
248
-//	});
249
-});
250
-$("#Left_add").click(function() {
251
-	Left_CategoryName = escape($("#Left_CategoryName").val());
252
-	Left_Sort = $("#Left_Sort").val();
253
-	console.log(Left_CategoryName, Left_Sort, Left_Pid);
254
-	AddIndexCategory(Left_CategoryName, Left_Sort, Left_Pid)
255 208
 });
256 209
 
257
-function AddIndexCategory(Left_CategoryName, Left_Sort, Left_Pid) {
258
-	$.ajax({
259
-		type: "post",
260
-		url: huayi.config.callcenter_url + "IndexCategory/AddIndexCategory",
261
-		//			url: '//117.158.196.116:8878/IndexCategory/AddIndexCategory',
262
-		dataType: 'json',
263
-		data: {
264
-			categoryName: Left_CategoryName,
265
-			sort: Left_Sort,
266
-			pid: Left_Pid,
267
-			token: token
268
-		},
269
-		async: true,
270
-		success: function(data) {
271
-			layer.msg("添加成功");
272
-			IndexCategoryGe();
273
-			Left_clean();
274
-		}
275
-	});
276
-}
277
-
278
-function Left_clean() {
279
-	$("#Left_CategoryName").val('');
280
-	$("#Left_Sort").val('');
281
-	$(".model").hide();
282
-}
283
-
284 210
 ////////////////////////////////////////////////////////////////右边表格
285
-
286
-//编号
287
-function setCode(val, row, index) {
288
-	return index + 1;
289
-}
290
-
291
-//关闭阴影
292
-$(".rbtr").click(function() {
293
-	$(".model").hide();
294
-})
295
-
296
-//修改保存
297
-$("#xg_btn").click(function() {
298
-	CategoryName = $("._CategoryName").val();
299
-	Score = $("._Score").val();
300
-	Sort = $("._Sort").val();
301
-	Title = $(".F_Title").val();
302
-	Remark = $(".F_Remark").val();
303
-	console.log(Score, Sort, Title, Remark, Cids, ids);
304
-	EditIndexBas(Cids, ids, Sort, Score, Title, Remark);
305
-});
306
-//增加按钮	
307
-$("#add").click(function() {
308
-	Score = $("._Score").val();
309
-	Sort = $("._Sort").val();
310
-	Title = $(".F_Title").val();
311
-	Remark = escape($(".F_Remark").val());
312
-	AddIndexBase(Cids, Sort, Score, Title, Remark)
313
-});
314
-//编辑指标
315
-function EditIndexBas(Cids, ids, Sort, Score, Title, Remark) {
211
+//详情展示
212
+function XQ(Left_Cids) {
213
+	$(".tbody").empty();
316 214
 	$.ajax({
317
-		type: "post",
318
-		// url: huayi.config.callcenter_url + "IndexBase/EditIndexBasey",
319
-		url: '//117.158.196.116:8878/IndexBase/EditIndexBase',
320
-		dataType: 'json',
321
-		data: {
322
-			id: ids,
323
-			cid: Cids, //指标分类id
324
-			sort: Sort, //排序
325
-			score: Score,
326
-			title: Title,
327
-			remark: Remark,
328
-			token: token
329
-		},
215
+		type: "get",
216
+		url: huayi.config.callcenter_url + "/Questionnaire/GetPagerInfoQ",
330 217
 		async: true,
331
-		success: function(data) {
332
-			if(data.state == "success") {
333
-				Clean();
334
-				layer.msg('修改成功!');
335
-				Finish();
336
-			} else {
337
-				alert("修改失败");
338
-				$(".model").hide();
339
-			}
340
-		}
341
-	});
342
-}
343
-
344
-//添加指标
345
-function AddIndexBase(Cids, Sort, Score, Title, Remark) {
346
-	$.ajax({
347
-		type: "post",
348
-		url: huayi.config.callcenter_url + "IndexBase/AddIndexBase",
349
-		//			url: '//117.158.196.116:8878/IndexBase/AddIndexBase',
350
-		dataType: 'json',
218
+		dataType: "json",
351 219
 		data: {
352
-			cid: Cids, //指标分类id
353
-			sort: Sort, //排序
354
-			score: Score,
355
-			title: Title,
356
-			remark: Remark,
357
-			token: token
220
+			pid:Left_Cids,
221
+			token: $.cookie("token"),
222
+
358 223
 		},
359
-		async: true,
360 224
 		success: function(data) {
361
-			if(data.state == "success") {
362
-				Clean();
363
-				layer.msg('添加成功!');
364
-				Finish();
365
-			} else {
366
-				alert("2");
367
-				$(".model").hide();
225
+			if(data.state.toLowerCase() == 'success') {
226
+				console.log(data);
227
+				$('.Title').text(data.data.F_Title);
228
+				$(".F_Remark").text(data.data.F_Remark);
229
+				var Questions = data.data.F_Questions;
230
+				var html = '';
231
+				for(var i = 0; i < Questions.length; i++) {
232
+					var questype = Questions[i].questype;
233
+
234
+					html += '<tr class="Back">';
235
+					html += '<td colspan="7">';
236
+					html += '<h3 class="size-14">' + Questions[i].questitle + ' </h3>';
237
+					html += '</td>';
238
+					html += '</tr>';
239
+					//判断类型
240
+					if(questype == 2) { //问答题
241
+						//选项
242
+						if(Questions[i].quesitems.length > 0) {
243
+							html += '<tr >';
244
+							html += '<td colspan="2">';
245
+							html += '<div>';
246
+							var quesitems = Questions[i].quesitems;
247
+							for(var j = 0; j < quesitems.length; j++) {
248
+								html += '<label style="font-weight: normal;">'
249
+								html += '<input type="radio" value="' + quesitems[j].itemid + '" name="ltype" > ' + quesitems[j].itemname + '</label>'
250
+							}
251
+							html += '</div>'
252
+							html += '</td>'
253
+							html += '</tr >';
254
+						}
255
+					} else if(questype == 1) {
256
+						if(Questions[i].quesitems.length > 0) {
257
+							html += '<tr >';
258
+							html += '<td colspan="2">';
259
+							html += '<div>';
260
+							var quesitems = Questions[i].quesitems;
261
+							for(var j = 0; j < quesitems.length; j++) {
262
+								html += '<textarea index="' + quesitems[j].itemid + '"name="" rows="" cols="" style="width: 100%;"></textarea>'
263
+							}
264
+							html += '</div>'
265
+							html += '</td>'
266
+							html += '</tr >';
267
+						}
268
+					}else{
269
+						if(Questions[i].quesitems.length > 0) {
270
+							html += '<tr >';
271
+							html += '<td colspan="2">';
272
+							html += '<div>';
273
+							var quesitems = Questions[i].quesitems;
274
+							for(var j = 0; j < quesitems.length; j++) {
275
+								html += '<label style="font-weight: normal;">'
276
+								html += '<input type="checkbox" value="' + quesitems[j].itemid + '" name="checks" > ' + quesitems[j].itemname + '</label>'
277
+							}
278
+							html += '</div>'
279
+							html += '</td>'
280
+							html += '</tr >';
281
+						}
282
+					}
283
+
284
+				}
285
+				$(html).appendTo(".tbody");
368 286
 			}
369 287
 		}
370 288
 	});

+ 12 - 26
CallCenterWeb.UI/js/Questions/QuestionsManagement.js

@@ -20,6 +20,7 @@ var Type;
20 20
 $(document).ready(function() {
21 21
 	Finish();
22 22
 	IndexCategoryGe();
23
+
23 24
 })
24 25
 
25 26
 //所有指标
@@ -28,9 +29,8 @@ $(".rightAll").click(function() {
28 29
 
29 30
 });
30 31
 //搜索功能
31
-$(".sear").click(function() {
32
-	keys = escape();
33
-	Finish(keys);
32
+$(".searchGo").click(function() {
33
+	Finish();
34 34
 });
35 35
 //下拉框时间
36 36
 $("#Quetions").on("change", function() {
@@ -92,22 +92,8 @@ function IndexCategoryGe() {
92 92
 		}
93 93
 	});
94 94
 }
95
-//操作
96
-function Code(val) {
97
-	if(val > 1) {
98
-		return '<a onclick="XG()">操作</a>'
99 95
 
100
-	}
101
-}
102
-//修改选项
103
-function XG() {
104
-	layer.open({
105
-		type: 2,
106
-		content: "../Questionnaire/addCheck.html?str=", //iframe的url,no代表不显示滚动条
107
-		title: '修改分类',
108
-		area: ['55%', '45%'], //宽高
109
-	});
110
-}
96
+
111 97
 
112 98
 //删除左边删除
113 99
 $('.leftDelete').click(function() {
@@ -151,7 +137,6 @@ $(".leftChange ").click(function() {
151 137
 
152 138
 	} else {
153 139
 		layer.msg('没有可修改的选项!');
154
-		Clean();
155 140
 	}
156 141
 })
157 142
 
@@ -166,7 +151,7 @@ $(".leftAdd").click(function() {
166 151
 });
167 152
 
168 153
 /////////////////////////右边表格
169
-function Finish(Left_Cids) {
154
+function Finish() {
170 155
 	//销毁表格
171 156
 	$tableLeft.bootstrapTable('destroy');
172 157
 	//初始化表格,动态从服务器加载数据
@@ -192,6 +177,7 @@ function Finish(Left_Cids) {
192 177
 				pagesize: params.pageSize,
193 178
 				CategoryId: Left_Cids,
194 179
 				SelectType: $("#Quetions").val(),
180
+				Key:$("#KeyWords").val(),
195 181
 				token: token,
196 182
 
197 183
 			};
@@ -199,6 +185,7 @@ function Finish(Left_Cids) {
199 185
 		},
200 186
 		onLoadSuccess: function() { //加载成功时执行
201 187
 			//								layer.msg("加载成功");
188
+			
202 189
 		},
203 190
 		onLoadError: function() { //加载失败时执行
204 191
 			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
@@ -235,7 +222,7 @@ $(".rightChange ").click(function() {
235 222
 		layer.open({
236 223
 			type: 2,
237 224
 			content: "../Questionnaire/XgRight.html?Cids=" + Cids, //iframe的url,no代表不显示滚动条
238
-			title: '添加分类',
225
+			title: '修改试题',
239 226
 			area: ['45%', '60%'], //宽高
240 227
 		});
241 228
 
@@ -243,7 +230,7 @@ $(".rightChange ").click(function() {
243 230
 		layer.msg('没有可修改的选项!');
244 231
 	}
245 232
 })
246
-//删除
233
+	//删除
247 234
 $('.rightDelete').click(function() {
248 235
 	if(Cids) {
249 236
 		console.log(Cids);
@@ -257,8 +244,7 @@ $('.rightDelete').click(function() {
257 244
 function setCode(val, row, index) {
258 245
 	return index + 1;
259 246
 }
260
-//类型
261
-//操作
247
+//类型操作
262 248
 function Type(val) {
263 249
 	var cs = '';
264 250
 	var vals = '';
@@ -291,6 +277,7 @@ function XG(val) {
291 277
 		area: ['45%', '60%'], //宽高
292 278
 	});
293 279
 }
280
+
294 281
 //删除试题
295 282
 function Delet(Cids) {
296 283
 	$.ajax({
@@ -305,8 +292,7 @@ function Delet(Cids) {
305 292
 		success: function(data) {
306 293
 			if(data.state.toLowerCase() == 'success') {
307 294
 				layer.msg("删除成功");
308
-
309
-				$tableLeft.bootstrapTable('refresh');
295
+			Finish();
310 296
 			}
311 297
 
312 298
 		}