|
@@ -2,7 +2,7 @@
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
|
<head>
|
|
<head>
|
|
|
<th:block th:include="include :: header('AI外呼记录查询')" />
|
|
<th:block th:include="include :: header('AI外呼记录查询')" />
|
|
|
-
|
|
|
|
|
|
|
+ <th:block th:include="include :: select2-css" />
|
|
|
<th:block th:include="include :: video-js-css" />
|
|
<th:block th:include="include :: video-js-css" />
|
|
|
<th:block th:include="include :: video-js" />
|
|
<th:block th:include="include :: video-js" />
|
|
|
<style>
|
|
<style>
|
|
@@ -223,8 +223,9 @@
|
|
|
<ul>
|
|
<ul>
|
|
|
<li>
|
|
<li>
|
|
|
<label th:text="#{callPhone.query.callTask}">外呼任务</label>
|
|
<label th:text="#{callPhone.query.callTask}">外呼任务</label>
|
|
|
- <input type="text" id="batchNameInput" name="batchName" autocomplete="off" style="width:160px"/>
|
|
|
|
|
- <input type="hidden" id="batchIdHidden" name="batchId"/>
|
|
|
|
|
|
|
+ <select name="batchId" id="batchIdSelect" class="form-control" style="width: 180px;">
|
|
|
|
|
+ <option value="" th:text="#{options.all}"></option>
|
|
|
|
|
+ </select>
|
|
|
</li>
|
|
</li>
|
|
|
<!-- 客户意向下拉框 -->
|
|
<!-- 客户意向下拉框 -->
|
|
|
<li>
|
|
<li>
|
|
@@ -332,74 +333,52 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<th:block th:include="include :: footer" />
|
|
<th:block th:include="include :: footer" />
|
|
|
|
|
+<th:block th:include="include :: select2-js" />
|
|
|
<script th:inline="javascript">
|
|
<script th:inline="javascript">
|
|
|
var linstenFlag = [[${@permission.hasPermi('cc:inboundcdr:listen')}]];
|
|
var linstenFlag = [[${@permission.hasPermi('cc:inboundcdr:listen')}]];
|
|
|
var downloadFlag = [[${@permission.hasPermi('cc:inboundcdr:download')}]];
|
|
var downloadFlag = [[${@permission.hasPermi('cc:inboundcdr:download')}]];
|
|
|
var prefix = ctx + "aicall/callPhone";
|
|
var prefix = ctx + "aicall/callPhone";
|
|
|
|
|
|
|
|
- // 外呼任务自动补全
|
|
|
|
|
- var $batchNameInput = $("#batchNameInput");
|
|
|
|
|
- var $batchIdHidden = $("#batchIdHidden");
|
|
|
|
|
- var taskList = [];
|
|
|
|
|
- var $taskDropdown = $('<ul class="task-autocomplete-dropdown"></ul>').css({
|
|
|
|
|
- position: 'absolute', background: '#fff', border: '1px solid #ddd',
|
|
|
|
|
- 'list-style': 'none', margin: 0, padding: 0, 'z-index': 9999,
|
|
|
|
|
- 'max-height': '200px', 'overflow-y': 'auto', width: $batchNameInput.outerWidth() || 160
|
|
|
|
|
- }).hide().appendTo('body');
|
|
|
|
|
-
|
|
|
|
|
- // 加载全部任务列表(任务表数据量小,一次加载即可)
|
|
|
|
|
- $.get(ctx + "aicall/callTask/all", function(result) {
|
|
|
|
|
- if (result.code === 200 && result.data) {
|
|
|
|
|
- taskList = result.data;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- $batchNameInput.on('input', function() {
|
|
|
|
|
- var val = $(this).val().trim().toLowerCase();
|
|
|
|
|
- $batchIdHidden.val('');
|
|
|
|
|
- if (!val) {
|
|
|
|
|
- $taskDropdown.hide();
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- var filtered = taskList.filter(function(item) {
|
|
|
|
|
- return item.batchName && item.batchName.toLowerCase().indexOf(val) >= 0;
|
|
|
|
|
- }).slice(0, 20);
|
|
|
|
|
- if (filtered.length === 0) {
|
|
|
|
|
- $taskDropdown.hide();
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- var offset = $batchNameInput.offset();
|
|
|
|
|
- $taskDropdown.css({
|
|
|
|
|
- left: offset.left,
|
|
|
|
|
- top: offset.top + $batchNameInput.outerHeight(),
|
|
|
|
|
- width: $batchNameInput.outerWidth()
|
|
|
|
|
- }).empty();
|
|
|
|
|
- $.each(filtered, function(i, item) {
|
|
|
|
|
- $('<li>').text(item.batchName).css({
|
|
|
|
|
- padding: '4px 8px', cursor: 'pointer', 'font-size': '13px'
|
|
|
|
|
- }).hover(
|
|
|
|
|
- function() { $(this).css('background-color', '#f5f5f5'); },
|
|
|
|
|
- function() { $(this).css('background-color', '#fff'); }
|
|
|
|
|
- ).on('click', function() {
|
|
|
|
|
- $batchNameInput.val(item.batchName);
|
|
|
|
|
- $batchIdHidden.val(item.batchId);
|
|
|
|
|
- $taskDropdown.hide();
|
|
|
|
|
- }).appendTo($taskDropdown);
|
|
|
|
|
|
|
+ $(function() {
|
|
|
|
|
+ // 外呼任务下拉列表:输入字符模糊查询任务表,选中后按任务ID查询外呼记录
|
|
|
|
|
+ var $batchIdSelect = $("#batchIdSelect");
|
|
|
|
|
+ $batchIdSelect.select2({
|
|
|
|
|
+ theme: "bootstrap",
|
|
|
|
|
+ width: "180px",
|
|
|
|
|
+ dropdownParent: $(".search-collapse"),
|
|
|
|
|
+ placeholder: "请输入任务名称",
|
|
|
|
|
+ allowClear: true,
|
|
|
|
|
+ ajax: {
|
|
|
|
|
+ url: ctx + "aicall/callTask/all",
|
|
|
|
|
+ dataType: "json",
|
|
|
|
|
+ delay: 250,
|
|
|
|
|
+ data: function(params) {
|
|
|
|
|
+ return {
|
|
|
|
|
+ batchName: params.term || ""
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ processResults: function(result) {
|
|
|
|
|
+ var success = result && (result.code === 0 || result.code === 200);
|
|
|
|
|
+ var data = (success && result.data) ? result.data : [];
|
|
|
|
|
+ return {
|
|
|
|
|
+ results: $.map(data, function(item) {
|
|
|
|
|
+ return {
|
|
|
|
|
+ id: String(item.batchId),
|
|
|
|
|
+ text: item.batchName
|
|
|
|
|
+ };
|
|
|
|
|
+ })
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ cache: true
|
|
|
|
|
+ },
|
|
|
|
|
+ minimumInputLength: 1,
|
|
|
|
|
+ language: {
|
|
|
|
|
+ inputTooShort: function() { return "请输入任务名称"; },
|
|
|
|
|
+ searching: function() { return "搜索中..."; },
|
|
|
|
|
+ noResults: function() { return "未找到任务"; }
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
- $taskDropdown.show();
|
|
|
|
|
- }).on('blur', function() {
|
|
|
|
|
- setTimeout(function() { $taskDropdown.hide(); }, 200);
|
|
|
|
|
- });
|
|
|
|
|
|
|
|
|
|
- // 搜索前:如果没有选中具体任务,清空batchId,不走LIKE
|
|
|
|
|
- var _originalQuery = $.fn.bootstrapTable.defaults.queryParams;
|
|
|
|
|
- $(document).on("pre.bs.table", "#bootstrap-table", function() {
|
|
|
|
|
- if (!$batchIdHidden.val()) {
|
|
|
|
|
- $batchNameInput.val('');
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- $(function() {
|
|
|
|
|
var options = {
|
|
var options = {
|
|
|
url: prefix + "/list",
|
|
url: prefix + "/list",
|
|
|
createUrl: prefix + "/add",
|
|
createUrl: prefix + "/add",
|
|
@@ -960,4 +939,4 @@
|
|
|
})();
|
|
})();
|
|
|
</script>
|
|
</script>
|
|
|
</body>
|
|
</body>
|
|
|
-</html>
|
|
|
|
|
|
|
+</html>
|