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
9.3 KiB
1 lines
9.3 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-035a3be2"],{6594:function(e,a,t){},"70c3":function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e._self._c;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(a){e.drawerQuery=a}}},[a("avue-form",{attrs:{option:e.queryOption},on:{submit:e.querySubmit},model:{value:e.queryTips,callback:function(a){e.queryTips=a},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(a){e.ckData=a},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(a){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(a){e.activeName=a},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)},i=[],n=t("c14f"),l=t("1da1"),o=(t("14d9"),t("a434"),t("b0c0"),t("e9f5"),t("7d54"),t("e9c4"),t("b64b"),t("d3b7"),t("ac1f"),t("841c"),t("159b"),t("c7ea")),c=t("313e"),s={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,a){a()},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,a){var t=this;if(2==this.diyCloumnFlag)if(e.length<a.length)this.header.forEach((function(a,r){-1===e.indexOf(a.label)&&t.header.splice(r,1)}));else{var r=[];this.diyHeader.forEach((function(a){-1!==e.indexOf(a.label)&&r.push(a)})),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 a in e.myChart)e.myChart[a].resize()}))},methods:{handleExport:function(){var e=this;return Object(l["a"])(Object(n["a"])().m((function a(){var t,r;return Object(n["a"])().w((function(a){while(1)switch(a.n){case 0:return t={id:e.$route.query.id,queryParams:""},a.n=1,o["a"].exportForm(t);case 1:r=a.v,0==(null===r||void 0===r?void 0:r.code)&&(window.open(r.data.url),e.$message.success(r.msg));case 2:return a.a(2)}}),a)})))()},getDetail:function(e){1==e.name?this.getLoadEcharts():this.getTableInfo()},getLoadEcharts:function(){var e=this;return Object(l["a"])(Object(n["a"])().m((function a(){return Object(n["a"])().w((function(a){while(1)switch(a.n){case 0:return a.n=1,e.getQuesDetail();case 1:e.showEcharts();case 2:return a.a(2)}}),a)})))()},showEcharts:function(){var e=this;for(var a in this.quesData){var t=this.quesData[a];if("list"!=t.type){var r={};"radio"==t.type&&(r={xAxis:{type:"category",data:t.detail.nameArr},yAxis:{type:"value"},series:[{data:t.detail.valueArr,type:"line"}]}),"checkbox"==t.type&&(r={xAxis:{type:"category",data:t.detail.nameArr},yAxis:{type:"value"},series:[{type:"bar",data:t.detail.valueArr}]}),"rate"==t.type&&(r={series:[{type:"pie",data:t.detail.data,radius:["40%","70%"]}]}),this.myChart[a]||(this.myChart[a]=c["init"](document.getElementById("echart_"+a))),this.myChart[a].setOption(r,!0)}}window.addEventListener("resize",(function(){for(var a in e.myChart)e.myChart[a].resize()}))},searchSuccess:function(){this.getTableInfo(),this.getLoadEcharts()},labelHead:function(e,a){var t=a.column;a.index;return e("span",{class:"table-head",style:{width:"100%"}},[t.label])},querySubmit:function(e,a){var t=this;return Object(l["a"])(Object(n["a"])().m((function e(){return Object(n["a"])().w((function(e){while(1)switch(e.n){case 0:t.search.queryParams=t.queryTips,t.getTableInfo(),t.getLoadEcharts(),t.drawerQuery=!1,a();case 1:return e.a(2)}}),e)})))()},getQuesDetail:function(){var e=this;return Object(l["a"])(Object(n["a"])().m((function a(){var t,r,i;return Object(n["a"])().w((function(a){while(1)switch(a.n){case 0:return e.search.id=e.id,a.n=1,o["a"].quesDetail(e.search);case 1:for(r in t=a.v,e.header=JSON.parse(JSON.stringify(t.data.header)),e.headerData=e.header,e.quesData=t.data.data,e.quesTotal=t.data.total,e.queryOption.column[1].children.column[0].dicData=[],t.data.header)i=t.data.header[r],e.ckData.push(i.label),e.queryOption.column[1].children.column[0].dicData.push({label:i.label,value:i.property});e.diyHeader=JSON.parse(JSON.stringify(t.data.header));case 2:return a.a(2)}}),a)})))()},getTableInfo:function(){var e=this;return Object(l["a"])(Object(n["a"])().m((function a(){var t;return Object(n["a"])().w((function(a){while(1)switch(a.n){case 0:return e.search.id=e.id,a.n=1,o["a"].detail(e.search);case 1:t=a.v,e.header=JSON.parse(JSON.stringify(t.data.header)),e.headerData=e.header,e.tableData=t.data.data,e.page.total=t.data.total,e.queryOption.column[1].children.column[0].dicData=[],t.data.header.forEach((function(a){e.ckData.push(a.label),e.queryOption.column[1].children.column[0].dicData.push({label:a.label,value:a.property})})),e.diyHeader=JSON.parse(JSON.stringify(t.data.header));case 2:return a.a(2)}}),a)})))()},getDiyForm:function(){var e=this;return Object(l["a"])(Object(n["a"])().m((function a(){var t;return Object(n["a"])().w((function(a){while(1)switch(a.n){case 0:return a.n=1,e.$api.diy.form.get({id:e.id});case 1:t=a.v,e.option=t.data,e.option.filterDic=!0,"view"==e.mode&&(e.option.detail=!0);case 2:return a.a(2)}}),a)})))()},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,a){var t=this;return Object(l["a"])(Object(n["a"])().m((function a(){var r;return Object(n["a"])().w((function(a){while(1)switch(a.n){case 0:return t.mode="view",t.drawerQuery=!0,t.nowRowId=e.id,a.n=1,o["a"].formInfo({form_id:t.id,table_id:e.id});case 1:r=a.v,t.queryTips=r.data,t.form=r.data;case 2:return a.a(2)}}),a)})))()},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=s,d=(t("96eb"),t("2877")),h=Object(d["a"])(u,r,i,!1,null,"666db902",null);a["default"]=h.exports},"96eb":function(e,a,t){"use strict";t("6594")},c7ea:function(e,a,t){"use strict";var r=t("365c");function i(e){var a="/form/index";return r["a"].get(a,e)}function n(e){var a="/form/add";return r["a"].post(a,e)}function l(e){var a="/form/info";return r["a"].get(a,e)}function o(e){var a="/form/edit";return r["a"].post(a,e)}function c(e){var a="/form/del";return r["a"].get(a,e)}function s(e){var a="/form/deploy";return r["a"].get(a,e)}function u(e){var a="/form/undeploy";return r["a"].get(a,e)}function d(e){var a="/form/detail";return r["a"].get(a,e)}function h(e){var a="/form/quesDetail";return r["a"].get(a,e)}function p(e){var a="/form/exportForm";return r["a"].post(a,e)}a["a"]={list:i,formInfo:l,add:n,edit:o,del:c,deploy:s,undeploy:u,detail:d,quesDetail:h,exportForm:p}}}]);
|