hz-zhhq-web/node_modules/.cache/babel-loader/f94cb89220768c1510dfb44159a...

1 line
13 KiB
JSON

{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\hz-zhhq-web\\src\\views\\visitor\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\visitor\\index.vue","mtime":1737610069453},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport Paging from \"@/views/Public/paging.vue\";\nimport Popup from \"@/views/estate/examine/dialog/popup.vue\";\nimport { getVisitor,\n//列表 \ngetVisitorMachines, deleteVisitor,\n//删除 \nConsumableimportByExcel,\n//导入\nOwn } from \"@/api/getdata\";\nexport default {\n components: {\n Paging: Paging,\n Popup: Popup\n },\n data: function data() {\n return {\n iscontinue: true,\n iscontinue2: true,\n loading: false,\n //初始化loading\n loadingMsg: \"\",\n row: {},\n btn: 3,\n fileList: [],\n validation: false,\n completeTitle: \"删除\",\n nav: \"是否删除?\",\n formInline: {\n personnelName: \"\",\n visitingTime: \"\",\n examinePersonName: \"\",\n type: \"\",\n machineMac: \"\",\n examineState: \"\"\n },\n machineOptions: [],\n examineList: ['待审核', '已通过', '已拒绝'],\n typeList: ['现场预约', '主动邀约'],\n page: {\n limit: 0 /** 当前点击*/,\n sizePage: 10 /** 当前多少页*/,\n total: 0 /**总数 */\n },\n downloadLoading: false,\n tableData: []\n };\n },\n mounted: function mounted() {\n this.getSelectData();\n this.createLoad();\n if (this.$route.params.index) {\n // this.currentChanges(this.$route.params.index);\n this.page.limit = this.$route.params.index;\n }\n // console.log(this.page.limit,202)\n this.getDate();\n },\n methods: {\n createLoad: function createLoad() {\n this.loading = true;\n this.loadingMsg = \"加载中...\";\n },\n clearLoad: function clearLoad() {\n this.loading = false;\n this.loadingMsg = \"\";\n },\n getSelectData: function getSelectData() {\n var _this = this;\n getVisitorMachines({}).then(function (res) {\n if (res.returnCode == \"1\") {\n _this.machineOptions = res.returnData;\n }\n }).catch(function (err) {\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n console.log(err);\n });\n },\n bs64: function bs64(_bs) {\n var reader = new FileReader();\n reader.readAsDataURL(_bs);\n return new Promise(function (resolve) {\n reader.onload = function (e) {\n resolve(e.target.result);\n };\n });\n },\n //分页\n currentChanges: function currentChanges(val) {\n this.page.limit = val;\n this.createLoad();\n this.getDate();\n },\n getDate: function getDate() {\n var _this2 = this;\n var limit = this.page.limit == \"0\" || this.page.limit == \"undefined\" ? 1 : this.page.limit;\n console.log(limit, 215);\n var Content = {\n // queryObj:{},\n currentPage: this.page.limit == 0 ? 1 : this.page.limit,\n personnelName: this.formInline.personnelName,\n examinePersonName: this.formInline.examinePersonName,\n type: this.formInline.type,\n machineMac: this.formInline.machineMac,\n examineState: this.formInline.examineState,\n startTime: this.formInline.visitingTime ? this.formInline.visitingTime[0] : '',\n endTime: this.formInline.visitingTime ? this.formInline.visitingTime[1] : '',\n pageNum: limit,\n pageSize: this.page.sizePage\n };\n getVisitor(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this2.clearLoad();\n console.log(res);\n _this2.tableData = res.returnData.data;\n _this2.page.total = res.returnData.total;\n _this2.page.limit = res.returnData.currentPage;\n // this.tableData.id = res.returnData.data.id;\n } else {\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this2.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n setTimeout(function () {\n _this2.clearLoad();\n }, 300);\n console.log(err);\n });\n },\n //导入\n handlePreview: function handlePreview() {\n this.formDate = new FormData();\n this.$refs.upload.clearFiles();\n },\n onchange: function onchange(file) {\n var _this3 = this;\n this.fileList = [];\n this.formDate = new FormData();\n this.formDate.append(\"file\", file.raw);\n // console.log(this.formDate,246)\n this.fileList.push(file);\n var flag = false;\n if (this.fileList.length > 0) {\n flag = false;\n var Lastindex = this.fileList[0].name.lastIndexOf(\".\");\n if (this.fileList[0].name.slice(Lastindex) != \".xls\" && this.fileList[0].name.slice(Lastindex) != \".xlsx\") {\n flag = false;\n this.$message({\n message: \"请选择正确的Excel格式\",\n type: \"warning\"\n });\n return false;\n } else {\n flag = true;\n }\n } else {\n flag = true;\n }\n this.bs64(file.raw).then(function (bs64) {\n _this3.formDate = {\n file: bs64\n };\n if (flag) {\n _this3.createLoad();\n ConsumableimportByExcel(_this3.formDate).then(function (res) {\n if (res.returnCode == \"1\") {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this3.getDate();\n } else {\n _this3.clearLoad();\n _this3.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(\"error\");\n });\n }\n });\n },\n // 自定义上传 导入数据\n uploadFile: function uploadFile(item) {\n var _this4 = this;\n var form = new FormData();\n form.append(\"file\", item.file);\n ConsumableimportByExcel(form).then(function (res) {\n if (res.returnCode == \"1\") {\n _this4.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this4.getDate();\n } else {\n _this4.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n _this4.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n });\n },\n // 导出\n onOut: function onOut() {\n var _this5 = this;\n Own().then(function (res) {\n if (res.returnCode === \"1\") {\n var paramStr = \"personnelName=\" + _this5.formInline.personnelName + \"&examinePersonName=\" + _this5.formInline.examinePersonName + \"&type=\" + _this5.formInline.type + \"&machineMac=\" + _this5.formInline.machineMac + \"&examineState=\" + _this5.formInline.examineState + \"&startTime=\" + (_this5.formInline.visitingTime[0] || '') + \"&endTime=\" + (_this5.formInline.visitingTime[1] || '');\n console.log(paramStr);\n var url = process.env.VUE_APP_BASE_API + \"/greenH5/greenWebmodul/rest/greenVisitor/exportByExcel?\" + paramStr;\n console.log(url);\n window.location.href = url;\n }\n });\n },\n //查询\n onSubmit: function onSubmit() {\n // var chinese = /^[\\u4e00-\\u9fa5]+$/;\n // var english = /^[a-zA-Z]+$/;\n // this.iscontinue = false;\n // this.iscontinue2 = false;\n // if (\n // chinese.test(this.formInline.examinePersonName) ||\n // english.test(this.formInline.examinePersonName) ||\n // this.formInline.examinePersonName == \"\"\n // ) {\n // this.iscontinue = true;\n // }\n\n // if (!this.iscontinue || !this.iscontinue2) {\n // this.validation = true;\n // this.completeTitle = \"警告\";\n // this.btn = 2;\n // this.nav = \"姓名格式只支持输入全中或全英文!\";\n // } else {\n this.page.limit = 1;\n this.createLoad();\n this.getDate();\n // }\n\n // this.page.limit = 1;\n // this.createLoad();\n // this.getDate();\n },\n onPush: function onPush() {\n this.$router.push({\n path: \"pushVisitor\",\n query: {}\n });\n },\n //修改\n handleUpdate: function handleUpdate(row, index) {\n row.til = \"查看\";\n var id = 1;\n this.$router.push({\n path: \"addVisitor\",\n query: {\n rowdata: row,\n index: this.page.limit,\n id: id\n }\n });\n window.localStorage.setItem(\"rowdata\", JSON.stringify(row));\n window.localStorage.setItem(\"consIndex\", this.page.limit);\n },\n closeDialogDel: function closeDialogDel(val) {\n var _this6 = this;\n if (val == \"1\") {\n this.createLoad();\n var Content = {\n id: this.row.ID\n };\n deleteVisitor(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this6.$message({\n message: \"删除成功\",\n type: \"success\"\n });\n _this6.page.limit = 1;\n _this6.getDate();\n } else {\n _this6.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this6.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(\"err\");\n setTimeout(function () {\n _this6.clearLoad();\n }, 300);\n });\n }\n this.validation = false;\n },\n handleModifyStatus: function handleModifyStatus(row) {\n this.row = row;\n this.completeTitle = \"删除\";\n this.nav = \"是否删除?\";\n this.validation = true;\n this.btn = 3;\n },\n //添加\n AddVisitor: function AddVisitor() {\n var id = 1;\n this.$router.push({\n path: \"addVisitor\",\n query: {\n til: \"添加\",\n id: id\n }\n });\n window.localStorage.setItem(\"consIndex\", this.page.limit);\n },\n formatJson: function formatJson(filterVal, jsonData) {\n return jsonData.map(function (v) {\n return filterVal.map(function (j) {\n if (j === \"timestamp\") {\n return parseTime(v[j]);\n } else {\n return v[j];\n }\n });\n });\n }\n }\n};",null]}