{"size": 14881, "ext": "js", "max_stars_repo_path": "front/dist/static/js/chunk-59be641e.d118b0d3.js", "max_stars_repo_name": "yuanxiaotian666/djmanage", "max_stars_repo_stars_event_min_datetime": "2021-01-07T07:25:46.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-07T07:25:46.000Z", "max_issues_repo_path": "front/dist/static/js/chunk-59be641e.d118b0d3.js", "max_issues_repo_name": "yuanxiaotian666/djmanage", "max_issues_repo_issues_event_min_datetime": "2021-04-06T18:26:43.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-12T00:53:10.000Z", "max_forks_repo_path": "front/dist/static/js/chunk-59be641e.d118b0d3.js", "max_forks_repo_name": "yuanxiaotian666/djmanage", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 11, "max_forks_count": null, "avg_line_length": 14881.0, "max_line_length": 14881, "alphanum_fraction": 0.710637726}
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-59be641e","chunk-2d0d36c4"],{"1eb7":function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("vxe-table",{ref:"skTable",attrs:{border:"full","auto-resize":"","show-overflow":"","highlight-hover-row":"","show-header":!1,"sync-resize":!0,data:e.detailData}},[a("vxe-table-column",{attrs:{field:"label",width:"40%"}}),a("vxe-table-column",{attrs:{field:"value"}})],1)},i=[];a("1bc7"),a("9f60"),a("94f0"),a("0c84"),a("2843"),a("a450"),a("4057");function r(e,t){var a;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(a=o(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,s=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return l=e.done,e},e:function(e){s=!0,r=e},f:function(){try{l||null==a.return||a.return()}finally{if(s)throw r}}}}function o(e,t){if(e){if("string"===typeof e)return l(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var s={name:"detailTable",props:{detailList:{type:Array,default:function(){return[]}},selectRow:{type:Object,default:function(){return{}}}},data:function(){return{detailData:[]}},methods:{getInit:function(){var e,t=r(this.detailList);try{for(t.s();!(e=t.n()).done;){var a=e.value;if(a.field){var n={label:a.title,value:this.selectRow[a.field]};this.detailData.push(n)}}}catch(i){t.e(i)}finally{t.f()}}},created:function(){this.getInit()}},u=s,c=a("c701"),f=Object(c["a"])(u,n,i,!1,null,"49b8cc3c",null);t["a"]=f.exports},"5d65":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("vxe-form",{attrs:{data:e.formData,rules:e.formRules,"destroy-on-close":!0,"title-align":"right","title-width":"150"},on:{submit:e.onSubmit}},[e._l(e.formItems,(function(t,n){return[t.itemRender&&"$uploadImg"==t.itemRender.name?a("vxe-form-item",{key:n,attrs:{title:t.title,field:t.field,span:t.span,"item-render":t.itemRender},scopedSlots:e._u([{key:"default",fn:function(){return[a("el-upload",{attrs:{name:"fileInput",headers:e.setHeaders(),action:e.setUrl(t.itemRender.props.action),"show-file-list":!1,"on-success":e.handleAvatarSuccess}},[null!=t.field?a("img",{attrs:{src:t.field}}):a("i",{staticClass:"el-icon-plus"})])]},proxy:!0}],null,!0)}):t.itemRender&&"$divider"==t.itemRender.name?a("div",{key:n,staticStyle:{"background-color":"#fff",top:"0","z-index":"999","text-align":"left"}},[a("divider",{attrs:{title:t.itemRender.props.title}})],1):t.itemRender&&"$buttons"==t.itemRender.name?a("div",{key:n},[a("vxe-form-item",{attrs:{align:"right","title-align":t.titleAlign,"title-width":t.titleWidth,"title-prefix":t.titlePrefix,title:t.title,field:t.field,span:t.span,"item-render":t.itemRender}})],1):a("vxe-form-item",{key:n,attrs:{align:t.align,"title-align":t.titleAlign,"title-width":t.titleWidth,"title-prefix":t.titlePrefix,title:t.title,field:t.field,span:t.span,"item-render":t.itemRender}})]})),a("vxe-form-item",{attrs:{span:24}},[e._t("default")],2)],2)],1)},i=[],r=a("1762"),o=a.n(r),l={name:"skform",props:{formData:{type:Object,default:function(){return{}}},formRules:{type:Object,default:function(){return{}}},formItems:{type:Array,default:function(){return[]}}},data:function(){return{uploadHeaders:{}}},methods:{setHeaders:function(){var e=sessionStorage.getItem("UserInfo");e=o.a.toStringJSON(e);var t={Authorization:"Bearer "+e.token};return t},setUrl:function(e){return"http://127.0.0.1:8000"+e},onSubmit:function(){this.$emit("onSubmit",this.formData)},handleAvatarSuccess:function(e,t){console.log(e)}}},s=l,u=a("c701"),c=Object(u["a"])(s,n,i,!1,null,"383977fc",null);t["default"]=c.exports},"992b":function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",[a("vxe-table",{ref:"xTable",attrs:{border:"full","highlight-hover-row":"","highlight-current-row":"",data:e.tableData,height:e.tableHeight,"row-id":"id","auto-resize":!0,"sync-resize":!0,"checkbox-config":e.checkboxConfig},on:{"checkbox-change":e.checkboxChange,"current-change":e.currentChange,"cell-dblclick":e.cellDblClickEvent}},[e._l(e.tableColumns,(function(t,n){return a("vxe-table-column",e._b({key:n},"vxe-table-column",t,!1))})),a("vxe-table-column",{attrs:{title:"操作",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button-group",[e._t("handle",[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"Update",expression:"'Update'"}],attrs:{type:"primary"},on:{click:function(t){return e.editRowEvent(n)}}},[e._v("编辑")]),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"Delete",expression:"'Delete'"}],attrs:{type:"danger"},on:{click:function(t){return e.delRowEvent(n)}}},[e._v("删除")])],{data:n})],2)]}}],null,!0)})],2),a("vxe-pager",{attrs:{loading:e.loading1,"current-page":e.tablePage.page,"page-size":e.tablePage.rows,total:e.tablePage.total,layouts:["PrevPage","JumpNumber","NextPage","FullJump","Sizes","Total"]},on:{"page-change":e.handlePageChange}})],1)])},i=[],r=(a("e680"),{name:"sk-table",props:{tableColumn:{type:Array,default:function(){return[]}},tableData:{type:Array,default:function(){return[]}},tablePage:{type:Object,default:function(){return{currentPage:1,pageSize:10,totalResult:20}}},localHeight:{type:Number,default:function(){return 0}}},data:function(){return{loading1:!1,tableHeight:500,selectRow:{},checkboxConfig:{trigger:"cell",highlight:!0},tableColumns:[]}},created:function(){var e=this.getScreen();this.tableHeight=e.height-350-this.localHeight,this.tableColumns=this.tableColumn},methods:{handlePageChange:function(e){var t=e.currentPage,a=e.pageSize;this.tablePage.currentPage=t,this.tablePage.pageSize=a,this.$emit("handlePageChange",this.tablePage)},cellDblClickEvent:function(e){var t=e.row;this.$emit("onDblClick",t)},checkboxChange:function(e){var t=e.row;this.$emit("checkboxChange",t)},currentChange:function(e){var t=e.row;this.$emit("currentChange",t)},editRowEvent:function(e){this.$emit("editRowEvent",e)},delRowEvent:function(e){this.$emit("delRowEvent",e)}},watch:{tableColumn:function(e){var t=this;this.tableColumns=[],this.$nextTick((function(){t.tableColumns=e}))}}}),o=r,l=a("c701"),s=Object(l["a"])(o,n,i,!1,null,"416b2d26",null);t["a"]=s.exports},b062:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-row",[a("el-col",{attrs:{span:12}},[a("div",{staticClass:"flex-start"},[a("skButton",{directives:[{name:"permission",rawName:"v-permission",value:"Add",expression:"'Add'"}],attrs:{name:"create"},on:{onCreate:e.onCreate}})],1),a("span",{staticStyle:{display:"inline-block",width:"1px"}})]),a("el-col",{attrs:{span:12}},[a("div",{staticClass:"flex-end"},[a("skSearch",{attrs:{formItems:e.searchConfig.formItems,formData:e.searchConfig.formData,mainValue:e.searchConfig.mainValue},on:{handleClick:e.onSearch}})],1)])],1),a("div",[a("skTable",{attrs:{tableData:e.tableData,tableColumn:e.tableColumn,tablePage:e.tablePage,localHeight:e.localHeight},on:{checkboxChange:e.checkboxChange,currentChange:e.currentChange,handlePageChange:e.handlePageChange,editRowEvent:e.onUpdate,delRowEvent:e.onDelete,onDblClick:e.cellDblClickEvent},scopedSlots:e._u([{key:"handle",fn:function(t){return[e._t("tableBtn",null,{row:t.data})]}}],null,!0)})],1),a("div",[a("vxe-modal",{attrs:{title:e.dialogType.title,transfer:!0,width:e.modelConfig.width,height:e.modelConfig.height,mask:!0,"lock-view":!1,resize:"","min-width":800,"min-height":500},scopedSlots:e._u([{key:"default",fn:function(){return["detail"==e.dialogType.type?a("div",{staticStyle:{"margin-top":"10px"}},[a("detailTable",{attrs:{"detail-list":e.formConfig.formItems,"select-row":e.selectRow}})],1):e._e(),a("div",{directives:[{name:"show",rawName:"v-show",value:"create"==e.dialogType.type,expression:"dialogType.type=='create'"}]},[a("skForm",{attrs:{formData:e.formConfig.formData,formItems:e.formConfig.formItems,formRules:e.formConfig.formRules},on:{onSubmit:e.onCreateSubmit}})],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"update"==e.dialogType.type,expression:"dialogType.type=='update'"}]},[a("skForm",{attrs:{formData:e.updateData,formItems:e.formConfig.formItems,formRules:e.formConfig.formRules},on:{onSubmit:e.onUpdateSubmit}})],1)]},proxy:!0}]),model:{value:e.dialogType.show,callback:function(t){e.$set(e.dialogType,"show",t)},expression:"dialogType.show"}})],1)],1)},i=[],r=(a("1bc7"),a("9f60"),a("94f0"),a("0c84"),a("2843"),a("4057"),a("a450"),a("fc02"),a("e680"),a("992b")),o=a("1eb7"),l=a("5d65"),s=a("b775");function u(e,t){var a;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(a=c(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,l=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return o=e.done,e},e:function(e){l=!0,r=e},f:function(){try{o||null==a.return||a.return()}finally{if(l)throw r}}}}function c(e,t){if(e){if("string"===typeof e)return f(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var d={name:"singlePage",components:{skTable:r["a"],detailTable:o["a"],skForm:l["default"]},props:{tableColumn:{type:Array,default:function(){return[]}},urlConfig:{type:Object,default:function(){return{url:"",key:"",dialog:"default"}}},tablePage:{type:Object,default:function(){return{page:1,limit:10,total:0}}},formConfig:{type:Object,default:function(){return{formData:{},formItems:[],formRules:{},detailList:[]}}},searchConfig:{type:Object,default:function(){return{formItems:[],formData:{UserName:null},mainValue:"UserName"}}},localHeight:{type:Number,default:function(){return 0}},propsEditConfig:{type:Object,default:function(){}},temporaryData:{type:Object,default:function(){return{tableData:[]}}}},data:function(){return{loading1:!1,initData:{},selectRow:{},updateData:null,tableData:[],dialogType:{show:!1,type:"create",title:"新增"},modelConfig:{height:800,width:800},query:{page:1,limit:10,wheres:null}}},created:function(){this.initData=JSON.parse(JSON.stringify(this.formConfig.formData)),this.getInit();var e=this.getScreen();this.modelConfig={height:e.height-300,width:.7*e.width}},methods:{getInit:function(){var e=this;if(this.query.page=this.tablePage.page,this.query.limit=this.tablePage.limit,!this.emptyValue(this.urlConfig.url))return Object(s["a"])({url:this.urlConfig.url,method:"get",params:this.query}).then((function(t){e.tableData=t.data,e.tablePage.total=t.total}));this.tableData=this.temporaryData.tableData},handlePageChange:function(e){var t=e.currentPage,a=e.pageSize;this.tablePage.page=t,this.tablePage.limit=a,this.getInit()},onSearch:function(){var e=this.getSearchParameters();this.query.wheres=JSON.stringify(e),this.tablePage.page=1,this.tablePage.limit=10,this.getInit()},checkboxChange:function(e){console.log(e)},currentChange:function(e){this.selectRow=e,this.updateData=JSON.parse(JSON.stringify(this.selectRow))},cellDblClickEvent:function(e){this.dialogType.title="查看详情",this.dialogType.type="detail",this.dialogType.show=!0,this.selectRow=e},onCreate:function(){this.dialogType.show=!0,this.dialogType.type="create",this.dialogType.title="新增",this.formConfig.formData=JSON.parse(JSON.stringify(this.initData)),this.setPropsConfig(0)},onUpdate:function(e){this.selectRow=e,this.dialogType.title="编辑",this.dialogType.type="update",this.dialogType.show=!0,this.updateData=JSON.parse(JSON.stringify(this.selectRow)),this.setPropsConfig(1)},onCreateSubmit:function(){var e=this,t=JSON.parse(JSON.stringify(this.formConfig.formData));if(!this.emptyValue(this.urlConfig.url))return Object(s["a"])({url:this.urlConfig.url,method:"post",data:t}).then((function(t){if(2e3===t.code){e.dialogType.show=!1;var a=e.urlConfig.dialog||"default";"default"==a?e.$XModal.message({message:"新增成功",status:"success",id:"unique1"}):"alert"==a&&e.$XModal.alert({message:t.message,status:"success"}),e.getInit()}else e.$XModal.message({message:t.message,status:"error",id:"unique1"})}))},onUpdateSubmit:function(){var e=this,t=JSON.parse(JSON.stringify(this.updateData));if(!this.emptyValue(this.urlConfig.url))return Object(s["a"])({url:this.urlConfig.url+t[this.urlConfig.key]+"/",method:"put",data:t}).then((function(t){2e3===t.code?(e.dialogType.show=!1,e.$XModal.message({message:t.message,status:"success",id:"unique2"}),e.getInit()):e.$XModal.message({message:t.message,status:"error",id:"unique2"})}))},onDelete:function(e){var t=this,a=this.tableData.length;this.$XModal.confirm("您确定要删除该条数据吗？").then((function(n){if("confirm"==n){if(!t.emptyValue(t.urlConfig.url))return Object(s["a"])({url:t.urlConfig.url+e[t.urlConfig.key]+"/",method:"delete",data:{}}).then((function(e){2e3===e.code?(t.dialogType.show=!1,t.$XModal.message({message:e.message,status:"success",id:"unique2"}),1===a&&(t.tablePage.page=t.tablePage.page-1),t.getInit()):t.$XModal.message({message:e.message,status:"error",id:"unique2"})}))}else t.$XModal.message({message:"已取消",status:"info",id:"del"})}))},getSearchParameters:function(){var e=[],t=this.searchConfig.formData;for(var a in t)if(!this.emptyValue(t[a])){var n=this.typeValue(a),i={name:a,value:t[a]};n&&(i["displayType"]=n),e.push(i)}return e},setPropsConfig:function(e){var t=this.propsEditConfig,a=this;function n(t,n){for(var i=t.split("."),r=0;r<i.length-1;r++)a=a[i[r]];a[i[i.length-1]]=n[e]}for(var i in t)n(i,t[i])},emptyValue:function(e){return null===e||void 0===e||""===e},typeValue:function(e){var t,a=this.searchConfig.formItems,n=u(a);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.field===e&&"$select"==i.itemRender.name)return"drop"}}catch(r){n.e(r)}finally{n.f()}}}},h=d,g=a("c701"),m=Object(g["a"])(h,n,i,!1,null,"196df97c",null);t["default"]=m.exports}}]);