1 line
8.5 KiB
JavaScript
1 line
8.5 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-00ab9024"],{"07d4":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"informationadd"},[r("div",{staticClass:"outmain ba_f heighthv pad_20 bor_rad5"},[t._m(0),r("div",{staticClass:"mar_t20 flex-bet flex-y-top"},[r("el-form",{ref:"form",attrs:{model:t.form,"label-width":"180px"}},[r("el-form-item",{attrs:{label:"排序",prop:"sort",required:!0}},[r("el-input",{attrs:{autocomplete:"off",type:"number",placeholder:"请输入排序"},model:{value:t.form.sort,callback:function(e){t.$set(t.form,"sort","string"===typeof e?e.trim():e)},expression:"form.sort"}})],1),r("el-form-item",{attrs:{label:"标题",required:!0,prop:"title"}},[r("el-input",{attrs:{placeholder:"请输入标题"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),r("el-form-item",{attrs:{label:"简介",required:!0,prop:"introduction"}},[r("el-input",{attrs:{placeholder:"请输入简介"},model:{value:t.form.introduction,callback:function(e){t.$set(t.form,"introduction",e)},expression:"form.introduction"}})],1),r("el-form-item",{attrs:{label:"资讯图片"}},[t.form.icon?r("div",{staticClass:"uploadSource bor_de rel flex"},[r("label",{staticClass:"statusLabel curs",on:{mouseenter:function(e){return t.enter(1)},mouseleave:function(e){return t.leave(1)}}},[r("i",{ref:"imgicon1",staticClass:"el-icon-check"}),r("i",{staticClass:"el-icon-close",on:{click:function(e){return t.deleteMultiImage(t.form.icon,1)}}})]),r("img",{staticClass:"wid",attrs:{src:t.form.icon},on:{click:function(e){return t.test(1)}}})]):r("div",{staticClass:"uploadSource flex-center curs",on:{click:function(e){return t.test(1)}}},[r("i",{staticClass:"el-icon-plus fon_40 color_d9"})]),r("div",{staticClass:"yb_margin"},[t._v("建议尺寸:720*180")])]),r("el-form-item",{attrs:{label:"资讯详情"}},[r("baidu-ueditor",{attrs:{content:t.form.body,typestore:t.storeId},on:{ueditor:t.getUeditor}})],1)],1)],1)]),r("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[r("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("立即创建")])],1),r("attachment-img",{ref:"img1",attrs:{type:"img",type2:t.storeId},on:{attachment:t.imgadd1}})],1)},o=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"shuju_title mar_b20"},[r("div",{staticClass:"shuju_title_text"},[r("span",[t._v("创建资讯")])])])}],i=(r("c975"),r("a434"),r("96cf"),r("1da1")),a=r("5530"),s=r("294d"),c=(r("ed08"),r("fc6e")),u=r("9893"),l=r("2f62"),f={created:function(){this.$route.query.id&&(this.id=this.$route.query.id,this.edit())},computed:Object(a["a"])({},Object(l["d"])(["storeId"])),components:{attachmentImg:c["a"],baiduUeditor:u["a"]},data:function(){return{form:{sort:"1",title:"",introduction:"",icon:"",body:"",type:1},timeData:[new Date,(new Date).setMonth((new Date).getMonth()+3)],collapseName:""}},methods:{getUeditor:function(t){this.form.body=t},edit:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(s["w"])({id:t.id,storeId:t.storeId});case 2:r=e.sent,n=r.data,t.form2=t.form,t.form=Object.assign(t.form2,n);case 6:case"end":return e.stop()}}),e)})))()},enter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+t].style.display="none"},leave:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+t].style.display="inline-block"},test:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;console.log(this.$refs,t),this.$refs["img"+t].dialogVisible=!0},imgadd1:function(t){this.form.icon=t.str},deleteMultiImage:function(t,e,r){if(Array.prototype.remove=function(t){var e=this.indexOf(t);e>-1&&this.splice(e,1)},"multigraph"==r)switch(e){case 2:this.form2.environment.remove(t);break}else switch(e){case 1:this.form.icon="";break}},submitForm:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$refs["form"].validate(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){var n,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=11;break}return t.form.type=1,t.form.storeId=t.storeId,e.next=5,Object(s["O"])(t.form);case 5:n=e.sent,o=n.msg,t.$baseMessage(o,"success"),t.$router.go(-1),e.next=12;break;case 11:return e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})))()}}},d=f,m=r("2877"),p=Object(m["a"])(d,n,o,!1,null,null,null);e["default"]=p.exports},"3bbe":function(t,e,r){var n=r("861d");t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},7156:function(t,e,r){var n=r("861d"),o=r("d2bb");t.exports=function(t,e,r){var i,a;return o&&"function"==typeof(i=e.constructor)&&i!==r&&n(a=i.prototype)&&a!==r.prototype&&o(t,a),t}},a434:function(t,e,r){"use strict";var n=r("23e7"),o=r("23cb"),i=r("a691"),a=r("50c4"),s=r("7b0b"),c=r("65f0"),u=r("8418"),l=r("1dde"),f=r("ae40"),d=l("splice"),m=f("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,g=Math.min,h=9007199254740991,b="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!d||!m},{splice:function(t,e){var r,n,l,f,d,m,v=s(this),_=a(v.length),y=o(t,_),w=arguments.length;if(0===w?r=n=0:1===w?(r=0,n=_-y):(r=w-2,n=g(p(i(e),0),_-y)),_+r-n>h)throw TypeError(b);for(l=c(v,n),f=0;f<n;f++)d=y+f,d in v&&u(l,f,v[d]);if(l.length=n,r<n){for(f=y;f<_-n;f++)d=f+n,m=f+r,d in v?v[m]=v[d]:delete v[m];for(f=_;f>_-n+r;f--)delete v[f-1]}else if(r>n)for(f=_-n;f>y;f--)d=f+n-1,m=f+r-1,d in v?v[m]=v[d]:delete v[m];for(f=0;f<r;f++)v[f+y]=arguments[f+2];return v.length=_-n+r,l}})},a9e3:function(t,e,r){"use strict";var n=r("83ab"),o=r("da84"),i=r("94ca"),a=r("6eeb"),s=r("5135"),c=r("c6b6"),u=r("7156"),l=r("c04e"),f=r("d039"),d=r("7c73"),m=r("241c").f,p=r("06cf").f,g=r("9bf2").f,h=r("58a8").trim,b="Number",v=o[b],_=v.prototype,y=c(d(_))==b,w=function(t){var e,r,n,o,i,a,s,c,u=l(t,!1);if("string"==typeof u&&u.length>2)if(u=h(u),e=u.charCodeAt(0),43===e||45===e){if(r=u.charCodeAt(2),88===r||120===r)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+u}for(i=u.slice(2),a=i.length,s=0;s<a;s++)if(c=i.charCodeAt(s),c<48||c>o)return NaN;return parseInt(i,n)}return+u};if(i(b,!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var I,x=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof x&&(y?f((function(){_.valueOf.call(r)})):c(r)!=b)?u(new v(w(e)),r,x):w(e)},M=n?m(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),N=0;M.length>N;N++)s(v,I=M[N])&&!s(x,I)&&g(x,I,p(v,I));x.prototype=_,_.constructor=x,a(o,b,x)}},bf19:function(t,e,r){"use strict";var n=r("23e7");n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},d2bb:function(t,e,r){var n=r("825a"),o=r("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(r,[]),e=r instanceof Array}catch(i){}return function(r,i){return n(r),o(i),e?t.call(r,i):r.__proto__=i,r}}():void 0)},ed08:function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return o})),r.d(e,"c",(function(){return i}));r("a9e3"),r("ac1f"),r("5319"),r("bf19");function n(t){var e=new Date(t).toJSON(),r=new Date(+new Date(e)+288e5).toISOString().replace(/T/g," ").replace(/\.[\d]{3}Z/,"");return r}function o(t){var e=new Date(t),r=e.getFullYear(),n=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,o=e.getDate()<10?"0"+e.getDate():e.getDate(),i=e.getHours()<10?"0"+e.getHours():e.getHours(),a=e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes(),s=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds();return r+"-"+n+"-"+o+" "+i+":"+a+":"+s}function i(t){var e=new Date(1e3*Number(t)),r=e.getFullYear()+"-",n=(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-",o=(e.getDate()<10?"0"+e.getDate():e.getDate())+" ",i=(e.getHours()<10?"0"+e.getHours():e.getHours())+":",a=(e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes())+":",s=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds(),c=r+n+o+i+a+s;return c}}}]); |