1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fc9fafc2","chunk-722c5e57"],{"9b9c":function(t,e,o){"use strict";o.d(e,"g",(function(){return i})),o.d(e,"h",(function(){return l})),o.d(e,"f",(function(){return a})),o.d(e,"a",(function(){return n})),o.d(e,"i",(function(){return u})),o.d(e,"e",(function(){return s})),o.d(e,"b",(function(){return d})),o.d(e,"d",(function(){return c})),o.d(e,"c",(function(){return p}));var r=o("b775");function i(t){return Object(r["a"])({url:"/iot/product/list",method:"get",params:t})}function l(t){return Object(r["a"])({url:"/iot/product/shortList",method:"get",params:t})}function a(t){return Object(r["a"])({url:"/iot/product/"+t,method:"get"})}function n(t){return Object(r["a"])({url:"/iot/product",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/iot/product",method:"put",data:t})}function s(t){return Object(r["a"])({url:"/iot/product/deviceCount/"+t,method:"get"})}function d(t){return Object(r["a"])({url:"/iot/product/status",method:"put",data:t})}function c(t){return Object(r["a"])({url:"/iot/product/"+t,method:"delete"})}function p(t){return Object(r["a"])({url:"/iot/product/copy?productId="+t,method:"post"})}},c0c7:function(t,e,o){"use strict";o.d(e,"l",(function(){return l})),o.d(e,"o",(function(){return a})),o.d(e,"j",(function(){return n})),o.d(e,"i",(function(){return u})),o.d(e,"a",(function(){return s})),o.d(e,"q",(function(){return d})),o.d(e,"c",(function(){return c})),o.d(e,"m",(function(){return p})),o.d(e,"b",(function(){return m})),o.d(e,"h",(function(){return f})),o.d(e,"n",(function(){return h})),o.d(e,"k",(function(){return g})),o.d(e,"r",(function(){return v})),o.d(e,"s",(function(){return b})),o.d(e,"t",(function(){return y})),o.d(e,"f",(function(){return w})),o.d(e,"p",(function(){return _})),o.d(e,"d",(function(){return $})),o.d(e,"e",(function(){return O})),o.d(e,"g",(function(){return k}));var r=o("b775"),i=o("c38a");function l(t){return Object(r["a"])({url:"/system/user/list",method:"get",params:t})}function a(t){return Object(r["a"])({url:"/system/user/listTerminal",method:"get",params:t})}function n(t){return Object(r["a"])({url:"/system/user/"+Object(i["f"])(t),method:"get"})}function u(t){return Object(r["a"])({url:"/system/dept/getRole?deptId="+t,method:"get"})}function s(t){return Object(r["a"])({url:"/system/user",method:"post",data:t})}function d(t){return Object(r["a"])({url:"/system/user",method:"put",data:t})}function c(t){return Object(r["a"])({url:"/system/user/"+t,method:"delete"})}function p(t,e){var o={userId:t,password:e};return Object(r["a"])({url:"/system/user/resetPwd",method:"put",data:o})}function m(t,e){var o={userId:t,status:e};return Object(r["a"])({url:"/system/user/changeStatus",method:"put",data:o})}function f(){return Object(r["a"])({url:"/wechat/getWxBindQr",method:"get"})}function h(t){return Object(r["a"])({url:"/wechat/cancelBind",method:"post",data:t})}function g(){return Object(r["a"])({url:"/system/user/profile",method:"get"})}function v(t){return Object(r["a"])({url:"/system/user/profile",method:"put",data:t})}function b(t,e){var o={oldPassword:t,newPassword:e};return Object(r["a"])({url:"/system/user/profile/updatePwd",method:"put",params:o})}function y(t){return Object(r["a"])({url:"/system/user/profile/avatar",method:"post",data:t})}function w(t){return Object(r["a"])({url:"/system/user/authRole/"+t,method:"get"})}function _(t){return Object(r["a"])({url:"/system/user/authRole",method:"put",params:t})}function $(){return Object(r["a"])({url:"/system/user/deptTree",method:"get"})}function O(t){return Object(r["a"])({url:"/system/user/deptTree?showOwner="+t,method:"get"})}function k(t){return Object(r["a"])({url:"/system/user/getByDeptId",method:"get",params:t})}},e51f:function(t,e,o){"use strict";o.r(e);var r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-dialog",{attrs:{title:t.$t("device.product-list.058448-0"),visible:t.open,width:"910px"},on:{"update:visible":function(e){t.open=e}}},[o("el-form",{ref:"queryForm",attrs:{model:t.queryParams,inline:!0,"label-width":"68px"},nativeOn:{submit:function(t){t.preventDefault()}}},[o("el-form-item",{attrs:{prop:"productName"}},[o("el-input",{attrs:{placeholder:t.$t("device.product-list.058448-2"),clearable:"",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery(e)}},model:{value:t.queryParams.productName,callback:function(e){t.$set(t.queryParams,"productName",e)},expression:"queryParams.productName"}})],1),o("el-form-item",[o("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"small"},on:{click:t.handleQuery}},[t._v(t._s(t.$t("device.product-list.058448-3")))]),o("el-button",{attrs:{icon:"el-icon-refresh",size:"small"},on:{click:t.resetQuery}},[t._v(t._s(t.$t("device.product-list.058448-4")))])],1)],1),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"singleTable",attrs:{data:t.productList,"highlight-current-row":"",size:"small",border:!1},on:{"row-click":t.rowClick}},[o("el-table-column",{attrs:{label:t.$t("device.device-edit.148398-6"),width:"50",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){return[o("input",{attrs:{type:"radio",name:"product"},domProps:{checked:t.row.isSelect}})]}}])}),o("el-table-column",{attrs:{label:t.$t("device.allot-record.155854-2"),align:"left",prop:"productName","min-width":"180"}}),o("el-table-column",{attrs:{label:t.$t("device.product-list.058448-6"),align:"left",prop:"categoryName","min-width":"150"}}),o("el-table-column",{attrs:{label:t.$t("device.product-list.058448-7"),align:"left",prop:"tenantName","min-width":"100"}}),o("el-table-column",{attrs:{label:t.$t("device.product-list.058448-8"),align:"center",prop:"status",width:"70"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.isAuthorize?o("el-tag",{attrs:{type:"success"}},[t._v(t._s(t.$t("device.product-list.058448-9")))]):t._e(),0==e.row.isAuthorize?o("el-tag",{attrs:{type:"info"}},[t._v(t._s(t.$t("device.product-list.058448-10")))]):t._e()]}}])}),o("el-table-column",{attrs:{label:t.$t("device.product-list.058448-11"),align:"center",prop:"status","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("dict-tag",{attrs:{options:t.dict.type.iot_vertificate_method,value:e.row.vertificateMethod}})]}}])}),o("el-table-column",{attrs:{label:t.$t("device.product-list.058448-12"),align:"center",prop:"networkMethod","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("dict-tag",{attrs:{options:t.dict.type.iot_network_method,value:e.row.networkMethod}})]}}])})],1),o("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],attrs:{layout:"prev, pager, next",total:t.total,page:t.queryParams.pageNum,limit:t.queryParams.pageSize},on:{"update:page":function(e){return t.$set(t.queryParams,"pageNum",e)},"update:limit":function(e){return t.$set(t.queryParams,"pageSize",e)},pagination:t.getList}}),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:t.confirmSelectProduct}},[t._v(t._s(t.$t("device.product-list.058448-14")))]),o("el-button",{attrs:{type:"info"},on:{click:t.closeDialog}},[t._v(t._s(t.$t("device.product-list.058448-15")))])],1)],1)},i=[],l=(o("a9e3"),o("9b9c")),a={name:"ProductList",dicts:["iot_vertificate_method","iot_network_method"],props:{productId:{type:Number,default:0},showSenior:{type:Boolean,default:!0}},data:function(){return{loading:!0,total:0,open:!1,productList:[],product:{},queryParams:{pageNum:1,pageSize:10,productName:null,categoryId:null,categoryName:null,tenantId:null,tenantName:null,isSys:null,status:2,deviceType:null,networkMethod:null}}},created:function(){},methods:{getList:function(){var t=this;this.loading=!0,this.queryParams.showSenior=this.showSenior,Object(l["g"])(this.queryParams).then((function(e){for(var o=0;o<e.rows.length;o++)e.rows[o].isSelect=!1;t.productList=e.rows,t.total=e.total,0!=t.productId&&t.setRadioSelected(t.productId),t.loading=!1}))},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},rowClick:function(t){null!=t&&(this.setRadioSelected(t.productId),this.product=t)},setRadioSelected:function(t){for(var e=0;e<this.productList.length;e++)this.productList[e].productId==t?this.productList[e].isSelect=!0:this.productList[e].isSelect=!1},confirmSelectProduct:function(){this.$emit("productEvent",this.product),this.open=!1},closeDialog:function(){this.open=!1}}},n=a,u=o("2877"),s=Object(u["a"])(n,r,i,!1,null,null,null);e["default"]=s.exports},f4c2:function(t,e,o){"use strict";o.r(e);var r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-dialog",{attrs:{title:t.upload.title,visible:t.upload.importAllotDialog,width:"550px","append-to-body":""},on:{"update:visible":function(e){return t.$set(t.upload,"importAllotDialog",e)}}},[o("el-form",{ref:"allotForm",attrs:{"label-width":"100px",model:t.allotForm,rules:t.allotRules}},[o("el-form-item",{attrs:{label:"",prop:"productName"}},[o("template",{slot:"label"},[t._v(" "+t._s(t.$t("device.device-edit.148398-4"))+" ")]),o("el-input",{staticStyle:{width:"360px"},attrs:{readonly:"",placeholder:t.$t("device.device-edit.148398-5")},model:{value:t.allotForm.productName,callback:function(e){t.$set(t.allotForm,"productName",e)},expression:"allotForm.productName"}},[o("el-button",{attrs:{slot:"append"},on:{click:function(e){return t.selectProduct()}},slot:"append"},[t._v(t._s(t.$t("device.device-edit.148398-6")))])],1)],2),o("el-form-item",{attrs:{label:t.$t("device.allot-import-dialog.060657-2"),prop:"deptId"}},[o("treeselect",{staticStyle:{width:"360px"},attrs:{options:t.deptOptions,"show-count":!0,placeholder:t.$t("device.allot-import-dialog.060657-3")},model:{value:t.allotForm.deptId,callback:function(e){t.$set(t.allotForm,"deptId",e)},expression:"allotForm.deptId"}})],1),o("el-form-item",{attrs:{label:t.$t("uploadFile"),prop:"fileList"}},[o("el-upload",{ref:"upload",attrs:{limit:1,accept:".xlsx, .xls",headers:t.upload.headers,action:t.upload.url+"?productId="+t.allotForm.productId+"&deptId="+t.allotForm.deptId,disabled:t.upload.isUploading,"on-progress":t.handleFileUploadProgress,"on-success":t.handleFileSuccess,"auto-upload":!1,"on-change":t.handleChange,"on-remove":t.handleRemove,drag:""},model:{value:t.allotForm.fileList,callback:function(e){t.$set(t.allotForm,"fileList",e)},expression:"allotForm.fileList"}},[o("i",{staticClass:"el-icon-upload"}),o("div",{staticClass:"el-upload__text"},[t._v(" "+t._s(t.$t("dragFileTips"))+" "),o("em",[t._v(t._s(t.$t("clickFileTips")))])]),o("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[o("div",{staticStyle:{"line-height":"26px",width:"360px"}},[o("div",[t._v(t._s(t.$t("device.allot-import-dialog.060657-7")))]),o("div",[t._v(t._s(t.$t("device.allot-import-dialog.060657-8")))]),o("div",[t._v(t._s(t.$t("device.allot-import-dialog.060657-9")))])])])]),o("el-link",{staticStyle:{"font-size":"14px","vertical-align":"baseline"},attrs:{type:"primary",underline:!1},on:{click:t.importAllotTemplate}},[o("i",{staticClass:"el-icon-download"}),t._v(" "+t._s(t.$t("device.allot-import-dialog.060657-10"))+" ")])],1)],1),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:t.submitImportDevice}},[t._v(t._s(t.$t("device.allot-import-dialog.060657-12")))]),o("el-button",{on:{click:function(e){t.upload.importAllotDialog=!1}}},[t._v(t._s(t.$t("cancel")))])],1)],1),o("product-list",{ref:"productList",attrs:{productId:t.allotForm.productId},on:{productEvent:function(e){return t.getProductData(e)}}})],1)},i=[],l=o("5f87"),a=o("c0c7"),n=o("ca17"),u=o.n(n),s=o("e51f"),d=(o("542c"),{name:"allotImport",components:{Treeselect:u.a,productList:s["default"]},data:function(){return{type:1,allotForm:{productId:0,deptId:0,fileList:[],productName:""},productList:[],deptOptions:[],upload:{title:this.$t("device.allot-import-dialog.060657-13"),importAllotDialog:!1,isUploading:!1,headers:{Authorization:"Bearer "+Object(l["a"])()},url:"/prod-api/iot/device/importAssignmentData"},isSubDev:!1,allotRules:{productName:[{required:!0,message:this.$t("device.allot-import-dialog.060657-14"),trigger:"change"}],deptId:[{required:!0,message:this.$t("device.allot-import-dialog.060657-15"),trigger:"change"}],fileList:[{required:!0,message:this.$t("plzUploadFile"),trigger:"change"}]}}},created:function(){this.getDeptTree()},methods:{getDeptTree:function(){var t=this;Object(a["d"])().then((function(e){t.deptOptions=e.data}))},importAllotTemplate:function(){this.type=2,this.download("/iot/device/uploadTemplate?type="+this.type,{},"allot_device_".concat((new Date).getTime(),".xlsx"))},handleChange:function(t,e){this.allotForm.fileList=e,this.allotForm.fileList&&this.$refs.allotForm.clearValidate("fileList")},handleRemove:function(t,e){this.allotForm.fileList=e,this.$refs.allotForm.validateField("fileList")},handleFileUploadProgress:function(t,e,o){this.upload.isUploading=!0},handleFileSuccess:function(t,e,o){this.upload.open=!1,this.upload.isUploading=!1,this.$refs.upload.clearFiles(),this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"+t.msg+"</div>",this.$t("device.allot-import-dialog.060657-17"),{dangerouslyUseHTMLString:!0}),this.$parent.getList()},selectProduct:function(){this.$refs.productList.open=!0,this.$refs.productList.getList()},getProductData:function(t){this.allotForm.productId=t.productId,this.allotForm.productName=t.productName},submitImportDevice:function(){var t=this;this.$refs["allotForm"].validate((function(e){e&&(t.$refs.upload.submit(),t.upload.importAllotDialog=!1)}))}}}),c=d,p=o("2877"),m=Object(p["a"])(c,r,i,!1,null,null,null);e["default"]=m.exports}}]); |