{"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\\reservoirManagement\\components\\damForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\reservoirManagement\\components\\damForm-dialog.vue","mtime":1684458239512},{"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.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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 damManager from '@/api/reservoirManagement/damManager.js';\nimport req from '@/request.js';\nimport latitude from '@/mixins/latitude';\nexport default {\n name: 'damForm-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 damCode: null,\n //大坝代码\n damName: null,\n //大坝名称\n damGrad: null,\n //大坝级别\n damLoc: null,\n //大坝所在位置\n damMaxHeig: null,\n //最大坝高(\n damTopElev: null,\n //坝顶高程\n damTopLen: null,\n //坝顶长度\n damTopWid: null,\n //坝顶宽度\n damTypeMat: null,\n //大坝材料类型(参考字典)\n damTypeStr: null,\n //大坝结构类型(参考字典)\n elevSys: null,\n //高程系统(参考字典)\n endLat: null,\n //终点纬度(单位:度)\n endLong: null,\n //终点经度(单位:度)\n engGrad: null,\n //工程等别(参考字典)\n engStat: null,\n //工程建设情况\n ifMainDam: null,\n //是否主坝\n rscd: null,\n //水库代码\n rsnm: null,\n //水库名称只在列表展示使用\n startDate: null,\n //开工时间\n startLat: null,\n //起点纬度(单位:度\n startLong: null,\n //起点经度(单位:度)\n note: null\n },\n prgrs: [],\n //工程等别(字典\n prscs: [],\n //工程规模(参考字典)\n damGrads: [],\n //大坝级别\n resNames: [],\n ifMainDams: [{\n name: '未知',\n value: '0'\n }, {\n name: '是',\n value: '1'\n }, {\n name: '否',\n value: '2'\n }],\n damTypeMats: [],\n damTypeStrs: [],\n elevSyss: [],\n engStats: [{\n name: '在建',\n value: '0'\n }, {\n name: '已建',\n value: '1'\n }],\n //工程建设情况\n rules: {\n damName: [{\n required: true,\n message: '请输入大坝名称',\n trigger: 'blur'\n }],\n damCode: [{\n required: true,\n message: '请输入大坝代码',\n trigger: 'blur'\n }],\n damGrad: [{\n required: true,\n message: '请选择大坝级别',\n trigger: 'blur'\n }],\n rscd: [{\n required: true,\n message: '请选择关联水库',\n trigger: 'blur'\n }]\n }\n };\n },\n created: function created() {\n var _this = this;\n\n this.getDetailInfo();\n this.getSysDict(); // 水库查询\n\n damManager.getResName({}, function (res) {\n _this.resNames = res.value;\n\n if (_this.title == '新增') {\n _this.params.rscd = _this.resNames[0].rscd;\n }\n });\n },\n methods: {\n deadLevs: function deadLevs(val) {\n switch (val) {\n case '1':\n this.params.startLong = latitude.TreeFour(this.params.startLong);\n break;\n\n case '2':\n this.params.startLat = latitude.TreeFour(this.params.startLat);\n break;\n\n case '3':\n this.params.endLong = latitude.TreeFour(this.params.endLong);\n break;\n\n default:\n this.params.endLat = latitude.TreeFour(this.params.endLat);\n }\n },\n dikeTopWidMaxs: function dikeTopWidMaxs() {\n this.params.damTopElev = this.SixTwo(this.params.damTopElev);\n },\n damTopWids: function damTopWids() {\n this.params.damTopWid = this.FiveTwo(this.params.damTopWid);\n },\n damTopLens: function damTopLens() {\n this.params.damTopLen = this.SevenTwo(this.params.damTopLen);\n },\n damMaxHeigs: function damMaxHeigs() {\n this.params.damMaxHeig = this.FiveTwo(this.params.damMaxHeig);\n },\n SixTwo: function SixTwo(value) {\n value = value.replace(/^0*(0\\.|[1-3])/, '$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).*$/, '$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 FiveTwo: function FiveTwo(value) {\n value = value.replace(/^0*(0\\.|[1-3])/, '$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).*$/, '$1$2.$3'); //只能输入两个小数\n\n value = value.indexOf('.') > 0 ? value.split('.')[0].substring(0, 3) + '.' + value.split('.')[1] : value.substring(0, 3);\n return value;\n },\n SevenTwo: function SevenTwo(value) {\n value = value.replace(/^0*(0\\.|[1-3])/, '$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).*$/, '$1$2.$3'); //只能输入两个小数\n\n value = value.indexOf('.') > 0 ? value.split('.')[0].substring(0, 5) + '.' + value.split('.')[1] : value.substring(0, 5);\n return value;\n },\n // 根据ID查询\n getDetailInfo: function getDetailInfo() {\n var _this2 = this;\n\n if (this.title === '修改') {\n this.getSysDict();\n damManager.detailId(this.pId, function (res) {\n _this2.params = res.value;\n\n _this2.$set(_this2.params);\n });\n }\n },\n handleClose: function handleClose() {\n this.params = {\n damCode: null,\n //大坝代码\n damName: null,\n //大坝名称\n damGrad: null,\n //大坝级别\n damLoc: null,\n //大坝所在位置\n damMaxHeig: null,\n //最大坝高(\n damTopElev: null,\n //坝顶高程\n damTopLen: null,\n //坝顶长度\n damTopWid: null,\n //坝顶宽度\n damTypeMat: null,\n //大坝材料类型(参考字典)\n damTypeStr: null,\n //大坝结构类型(参考字典)\n elevSys: null,\n //高程系统(参考字典)\n endLat: null,\n //终点纬度(单位:度)\n endLong: null,\n //终点经度(单位:度)\n engGrad: null,\n //工程等别(参考字典)\n engStat: null,\n //工程建设情况\n ifMainDam: null,\n //是否主坝\n rscd: null,\n //水库代码\n rsnm: null,\n //水库名称只在列表展示使用\n startDate: null,\n //开工时间\n startLat: null,\n //起点纬度(单位:度\n startLong: null,\n //起点经度(单位:度)\n note: null\n };\n this.$emit('closeFormDiao');\n },\n goInfo: function goInfo(e) {\n var _this3 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this3.title === '新增') {\n damManager.addSave(_this3.params, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: '新增成功',\n duration: 2000 // offset: 80\n\n });\n\n _this3.$emit('closeFormDiao');\n\n _this3.$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 (_this3.title === '修改') {\n damManager.upData(_this3.params, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000 // offset: 80\n\n });\n\n _this3.$emit('closeFormDiao');\n\n _this3.$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 getSysDict: function getSysDict() {\n var _this4 = 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 _this4.prgrs = response.data.gcdb;\n _this4.damGrads = response.data.dbjb;\n _this4.damTypeMats = response.data.dbcl;\n _this4.damTypeStrs = response.data.dbjg;\n _this4.elevSyss = response.data.gcxt;\n\n if (_this4.title === '新增') {\n _this4.params.damGrad = _this4.damGrads[0].value;\n }\n }, function (error) {\n reject(error);\n });\n });\n }\n }\n};",null]}