{"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\\riverForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\stManager\\components\\alertComponents\\riverForm-dialog.vue","mtime":1684458239606},{"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.split\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 riverCourse from '@/api/stManager/riverCourse.js';\nimport DateMonthDay from \"../components/dataMoutnDay.vue\";\nimport portal from '@/api/portal.js';\nimport req from '@/request.js';\nexport default {\n name: 'deviceForm-dialog',\n components: {\n DateMonthDay: DateMonthDay\n },\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 fsltdz: null,\n //汛限水位-预警阀值\n gradeCode: null,\n //预警等级\n isNoteMsg: '1',\n //是否短信预警通知\n stcd: null,\n //测站编码\n gradeName: null,\n //预警名称\n sttp: null\n },\n sttpType: [],\n //工情设施下拉\n gradeNames: [],\n //预警等级\n fsltdzs: [],\n //汛期类别\n ifmsg: [{\n name: '否',\n value: '0'\n }, {\n name: '是',\n value: '1'\n }],\n rules: {\n stcd: [//测站名称\n {\n required: true,\n message: '请选择测点名称',\n trigger: 'blur'\n }],\n gradeCode: [{\n required: true,\n message: '请选择预警等级',\n trigger: 'blur'\n }],\n //预警等级_CODE\n fsltdz: [{\n required: true,\n message: '请输入汛限水位',\n trigger: 'blur'\n }] //汛限水位\n\n }\n };\n },\n created: function created() {\n var _this = this;\n\n this.getDetailInfo();\n this.getSysDict();\n riverCourse.getStnm({}, function (res) {\n for (var i = 0; i < res.value.length; i++) {\n if (res.value[i].sttp == \"ZZ\") {\n _this.sttpType.push(res.value[i]);\n }\n }\n });\n },\n computed: {},\n methods: {\n onhouChange: function onhouChange(val) {\n if (val) {\n this.params.areaCode = val[val.length - 1]; // let arr = this.basAdNames.filter((ite) => ite.code === val[0])\n // this.calleArr(arr, val[val.length - 1])\n }\n },\n calleArr: function calleArr(array, val) {\n for (var i in array) {\n var item = array[i];\n\n if (item.children) {\n this.calleArr(item.children, val); //自己调用自己\n } else {\n if (item.code === val) {\n this.params.areaName = item.fullName;\n }\n }\n }\n },\n calleArrs: function calleArrs(array) {\n var item = array[0];\n\n if (item.children) {\n this.calleArrs(item.children); //自己调用自己\n } else {\n this.params.areaCode = item.code;\n }\n },\n // changedeviceId(val) {\n // this.deviceIds.forEach((e) => {\n // if (e.id === val) {\n // this.params.deviceName = e.name\n // }\n // })\n // },\n //获取字典数据\n getSysDict: function getSysDict() {\n var _this2 = 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); // console.log(response.data)\n\n _this2.gradeNames = response.data.hdswyjdj; //预警等级\n\n _this2.fsltdzs = response.data.xqlb; //汛期类别\n\n if (_this2.title === '新增') {// this.params.type = this.types[0].value\n // this.params.objId = this.objIds[0].value\n }\n }, function (error) {\n reject(error);\n });\n });\n },\n // 根据ID查询\n getDetailInfo: function getDetailInfo() {\n var _this3 = this;\n\n if (this.title === '修改') {\n riverCourse.detailId(this.pId, function (res) {\n _this3.params = res.value;\n _this3.params.gradeCode = String(res.value.gradeCode);\n\n _this3.$set(_this3.params);\n });\n }\n },\n handleClose: function handleClose() {\n this.params = {\n fsltdz: null,\n //汛限水位-预警阀值\n gradeCode: null,\n //预警等级\n isNoteMsg: null,\n //是否短信预警通知\n stcd: null //测站编码\n\n };\n this.$emit('closeFormDiao');\n },\n //长度验证\n nrstlvs: function nrstlvs() {\n this.params.fsltdz = this.SixTwo(this.params.fsltdz);\n },\n SixTwo: function SixTwo(value) {\n value = value.replace(/^0*(0\\.|[1-4])/, '$1');\n value = value.replace(/[^\\d.]/g, ''); //清除\"数字\"和\".\"以外的字符\n\n value = value.replace(/^\\./g, ''); //验证第一个字符是数字而不是字符\n\n value = value.replace(/\\.{1,}/g, '.'); //只保留第一个.清除多余的\n\n value = value.replace('.', '$#$').replace(/\\./g, '').replace('$#$', '.');\n value = value.replace(/^(\\-)*(\\d*)\\.(\\d\\d\\d).*$/, '$1$2.$3'); //只能输入三个小数\n\n value = value.indexOf('.') > 0 ? value.split('.')[0].substring(0, 4) + '.' + value.split('.')[1] : value.substring(0, 4);\n return value;\n },\n fsltdwrule: function fsltdwrule() {\n this.params.fsltdw = this.SevenTreen(this.params.fsltdw);\n },\n SevenTreen: function SevenTreen(value) {\n value = value.replace(/^0*(0\\.|[1-6])/, '$1');\n value = value.replace(/[^\\d.]/g, ''); //清除\"数字\"和\".\"以外的字符\n\n value = value.replace(/^\\./g, ''); //验证第一个字符是数字而不是字符\n\n value = value.replace(/\\.{1,}/g, '.'); //只保留第一个.清除多余的\n\n value = value.replace('.', '$#$').replace(/\\./g, '').replace('$#$', '.');\n value = value.replace(/^(\\-)*(\\d*)\\.(\\d\\d\\d).*$/, '$1$2.$3'); //只能输入三个小数\n\n value = value.indexOf('.') > 0 ? value.split('.')[0].substring(0, 6) + '.' + value.split('.')[1] : value.substring(0, 6);\n return value;\n },\n goInfo: function goInfo(e) {\n var _this4 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this4.title === '新增') {\n _this4.params.sttp = \"ZZ\";\n var params = JSON.parse(JSON.stringify(_this4.params));\n\n _this4.gradeNames.forEach(function (item) {\n if (item.value === params.gradeCode) {\n params.gradeName = item.name;\n }\n });\n\n riverCourse.addSave(params, function (response) {\n if (response.state) {\n _this4.$notify({\n type: 'success',\n message: '新增成功',\n duration: 2000 // offset: 80\n\n });\n\n _this4.$emit('closeFormDiao');\n\n _this4.$emit('refList'); // this.$message.success(response.message)\n\n } else {// this.$message.success(response.message)\n } // this.$emit('closeFormDiao')\n // this.$router.go(-1)\n\n });\n }\n\n if (_this4.title === '修改') {\n riverCourse.upData(_this4.params, function (response) {\n if (response.state) {\n _this4.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000 // offset: 80\n\n });\n\n _this4.$emit('closeFormDiao');\n\n _this4.$emit('refList'); // this.$message.success(response.message)\n\n } else {// this.$message.success(response.message)\n } // this.$emit('closeFormDiao')\n // this.$router.go(-1)\n\n });\n }\n } else {\n return false;\n }\n });\n }\n }\n};",null]}