{"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\\ecoForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\stManager\\components\\alertComponents\\ecoForm-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\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 ecologicalFlow from '@/api/stManager/ecologicalFlow.js';\nimport portal from '@/api/portal.js';\nimport req from '@/request.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.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 params: {\n isNoteMsg: '0',\n gradeCode: null,\n gradeName: null,\n // rscd: null,\n // rsrd: null,\n stcd: null,\n fsltdz: null // sstp: null\n\n },\n stzlxList: [],\n yjdjList: [],\n rsnms: [],\n stnms: [],\n rules: {\n stcd: [{\n required: true,\n message: '请选择关联测站',\n trigger: 'change'\n }],\n // rscd: [{\n // \trequired: true,\n // \tmessage: '请选择水库名称',\n // \ttrigger: 'change'\n // }],\n // sstp: [{\n // \trequired: true,\n // \tmessage: '请选择生态站类型',\n // \ttrigger: 'change'\n // }],\n fsltdz: [{\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 }\n };\n },\n created: function created() {\n this.stzlxList = dictUtils.getDictItemsFromCache('czlb-stzlx');\n this.yjdjList = dictUtils.getDictItemsFromCache('yjdj');\n this.getFindAll();\n this.getStation();\n this.getDetailInfo();\n },\n methods: {\n getStation: function getStation() {\n var _this = this;\n\n ecologicalFlow.staion({\n sttp: \"SS\"\n }, function (res) {\n if (res.state) {\n _this.stnms = res.value;\n }\n });\n },\n getFindAll: function getFindAll() {\n var _this2 = this;\n\n ecologicalFlow.findAll({}, function (res) {\n if (res.state) {\n _this2.rsnms = res.value;\n }\n });\n },\n // changeRsnm(val) {\n // \tthis.rsnms.forEach(e => {\n // \t\tif (val == e.rscd) {\n // \t\t\tthis.params.rsrd = e.rsrd\n // \t\t}\n // \t})\n // },\n changeYjdj: function changeYjdj(val) {\n var _this3 = this;\n\n this.yjdjList.forEach(function (e) {\n if (val == e.value) {\n _this3.params.gradeName = e.name;\n console.log(_this3.params.gradeName);\n }\n });\n },\n changeregion: function changeregion(val) {\n if (val) {\n this.params.stcd = val[val.length - 1];\n } else {\n this.params.stcd = null;\n }\n },\n // 根据ID查询\n getDetailInfo: function getDetailInfo() {\n var _this4 = this;\n\n if (this.title === '修改') {\n ecologicalFlow.detailId(this.pId, function (res) {\n _this4.params = res.value;\n _this4.params.gradeCode = String(res.value.gradeCode); // this.params.sstp = String(res.value.sstp)\n\n _this4.$set(_this4.params);\n });\n } else {\n this.params = {\n isNoteMsg: '0',\n gradeCode: null,\n gradeName: null,\n stcd: null,\n // rsrd: null,\n // rscd: null,\n fsltdz: null // sstp: null\n\n };\n }\n },\n handleClose: function handleClose() {\n this.params = {\n isNoteMsg: '0',\n gradeCode: null,\n gradeName: null,\n stcd: null,\n // rsrd: null,\n // rscd: null,\n fsltdz: null // sstp: null\n\n };\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 ecologicalFlow.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 // console.log(this.params.gradeCode);\n // console.log(this.params);\n var a = _this5.params.gradeCode;\n\n _this5.yjdjList.forEach(function (e) {\n if (a == e.value) {\n console.log(e);\n _this5.params.gradeName = e.name;\n }\n });\n\n console.log(_this5.params); // return\n\n ecologicalFlow.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]}