hz-zhhq-web/node_modules/.cache/babel-loader/1391e91769816a686f55d512435...

1 line
12 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\\catering\\consumables\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\catering\\consumables\\index.vue","mtime":1737610069408},{"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\nimport Paging from \"@/views/Public/paging.vue\";\nimport Popup from \"@/views/estate/examine/dialog/popup.vue\";\nimport { ConsumableList,\n//列表\nConsumableDelete,\n//删除\nConsumableimportByExcel,\n//导入\nConsumableexportByExcel,\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 deviceName: \"\",\n deviceState: \"\",\n purchaseTime: \"\",\n purchaserName: \"\",\n receiptorName: \"\",\n receiveTime: \"\",\n useLocal: \"\"\n },\n page: {\n limit: 0 /** 当前点击*/,\n sizePage: 10 /** 当前多少页*/,\n total: 0 /**总数 */\n },\n downloadLoading: false,\n tableData: [\n // {\n // device_name: \"笔记本电脑\",\n // rule_name: \"华硕X20\",\n // number: \"2\",\n // issue_time: \"2019-08-5\",\n // preserver: \"樊军\",\n // Employee: \"机器人\",\n // maturity_time: \"2019-10-10\",\n // department: \"银白食堂\",\n // device_state: \"在用\"\n // },\n // {\n // device_name: \"打印机\",\n // rule_name: \"惠普X30\",\n // number: \"1\",\n // issue_time: \"2019-08-5\",\n // preserver: \"樊军\",\n // Employee: \"机器人\",\n // maturity_time: \"2019-10-10\",\n // department: \"西单食堂\",\n // device_state: \"停用\"\n // },\n // {\n // device_name: \"显示器\",\n // rule_name: \"惠普X200\",\n // number: \"\",\n // issue_time: \"\",\n // preserver: \"\",\n // Employee: \"\",\n // maturity_time: \"\",\n // department: \"\",\n // device_state: \"停用\"\n // }\n ]\n };\n },\n mounted: function mounted() {\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 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 _this = 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 currentPage: limit,\n queryObj: this.formInline\n };\n ConsumableList(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this.clearLoad();\n _this.tableData = res.returnData.data;\n _this.page.total = res.returnData.total;\n _this.page.limit = res.returnData.currentPage;\n _this.tableData.id = res.returnData.data.id;\n } else {\n _this.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n setTimeout(function () {\n _this.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 _this2 = 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 _this2.formDate = {\n file: bs64\n };\n if (flag) {\n _this2.createLoad();\n ConsumableimportByExcel(_this2.formDate).then(function (res) {\n if (res.returnCode == \"1\") {\n _this2.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this2.getDate();\n } else {\n _this2.clearLoad();\n _this2.$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 _this3 = this;\n var form = new FormData();\n form.append(\"file\", item.file);\n ConsumableimportByExcel(form).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.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n _this3.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n });\n },\n // 导出\n onOut: function onOut() {\n var _this4 = this;\n Own().then(function (res) {\n if (res.returnCode === \"1\") {\n var str = \"&deviceName=\" + _this4.formInline.deviceName + \"&deviceState=\" + _this4.formInline.deviceState + \"&purchaseTime=\" + _this4.formInline.purchaseTime + \"&purchaserName=\" + _this4.formInline.purchaserName + \"&receiptorName=\" + _this4.formInline.receiptorName + \"&receiveTime\" + _this4.formInline.receiveTime + \"&useLocal\" + _this4.formInline.useLocal;\n var url = \"/greenH5/greenWebmodul/rest/greenConsumableMaterial/exportByExcel?\" + str;\n window.location.href = url;\n }\n });\n },\n //查询\n onSubmit: function onSubmit() {\n var chinese = /^[\\u4e00-\\u9fa5]+$/;\n var englist = /^[a-zA-Z]+$/;\n this.iscontinue = false;\n this.iscontinue2 = false;\n // formInline.receiptorName\n if (chinese.test(this.formInline.purchaserName) || englist.test(this.formInline.purchaserName) || this.formInline.purchaserName == \"\") {\n this.iscontinue = true;\n }\n if (chinese.test(this.formInline.receiptorName) || englist.test(this.formInline.receiptorName) || this.formInline.receiptorName == \"\") {\n this.iscontinue2 = true;\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 //修改\n handleUpdate: function handleUpdate(row, index) {\n row.til = \"修改\";\n var id = 1;\n this.$router.push({\n path: \"addconsumables\",\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 _this5 = this;\n if (val == \"1\") {\n this.createLoad();\n var Content = {\n id: this.row.id\n };\n ConsumableDelete(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this5.$message({\n message: \"删除成功\",\n type: \"success\"\n });\n _this5.page.limit = 1;\n _this5.getDate();\n } else {\n _this5.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this5.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(\"err\");\n setTimeout(function () {\n _this5.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 AddConsumables: function AddConsumables() {\n var id = 1;\n this.$router.push({\n path: \"addconsumables\",\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]}