| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <!--<link rel="stylesheet" href="../css/layer/need/layer.css" />-->
- <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <link rel="stylesheet" href="../css/addappeal.css" />
- <link rel="stylesheet" href="../js/layui/css/layui.css">
- <title>知识库管理</title>
- <style>
- .toolBar {
- padding: 15px 0;
- border-bottom: 1px solid #ccc;
- }
-
- .boxCon table th {
- width: 20%;
- }
-
- .boxCon table td textarea {
- width: 100%;
- }
-
- .inpBox {
- border: 1px solid #a9a9a9;
- height: 27px;
- width: 55%;
- display: inline-block;
- position: relative;
- vertical-align: middle;
- }
-
- .inps1,
- .inps4 {
- width: 100%;
- height: 24px;
- outline: none;
- border: 0;
- border-image-width: 0;
- padding: 0;
- padding-left: 3px;
- }
-
- .changeTitle,
- .changeKey,
- .addTitle,
- .addKey {
- width: 55%;
- }
-
- .xl {
- display: inline-block;
- background: url(../img/dropDown.png) no-repeat;
- height: 100%;
- background-position: center center;
- width: 20px;
- position: absolute;
- right: 0;
- top: 0px;
- background-color: #f7bc8b;
- cursor: pointer;
- }
-
- .xl:hover {
- background-color: #e6d523;
- }
-
- .addTree {
- background: #fff;
- position: absolute;
- width: 100%;
- border: 1px solid darkgrey;
- right: 0;
- top: 26px;
- display: none;
- height: 220px;
- overflow-y: auto;
- }
-
- .treeTable {
- height: 400px;
- /*overflow-y: auto;*/
- }
-
- .tree {
- height: 100%;
- }
-
- .trTitle {
- width: 100%;
- height: 34px;
- line-height: 34px;
- border-bottom: 1px solid #ebebeb;
- color: red;
- font-weight: 700;
- margin-bottom: 15px;
- }
-
- .treeCon {
- border: 1px solid #ebebeb;
- overflow-y: auto;
- }
-
- .ztree li {
- width: 100%;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
-
- .content {
- width: 270px;
- height: 25px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- text-align: left;
- }
- /*//*/
-
- .reflectCategory-wrapper {
- position: relative;
- }
-
- .reflectCategoryList-wrapper {
- display: none;
- position: absolute;
- top: 38px;
- z-index: 9999;
- line-height: 32px;
- background: #FFF;
- }
-
- #reflectCategoryList {
- height: 240px;
- background: #FFF;
- border: 1px solid #e5e6e7;
- overflow: auto;
- }
-
- #reflectCategoryList li {
- padding: 0 10px;
- width: 100%;
- line-height: 32px;
- }
-
- #reflectCategoryList li:hover {
- background: #00a1cb;
- }
- </style>
- </head>
- <body>
- <div class="container-fluid">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:
- <a href="javaScript:;" id="ReIndex">首页</a>>
- <a href="javaScript:;">知识库</a>>
- <a href="" class="nowPosition">内容管理</a>
- </sapn>
- </div>
- </div>
- <div class="toolBar clearfix">
- <div class="toolLeft">
- <button class="btns add">添加</button>
- <button class="btns change">修改</button>
- <button class="btns del">删除</button>
- </div>
- <div class="toolRight">
- <span>搜索内容:<input type="text" class="searCon" /></span>
- <button class="btns searchGo">搜索</button>
- </div>
- </div>
- <div class="treeTable clearfix">
- <div class="tree col-md-3">
- <div class="trTitle">知识库分类</div>
- <div class="treeCon">
- <ul id="treeDemo" class="ztree">
- <!--类名为ztree是必须的-->
- </ul>
- </div>
- </div>
- <div class="tableCon col-md-9">
- <div class="trTitle"> 知识库列表</div>
- <table id="table1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
- <thead>
- <tr>
- <th data-align="center" data-formatter="setCode"></th>
- <th data-field="state" data-checkbox="true" data-align="center"></th>
- <!--<th data-align="center" data-field="id" data-formatter="setCode"></th>-->
- <th data-field="CategoryName" data-align="left">类别</th>
- <th data-field="F_Title" data-align="left">标题</th>
- <th data-field="F_Description" data-align="left" data-formatter="oper">内容</th>
- <th data-field="F_KeyWords" data-align="center">关键字</th>
- <th data-field="F_CreateOn" data-align="center">创建时间</th>
- </tr>
- </thead>
- <tbody id="tbody"></tbody>
- </table>
- </div>
- </div>
- </div>
- <!--添加弹出内容-->
- <div class="model addModel">
- <div class="box">
- <div class="btop clearfix">
- <p class="btl">添加知识库</p>
- <p class="btr addBtr" title="关闭">X</p>
- </div>
- <div class="boxCon">
- <table>
- <tbody>
- <tr>
- <th>所属分类:</th>
- <td colspan="3">
- <div class="inpBox">
- <input type="text" class="inps inps1" />
- <i class="xl xl_one"></i>
- <div class="addTree xlAdd">
- <ul id="addTreeDemo" class="ztree"></ul>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <th>标题:</th>
- <td colspan="3"><input type="text" class="addTitle" /></td>
- </tr>
- <tr>
- <th>关键字:</th>
- <td colspan="3"><input type="text" class="addKey" /></td>
- </tr>
- <tr>
- <th>反映类别:</th>
- <td colspan="3" class="reflectCategory-wrapper">
- <input type="text" id="reflectCategory" class="form-control" autocomplete="off" />
- <div class="reflectCategoryList-wrapper">
- <ul id="reflectCategoryList">
- </ul>
- </div>
- </td>
- </tr>
- <tr>
- <th>内容:</th>
- <td colspan="3"><textarea data-adaptheight id="addEditor" name="content" style="width: 100%;height: 100px;"></textarea></td>
- </tr>
- </tbody>
- </table>
- <div style="text-align: center;"><button class="btns addCun">保存</button></div>
- </div>
- </div>
- </div>
- <!--删除弹出内容-->
- <div class="model delModel">
- <div class="box">
- <div class="btop clearfix">
- <p class="btl"><span>删除提示</span></p>
- <p class="btr delBtr" title="关闭">X</p>
- </div>
- <div class="boxCon" style="height: 150px;">
- <p style="text-align: center;font-size: 16px;margin-top: 30px;">您确定要删除吗?</p>
- <p style="margin-top: 30px;text-align: center;">
- <button class="btns sure">确定</button>
- <button class="btns return">取消</button>
- </p>
- <!--<p style="color: red;">注:若该分类下包含知识库内容会一并删除</p>-->
- </div>
- </div>
- </div>
- <!--修改弹出内容-->
- <div class="model changeModel">
- <div class="box">
- <div class="btop clearfix">
- <p class="btl">修改知识库</p>
- <p class="btr changeBtr" title="关闭">X</p>
- </div>
- <div class="boxCon">
- <table>
- <tbody>
- <tr>
- <th>所属分类:</th>
- <td colspan="3">
- <div class="inpBox">
- <input type="text" class="inps inps4" />
- <i class="xl xl_two"></i>
- <div class="addTree xlChange">
- <ul id="changeTreeDemo" class="ztree"></ul>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <th>标题:</th>
- <td colspan="3"><input type="text" class="changeTitle" /></td>
- </tr>
- <tr>
- <th>关键字:</th>
- <td colspan="3"><input type="text" class="changeKey" /></td>
- </tr>
- <tr>
- <th>反映类别:</th>
- <td colspan="3" class="reflectCategory-wrapper">
- <input type="text" id="changereflectCategory" class="form-control" autocomplete="off" />
- <div class="reflectCategoryList-wrapper">
- <ul id="changereflectCategoryList">
- </ul>
- </div>
- </td>
- </tr>
- <tr>
- <th>内容:</th>
- <td colspan="3"><textarea data-adaptheight id="changeEditor" name="content" style="width: 100%;height: 100px;"></textarea></td>
- </tr>
- </tbody>
- </table>
- <div style="text-align: center;"><button class="btns changeCun">保存</button></div>
- </div>
- </div>
- </div>
- <input type="hidden" id="PID" value="" />
- <input type="hidden" id="PID2" value="" />
- <script src="../js/layui/layui.js"></script>
- <script src="../css/layer/layer.js"></script>
- <script src="../js/adjustHeight.js"></script>
- <script src="../js/zTree/jquery.ztree.core.js"></script>
- <!--<script src="../js/ztreeSelect.js"></script>-->
- <script src="../js/kindeditor/kindeditor-all-min.js"></script>
- <script src="../js/kindeditor/lang/zh-CN.js"></script>
- <script src="./js/zhiShiKuManger.js"></script>
- <script>
- $(document).ready(function() {
- getReactionCategory();
- getReactionCategory2();
- $("#reflectCategory").bind("input propertychange", function() {
- $(".layui-dropdown").hide();
- if($("#reflectCategory").val() == "") {
- $(".reflectCategoryList-wrapper").hide();
- return;
- }
- var debounceGetSearchReactionCategory = debounce(getSearchReactionCategory, 500)
- $(".reflectCategoryList-wrapper").show();
- debounceGetSearchReactionCategory($("#reflectCategory").val())
- })
- $("#reflectCategoryList").on("click", "li", function() {
- $(".reflectCategoryList-wrapper").hide();
- $("#reflectCategory").val($(this).attr("indexName"));
- $("#PID").val($(this).attr("index"));
- });
-
- $("#changereflectCategory").bind("input propertychange", function() {
- $(".layui-dropdown").hide();
- if($("#reflectCategory").val() == "") {
- $(".reflectCategoryList-wrapper").hide();
- return;
- }
- var debounceGetSearchReactionCategory2 = debounce2(getSearchReactionCategory2, 500)
- $(".reflectCategoryList-wrapper").show();
- debounceGetSearchReactionCategory2($("#changereflectCategory").val())
- })
- $("#changereflectCategoryList").on("click", "li", function() {
- $(".reflectCategoryList-wrapper").hide();
- $("#changereflectCategory").val($(this).attr("indexName"));
- $("#PID2").val($(this).attr("index"));
- });
- })
- function getReactionCategory(pid = 38) {
- pid = 38
- $.get(
- huayi.config.callcenter_url + "Dictionary/GetKnowledgeZTree", {
- token: $.cookie("token"),
- pid: pid,
- },
- function(result) {
- result = $.parseJSON(result);
- var content = JSON.parse(result.data);
- layui.use("dropdown", function() {
- var dropdown = layui.dropdown;
- dropdown.render({
- elem: "#reflectCategory", //可绑定在任意元素中,此处以上述按钮为例
- data: content,
- id: "reflectCategory",
- //菜单被点击的事件
- click: function(obj) {
- $("#reflectCategory").val(obj.title)
- $("#PID").val(obj.id)
- },
- });
- });
- }
- );
- }
- function getReactionCategory2(pid = 38) {
- pid = 38
- $.get(
- huayi.config.callcenter_url + "Dictionary/GetKnowledgeZTree", {
- token: $.cookie("token"),
- pid: pid,
- },
- function(result) {
- result = $.parseJSON(result);
- var content = JSON.parse(result.data);
- layui.use("dropdown", function() {
- var dropdown = layui.dropdown;
- dropdown.render({
- elem: "#changereflectCategory", //可绑定在任意元素中,此处以上述按钮为例
- data: content,
- id: "changereflectCategory",
- //菜单被点击的事件
- click: function(obj) {
- $("#changereflectCategory").val(obj.title)
- $("#PID2").val(obj.id)
- },
- });
- });
- }
- );
- }
- function getSearchReactionCategory(key) {
- $.get(
- huayi.config.callcenter_url + "Dictionary/GetKeyListNew", {
- token: $.cookie("token"),
- key: key,
- },
- function(result) {
- result = $.parseJSON(result);
- if(result.state.toLowerCase() === "success") {
- $("#reflectCategoryList").empty();
- var content = result.data;
- if(content.length > 0) {
- content.forEach(function(e, i) {
- $("<li index='" + e.id + "' indexName='" + e.name + "'>" + e.names +
- "</li>")
- .appendTo("#reflectCategoryList");
- });
- } else {
- $("<li index='' indexName=''>没有相关数据</li>").appendTo("#reflectCategoryList");
- }
- }
- }
- );
- }
- function getSearchReactionCategory2(key) {
- $.get(
- huayi.config.callcenter_url + "Dictionary/GetKeyListNew", {
- token: $.cookie("token"),
- key: key,
- },
- function(result) {
- result = $.parseJSON(result);
- if(result.state.toLowerCase() === "success") {
- $("#changereflectCategoryList").empty();
- var content = result.data;
- if(content.length > 0) {
- content.forEach(function(e, i) {
- $("<li index='" + e.id + "' indexName='" + e.name + "'>" + e.names +
- "</li>")
- .appendTo("#changereflectCategoryList");
- });
- } else {
- $("<li index='' indexName=''>没有相关数据</li>").appendTo("#changereflectCategoryList");
- }
- }
- }
- );
- }
- function debounce(fun, delay) {
- return function(args) {
- var that = this;
- var _args = args
- clearTimeout(fun.id)
- fun.id = setTimeout(function() {
- fun.call(that, _args)
- }, delay)
- }
- }
- function debounce2(fun, delay) {
- return function(args) {
- var that = this;
- var _args = args
- clearTimeout(fun.id)
- fun.id = setTimeout(function() {
- fun.call(that, _args)
- }, delay)
- }
- }
- </script>
- </body>
- </html>
|