1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8b6bc668"],{"25f0":function(e,t,a){"use strict";var n=a("6eeb"),r=a("825a"),i=a("d039"),o=a("ad6d"),l="toString",c=RegExp.prototype,s=c[l],u=i((function(){return"/a/b"!=s.call({source:"a",flags:"b"})})),d=s.name!=l;(u||d)&&n(RegExp.prototype,l,(function(){var e=r(this),t=String(e.source),a=e.flags,n=String(void 0===a&&e instanceof RegExp&&!("flags"in c)?o.call(e):a);return"/"+t+"/"+n}),{unsafe:!0})},"333d":function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[a("el-pagination",e._b({attrs:{background:e.background,"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},r=[];a("a9e3");Math.easeInOutQuad=function(e,t,a,n){return e/=n/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var i=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function o(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function l(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function c(e,t,a){var n=l(),r=e-n,c=20,s=0;t="undefined"===typeof t?500:t;var u=function e(){s+=c;var l=Math.easeInOutQuad(s,n,r,t);o(l),s<t?i(e):a&&"function"===typeof a&&a()};u()}var s={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:20},pageSizes:{type:Array,default:function(){return[5,10,20,30,50]}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&c(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&c(0,800)}}},u=s,d=(a("c799"),a("2877")),f=Object(d["a"])(u,n,r,!1,null,"07f7dac8",null);t["a"]=f.exports},"3c0e":function(e,t,a){"use strict";a("8f72")},4834:function(e,t,a){"use strict";a.d(t,"l",(function(){return r})),a.d(t,"y",(function(){return i})),a.d(t,"A",(function(){return o})),a.d(t,"v",(function(){return l})),a.d(t,"o",(function(){return c})),a.d(t,"m",(function(){return s})),a.d(t,"w",(function(){return u})),a.d(t,"i",(function(){return d})),a.d(t,"h",(function(){return f})),a.d(t,"x",(function(){return m})),a.d(t,"D",(function(){return p})),a.d(t,"N",(function(){return h})),a.d(t,"f",(function(){return g})),a.d(t,"p",(function(){return b})),a.d(t,"q",(function(){return v})),a.d(t,"z",(function(){return y})),a.d(t,"B",(function(){return _})),a.d(t,"C",(function(){return w})),a.d(t,"j",(function(){return N})),a.d(t,"g",(function(){return k})),a.d(t,"b",(function(){return S})),a.d(t,"s",(function(){return O})),a.d(t,"r",(function(){return j})),a.d(t,"P",(function(){return L})),a.d(t,"O",(function(){return x})),a.d(t,"K",(function(){return I})),a.d(t,"H",(function(){return C})),a.d(t,"c",(function(){return A})),a.d(t,"I",(function(){return $})),a.d(t,"J",(function(){return R})),a.d(t,"u",(function(){return P})),a.d(t,"F",(function(){return U})),a.d(t,"a",(function(){return D})),a.d(t,"e",(function(){return E})),a.d(t,"E",(function(){return z})),a.d(t,"G",(function(){return F})),a.d(t,"k",(function(){return T})),a.d(t,"n",(function(){return B})),a.d(t,"d",(function(){return V})),a.d(t,"L",(function(){return M})),a.d(t,"M",(function(){return q})),a.d(t,"t",(function(){return J}));a("99af");var n=a("b775");function r(e){return Object(n["a"])({url:"/admin/auth/getAdminListNew",method:"post",data:e})}function i(e){return Object(n["a"])({url:"/admin/auth/doGetAdmins",method:"post",data:e})}function o(){return Object(n["a"])({url:"/admin/auth/getAdminlist",method:"post"})}function l(){return Object(n["a"])({url:"/admin/areaCode/getProvince",method:"get",params:{}})}function c(e){return Object(n["a"])({url:"/admin/areaCode/getCity",method:"get",params:{areaCodeId:e}})}function s(e){return Object(n["a"])({url:"/admin/areaCode/getArea",method:"get",params:{areaCodeId:e}})}function u(e){return Object(n["a"])({url:"/admin/areaCode/getStreet",method:"get",params:{areaCodeId:e}})}function d(e){return Object(n["a"])({url:"/admin/auth/doEditAdmin",method:"post",data:e})}function f(e){return Object(n["a"])({url:"/admin/auth/doDeleteAdmin",method:"delete",params:{id:e}})}function m(e){return Object(n["a"])({url:"/admin/tag/getList",method:"get",params:{provinceId:e||null}})}function p(e){return Object(n["a"])({url:"/admin/tag/insert",method:"post",data:e})}function h(e){return Object(n["a"])({url:"/admin/tag/update",method:"post",data:e})}function g(e){return Object(n["a"])({url:"/admin/tag/delete",method:"get",params:{tagId:e}})}function b(e){return Object(n["a"])({url:"/admin/face/getContextById",method:"get",params:{adminId:e}})}function v(e){return Object(n["a"])({url:"/admin/face/getContextByWhiteId",method:"get",params:{id:e}})}function y(e){return Object(n["a"])({url:"/admin/face/getUserListFrom",method:"get",params:e})}function _(e){return Object(n["a"])({url:"/admin/face/getVisitorListFrom",method:"get",params:{id:e}})}function w(e){return Object(n["a"])({url:"/admin/face/getWhiteListFrom",method:"get",params:{id:e}})}function N(){return Object(n["a"])({url:"/admin/userWhitelis/doGetWhiteExcel",method:"get",responseType:"blob",params:{}})}function k(e){return Object(n["a"])({url:"/admin/userVisitorList/deleteVisitor",method:"get",params:{id:e}})}function S(e){return Object(n["a"])({url:"/admin/userVisitorList/addSingle",method:"get",params:{id:e}})}function O(e){return Object(n["a"])({url:"/admin/userVisitorList/getDetailPageList",method:"post",data:e})}function j(e){return Object(n["a"])({url:"/admin/userVisitorList/getDetailInfo/".concat(e),method:"get"})}function L(e){return Object(n["a"])({url:"/admin/userWhitelis/userWhitelistExcelOut",method:"post",data:e})}function x(e){return Object(n["a"])({url:"/admin/userVisitorList/userVisitorlistExcelOut",method:"post",data:e})}function I(e){return Object(n["a"])({url:"/admin/auth/saveEnterpriseAccount",method:"post",data:e})}function C(e){return Object(n["a"])({url:"/admin/auth/queryAdminById/".concat(e),method:"get"})}function A(e,t){return Object(n["a"])({url:"/admin/auth/audit/".concat(e,"/").concat(t),method:"post"})}function $(e){return Object(n["a"])({url:"/admin/auth/queryEnterpriseAccount",method:"get"})}function R(e){return Object(n["a"])({url:"/admin/auth/queryPlaceInfos/".concat(e),method:"get"})}function P(e){return Object(n["a"])({url:"/admin/privateArea/getPrivateAreaList",method:"get",params:{adminId:e}})}function U(e){return Object(n["a"])({url:"/admin/privateArea/privateAreaPageList",method:"post",data:e})}function D(e){return Object(n["a"])({url:"/admin/privateArea/addOrUpdatePrivateArea",method:"post",data:e})}function E(e){return Object(n["a"])({url:"admin/privateArea/deletePrivateArea",method:"get",params:{privateAreaId:e}})}function z(e){return Object(n["a"])({url:"/admin/privateArea/privateAreaDevicePageList",method:"post",data:e})}function F(e){return Object(n["a"])({url:"/admin/privateArea/privateAreaWhitelistPageList",method:"post",data:e})}function T(e){return Object(n["a"])({url:"/admin/auth/punch/field-options",method:"get",params:{}})}function B(e){return Object(n["a"])({url:"/autoTaskInfo/getByPage",method:"post",data:e})}function V(e){return Object(n["a"])({url:"/autoTaskInfo/cancelTask",headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post",params:{taskId:e}})}function M(e){return Object(n["a"])({url:"/systemNotice/edit",method:"post",data:e})}function q(e){return Object(n["a"])({url:"/systemNotice/getNotice",method:"post",data:e})}function J(e){return Object(n["a"])({url:"/admin/auth/getPlaceAreas",method:"get",params:{}})}},5008:function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("span",["directoryImage"===e.fileType?a("el-button",{attrs:{type:"primary"},on:{click:e.upload}},[e._v(" 确定 ")]):e._e(),"excel"===e.fileType?a("a",{staticClass:"file",attrs:{href:"javascript:;"}},[e._v(" 批量导入 "),a("input",{attrs:{type:"file",accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",ID:"fileSelect",runat:"server"},on:{change:function(t){return e.upload(t,"excel")}}})]):e._e()],1)},r=[],i=(a("a630"),a("3ca3"),a("d3b7"),a("159b"),a("b0c0"),a("caad"),a("2532"),a("a15b"),a("498a"),a("99af"),a("25ca")),o={name:"BatchUpload",components:{},props:{formatStyles:{type:Array,default:function(){return["png","jpg","jpeg"]}},needFileNameList:{type:Array},fileType:{type:String,default:"directoryImage"},file:{type:FileList}},data:function(){return{}},watch:{},methods:{upload:function(e,t){var a=e.target.files||this.file;if(!a||a.length<1)return this.$message.error("请上传");if(this.file){if(!this.needFileNameList)return this.$message.error("请选择命名参数");if(-1===this.needFileNameList.indexOf("name"))return this.$message.error("姓名为必填项");if(!(this.needFileNameList.indexOf("idNumber")>-1||this.needFileNameList.indexOf("cardIdEx")>-1||this.needFileNameList.indexOf("phone")>-1))return this.$message.error("手机号、身份证、卡号任选其一必选");this.getPhotoList(Array.from(a))}switch(t){case"directoryImage":this.getPhotoList(Array.from(a));break;case"excel":this.getJsonList(Array.from(a));break;default:break}},getPhotoList:function(e){var t=this,a={correct:[],incorrect:[]};e.forEach((function(e){var n=e.name.split("."),r=n[n.length-1];if(t.formatStyles.includes(r))if(e.size>2097152)a.incorrect.push({reason:"单张图片大小要求为2M内,上传的图片大小为"+e.size/1024/1024+"M",file:e});else{var i=t.matchNeedFileNameList(e,n[0]);a[i.status?"correct":"incorrect"].push(i.file)}else a.incorrect.push({reason:"文件格式要求为"+t.formatStyles.join(",")+",上传的类型为"+r,file:e})})),this.doUpload(a)},matchNeedFileNameList:function(e,t){var a=t.split("-"),n={status:!0,file:{}};return a.length<this.needFileNameList.length||a.some((function(e){return!e}))?{status:!1,file:{reason:"文件没有按指定要求命名,需要"+this.needFileNameList.join(","),file:e}}:(this.needFileNameList.forEach((function(e,t){n.file[e]=a[t].trim()||""})),n.file["avatar"]=e,n)},doUpload:function(e){this.$emit("getFileList",e)},getJsonList:function(e){var t=this,a=e[0],n=new FileReader,r={correct:[],incorrect:[]};n.readAsBinaryString(a),n.onload=function(e){var a=e.target.result,n=i["a"](a,{type:"binary",sheetRows:0,codepage:936}),o=[];for(var l in n.Sheets)o=o.concat(i["b"].sheet_to_json(n.Sheets[l]));r["correct"]=o,t.doUpload(r)}}},mounted:function(){}},l=o,c=(a("3c0e"),a("2877")),s=Object(c["a"])(l,n,r,!1,null,"418e7718",null);t["a"]=s.exports},"53be":function(e,t,a){"use strict";a("c0d2")},"758b":function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));a("a4d3"),a("e01a"),a("d3b7"),a("d28b"),a("3ca3"),a("ddb0"),a("fb6a"),a("b0c0"),a("a630"),a("ac1f"),a("00b4");function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function r(e,t){if(e){if("string"===typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}}function i(e,t){var a="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=r(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return l=e.done,e},e:function(e){c=!0,o=e},f:function(){try{l||null==a["return"]||a["return"]()}finally{if(c)throw o}}}}a("25f0"),a("2b3d"),a("9861");function o(e,t,a){var n="";e.length>0&&(n="序号\t");var r,o=i(t);try{for(o.s();!(r=o.n()).done;){var c=r.value;n+=c.name+"\t"}}catch(g){o.e(g)}finally{o.f()}n+="\n";for(var s=0;s<e.length;s++){n+=(s+1).toString()+"\t";var u,d=i(t);try{for(d.s();!(u=d.n()).done;){var f=u.value;n+=l(e[s],f.value)+"\t"}}catch(g){d.e(g)}finally{d.f()}n+="\n"}var m=new Blob([n],{type:"text/plain;charset=utf-8"}),p=window.URL.createObjectURL(m),h=document.createElement("a");h.href=p,h.download=a+".xls",document.body.appendChild(h),h.click(),document.body.removeChild(h)}function l(e,t){var a=t.split("."),n=0;function r(e){return e[a[n]]&&n<=a.length-2?r(e[a[n++]]):null===e[a[n]]||void 0===e[a[n]]?"":e[a[n]]}return r(e)}},"8f72":function(e,t,a){},bb03:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[e.checkRole([5,99])?a("span",[a("el-button",{staticClass:"margin-left",attrs:{type:"primary",icon:"el-icon-plus"},on:{click:e.create}},[e._v("添加黑名单")]),a("el-button",{staticClass:"margin-left",attrs:{type:"primary",icon:"el-icon-download"},on:{click:e.batchDownloadMachineList}},[e._v("下载模板")]),a("BatchUpload",{attrs:{fileType:"excel",needFileNameList:["name","idNumber","cardIdEx"]},on:{getFileList:e.getFileList}})],1):e._e(),a("el-input",{staticClass:"margin-left input",attrs:{placeholder:"请输入姓名"},model:{value:e.page.data.name,callback:function(t){e.$set(e.page.data,"name",t)},expression:"page.data.name"}}),a("el-input",{staticClass:"margin-left input",attrs:{placeholder:"请输入身份证号"},model:{value:e.page.data.idNumber,callback:function(t){e.$set(e.page.data,"idNumber",t)},expression:"page.data.idNumber"}}),e.checkRole([1,2,3,4])?a("el-select",{staticClass:"margin-left input",attrs:{clearable:"",filterable:"",placeholder:"请选择所属账号"},model:{value:e.page.data.username,callback:function(t){e.$set(e.page.data,"username",t)},expression:"page.data.username"}},e._l(e.user_list,(function(e){return a("el-option",{key:e.id,attrs:{label:e.username,value:e.username}})})),1):e._e(),a("el-select",{staticClass:"margin-left input",attrs:{filterable:"",clearable:"",placeholder:"请选择省份",disabled:e.checkRole([2,3,4,5,99])},on:{change:e.chooseProvinceSearch},model:{value:e.page.data.provinceId,callback:function(t){e.$set(e.page.data,"provinceId",t)},expression:"page.data.provinceId"}},e._l(e.province_list_search,(function(e){return a("el-option",{key:e.areaCodeId,attrs:{label:e.name,value:e.areaCodeId}})})),1),a("el-select",{staticClass:"margin-left input",attrs:{filterable:"",clearable:"",placeholder:"请选择城市",disabled:e.checkRole([4,5,99])},on:{change:e.chooseCitySearch},model:{value:e.page.data.cityId,callback:function(t){e.$set(e.page.data,"cityId",t)},expression:"page.data.cityId"}},e._l(e.city_list_search,(function(e){return a("el-option",{key:e.areaCodeId,attrs:{label:e.name,value:e.areaCodeId}})})),1),a("el-select",{staticClass:"margin-left input",attrs:{filterable:"",clearable:"",placeholder:"请选择区域",disabled:e.checkRole([5,99])},model:{value:e.page.data.areaId,callback:function(t){e.$set(e.page.data,"areaId",t)},expression:"page.data.areaId"}},e._l(e.area_list_search,(function(e){return a("el-option",{key:e.areaCodeId,attrs:{label:e.name,value:e.areaCodeId}})})),1),a("el-button",{staticClass:"margin-left",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.fetchData}},[e._v("搜索")]),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],ref:"table_form",staticClass:"table",attrs:{data:e.list,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"序号",align:"center",width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.indexMethod(t.$index))+" ")]}}])}),a("el-table-column",{attrs:{label:"姓名",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.name))+" ")]}}])}),a("el-table-column",{attrs:{label:"身份证号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.idNumber))+" ")]}}])}),e.checkRole([1,2])?a("el-table-column",{attrs:{label:"省",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.provinceName))+" ")]}}],null,!1,1490011089)}):e._e(),e.checkRole([1,2,3])?a("el-table-column",{attrs:{label:"市",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.cityName))+" ")]}}],null,!1,4171402028)}):e._e(),e.checkRole([1,2,3,4])?a("el-table-column",{attrs:{label:"区",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.areaName))+" ")]}}],null,!1,3936851932)}):e._e(),e.checkRole([1,2,3,4])?a("el-table-column",{attrs:{label:"街道",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.streetName))+" ")]}}],null,!1,2537032778)}):e._e(),e.checkRole([1,2,3,4])?a("el-table-column",{attrs:{label:"详细地址",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.address))+" ")]}}],null,!1,934433114)}):e._e(),e.checkRole([1,2,3,4])?a("el-table-column",{attrs:{label:"所属组织名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.policeStationName))+" ")]}}],null,!1,1864085837)}):e._e(),a("el-table-column",{attrs:{label:"创建时间",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.createTime))+" ")]}}])}),e.checkRole([1,2,3,4])?a("el-table-column",{attrs:{label:"所属账号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.username))+" ")]}}],null,!1,259514490)}):e._e(),e.checkRole([1,2,5,99])?a("el-table-column",{attrs:{align:"center",prop:"",label:"操作区",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"warning",plain:"",size:"small"},on:{click:function(a){return e.removeUser(t.row.id)}}},[e._v("移除")])]}}],null,!1,759110541)}):e._e()],1),a("pagination",{attrs:{total:e.total,page:e.page.pageNum,limit:e.page.pageSize},on:{"update:page":function(t){return e.$set(e.page,"pageNum",t)},"update:limit":function(t){return e.$set(e.page,"pageSize",t)},pagination:e.fetchData}}),a("el-dialog",{attrs:{title:"添加黑名单",visible:e.dialogVisible,width:"800px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"120px","label-position":"left"}},[a("el-form-item",{attrs:{label:"姓名",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入姓名"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"身份证号",prop:"idNumber"}},[a("el-input",{attrs:{placeholder:"请输入身份证号"},model:{value:e.form.idNumber,callback:function(t){e.$set(e.form,"idNumber",t)},expression:"form.idNumber"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" 取消 ")]),a("el-button",{attrs:{type:"primary"},on:{click:e.add}},[e._v(" 确定 ")])],1)],1),a("el-drawer",{attrs:{title:e.hasCompleted?"导入已完成":"正在处理中..",visible:e.drawerVisible,wrapperClosable:!1,size:"50%",direction:"rtl"},on:{"update:visible":function(t){e.drawerVisible=t}}},[a("div",{staticStyle:{padding:"50px"}},[a("div",[e._v(" 已处理条数;"+e._s(e.hasDealNumber)+"; 待处理条数:"+e._s(e.waitDealNumber)+"; 总共条数:"+e._s(e.allNumber)+" ")]),a("el-progress",{staticStyle:{"margin-top":"10px"},attrs:{percentage:e.makePercent,format:e.formatProgress}}),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:!1,expression:"false"}],ref:"batch_upload_result",staticClass:"table",attrs:{data:e.batchUploadResultList,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":"",height:"500"}},[a("el-table-column",{attrs:{label:"错误序号",align:"center",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.$index+1)+" ")]}}])}),a("el-table-column",{attrs:{label:"姓名",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.name))+" ")]}}])}),a("el-table-column",{attrs:{label:"身份证号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.idNumber))+" ")]}}])}),a("el-table-column",{attrs:{label:"错误描述",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("matchNull")(t.row.err))+" ")]}}])})],1),a("div",{staticStyle:{"text-align":"center",margin:"20px 0"}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.drawerVisible=!1}}},[e._v(" 我已知晓 ")]),a("el-button",{attrs:{type:"warning"},on:{click:e.downloadBatchUploadErrorList}},[e._v(" 下载错误列表文件 ")])],1)],1)])],1)},r=[],i=a("c7eb"),o=a("1da1"),l=(a("e9c4"),a("d81d"),a("b0c0"),a("d3b7"),a("25f0"),a("3ca3"),a("ddb0"),a("2b3d"),a("9861"),a("50e2")),c=a("42d1"),s=a("333d"),u=a("4834"),d=a("5008"),f=(a("758b"),{components:{Pagination:s["a"],BatchUpload:d["a"]},filters:{matchNull:function(e){return e||"暂无"}},data:function(){return{list:null,listLoading:!0,page:{data:{username:null,name:"",phone:"",idNumber:"",provinceId:null,cityId:null,areaId:null},pageNum:1,pageSize:10},total:0,user_list:[],province_list_search:[],city_list_search:[],area_list_search:[],status_list:[{id:1,name:"已认证"},{id:2,name:"未认证"}],form:{idNumber:null,name:""},rules:{idNumber:[{required:!0,message:"请输入身份证号",trigger:"blur"}]},dialogVisible:!1,form_copy:{},hasDealNumber:0,waitDealNumber:0,allNumber:0,hasCompleted:!1,drawerVisible:!1,batchUploadResultList:[]}},created:function(){this.fetchData(),this.getUserListSearch(),this.getAddressListSearch(1),Object(c["a"])([2,3])?(this.getAddressListSearch(2,this.$store.getters.provinceId),this.page.data.provinceId=this.$store.getters.provinceId):Object(c["a"])([4])?(this.getAddressListSearch(2,this.$store.getters.provinceId),this.page.data.provinceId=this.$store.getters.provinceId,this.getAddressListSearch(3,this.$store.getters.cityId),this.page.data.cityId=this.$store.getters.cityId):Object(c["a"])([5,99])&&(this.getAddressListSearch(2,this.$store.getters.provinceId),this.page.data.provinceId=this.$store.getters.provinceId,this.getAddressListSearch(3,this.$store.getters.cityId),this.page.data.cityId=this.$store.getters.cityId,this.page.data.areaId=this.$store.getters.areaId)},methods:{checkRole:c["a"],fetchData:function(){var e=this;this.listLoading=!0,Object(l["s"])(this.page).then((function(t){e.list=t.data.list,e.total=t.data.total,e.listLoading=!1}))},create:function(){var e=this;this.form=JSON.parse(JSON.stringify(this.form_copy)),this.dialogVisible=!0,this.$nextTick((function(){e.$refs["form"].clearValidate()}))},add:function(){var e=this;this.$refs["form"].validate((function(t){t&&Object(l["B"])(e.form).then((function(t){e.dialogVisible=!1,e.fetchData(),e.$message({type:"success",message:"添加成功!"})}))}))},getFileList:function(e){this.hasCompleted=!1,this.drawerVisible=!0,this.hasDealNumber=e.incorrect.length,this.waitDealNumber=e.correct.length,this.allNumber=e.incorrect.length+e.correct.length,this.batchUploadResultList=e.incorrect.map((function(e){return{name:e.file.name,err:e.reason}})),this.makeScrollDown(),this.doSubmitUrl(e,0)},doSubmitUrl:function(e,t){var a=this;return Object(o["a"])(Object(i["a"])().mark((function n(){var r,o;return Object(i["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!(t<=e.correct.length-1)){n.next=13;break}return r=e.correct[t],o=JSON.parse(JSON.stringify(a.form_copy)),o.name=r["姓名"],o.idNumber=r["身份证号"],n.next=7,Object(l["B"])(o).then((function(e){console.log(e)})).catch((function(e){console.log(e),a.batchUploadResultList.push({name:o.name,idNumber:o.idNumber,err:e})}));case 7:a.hasDealNumber+=1,a.waitDealNumber-=1,a.makeScrollDown(),a.doSubmitUrl(e,++t),n.next=15;break;case 13:a.hasCompleted=!0,a.fetchData();case 15:case"end":return n.stop()}}),n)})))()},makeScrollDown:function(){var e=this;this.$nextTick((function(){e.$refs.batch_upload_result.$refs.bodyWrapper.scrollTop=e.$refs.batch_upload_result.$refs.bodyWrapper.scrollHeight}))},formatProgress:function(e){return 100==e?"已完成":""},downloadBatchUploadErrorList:function(){for(var e=this.batchUploadResultList,t="序号\t文件名\t错误原因\n",a=0;a<this.batchUploadResultList.length;a++)t+=(a+1).toString()+"\t"+e[a].name+"\t"+e[a].err+"\t\n";var n=new Blob([t],{type:"text/plain;charset=utf-8"}),r=window.URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download="批量注册结果错误名单.xls",document.body.appendChild(i),i.click(),document.body.removeChild(i)},batchDownloadMachineList:function(){window.location.href="../excel/userBlackListExcel.xlsx"},getUserListSearch:function(){var e=this;Object(u["A"])().then((function(t){e.user_list=t.data}))},getAddressListSearch:function(e,t){var a=this;switch(e){case 1:Object(u["v"])().then((function(e){a.province_list_search=e.data}));break;case 2:Object(u["o"])(t).then((function(e){a.city_list_search=e.data}));break;case 3:Object(u["m"])(t).then((function(e){a.area_list_search=e.data}));break;default:break}},chooseProvinceSearch:function(e){this.city_list_search=[],this.page.data.cityId="",this.page.data.cityName="",this.area_list_search=[],this.page.data.areaId="",this.page.data.areaName="",this.getAddressListSearch(2,e),this.getTagList(e)},chooseCitySearch:function(e){this.area_list=[],this.page.data.areaId="",this.page.data.areaName="",this.getAddressListSearch(3,e)},indexMethod:function(e){return(this.page.pageNum-1)*this.page.pageSize+e+1},removeUser:function(e){var t=this;this.$confirm("确定要将此用户移除黑名单吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0}).then((function(){Object(l["E"])(e).then((function(e){t.fetchData(),t.$message({type:"success",message:"移除成功!"})}))}))}},computed:{makePercent:function(){return Math.floor(this.hasDealNumber/this.allNumber*100)}}}),m=f,p=(a("53be"),a("2877")),h=Object(p["a"])(m,n,r,!1,null,"27a716d2",null);t["default"]=h.exports},c0d2:function(e,t,a){},c49a:function(e,t,a){},c799:function(e,t,a){"use strict";a("c49a")}}]);
|