<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>无纸化集中业务管理系统</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link charset="utf-8" rel="stylesheet" href="/static/css/layui.css?v=1.0.0">
	<link rel="stylesheet" href="/static/css/temp.css" media="all">
	<script src="/static/js/jquery-1.8.2.min.js?v=1.0.0"></script>
	<script src="/static/js/layui.js?v=1.0.0"></script>
	<script src="/static/js/api.config.js"></script>
	<script src="/static/js/util.js?v=1.0.0"></script>
	<script src="/static/js/customform.js?v=1.0.0"></script>
	<script src="/static/js/url.js?v=1.0.0"></script>
	<script src="/static/js/lay/lay-config.js?v=1.0.0"></script>
	<script src="/static/css/inconfont/iconfont.js"></script>
	<script src="/static/js/jquery-ui.min.js"></script>
	<style>
		.layui-inline {

			width: 100%;
		}
	</style>
</head>

<body class="bg-info">

	<div class="layui-card layui-card-form">

		<div class="layui-card-body">

			<form class="ag-form layui-form" ag-data-index="1" ag-data-ctx="cfgmgr">





				<div class="layui-row" style="margin-bottom: 30px;">
					<div class=" layui-col-sm6 ">
						<label class="layui-form-label">问题：</label>
						<div class="layui-input-block">
							<textarea name="sentence" ag-verify="required|len" ag-len-max="100" autocomplete="off"
								placeholder="问题描述" class="layui-textarea"></textarea>
						</div>
					</div>
					<div class=" layui-col-sm6 ">
						<button class=" layui-btn layui-btn-sm layui-btn-normal  fx-btn" type="button"
							style="margin-left: 40px;margin-top: 35px;">
							<i class="layui-icon layui-icon-ok-circle "></i>
							<span class="btn-span-middle">分析</span>
						</button>
					</div>
				</div>

				<blockquote class="layui-elem-quote">下方分析结果展示。</blockquote>

				<div class="layui-inline layui-col-sm12" style="margin-top: 20px;">
					<label class="layui-form-label">返回码：</label>
					<div class="layui-input-block">
						<input type="text" name="rspCode" readonly="readonly" autocomplete="off" placeholder=""
							class="layui-input fh">
					</div>
				</div>

				<div class="layui-inline layui-col-sm12 ">
					<label class="layui-form-label">返回信息：</label>
					<div class="layui-input-block">
						<textarea name="rspDesc" readonly="readonly" autocomplete="off" placeholder=""
							class="layui-textarea fh"></textarea>
					</div>
				</div>

				<div class="layui-inline layui-col-sm12 ">
					<label class="layui-form-label">返回数据：</label>
					<div class="layui-input-block">
						<textarea name="data" readonly="readonly" autocomplete="off" placeholder=""
							class="layui-textarea fh"></textarea>
					</div>
				</div>


			</form>


		</div>



	</div>
</body>
<script>


	$(".fx-btn").click(function () {

		var val = $("[name=sentence]").val();

		if (util.isNull(val)) {

			util.warning("请输入问题信息");

			return;
		}

		$(".fh").val("");

		util.ajaxJson("", ctx + '/facemgr/chat/quesWordAnalysis', {
			"content": val
		}, function (data) {

			if (data.result == "0") {

				var json = $.parseJSON(data.body);

				for (var key in json) {

					$("[name=" + key + "]").val(JSON.stringify(json[key]));
				}

				return;
			}

			util.error(data.desc);

		});

	});

</script>

</html>