Newer
Older
eryuan_iris_temperature_front / laser_ptz / static / js / chunk-2747.3bce0b2f.js
[wangxitong] on 30 May 2022 12 KB first commit
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2747"],{"2v4H":function(t,e,i){},"3Lej":function(t,e,i){"use strict";var a=i("jHt+");i.n(a).a},C9Hn:function(t,e,i){"use strict";i.r(e);var a=i("pMp9"),n=i("P251"),s=i("oGrt"),r=i("ctdG"),l=i("/TrS"),o={name:"ListVisitor",components:{DeptSelect:a.a,UpdateData:r.a,CaptureIris:l.a},data:function(){return{listQuery:{keywords:"",deptid:"",sex:"",personType:"0",startTime:"",endTime:"",updateStartTime:"",updateEndTime:"",offset:1,limit:20,sort:"",order:""},timeRange:[],updateTimeRange:[],columns:[{text:"访客编号",value:"personCode",align:"center"},{text:"姓名",value:"name",width:110,align:"center"},{text:"性别",value:"sexName",align:"center",width:80},{text:"身份证号",value:"idCardNo",align:"center",width:180},{text:"卡编号",value:"cardCode",align:"center"},{text:"卡类型",value:"cardType",align:"center",width:80},{text:"创建时间",value:"createtime",align:"center"},{text:"建卡时间",value:"updatetime",align:"center"},{text:"到访单位",value:"deptName",align:"center"},{text:"备注",value:"remarks",width:140,align:"center"}],multipleSelection:[],list:[],total:0,sexList:[],dutyList:[],listLoading:!0,fullscreenLoading:!1}},watch:{timeRange:function(t){t&&t.length>0?(this.listQuery.startTime=t[0],this.listQuery.endTime=t[1]):(this.listQuery.startTime="",this.listQuery.endTime="")},updateTimeRange:function(t){t&&t.length>0?(this.listQuery.updateStartTime=t[0],this.listQuery.updateEndTime=t[1]):(this.listQuery.updateStartTime="",this.listQuery.updateEndTime="")}},mounted:function(){this.fetchSexType(),this.fetchDutyType(),this.fetchData()},activated:function(){this.fetchData(!1)},methods:{checkSelection:function(){return 0!==this.multipleSelection.length},add:function(){this.$router.push({path:"/addVisitor",query:{type:"create",personType:"0"}})},edit:function(t){this.$router.push({path:"/updateVisitor",query:{type:"update",personType:"0",id:t.id}})},del:function(){var t=this;if(this.checkSelection()){var e=[];this.multipleSelection.forEach(function(t,i){e.push(t.id)}),this.$confirm("确定要删除所选访客吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.e)(e).then(function(e){200===e.code&&(t.$message.success("删除成功"),t.fetchData(!1))})})}else this.$message.error("至少选中一项")},batchExport:function(){var t=this.$loading({lock:!0,text:"数据处理中,请稍后...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});Object(n.b)(this.listQuery).then(function(e){t.close(),Object(s.a)(e.data,"访客列表")}).catch(function(e){t.close()})},registerIris:function(t){this.dialogFormVisible=!0,this.$refs.captureIris.initDialog(this.dialogFormVisible,t,"0")},search:function(){this.fetchData(!1)},fetchData:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.listLoading=!0,e||(this.listQuery.offset=1),Object(n.j)(this.listQuery).then(function(e){t.list=e.data.rows,t.total=parseInt(e.data.total),t.listLoading=!1})},fetchSexType:function(){var t=this;Object(n.m)().then(function(e){t.sexList=e.data})},fetchDutyType:function(){var t=this;Object(n.f)().then(function(e){t.dutyList=e.data})},indexMethod:function(t){return this.listQuery.limit*(this.listQuery.offset-1)+t+1},handleSizeChange:function(t){this.listQuery.limit=t,this.fetchData()},handleCurrentChange:function(t){this.listQuery.offset=t,this.fetchData()},handleSelectionChange:function(t){this.multipleSelection=t},encrypIdCardNo:function(t){return t?t.substr(0,6)+"********"+t.substr(14,18):""},updateData:function(){this.checkSelection()?this.$refs.updateData.initDialog(!0,this.multipleSelection):this.$message.error("至少选中一项")},finishUpdate:function(){this.$refs.dataTable.clearSelection()}}},c=(i("OFd5"),i("KHd+")),u=Object(c.a)(o,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"search-div"},[i("el-form",{ref:"selectForm",staticClass:"form-container",attrs:{inline:!0,model:t.listQuery}},[i("el-row",[i("el-form-item",{staticClass:"selectForm-container-item"},[i("el-input",{attrs:{placeholder:"姓名/访客编号",clearable:""},model:{value:t.listQuery.keywords,callback:function(e){t.$set(t.listQuery,"keywords","string"==typeof e?e.trim():e)},expression:"listQuery.keywords"}})],1),t._v(" "),i("el-form-item",{staticClass:"selectForm-container-item"},[i("dept-select",{attrs:{"need-top":!1,"dept-show":!0,placeholder:"到访单位"},model:{value:t.listQuery.deptid,callback:function(e){t.$set(t.listQuery,"deptid",e)},expression:"listQuery.deptid"}})],1),t._v(" "),i("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"startTime"}},[i("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","value-format":"yyyy-MM-dd HH:mm:ss","start-placeholder":"创建开始时间","end-placeholder":"创建结束时间"},model:{value:t.timeRange,callback:function(e){t.timeRange=e},expression:"timeRange"}})],1),t._v(" "),i("el-form-item",{staticClass:"selectForm-container-item"},[i("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","value-format":"yyyy-MM-dd HH:mm:ss","start-placeholder":"建卡开始时间","end-placeholder":"建卡结束时间"},model:{value:t.updateTimeRange,callback:function(e){t.updateTimeRange=e},expression:"updateTimeRange"}})],1),t._v(" "),i("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.search}},[t._v("搜索")])],1)],1)],1),t._v(" "),i("div",[i("el-row",{staticClass:"table-title"},[i("el-col",{attrs:{span:6}},[i("div",{staticClass:"title-header"},[i("i",{staticClass:"el-icon-menu"}),t._v("数据列表")])]),t._v(" "),i("el-col",{staticClass:"edit_btns",attrs:{span:12,offset:6}},[i("el-button",{staticClass:"edit_btn",attrs:{disabled:0===t.total,size:"small"},on:{click:t.batchExport}},[t._v("导出记录")]),t._v(" "),t.hasPerm("/staff/delete")?i("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:t.del}},[t._v("删除")]):t._e(),t._v(" "),t.hasPerm("/staff/add")?i("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:t.add}},[t._v("新增")]):t._e()],1)],1),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"dataTable",staticClass:"table",attrs:{data:t.list,border:""},on:{"selection-change":t.handleSelectionChange}},[t.hasPerm("/staff/delete")?i("el-table-column",{attrs:{align:"center",type:"selection",width:"55"}}):t._e(),t._v(" "),i("el-table-column",{attrs:{index:t.indexMethod,align:"center",type:"index"}}),t._v(" "),t._l(t.columns,function(e){return i("el-table-column",{key:e.value,attrs:{label:e.text,width:e.width,align:e.align,"show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return["idCardNo"===e.value?i("span",[t._v(t._s(t.encrypIdCardNo(a.row[e.value])))]):e.ext?i("span",[t._v(t._s(a.row.ext[e.value]))]):i("span",[t._v(t._s(a.row[e.value]?a.row[e.value]:a.row.ext[e.value]))])]}}])})}),t._v(" "),i("el-table-column",{attrs:{label:"操作",align:"center",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.hasPerm("/staff/update")?i("el-button",{attrs:{type:"text"},on:{click:function(i){t.edit(e.row)}}},[t._v("编辑")]):t._e()]}}])})],2)],1),t._v(" "),i("div",{staticClass:"pagination-container"},[i("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>t.listQuery.limit,expression:"total>listQuery.limit"}],attrs:{"current-page":t.listQuery.offset,"page-sizes":[20,30,50],"page-size":t.listQuery.limit,total:t.total,align:"center",layout:"total, sizes, prev, pager, next"},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),i("capture-iris",{ref:"captureIris",attrs:{"v-if":t.dialogFormVisible},on:{"update:vIf":function(e){t.dialogFormVisible=e}}}),t._v(" "),i("update-data",{ref:"updateData",on:{finishUpdate:t.finishUpdate}})],1)},[],!1,null,"4970423c",null);u.options.__file="listVisitor.vue";e.default=u.exports},OFd5:function(t,e,i){"use strict";var a=i("2v4H");i.n(a).a},ctdG:function(t,e,i){"use strict";var a=i("qpgI"),n=i("P251"),s={name:"UpdateData",data:function(){return{form:{personIds:[],selectDeivces:[]},rules:{selectDeivces:[{required:!0,message:"下发设备不能为空",trigger:["blur","change"]}]},personList:[],deviceList:[],dialogFormVisible:!1,loading:!1}},methods:{initDialog:function(t,e){var i=this;this.dialogFormVisible=t,this.personList=e,this.fetchDeviceList(),this.form.selectDeivces=[],this.$nextTick(function(){i.$refs.dataForm.clearValidate()})},fetchDeviceList:function(){var t=this;Object(a.g)().then(function(e){t.deviceList=e.data})},cancel:function(){this.dialogFormVisible=!1},saveData:function(){var t=this;this.$refs.dataForm.validate(function(e){e&&(t.loading=!0,t.form.personIds=t.personList.map(function(t){return t.id}),console.log(t.form.personIds),Object(n.w)(t.form.personIds,t.form.selectDeivces).then(function(e){200===e.code?(t.loading=!1,t.$message.success("数据下发成功"),t.dialogFormVisible=!1,t.$emit("finishUpdate")):(t.loading=!1,t.dialogFormVisible=!1,t.$emit("finishUpdate"))}).catch(function(e){t.loading=!1,t.dialogFormVisible=!1,t.$emit("finishUpdate")}))})}}},r=(i("3Lej"),i("KHd+")),l=Object(r.a)(s,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{visible:t.dialogFormVisible,"close-on-click-modal":!1,title:"人员数据下发","append-to-body":""},on:{"update:visible":function(e){t.dialogFormVisible=e},close:t.cancel}},[i("el-form",{ref:"dataForm",attrs:{model:t.form,rules:t.rules,"label-width":"auto"}},[i("el-row",{attrs:{type:"flex",justify:"center"}},[i("el-col",{attrs:{span:20}},[i("el-form-item",{attrs:{label:"已选人员"}},t._l(t.personList,function(e){return i("el-tag",{key:e.id,staticClass:"person-span"},[t._v(t._s(e.name))])}))],1)],1),t._v(" "),i("el-row",{attrs:{type:"flex",justify:"center"}},[i("el-col",{attrs:{span:20}},[i("el-form-item",{attrs:{label:"下发设备",prop:"selectDeivces"}},[i("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"",placeholder:"请选择"},model:{value:t.form.selectDeivces,callback:function(e){t.$set(t.form,"selectDeivces",e)},expression:"form.selectDeivces"}},t._l(t.deviceList,function(t){return i("el-option",{key:t.id,attrs:{label:t.devCode,value:""+t.id}})}))],1)],1)],1)],1),t._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{loading:t.loading,type:"primary"},on:{click:t.saveData}},[t._v("保存")]),t._v(" "),i("el-button",{on:{click:t.cancel}},[t._v("取消")])],1)],1)},[],!1,null,"e843c290",null);l.options.__file="updateData.vue";e.a=l.exports},"jHt+":function(t,e,i){},oGrt:function(t,e,i){"use strict";function a(t,e){var i=new Blob([t]);if(window.navigator.msSaveBlob)try{window.navigator.msSaveBlob(i,e+".xlsx")}catch(t){console.log(t)}else{var a=document.createElement("a"),n=window.URL.createObjectURL(i);a.href=n,a.download=e+".xlsx",document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(n)}}i.d(e,"a",function(){return a})},qpgI:function(t,e,i){"use strict";i.d(e,"f",function(){return r}),i.d(e,"g",function(){return l}),i.d(e,"e",function(){return o}),i.d(e,"a",function(){return c}),i.d(e,"j",function(){return u}),i.d(e,"d",function(){return d}),i.d(e,"i",function(){return f}),i.d(e,"h",function(){return p}),i.d(e,"b",function(){return m}),i.d(e,"c",function(){return h});var a=i("t3Un"),n=i("Qyje"),s=i.n(n);function r(t){return Object(a.a)({url:"device/list",method:"get",params:t})}function l(t){return Object(a.a)({url:"device/listAll",method:"get",params:t})}function o(t){return Object(a.a)({url:"/dict/code/businessType",method:"get",params:t})}function c(t){return Object(a.a)({url:"device/add",method:"post",params:t})}function u(t){return Object(a.a)({url:"device/update",method:"post",params:t})}function d(t){return Object(a.a)({url:"device/delete",method:"post",params:{ids:t},paramsSerializer:function(t){return s.a.stringify(t,{indices:!1})}})}function f(t){return Object(a.a)({url:"device/updateDB",method:"post",params:{ids:t},paramsSerializer:function(t){return s.a.stringify(t,{indices:!1})}})}function p(t){return Object(a.a)({url:"records/syncRecord",method:"post",params:t,paramsSerializer:function(t){return s.a.stringify(t,{indices:!1})}})}function m(){return Object(a.a)({url:"device/countByType",method:"get"})}function h(){return Object(a.a)({url:"statistic/countbyStatus",method:"get"})}}}]);