(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-22beddda"],{"37f8":function(e,t,o){},"579c":function(e,t,o){"use strict";o("37f8")},f72a:function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"animated fadeInRight ecommerce"},[t("el-row",{directives:[{name:"show",rawName:"v-show",value:"sysDocumentList"===e.componentShow,expression:"componentShow === 'sysDocumentList'"}]},[t("el-col",{attrs:{span:24}},[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("sysDocumentManage.queryCondition")))]),t("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:e.toggleMoreCondition}},[e._v(" "+e._s(e.moreCondition?e.$t("sysDocumentManage.hide"):e.$t("sysDocumentManage.more"))+" ")])],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:8}},[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("sysDocumentManage.inputDocCode")},model:{value:e.conditions.docCode,callback:function(t){e.$set(e.conditions,"docCode",t)},expression:"conditions.docCode"}})],1)],1),t("el-col",{attrs:{span:8}},[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("sysDocumentManage.inputDocTitle")},model:{value:e.conditions.docTitle,callback:function(t){e.$set(e.conditions,"docTitle",t)},expression:"conditions.docTitle"}})],1)],1),t("el-col",{attrs:{span:6}},[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("sysDocumentManage.inputDocId")},model:{value:e.conditions.docId,callback:function(t){e.$set(e.conditions,"docId",t)},expression:"conditions.docId"}})],1)],1),t("el-col",{attrs:{span:2}},[t("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.querySysDocumentMethod}},[e._v(" "+e._s(e.$t("sysDocumentManage.query"))+" ")])],1)],1)],1)],1)],1),t("el-row",{directives:[{name:"show",rawName:"v-show",value:"sysDocumentList"===e.componentShow,expression:"componentShow === 'sysDocumentList'"}]},[t("el-col",{attrs:{span:24}},[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("sysDocumentManage.documentInfo")))]),t("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:e.openAddSysDocumentModal}},[e._v(" "+e._s(e.$t("sysDocumentManage.add"))+" ")])],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.sysDocuments,border:""}},[t("el-table-column",{attrs:{prop:"docTitle",label:e.$t("sysDocumentManage.docTitle"),align:"center"}}),t("el-table-column",{attrs:{prop:"docCode",label:e.$t("sysDocumentManage.docCode"),align:"center"}}),t("el-table-column",{attrs:{prop:"docId",label:e.$t("sysDocumentManage.docId"),align:"center"}}),t("el-table-column",{attrs:{prop:"createTime",label:e.$t("sysDocumentManage.createTime"),align:"center"}}),t("el-table-column",{attrs:{label:e.$t("sysDocumentManage.operation"),align:"right",width:"200"},scopedSlots:e._u([{key:"default",fn:function(o){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.openEditSysDocumentModel(o.row)}}},[e._v(" "+e._s(e.$t("sysDocumentManage.edit"))+" ")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.openDeleteSysDocumentModel(o.row)}}},[e._v(" "+e._s(e.$t("sysDocumentManage.delete"))+" ")])]}}])})],1),t("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"right"},attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:"total, prev, pager, next",total:e.total},on:{"current-change":e.handleCurrentChange}})],1)],1)],1),"addSysDocumentView"===e.componentShow?t("add-sys-document-view",{ref:"addSysDocumentView",on:{close:e.handleCloseAdd}}):e._e(),"editSysDocumentView"===e.componentShow?t("edit-sys-document-view",{ref:"editSysDocumentView",on:{close:e.handleCloseEdit}}):e._e(),t("delete-sys-document",{ref:"deleteSysDocument",on:{close:e.handleCloseDelete}})],1)},n=[],i=o("b775"),l=o("7323");function c(e){return new Promise((t,o)=>{Object(i["a"])({url:"/sysDocument/querySysDocument",method:"get",params:{...e,shopId:Object(l["f"])()}}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function a(e){return new Promise((t,o)=>{Object(i["a"])({url:"/sysDocument/saveSysDocument",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function d(e){return new Promise((t,o)=>{Object(i["a"])({url:"/sysDocument/updateSysDocument",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function r(e){return new Promise((t,o)=>{Object(i["a"])({url:"/sysDocument/deleteSysDocument",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}var u=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("addSysDocumentView.title"),visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"120px"}},[t("el-form-item",{attrs:{label:e.$t("addSysDocumentView.docTitle"),prop:"docTitle"}},[t("el-input",{attrs:{placeholder:e.$t("addSysDocumentView.docTitlePlaceholder")},model:{value:e.form.docTitle,callback:function(t){e.$set(e.form,"docTitle",t)},expression:"form.docTitle"}})],1),t("el-form-item",{attrs:{label:e.$t("addSysDocumentView.docCode"),prop:"docCode"}},[t("el-input",{attrs:{placeholder:e.$t("addSysDocumentView.docCodePlaceholder")},model:{value:e.form.docCode,callback:function(t){e.$set(e.form,"docCode",t)},expression:"form.docCode"}})],1),t("el-form-item",{attrs:{label:e.$t("addSysDocumentView.docContent"),prop:"docContent"}},[t("el-input",{attrs:{type:"textarea",rows:10,placeholder:e.$t("addSysDocumentView.docContentPlaceholder")},model:{value:e.form.docContent,callback:function(t){e.$set(e.form,"docContent",t)},expression:"form.docContent"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v(e._s(e.$t("addSysDocumentView.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("addSysDocumentView.submit")))])],1)],1)},m=[],h={name:"AddSysDocumentView",data(){return{dialogVisible:!1,form:{docTitle:"",docCode:"",docContent:"",shopId:""},rules:{docTitle:[{required:!0,message:this.$t("addSysDocumentView.docTitleRequired"),trigger:"blur"},{max:200,message:this.$t("addSysDocumentView.docTitleMaxLength"),trigger:"blur"}],docCode:[{required:!0,message:this.$t("addSysDocumentView.docCodeRequired"),trigger:"blur"},{max:200,message:this.$t("addSysDocumentView.docCodeMaxLength"),trigger:"blur"}],docContent:[{required:!0,message:this.$t("addSysDocumentView.docContentRequired"),trigger:"blur"}]}}},methods:{open(){this.dialogVisible=!0,this.form.shopId=Object(l["f"])()},handleClose(){this.dialogVisible=!1,this.$refs.form.resetFields(),this.$emit("close")},submitForm(){this.$refs.form.validate(async e=>{if(e)try{await a(this.form),this.$message.success(this.$t("addSysDocumentView.saveSuccess")),this.handleClose()}catch(t){console.error("保存文档失败:",t)}})}}},p=h,y=o("2877"),f=Object(y["a"])(p,u,m,!1,null,null,null),D=f.exports,g=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("editSysDocumentView.title"),visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"120px"}},[t("el-form-item",{attrs:{label:e.$t("editSysDocumentView.docTitle"),prop:"docTitle"}},[t("el-input",{attrs:{placeholder:e.$t("editSysDocumentView.docTitlePlaceholder")},model:{value:e.form.docTitle,callback:function(t){e.$set(e.form,"docTitle",t)},expression:"form.docTitle"}})],1),t("el-form-item",{attrs:{label:e.$t("editSysDocumentView.docCode"),prop:"docCode"}},[t("el-input",{attrs:{placeholder:e.$t("editSysDocumentView.docCodePlaceholder")},model:{value:e.form.docCode,callback:function(t){e.$set(e.form,"docCode",t)},expression:"form.docCode"}})],1),t("el-form-item",{attrs:{label:e.$t("editSysDocumentView.docContent"),prop:"docContent"}},[t("el-input",{attrs:{type:"textarea",rows:10,placeholder:e.$t("editSysDocumentView.docContentPlaceholder")},model:{value:e.form.docContent,callback:function(t){e.$set(e.form,"docContent",t)},expression:"form.docContent"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("common.save")))])],1)],1)},b=[],S={name:"EditSysDocumentView",data(){return{dialogVisible:!1,form:{docId:"",docTitle:"",docCode:"",docContent:"",shopId:""},rules:{docTitle:[{required:!0,message:this.$t("editSysDocumentView.docTitleRequired"),trigger:"blur"},{max:200,message:this.$t("editSysDocumentView.docTitleMaxLength"),trigger:"blur"}],docCode:[{required:!0,message:this.$t("editSysDocumentView.docCodeRequired"),trigger:"blur"},{max:200,message:this.$t("editSysDocumentView.docCodeMaxLength"),trigger:"blur"}],docContent:[{required:!0,message:this.$t("editSysDocumentView.docContentRequired"),trigger:"blur"}],docId:[{required:!0,message:this.$t("editSysDocumentView.docIdRequired"),trigger:"blur"}]}}},methods:{open(e){this.form={...e,shopId:Object(l["f"])()},this.dialogVisible=!0},handleClose(){this.dialogVisible=!1,this.$refs.form.resetFields(),this.$emit("close")},submitForm(){this.$refs.form.validate(async e=>{if(e)try{await d(this.form),this.$message.success(this.$t("editSysDocumentView.updateSuccess")),this.handleClose()}catch(t){console.error("更新文档失败:",t)}})}}},w=S,C=Object(y["a"])(w,g,b,!1,null,null,null),$=C.exports,V=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("deleteSysDocument.title"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticClass:"text-center"},[t("p",[e._v(e._s(e.$t("deleteSysDocument.confirmDelete")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v(e._s(e.$t("deleteSysDocument.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.confirmDelete}},[e._v(e._s(e.$t("deleteSysDocument.confirm")))])],1)])},v=[],x={name:"DeleteSysDocument",data(){return{dialogVisible:!1,currentDocument:null}},methods:{open(e){this.currentDocument={...e,shopId:Object(l["f"])()},this.dialogVisible=!0},handleClose(){this.dialogVisible=!1,this.currentDocument=null,this.$emit("close")},async confirmDelete(){try{await r(this.currentDocument),this.$message.success(this.$t("deleteSysDocument.deleteSuccess")),this.handleClose()}catch(e){console.error("删除文档失败:",e),this.$message.error(this.$t("deleteSysDocument.deleteFailed"))}}}},_=x,M=Object(y["a"])(_,V,v,!1,null,null,null),T=M.exports,k={name:"SysDocumentManage",components:{AddSysDocumentView:D,EditSysDocumentView:$,DeleteSysDocument:T},data(){return{componentShow:"sysDocumentList",sysDocuments:[],conditions:{docTitle:"",docCode:"",docId:""},moreCondition:!1,currentPage:1,pageSize:10,total:0,shopId:""}},created(){this.shopId=Object(l["f"])(),this.listSysDocuments()},methods:{async listSysDocuments(){try{const e={...this.conditions,page:this.currentPage,row:this.pageSize,shopId:this.shopId},t=await c(e);this.sysDocuments=t.data,this.total=t.total}catch(e){console.error("获取文档列表失败:",e)}},handleCurrentChange(e){this.currentPage=e,this.listSysDocuments()},querySysDocumentMethod(){this.currentPage=1,this.listSysDocuments()},toggleMoreCondition(){this.moreCondition=!this.moreCondition},openAddSysDocumentModal(){this.componentShow="addSysDocumentView",this.$nextTick(()=>{this.$refs.addSysDocumentView.open()})},openEditSysDocumentModel(e){this.componentShow="editSysDocumentView",this.$nextTick(()=>{this.$refs.editSysDocumentView.open(e)})},openDeleteSysDocumentModel(e){this.$refs.deleteSysDocument.open(e)},handleCloseAdd(){this.componentShow="sysDocumentList",this.listSysDocuments()},handleCloseEdit(){this.componentShow="sysDocumentList",this.listSysDocuments()},handleCloseDelete(){this.listSysDocuments()}}},I=k,q=(o("579c"),Object(y["a"])(I,s,n,!1,null,"1226c984",null));t["default"]=q.exports}}]); //# sourceMappingURL=chunk-22beddda.25634025.js.map