forked from golang/hotime
1 line
9.3 KiB
JavaScript
1 line
9.3 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-33a591b6"],{"0ec4":function(e,t,a){"use strict";a("a345")},"0f45":function(module,__webpack_exports__,__webpack_require__){"use strict";var D_work_hotimejs_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("b85c"),core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("b0c0"),core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es_string_link_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("9911"),core_js_modules_es_string_link_js__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es_string_link_js__WEBPACK_IMPORTED_MODULE_2__),_api_common_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("2934"),_utils_request_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("b775");__webpack_exports__.a={data:function(){return{templateData:{},baseurl:_utils_request_js__WEBPACK_IMPORTED_MODULE_4__.a,form:{},disabledDate:function(e){return e.getTime()>Date.now()},shortcuts:[{text:"今天",value:new Date},{text:"昨天",value:((e=new Date).setTime(e.getTime()-864e5),e)},{text:"一周前",value:((e=new Date).setTime(e.getTime()-6048e5),e)}]};var e},methods:{beforeAvatarUpload:function(e,t){var a=this;return null==e||Object(_api_common_js__WEBPACK_IMPORTED_MODULE_3__.f)(e).then(function(e){a.form[t]=e.result}),!1},onSubmit:function(){var t=this,a=this;this.$confirm("此操作将进行修改操作,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var e=window.Hotime;Object(_api_common_js__WEBPACK_IMPORTED_MODULE_3__.c)(e.data.name+"/"+t.templateData.name+"/"+t.$route.query.id,a.form).then(function(e){0==e.status?(a.$message({type:"success",message:"修改成功!"}),a.$router.back(-1)):a.$message({type:"warn",message:e.error.msg})})})},routeInit:function routeInit(){var that=this,Hotime=window.Hotime;if(this.templateData=Hotime.mapData[this.$route.path.substring(0,this.$route.path.lastIndexOf("/edit"))],null!=this.templateData){if(null!=this.templateData.columns){var _iterator=Object(D_work_hotimejs_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_0__.a)(this.templateData.columns),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var item=_step.value;null==item.value&&(item.value=item.name)}}catch(err){_iterator.e(err)}finally{_iterator.f()}}Object(_api_common_js__WEBPACK_IMPORTED_MODULE_3__.d)(Hotime.data.name+"/"+this.templateData.name+"/"+this.$route.query.id).then(function(data){if(null!=that.templateData.columns){var _iterator2=Object(D_work_hotimejs_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_0__.a)(that.templateData.columns),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _item=_step2.value;if(null!=_item.link){try{data.result[_item.value]=eval("data.result."+_item.value)}catch(e){}break}}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}for(var k in data.result)that.form[k]=data.result[k]+""})}}},watch:{},mounted:function(){this.routeInit()}}},"215d":function(e,t,a){"use strict";a("a877")},2934:function(e,t,a){"use strict";a.d(t,"e",function(){return o}),a.d(t,"d",function(){return u}),a.d(t,"b",function(){return l}),a.d(t,"c",function(){return _}),a.d(t,"a",function(){return c}),a.d(t,"f",function(){return i});var t=a("b0c0"),r=a("b775"),t=a("4328"),n=a.n(t);function o(e,t){return Object(r.b)({url:e,method:"GET",params:t})}function u(e,t){return Object(r.b)({url:e,method:"GET",params:t})}function l(e,t){return Object(r.b)({url:e,method:"DELETE",data:n.a.stringify(t)})}function _(e,t){return Object(r.b)({url:e,method:"PUT",data:n.a.stringify(t)})}function c(e,t){return Object(r.b)({url:e,method:"POST",data:n.a.stringify(t)})}function i(e){var t=new FormData;return t.append("file",e,e.name),Object(r.b)({url:"file",headers:{"Content-Type":"multipart/form
|