miaofuhao лет назад: 7
Родитель
Сommit
ea804fc726

+ 21 - 0
CallCenterWeb.UI/OnDuty/Follow-Reminder.html

@@ -104,6 +104,13 @@
104 104
 			.th-table {
105 105
 				display: none;
106 106
 			}
107
+			/*页码*/
108
+			.page_num{ margin:0 auto; width:980px; }
109
+			.page_num_fr{ margin:0px 0px;}
110
+			.page_num_fr  li{ float:left; margin-right:10px; line-height:30px; border:#ccc 1px solid;}
111
+			.page_num_ys{ width:38px; height:38px; }
112
+			.page_num_fr  li a{ padding:0px 10px; height: 32px; display: block;} 
113
+			.page_num_fr  li a:hover{ background:#1ab394; color:#fff; text-decoration:underline;}
107 114
 		</style>
108 115
 
109 116
 	</head>
@@ -172,6 +179,7 @@
172 179
 			<div style="width: 100%;padding: 10px;">
173 180
 				<table class="table table-bordered table-striped table-hover">
174 181
 					<tr>
182
+						<th data-align="center">序号</th>
175 183
 						<th data-align="center">患者姓名</th>
176 184
 						<th data-align="center">患者性别</th>
177 185
 						<th data-align="center">患者电话</th>
@@ -238,6 +246,19 @@
238 246
 					</tr>
239 247
 				</table>
240 248
 			</div>
249
+			<div>
250
+	        	<ul class="page_num_fr fr">
251
+	            	<li><a href="#">首页</a></li>
252
+	            	<li><a href="#">1</a></li>
253
+	            	<li><a href="#">2</a></li>
254
+	            	<li><a href="#">3</a></li>
255
+	            	<li><a href="#">...</a></li>
256
+	            	<li><a href="#">9</a></li>
257
+	            	<li><a href="#">10</a></li>
258
+	            	<li><a href="#">末页</a></li>
259
+	            </ul>
260
+	            <ul class="clearfix"></ul>
261
+	    	</div> 
241 262
 		</div>
242 263
 		<script src="../js/laydate/laydate.js"></script>
243 264
 		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>

+ 272 - 0
CallCenterWeb.UI/js/Questions/QuestionSetting.js

@@ -0,0 +1,272 @@
1
+
2
+var keys;
3
+var Cids; //分类id
4
+var ids; //指标id
5
+var CategoryName; //分类名称
6
+var Sort; //排序
7
+var Score; //分数
8
+var Title; //标题
9
+var Remark; //备注
10
+var Pid; //父id
11
+var Left_Cids;
12
+var Left_Sort;
13
+var Left_Score;
14
+var Left_Pid;
15
+var $tableLeft = $('#tbr');
16
+var $tableLeft1 = $('#tb1');
17
+var token = $.cookie("token");
18
+IndexCategoryGe();
19
+//所有指标
20
+//$(".rightAll").click(function() {
21
+//	Finish();
22
+
23
+//});
24
+//搜索功能
25
+$(".searchGo").click(function() {
26
+
27
+	//Finish(keys);
28
+	IndexCategoryGe();
29
+});
30
+//*删除*/
31
+$(".inpBox").hover(function(event) {
32
+	$(this).children(".de_icon").show();
33
+	event.stopPropagation();
34
+}, function() {
35
+	$(this).children(".de_icon").hide();
36
+});
37
+$(".de_icon").click(function(event) {
38
+	event.stopPropagation();
39
+	$(this).siblings("input").eq(0).val("");
40
+	$(this).siblings("input").eq(1).val("");
41
+
42
+	if($(this).siblings("div").find("ul").attr("id") == "zrbmtree") {
43
+		getRY($(".zrid"), $("#zrbm").val());
44
+	}
45
+
46
+});
47
+$(".inpBox").mouseleave(function() {
48
+	$(this).children(".addTree").hide();
49
+})
50
+$(".xl").click(function() {
51
+	if($(this).parent().find(".addTree").is(":hidden")) {
52
+		$(this).parent().find(".addTree").show();
53
+	} else {
54
+		$(this).parent().find(".addTree").hide();
55
+	}
56
+});
57
+//清空选项
58
+function Clean() {
59
+	$(".model").hide();
60
+	$("._CategoryName").val("");
61
+	$("._Score").val('');
62
+	$("._Sort").val('');
63
+	$(".F_Title").val('');
64
+	$(".F_Remark").val('');
65
+}
66
+
67
+///////////////////////////////////左边表格
68
+/*获取选中行对象*/
69
+$tableLeft1.on("click-row.bs.table", function(e, row, ele) {
70
+	$('.success').removeClass('success'); //去除之前选中的行的,选中样式
71
+	$(ele).addClass('success'); //添加当前选中的 success样式用于区别
72
+	Left_Cids = row.F_PagerId; //问卷ID
73
+	$(".IMG_content").hide();
74
+	$('#tbr').show();
75
+	XQ(Left_Cids); ///获取问卷
76
+});
77
+//z获取问卷列表
78
+function IndexCategoryGe() {
79
+	//销毁表格
80
+	$tableLeft1.bootstrapTable('destroy');
81
+	//初始化表格,动态从服务器加载数据
82
+	$tableLeft1.bootstrapTable({
83
+		method: "get", //使用get请求到服务器获取数据			
84
+		url: huayi.config.callcenter_url + "Questionnaire/GetPagerInfoList",
85
+		contentType: 'application/x-www-form-urlencoded',
86
+		striped: true, //表格显示条纹
87
+		pagination: true, //启动分页
88
+		pageSize: 10, //每页显示的记录数
89
+		pageNumber: 1, //当前第几页
90
+		pageList: [5, 20, 50, 100], //记录数可选列表
91
+		search: false, //是否启用查询
92
+		showColumns: false, //显示下拉框勾选要显示的列
93
+		showRefresh: false, //显示刷新按钮
94
+		sidePagination: "server", //表示服务端请求
95
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
96
+		//设置为limit可以获取limit, offset, search, sort, order
97
+		queryParamsType: "undefined",
98
+		queryParams: function queryParams(params) { //设置查询参数
99
+			var param = {
100
+				PageIndex: params.pageNumber,
101
+				PageSize: params.pageSize,
102
+				Key: $("#KeyWords").val(),
103
+				token: token
104
+			};
105
+			return param;
106
+		},
107
+		onLoadSuccess: function() { //加载成功时执行
108
+			//								layer.msg("加载成功");
109
+		},
110
+		onLoadError: function() { //加载失败时执行
111
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
112
+		}
113
+	});
114
+}
115
+//编号
116
+function setCode(val, row, index) {
117
+	return index + 1;
118
+}
119
+
120
+//操作
121
+function Code(val) {
122
+	return '<a  onclick="Add(' + val + ')">操作</a>'
123
+}
124
+//右边操作
125
+function Add(val) {
126
+	layer.open({
127
+		type: 2,
128
+		content: "../Questionnaire/addSetting.html?str=" + val, //iframe的url,no代表不显示滚动条
129
+		title: '问卷信息',
130
+		area: ['80%', '75%'], //宽高
131
+	});
132
+}
133
+
134
+//删除
135
+$('.leftDelete').click(function() {
136
+	if(Left_Cids) {
137
+		layer.confirm('确定删除当前记录?', {
138
+			btn: ['是', '否'] //按钮
139
+		}, function() {
140
+			DelIndexCategory(Left_Cids);
141
+		});
142
+	} else {
143
+		layer.msg('没有可删除的选项!');
144
+
145
+	}
146
+})
147
+//删除功能
148
+function DelIndexCategory(Left_Cids) {
149
+	$.ajax({
150
+		type: "get",
151
+		url: huayi.config.callcenter_url + "/Questionnaire/DeletePagerInfo",
152
+		//url: '//117.158.196.116:8878/IndexCategory/DelIndexCategory',
153
+		dataType: 'json',
154
+		data: {
155
+			id: Left_Cids,
156
+			token: $.cookie("token"),
157
+		},
158
+		async: true,
159
+		success: function(data) {
160
+			layer.msg("删除成功");
161
+			IndexCategoryGe();
162
+		}
163
+	});
164
+}
165
+///修改功能
166
+$(".leftChange ").click(function() {
167
+	var Str = Left_Cids;
168
+	if(Left_Cids) {
169
+		layer.open({
170
+			type: 2,
171
+			content: "../Questionnaire/xgWenjuanxinxi.html?str=" + Str, //iframe的url,no代表不显示滚动条
172
+			title: '修改问卷',
173
+			area: ['50%', '60%'], //宽高
174
+		});
175
+
176
+	} else {
177
+		layer.msg('没有可修改的选项!');
178
+		Clean();
179
+	}
180
+})
181
+
182
+//增加
183
+$(".leftAdd").click(function() {
184
+	var Str = Left_Cids;
185
+	console.log(Str);
186
+	layer.open({
187
+		type: 2,
188
+		content: "../Questionnaire/addSWenjuanxinxi.html?", //iframe的url,no代表不显示滚动条
189
+		title: '增加问卷',
190
+		area: ['50%', '60%'], //宽高
191
+	});
192
+});
193
+
194
+////////////////////////////////////////////////////////////////右边表格
195
+//详情展示
196
+function XQ(Left_Cids) {
197
+	$('.WJ_box').show();
198
+	$(".Qus_box").empty();
199
+	$.ajax({
200
+		type: "get",
201
+		url: huayi.config.callcenter_url + "/Questionnaire/GetPagerInfoQ",
202
+		async: true,
203
+		dataType: "json",
204
+		data: {
205
+			pid: Left_Cids,
206
+			token: $.cookie("token"),
207
+
208
+		},
209
+		success: function(data) {
210
+			if(data.state.toLowerCase() == 'success') {
211
+				$('.Title').text(data.data.F_Title);
212
+				$("#F_Remark").text(data.data.F_Remark);
213
+				$("#startText").text(data.data.F_StartText);
214
+				$("#endText").text(data.data.F_EndText);
215
+				var Questions = data.data.F_Questions;
216
+				var html = '';
217
+				for(var i = 0; i < Questions.length; i++) {
218
+					var questype = Questions[i].questype;
219
+					var Quesid = Questions[i].quesid;
220
+					var quesremark = Questions[i].quesremark;//试题说明
221
+					if(quesremark){
222
+						quesremark = ' 【' + quesremark  +'】';
223
+					}else{
224
+						quesremark = "";
225
+					}
226
+					html += '<li >';
227
+					html += '<div class="Back">';
228
+					html += '<h3 class="size-14 QuesTitle"  indexs="' + Questions[i].quesid + '">' + Questions[i].questitle + quesremark + '</h3>';
229
+					html += '</div>';
230
+					//判断类型
231
+					if(questype == 2) { //问答题
232
+						//选项
233
+						if(Questions[i].quesitems.length > 0) {
234
+
235
+							html += '<div>';
236
+							var quesitems = Questions[i].quesitems;
237
+							for(var j = 0; j < quesitems.length; j++) {
238
+								html += '<label style="font-weight: normal;">'
239
+								html += '' + (j + 1) + '.';
240
+								html += '<input type="radio" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemname + '" name="ltype' + Quesid + '"  style="margin-left:5px;"> ' + quesitems[j].itemname + '</label>'
241
+							}
242
+							html += '</div>'
243
+							html += '</li>'
244
+						}
245
+					} else if(questype == 1) {
246
+
247
+						html += '<div>';
248
+						html += '<textarea index="' + Questions[i].quesid + '"name="" rows="" cols="" style="width: 100%;"></textarea>'
249
+						html += '</div>'
250
+
251
+					} else {
252
+						if(Questions[i].quesitems.length > 0) {
253
+
254
+							html += '<div>';
255
+							var quesitems = Questions[i].quesitems;
256
+							for(var j = 0; j < quesitems.length; j++) {
257
+								html += '<label style="font-weight: normal;">'
258
+								html += '' + (j + 1) + '.';
259
+								html += '<input type="checkbox" value="' + quesitems[j].itemname + '" name="checks" > ' + quesitems[j].itemname + '</label>'
260
+							}
261
+							html += '</div>'
262
+
263
+							html += '</li >';
264
+						}
265
+					}
266
+
267
+				}
268
+				$(html).appendTo(".Qus_box");
269
+			}
270
+		}
271
+	});
272
+}

+ 327 - 0
CallCenterWeb.UI/js/Questions/QuestionsManagement.js

@@ -0,0 +1,327 @@
1
+
2
+var Cids; //分类id
3
+var ids; //指标id
4
+var Left_Cids;
5
+var Left_CategoryName;
6
+var $tableLeft = $('#tbr');
7
+var $tableLeft1 = $('#tb1');
8
+var token = $.cookie("token");
9
+
10
+$(document).ready(function() {
11
+	Finish();
12
+	IndexCategoryGe();
13
+})
14
+
15
+//所有指标
16
+$(".rightAll").click(function() {
17
+	Finish();
18
+
19
+});
20
+//搜索功能
21
+$(".searchGo").click(function() {
22
+	Finish();
23
+});
24
+//下拉框
25
+$("#Quetions").on("change", function() {
26
+	Finish();
27
+})
28
+
29
+
30
+////左边表格
31
+/*获取选中行对象*/
32
+$tableLeft1.on("click-row.bs.table", function(e, row, ele) {
33
+	$('.success').removeClass('success'); //去除之前选中的行的,选中样式
34
+	$(ele).addClass('success'); //添加当前选中的 success样式用于区别
35
+	Left_Cids = row.F_CategoryId; //分类ID
36
+	Left_CategoryName = row.F_CategoryName; //分类名称
37
+	Finish(); //右边列表
38
+});
39
+//获取试题分类列表	    ///左边列表
40
+function IndexCategoryGe() {
41
+	//销毁表格
42
+	$tableLeft1.bootstrapTable('destroy');
43
+	//初始化表格,动态从服务器加载数据
44
+	$tableLeft1.bootstrapTable({
45
+		method: "get", //使用get请求到服务器获取数据
46
+		url: huayi.config.callcenter_url + "Questionnaire/GetQCategoryList",
47
+		contentType: 'application/x-www-form-urlencoded',
48
+		striped: true, //表格显示条纹
49
+		pagination: true, //启动分页
50
+		pageSize: 5, //每页显示的记录数
51
+		pageNumber: 1, //当前第几页
52
+		pageList: [5, 20, 50, 100], //记录数可选列表
53
+		search: false, //是否启用查询
54
+		showColumns: false, //显示下拉框勾选要显示的列
55
+		showRefresh: false, //显示刷新按钮
56
+		sidePagination: "server", //表示服务端请求
57
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
58
+		//设置为limit可以获取limit, offset, search, sort, order
59
+		queryParamsType: "undefined",
60
+		queryParams: function queryParams(params) { //设置查询参数
61
+			var param = {
62
+				pageindex: params.pageNumber,
63
+				pagesize: params.pageSize,
64
+				token: token
65
+			};
66
+			return param;
67
+		},
68
+		onLoadSuccess: function() { //加载成功时执行
69
+			//								layer.msg("加载成功");
70
+		},
71
+		onLoadError: function() { //加载失败时执行
72
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
73
+		}
74
+	});
75
+}
76
+
77
+//删除左边删除
78
+$('.leftDelete').click(function() {
79
+	if(Left_Cids) {
80
+		layer.confirm('确定删除当前记录?', {
81
+                btn: ['是', '否'] //按钮
82
+            }, function() {
83
+					DelIndexCategory(Left_Cids);
84
+            });
85
+	} else {
86
+		layer.msg('没有可删除的选项!');
87
+	}
88
+})
89
+//删除功能
90
+function DelIndexCategory(Left_Cids) {
91
+	$.ajax({
92
+		type: "get",
93
+		url: huayi.config.callcenter_url + "Questionnaire/DeleteQCategory",
94
+		//url: '//117.158.196.116:8878/IndexCategory/DelIndexCategory',
95
+		dataType: 'json',
96
+		data: {
97
+			id: Left_Cids,
98
+			token: token
99
+		},
100
+		async: true,
101
+		success: function(data) {
102
+			layer.msg("删除成功");
103
+			IndexCategoryGe();
104
+		}
105
+	});
106
+}
107
+///左边修改功能
108
+$(".leftChange ").click(function() {
109
+	if(Left_Cids) {
110
+		layer.prompt({
111
+			title: '修改试题分类',
112
+			value: Left_CategoryName,
113
+			formType: 0,
114
+		}, function(names, index) {
115
+			$.post(huayi.config.callcenter_url + "Questionnaire/CreateOrUpdateQCategory", {
116
+				id: Left_Cids,
117
+				name: names,
118
+				token: token
119
+			}, function(data) {
120
+				data = JSON.parse(data);
121
+				//debugger
122
+				if(data.state == "success") {
123
+					layer.close(index);
124
+					IndexCategoryGe();
125
+					layer.msg("试题分类修改成功!");
126
+				}
127
+			});
128
+
129
+		});
130
+	} else {
131
+		layer.msg('没有可修改的选项!');
132
+	}
133
+	
134
+	
135
+//	if(Left_Cids) {
136
+//		Str = Left_Cids;
137
+//		console.log(Str);
138
+//		layer.open({
139
+//			type: 2,
140
+//			content: "../Questionnaire/modify.html?str=" + Str, //iframe的url,no代表不显示滚动条
141
+//			title: '修改分类',
142
+//			area: ['35%', '30%'], //宽高
143
+//		});
144
+//		//			GetIndexCategory(Left_Cids);
145
+//
146
+//	} else {
147
+//		layer.msg('没有可修改的选项!');
148
+//	}
149
+})
150
+
151
+//增加
152
+$(".leftAdd").click(function() {
153
+	layer.prompt({
154
+		title: '添加试题分类',
155
+		formType: 0,
156
+	}, function(names, index) {
157
+		$.post(huayi.config.callcenter_url + "Questionnaire/CreateOrUpdateQCategory", {
158
+			name: names,
159
+			token: token
160
+		}, function(data) {
161
+			data = JSON.parse(data);
162
+			//debugger
163
+			if(data.state == "success") {
164
+				layer.close(index);
165
+				IndexCategoryGe();
166
+				layer.msg("添加试题分类成功");
167
+			}
168
+		});
169
+
170
+	});
171
+	
172
+//	layer.open({
173
+//		type: 2,
174
+//		content: "../Questionnaire/add.html", //iframe的url,no代表不显示滚动条
175
+//		title: '添加分类',
176
+//		area: ['35%', '30%'], //宽高
177
+//	});
178
+});
179
+
180
+/////////////////////////右边表格
181
+function Finish() {
182
+	//销毁表格
183
+	$tableLeft.bootstrapTable('destroy');
184
+	//初始化表格,动态从服务器加载数据
185
+	$tableLeft.bootstrapTable({
186
+		method: "get", //使用get请求到服务器获取数据
187
+		url: huayi.config.callcenter_url + "Questionnaire/GetQuestionList",
188
+		//			url: "//117.158.196.116:8878/IndexBase/GetList",
189
+		contentType: 'application/x-www-form-urlencoded',
190
+		striped: true, //表格显示条纹
191
+		pagination: true, //启动分页
192
+		pageSize: 5, //每页显示的记录数
193
+		pageNumber: 1, //当前第几页
194
+		pageList: [5, 20, 50, 100], //记录数可选列表
195
+		search: false, //是否启用查询
196
+		showColumns: false, //显示下拉框勾选要显示的列
197
+		showRefresh: false, //显示刷新按钮
198
+		sidePagination: "server", //表示服务端请求
199
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
200
+		//设置为limit可以获取limit, offset, search, sort, order
201
+		queryParamsType: "undefined",
202
+		queryParams: function queryParams(params) { //设置查询参数
203
+			var param = {
204
+				pageindex: params.pageNumber,
205
+				pagesize: params.pageSize,
206
+				CategoryId: Left_Cids,
207
+				SelectType: $("#Quetions").val(),
208
+				Key: $("#KeyWords").val(),
209
+				token: token,
210
+
211
+			};
212
+			return param;
213
+		},
214
+		onLoadSuccess: function() { //加载成功时执行
215
+			//								layer.msg("加载成功");
216
+
217
+		},
218
+		onLoadError: function() { //加载失败时执行
219
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
220
+		}
221
+	});
222
+}
223
+
224
+/*获取选中行对象*/
225
+$tableLeft.on("click-row.bs.table", function(e, row, ele) {
226
+	$('.success').removeClass('success'); //去除之前选中的行的,选中样式
227
+	$(ele).addClass('success'); //添加当前选中的 success样式用于区别
228
+	Cids = row.F_QuestionId; //试题ID
229
+	//console.log(Cids);
230
+	ids = row.F_CategoryId; //分类ID
231
+
232
+});
233
+//增加
234
+$(".rightAdd").click(function() {
235
+	layer.open({
236
+		type: 2,
237
+		content: "../Questionnaire/AddRight.html?str=" + Left_Cids, //iframe的url,no代表不显示滚动条
238
+		title: '添加试题',
239
+		area: ['45%', '60%'], //宽高
240
+	});
241
+
242
+})
243
+//修改功能
244
+$(".rightChange ").click(function() {
245
+	if(Cids) {
246
+		layer.open({
247
+			type: 2,
248
+			content: "../Questionnaire/XgRight.html?Cids=" + Cids, //iframe的url,no代表不显示滚动条
249
+			title: '修改试题',
250
+			area: ['45%', '60%'], //宽高
251
+		});
252
+
253
+	} else {
254
+		layer.msg('没有可修改的选项!');
255
+	}
256
+})
257
+//删除
258
+$('.rightDelete').click(function() {
259
+	if(Cids) {
260
+		layer.confirm('确定删除当前记录?', {
261
+                btn: ['是', '否'] //按钮
262
+            }, function() {
263
+            	Delet(Cids);
264
+            });
265
+	} else {
266
+		layer.msg('没有可删除的选项!');
267
+
268
+	}
269
+})
270
+//编号
271
+function setCode(val, row, index) {
272
+	return index + 1;
273
+}
274
+//类型操作
275
+function Type(val) {
276
+	var cs = '';
277
+	var vals = '';
278
+	if(val == 1) {
279
+		cs = 'w';
280
+		vals = "问答题"
281
+	} else if(val == 2) {
282
+		cs = 'd';
283
+		vals = "单选题"
284
+	} else {
285
+		cs = 'du'
286
+		vals = "多选题"
287
+	}
288
+
289
+	return '<a class="' + cs + '">' + vals + '</a>'
290
+	//console.log(val);
291
+}
292
+//操作
293
+function Code(val, row) {
294
+	if(val > 1) {
295
+		return '<a onclick="XG(' + row.F_QuestionId + ')">操作</a>'
296
+	}
297
+}
298
+
299
+function XG(val) {
300
+	layer.open({
301
+		type: 2,
302
+		content: "../Questionnaire/addCheck.html?str=" + val, //iframe的url,no代表不显示滚动条
303
+		title: '试题选项',
304
+		area: ['45%', '60%'], //宽高
305
+	});
306
+}
307
+
308
+//删除试题
309
+function Delet(Cids) {
310
+	$.ajax({
311
+		type: "get",
312
+		url: huayi.config.callcenter_url + "/Questionnaire/DeleteQuestion",
313
+		dataType: 'json',
314
+		data: {
315
+			id: Cids,
316
+			token: token
317
+		},
318
+		async: true,
319
+		success: function(data) {
320
+			if(data.state.toLowerCase() == 'success') {
321
+				layer.msg("删除成功");
322
+				Finish();
323
+			}
324
+
325
+		}
326
+	});
327
+}

Разница между файлами не показана из-за своего большого размера
+ 6807 - 0
CallCenterWeb.UI/js/Questions/bootstrap-editable.js