chunk-8b2f269c.b4ace073.js 23 KB
Newer Older
wanli's avatar
wanli committed
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8b2f269c"],{"0256":function(t,e,n){!function(e,n){t.exports=n()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var r=n(2);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(3)),a={isObject:function(t){return"[object Object]"===Object.prototype.toString.call(t)},isArray:function(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)},isDate:function(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)},isNumber:function(t){return t instanceof Number||"[object Number]"===Object.prototype.toString.call(t)},isString:function(t){return t instanceof String||"[object String]"===Object.prototype.toString.call(t)},isBoolean:function(t){return"boolean"==typeof t},isFunction:function(t){return"function"==typeof t},isNull:function(t){return null==t},isPlainObject:function(t){if(t&&"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object&&!hasOwnProperty.call(t,"constructor")){var e;for(e in t);return void 0===e||hasOwnProperty.call(t,e)}return!1},extend:function(){var t,e,n,r,a,i,u=arguments[0]||{},c=1,s=arguments.length,l=!1;for("boolean"==typeof u&&(l=u,u=arguments[1]||{},c=2),"object"===(0,o.default)(u)||this.isFunction(u)||(u={}),s===c&&(u=this,--c);c<s;c++)if(null!=(t=arguments[c]))for(e in t)(n=u[e])!==(r=t[e])&&(l&&r&&(this.isPlainObject(r)||(a=this.isArray(r)))?(a?(a=!1,i=n&&this.isArray(n)?n:[]):i=n&&this.isPlainObject(n)?n:{},u[e]=this.extend(l,i,r)):void 0!==r&&(u[e]=r));return u},freeze:function(t){var e=this,n=this;return Object.freeze(t),Object.keys(t).forEach((function(r,o){n.isObject(t[r])&&e.freeze(t[r])})),t},copy:function(t){var e=null;if(this.isObject(t))for(var n in e={},t)e[n]=this.copy(t[n]);else if(this.isArray(t)){e=[];var r=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(r=(i=u.next()).done);r=!0){var c=i.value;e.push(this.copy(c))}}catch(t){o=!0,a=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw a}}}else e=t;return e},getKeyValue:function(t,e){if(!this.isObject(t))return null;var n=null;if(this.isArray(e)?n=e:this.isString(e)&&(n=e.split(".")),null==n||0==n.length)return null;var r=null,o=n.shift(),a=o.match(new RegExp("^(\\w+)\\[(\\d+)\\]$"));if(a){o=a[1];var i=a[2];r=t[o],this.isArray(r)&&r.length>i&&(r=r[i])}else r=t[o];return n.length>0?this.getKeyValue(r,n):r},setKeyValue:function(t,e,n,r){if(!this.isObject(t))return!1;var o=null;if(this.isArray(e)?o=e:this.isString(e)&&(o=e.split("."),r=t),null==o||0==o.length)return!1;var a=null,i=0,u=o.shift(),c=u.match(new RegExp("^(\\w+)\\[(\\d+)\\]$"));if(c){if(u=c[1],i=c[2],a=t[u],this.isArray(a)&&a.length>i){if(o.length>0)return this.setKeyValue(a[i],o,n,r);a[i]=n}}else{if(o.length>0)return this.setKeyValue(t[u],o,n,r);t[u]=n}return r},toArray:function(t,e,n){var r="";if(!this.isObject(t))return[];this.isString(n)&&(r=n);var o=[];for(var a in t){var i=t[a],u={};this.isObject(i)?u=i:u[r]=i,e&&(u[e]=a),o.push(u)}return o},toObject:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={},o=0;o<t.length;o++){var a=t[o];this.isObject(a)?"count"==e?r[o]=a:(r[a[e]]=a,n&&(r[a[e]].count=o)):r[a]=a}return r},saveLocal:function(t,e){return!!(window.localStorage&&JSON&&t)&&("object"==(0,o.default)(e)&&(e=JSON.stringify(e)),window.localStorage.setItem(t,e),!0)},getLocal:function(t,e){if(window.localStorage&&JSON&&t){var n=window.localStorage.getItem(t);if(!e||"json"!=e||this.isNull(n))return n;try{return JSON.parse(n)}catch(t){return console.error("取数转换json错误".concat(t)),""}}return null},getLocal2Json:function(t){return this.getLocal(t,"json")},removeLocal:function(t){return window.localStorage&&JSON&&t&&window.localStorage.removeItem(t),null},saveCookie:function(t,e,n,r,a){var i=!!navigator.cookieEnabled;if(t&&i){var u;r=r||"/","object"==(0,o.default)(e)&&(e=JSON.stringify(e)),a?(u=new Date).setTime(u.getTime()+1e3*a):u=new Date("9998-01-01");var c="".concat(t,"=").concat(escape(e)).concat(a?";expires=".concat(u.toGMTString()):"",";path=").concat(r,";");return n&&(c+="domain=".concat(n,";")),document.cookie=c,!0}return!1},getCookie:function(t){var e=!!navigator.cookieEnabled;if(t&&e){var n=document.cookie.match(new RegExp("(^| )".concat(t,"=([^;]*)(;|$)")));if(null!==n)return unescape(n[2])}return null},clearCookie:function(t,e){var n=document.cookie.match(/[^ =;]+(?=\=)/g);if(e=e||"/",n)for(var r=n.length;r--;){var o="".concat(n[r],"=0;expires=").concat(new Date(0).toUTCString(),";path=").concat(e,";");t&&(o+="domain=".concat(t,";")),document.cookie=o}},removeCookie:function(t,e,n){var r=!!navigator.cookieEnabled;if(t&&r){n=n||"/";var o="".concat(t,"=0;expires=").concat(new Date(0).toUTCString(),";path=").concat(n,";");return e&&(o+="domain=".concat(e,";")),document.cookie=o,!0}return!1},dictMapping:function(t){var e=this,n=t.value,r=t.dict,o=t.connector,a=t.keyField,i=void 0===a?"key":a,u=t.titleField,c=void 0===u?"value":u;return!r||this.isNull(n)?"":(o&&(n=n.split(o)),!this.isNull(n)&&""!==n&&r&&(this.isArray(n)||(n=[n])),n.length<=0?"":(this.isArray(r)&&(r=this.toObject(r,i)),n.map((function(t){if(e.isObject(t))return t[c];var n=r[t];return e.isObject(n)?n[c]:n})).filter((function(t){return t&&""!==t})).join(", ")))},uuid:function(){var t=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},padLeft:function(t,e){var n="00000"+t;return n.substr(n.length-e)},toggleValue:function(t,e){if(!this.isArray(t))return[e];var n=t.filter((function(t){return t==e}));n.length>0?t.splice(t.indexOf(n[0]),1):t.push(e)},toSimpleArray:function(t,e){var n=[];if(this.isObject(t))for(var r=0,o=Object.keys(t);r<o.length;r++){var a=o[r];n.push(t[a][e])}if(this.isArray(t)){var i=!0,u=!1,c=void 0;try{for(var s,l=t[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var d=s.value;n.push(d[e])}}catch(t){u=!0,c=t}finally{try{i||null==l.return||l.return()}finally{if(u)throw c}}}return n},getURLParam:function(t,e){return decodeURIComponent((new RegExp("[?|&]".concat(t,"=")+"([^&;]+?)(&|#|;|$)").exec(e||location.search)||[!0,""])[1].replace(/\+/g,"%20"))||null},getAuthor:function(){var t=this.getURLParam("author",window.location.search)||this.getLocal("window_author");return t&&this.saveLocal("window_author",t),t},add:function(t,e){var n=t.toString(),r=e.toString(),o=n.split("."),a=r.split("."),i=2==o.length?o[1]:"",u=2==a.length?a[1]:"",c=Math.max(i.length,u.length),s=Math.pow(10,c);return Number(((n*s+r*s)/s).toFixed(c))},sub:function(t,e){return this.add(t,-e)},mul:function(t,e){var n=0,r=t.toString(),o=e.toString();try{n+=r.split(".")[1].length}catch(t){}try{n+=o.split(".")[1].length}catch(t){}return Number(r.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,n)},div:function(t,e){var n=0,r=0;try{n=t.toString().split(".")[1].length}catch(t){}try{r=e.toString().split(".")[1].length}catch(t){}var o=Number(t.toString().replace(".","")),a=Number(e.toString().replace(".",""));return this.mul(o/a,Math.pow(10,r-n))}};a.valueForKeypath=a.getKeyValue,a.setValueForKeypath=a.setKeyValue;var i=a;e.default=i},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r}]).default}))},"308b":function(t,e,n){},"365c":function(t,e,n){"use strict";n.d(e,"Q",(function(){return o})),n.d(e,"z",(function(){return a})),n.d(e,"l",(function(){return i})),n.d(e,"y",(function(){return u})),n.d(e,"O",(function(){return c})),n.d(e,"P",(function(){return s})),n.d(e,"eb",(function(){return l})),n.d(e,"fb",(function(){return d})),n.d(e,"c",(function(){return f})),n.d(e,"o",(function(){return p})),n.d(e,"D",(function(){return m})),n.d(e,"T",(function(){return h})),n.d(e,"E",(function(){return b})),n.d(e,"d",(function(){return g})),n.d(e,"U",(function(){return v})),n.d(e,"p",(function(){return y})),n.d(e,"J",(function(){return j})),n.d(e,"K",(function(){return O})),n.d(e,"bb",(function(){return x})),n.d(e,"u",(function(){return k})),n.d(e,"L",(function(){return w})),n.d(e,"j",(function(){return S})),n.d(e,"cb",(function(){return _})),n.d(e,"w",(function(){return D})),n.d(e,"I",(function(){return C})),n.d(e,"i",(function(){return P})),n.d(e,"Z",(function(){return T})),n.d(e,"t",(function(){return A})),n.d(e,"g",(function(){return z})),n.d(e,"A",(function(){return N})),n.d(e,"f",(function(){return V})),n.d(e,"W",(function(){return L})),n.d(e,"r",(function(){return $})),n.d(e,"G",(function(){return M})),n.d(e,"h",(function(){return U})),n.d(e,"s",(function(){return F})),n.d(e,"H",(function(){return E})),n.d(e,"a",(function(){return R})),n.d(e,"m",(function(){return J})),n.d(e,"B",(function(){return K})),n.d(e,"v",(function(){return I})),n.d(e,"R",(function(){return q})),n.d(e,"X",(function(){return B})),n.d(e,"Y",(function(){return G})),n.d(e,"ab",(function(){return H})),n.d(e,"C",(function(){return Y})),n.d(e,"b",(function(){return Q})),n.d(e,"S",(function(){return W})),n.d(e,"n",(function(){return X})),n.d(e,"M",(function(){return Z})),n.d(e,"N",(function(){return tt})),n.d(e,"k",(function(){return et})),n.d(e,"db",(function(){return nt})),n.d(e,"x",(function(){return rt})),n.d(e,"F",(function(){return ot})),n.d(e,"e",(function(){return at})),n.d(e,"V",(function(){return it})),n.d(e,"q",(function(){return ut}));var r=n("b775");function o(t){return Object(r["a"])({url:"/api/v1/kxpms/workbench/query",method:"post",data:t})}function a(t){return Object(r["a"])({url:"/api/v1/kxpms/login/login",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/api/v1/kxpms/user/add",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/api/v1/kxpms/user/delete/".concat(t),method:"post"})}function c(t){return Object(r["a"])({url:"/api/v1/kxpms/user/get",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/api/v1/kxpms/user/list",method:"post",data:t})}function l(t,e){return Object(r["a"])({url:"/api/v1/kxpms/user/update/".concat(t),method:"post",data:e})}function d(t){return Object(r["a"])({url:"/api/v1/kxpms/updatePassword",method:"post",data:t})}function f(t){return Object(r["a"])({url:"/api/v1/kxpms/depot/add",method:"post",data:t})}function p(t){return Object(r["a"])({url:"/api/v1/kxpms/depot/delete/".concat(t),method:"post"})}function m(t){return Object(r["a"])({url:"/api/v1/kxpms/depot/list",method:"post",data:t})}function h(t,e){return Object(r["a"])({url:"/api/v1/kxpms/depot/update/".concat(t),method:"post",data:e})}function b(t){return Object(r["a"])({url:"/api/v1/kxpms/dict/list",method:"post",data:t})}function g(t){return Object(r["a"])({url:"/api/v1/kxpms/dict/add",method:"post",data:t})}function v(t,e){return Object(r["a"])({url:"/api/v1/kxpms/dict/update/".concat(t),method:"post",data:e})}function y(t){return Object(r["a"])({url:"/api/v1/kxpms/dict/delete/".concat(t),method:"post"})}function j(t){return Object(r["a"])({url:"/api/v1/kxpms/project/get",method:"post",data:t})}function O(t){return Object(r["a"])({url:"/api/v1/kxpms/project/list",method:"post",data:t})}function x(t,e){return Object(r["a"])({url:"/api/v1/kxpms/project/update/".concat(t),method:"post",data:e})}function k(t){return Object(r["a"])({url:"/api/v1/kxpms/project/delete/".concat(t),method:"post"})}function w(t){return Object(r["a"])({url:"/api/v1/kxpms/role/list",method:"post",data:t})}function S(t){return Object(r["a"])({url:"/api/v1/kxpms/role/add",method:"post",data:t})}function _(t,e){return Object(r["a"])({url:"/api/v1/kxpms/role/update/".concat(t),method:"post",data:e})}function D(t){return Object(r["a"])({url:"/api/v1/kxpms/role/delete/".concat(t),method:"delete"})}function C(t){return Object(r["a"])({url:"/api/v1/kxpms/permission/list",method:"post",data:t})}function P(t){return Object(r["a"])({url:"/api/v1/kxpms/permission/add",method:"post",data:t})}function T(t,e){return Object(r["a"])({url:"/api/v1/kxpms/permission/update/".concat(t),method:"post",data:e})}function A(t){return Object(r["a"])({url:"/api/v1/kxpms/permission/delete/".concat(t),method:"post"})}function z(t){return Object(r["a"])({url:"/api/v1/kxpms/system/addProject",method:"post",data:t})}function N(t){return Object(r["a"])({url:"/api/v1/kxpms/system/exportProject",method:"post",data:t})}function V(t){return Object(r["a"])({url:"/api/v1/kxpms/flow/add",method:"post",data:t})}function L(t,e){return Object(r["a"])({url:"/api/v1/kxpms/flow/update/".concat(t),method:"post",data:e})}function $(t){return Object(r["a"])({url:"/api/v1/kxpms/flow/delete/".concat(t),method:"delete"})}function M(t){return Object(r["a"])({url:"/api/v1/kxpms/system/getFlowList",method:"post",data:t})}function U(t){return Object(r["a"])({url:"/api/v1/kxpms/payback/add",method:"post",data:t})}function F(t){return Object(r["a"])({url:"/api/v1/kxpms/payback/delete/".concat(t),method:"post"})}function E(t){return Object(r["a"])({url:"/api/v1/kxpms/system/getPaybackList",method:"post",data:t})}function R(t){return Object(r["a"])({url:"/api/v1/kxpms/annex/add",method:"post",data:t})}function J(t){return Object(r["a"])({url:"/api/v1/kxpms/annex/delete/".concat(t),method:"post"})}function K(t){return Object(r["a"])({url:"/api/v1/kxpms/annex/list",method:"post",data:t})}function I(t){return Object(r["a"])({url:"/api/v1/kxpms/system/deleteProjectUser",method:"post",data:t})}function q(t){return Object(r["a"])({url:"/api/v1/kxpms/system/modifyProjectUser",method:"post",data:t})}function B(t){return Object(r["a"])({url:"/api/v1/kxpms/system/updateFlow",method:"post",data:t})}function G(t){return Object(r["a"])({url:"/api/v1/kxpms/system/updatePayback",method:"post",data:t})}function H(t){return Object(r["a"])({url:"/api/v1/kxpms/system/updateProductionPlan",method:"post",data:t})}function Y(t){return Object(r["a"])({url:"/api/v1/kxpms/calendar/list",method:"post",data:t})}function Q(t){return Object(r["a"])({url:"/api/v1/kxpms/calendar/add",method:"post",data:t})}function W(t,e){return Object(r["a"])({url:"/api/v1/kxpms/calendar/update/".concat(t),method:"post",data:e})}function X(t){return Object(r["a"])({url:"/api/v1/kxpms/calendar/delete/".concat(t),method:"post"})}function Z(t){return Object(r["a"])({url:"/api/v1/kxpms/system/getRoleUsers",method:"post",data:t})}function tt(t){return Object(r["a"])({url:"/api/v1/kxpms/summary/list",method:"post",data:t})}function et(t){return Object(r["a"])({url:"/api/v1/kxpms/summary/add",method:"post",data:t})}function nt(t,e){return Object(r["a"])({url:"/api/v1/kxpms/summary/update/".concat(t),method:"post",data:e})}function rt(t){return Object(r["a"])({url:"/api/v1/kxpms/summary/delete/".concat(t),method:"post"})}function ot(t){return Object(r["a"])({url:"/api/v1/kxpms/netdisc/list",method:"post",data:t})}function at(t){return Object(r["a"])({url:"/api/v1/kxpms/netdisc/add",method:"post",data:t})}function it(t,e){return Object(r["a"])({url:"/api/v1/kxpms/netdisc/update/".concat(t),method:"post",data:e})}function ut(t){return Object(r["a"])({url:"/api/v1/kxpms/netdisc/delete",method:"post",data:t})}},9004:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-form",{attrs:{inline:!0,model:t.form,size:"mini"}},[n("el-form-item",{attrs:{label:"部门名称"}},[n("el-select",{attrs:{filterable:"",placeholder:"请输入部门名称"},model:{value:t.form.uuid,callback:function(e){t.$set(t.form,"uuid",e)},expression:"form.uuid"}},t._l(t.depots,(function(t,e){return n("el-option",{key:e,attrs:{label:t.name,value:t.uuid}})})),1)],1),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("查询")])],1),n("el-form-item",[n("el-button",{on:{click:t.onReset}},[t._v("重置")])],1),n("el-form-item",[n("el-button",{attrs:{type:"warning"},on:{click:t.onAdd}},[t._v("添加")])],1)],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.isLoading,expression:"isLoading"}],attrs:{"element-loading-text":"Loading",data:t.list,size:"mini",border:"",stripe:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{prop:"name",label:"部名称",align:"center","min-width":"100"}}),n("el-table-column",{attrs:{prop:"create_at",label:"创建时间",width:"150"}}),n("el-table-column",{attrs:{prop:"create_by.username",label:"创建者",width:"150"}}),n("el-table-column",{attrs:{prop:"update_at",label:"更新时间",width:"150","show-overflow-tooltip":!0}}),n("el-table-column",{attrs:{prop:"update_by.username",label:"更新者",width:"150"}}),n("el-table-column",{attrs:{label:"操作",align:"center",width:"180",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{size:"mini",type:"success"},on:{click:function(n){return t.handleEdit(e.$index,e.row)}}},[t._v("编辑")]),n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(n){return t.handleDelete(e.$index,e.row)}}},[t._v("删除")])]}}])})],1),n("div",{staticClass:"page-wrapper"},[n("el-pagination",{attrs:{"current-page":t.form.pagenum,background:"",small:"","page-size":t.form.pagesize,"pager-count":5,layout:"pager, prev, next, total",total:t.total},on:{"current-change":t.handleCurrentChange,"update:currentPage":function(e){return t.$set(t.form,"pagenum",e)},"update:current-page":function(e){return t.$set(t.form,"pagenum",e)}}})],1),n("el-dialog",{attrs:{title:t.dialogTitle,visible:t.dialogVisible,width:"45%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("el-form",{ref:"post",attrs:{model:t.post,"status-icon":"",rules:t.rules,inline:!0,size:"mini","label-width":"80px"}},[n("el-form-item",{attrs:{label:"部门名称",prop:"name"}},[n("el-input",{attrs:{type:"text",autocomplete:"off"},model:{value:t.post.name,callback:function(e){t.$set(t.post,"name",e)},expression:"post.name"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(e){return t.submitForm("post")}}},[t._v("提交")]),n("el-button",{attrs:{type:"success",size:"mini",plain:""},on:{click:function(e){return t.onReset("post")}}},[t._v("重置")]),n("el-button",{attrs:{size:"mini"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("关闭")])],1)],1)],1)},o=[],a=(n("95e8"),n("82a8"),n("2a39"),n("365c")),i=n("ed08"),u=n("fa7d"),c={data:function(){return{total:0,list:[],depots:[],form:{uuid:null,name:null,pagesize:15,pagenum:1},isLoading:!1,dialogTitle:"",dialogVisible:!1,currentValue:null,currentIndex:null,post:{name:null},rules:{permission:[{type:"string",required:!0,message:"权限名称不能为空",trigger:"blur"}],name:[{type:"string",required:!0,message:"用户名不能为空",trigger:"blur"},{min:1,max:20,message:"字符串长度在 1 到 20 之间",trigger:"blur"}]}}},methods:{fetchData:function(t){var e=this;this.isLoading=!0,Object(a["D"])(Object.assign({pagenum:this.form.pagenum,pagesize:this.form.pagesize},t)).then((function(t){200==t.code&&(e.total=t.count,e.list=t.data.map((function(t){return t.create_at=Object(u["a"])(t.create_at),t.update_at=Object(u["a"])(t.update_at),t})))})).catch((function(t){console.log(t.message)})).finally((function(){e.isLoading=!1}))},fetchSelectData:function(){var t=this;Object(a["D"])({scope_type:"list"}).then((function(e){200==e.code&&(t.roles=e.data)})).catch((function(t){console.log(t.message)}))},handleSizeChange:function(t){this.form.pagesize=t,this.fetchData(Object(i["e"])(this.form))},handleCurrentChange:function(t){this.form.pagenum=t,this.fetchData(Object(i["e"])(this.form))},handleEdit:function(t,e){this.post.name=e.name,this.currentValue=e,this.currentIndex=t,this.dialogTitle="编辑",this.dialogVisible=!0},handleDelete:function(t,e){var n=this;this.$alert("您确定要删除么?删除操作将不可恢复。如需取消操作,请点击右上角关闭按钮。","删除提醒",{confirmButtonText:"确定",callback:function(r){"confirm"==r&&Object(a["o"])(e.uuid).then((function(e){console.log(e),n.fetchData(Object(i["e"])(n.form)),n.$message({type:"success",message:"成功删除第".concat(t,"")})})).catch((function(t){n.$message.error(t.message)}))}})},submitForm:function(t){var e=this;this.$refs[t].validate((function(t){var n=!0;return t?"添加"===e.dialogTitle?Object(a["c"])(e.post).then((function(t){console.log(t),e.fetchData(Object(i["e"])(e.form))})).catch((function(t){e.$message.error(t.message)})):"编辑"===e.dialogTitle&&Object(a["T"])(e.currentValue.uuid,Object(i["a"])(e.post,e.currentValue)).then((function(t){console.log(t),e.fetchData(Object(i["e"])(e.form))})).catch((function(t){e.$message.error(t.message)})):n=!1,e.dialogVisible=!1,n}))},onAdd:function(){this.dialogTitle="添加",this.dialogVisible=!0},onSubmit:function(){this.form.pagenum=1,this.form.pagesize=15,this.fetchData(Object(i["e"])(this.form))},onReset:function(t){this.form.name=null,this.form.pagesize=15,this.form.pagenum=1,this.$refs[t].resetFields(),this.fetchData()}},mounted:function(){},created:function(){this.fetchData(),this.fetchSelectData();var t=JSON.parse(sessionStorage.getItem("user"));t&&"无权限"!=t.role.permission.depots||this.$router.push("/403")}},s=c,l=(n("e13a"),n("5d22")),d=Object(l["a"])(s,r,o,!1,null,"0704539c",null);e["default"]=d.exports},e13a:function(t,e,n){"use strict";n("308b")},fa7d:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));n("5ff7"),n("180d"),n("95e8"),n("2a39"),n("a5bc"),n("cfa8"),n("0482"),n("96f8");var r=n("0256"),o=n.n(r),a=/[\t\r\n\f]/g;o.a.extend({},o.a,{getClass:function(t){return t.getAttribute&&t.getAttribute("class")||""},hasClass:function(t,e){var n;return n=" ".concat(e," "),1===t.nodeType&&" ".concat(this.getClass(t)," ").replace(a," ").indexOf(n)>-1}});function i(t){return t=t.toString(),t[1]?t:"0"+t}function u(t){var e=t.getUTCFullYear(),n=t.getUTCMonth()+1,r=t.getUTCDate(),o=t.getUTCHours(),a=t.getUTCMinutes(),u=t.getUTCSeconds();return[e,n,r,o,a,u].map(i)}function c(t){t instanceof Date||(t=new Date(t)),t=u(t);var e=["-","-"," ",":",":"],n="";return t.forEach((function(t,r){n+=r<5?t+e[r]:t})),n}}}]);