{"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\\stManager\\components\\alertComponents\\osmForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\stManager\\components\\alertComponents\\osmForm-dialog.vue","mtime":1684458239574},{"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/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.replace\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 osmotic from '@/api/stManager/osmotic.js';\nimport portal from '@/api/portal.js';\nimport req from '@/request.js';\nexport default {\n name: 'deviceForm-dialog',\n props: {\n showFormDia: {\n type: Boolean,\n default: false\n },\n title: {\n type: String,\n default: ''\n },\n pId: {\n type: String,\n default: ''\n }\n },\n data: function data() {\n return {\n stcds: [],\n gradeCodes: [],\n params: {\n isNoteMsg: '1',\n gradeCode: null,\n gradeName: null,\n stcd: null,\n spprwlThr: null,\n pztbwlThr: null,\n sttp: null,\n rscd: null\n },\n defaultProps: {\n children: 'children',\n emitPath: true,\n value: 'value',\n label: 'label'\n },\n rules: {\n stcd: [{\n required: true,\n message: '请选择关联测站',\n trigger: 'blur'\n }],\n gradeCode: [{\n required: true,\n message: '请选择预警等级',\n trigger: 'blur'\n }],\n isNoteMsg: [{\n required: true,\n message: '请选择是否预警通知',\n trigger: 'blur'\n }],\n spprwlThr: [{\n required: true,\n message: '请输入渗流压力水位阈值',\n trigger: 'blur'\n }],\n pztbwlThr: [{\n required: true,\n message: '请输入测压管水位阈值',\n trigger: 'blur'\n }],\n zrdsThr: [{\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 },\n methods: {\n changeregion: function changeregion(val) {\n if (val) {\n this.params.stcd = val[val.length - 1];\n this.params.rscd = val[val.length - 2];\n } else {\n this.params.stcd = null;\n }\n },\n getList: function getList() {\n var _this = this;\n\n portal.getgqList(3, function (res) {\n _this.stcds = res.value;\n\n _this.stcds.map(function (i) {\n i.label = i.rsnm;\n i.value = i.rscd;\n\n if (i.children) {\n i.children = JSON.parse(JSON.stringify(i.children).replace(/mpcd/g, 'value'));\n i.children = JSON.parse(JSON.stringify(i.children).replace(/mpnm/g, 'label'));\n }\n });\n\n _this.stcds.forEach(function (m) {\n if (m.children == undefined) {\n m.disabled = true;\n }\n });\n });\n },\n changeCode: function changeCode(val) {\n var _this2 = this;\n\n this.gradeCodes.forEach(function (e) {\n if (e.value === val) {\n _this2.params.gradeName = e.name;\n }\n });\n },\n //获取字典数据\n getSysDict: function getSysDict() {\n var _this3 = this;\n\n var portal = window.context.portal;\n return new Promise(function (resolve, reject) {\n req.post(portal + '/sys/sysDictionary/v1/queryAllDictItems').then(function (response) {\n resolve(response.data);\n _this3.gradeCodes = response.data.yjdj;\n\n if (_this3.title === '新增') {\n _this3.params.gradeCode = _this3.gradeCodes[0].value;\n _this3.params.gradeName = _this3.gradeCodes[0].name;\n }\n\n _this3.changeCode();\n }, function (error) {\n reject(error);\n });\n });\n },\n // 根据ID查询\n getDetailInfo: function getDetailInfo() {\n var _this4 = this;\n\n if (this.title === '修改') {\n osmotic.detailId(this.pId, function (res) {\n _this4.params = res.value;\n _this4.params.gradeCode = String(res.value.gradeCode);\n\n _this4.$set(_this4.params);\n });\n } else {\n this.params = {\n isNoteMsg: '1',\n gradeCode: null,\n gradeName: null,\n stcd: null,\n spprwlThr: null,\n pztbwlThr: null\n };\n }\n },\n handleClose: function handleClose() {\n ;\n this.params = {\n isNoteMsg: null,\n gradeCode: null,\n gradeName: null,\n stcd: null,\n spprwlThr: null,\n pztbwlThr: null\n }, this.$emit('closeFormDiao');\n },\n goInfo: function goInfo(e) {\n var _this5 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this5.title === '新增') {\n _this5.params.sttp = 3;\n console.log(_this5.params);\n osmotic.addSave(_this5.params, function (response) {\n if (response.state) {\n _this5.$notify({\n type: 'success',\n message: '新增成功',\n duration: 2000 // offset: 80\n\n });\n\n _this5.$emit('closeFormDiao');\n\n _this5.$emit('refList');\n } else {}\n });\n }\n\n if (_this5.title === '修改') {\n osmotic.upData(_this5.params, function (response) {\n if (response.state) {\n _this5.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000 // offset: 80\n\n });\n\n _this5.$emit('closeFormDiao');\n\n _this5.$emit('refList');\n } else {}\n });\n }\n } else {\n return false;\n }\n });\n }\n }\n};",null]}