chunk-00c1deb6.64ece2c9.js 17 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-00c1deb6","chunk-c6679818","chunk-2d0c778a"],{"259b":function(e,t,a){},"2a07":function(e,t,a){"use strict";a.r(t);var r=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.clinicName,callback:function(t){e.clinicName=t},expression:"clinicName"}})],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-row",{staticStyle:{"margin-bottom":"20px"}},[a("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:function(t){return e.add()}}},[e._v("新增 ")])],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"clinicCode",label:"诊所编号",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"clinicName",label:"诊所名称",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"clinicIp",label:"IP地址",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"phone",label:"手机号",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"serverUser",label:"服务器登录名",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"serverPassword",label:"服务器密码",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"versionInfo",label:"版本编号",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"versionRefer",label:"购买版本",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"creatTime",label:"购买时间",align:"center",width:"150px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"expireTime",label:"到期时间",align:"center",width:"150px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"isExpire",label:"是否到期",align:"center",width:"150px","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.isExpire>30?a("p",{staticStyle:{color:"green"}},[e._v(" 剩余天数("+e._s(t.row.isExpire)+") ")]):t.row.isExpire>1&&t.row.isExpire<31?a("p",{staticStyle:{color:"orange"}},[e._v(" 剩余天数("+e._s(t.row.isExpire)+") ")]):a("span",{staticStyle:{color:"red"}},[e._v("已到期")])]}}])}),a("el-table-column",{attrs:{prop:"address",label:"地址",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{fixed:"right",label:"操作",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.upgrade(t.row)}}},[e._v("升级")]),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.edit(t.row)}}},[e._v("编辑")]),a("el-button",{staticStyle:{color:"red"},attrs:{type:"text",size:"small"},on:{click:function(a){return e.deleteData(t.row.id)}}},[e._v("删除 ")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.form.pageNum,limit:e.form.pageSize},on:{"update:page":function(t){return e.$set(e.form,"pageNum",t)},"update:limit":function(t){return e.$set(e.form,"pageSize",t)},pagination:e.initList}}),a("addClinic",{ref:"addClinicRef",attrs:{onOpen:e.onOpen,title:e.title,pageType:e.pageType,dictType:e.dictType},on:{closeDialog:e.closeDialog}}),a("upgrade",{ref:"upgradeOpenRef",attrs:{upgradeOpen:e.upgradeOpen,title:e.title},on:{closeDialog:e.closeDialog}})],1)},l=[],o=a("c7eb"),i=a("1da1"),s=a("5530"),n=(a("d3b7"),a("ac1f"),a("5319"),a("159b"),a("943d")),c=a("5180"),p=a("6d32"),m=(a("333d"),{name:"EitcErmPcIndex",computed:{},components:{upgrade:p["default"],addClinic:c["default"]},data:function(){return{onOpen:!1,upgradeOpen:!1,title:"",dictType:"",form:{pageNum:1,pageSize:10},clinicName:"",data:{},editData:{},tableData:[],total:0,pageType:1}},mounted:function(){this.initList("")},methods:{edit:function(e){this.onOpen=!0,this.pageType=2,this.$refs.addClinicRef.formData=Object(s["a"])({},e)},add:function(){this.onOpen=!0,this.pageType=1},upgrade:function(e){this.upgradeOpen=!0,e.versionInfoOld=e.versionInfo,this.$refs.upgradeOpenRef.formData=e,console.log(e)},initList:function(){var e=this;return Object(i["a"])(Object(o["a"])().mark((function t(){var a,r;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a={pageNum:e.form.pageNum,pageSize:e.form.pageSize},e.clinicName.length>0&&(a={clinicName:e.clinicName}),t.next=4,Object(n["q"])(a);case 4:r=t.sent,200===r.code&&(e.total=r.total,e.tableData=r.rows,e.tableData.forEach((function(e){var t=new Date,a=new Date(Date.parse(e.expireTime.replace(/-/g,"/"))).getTime();e.isExpire=Math.ceil((a-t)/864e5)})),e.loading=!1);case 6:case"end":return t.stop()}}),t)})))()},reset:function(){this.clinicName="",this.initList("")},closeDialog:function(){this.onOpen=!1,this.upgradeOpen=!1,this.initList()},deleteData:function(e){var t=this;this.$confirm("此操作将永久删除该项, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(n["D"])(e).then((function(e){if(200!==e.code)return t.$message.error(e.msg);t.initList(),t.$message({type:"success",message:"删除成功!"})}))})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))}}}),u=m,f=a("2877"),d=Object(f["a"])(u,r,l,!1,null,null,null);t["default"]=d.exports},5180:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.onOpen?a("el-dialog",{attrs:{visible:e.onOpen,title:1===e.pageType?"新增":"编辑"},on:{close:e.onClose}},[a("el-row",{attrs:{gutter:15}},[a("el-form",{ref:"elForm",attrs:{model:e.formData,rules:e.rules,size:"medium","label-width":"120px"}},[a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"诊所名称",prop:"clinicName"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入诊所名称",clearable:"",maxlength:64},model:{value:e.formData.clinicName,callback:function(t){e.$set(e.formData,"clinicName",t)},expression:"formData.clinicName"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"IP地址",prop:"clinicIp"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入IP地址",clearable:""},model:{value:e.formData.clinicIp,callback:function(t){e.$set(e.formData,"clinicIp",t)},expression:"formData.clinicIp"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"服务器登录名",prop:"serverUser"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入服务器登录名",clearable:""},model:{value:e.formData.serverUser,callback:function(t){e.$set(e.formData,"serverUser",t)},expression:"formData.serverUser"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"服务器密码",prop:"serverPassword"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入服务器密码",clearable:""},model:{value:e.formData.serverPassword,callback:function(t){e.$set(e.formData,"serverPassword",t)},expression:"formData.serverPassword"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"端口号",prop:"serverPost"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入端口号",clearable:""},model:{value:e.formData.serverPost,callback:function(t){e.$set(e.formData,"serverPost",t)},expression:"formData.serverPost"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"socket端口号",prop:"webSocketPost"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入socket端口号",clearable:""},model:{value:e.formData.webSocketPost,callback:function(t){e.$set(e.formData,"webSocketPost",t)},expression:"formData.webSocketPost"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"诊所域名",prop:"realmName"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入诊所域名",clearable:""},model:{value:e.formData.realmName,callback:function(t){e.$set(e.formData,"realmName",t)},expression:"formData.realmName"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"版本编号",prop:"versionInfo"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入版本编号",clearable:""},model:{value:e.formData.versionInfo,callback:function(t){e.$set(e.formData,"versionInfo",t)},expression:"formData.versionInfo"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"购买时间",prop:"creatTime"}},[a("el-date-picker",{style:{width:"100%"},attrs:{format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",placeholder:"请选择购买时间",clearable:"","picker-options":e.pickerStartOptions},model:{value:e.formData.creatTime,callback:function(t){e.$set(e.formData,"creatTime",t)},expression:"formData.creatTime"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"到期时间",prop:"expireTime"}},[a("el-date-picker",{style:{width:"100%"},attrs:{format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",placeholder:"请选择到期时间",clearable:"","picker-options":e.pickerEndOptions},model:{value:e.formData.expireTime,callback:function(t){e.$set(e.formData,"expireTime",t)},expression:"formData.expireTime"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"所在地区",prop:"region"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入所在地区",clearable:""},model:{value:e.formData.region,callback:function(t){e.$set(e.formData,"region",t)},expression:"formData.region"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入手机号",clearable:""},model:{value:e.formData.phone,callback:function(t){e.$set(e.formData,"phone",t)},expression:"formData.phone"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"详细地址",prop:"address"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入详细地址",clearable:""},model:{value:e.formData.address,callback:function(t){e.$set(e.formData,"address",t)},expression:"formData.address"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:"购买版本",prop:"versionRefer"}},[a("el-select",{style:{width:"100%"},attrs:{placeholder:"请选择购买版本",clearable:""},model:{value:e.formData.versionRefer,callback:function(t){e.$set(e.formData,"versionRefer",t)},expression:"formData.versionRefer"}},e._l(e.mobileOptions,(function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value,disabled:e.disabled}})})),1)],1)],1)],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.onClose}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.handleConfirm}},[e._v("确定")])],1)],1):e._e()],1)},l=[],o=a("c7eb"),i=a("1da1"),s=(a("a9e3"),a("943d")),n={components:{},props:{onOpen:{type:Boolean,default:!1},pageType:{type:Number,default:1}},data:function(){var e=this;return{formData:{clinicName:"",clinicIp:"",serverUser:"",serverPassword:"",realmName:"",creatTime:null,expireTime:null,versionInfo:"",region:"",phone:"",address:"",serverPost:"",webSocketPost:"",versionRefer:""},pickerStartOptions:{disabledDate:function(t){if(null!==e.formData.expireTime)return t.getTime()>new Date(e.formData.expireTime).getTime()}},pickerEndOptions:{disabledDate:function(t){if(null!==e.formData.creatTime)return t.getTime()<new Date(e.formData.creatTime).getTime()}},mobileOptions:[{label:"免费版",value:"免费版"},{label:"基础版",value:"基础版"},{label:"高级版",value:"高级版"},{label:"豪华版",value:"豪华版"},{label:"尊贵版",value:"尊贵版"}],rules:{clinicName:[{required:!0,message:"请输入诊所名称",trigger:"blur"}],clinicIp:[{required:!0,message:"请输入IP地址",trigger:"blur"},{pattern:/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,message:"IP地址格式错误",trigger:"blur"}],serverUser:[{required:!0,message:"请输入服务器登录名",trigger:"blur"}],serverPassword:[{required:!0,message:"请输入服务器密码",trigger:"blur"}],serverPost:[{required:!0,message:"请输入端口号",trigger:"blur"}],webSocketPost:[{required:!0,message:"请输入socket端口号",trigger:"blur"}],realmName:[{required:!0,message:"请输入诊所域名",trigger:"blur"}],creatTime:[{required:!0,message:"请选择购买时间",trigger:"change"}],expireTime:[{required:!0,message:"请选择到期时间",trigger:"change"}],versionInfo:[{required:!0,message:"请输入版本编号",trigger:"blur"}],region:[{required:!0,message:"请输入所在地区",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1(3|4|5|7|8|9)\d{9}$/,message:"手机号格式错误",trigger:"blur"}],address:[{required:!0,message:"请输入详细地址",trigger:"blur"}],versionRefer:[{required:!0,message:"请选择购买版本",trigger:"blur"}]}}},computed:{},watch:{},created:function(){},mounted:function(){},methods:{onClose:function(){this.$emit("closeDialog"),this.formData={creatTime:null,expireTime:null}},handleConfirm:function(){var e=this;this.$refs.elForm.validate(function(){var t=Object(i["a"])(Object(o["a"])().mark((function t(a){var r,l;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=15;break}if(1!==e.pageType){t.next=8;break}return t.next=4,Object(s["a"])(e.formData);case 4:r=t.sent,200===r.code?(e.$emit("closeDialog"),e.$message.success("保存成功")):e.$message.error(r.msg),t.next=13;break;case 8:return console.log(e.formData),t.next=11,Object(s["cb"])(e.formData);case 11:l=t.sent,200===l.code?(e.$emit("closeDialog"),e.$message.success("保存成功"),e.formData={creatTime:null,expireTime:null}):e.$message.error(l.msg);case 13:t.next=17;break;case 15:return console.log("error submit!!"),t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}},c=n,p=a("2877"),m=Object(p["a"])(c,r,l,!1,null,null,null);t["default"]=m.exports},"694e":function(e,t,a){"use strict";a("259b")},"6d32":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.upgradeOpen?a("el-dialog",{attrs:{visible:e.upgradeOpen,title:"升级"},on:{close:e.onClose}},[a("el-row",{attrs:{gutter:15}},[a("el-form",{ref:"elForm",attrs:{model:e.formData,rules:e.rules,size:"medium","label-width":"100px"}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"现在版本",prop:"versionInfoOld"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入现在版本",readonly:"",disabled:!0,clearable:""},model:{value:e.formData.versionInfoOld,callback:function(t){e.$set(e.formData,"versionInfoOld",t)},expression:"formData.versionInfoOld"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"升级版本",prop:"versionInfo"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入升级版本",maxlength:64,clearable:""},model:{value:e.formData.versionInfo,callback:function(t){e.$set(e.formData,"versionInfo",t)},expression:"formData.versionInfo"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"校验码",prop:"vcode"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入校验码",clearable:""},model:{value:e.formData.vcode,callback:function(t){e.$set(e.formData,"vcode",t)},expression:"formData.vcode"}})],1)],1)],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.close}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.handleConfirm}},[e._v("确定")])],1)],1):e._e()],1)},l=[],o=a("c7eb"),i=a("1da1"),s=a("943d"),n={inheritAttrs:!1,components:{},props:{upgradeOpen:{type:Boolean,default:!1}},data:function(){return{formData:{},rules:{versionInfo:[{required:!0,message:"请输入升级版本",trigger:"blur"}],vcode:[{required:!0,message:"请输入校验码",trigger:"blur"}]},field102Action:"https://jsonplaceholder.typicode.com/posts/",field102fileList:[]}},computed:{},watch:{},created:function(){},mounted:function(){},methods:{onClose:function(){this.$emit("closeDialog")},close:function(){this.$emit("closeDialog")},handleConfirm:function(){var e=this;return Object(i["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:console.log(e.formData),e.$refs.elForm.validate(function(){var t=Object(i["a"])(Object(o["a"])().mark((function t(a){var r;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=5;break}return t.next=3,Object(s["cb"])(e.formData);case 3:r=t.sent,200===r.code?(e.$emit("initList"),e.$emit("closeDialog"),e.$message.success("保存成功"),e.formData={}):(e.$message.error(r.msg),e.$emit("closeDialog"));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()},field102BeforeUpload:function(e){var t=e.size/1024/1024<2;return t||this.$message.error("文件大小超过 2MB"),t}}},c=n,p=(a("694e"),a("2877")),m=Object(p["a"])(c,r,l,!1,null,null,null);t["default"]=m.exports}}]);