employeeControl.js 3.5 KB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_my/employeeControl/employeeControl"],{"0cfd":function(e,n,o){"use strict";var t=o("5f20"),u=o.n(t);u.a},"13b0":function(e,n,o){"use strict";o.d(n,"b",(function(){return u})),o.d(n,"c",(function(){return i})),o.d(n,"a",(function(){return t}));var t={uIcon:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(o.bind(null,"cfe0"))},uPopup:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-popup/u-popup")]).then(o.bind(null,"2387"))},"u-Form":function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u--form/u--form")]).then(o.bind(null,"6c79"))},uFormItem:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-form-item/u-form-item")]).then(o.bind(null,"c7a5"))},uInput:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-input/u-input")]).then(o.bind(null,"8a3a"))},uButton:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-button/u-button")]).then(o.bind(null,"ca10"))}},u=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n){e.show=!1},e.e1=function(n){e.show=!1},e.e2=function(n){e.show=!1})},i=[]},"5f20":function(e,n,o){},8713:function(e,n,o){"use strict";o.r(n);var t=o("13b0"),u=o("c885");for(var i in u)["default"].indexOf(i)<0&&function(e){o.d(n,e,(function(){return u[e]}))}(i);o("0cfd");var r=o("828b"),s=Object(r["a"])(u["default"],t["b"],t["c"],!1,null,"2567c3f0",null,!1,t["a"],void 0);n["default"]=s.exports},a335:function(e,n,o){"use strict";(function(e,n){var t=o("47a9");o("c5a3");t(o("3240"));var u=t(o("8713"));e.__webpack_require_UNI_MP_PLUGIN__=o,n(u.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},c885:function(e,n,o){"use strict";o.r(n);var t=o("e84f"),u=o.n(t);for(var i in t)["default"].indexOf(i)<0&&function(e){o.d(n,e,(function(){return t[e]}))}(i);n["default"]=u.a},e84f:function(e,n,o){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o={data:function(){return{isEdit:!1,show:!1,form:{name:"",phone:"",password:""},employeeList:[{name:"张三",phone:"15812341234",password:"123456"},{name:"李四",phone:"13612341234",password:"123456"},{name:"王五",phone:"19117263465",password:"123456"},{name:"赵六六",phone:"13712341234",password:"123456"}],rules:{name:[{required:!0,message:"请输入员工姓名",trigger:["blur","change"]}],phone:[{required:!0,message:"请输入手机号",trigger:["change"]},{validator:function(n,o,t){return e.$u.test.mobile(o)},message:"手机号码不正确",trigger:["change","blur"]}],password:[{required:!0,message:"请输入密码",trigger:["change"]},{pattern:/^[0-9a-zA-Z]*$/g,transform:function(e){return String(e)},message:"只能包含字母或数字",trigger:["change"]},{min:6,max:8,message:"长度在6-8个字符之间",trigger:["change"]}]}}},onReady:function(){this.$refs.uForm.setRules(this.rules)},methods:{addEmployee:function(){this.form={name:"",phone:"",password:""},this.isEdit=!1,this.show=!0},editEmployee:function(e){this.isEdit=!0,this.form=e,this.show=!0},submit:function(){var n=this;this.$refs.uForm.validate().then((function(o){n.isEdit?e.$u.toast("编辑"):e.$u.toast("添加")})).catch((function(n){e.$u.toast("校验失败")}))}}};n.default=o}).call(this,o("df3c")["default"])}},[["a335","common/runtime","common/vendor"]]]);