You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
10 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6772c8cf"],{"129f":function(e,t,a){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}},6594:function(e,t,a){},"70c3":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"main-box"},[a("el-dialog",{attrs:{title:"高级查询","wrapper-closable":!1,visible:e.drawerQuery,width:"60%",modal:!1,"destroy-on-close":!0},on:{"update:visible":function(t){e.drawerQuery=t}}},[a("avue-form",{attrs:{option:e.queryOption},on:{submit:e.querySubmit},model:{value:e.queryTips,callback:function(t){e.queryTips=t},expression:"queryTips"}})],1),a("el-main",[a("div",{staticClass:"list-search"},[a("el-popover",{attrs:{placement:"bottom",width:"400",trigger:"click"}},[a("el-checkbox-group",{model:{value:e.ckData,callback:function(t){e.ckData=t},expression:"ckData"}},e._l(e.diyHeader,(function(e){return a("el-checkbox",{key:e.prop,attrs:{label:e.label,name:e.property}})})),1),a("el-button",{attrs:{slot:"reference",type:"primary",icon:"el-icon-setting",size:"small"},on:{click:function(t){e.diyCloumnFlag=2}},slot:"reference"},[e._v(" 自定义列 ")])],1),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-refresh",size:"small"},on:{click:e.refresh}},[e._v(" 刷新 ")]),a("el-button",{attrs:{type:"primary"},on:{click:e.handleExport}},[e._v(" "+e._s(e.$t("导出"))+" ")])],1),a("el-tabs",{staticClass:"tabBox",attrs:{"tab-position":e.tabPosition},on:{"tab-click":e.getDetail},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"数据详情",name:"2"}},[a("el-table",{ref:"table",staticStyle:{width:"100%"},attrs:{data:e.tableData,"row-style":{height:"50px"},"render-header":e.labelHead}},[a("el-table-column",{attrs:{label:"ID",prop:"id","show-overflow-tooltip":!0,width:"80"}}),e._l(e.header,(function(t){return a("el-table-column",{key:t.prop,attrs:{label:t.label,align:"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[e._v(" "+e._s(a.row[t.property])+" ")]}}],null,!0)})}))],2),a("div",{staticClass:"page"},[a("el-pagination",{attrs:{"hide-on-single-page":e.page.total<e.page.size,background:"","current-page":e.page.currentPage,"page-sizes":e.page.pageSizes,"page-size":e.page.size,layout:"total, sizes, prev, pager, next, jumper",total:e.page.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)],1)],1)],1)},n=[],i=a("c7eb"),l=a("1da1"),s=(a("d3b7"),a("159b"),a("a434"),a("14d9"),a("b64b"),a("e9c4"),a("b0c0"),a("ac1f"),a("841c"),a("c7ea")),c=a("313e"),o={data:function(){return{activeName:"2",myChart:{},quesData:{},quesTotal:0,tabPosition:"top",headerData:[],diyHeader:[],diyCloumnFlag:1,ckData:[],queryTips:{condition:"and",childTips:[{field:"",rule:"eq",val:""}]},drawerQuery:!1,drawer:!1,option:{},header:[],search:{page:1,limit:15,queryParams:{}},page:{total:0,currentPage:1,size:15,pageSizes:[15,25,35,45]},tableData:[],queryOption:{submitText:"查询",submitIcon:"el-icon-search",labelWidth:110,column:[{label:"过滤条件匹配",prop:"condition",type:"select",span:12,row:!0,dicData:[{label:"AND(所有条件都要求匹配)",value:"and"},{label:"OR(条件中的任意一个匹配)",value:"or"}]},{label:"子表单",prop:"childTips",type:"dynamic",span:24,children:{align:"center",headerAlign:"center",rowAdd:function(e){e({rule:"eq"})},rowDel:function(e,t){t()},column:[{label:"字段",prop:"field",type:"select",dicData:[]},{label:"条件",prop:"rule",type:"select",dicData:[{label:"等于",value:"eq"},{label:"包含",value:"like"},{label:"以什么开始",value:"left_like"},{label:"以什么结尾",value:"right_like"},{label:"不等于",value:"neq"},{label:"大于",value:"gt"},{label:"大于等于",value:"gte"},{label:"小于",value:"lt"},{label:"小于等于",value:"lte"}]},{label:"值",prop:"val",type:"input"}]}}]}}},watch:{ckData:function(e,t){var a=this;if(2==this.diyCloumnFlag)if(e.length<t.length)this.header.forEach((function(t,r){-1===e.indexOf(t.label)&&a.header.splice(r,1)}));else{var r=[];this.diyHeader.forEach((function(t){-1!==e.indexOf(t.label)&&r.push(t)})),this.header=JSON.parse(JSON.stringify(r))}}},created:function(){this.id=this.$route.query.id,this.getTableInfo()},mounted:function(){var e=this;this.$nextTick((function(){for(var t in e.myChart)e.myChart[t].resize()}))},methods:{handleExport:function(){var e=this;return Object(l["a"])(Object(i["a"])().mark((function t(){var a,r;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a={id:e.$route.query.id,queryParams:""},t.next=3,s["a"].exportForm(a);case 3:r=t.sent,0==(null===r||void 0===r?void 0:r.code)&&(window.open(r.data.url),e.$message.success(r.msg));case 5:case"end":return t.stop()}}),t)})))()},getDetail:function(e){1==e.name?this.getLoadEcharts():this.getTableInfo()},getLoadEcharts:function(){var e=this;return Object(l["a"])(Object(i["a"])().mark((function t(){return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getQuesDetail();case 2:e.showEcharts();case 3:case"end":return t.stop()}}),t)})))()},showEcharts:function(){var e=this;for(var t in this.quesData){var a=this.quesData[t];if("list"!=a.type){var r={};"radio"==a.type&&(r={xAxis:{type:"category",data:a.detail.nameArr},yAxis:{type:"value"},series:[{data:a.detail.valueArr,type:"line"}]}),"checkbox"==a.type&&(r={xAxis:{type:"category",data:a.detail.nameArr},yAxis:{type:"value"},series:[{type:"bar",data:a.detail.valueArr}]}),"rate"==a.type&&(r={series:[{type:"pie",data:a.detail.data,radius:["40%","70%"]}]}),this.myChart[t]||(this.myChart[t]=c["init"](document.getElementById("echart_"+t))),this.myChart[t].setOption(r,!0)}}window.addEventListener("resize",(function(){for(var t in e.myChart)e.myChart[t].resize()}))},searchSuccess:function(){this.getTableInfo(),this.getLoadEcharts()},labelHead:function(e,t){var a=t.column;t.index;return e("span",{class:"table-head",style:{width:"100%"}},[a.label])},querySubmit:function(e,t){var a=this;return Object(l["a"])(Object(i["a"])().mark((function e(){return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:a.search.queryParams=a.queryTips,a.getTableInfo(),a.getLoadEcharts(),a.drawerQuery=!1,t();case 5:case"end":return e.stop()}}),e)})))()},getQuesDetail:function(){var e=this;return Object(l["a"])(Object(i["a"])().mark((function t(){var a,r,n;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.search.id=e.id,t.next=3,s["a"].quesDetail(e.search);case 3:for(r in a=t.sent,e.header=JSON.parse(JSON.stringify(a.data.header)),e.headerData=e.header,e.quesData=a.data.data,e.quesTotal=a.data.total,e.queryOption.column[1].children.column[0].dicData=[],a.data.header)n=a.data.header[r],e.ckData.push(n.label),e.queryOption.column[1].children.column[0].dicData.push({label:n.label,value:n.property});e.diyHeader=JSON.parse(JSON.stringify(a.data.header));case 11:case"end":return t.stop()}}),t)})))()},getTableInfo:function(){var e=this;return Object(l["a"])(Object(i["a"])().mark((function t(){var a;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.search.id=e.id,t.next=3,s["a"].detail(e.search);case 3:a=t.sent,e.header=JSON.parse(JSON.stringify(a.data.header)),e.headerData=e.header,e.tableData=a.data.data,e.page.total=a.data.total,e.queryOption.column[1].children.column[0].dicData=[],a.data.header.forEach((function(t){e.ckData.push(t.label),e.queryOption.column[1].children.column[0].dicData.push({label:t.label,value:t.property})})),e.diyHeader=JSON.parse(JSON.stringify(a.data.header));case 11:case"end":return t.stop()}}),t)})))()},getDiyForm:function(){var e=this;return Object(l["a"])(Object(i["a"])().mark((function t(){var a;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$api.diy.form.get({id:e.id});case 2:a=t.sent,e.option=a.data,e.option.filterDic=!0,"view"==e.mode&&(e.option.detail=!0);case 6:case"end":return t.stop()}}),t)})))()},refresh:function(){this.search.queryParams={},this.getTableInfo()},resetQuery:function(){this.queryTips={condition:"and",childTips:[{field:"",rule:"eq",val:""}]}},buildQuery:function(){this.resetQuery(),this.drawerQuery=!0,this.queryOption.filterDic=!0},table_view:function(e,t){var a=this;return Object(l["a"])(Object(i["a"])().mark((function t(){var r;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a.mode="view",a.drawerQuery=!0,a.nowRowId=e.id,t.next=5,s["a"].formInfo({form_id:a.id,table_id:e.id});case 5:r=t.sent,a.queryTips=r.data,a.form=r.data;case 8:case"end":return t.stop()}}),t)})))()},handleSizeChange:function(e){this.page.size=e,this.page.currentPage=1,this.search.page=1,this.search.limit=e,this.getList()},handleCurrentChange:function(e){this.page.currentPage=e,this.search.page=e,this.search.limit=this.page.size,this.getList()}}},u=o,d=(a("96eb"),a("2877")),p=Object(d["a"])(u,r,n,!1,null,"666db902",null);t["default"]=p.exports},"841c":function(e,t,a){"use strict";var r=a("c65b"),n=a("d784"),i=a("825a"),l=a("7234"),s=a("1d80"),c=a("129f"),o=a("577e"),u=a("dc4a"),d=a("14c3");n("search",(function(e,t,a){return[function(t){var a=s(this),n=l(t)?void 0:u(t,e);return n?r(n,t,a):new RegExp(t)[e](o(a))},function(e){var r=i(this),n=o(e),l=a(t,r,n);if(l.done)return l.value;var s=r.lastIndex;c(s,0)||(r.lastIndex=0);var u=d(r,n);return c(r.lastIndex,s)||(r.lastIndex=s),null===u?-1:u.index}]}))},"96eb":function(e,t,a){"use strict";a("6594")},c7ea:function(e,t,a){"use strict";var r=a("365c");function n(e){var t="/form/index";return r["a"].get(t,e)}function i(e){var t="/form/add";return r["a"].post(t,e)}function l(e){var t="/form/info";return r["a"].get(t,e)}function s(e){var t="/form/edit";return r["a"].post(t,e)}function c(e){var t="/form/del";return r["a"].get(t,e)}function o(e){var t="/form/deploy";return r["a"].get(t,e)}function u(e){var t="/form/undeploy";return r["a"].get(t,e)}function d(e){var t="/form/detail";return r["a"].get(t,e)}function p(e){var t="/form/quesDetail";return r["a"].get(t,e)}function h(e){var t="/form/exportForm";return r["a"].post(t,e)}t["a"]={list:n,formInfo:l,add:i,edit:s,del:c,deploy:o,undeploy:u,detail:d,quesDetail:p,exportForm:h}}}]);