1 line
7.2 KiB
JavaScript
1 line
7.2 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-379fe216"],{"188f":function(e,t,a){"use strict";a("df9b")},2930:function(e,t,a){},3403:function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.title,visible:e.dialogVisible,width:"700px","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogVisible=t},close:e.clearFileList}},[a("div",[a("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{accept:e.accept,action:e.baseUrl+e.uploadUrl,headers:e.uploadHeaders,"on-success":e.handleSuccess,"before-upload":e.beforeUpload,multiple:"","file-list":e.fileList}},[a("el-button",{ref:"uploadBtn",attrs:{size:"small",type:"primary"}},[e._v("点击上传")]),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("\n "+e._s(e.tips)+"\n "),e.templateUrl?a("a",{attrs:{target:"_blank",download:"",href:e.templateUrl}},[e._v("下载模板")]):e._e()])],1)],1)])},l=[],r=(a("386d"),a("a78e")),i=a.n(r),s={props:{accept:{type:String,default:"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},uploadUrl:{type:String,default:null},title:{type:String,default:"导入信息"},tips:{type:String,default:"只能上传excel文件"},templateUrl:{type:String,default:null}},data:function(){return{dialogVisible:!1,fileList:[],uploadHeaders:{},count:0,errorList:[],baseUrl:window.SITE_CONFIG["apiURL"]}},created:function(){this.uploadHeaders={Authorization:"Bearer "+i.a.get("access_token")||!1}},methods:{init:function(){this.dialogVisible=!0},beforeUpload:function(e){return this.count++,!0},handleSuccess:function(e){this.count--,0!=e.code&&this.errorList.push(e.msg),0==this.count&&(0==this.errorList.length?this.$message({type:"success",message:"上传完成"}):(this.$notify({type:"error",title:"上传失败",dangerouslyUseHTMLString:!0,message:this.errorList.join("<br>"),duration:0}),this.errorList=[]))},clearFileList:function(){this.$refs["upload"].clearFiles(),this.$parent.$parent.search?this.$parent.$parent.search():this.$parent.$parent.resetForm("ruleForm")}}},o=s,d=(a("188f"),a("2877")),c=Object(d["a"])(o,n,l,!1,null,"5cda165b",null);t["a"]=c.exports},"386d":function(e,t,a){"use strict";var n=a("cb7c"),l=a("83a1"),r=a("5f1b");a("214f")("search",1,(function(e,t,a,i){return[function(a){var n=e(this),l=void 0==a?void 0:a[t];return void 0!==l?l.call(a,n):new RegExp(a)[t](String(n))},function(e){var t=i(a,e,this);if(t.done)return t.value;var s=n(e),o=String(this),d=s.lastIndex;l(d,0)||(s.lastIndex=0);var c=r(s,o);return l(s.lastIndex,d)||(s.lastIndex=d),null===c?-1:c.index}]}))},"3b34":function(e,t,a){"use strict";a("2930")},"77d8":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("el-card",{staticClass:"aui-card--fill",attrs:{shadow:"never"}},[a("el-form",{ref:"ruleForm",attrs:{inline:!0,model:e.dataForm},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getDataList()}}},[a("el-form-item",{attrs:{label:"设备名称",prop:"mbdDevicename"}},[a("el-input",{attrs:{placeholder:"请输入",clearable:""},model:{value:e.dataForm.mbdDevicename,callback:function(t){e.$set(e.dataForm,"mbdDevicename",t)},expression:"dataForm.mbdDevicename"}})],1),a("el-form-item",{attrs:{label:"设备状态",prop:"mdbStatus"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.dataForm.mdbStatus,callback:function(t){e.$set(e.dataForm,"mdbStatus",t)},expression:"dataForm.mdbStatus"}},e._l(e.statusList,(function(e){return a("el-option",{key:e.dictValue,attrs:{label:e.dictLabel,value:e.dictValue}})})),1)],1),a("el-form-item",[a("el-button",{on:{click:function(t){return e.getDataList()}}},[e._v(e._s(e.$t("query")))])],1),a("el-form-item",[a("el-button",{attrs:{type:"warning"},on:{click:function(t){return e.resetForm("ruleForm")}}},[e._v("重置")])],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.addOrUpdateHandle()}}},[e._v(e._s(e.$t("add")))])],1),a("el-form-item",[a("el-button",{attrs:{type:"success"},on:{click:function(t){return e.importHandle()}}},[e._v("导入")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.dataListLoading,expression:"dataListLoading"}],staticStyle:{width:"100%"},attrs:{data:e.dataList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"100",align:"center"}}),a("el-table-column",{attrs:{prop:"mbdDevicename",label:"设备名称","header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"mbdDevicesn",label:"设备序列号","header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"mdbStatus",label:"设备状态","header-align":"center",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.mdbStatus?a("span",{staticStyle:{color:"#67C23A"}},[e._v(" "+e._s(e.$getDictLabel("equipment_status",t.row.mdbStatus)))]):a("span",{staticStyle:{color:"#f56c6c"}},[e._v(" "+e._s(e.$getDictLabel("equipment_status",t.row.mdbStatus)))])]}}])}),a("el-table-column",{attrs:{prop:"mbdNetwork",label:"是否组网","header-align":"center",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n\t\t\t\t"+e._s(0==t.row.mbdNetwork?"否":"是")+"\n\t\t\t")]}}])}),a("el-table-column",{attrs:{prop:"mbdUwbaddr",label:"安装位置","header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"mbdSetupdate",label:"安装时间","header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"mbdExpirydate",label:"有效期","header-align":"center",align:"center"}}),a("el-table-column",{attrs:{label:e.$t("handle"),fixed:"right","header-align":"center",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.addOrUpdateHandle(t.row.mbdId)}}},[e._v(e._s(e.$t("update")))]),0==t.row.mbdNetwork?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.deleteHandle(t.row.mbdId)}}},[e._v(e._s(e.$t("delete")))]):e._e()]}}])})],1),a("el-pagination",{attrs:{"current-page":e.page,"page-sizes":[10,20,50,100],"page-size":e.limit,total:e.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.pageSizeChangeHandle,"current-change":e.pageCurrentChangeHandle}}),e.addOrUpdateVisible?a("add-or-update",{ref:"addOrUpdate",on:{refreshDataList:e.getDataList}}):e._e(),a("upload",{ref:"studentUploadExcel",attrs:{"template-url":"./template/equipment/环境传感器设备表导入模板.xls","upload-url":"/system/scmodbusdevicedc/importPMExcel"}})],1)},l=[],r=a("893c"),i=a("e1a5"),s=a("3403"),o=a("ed08"),d={name:"pir",components:{AddOrUpdate:r["default"],upload:s["a"]},mixins:[i["a"]],data:function(){return{mixinViewModuleOptions:{getDataListURL:"/system/scmodbusdevicedc/page",getDataListIsPage:!0,deleteURL:"/system/scmodbusdevicedc"},dataForm:{mbdDevicetype:2,mbdDevicename:"",mdbStatus:""}}},computed:{statusList:function(){return Object(o["c"])("equipment_status")}},methods:{importHandle:function(){this.$refs["studentUploadExcel"].init()}}},c=d,u=(a("3b34"),a("2877")),p=Object(u["a"])(c,n,l,!1,null,"58465390",null);t["default"]=p.exports},"83a1":function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},df9b:function(e,t,a){}}]); |