Your Name
2022-11-30 f0cd5a4fe3b366fa753b8da5e387673c30c4d0f7
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-45ec"],{"41Be":function(t,e,a){"use strict";a.d(e,"a",function(){return o});var r=a("FyfS"),i=a.n(r),n=a("Q2AE");function o(t,e){if(1==t||2==t)return!0;if(!e)return!1;var a=n.a.getters&&n.a.getters.roles;if(a&&a.length>0){var r=!0,o=!1,l=void 0;try{for(var s,c=i()(a);!(r=(s=c.next()).done);r=!0){var u=s.value.btnAccess;if(!u)return!1;var d=u.split(",");if(-1!=d.indexOf("all"))return!0;if(-1!=d.indexOf(e))return!0}}catch(t){o=!0,l=t}finally{try{!r&&c.return&&c.return()}finally{if(o)throw l}}return!1}return!1}},"5W5M":function(t,e,a){"use strict";a.d(e,"g",function(){return n}),a.d(e,"b",function(){return o}),a.d(e,"d",function(){return l}),a.d(e,"i",function(){return s}),a.d(e,"f",function(){return c}),a.d(e,"e",function(){return u}),a.d(e,"a",function(){return d}),a.d(e,"c",function(){return p}),a.d(e,"h",function(){return f});var r=a("t3Un"),i=a("X4fA");function n(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/dictionary-types",method:"get",params:t||{}})}function o(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/adddictionary-types",method:"post",data:t})}function l(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/deldictionary-types",method:"post",data:t})}function s(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/putdictionary-types",method:"post",data:t})}function c(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/dictionary-items",method:"get",params:t||{}})}function u(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/dictionaryAllItems",method:"get",params:t||{}})}function d(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/adddictionary-items",method:"post",data:t})}function p(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/deldictionary-items",method:"post",data:t})}function f(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/putdictionary-items",method:"post",data:t})}},Bb9h:function(t,e,a){"use strict";var r=a("Ddz/");a.n(r).a},"Ddz/":function(t,e,a){},"Y/xt":function(t,e,a){"use strict";a.r(e);var r=a("QbLZ"),i=a.n(r),n=(a("jJIE"),a("41Be")),o=a("8fCU"),l=a("7Qib"),s=a("L2JU"),c=a("5W5M"),u=a("XJYT"),d=a("X4fA"),p=a("t3Un");var f={name:"helpDoc",filters:{parseGX:function(t){for(var e=t.split("-"),a="",r=0;r<e.length;r++)null==e[r]||""==e[r]||"null"==e[r]||(0==r?a=e[r]:a+="-"+e[r]);return a}},data:function(){return{baseUrl:"http://39.104.85.193:4105/upload/contract/",pageSize:10,recordTotal:0,currentPage:1,pageTotal:0,tableKey:0,helpDocData:null,listLoading:!0,dataForm:{id:"",filetype:"",filename:"",fileurl:"",version:"",remark:"",file:""},queryForm:{name:""},dialogFormVisible:!1,dialogStatus:"",dataFormRules:{},fileType:[],productVoList:[],productVoDialogVisible:!1,productDialogFormVisible:!1,productData:[],pageSizeProduct:10,currentPageProduct:1,recordTotalProduct:0,pageTotalProduct:0,queryProductForm:{name:"",manufacturer:"",directionCode:"",type:""},isSupervision:"",manufacturer:"",enterpriseList:[],enterpriseDialogFormVisible:!1,pageSizeEnterpise:10,currentPageEnterpise:1,recordTotalEnterpise:0,pageTotalEnterpise:0}},created:function(){this.getHelpDocListList(),this.getDictionaryStatusList(),console.log(this.userType),console.log(1==this.userType||2==this.userType),this.isSupervision=1==this.userType||2==this.userType},computed:i()({},Object(s.b)(["userType","username"])),methods:{handleSizeChangeProduct:function(t){this.pageSizeProduct=t,this.currentPageProduct=1,this.getProductList()},handleCurrentChangeProduct:function(t){this.currentPageProduct=t,this.getProductList()},getDictionaryStatusList:function(){var t=this;if(!(t.fileType&&t.fileType.length>0)){var e={dictionaryType:"APP版本"};Object(c.e)(e).then(function(e){var a=e.data;200==a.code?t.fileType=a.result:Object(o.a)({error:a.message,vm:t})}).catch(function(e){Object(o.a)({error:e,vm:t})})}},getHelpDocListList:function(){var t=this,e={};for(var a in e.pageIndex=t.currentPage,e.pageSize=t.pageSize,e.sort=t.sort,e.order=t.order,t.queryForm)void 0!=t.queryForm[a]&&""!=t.queryForm[a].toString()&&(e[a]=t.queryForm[a]);t.listLoading=!0,function(t){return Object(p.a)({headers:{Authorization:Object(d.a)()},url:"http://39.104.85.193:4105/helpDoc",method:"get",params:t||{}})}(e).then(function(e){var a=e.data;if("200"===a.code){var r=a.result;t.recordTotal=r.totalCount,t.pageSize=r.pageSize,t.pageTotal=Object(l.a)(r.totalCount,r.pageSize),t.currentPage=r.pageIndex,t.helpDocData=r.result}else Object(o.a)({error:a.message,vm:t});t.listLoading=!1}).catch(function(e){t.listLoading=!1,Object(o.a)({error:e,vm:t})})},createHandle:function(){var t=this,e=this;this.$refs.dataForm.validate(function(a){if(a){var r=new FormData,i=t.$refs.importFileInput.files;if(!(i.length>0))return void Object(o.a)({error:"请上传文件",vm:t});r.append("file",i[0]),r.append("filetype",e.dataForm.filetype),r.append("filename",e.dataForm.filename),r.append("version",e.dataForm.version),r.append("remark",e.dataForm.remark),function(t){return Object(p.a)({headers:{Authorization:Object(d.a)()},url:"http://39.104.85.193:4105/addHelpDoc",method:"post",data:t})}(r).then(function(t){var a=t.data;"200"===a.code?(e.dialogFormVisible=!1,e.$message({message:"创建成功",type:"success"}),e.getHelpDocListList()):Object(o.a)({error:a.message,vm:e})}).catch(function(t){Object(o.a)({error:t,vm:e})})}})},deleteHandle:function(t){var e=this;u.MessageBox.confirm("确定删除信息","确定删除",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.deleteAction(t)}).catch(function(){console.log("已取消删除")})},deleteAction:function(t){var e=this,a={};a.id=t.id,function(t){return Object(p.a)({headers:{Authorization:Object(d.a)()},url:"http://39.104.85.193:4105/delHelpDoc",method:"post",data:t})}(a).then(function(t){var a=t.data;"200"===a.code?(e.$message({message:"删除成功",type:"success"}),e.getHelpDocListList()):Object(o.a)({error:a.message,vm:e})}).catch(function(t){Object(o.a)({error:t,vm:e})})},refreshHandle:function(){this.getHelpDocListList()},queryHandle:function(){this.currentPage=1,this.getHelpDocListList()},resetDataForm:function(){this.dataForm={id:"",filetype:"",filename:"",fileurl:"",version:"",remark:""}},showCreateHandle:function(){var t=this;this.resetDataForm(),this.dialogStatus="create",this.dialogFormVisible=!0,this.$nextTick(function(){t.$refs.dataForm.clearValidate()})},updateHandle:function(){var t=this;this.$refs.dataForm.validate(function(e){var a=t;if(e){var r=new FormData;r.append("id",a.dataForm.id),r.append("filetype",a.dataForm.filetype),r.append("filename",a.dataForm.filename),r.append("version",a.dataForm.version),r.append("remark",a.dataForm.remark);var i=t.$refs.importFileInput.files;i.length>0&&r.append("file",i[0]),function(t){return Object(p.a)({headers:{Authorization:Object(d.a)()},url:"http://39.104.85.193:4105/editHelpDoc",method:"post",data:t})}(r).then(function(t){var e=t.data;200==e.code?(a.dialogFormVisible=!1,a.$message({message:"更新成功",type:"success"}),a.getHelpDocListList()):Object(o.a)({error:e.message,vm:a})}).catch(function(t){Object(o.a)({error:t,vm:a})})}})},showEditHandle:function(t){var e=this;this.resetDataForm(),this.dialogStatus="editor",this.dataForm.id=t.id,this.dataForm.filetype=t.filetype,this.dataForm.filename=t.filename,this.dataForm.fileurl=t.fileurl,this.dataForm.version=t.version,this.dataForm.remark=t.remark,this.dialogFormVisible=!0,this.$nextTick(function(){e.$refs.dataForm.clearValidate()})},handleSizeChange:function(t){this.pageSize=t,this.currentPage=1,this.getHelpDocListList()},handleCurrentChange:function(t){this.currentPage=t,this.getHelpDocListList()},getBtnPermission:function(t){return Object(n.a)(this.userType,t)},sortChange:function(t){this.sort=t.prop,this.order=t.order,this.getHelpDocListList()},showProductHandle:function(){this.productDialogFormVisible=!0},showEnterprise:function(){this.enterpriseDialogFormVisible=!0},downloadHandle:function(t){window.open(t,"_blank")},handleFileUpload:function(t){t.preventDefault(),console.log(this.$refs.importFileInput.files[0]),this.dataForm.filename=this.$refs.importFileInput.files[0].name}}},m=(a("Bb9h"),a("KHd+")),h=Object(m.a)(f,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",[a("el-input",{staticClass:"filter-item",staticStyle:{width:"450px","margin-bottom":"10px"},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.queryHandle(e):null}},model:{value:t.queryForm.name,callback:function(e){t.$set(t.queryForm,"name",e)},expression:"queryForm.name"}}),t._v(" "),t.getBtnPermission("add")&&t.isSupervision?a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.showCreateHandle}},[t._v("新增\n        ")]):t._e(),t._v(" "),a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.refreshHandle}},[t._v("刷新\n        ")]),t._v(" "),a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.queryHandle}})],1),t._v(" "),a("div",{staticClass:"table_content"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],key:t.tableKey,staticStyle:{width:"100%"},attrs:{data:t.helpDocData,border:"",fit:"","highlight-current-row":""},on:{"sort-change":t.sortChange}},[a("el-table-column",{attrs:{type:"index",label:"序号",align:"center",width:"80"}}),t._v(" "),a("el-table-column",{attrs:{label:"文件名称",prop:"filename",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticStyle:{color:"blue",cursor:"pointer"},on:{click:function(a){t.downloadHandle(e.row.fileurl)}}},[t._v(t._s(e.row.filename))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"文件链接",prop:"fileurl",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticStyle:{color:"blue",cursor:"pointer"},on:{click:function(a){t.downloadHandle(e.row.fileurl)}}},[t._v(t._s(e.row.fileurl))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"备注",prop:"remark",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.remark))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"创建时间",prop:"created",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t._f("parseTime")(e.row.created,"{y}-{m}-{d}")))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"更新时间",prop:"updated",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t._f("parseTime")(e.row.updated,"{y}-{m}-{d}")))])]}}])}),t._v(" "),t.isSupervision?a("el-table-column",{attrs:{label:"操作",align:"center",width:"240","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.getBtnPermission("edit")?a("el-button",{attrs:{type:"text"},on:{click:function(a){t.showEditHandle(e.row)}}},[t._v("编辑")]):t._e(),t._v(" "),t.getBtnPermission("delete")?a("el-button",{staticStyle:{color:"red"},attrs:{type:"text"},on:{click:function(a){t.deleteHandle(e.row)}}},[t._v("删除")]):t._e()]}}])},[t._v(">\n                ")]):t._e()],1),t._v(" "),a("br"),t._v(" "),a("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.recordTotal>0,expression:"recordTotal>0"}],staticStyle:{float:"right"},attrs:{"current-page":t.currentPage,"page-sizes":[10,20,30,50],"page-size":t.pageSize,total:t.recordTotal,layout:"total, sizes, prev, pager, next, jumper",background:""},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),a("el-dialog",{attrs:{title:"create"===t.dialogStatus?"新增":"编辑",visible:t.dialogFormVisible,"modal-append-to-body":!1,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("el-form",{ref:"dataForm",staticStyle:{"margin-left":"30px",width:"550px"},attrs:{rules:t.dataFormRules,model:t.dataForm,"label-position":"right","label-width":"140px","element-loading-text":"保存中..."}},[a("el-row",[a("el-col",{attrs:{span:15}},[a("el-form-item",{attrs:{label:"文件名称:",prop:"filename"}},[a("el-input",{model:{value:t.dataForm.filename,callback:function(e){t.$set(t.dataForm,"filename","string"==typeof e?e.trim():e)},expression:"dataForm.filename"}})],1)],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"上传文件:"}},[a("input",{ref:"importFileInput",attrs:{id:"importFileInput",type:"file",accept:""},on:{change:function(e){t.handleFileUpload(e)}}})]),t._v(" "),a("el-row",[a("el-col",{attrs:{span:20}},[a("el-form-item",{attrs:{label:"备注:",prop:"remark"}},[a("el-input",{model:{value:t.dataForm.remark,callback:function(e){t.$set(t.dataForm,"remark","string"==typeof e?e.trim():e)},expression:"dataForm.remark"}})],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){"create"===t.dialogStatus?t.createHandle():t.updateHandle()}}},[t._v("确认")])],1)],1),t._v(" "),a("div",{staticStyle:{clear:"both"}})],1)},[],!1,null,"04e02e5a",null);h.options.__file="helpDoc.vue";e.default=h.exports}}]);