{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\resIns\\components\\commonForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\resIns\\components\\commonForm-dialog.vue","mtime":1684458239449},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.symbol.async-iterator\";\nimport \"core-js/modules/es6.symbol\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.array.from\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/web.dom.iterable\";\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 dsmInsPosition from '@/api/resIns/dsmInsPosition.js';\nimport req from '@/request.js';\nexport default {\n name: 'deviceForm-dialog',\n props: {\n CommonFormDia: {\n type: Boolean,\n default: false\n },\n pId: {\n type: String,\n default: ''\n }\n },\n data: function data() {\n return {\n //数据\n informations: {\n sel: null,\n //是否选中行\n rowData: [//一行的数据\n {\n field: 'content',\n title: '巡检对象结果异常描述'\n }],\n data: [] //添加数据后展示的地\n\n },\n isSet: false,\n //切换状态\n total: 0,\n multipleSelection: [],\n //id\n rules: {\n content: [{\n required: true,\n message: '请输入巡检对象结果常用描述',\n trigger: 'blur'\n }]\n }\n };\n },\n created: function created() {\n // this.getDetailInfo()\n // this.getList()\n // this.getSysDict()\n this.getDeviant();\n },\n methods: {\n //获取数据\n getDeviant: function getDeviant() {\n var _this = this;\n\n dsmInsPosition.deviant({\n positionId: this.pId\n }, function (res) {\n _this.informations.data = res.value;\n _this.total = res.value.length;\n\n _this.informations.data.forEach(function (item) {\n item.isSet = false;\n });\n });\n },\n //读取表格数据\n readMasterUser: function readMasterUser() {\n var _this2 = this;\n\n //根据实际情况,自己改下啊\n this.informations.rowData.map(function (i) {\n i.id = _this2.multipleSelection;\n i.isSet = false; //给后台返回数据添加`isSet`标识\n\n return i;\n });\n },\n //添加\n addAcount: function addAcount() {\n //当我们第二次点击的时候,会判断是否为真,如果为真,表示没有填数据,弹出框\n //第一次点击的时候,data为空数据,是不会循环,直接跳过的。\n var _iterator = _createForOfIteratorHelper(this.informations.data),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var i = _step.value;\n //查找该数据,是否保存,如果没保存,就弹出框提示\n // console.log(this.informations.data)\n if (i.isSet) return this.$message.warning('请先保存当前编辑项');\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n this.conuntNum++;\n var j = {\n content: '',\n // sn: 0,\n isSet: true,\n positionId: this.pId\n };\n this.informations.data.push(j);\n this.informations.sel = JSON.parse(JSON.stringify(j));\n },\n //保存\n //点击保存或者修改\n pwdChange: function pwdChange(row, index, cg) {\n var _this3 = this;\n\n // 点击修改 判断是否已经保存所有操作\n var _iterator2 = _createForOfIteratorHelper(this.informations.data),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var i = _step2.value;\n\n if (i.isSet && i.id != row.id) {\n this.$message.warning('请先保存当前编辑项');\n return false;\n }\n } //提交数据\n\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n if (row.isSet) {\n if (!row.id) {\n console.log('新数据');\n var data = JSON.parse(JSON.stringify(this.informations.sel));\n console.log(this.informations.sel['content']); // data.sn = index + 1\n //上传数据\n\n dsmInsPosition.addAbnormal(data, function (response) {\n if (response.state) {\n _this3.$message({\n type: 'success',\n message: '新增成功',\n duration: 2000\n });\n\n _this3.$emit('refList');\n\n _this3.$set(_this3.informations.data);\n\n row.isSet = false;\n\n _this3.getDeviant();\n }\n });\n } else {\n console.log('更新数据'); //修改数据\n\n var _data = JSON.parse(JSON.stringify(this.informations.sel));\n\n dsmInsPosition.Revise(_data, function (response) {\n if (response.state) {\n console.log('更新成功', _data, _this3.informations.data);\n\n _this3.$set(_this3.informations.data);\n\n row.isSet = false;\n\n _this3.getDeviant();\n }\n });\n } //然后这边重新读取表格数据\n // this.readMasterUser()\n\n } else {\n row.isSet = false;\n this.informations.sel = JSON.parse(JSON.stringify(row));\n this.informations.data[index].isSet = true;\n this.$set(this.informations.data);\n row.isSet = true; // row.isSet = true\n // this.informations.data[index].isSet = true\n }\n },\n //关闭\n // closeFormDiao() {\n // this.showFormDia = false\n // this.getDeviant()\n // },\n //删除\n deletAcount: function deletAcount() {\n var _this4 = this;\n\n var multipleSelection = [];\n this.multipleSelection.forEach(function (item) {\n if (item.content) {\n multipleSelection.push(item.id);\n } else {\n _this4.$confirm('是否取消操作?', '提示', {\n confirmButtonText: '确 定',\n cancelButtonText: '取 消',\n type: 'warning'\n }).then(function () {\n _this4.informations.data.pop(); // this.getDeviant()\n\n });\n\n multipleSelection = [];\n }\n });\n\n if (multipleSelection.length) {\n this.$confirm('确定删除选中数据?', '提示', {\n confirmButtonText: '确 定',\n cancelButtonText: '取 消',\n type: 'warning'\n }).then(function () {\n dsmInsPosition.removeAbn(multipleSelection, function (res) {\n if (res.state) {\n _this4.$notify({\n type: 'success',\n message: '删除成功',\n duration: 2000\n });\n\n _this4.$refs.multipleSelection.clearSelection();\n\n _this4.getDeviant();\n }\n }).catch(function (res) {\n _this4.$notify({\n type: 'error',\n message: res.message,\n duration: 2000,\n offset: 80\n });\n\n _this4.getDeviant();\n });\n }).catch(function () {});\n }\n },\n arrayRepeat: function arrayRepeat(array1, array2) {\n var result = [];\n\n for (var i = 0; i < array2.length; i++) {\n var obj = array2[i];\n var num = obj.ident;\n var isExist = false;\n\n for (var j = 0; j < array1.length; j++) {\n var aj = array1[j];\n var n = aj.ident;\n\n if (n === num) {\n isExist = true;\n break;\n }\n }\n\n if (!isExist) {\n result.push(obj);\n }\n }\n\n return result;\n },\n //指定一个key标识这一行的数据\n getRowKey: function getRowKey(row) {\n return row.id;\n },\n handleChanges: function handleChanges(val) {\n this.multipleSelection = val.map(function (item, index) {\n return item;\n });\n },\n handleClose: function handleClose() {\n this.params = {\n content: null\n };\n this.$emit('closeFormDiao');\n } // goInfo(e) {\n // dsmInsPosition.addAbnormal(\n // {...this.informations.data[sn]},\n // (response) => {\n // if (response.state) {\n // this.$notify({\n // type: 'success',\n // message: '新增成功',\n // duration: 2000,\n // // offset: 80\n // })\n // this.$emit('closeFormDiao')\n // this.$emit('refList')\n // } else {\n // }\n // }\n // )\n // if (this.title === '修改') {\n // dsmInsPosition.upData(this.params, (response) => {\n // if (response.state) {\n // this.$notify({\n // type: 'success',\n // message: '修改成功',\n // duration: 2000,\n // // offset: 80\n // })\n // this.$emit('closeFormDiao')\n // this.$emit('refList')\n // } else {\n // }\n // })\n // },\n // } else {\n // return false\n // }\n\n }\n};",null]}