1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2a6a9dd4"],{"9ba2":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"诊断名称/编码:"}},[a("el-input",{attrs:{placeholder:"请输入诊断名称/编码"},model:{value:e.queryParams.diagnosisParam,callback:function(t){e.$set(e.queryParams,"diagnosisParam",t)},expression:"queryParams.diagnosisParam"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.initList}},[e._v("查询")]),a("el-button",{on:{click:e.reset}},[e._v("重置")])],1)],1),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleAdd({},"新增诊断")}}},[e._v("新增")]),a("el-button",{on:{click:e.handleUpload}},[e._v("模版导入")]),a("el-table",{staticStyle:{"margin-top":"10px"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"序号",width:"120",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.$index+1+(e.queryParams.pageNum-1)*e.queryParams.pageSize))])]}}])}),a("el-table-column",{attrs:{label:"诊断编码",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.diagnosisCode)+" ")]}}])}),a("el-table-column",{attrs:{label:"诊断名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.diagnosisName)+" ")]}}])}),a("el-table-column",{attrs:{label:"操作",align:"center",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(a){return e.handleAdd(t.row,"修改诊断")}}},[e._v("修改")]),a("el-button",{staticStyle:{color:"#da0331"},attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.initList}}),e.dialogVisible?a("el-dialog",{attrs:{title:e.title,visible:e.dialogVisible,width:"600px","close-on-press-escape":!1,"close-on-click-modal":!1,"before-close":e.cancel},on:{"update:visible":function(t){e.dialogVisible=t},close:e.cancel}},[a("el-form",{ref:"addFormRef",attrs:{model:e.addForm,rules:e.rules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"诊断编码:",prop:"diagnosisCode"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{maxlength:"50"},model:{value:e.addForm.diagnosisCode,callback:function(t){e.$set(e.addForm,"diagnosisCode",t)},expression:"addForm.diagnosisCode"}})],1),a("el-form-item",{attrs:{label:"诊断名称:",prop:"diagnosisName"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{maxlength:"50"},model:{value:e.addForm.diagnosisName,callback:function(t){e.$set(e.addForm,"diagnosisName",t)},expression:"addForm.diagnosisName"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancel}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确 定")])],1)],1):e._e(),e.dialogVisibleUpload?a("el-dialog",{attrs:{title:"模板导入",visible:e.dialogVisibleUpload,width:"600px","close-on-press-escape":!1,"close-on-click-modal":!1,"before-close":e.cancel},on:{"update:visible":function(t){e.dialogVisibleUpload=t},close:e.cancel}},[a("el-form",{ref:"uploadRef",attrs:{model:e.uploadForm,rules:e.uploadRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"模版导入:",prop:"fileList"}},[a("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{drag:"",action:"",multiple:"",limit:1,accept:".xls, .xlsx","file-list":e.uploadForm.fileList,"before-upload":e.beforeUpload,"http-request":e.uploadHttpRequest,"on-remove":e.removeContractAttachment}},[a("i",{staticClass:"el-icon-upload"}),a("div",{staticClass:"el-upload__text"},[e._v(" 将文件拖到此处,或"),a("em",[e._v("点击上传")])])])],1)],1),a("el-row",[a("span",{staticClass:"download",staticStyle:{cursor:"pointer",width:"100px","margin-left":"100px",color:"#0c80ea"},on:{click:e.downloadTel}},[e._v("下载模板")])]),a("div",{staticStyle:{"margin-top":"20px","margin-left":"100px",color:"#c7bd78"}},[e._v(" 提示:请先按照导出模版文件填写后进行上传 ")]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancelUpload}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.submitUpload}},[e._v("确 定")])],1)],1):e._e()],1)},s=[],n=a("5530"),r=a("c7eb"),o=a("1da1"),l=(a("caad"),a("14d9"),a("b0c0"),a("2532"),a("943d")),c=a("21a6"),d=a.n(c),u={name:"EitcErmPcIndex",data:function(){return{tableData:[],total:0,queryParams:{pageNum:1,pageSize:10,diagnosisParam:""},title:"",addForm:{},rules:{diagnosisCode:[{required:!0,message:"请输入诊断编码",trigger:"blur"}],diagnosisName:[{required:!0,message:"请输入诊断名称",trigger:"blur"}]},uploadRules:{fileList:[{required:!0,message:"请上传诊断管理模版",trigger:"change"}]},dialogVisible:!1,dialogVisibleUpload:!1,whiteList:["xlsx","xls"],uploadForm:{fileList:[]}}},mounted:function(){this.initList()},methods:{initList:function(){var e=this;return Object(o["a"])(Object(r["a"])().mark((function t(){var a;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(l["H"])(e.queryParams);case 2:a=t.sent,e.tableData=a.rows,e.total=a.total;case 5:case"end":return t.stop()}}),t)})))()},reset:function(){this.queryParams={pageNum:1,pageSize:10,diagnosisParam:""},this.initList()},cancel:function(){this.dialogVisible=!1},submit:function(){var e=this;this.$refs.addFormRef.validate(function(){var t=Object(o["a"])(Object(r["a"])().mark((function t(a){var i,s;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=22;break}if("新增诊断"!==e.title){t.next=12;break}return t.next=4,Object(l["I"])(e.addForm);case 4:if(i=t.sent,200===i.code){t.next=7;break}return t.abrupt("return",e.$message.error(i.msg));case 7:e.$message.success("新增诊断成功!"),e.dialogVisible=!1,e.initList(),t.next=20;break;case 12:return t.next=14,Object(l["K"])(e.addForm);case 14:if(s=t.sent,200===s.code){t.next=17;break}return t.abrupt("return",e.$message.error(s.msg));case 17:e.$message.success("修改诊断成功!"),e.dialogVisible=!1,e.initList();case 20:t.next=23;break;case 22:return t.abrupt("return",!1);case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},handleAdd:function(e,t){this.title=t,this.addForm=Object(n["a"])({},e),this.dialogVisible=!0},handleDelete:function(e){var t=this;this.$confirm("此操作将永久删除该项, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(Object(r["a"])().mark((function a(){var i;return Object(r["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(l["J"])(e.id);case 2:if(i=a.sent,200===i.code){a.next=5;break}return a.abrupt("return",t.$message.error(i.msg));case 5:t.initList(),t.$message({type:"success",message:"删除成功!"});case 7:case"end":return a.stop()}}),a)}))))},handleUpload:function(){this.dialogVisibleUpload=!0},beforeUpload:function(e){var t=e.name.split(".")[e.name.split(".").length-1];return!!this.whiteList.includes(t)||(this.$message.error("文件格式错误"),!1)},uploadHttpRequest:function(e){this.$refs.uploadRef.resetFields(),this.uploadForm.fileList.push({name:e.file.name});var t=new FormData;t.append("file",e.file),this.formdata=t},removeContractAttachment:function(e,t){this.uploadForm.fileList=t},cancelUpload:function(){this.dialogVisibleUpload=!1,this.uploadForm.fileList=[]},downloadTel:function(){var e=encodeURI("/static/upload/诊断管理模版.xlsx");window.location.href=e},submitUpload:function(){var e=this;this.$refs.uploadRef.validate(function(){var t=Object(o["a"])(Object(r["a"])().mark((function t(a){var i,s;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=11;break}return t.next=3,Object(l["G"])(e.formdata);case 3:i=t.sent,0!==(null===i||void 0===i?void 0:i.size)&&(s=new Blob([i]),d.a.saveAs(s,"错误信息.xlsx")),0==(null===i||void 0===i?void 0:i.size)&&e.$message.success("导入成功"),e.dialogVisibleUpload=!1,e.uploadForm.fileList=[],e.initList(),t.next=12;break;case 11:return t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}},p=u,m=(a("eeba"),a("2877")),f=Object(m["a"])(p,i,s,!1,null,"c663fb90",null);t["default"]=f.exports},ddbf:function(e,t,a){},eeba:function(e,t,a){"use strict";a("ddbf")}}]);
|