hz-zhhq-web/node_modules/.cache/babel-loader/60923c2533ef03e6cbc79bb6667...

1 line
16 KiB
JSON

{"remainingRequest":"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\\house\\maintenanceRecord\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\house\\maintenanceRecord\\index.vue","mtime":1737610069425},{"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\\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":["\"use strict\";\n\nvar _interopRequireDefault = require(\"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nrequire(\"core-js/modules/es6.function.name\");\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js\"));\nrequire(\"core-js/modules/web.dom.iterable\");\nvar _paging = _interopRequireDefault(require(\"@/views/Public/paging.vue\"));\nvar _getdata = require(\"@/api/getdata\");\nvar _popup = _interopRequireDefault(require(\"@/views/estate/examine/dialog/popup.vue\"));\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = exports.default = {\n components: {\n Paging: _paging.default,\n Popup: _popup.default\n },\n data: function data() {\n return {\n loading: false,\n //初始化loading\n loadingMsg: \"\",\n assetsId: '',\n device: [],\n updatePopup: false,\n addPopup: false,\n rules: {\n payType: [{\n required: true,\n message: \"请填写设施名称\",\n trigger: \"blur\"\n }],\n payTime: [{\n required: true,\n message: \"请选择时间\",\n trigger: \"blur\"\n }]\n },\n rowRule: {\n PAY_TYPE: [{\n required: true,\n message: \"请填写设施名称\",\n trigger: \"blur\"\n }],\n PAY_TIME: [{\n required: true,\n message: \"请选择时间\",\n trigger: \"blur\"\n }]\n },\n ruleForm: {\n payType: '',\n money: '',\n payTime: ''\n },\n row: {\n ASSETS_ID: '',\n UUID: '',\n PAY_TYPE: '',\n MONEY: '',\n PAY_TIME: ''\n },\n popupBtn: \"3\",\n completeTitle: \"\",\n nav: \"\",\n fileList: [],\n validation: false,\n formInline: {\n payType: \"\",\n value1: ''\n // unit: \"\",\n // kinds: \"\"\n },\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.createLoad();\n var data = this.$route.query.rowdata;\n this.assetsId = data.ASSETS_ID;\n this.device = JSON.parse(this.$route.query.device);\n this.device.forEach(function (item, index) {\n item.VALUE = item.NAME;\n });\n this.device.splice(0, 1);\n if (data) {\n if (this.$route.params.index) {\n this.currentChanges(this.$route.params.index);\n } else {\n this.getlist();\n }\n }\n },\n methods: {\n addRecord: function addRecord() {\n this.addPopup = true;\n this.ruleForm = {\n payType: '',\n money: '',\n payTime: ''\n };\n },\n editRecord: function editRecord(row) {\n this.row.ASSETS_ID = row.ASSETS_ID;\n this.row.UUID = row.UUID;\n this.row.PAY_TYPE = row.PAY_TYPE;\n this.row.MONEY = row.MONEY;\n this.row.PAY_TIME = row.PAY_TIME;\n this.updatePopup = true;\n },\n submitForm: function submitForm(formName) {\n var _this = this;\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n _this.validation = true;\n _this.nav = \"确认添加维修记录?\";\n _this.completeTitle = \"添加\";\n _this.btn = \"3\";\n }\n });\n },\n submitUpdateForm: function submitUpdateForm(formName) {\n var _this2 = this;\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n _this2.validation = true;\n _this2.nav = \"确认修改维修记录?\";\n _this2.completeTitle = \"修改\";\n _this2.btn = \"2\";\n }\n });\n },\n del: function del(row) {\n this.row = row;\n this.validation = true;\n this.nav = \"确认删除维修记录?\";\n this.completeTitle = \"删除\";\n this.btn = \"1\";\n },\n cancal: function cancal(formName) {\n this.getlist();\n this.addPopup = false;\n this.updatePopup = false;\n },\n closeEnd: function closeEnd(val) {\n var _this3 = this;\n this.validation = false;\n if (val == \"1\") {\n this.createLoad();\n var Content = {\n id: this.row.UUID\n };\n (0, _getdata.delDevicePay)(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this3.page.limit = 1;\n _this3.getlist();\n _this3.addPopup = false;\n _this3.updatePopup = false;\n } else {\n _this3.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this3.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(\"error\");\n setTimeout(function () {\n _this3.clearLoad();\n }, 300);\n });\n } else if (val == \"2\") {\n console.log(this.row, 888);\n var _Content = {\n id: this.row.UUID,\n assetsId: this.row.ASSETS_ID,\n payType: this.row.PAY_TYPE,\n payTime: this.row.PAY_TIME,\n money: this.row.MONEY\n };\n (0, _getdata.updateDevicePay)(_Content).then(function (res) {\n console.log(res, 169);\n if (res.returnCode == \"1\") {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this3.getlist();\n _this3.addPopup = false;\n _this3.updatePopup = false;\n } else {\n _this3.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this3.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this3.clearLoad();\n }, 300);\n });\n console.log(222222);\n } else if (val == \"3\") {\n var _Content2 = {\n assetsId: this.assetsId,\n payType: this.ruleForm.payType,\n payTime: this.ruleForm.payTime,\n money: this.ruleForm.money\n };\n (0, _getdata.addDevicePay)(_Content2).then(function (res) {\n if (res.returnCode == \"1\") {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this3.getlist();\n _this3.addPopup = false;\n } else {\n _this3.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this3.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this3.clearLoad();\n }, 300);\n });\n }\n },\n /**返回上一级 */comeBack: function comeBack() {\n this.$router.push({\n name: \"house\",\n params: {\n index: this.indexCall\n }\n });\n },\n mouseoverSpan: function mouseoverSpan(e) {\n if (e.target.scrollWidth > e.target.offsetWidth) {\n e.target.setAttribute(\"class\", \"cell-box span-overflow\");\n }\n },\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.createLoad();\n this.page.limit = val;\n this.getlist();\n },\n getlist: function getlist() {\n var _this4 = this;\n var limit = this.page.limit == \"0\" || this.page.limit == \"undefined\" ? 1 : this.page.limit;\n var Content = {\n currentPage: this.page.limit == 0 ? 1 : this.page.limit,\n payType: this.formInline.payType,\n assetsId: this.assetsId,\n startTime: this.formInline.value1 ? this.formInline.value1[0] : '',\n endTime: this.formInline.value1 ? this.formInline.value1[1] : '',\n pageNum: limit,\n pageSize: this.page.sizePage\n };\n console.log(Content);\n (0, _getdata.getDevicePayList)(Content).then(function (res) {\n // console.log(res,212)\n if (res.returnCode == \"1\") {\n _this4.clearLoad();\n _this4.tableData = res.returnData.data;\n console.log(_this4.tableData);\n _this4.page.total = res.returnData.total;\n _this4.page.limit = res.returnData.currentPage;\n } else {\n _this4.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this4.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this4.clearLoad();\n }, 300);\n });\n },\n formatType: function formatType(row, column) {\n var type = row.PAY_TYPE;\n var _iterator = (0, _createForOfIteratorHelper2.default)(this.device),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var obj = _step.value;\n if (type == obj.NAME) {\n return obj.NAME;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n //导入\n handlePreview: function handlePreview() {\n this.formDate = new FormData();\n this.$refs.upload.clearFiles();\n\n // this.arrlist.map((val, ind) => {\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 // this.$message({\n // message: '请选择正确的Excel格式',\n // type: 'warning'\n // })\n // return false\n // }\n // })\n },\n onchange: function onchange(file) {\n var _this5 = this;\n this.fileList = [];\n this.formDate = new FormData();\n this.formDate.append(\"file\", file.raw);\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 _this5.formDate = {\n file: bs64,\n assetsId: _this5.assetsId\n };\n if (flag) {\n _this5.createLoad();\n console.log(_this5.formDate, 259);\n (0, _getdata.importDeviceFile)(_this5.formDate).then(function (res) {\n if (res.returnCode == \"1\") {\n _this5.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this5.getlist();\n } else {\n _this5.clearLoad();\n _this5.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(\"error\");\n });\n }\n });\n },\n onError: function onError() {},\n onSuccess: function onSuccess() {},\n // 导出\n onOut: function onOut() {\n var _this6 = this;\n (0, _getdata.Own)().then(function (res) {\n if (res.returnCode === \"1\") {\n var startTime = _this6.formInline.value1 ? _this6.formInline.value1[0] : \"\";\n var endTime = _this6.formInline.value1 ? _this6.formInline.value1[1] : \"\";\n var str = \"assetsId=\" + _this6.assetsId + \"&payType=\" + _this6.formInline.payType + \"&startTime=\" + startTime + \"&endTime=\" + endTime;\n var url = process.env.VUE_APP_BASE_API + \"/greenH5/greenWebmodul/rest/house/exportDeviceByExcel?\" + str;\n // console.log(11111,url)\n window.location.href = url;\n }\n });\n },\n onSubmit: function onSubmit() {\n this.page.limit = 1;\n this.createLoad();\n this.getlist();\n },\n handleFood: function handleFood() {\n // const id = 1;\n // this.$router.push({\n // path: `addfoodDetail`,\n // query: { til: \"添加\", id: id }\n // });\n // window.localStorage.setItem(\"foodIndex\", 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]}