cuikaidong
2025-06-12 64931370717723655d4ecec4802dcdc54ec015f5
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d52bbb0c","chunk-e021d7b4","chunk-e021d7b4","chunk-2d0df437"],{"7ab5":function(e,t,i){},"88bc":function(e,t,i){(function(t){var i=1/0,n=9007199254740991,a="[object Arguments]",s="[object Function]",r="[object GeneratorFunction]",l="[object Symbol]",o="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,c=o||u||Function("return this")();function d(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function f(e,t){var i=-1,n=e?e.length:0,a=Array(n);while(++i<n)a[i]=t(e[i],i,e);return a}function h(e,t){var i=-1,n=t.length,a=e.length;while(++i<n)e[a+i]=t[i];return e}var p=Object.prototype,m=p.hasOwnProperty,v=p.toString,g=c.Symbol,b=p.propertyIsEnumerable,y=g?g.isConcatSpreadable:void 0,w=Math.max;function L(e,t,i,n,a){var s=-1,r=e.length;i||(i=k),a||(a=[]);while(++s<r){var l=e[s];t>0&&i(l)?t>1?L(l,t-1,i,n,a):h(a,l):n||(a[a.length]=l)}return a}function x(e,t){return e=Object(e),C(e,t,(function(t,i){return i in e}))}function C(e,t,i){var n=-1,a=t.length,s={};while(++n<a){var r=t[n],l=e[r];i(l,r)&&(s[r]=l)}return s}function I(e,t){return t=w(void 0===t?e.length-1:t,0),function(){var i=arguments,n=-1,a=w(i.length-t,0),s=Array(a);while(++n<a)s[n]=i[t+n];n=-1;var r=Array(t+1);while(++n<t)r[n]=i[n];return r[t]=s,d(e,this,r)}}function k(e){return S(e)||O(e)||!!(y&&e&&e[y])}function j(e){if("string"==typeof e||N(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function O(e){return F(e)&&m.call(e,"callee")&&(!b.call(e,"callee")||v.call(e)==a)}var S=Array.isArray;function T(e){return null!=e&&U(e.length)&&!E(e)}function F(e){return A(e)&&T(e)}function E(e){var t=$(e)?v.call(e):"";return t==s||t==r}function U(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function $(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function A(e){return!!e&&"object"==typeof e}function N(e){return"symbol"==typeof e||A(e)&&v.call(e)==l}var B=I((function(e,t){return null==e?{}:x(e,f(L(t,1),j))}));e.exports=B}).call(this,i("c8ba"))},bf5f:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a-modal",{attrs:{title:e.title,width:500,visible:e.visible,maskClosable:!1,confirmLoading:e.confirmLoading,okButtonProps:{props:{disabled:e.disableSubmit}},cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[i("a-spin",{attrs:{spinning:e.confirmLoading}},[i("a-form",{attrs:{form:e.form}},[i("a-row",{attrs:{gutter:12}},[i("a-col",{attrs:{span:32}},[i("a-form-item",{attrs:{label:"采集软件",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[i("j-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["fileList",e.validatorRules.fileList],expression:"[ 'fileList', validatorRules.fileList]"}],attrs:{text:"上传",bizPath:e.serverCode,number:"1"},model:{value:e.fileList,callback:function(t){e.fileList=t},expression:"fileList"}})],1)],1)],1),i("a-row",{attrs:{gutter:12}},[i("a-col",{attrs:{span:32}},[i("a-form-item",{attrs:{label:"采集软件版本号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["latestCollectVersion",e.validatorRules.latestCollectVersion],expression:"[ 'latestCollectVersion', validatorRules.latestCollectVersion]"}],attrs:{disabled:e.disableSubmit,readOnly:e.disableSubmit,placeholder:"请输入采集软件版本号","allow-clear":"",maxLength:10}})],1)],1)],1)],1)],1),i("template",{slot:"footer"},[i("a-button",{style:{marginRight:"8px"},on:{click:e.handleCancel}},[e._v("关闭")]),i("a-button",{attrs:{type:"primary"},on:{click:e.handleOk}},[e._v("确定")])],1)],2)},a=[],s=i("cf74"),r=i("0fea"),l=i("88bc"),o=i.n(l),u={name:"AuthorizeModel",components:{JUpload:s["default"]},data:function(){return{serverCode:"",fileList:[],title:"",uploadValues:{},visible:!1,model:{},confirmLoading:!1,form:this.$form.createForm(this),url:{edit:"/serve/deploy/edit/collect"},disableSubmit:!1,validatorRules:{latestCollectVersion:{rules:[{required:!0,message:"请输入采集软件版本号"},{min:0,max:30,message:"长度不超过 30 个字符",trigger:"blur"}]},fileList:{rules:[{required:!0,message:"请上传采集软件"}]}},labelCol:{xs:{span:24},sm:{span:8}},wrapperCol:{xs:{span:24},sm:{span:12}}}},methods:{add:function(){this.edit({})},edit:function(e){var t=this;this.form.resetFields(),this.model=Object.assign({},e),this.serverCode=this.model.serverCode+"/software",this.visible=!0,this.$nextTick((function(){t.form.setFieldsValue(o()(t.model,"authorizeCode","bucket","organization","port","address","password"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this,t=this;this.form.validateFields((function(i,n){if(!i){t.confirmLoading=!0;var a=Object.assign(e.model,n);a.newCollectAddress=e.fileList,Object(r["h"])(e.url.edit,a,"put").then((function(e){e.success?(t.$message.success("采集软件更新成功"),t.$emit("ok",e.result)):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.close()}))}}))},handleCancel:function(){this.close()}}},c=u,d=i("2877"),f=Object(d["a"])(c,n,a,!1,null,"05da288c",null);t["default"]=f.exports},cf74:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticStyle:{position:"relative"},attrs:{id:e.containerId}},[i("div",{staticClass:"movety-container",staticStyle:{padding:"0 8px",position:"absolute","z-index":"91",height:"32px",width:"104px","text-align":"center"},style:{top:e.top+"px",left:e.left+"px",display:e.moveDisplay}},[i("div",{class:e.showMoverTask?"uploadty-mover-mask":"movety-opt",staticStyle:{"margin-top":"12px"},attrs:{id:e.containerId+"-mover"}},[i("a",{staticStyle:{margin:"0 5px"},on:{click:e.moveLast}},[i("a-icon",{staticStyle:{color:"#fff","font-size":"16px"},attrs:{type:"arrow-left"}})],1),i("a",{staticStyle:{margin:"0 5px"},on:{click:e.moveNext}},[i("a-icon",{staticStyle:{color:"#fff","font-size":"16px"},attrs:{type:"arrow-right"}})],1)])]),i("a-upload",{class:{"uploadty-disabled":e.disabled},attrs:{name:"file",multiple:!0,action:e.uploadAction,headers:e.headers,data:{biz:e.bizPath},fileList:e.fileList,beforeUpload:e.beforeUpload,disabled:e.disabled,returnUrl:e.returnUrl,listType:e.complistType},on:{change:e.handleChange,preview:e.handlePreview}},[[e.isImageComp?i("div",[i("a-icon",{attrs:{type:"plus"}}),i("div",{staticClass:"ant-upload-text"},[e._v(e._s(e.text))])],1):e.buttonVisible?i("a-button",[i("a-icon",{attrs:{type:"upload"}}),e._v(e._s(e.text)+"\n      ")],1):e._e()]],2),i("a-modal",{attrs:{visible:e.previewVisible,footer:null},on:{cancel:e.handleCancel}},[i("img",{staticStyle:{width:"100%"},attrs:{alt:"example",src:e.previewImage}})])],1)},a=[],s=i("2b0e"),r=i("9fb0"),l=i("0fea"),o="all",u="image",c=function(){return"-"+parseInt(1e4*Math.random()+1,10)},d=function(e){if(e.lastIndexOf("\\")>=0){var t=new RegExp("\\\\","g");e=e.replace(t,"/")}return e.substring(e.lastIndexOf("/")+1)},f={name:"JUpload",data:function(){return{uploadAction:window._CONFIG["domianURL"]+"/sys/common/upload",headers:{},fileList:[],newFileList:[],uploadGoOn:!0,previewVisible:!1,previewImage:"",containerId:"",top:"",left:"",moveDisplay:"none",showMoverTask:!1,moverHold:!1,currentImg:""}},props:{text:{type:String,required:!1,default:"点击上传"},fileType:{type:String,required:!1,default:o},bizPath:{type:String,required:!1,default:"temp"},value:{type:[String,Array],required:!1},disabled:{type:Boolean,required:!1,default:!1},triggerChange:{type:Boolean,required:!1,default:!1},returnUrl:{type:Boolean,required:!1,default:!0},number:{type:Number,required:!1,default:0},buttonVisible:{type:Boolean,required:!1,default:!0}},watch:{value:{immediate:!0,handler:function(){var e=this.value;e instanceof Array?this.returnUrl?this.initFileList(e.join(",")):this.initFileListArr(e):this.initFileList(e)}}},computed:{isImageComp:function(){return this.fileType===u},complistType:function(){return this.fileType===u?"picture-card":"text"}},created:function(){var e=s["default"].ls.get(r["a"]);this.headers={"X-Access-Token":e},this.containerId="container-ty-"+(new Date).getTime()},methods:{initFileListArr:function(e){if(e&&0!=e.length){for(var t=[],i=0;i<e.length;i++){var n=Object(l["d"])(e[i].filePath);t.push({uid:c(),name:e[i].fileName,status:"done",url:n,response:{status:"history",message:e[i].filePath}})}this.fileList=t}else this.fileList=[]},initFileList:function(e){if(e&&0!=e.length){for(var t=[],i=e.split(","),n=0;n<i.length;n++){var a=Object(l["d"])(i[n]);t.push({uid:c(),name:d(i[n]),status:"done",url:a,response:{status:"history",message:i[n]}})}this.fileList=t}else this.fileList=[]},handlePathChange:function(){var e=this.fileList,t="";e&&0!=e.length||(t="");for(var i=[],n=0;n<e.length;n++){if("done"!==e[n].status)return;i.push(e[n].response.message)}i.length>0&&(t=i.join(",")),this.$emit("change",t)},beforeUpload:function(e){this.uploadGoOn=!0;var t=e.type;return!(this.fileType===u&&t.indexOf("image")<0)||(this.$message.warning("请上传图片"),this.uploadGoOn=!1,!1)},handleChange:function(e){e.file.status||!1!==this.uploadGoOn||e.fileList.pop();var t=e.fileList;if("done"===e.file.status?(this.number>0&&(t=t.slice(-this.number)),e.file.response.success&&(t=t.map((function(e){if(e.response){var t=e.response.message;e.url=Object(l["d"])(t)}return e})))):"error"===e.file.status?this.$message.error("".concat(e.file.name," 上传失败.")):"removed"===e.file.status&&this.handleDelete(e.file),this.fileList=t,"done"===e.file.status||"removed"===e.file.status)if(this.returnUrl)this.handlePathChange();else{this.newFileList=[];for(var i=0;i<t.length;i++){if("done"!==t[i].status)return;var n={fileName:t[i].name,filePath:t[i].response.message,fileSize:t[i].size};this.newFileList.push(n)}this.$emit("change",this.newFileList)}},handleDelete:function(e){},handlePreview:function(e){this.fileType===u?(this.previewImage=e.url||e.thumbUrl,this.previewVisible=!0):location.href=e.url},handleCancel:function(){this.previewVisible=!1},moveLast:function(){var e=this.getIndexByUrl();if(0==e)this.$message.warn("未知的操作");else{for(var t=this.fileList[e].url,i=this.fileList[e-1].url,n=[],a=0;a<this.fileList.length;a++)a==e-1?n.push(t):a==e?n.push(i):n.push(this.fileList[a].url);this.currentImg=i,this.$emit("change",n.join(","))}},moveNext:function(){var e=this.getIndexByUrl();if(e==this.fileList.length-1)this.$message.warn("已到最后~");else{for(var t=this.fileList[e].url,i=this.fileList[e+1].url,n=[],a=0;a<this.fileList.length;a++)a==e+1?n.push(t):a==e?n.push(i):n.push(this.fileList[a].url);this.currentImg=i,this.$emit("change",n.join(","))}},getIndexByUrl:function(){for(var e=0;e<this.fileList.length;e++)if(this.fileList[e].url===this.currentImg||encodeURI(this.fileList[e].url)===this.currentImg)return e;return-1}},mounted:function(){var e=this,t=document.getElementById(this.containerId+"-mover");t.addEventListener("mouseover",(function(){e.moverHold=!0,e.moveDisplay="block"})),t.addEventListener("mouseout",(function(){e.moverHold=!1,e.moveDisplay="none"}));var i=document.getElementById(this.containerId)?document.getElementById(this.containerId).getElementsByClassName("ant-upload-list-picture-card"):[];i&&i.length>0&&(i[0].addEventListener("mouseover",(function(t){t=t||window.event;var i=t.target||t.srcElement;if("ant-upload-list-item-info"==i.className){e.showMoverTask=!1;var n=i.parentElement;e.left=n.offsetLeft,e.top=n.offsetTop+n.offsetHeight-50,e.moveDisplay="block",e.currentImg=i.getElementsByTagName("img")[0].src}})),i[0].addEventListener("mouseout",(function(t){t=t||window.event;var i=t.target||t.srcElement;"ant-upload-list-item-info"==i.className&&(e.showMoverTask=!0,setTimeout((function(){!1===e.moverHold&&(e.moveDisplay="none")}),100)),"ant-upload-list-item ant-upload-list-item-done"!=i.className&&"ant-upload-list ant-upload-list-picture-card"!=i.className||(e.moveDisplay="none")})))},model:{prop:"value",event:"change"}},h=f,p=(i("de21"),i("2877")),m=Object(p["a"])(h,n,a,!1,null,null,null);t["default"]=m.exports},de21:function(e,t,i){"use strict";var n=i("7ab5"),a=i.n(n);a.a}}]);