chunk-04ab18b0.81b6244d.js 10 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-04ab18b0","chunk-2d0df437"],{3335:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:1200,visible:e.visible,confirmLoading:e.confirmLoading,cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-card",{staticClass:"card",attrs:{bordered:!1}},[t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{label:"任务名"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["task.name",{rules:[{required:!0,message:"请输入任务名称",whitespace:!0}]}],expression:"[ 'task.name', {rules: [{ required: true, message: '请输入任务名称', whitespace: true}]} ]"}],attrs:{placeholder:"请输入任务名称"}})],1)],1),t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{label:"任务描述"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["task.description",{rules:[{required:!0,message:"请输入任务描述",whitespace:!0}]}],expression:"['task.description', {rules: [{ required: true, message: '请输入任务描述', whitespace: true}]} ]"}],attrs:{placeholder:"请输入任务描述"}})],1)],1),t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{label:"执行人"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["task.executor",{rules:[{required:!0,message:"请选择执行人"}]}],expression:"['task.executor',{rules: [{ required: true, message: '请选择执行人'}]} ]"}],attrs:{placeholder:"请选择执行人"}},[t("a-select-option",{attrs:{value:"黄丽丽"}},[e._v("黄丽丽")]),t("a-select-option",{attrs:{value:"李大刀"}},[e._v("李大刀")])],1)],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{label:"责任人"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["task.manager",{rules:[{required:!0,message:"请选择责任人"}]}],expression:"['task.manager', {rules: [{ required: true, message: '请选择责任人'}]} ]"}],attrs:{placeholder:"请选择责任人"}},[t("a-select-option",{attrs:{value:"王伟"}},[e._v("王伟")]),t("a-select-option",{attrs:{value:"李红军"}},[e._v("李红军")])],1)],1)],1),t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{label:"提醒时间"}},[t("a-time-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["task.time",{rules:[{required:!0,message:"请选择提醒时间"}]}],expression:"['task.time', {rules: [{ required: true, message: '请选择提醒时间'}]} ]"}],staticStyle:{width:"100%"}})],1)],1),t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{label:"任务类型"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["task.type",{rules:[{required:!0,message:"请选择任务类型"}]}],expression:"['task.type', {rules: [{ required: true, message: '请选择任务类型'}]} ]"}],attrs:{placeholder:"请选择任务类型"}},[t("a-select-option",{attrs:{value:"定时执行"}},[e._v("定时执行")]),t("a-select-option",{attrs:{value:"周期执行"}},[e._v("周期执行")])],1)],1)],1)],1)],1),t("a-tabs",{attrs:{defaultActiveKey:"1"}},[t("a-tab-pane",{key:"1",attrs:{tab:"Tab 1"}},[t("a-table",{attrs:{columns:e.columns,dataSource:e.data,pagination:!1,size:"middle"},scopedSlots:e._u([e._l(["name","workId","department"],(function(r,a){return{key:r,fn:function(n,o,i){return[t("a-tooltip",{attrs:{title:"必填项",defaultVisible:!1,overlayStyle:"{ color: 'red' }"}},[o.editable?t("a-input",{key:r,staticStyle:{margin:"-5px 0"},attrs:{value:n,placeholder:e.columns[a].title},on:{change:function(t){return e.handlerRowChange(t.target.value,o.key,r)}}}):[e._v(e._s(n))]],2)]}}})),{key:"operation",fn:function(r,a,n){return[a.editable?[a.isNew?t("span",[t("a",{on:{click:function(t){return e.saveRow(a.key)}}},[e._v("添加")]),t("a-divider",{attrs:{type:"vertical"}}),t("a-popconfirm",{attrs:{title:"是否要删除此行?"},on:{confirm:function(t){return e.removeRow(a.key)}}},[t("a",[e._v("删除")])])],1):t("span",[t("a",{on:{click:function(t){return e.saveRow(a.key)}}},[e._v("保存")]),t("a-divider",{attrs:{type:"vertical"}}),t("a",{on:{click:function(t){return e.cancelEditRow(a.key)}}},[e._v("取消")])],1)]:t("span",[t("a",{on:{click:function(t){return e.editRow(a.key)}}},[e._v("编辑")]),t("a-divider",{attrs:{type:"vertical"}}),t("a-popconfirm",{attrs:{title:"是否要删除此行?"},on:{confirm:function(t){return e.removeRow(a.key)}}},[t("a",[e._v("删除")])])],1)]}}],null,!0)}),t("a-button",{staticStyle:{width:"100%","margin-top":"16px","margin-bottom":"8px"},attrs:{type:"dashed",icon:"plus"},on:{click:e.newRow}},[e._v("新增成员")])],1),t("a-tab-pane",{key:"2",attrs:{tab:"Tab 2",forceRender:""}},[e._v("\n Content of Tab Pane 2\n ")]),t("a-tab-pane",{key:"3",attrs:{tab:"Tab 3"}},[e._v("Content of Tab Pane 3")])],1)],1)],1)],1)},n=[],o=r("0fea"),i=r("88bc"),s=r.n(i),l=r("c1df"),c=r.n(l);function u(e){return p(e)||f(e)||m(e)||d()}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){if(e){if("string"===typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function f(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function p(e){if(Array.isArray(e))return v(e)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var h={name:"JeecgDemoTabsModal",data:function(){return{title:"操作",visible:!1,model:{},columns:[{title:"成员姓名",dataIndex:"name",key:"name",width:"20%",scopedSlots:{customRender:"name"}},{title:"工号",dataIndex:"workId",key:"workId",width:"20%",scopedSlots:{customRender:"workId"}},{title:"所属部门",dataIndex:"department",key:"department",width:"40%",scopedSlots:{customRender:"department"}},{title:"操作",key:"action",scopedSlots:{customRender:"operation"}}],data:[{key:"1",name:"小明",workId:"001",editable:!1,department:"行政部"},{key:"2",name:"李莉",workId:"002",editable:!1,department:"IT部"},{key:"3",name:"王小帅",workId:"003",editable:!1,department:"财务部"}],confirmLoading:!1,form:this.$form.createForm(this),validatorRules:{},url:{add:"/test/jeecgDemo/add",edit:"/test/jeecgDemo/edit"}}},created:function(){},methods:{add:function(){this.edit({})},edit:function(e){var t=this;this.form.resetFields(),this.model=Object.assign({},e),this.visible=!0,this.$nextTick((function(){t.form.setFieldsValue(s()(t.model,"name","keyWord","sex","age","email","content")),t.form.setFieldsValue({punchTime:t.model.punchTime?c()(t.model.punchTime,"YYYY-MM-DD HH:mm:ss"):null}),t.form.setFieldsValue({birthday:t.model.birthday?c()(t.model.birthday):null})}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this,t=this;this.form.validateFields((function(r,a){if(!r){t.confirmLoading=!0;var n="",i="";e.model.id?(n+=e.url.edit,i="put"):(n+=e.url.add,i="post");var s=Object.assign(e.model,a);s.punchTime=s.punchTime?s.punchTime.format("YYYY-MM-DD HH:mm:ss"):null,s.birthday=s.birthday?s.birthday.format():null,Object(o["i"])(n,s,i).then((function(e){e.success?(t.$message.success(e.message),t.$emit("ok")):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.close()}))}}))},handleCancel:function(){this.close()},newRow:function(){var e=Math.round((new Date).getTime()).toString();this.data.push({key:e,name:"",workId:"",department:"",editable:!0,isNew:!0})},removeRow:function(e){var t=this.data.filter((function(t){return t.key!==e}));this.data=t},saveRow:function(e){var t=this.data.filter((function(t){return t.key===e}))[0];t.editable=!1,t.isNew=!1},handlerRowChange:function(e,t,r){var a=u(this.data),n=a.filter((function(e){return t===e.key}))[0];n&&(n[r]=e,this.data=a)},editRow:function(e){var t=this.data.filter((function(t){return t.key===e}))[0];t.editable=!t.editable},cancelEditRow:function(e){var t=this.data.filter((function(t){return t.key===e}))[0];t.editable=!1}}},b=h,y=(r("61de"),r("2877")),g=Object(y["a"])(b,a,n,!1,null,"e1837066",null);t["default"]=g.exports},"5b9a":function(e,t,r){},"61de":function(e,t,r){"use strict";r("5b9a")},"88bc":function(e,t,r){(function(t){var r=1/0,a=9007199254740991,n="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",s="[object Symbol]",l="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")();function d(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function m(e,t){var r=-1,a=e?e.length:0,n=Array(a);while(++r<a)n[r]=t(e[r],r,e);return n}function f(e,t){var r=-1,a=t.length,n=e.length;while(++r<a)e[n+r]=t[r];return e}var p=Object.prototype,v=p.hasOwnProperty,h=p.toString,b=u.Symbol,y=p.propertyIsEnumerable,g=b?b.isConcatSpreadable:void 0,w=Math.max;function k(e,t,r,a,n){var o=-1,i=e.length;r||(r=R),n||(n=[]);while(++o<i){var s=e[o];t>0&&r(s)?t>1?k(s,t-1,r,a,n):f(n,s):a||(n[n.length]=s)}return n}function j(e,t){return e=Object(e),_(e,t,(function(t,r){return r in e}))}function _(e,t,r){var a=-1,n=t.length,o={};while(++a<n){var i=t[a],s=e[i];r(s,i)&&(o[i]=s)}return o}function x(e,t){return t=w(void 0===t?e.length-1:t,0),function(){var r=arguments,a=-1,n=w(r.length-t,0),o=Array(n);while(++a<n)o[a]=r[t+a];a=-1;var i=Array(t+1);while(++a<t)i[a]=r[a];return i[t]=o,d(e,this,i)}}function R(e){return I(e)||T(e)||!!(g&&e&&e[g])}function S(e){if("string"==typeof e||D(e))return e;var t=e+"";return"0"==t&&1/e==-r?"-0":t}function T(e){return A(e)&&v.call(e,"callee")&&(!y.call(e,"callee")||h.call(e)==n)}var I=Array.isArray;function O(e){return null!=e&&C(e.length)&&!q(e)}function A(e){return N(e)&&O(e)}function q(e){var t=F(e)?h.call(e):"";return t==o||t==i}function C(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function N(e){return!!e&&"object"==typeof e}function D(e){return"symbol"==typeof e||N(e)&&h.call(e)==s}var M=x((function(e,t){return null==e?{}:j(e,m(k(t,1),S))}));e.exports=M}).call(this,r("c8ba"))}}]);