| 1 |
- "use strict";(self["webpackChunkyos_manage"]=self["webpackChunkyos_manage"]||[]).push([[208],{4208:function(e,t,s){s.r(t),s.d(t,{default:function(){return f}});var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container"},[s("addTemp",{on:{onSuccess:e.queryReport}}),s("el-dialog",{attrs:{title:"编辑报表",visible:e.dialogTableVisible,width:"400px","append-to-body":"","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[s("el-form",{staticClass:"demo-form-inline",attrs:{inline:!1,model:e.report,size:"small"}},[s("el-form-item",{staticStyle:{"padding-left":"30px"},attrs:{label:"应用"}},[s("el-select",{attrs:{placeholder:"请选择",filterable:""},model:{value:e.report.systemappid,callback:function(t){e.$set(e.report,"systemappid",t)},expression:"report.systemappid"}},e._l(e.apps,(function(e){return s("el-option",{key:e.systemappid,attrs:{label:e.systemmodulename+"-"+e.systemappname,value:e.systemappid}})})),1)],1),s("el-form-item",{staticStyle:{"padding-left":"30px"},attrs:{label:"站点"}},[s("el-select",{attrs:{placeholder:"请选择",filterable:"",clearable:""},model:{value:e.report.siteid,callback:function(t){e.$set(e.report,"siteid",t)},expression:"report.siteid"}},e._l(e.siteids,(function(e){return s("el-option",{key:e.siteid,attrs:{label:e.sitename,value:e.siteid}})})),1)],1),s("el-form-item",{staticStyle:{"padding-left":"30px"},attrs:{label:"启用"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:e.report.isused,callback:function(t){e.$set(e.report,"isused",t)},expression:"report.isused"}})],1)],1),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogTableVisible=!1}}},[e._v("取 消")]),s("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.updatereport()}}},[e._v("确 定")])],1)],1),s("el-table",{staticStyle:{width:"100%"},attrs:{data:e.reports,border:"",stripe:"",size:"small","header-cell-style":{background:"#f1f2f3",color:"#333"}}},[s("el-table-column",{attrs:{prop:"rowindex",label:"行",width:"50",align:"center"}}),s("el-table-column",{attrs:{label:"操作",width:"60",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("el-button",{attrs:{slot:"reference",type:"text",size:"small"},on:{click:function(s){return e.openupdatedoalog(t.row)}},slot:"reference"},[e._v("编辑")])]}}])}),s("el-table-column",{attrs:{prop:"type",label:"类型",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return["printinfo"==t.row.type?s("el-tag",{attrs:{type:"primary",size:"mini"}},[e._v(" 打 印")]):e._e(),"chartinfo"==t.row.type?s("el-tag",{attrs:{type:"primary",size:"mini"}},[e._v(" 图 表")]):e._e(),"datainfo"==t.row.type?s("el-tag",{attrs:{type:"primary",size:"mini"}},[e._v(" 报 表")]):e._e()]}}])}),s("el-table-column",{attrs:{prop:"name",label:"报表名称"}}),s("el-table-column",{attrs:{prop:"systemappname",label:"应用",width:"150"}}),s("el-table-column",{attrs:{prop:"isused",label:"启用",width:"50",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(0===t.row.isused?"":"✅")+" ")]}}])}),s("el-table-column",{attrs:{prop:"siteid",label:"站点",width:"120"}}),s("el-table-column",{attrs:{label:"操作",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("el-button",{attrs:{slot:"reference",type:"text",size:"small"},on:{click:function(s){return e.editreport(t.row)}},slot:"reference"},[e._v("设计")])]}}])}),s("el-table-column",{attrs:{prop:"create_time",label:"创建时间",width:"150"}}),s("el-table-column",{attrs:{prop:"update_time",label:"修改时间",width:"150"}}),s("el-table-column",{attrs:{prop:"view_count",label:"访问次数",width:"100"}}),s("el-table-column",{attrs:{label:"操作",width:"60",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("el-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:function(s){return e.deleteReport(t.row)}}},[s("el-button",{attrs:{slot:"reference",type:"text",size:"small"},slot:"reference"},[e._v("删 除")])],1)]}}])})],1)],1)},i=[],l=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("el-button",{staticStyle:{"margin-bottom":"10px"},attrs:{type:"primary",size:"small"},on:{click:function(t){e.dialogTableVisible=!0}}},[e._v("新 增")]),s("el-dialog",{attrs:{title:"新增报表",visible:e.dialogTableVisible,width:"400px"},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[s("el-form",{staticClass:"demo-form-inline",attrs:{inline:!1,model:e.form,size:"small"}},[s("el-form-item",{staticStyle:{"padding-left":"30px"},attrs:{label:"应用"}},[s("el-select",{attrs:{placeholder:"请选择",filterable:""},model:{value:e.form.systemappid,callback:function(t){e.$set(e.form,"systemappid",t)},expression:"form.systemappid"}},e._l(e.apps,(function(e){return s("el-option",{key:e.systemappid,attrs:{label:e.systemmodulename+"-"+e.systemappname,value:e.systemappid}})})),1)],1),s("el-form-item",{staticStyle:{"padding-left":"30px"},attrs:{label:"站点"}},[s("el-select",{attrs:{placeholder:"请选择",filterable:"",clearable:""},model:{value:e.form.siteid,callback:function(t){e.$set(e.form,"siteid",t)},expression:"form.siteid"}},e._l(e.siteids,(function(e){return s("el-option",{key:e.siteid,attrs:{label:e.sitename,value:e.siteid}})})),1)],1),s("el-form-item",{staticStyle:{"padding-left":"30px"},attrs:{label:"启用"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:e.form.isused,callback:function(t){e.$set(e.form,"isused",t)},expression:"form.isused"}})],1)],1),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogTableVisible=!1}}},[e._v("取 消")]),s("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.createreport()}}},[e._v("确 定")])],1)],1)],1)},o=[],r={data(){return{dialogTableVisible:!1,form:{systemappid:"",siteid:""},param:{},apps:[],siteids:[]}},methods:{async createreport(){const e=await this.$api.requested({classname:"sysmanage.develop.report.report",method:"insertReport",content:this.form});1===e.code?(this.$emit("onSuccess"),this.dialogTableVisible=!1,window.open(e.data)):this.$notify({title:e.msg,message:e.data,type:"error"})},async appselect(){const e=await this.$api.requested({classname:"sysmanage.develop.optiontype.optiontype",method:"optiontypeselect",content:{pageNumber:1,pageSize:1e4,typename:"appselectwithoutcondition",parameter:{}}});this.apps=e.data,this.form.systemappid=163},async siteidselect(){const e=await this.$api.requested({classname:"sysmanage.develop.optiontype.optiontype",method:"optiontypeselect",content:{pageNumber:1,pageSize:1e4,typename:"selecsiteid",parameter:{}}});this.siteids=e.data}},mounted(){this.appselect(),this.siteidselect()}},n=r,p=s(1001),c=(0,p.Z)(n,l,o,!1,null,null,null),d=c.exports,m={data(){return{dialogTableVisible:!1,reports:[],report:{},apps:[],siteids:[]}},components:{addTemp:d},methods:{async queryReport(){console.log("asds11d");const e=await this.$api.requested({classname:"sysmanage.develop.report.report",method:"queryReportList",content:{}});this.reports=e.data},async appselect(){const e=await this.$api.requested({classname:"sysmanage.develop.optiontype.optiontype",method:"optiontypeselect",content:{pageNumber:1,pageSize:1e4,typename:"appselectwithoutcondition",parameter:{}}});this.apps=e.data},async siteidselect(){const e=await this.$api.requested({classname:"sysmanage.develop.optiontype.optiontype",method:"optiontypeselect",content:{pageNumber:1,pageSize:1e4,typename:"selecsiteid",parameter:{}}});this.siteids=e.data},async editreport(e){const t=await this.$api.requested({classname:"sysmanage.develop.report.report",method:"editReport",content:{sys_reportid:e.sys_reportid}});window.open(t.data)},async updatereport(){const e=await this.$api.requested({classname:"sysmanage.develop.report.report",method:"updateReport",content:{sys_reportid:this.report.sys_reportid,siteid:this.report.siteid,systemappid:this.report.systemappid,isused:this.report.isused}});1===e.code?(this.dialogTableVisible=!1,this.$emit("onSuccess"),this.queryReport()):this.$notify({title:e.msg,message:e.data,type:"error"})},async openupdatedoalog(e){this.dialogTableVisible=!0,this.report=Object.assign({},this.report,e)},async deleteReport(e){const t=await this.$api.requested({classname:"sysmanage.develop.report.report",method:"deleteReport",content:{sys_reportid:e.sys_reportid}});1===t.code?this.queryReport():this.$notify({title:t.msg,message:t.data,type:"error"})}},mounted(){this.queryReport(),this.appselect(),this.siteidselect()}},u=m,y=(0,p.Z)(u,a,i,!1,null,null,null),f=y.exports}}]);
|