1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-958e7c32"],{"0cc8":function(e,t,r){"use strict";r("68ef"),r("ae9e")},"129f":function(e,t,r){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}},"408a":function(e,t,r){"use strict";var n=r("e330");e.exports=n(1..valueOf)},4434:function(e,t,r){"use strict";r("7db0"),r("c740"),r("d81d"),r("d3b7");var n=function(){var e=this,t=e._self._c;return t("span",[e.dropDown?t("span",{staticClass:"px-2",on:{click:e.showSelect}},[e._v(" "+e._s(e.columns.find((function(t){return t[e.valueKey]==e.value}))?e.columns.find((function(t){return t[e.valueKey]==e.value}))[e.labelKey]:"")+" "),t("van-icon",{attrs:{name:"arrow-down"}})],1):t("van-field",{attrs:{readonly:"",clickable:e.edit,border:e.border,label:e.label,value:e.columns.find((function(t){return t[e.valueKey]==e.value}))?e.columns.find((function(t){return t[e.valueKey]==e.value}))[e.labelKey]:"",placeholder:e.placeholder,disabled:e.disabled,rules:e.rules},on:{click:e.showSelect}}),t("van-popup",{attrs:{round:"",position:"bottom"},model:{value:e.showPicker,callback:function(t){e.showPicker=t},expression:"showPicker"}},[t("van-picker",{attrs:{"show-toolbar":"",title:e.label,columns:e.columns.map((function(t){return{text:t[e.labelKey],value:t[e.valueKey]}})),"default-index":e.columns.find((function(t){return t[e.valueKey]==e.value}))?e.columns.findIndex((function(t){return t[e.valueKey]==e.value})):0},on:{cancel:function(t){e.showPicker=!1},confirm:e.onConfirm}})],1)],1)},i=[],a={name:"Select",components:{},props:{value:{default:""},label:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1},data:{type:String,default:""},edit:{type:Boolean,default:!0},rules:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},labelKey:{default:"name"},valueKey:{default:"id"},dropDown:{type:Boolean,default:!1}},data:function(){return{showPicker:!1}},methods:{showSelect:function(){this.edit&&(this.showPicker=!0)},onConfirm:function(e){e=e.value;this.$emit("input",e),this.$emit("change",e),this.showPicker=!1}}},o=a,c=r("2877"),s=Object(c["a"])(o,n,i,!1,null,"659a7320",null);t["a"]=s.exports},"51eb":function(e,t,r){"use strict";var n=r("825a"),i=r("485a"),a=TypeError;e.exports=function(e){if(n(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new a("Incorrect hint");return i(this,e)}},5852:function(e,t,r){"use strict";r("68ef"),r("9d70"),r("3743"),r("1a04"),r("1146"),r("f032")},"7a82f":function(e,t,r){"use strict";var n=r("23e7"),i=r("83ab"),a=r("9bf2").f;n({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!i},{defineProperty:a})},"7db0":function(e,t,r){"use strict";var n=r("23e7"),i=r("b727").find,a=r("44d2"),o="find",c=!0;o in[]&&Array(1)[o]((function(){c=!1})),n({target:"Array",proto:!0,forced:c},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a(o)},8172:function(e,t,r){"use strict";var n=r("e065"),i=r("57b9");n("toPrimitive"),i()},"841c":function(e,t,r){"use strict";var n=r("c65b"),i=r("d784"),a=r("825a"),o=r("7234"),c=r("1d80"),s=r("129f"),u=r("577e"),l=r("dc4a"),d=r("14c3");i("search",(function(e,t,r){return[function(t){var r=c(this),i=o(t)?void 0:l(t,e);return i?n(i,t,r):new RegExp(t)[e](u(r))},function(e){var n=a(this),i=u(e),o=r(t,n,i);if(o.done)return o.value;var c=n.lastIndex;s(c,0)||(n.lastIndex=0);var l=d(n,i);return s(n.lastIndex,c)||(n.lastIndex=c),null===l?-1:l.index}]}))},"99af":function(e,t,r){"use strict";var n=r("23e7"),i=r("d039"),a=r("e8b5"),o=r("861d"),c=r("7b0b"),s=r("07fa"),u=r("3511"),l=r("8418"),d=r("65f0"),f=r("1dde"),h=r("b622"),p=r("1212"),b=h("isConcatSpreadable"),y=p>=51||!i((function(){var e=[];return e[b]=!1,e.concat()[0]!==e})),v=function(e){if(!o(e))return!1;var t=e[b];return void 0!==t?!!t:a(e)},g=!y||!f("concat");n({target:"Array",proto:!0,arity:1,forced:g},{concat:function(e){var t,r,n,i,a,o=c(this),f=d(o,0),h=0;for(t=-1,n=arguments.length;t<n;t++)if(a=-1===t?o:arguments[t],v(a))for(i=s(a),u(h+i),r=0;r<i;r++,h++)r in a&&l(f,h,a[r]);else u(h+1),l(f,h++,a);return f.length=h,f}})},a9e3:function(e,t,r){"use strict";var n=r("23e7"),i=r("c430"),a=r("83ab"),o=r("cfe9"),c=r("428f"),s=r("e330"),u=r("94ca"),l=r("1a2d"),d=r("7156"),f=r("3a9b"),h=r("d9b5"),p=r("c04e"),b=r("d039"),y=r("241c").f,v=r("06cf").f,g=r("9bf2").f,m=r("408a"),k=r("58a8").trim,w="Number",_=o[w],x=c[w],S=_.prototype,I=o.TypeError,O=s("".slice),$=s("".charCodeAt),j=function(e){var t=p(e,"number");return"bigint"==typeof t?t:N(t)},N=function(e){var t,r,n,i,a,o,c,s,u=p(e,"number");if(h(u))throw new I("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=k(u),t=$(u,0),43===t||45===t){if(r=$(u,2),88===r||120===r)return NaN}else if(48===t){switch($(u,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+u}for(a=O(u,2),o=a.length,c=0;c<o;c++)if(s=$(a,c),s<48||s>i)return NaN;return parseInt(a,n)}return+u},A=u(w,!_(" 0o1")||!_("0b1")||_("+0x1")),E=function(e){return f(S,e)&&b((function(){m(e)}))},P=function(e){var t=arguments.length<1?0:_(j(e));return E(this)?d(Object(t),this,P):t};P.prototype=S,A&&!i&&(S.constructor=P),n({global:!0,constructor:!0,wrap:!0,forced:A},{Number:P});var T=function(e,t){for(var r,n=a?y(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;n.length>i;i++)l(t,r=n[i])&&!l(e,r)&&g(e,r,v(t,r))};i&&x&&T(c[w],x),(A||i)&&T(c[w],_)},ade3:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));r("7a82f");var n=r("53ca");r("8172"),r("d9e2"),r("d401"),r("efec"),r("a9e3");function i(e,t){if("object"!=Object(n["a"])(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=Object(n["a"])(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function a(e){var t=i(e,"string");return"symbol"==Object(n["a"])(t)?t:t+""}function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},c841:function(e,t,r){"use strict";r.r(t);r("d401"),r("99af"),r("fb6a"),r("d3b7"),r("ac1f"),r("25f0"),r("841c");var n=function(){var e=this,t=e._self._c;return t("div",[t("van-sticky",[e.tableid?t("van-nav-bar",{staticClass:"shadow",attrs:{title:e.tableid?"选择工人":"工人管理","left-text":"返回","left-arrow":""},on:{"click-left":function(t){return e.$router.back(-1)}},scopedSlots:e._u([{key:"right",fn:function(){},proxy:!0}],null,!1,3743218793)}):e._e(),t("van-search",{attrs:{placeholder:"请输入关键词"},on:{search:e.changeQuery},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}},[t("template",{slot:"left"},[t("Select",{attrs:{"drop-down":"",columns:[{id:"",name:"全部"}].concat(e.types)},on:{change:e.changeQuery},model:{value:e.type_ids,callback:function(t){e.type_ids=t},expression:"type_ids"}})],1)],2)],1),t("van-list",{attrs:{finished:e.finished,error:e.error,"error-text":"请求失败,点击重新加载","finished-text":""},on:{"update:error":function(t){e.error=t},load:e.loadWorkers},model:{value:e.loading,callback:function(t){e.loading=t},expression:"loading"}},[t("van-cell-group",e._l(e.workers,(function(r,n){return t("van-cell",{key:n,attrs:{clickable:"",center:""},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"block",on:{click:function(t){return e.select(r)}}},[t("span",{staticStyle:{"margin-left":"6px"}},[e._v(e._s(r.name))])])]},proxy:!0},{key:"label",fn:function(){return[t("div",{staticClass:"block",on:{click:function(t){return e.select(r)}}},[t("span",{staticStyle:{"margin-left":"6px"}},[e._v(e._s(r.type_names))])])]},proxy:!0},{key:"icon",fn:function(){return[t("div",{staticClass:"block",on:{click:function(t){return e.select(r)}}},[t("van-image",{attrs:{src:"https://image.nczyzs.com/zhiyuan-logo.png",width:"45px",height:"45px"}})],1)]},proxy:!0}],null,!0)},[[t("span",[e._v(e._s(r.phone.toString().slice(0,3)+"****"+r.phone.toString().slice(-4))+" ")])]],2)})),1)],1)],1)},i=[],a=r("ade3"),o=(r("0cc8"),r("3104")),c=(r("5852"),r("d961")),s=(r("14d9"),r("e25e"),r("5319"),r("8a59")),u=r("5354"),l=r("4434"),d={components:Object(a["a"])(Object(a["a"])({Select:l["a"]},c["a"].name,c["a"]),o["a"].name,o["a"]),data:function(){return Object(a["a"])(Object(a["a"])({tableid:0,room_type:0,search:"",type_ids:"",types:[],workers:[],loading:!1,finished:!1,error:!1,page:1,size:10},"types",[]),"typess",[])},created:function(){this.$route.query&&this.$route.query.type&&(this.type_ids=this.$route.query.type,this.typess.push(this.$route.query.type)),this.$route.query&&this.$route.query.types&&(this.typess=this.typess.concat(this.$route.query.types.split(",")),console.log(this.typess)),this.$route.query&&this.$route.query.search&&(this.search=this.$route.query.search),this.$route.params&&this.$route.params.id&&(this.tableid=this.$route.params.id),this.$route.query&&this.$route.query.work_id&&(this.work_id=parseInt(this.$route.query.work_id)),console.log(1111111111111,this.work_id),this.loadWorkTypes()},methods:{loadWorkTypes:function(){var e=this;this.$store.commit("loading/showLoading"),Object(s["cb"])().then((function(t){e.types=t.data.list,e.$store.commit("loading/hideLoading")})).catch((function(){e.$store.commit("loading/hideLoading")}))},changeQuery:function(){this.$router.replace({path:this.$route.path,query:{type:this.type_ids,search:this.search}}),this.beforeChange()},beforeChange:function(){this.finished=!1,this.loading=!1,this.error=!1,this.page=1,this.workers=[],this.loadWorkers()},loadWorkers:function(){var e=this;this.loading=!0,Object(s["eb"])({search:this.search,type_ids:this.type_ids,page:this.page++,size:this.size}).then((function(t){e.workers=e.workers.concat(t.data.list),e.workers.length>=t.data.count&&(e.finished=!0),e.loading=!1})).catch((function(){e.loading=!1,e.error=!0}))},select:function(e){var t=this;this.tableid?(this.$store.commit("loading/showLoading"),Object(s["Gb"])(this.tableid,{worker_id:e.id,work_id:this.work_id}).then((function(e){t.$router.go(-1),t.$store.commit("loading/hideLoading")})).catch((function(){t.$store.commit("loading/hideLoading")}))):Object(u["a"])(["employee:worker:edit"])&&this.$router.push("/worker/".concat(e.id,"/edit"))}}},f=d,h=r("2877"),p=Object(h["a"])(f,n,i,!1,null,"d4b3c378",null);t["default"]=p.exports},d81d:function(e,t,r){"use strict";var n=r("23e7"),i=r("b727").map,a=r("1dde"),o=a("map");n({target:"Array",proto:!0,forced:!o},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},d961:function(e,t,r){"use strict";var n=r("2638"),i=r.n(n),a=r("c31d"),o=r("d282"),c=r("ba31"),s=r("1325"),u=r("565f"),l=Object(o["a"])("search"),d=l[0],f=l[1],h=l[2];function p(e,t,r,n){function o(){if(r.label||t.label)return e("div",{class:f("label")},[r.label?r.label():t.label])}function l(){if(t.showAction)return e("div",{class:f("action"),attrs:{role:"button",tabindex:"0"},on:{click:i}},[r.action?r.action():t.actionText||h("cancel")]);function i(){r.action||(Object(c["a"])(n,"input",""),Object(c["a"])(n,"cancel"))}}var d={attrs:n.data.attrs,on:Object(a["a"])({},n.listeners,{keypress:function(e){13===e.keyCode&&(Object(s["c"])(e),Object(c["a"])(n,"search",t.value)),Object(c["a"])(n,"keypress",e)}})},p=Object(c["b"])(n);return p.attrs=void 0,e("div",i()([{class:f({"show-action":t.showAction}),style:{background:t.background}},p]),[null==r.left?void 0:r.left(),e("div",{class:f("content",t.shape)},[o(),e(u["a"],i()([{attrs:{type:"search",border:!1,value:t.value,leftIcon:t.leftIcon,rightIcon:t.rightIcon,clearable:t.clearable,clearTrigger:t.clearTrigger},scopedSlots:{"left-icon":r["left-icon"],"right-icon":r["right-icon"]}},d]))]),l()])}p.props={value:String,label:String,rightIcon:String,actionText:String,background:String,showAction:Boolean,clearTrigger:String,shape:{type:String,default:"square"},clearable:{type:Boolean,default:!0},leftIcon:{type:String,default:"search"}},t["a"]=d(p)},efec:function(e,t,r){"use strict";var n=r("1a2d"),i=r("cb2d"),a=r("51eb"),o=r("b622"),c=o("toPrimitive"),s=Date.prototype;n(s,c)||i(s,c,a)},f032:function(e,t,r){}}]);
|