| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- var sourceareaObj,exportParam,typeObj,infopropertyObj
- $(function() {
- laydate.skin('blue');
- laydate({
- elem: '#starttime',
- event: 'focus',
- istime: true,
- format: 'YYYY-MM-DD hh:mm:ss'
- });
- laydate({
- elem: '#endtime',
- event: 'focus',
- istime: true,
- format: 'YYYY-MM-DD hh:mm:ss'
- });
-
- laydate({
- elem: '#dealstarttime',
- event: 'focus',
- istime: true,
- format: 'YYYY-MM-DD hh:mm:ss'
- });
- laydate({
- elem: '#dealstrendtime',
- event: 'focus',
- istime: true,
- format: 'YYYY-MM-DD hh:mm:ss'
- });
- sourceareaObj = {
- ele:"#sourceAreas",
- apiUrl:"Area/GetAreaListById",
- data:{
- textKey:'F_AreaName',
- valueKey:'F_AreaId'
- }
- }
- sourceObj = {
- ele:"#source",
- id: 1
- }
- typeObj = {
- ele:"#type",
- id: 2
- }
- //工单来源
- selectCommonFn(getDicObjFn(sourceObj))
- //受话坐席
- personSelect($("#ZX"),"ZXLD,MTDD","UserAccount/GetSeatList");
- //审核员
- personSelect($("#yardman"),"ZXLD,MTDD","UserAccount/GetUsersList");
- //精准地域
- selectCommonFn(sourceareaObj)
-
- tree();
- //舆情类型
- selectCommonFn(getDicObjFn(typeObj))
- $(".Seach").click(function() {
- load(getParam);
- })
- // 导出文件
- $(".exportFile").click(function() {
-
- exportParam.isdc = 1;
- console.log(exportParam)
- exportFileFun(getLoadParams(urlState).apiUrl, exportParam)
- })
-
- })
- $('.ul_tab li').click(function () {
- $(this).addClass("active").siblings().removeClass("active");
- var index = $(this).index();
- if (index === 0) {
- db = 0;
- } else if (index === 1) {
- db = 1
- }
- load();
- })
- function Close() {
- $(".lyxz").removeClass("cx");
- if ($("audio").length > 0) {
- $("audio")[0].pause();
- }
- }
- //承办单位下拉事件开始
- $(".inps").focus(function() {
- $(".xlAdd").css("display", "block");
- });
- $(".xl").click(function() {
- if($(".xlAdd").css("display") == "block") {
- $(".xlAdd").css("display", "none");
- } else {
- $(".xlAdd").css("display", "block");
- }
- });
- $(".addTree").mouseleave(function() {
- $(this).css("display", "none");
- });
- //清除
- $(".Cleans ").click(function() {
- $(".inps").val("");
- $("#PID").val("");
- $("#Dpment").val("");
- });
- //承办单位下拉事件结束
- //树形下拉开始
- function tree() {
- $.get(
- huayi.config.callcenter_url + "Department/GetDeptList", {
- token: $.cookie("token"),
- },
- function(result) {
- result = $.parseJSON(result);
- $.fn.zTree.init( $("#addTreeDemo"),setting1, result.data); //实例化树形图
- }
- );
- }
- var setting1 = {
- data: {
- key: {
- name: "F_DeptName",
- },
- simpleData: {
- enable: true,
- idKey: "F_DeptId",
- pIdKey: "F_PartentId",
- rootPId: 0,
- },
- },
- callback: {
- onClick: zTreeOnClick,
- },
- };
- function zTreeOnClick(event, treeId, treeNode) {
- if(treeNode.level >= 1) {
- $(".inps").val(treeNode.F_DeptName);
- $("#PID").val(treeNode.F_DeptId);
- $(".Cleans").show();
- }
- }
- //树形下拉结束
- // 导出列表
- function exportFileFun(api, params) {
- var url = huayi.config.callcenter_url + api;
- if(typeof(params) !== "object") {
- return
- }
- delete params.page
- delete params.pagesize
- delete params.pageindex
- Object.keys(params).forEach(function(key, index) {
-
- if(!params[key]){
- if (params[key] != 0) {
- params[key] = ""
- }
- }
- if (index === 0) {
- url += `?${key}=${params[key]}`
- } else {
- url += `&${key}=${params[key]}`
- }
- })
- console.log(url)
- window.location.href = url;
- }
|