Commit 1672b1d3 by 无尘

fix: 修改导出

parent 0eac41fc
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-好办签到</title><link href=./static/css/app.e7d7ee4fd7de70f7905c18846ae31882.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.07.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.c4c228cd4bf0acbf7b86.js></script><script type=text/javascript src=./static/js/vendor.488957d66192c4bf6ce3.js></script><script type=text/javascript src=./static/js/app.3d5f7afc1dabfa23646d.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-好办签到</title><link href=./static/css/app.40cbbdf59e75eb74673fa42eae66a173.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.07.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.b3446654ed26de05bbf3.js></script><script type=text/javascript src=./static/js/vendor.488957d66192c4bf6ce3.js></script><script type=text/javascript src=./static/js/app.3d5f7afc1dabfa23646d.js></script></body></html>
\ No newline at end of file \ No newline at end of file
webpackJsonp([1],{"3BFB":function(e,t){},CwSZ:function(e,t,r){"use strict";var o=r("p8xL"),n=r("XgCd"),a={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},i=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,serializeDate:function(e){return i.call(e)},skipNulls:!1,strictNullHandling:!1},c=function e(t,r,n,a,i,c,l,u,p,d,f,h){var g=t;if("function"==typeof l)g=l(r,g);else if(g instanceof Date)g=d(g);else if(null===g){if(a)return c&&!h?c(r,s.encoder):r;g=""}if("string"==typeof g||"number"==typeof g||"boolean"==typeof g||o.isBuffer(g))return c?[f(h?r:c(r,s.encoder))+"="+f(c(g,s.encoder))]:[f(r)+"="+f(String(g))];var y,m=[];if(void 0===g)return m;if(Array.isArray(l))y=l;else{var v=Object.keys(g);y=u?v.sort(u):v}for(var b=0;b<y.length;++b){var w=y[b];i&&null===g[w]||(m=Array.isArray(g)?m.concat(e(g[w],n(r,w),n,a,i,c,l,u,p,d,f,h)):m.concat(e(g[w],r+(p?"."+w:"["+w+"]"),n,a,i,c,l,u,p,d,f,h)))}return m};e.exports=function(e,t){var r=e,i=t?o.assign({},t):{};if(null!==i.encoder&&void 0!==i.encoder&&"function"!=typeof i.encoder)throw new TypeError("Encoder has to be a function.");var l=void 0===i.delimiter?s.delimiter:i.delimiter,u="boolean"==typeof i.strictNullHandling?i.strictNullHandling:s.strictNullHandling,p="boolean"==typeof i.skipNulls?i.skipNulls:s.skipNulls,d="boolean"==typeof i.encode?i.encode:s.encode,f="function"==typeof i.encoder?i.encoder:s.encoder,h="function"==typeof i.sort?i.sort:null,g=void 0!==i.allowDots&&i.allowDots,y="function"==typeof i.serializeDate?i.serializeDate:s.serializeDate,m="boolean"==typeof i.encodeValuesOnly?i.encodeValuesOnly:s.encodeValuesOnly;if(void 0===i.format)i.format=n.default;else if(!Object.prototype.hasOwnProperty.call(n.formatters,i.format))throw new TypeError("Unknown format option provided.");var v,b,w=n.formatters[i.format];"function"==typeof i.filter?r=(b=i.filter)("",r):Array.isArray(i.filter)&&(v=b=i.filter);var D,O=[];if("object"!=typeof r||null===r)return"";D=i.arrayFormat in a?i.arrayFormat:"indices"in i?i.indices?"indices":"repeat":"indices";var x=a[D];v||(v=Object.keys(r)),h&&v.sort(h);for(var j=0;j<v.length;++j){var C=v[j];p&&null===r[C]||(O=O.concat(c(r[C],C,x,u,p,d?f:null,b,h,g,y,w,m)))}var k=O.join(l),I=!0===i.addQueryPrefix?"?":"";return k.length>0?I+k:""}},DDCP:function(e,t,r){"use strict";var o=r("p8xL"),n=Object.prototype.hasOwnProperty,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:o.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},i=function(e,t,r){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(o),s=i?o.slice(0,i.index):o,c=[];if(s){if(!r.plainObjects&&n.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var l=0;null!==(i=a.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&n.call(Object.prototype,i[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(i[1])}return i&&c.push("["+o.slice(i.index)+"]"),function(e,t,r){for(var o=t,n=e.length-1;n>=0;--n){var a,i=e[n];if("[]"===i)a=(a=[]).concat(o);else{a=r.plainObjects?Object.create(null):{};var s="["===i.charAt(0)&&"]"===i.charAt(i.length-1)?i.slice(1,-1):i,c=parseInt(s,10);!isNaN(c)&&i!==s&&String(c)===s&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(a=[])[c]=o:a[s]=o}o=a}return o}(c,t,r)}};e.exports=function(e,t){var r=t?o.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||o.isRegExp(r.delimiter)?r.delimiter:a.delimiter,r.depth="number"==typeof r.depth?r.depth:a.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:a.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:a.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:a.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:a.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:a.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:a.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:a.strictNullHandling,""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){for(var r={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,s=o.split(t.delimiter,i),c=0;c<s.length;++c){var l,u,p=s[c],d=p.indexOf("]="),f=-1===d?p.indexOf("="):d+1;-1===f?(l=t.decoder(p,a.decoder),u=t.strictNullHandling?null:""):(l=t.decoder(p.slice(0,f),a.decoder),u=t.decoder(p.slice(f+1),a.decoder)),n.call(r,l)?r[l]=[].concat(r[l]).concat(u):r[l]=u}return r}(e,r):e,c=r.plainObjects?Object.create(null):{},l=Object.keys(s),u=0;u<l.length;++u){var p=l[u],d=i(p,s[p],r);c=o.merge(c,d,r)}return o.compact(c)}},XgCd:function(e,t,r){"use strict";var o=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return o.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},YPWR:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r("mvHQ"),n=r.n(o),a=r("//Fk"),i=r.n(a),s=r("lRwf"),c=r.n(s),l=r("mw3O"),u=r.n(l),p=r("l6IN");c.a.axios.defaults.timeout=19e3;var d=window.location.origin;-1!=d.indexOf("localhost")&&(d="http://www.gicdev.com"),c.a.axios.interceptors.request.use(function(e){return e},function(e){return p.Message.error({message:"请求超时!"}),i.a.resolve(e)}),c.a.axios.interceptors.response.use(function(e){return e.status&&200==e.status&&"401"==e.data.errorCode?(p.Message.error({message:e.data.message}),void(window.location.href=d+"/gic-web/#/")):e},function(e){return 504==e.response.status||404==e.response.status?p.Message.error({message:"服务异常⊙﹏⊙∥"}):(e.response.status,window.location.href=d+"/gic-web/#/"),i.a.resolve(e)});var f=function(e,t){return t.requestProject="gic-web",c.a.axios({method:"get",url:""+d+e,data:{},params:t,headers:{"content-type":"application/x-www-form-urlencoded"}})},h=function(e){var t=window.location.origin;if(t.indexOf("localhost")&&(t="http://gicdev.demogic.com"),0!=e.errorCode){if(401==e.errorCode)return window.location.href=t+"/gic-web/#/",!1;p.Message.error({duration:1e3,message:e.message})}},g={name:"store-tree-select",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",storeVisible:!1,storeGroupIds:[],storeData:[],defaultProps:{children:"children",label:"storeGroupName"}}},methods:{loadData:function(e,t,r){e.hasOwnProperty("storeId")||e.hasOwnProperty("loaded")||(e.loaded=!0,this.getStoreData(e))},checkStore:function(e){this.storeGroupIds=this.$refs.storeTree.getCheckedNodes(),this.$emit("checkStoreGroupIds",this.$refs.storeTree.getCheckedNodes())},treeData:function(e){return e.filter(function(t){var r=e.filter(function(e){return t.groupId==e.parentId});return r.length>0&&(t.children=r),0==t.groupId})},getStoreData:function(e){var t=this,r={storeGroupId:e.storeGroupId,recursionStr:!0,hasPage:!1};f("/api-admin/store-list",r).then(function(t){var r=t.data;0!=r.errorCode?h(r):r.result&&r.result.list.length&&r.result.list.forEach(function(t){t.storeGroupName=t.storeName,t.storeGroupIds=t.storeId,e.children.push(t)})}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},getStoreGroup:function(){var e=this;f("/api-admin/store-group-list",{}).then(function(t){var r=t.data;0!=r.errorCode?h(r):r.result&&r.result.length&&(e.storeData=r.result)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getStoreGroup()}},y={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-popover",{staticStyle:{"min-width":"232px"},attrs:{placement:"bottom"},model:{value:e.storeVisible,callback:function(t){e.storeVisible=t},expression:"storeVisible"}},[r("div",{staticClass:"select-tree-wrap"},[r("el-tree",{ref:"storeTree",attrs:{data:e.storeData,"node-key":"storeGroupId","show-checkbox":"",props:e.defaultProps},on:{"node-click":e.loadData,"node-expand":e.loadData,check:e.checkStore}})],1),e._v(" "),r("div",{staticClass:"flex-column item-cell-select inline-block m-l-10",attrs:{slot:"reference"},slot:"reference"},[r("div",{staticClass:"depart-item-wrap"},[r("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"350px"}},[e.storeGroupIds.length?e._e():r("span",{staticClass:"font-14 color-c0c4cc p-l-10",staticStyle:{display:"inline-block","line-height":"32px",color:"#c0c4cc"}},[e._v("请选择门店分组")]),e._v(" "),r("div",{staticClass:"el-select__tags",staticStyle:{"max-width":"330px"}},[r("span",[e._l(e.storeGroupIds,function(t,o){return[r("span",{key:o,staticClass:"el-tag el-tag--info el-tag--small"},[r("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.storeGroupName||t.storeName))])])]})],2)])])])])])},staticRenderFns:[]};var m={name:"index",components:{storeTreeSelect:r("VU/8")(g,y,!1,function(e){r("fAo+")},"data-v-2873c388",null).exports},data:function(){var e=this;return{projectName:"haoban-manage-web",contentHeight:"0px",choiceDate:[],choiceDateCopy:[],pickerOptions:{onPick:function(t){var r=t.maxDate,o=t.minDate;e.choiceDateCopy=[o.getTime()],r&&(e.choiceDateCopy=[])},disabledDate:function(t){if(e.choiceDateCopy.length){var r=e.choiceDateCopy[0]-2592e6,o=e.choiceDateCopy[0]+2592e6;return t.getTime()<r||t.getTime()>o||t.getTime()>Date.now()-864e4}return t.getTime()>Date.now()-864e4}},storeGroupIds:[],enterpriseId:""}},methods:{exportData:function(){return this.choiceDate.length?this.storeGroupIds.length?void this.postExportData():(this.$message.error({duration:1e3,message:"请选择门店分组"}),!1):(this.$message.error({duration:1e3,message:"请选择日期区间"}),!1)},postExportData:function(){var e=this,t=[],r=[];e.storeGroupIds.forEach(function(e){e.hasOwnProperty("storeId")?t.push(e.storeId):r.push(e.storeGroupId)});var o,n,a={enterpriseId:e.enterpriseId,startDate:e.choiceDate[0],endDate:e.choiceDate[1],storeIds:t.join(","),groupIds:r.join(",")};(o="/haoban-app-sign-old-web/sign/export-sign-list",n=a,n.requestProject="gic-web",c.a.axios({method:"post",url:""+d+o,data:u.a.stringify(n),responseType:"blob",headers:{"content-type":"application/x-www-form-urlencoded"}})).then(function(t){if(!t)return h("暂无数据"),!1;var r=new Blob([t.data],{type:"application/vnd.ms-excel"}),o=e.choiceDate[0]+"-"+e.choiceDate[1]+"签到报表.xlsx",n=document.createElement("a");n.download=o,n.style.display="none",n.href=URL.createObjectURL(r),document.body.appendChild(n),n.click(),URL.revokeObjectURL(n.href),document.body.removeChild(n)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},changeDate:function(e){e?this.choiceDateCopy=JSON.parse(n()(this.choiceDate)):(this.choiceDateCopy=[],this.choiceDate=[])},checkStoreGroupIds:function(e){this.storeGroupIds=e},getUserInfo:function(){var e=this;f("/api-auth/get-login-user-info",{}).then(function(t){var r=t.data;0!=r.errorCode?h(r):e.enterpriseId=r.result.enterpriseId}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getUserInfo()}},v={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"sign-contain"},[r("div",{staticClass:"sign-content border-box"},[r("div",[r("el-date-picker",{attrs:{"picker-options":e.pickerOptions,editable:!1,"value-format":"yyyy-MM-dd",type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:e.changeDate},model:{value:e.choiceDate,callback:function(t){e.choiceDate=t},expression:"choiceDate"}})],1),e._v(" "),r("div",{staticClass:"m-t-20"},[r("store-tree-select",{on:{checkStoreGroupIds:e.checkStoreGroupIds}})],1),e._v(" "),r("div",{staticClass:"m-t-20"},[r("el-button",{attrs:{type:"primary"},on:{click:e.exportData}},[e._v("导 出")])],1)])])},staticRenderFns:[]};var b=r("VU/8")(m,v,!1,function(e){r("3BFB")},"data-v-64925a9e",null);t.default=b.exports},"fAo+":function(e,t){},mvHQ:function(e,t,r){e.exports={default:r("qkKv"),__esModule:!0}},mw3O:function(e,t,r){"use strict";var o=r("CwSZ"),n=r("DDCP"),a=r("XgCd");e.exports={formats:a,parse:n,stringify:o}},p8xL:function(e,t,r){"use strict";var o=Object.prototype.hasOwnProperty,n=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)void 0!==e[o]&&(r[o]=e[o]);return r},t.merge=function(e,r,n){if(!r)return e;if("object"!=typeof r){if(Array.isArray(e))e.push(r);else{if("object"!=typeof e)return[e,r];(n.plainObjects||n.allowPrototypes||!o.call(Object.prototype,r))&&(e[r]=!0)}return e}if("object"!=typeof e)return[e].concat(r);var a=e;return Array.isArray(e)&&!Array.isArray(r)&&(a=t.arrayToObject(e,n)),Array.isArray(e)&&Array.isArray(r)?(r.forEach(function(r,a){o.call(e,a)?e[a]&&"object"==typeof e[a]?e[a]=t.merge(e[a],r,n):e.push(r):e[a]=r}),e):Object.keys(r).reduce(function(e,a){var i=r[a];return o.call(e,a)?e[a]=t.merge(e[a],i,n):e[a]=i,e},a)},t.assign=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",o=0;o<t.length;++o){var a=t.charCodeAt(o);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?r+=t.charAt(o):a<128?r+=n[a]:a<2048?r+=n[192|a>>6]+n[128|63&a]:a<55296||a>=57344?r+=n[224|a>>12]+n[128|a>>6&63]+n[128|63&a]:(o+=1,a=65536+((1023&a)<<10|1023&t.charCodeAt(o)),r+=n[240|a>>18]+n[128|a>>12&63]+n[128|a>>6&63]+n[128|63&a])}return r},t.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var n=t[o],a=n.obj[n.prop],i=Object.keys(a),s=0;s<i.length;++s){var c=i[s],l=a[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:c}),r.push(l))}return function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var o=[],n=0;n<t.length;++n)void 0!==t[n]&&o.push(t[n]);r.obj[r.prop]=o}}return t}(t)},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},qkKv:function(e,t,r){var o=r("FeBl"),n=o.JSON||(o.JSON={stringify:JSON.stringify});e.exports=function(e){return n.stringify.apply(n,arguments)}}});
\ No newline at end of file
webpackJsonp([1],{CwSZ:function(e,t,r){"use strict";var o=r("p8xL"),n=r("XgCd"),a={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},i=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,serializeDate:function(e){return i.call(e)},skipNulls:!1,strictNullHandling:!1},c=function e(t,r,n,a,i,c,l,u,p,d,f,h){var g=t;if("function"==typeof l)g=l(r,g);else if(g instanceof Date)g=d(g);else if(null===g){if(a)return c&&!h?c(r,s.encoder):r;g=""}if("string"==typeof g||"number"==typeof g||"boolean"==typeof g||o.isBuffer(g))return c?[f(h?r:c(r,s.encoder))+"="+f(c(g,s.encoder))]:[f(r)+"="+f(String(g))];var y,m=[];if(void 0===g)return m;if(Array.isArray(l))y=l;else{var v=Object.keys(g);y=u?v.sort(u):v}for(var b=0;b<y.length;++b){var w=y[b];i&&null===g[w]||(m=Array.isArray(g)?m.concat(e(g[w],n(r,w),n,a,i,c,l,u,p,d,f,h)):m.concat(e(g[w],r+(p?"."+w:"["+w+"]"),n,a,i,c,l,u,p,d,f,h)))}return m};e.exports=function(e,t){var r=e,i=t?o.assign({},t):{};if(null!==i.encoder&&void 0!==i.encoder&&"function"!=typeof i.encoder)throw new TypeError("Encoder has to be a function.");var l=void 0===i.delimiter?s.delimiter:i.delimiter,u="boolean"==typeof i.strictNullHandling?i.strictNullHandling:s.strictNullHandling,p="boolean"==typeof i.skipNulls?i.skipNulls:s.skipNulls,d="boolean"==typeof i.encode?i.encode:s.encode,f="function"==typeof i.encoder?i.encoder:s.encoder,h="function"==typeof i.sort?i.sort:null,g=void 0!==i.allowDots&&i.allowDots,y="function"==typeof i.serializeDate?i.serializeDate:s.serializeDate,m="boolean"==typeof i.encodeValuesOnly?i.encodeValuesOnly:s.encodeValuesOnly;if(void 0===i.format)i.format=n.default;else if(!Object.prototype.hasOwnProperty.call(n.formatters,i.format))throw new TypeError("Unknown format option provided.");var v,b,w=n.formatters[i.format];"function"==typeof i.filter?r=(b=i.filter)("",r):Array.isArray(i.filter)&&(v=b=i.filter);var D,O=[];if("object"!=typeof r||null===r)return"";D=i.arrayFormat in a?i.arrayFormat:"indices"in i?i.indices?"indices":"repeat":"indices";var x=a[D];v||(v=Object.keys(r)),h&&v.sort(h);for(var j=0;j<v.length;++j){var C=v[j];p&&null===r[C]||(O=O.concat(c(r[C],C,x,u,p,d?f:null,b,h,g,y,w,m)))}var k=O.join(l),I=!0===i.addQueryPrefix?"?":"";return k.length>0?I+k:""}},DDCP:function(e,t,r){"use strict";var o=r("p8xL"),n=Object.prototype.hasOwnProperty,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:o.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},i=function(e,t,r){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(o),s=i?o.slice(0,i.index):o,c=[];if(s){if(!r.plainObjects&&n.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var l=0;null!==(i=a.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&n.call(Object.prototype,i[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(i[1])}return i&&c.push("["+o.slice(i.index)+"]"),function(e,t,r){for(var o=t,n=e.length-1;n>=0;--n){var a,i=e[n];if("[]"===i)a=(a=[]).concat(o);else{a=r.plainObjects?Object.create(null):{};var s="["===i.charAt(0)&&"]"===i.charAt(i.length-1)?i.slice(1,-1):i,c=parseInt(s,10);!isNaN(c)&&i!==s&&String(c)===s&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(a=[])[c]=o:a[s]=o}o=a}return o}(c,t,r)}};e.exports=function(e,t){var r=t?o.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||o.isRegExp(r.delimiter)?r.delimiter:a.delimiter,r.depth="number"==typeof r.depth?r.depth:a.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:a.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:a.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:a.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:a.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:a.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:a.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:a.strictNullHandling,""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){for(var r={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,s=o.split(t.delimiter,i),c=0;c<s.length;++c){var l,u,p=s[c],d=p.indexOf("]="),f=-1===d?p.indexOf("="):d+1;-1===f?(l=t.decoder(p,a.decoder),u=t.strictNullHandling?null:""):(l=t.decoder(p.slice(0,f),a.decoder),u=t.decoder(p.slice(f+1),a.decoder)),n.call(r,l)?r[l]=[].concat(r[l]).concat(u):r[l]=u}return r}(e,r):e,c=r.plainObjects?Object.create(null):{},l=Object.keys(s),u=0;u<l.length;++u){var p=l[u],d=i(p,s[p],r);c=o.merge(c,d,r)}return o.compact(c)}},OAyR:function(e,t){},XgCd:function(e,t,r){"use strict";var o=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return o.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},YPWR:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r("mvHQ"),n=r.n(o),a=r("//Fk"),i=r.n(a),s=r("lRwf"),c=r.n(s),l=r("mw3O"),u=r.n(l),p=r("l6IN");c.a.axios.defaults.timeout=19e3;var d=window.location.origin;-1!=d.indexOf("localhost")&&(d="http://www.gicdev.com"),c.a.axios.interceptors.request.use(function(e){return e},function(e){return p.Message.error({message:"请求超时!"}),i.a.resolve(e)}),c.a.axios.interceptors.response.use(function(e){return e.status&&200==e.status&&"401"==e.data.errorCode?(p.Message.error({message:e.data.message}),void(window.location.href=d+"/gic-web/#/")):e},function(e){return 504==e.response.status||404==e.response.status?p.Message.error({message:"服务异常⊙﹏⊙∥"}):(e.response.status,window.location.href=d+"/gic-web/#/"),i.a.resolve(e)});var f=function(e,t){return t.requestProject="gic-web",c.a.axios({method:"get",url:""+d+e,data:{},params:t,headers:{"content-type":"application/x-www-form-urlencoded"}})},h=function(e){var t=window.location.origin;if(t.indexOf("localhost")&&(t="http://gicdev.demogic.com"),0!=e.errorCode){if(401==e.errorCode)return window.location.href=t+"/gic-web/#/",!1;p.Message.error({duration:1e3,message:e.message})}},g={name:"store-tree-select",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",storeVisible:!1,storeGroupIds:[],storeData:[],defaultProps:{children:"children",label:"storeGroupName"}}},methods:{loadData:function(e,t,r){e.hasOwnProperty("storeId")||e.hasOwnProperty("loaded")||(e.loaded=!0,this.getStoreData(e))},checkStore:function(e){this.storeGroupIds=this.$refs.storeTree.getCheckedNodes(),this.$emit("checkStoreGroupIds",this.$refs.storeTree.getCheckedNodes())},treeData:function(e){return e.filter(function(t){var r=e.filter(function(e){return t.groupId==e.parentId});return r.length>0&&(t.children=r),0==t.groupId})},getStoreData:function(e){var t=this,r={storeGroupId:e.storeGroupId,recursionStr:!0,hasPage:!1};f("/api-admin/store-list",r).then(function(t){var r=t.data;0!=r.errorCode?h(r):r.result&&r.result.list.length&&r.result.list.forEach(function(t){t.storeGroupName=t.storeName,t.storeGroupIds=t.storeId,e.children.push(t)})}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},getStoreGroup:function(){var e=this;f("/api-admin/store-group-list",{}).then(function(t){var r=t.data;0!=r.errorCode?h(r):r.result&&r.result.length&&(e.storeData=r.result)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getStoreGroup()}},y={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-popover",{staticStyle:{"min-width":"232px"},attrs:{placement:"bottom"},model:{value:e.storeVisible,callback:function(t){e.storeVisible=t},expression:"storeVisible"}},[r("div",{staticClass:"select-tree-wrap"},[r("el-tree",{ref:"storeTree",attrs:{data:e.storeData,"node-key":"storeGroupId","show-checkbox":"",props:e.defaultProps},on:{"node-click":e.loadData,"node-expand":e.loadData,check:e.checkStore}})],1),e._v(" "),r("div",{staticClass:"flex-column item-cell-select inline-block m-l-10",attrs:{slot:"reference"},slot:"reference"},[r("div",{staticClass:"depart-item-wrap"},[r("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"350px"}},[e.storeGroupIds.length?e._e():r("span",{staticClass:"font-14 color-c0c4cc p-l-10",staticStyle:{display:"inline-block","line-height":"32px",color:"#c0c4cc"}},[e._v("请选择门店分组")]),e._v(" "),r("div",{staticClass:"el-select__tags",staticStyle:{"max-width":"330px"}},[r("span",[e._l(e.storeGroupIds,function(t,o){return[r("span",{key:o,staticClass:"el-tag el-tag--info el-tag--small"},[r("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.storeGroupName||t.storeName))])])]})],2)])])])])])},staticRenderFns:[]};var m={name:"index",components:{storeTreeSelect:r("VU/8")(g,y,!1,function(e){r("fAo+")},"data-v-2873c388",null).exports},data:function(){var e=this;return{projectName:"haoban-manage-web",contentHeight:"0px",choiceDate:[],choiceDateCopy:[],pickerOptions:{onPick:function(t){var r=t.maxDate,o=t.minDate;e.choiceDateCopy=[o.getTime()],r&&(e.choiceDateCopy=[])},disabledDate:function(t){if(e.choiceDateCopy.length){var r=e.choiceDateCopy[0]-2592e6,o=e.choiceDateCopy[0]+2592e6;return t.getTime()<r||t.getTime()>o||t.getTime()>Date.now()-864e4}return t.getTime()>Date.now()-864e4}},storeGroupIds:[],enterpriseId:""}},methods:{exportData:function(){return this.choiceDate.length?this.storeGroupIds.length?void this.postExportData():(this.$message.error({duration:1e3,message:"请选择门店分组"}),!1):(this.$message.error({duration:1e3,message:"请选择日期区间"}),!1)},postExportData:function(){var e=this,t=[],r=[];e.storeGroupIds.forEach(function(e){e.hasOwnProperty("storeId")?t.push(e.storeId):r.push(e.storeGroupId)});var o,n,a={enterpriseId:e.enterpriseId,startDate:e.choiceDate[0],endDate:e.choiceDate[1],storeIds:t.join(","),groupIds:r.join(",")};(o="/haoban-app-sign-old-web/sign/export-sign-list",n=a,n.requestProject="gic-web",c.a.axios({method:"post",url:""+d+o,data:u.a.stringify(n),responseType:"blob",headers:{"content-type":"application/x-www-form-urlencoded"}})).then(function(t){if(!t.data)return h("暂无数据"),!1;var r=new Blob([t.data],{type:"application/vnd.ms-excel"}),o=e.choiceDate[0].replace(/-/g,"")+"-"+e.choiceDate[1].replace(/-/g,"")+"签到报表.xlsx",n=document.createElement("a");n.download=o,n.style.display="none",n.href=URL.createObjectURL(r),document.body.appendChild(n),n.click(),URL.revokeObjectURL(n.href),document.body.removeChild(n)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},changeDate:function(e){e?this.choiceDateCopy=JSON.parse(n()(this.choiceDate)):(this.choiceDateCopy=[],this.choiceDate=[])},checkStoreGroupIds:function(e){this.storeGroupIds=e},getUserInfo:function(){var e=this;f("/api-auth/get-login-user-info",{}).then(function(t){var r=t.data;0!=r.errorCode?h(r):e.enterpriseId=r.result.enterpriseId}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getUserInfo()}},v={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"sign-contain"},[r("div",{staticClass:"sign-content border-box"},[r("div",[r("el-date-picker",{attrs:{"picker-options":e.pickerOptions,editable:!1,"value-format":"yyyy-MM-dd",type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:e.changeDate},model:{value:e.choiceDate,callback:function(t){e.choiceDate=t},expression:"choiceDate"}})],1),e._v(" "),r("div",{staticClass:"m-t-20"},[r("store-tree-select",{on:{checkStoreGroupIds:e.checkStoreGroupIds}})],1),e._v(" "),r("div",{staticClass:"m-t-20"},[r("el-button",{attrs:{type:"primary"},on:{click:e.exportData}},[e._v("导 出")])],1)])])},staticRenderFns:[]};var b=r("VU/8")(m,v,!1,function(e){r("OAyR")},"data-v-b96bde1e",null);t.default=b.exports},"fAo+":function(e,t){},mvHQ:function(e,t,r){e.exports={default:r("qkKv"),__esModule:!0}},mw3O:function(e,t,r){"use strict";var o=r("CwSZ"),n=r("DDCP"),a=r("XgCd");e.exports={formats:a,parse:n,stringify:o}},p8xL:function(e,t,r){"use strict";var o=Object.prototype.hasOwnProperty,n=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)void 0!==e[o]&&(r[o]=e[o]);return r},t.merge=function(e,r,n){if(!r)return e;if("object"!=typeof r){if(Array.isArray(e))e.push(r);else{if("object"!=typeof e)return[e,r];(n.plainObjects||n.allowPrototypes||!o.call(Object.prototype,r))&&(e[r]=!0)}return e}if("object"!=typeof e)return[e].concat(r);var a=e;return Array.isArray(e)&&!Array.isArray(r)&&(a=t.arrayToObject(e,n)),Array.isArray(e)&&Array.isArray(r)?(r.forEach(function(r,a){o.call(e,a)?e[a]&&"object"==typeof e[a]?e[a]=t.merge(e[a],r,n):e.push(r):e[a]=r}),e):Object.keys(r).reduce(function(e,a){var i=r[a];return o.call(e,a)?e[a]=t.merge(e[a],i,n):e[a]=i,e},a)},t.assign=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",o=0;o<t.length;++o){var a=t.charCodeAt(o);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?r+=t.charAt(o):a<128?r+=n[a]:a<2048?r+=n[192|a>>6]+n[128|63&a]:a<55296||a>=57344?r+=n[224|a>>12]+n[128|a>>6&63]+n[128|63&a]:(o+=1,a=65536+((1023&a)<<10|1023&t.charCodeAt(o)),r+=n[240|a>>18]+n[128|a>>12&63]+n[128|a>>6&63]+n[128|63&a])}return r},t.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var n=t[o],a=n.obj[n.prop],i=Object.keys(a),s=0;s<i.length;++s){var c=i[s],l=a[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:c}),r.push(l))}return function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var o=[],n=0;n<t.length;++n)void 0!==t[n]&&o.push(t[n]);r.obj[r.prop]=o}}return t}(t)},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},qkKv:function(e,t,r){var o=r("FeBl"),n=o.JSON||(o.JSON={stringify:JSON.stringify});e.exports=function(e){return n.stringify.apply(n,arguments)}}});
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,d=0,s=[];d<r.length;d++)u=r[d],t[u]&&s.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);s.length;)s.shift()();if(a)for(d=0;d<a.length;d++)f=o(o.s=a[d]);return f};var r={},t={8:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"8d7157a2c6b002665d6b",1:"370845b08d17b346e3dd",2:"9b606d1755f571164128",3:"5cfebacac84484523343",4:"ec744dafa07ce1b65ba7",5:"219ca1de56cd21c51dd2"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]); !function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,d=[];s<r.length;s++)u=r[s],t[u]&&d.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);d.length;)d.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={8:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"8d7157a2c6b002665d6b",1:"ae15bd23ac54627b7f0c",2:"9b606d1755f571164128",3:"5cfebacac84484523343",4:"ec744dafa07ce1b65ba7",5:"219ca1de56cd21c51dd2"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file \ No newline at end of file
...@@ -108,13 +108,13 @@ export default { ...@@ -108,13 +108,13 @@ export default {
// window.open(`${window.location.origin}/haoban-app-sign-old-web/sign/export-sign-list?${urlSource}`); // window.open(`${window.location.origin}/haoban-app-sign-old-web/sign/export-sign-list?${urlSource}`);
postExcel('/haoban-app-sign-old-web/sign/export-sign-list', para) postExcel('/haoban-app-sign-old-web/sign/export-sign-list', para)
.then(res => { .then(res => {
if (!res) { if (!res.data) {
errMsg.errorMsg('暂无数据'); errMsg.errorMsg('暂无数据');
return false; return false;
} }
// let resData = res.data; // let resData = res.data;
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }); const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' });
const fileName = `${that.choiceDate[0]}-${that.choiceDate[1]}签到报表.xlsx`; const fileName = `${that.choiceDate[0].replace(/-/g, '')}-${that.choiceDate[1].replace(/-/g, '')}签到报表.xlsx`;
const elink = document.createElement('a'); const elink = document.createElement('a');
elink.download = fileName; elink.download = fileName;
elink.style.display = 'none'; elink.style.display = 'none';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment