{"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\\infoManagement\\components\\rmForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\components\\rmForm-dialog.vue","mtime":1684458239215},{"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.to-string\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.split\";\nimport _defineProperty from \"D:/jenkins/workspace/bbsl-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { mapState } from 'vuex';\nimport rivers from '@/api/rivers.js';\nimport latitude from '@/mixins/latitude';\nimport req from '@/request.js';\nexport default {\n name: 'FormDialog',\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 var _params;\n\n return {\n multipleSelections: [],\n activeName: 'first',\n props: {\n multiple: true,\n value: 'id',\n label: 'name',\n children: 'children'\n },\n propss: {\n multiple: true,\n value: 'id',\n label: 'name',\n children: 'children'\n },\n propsareaId: {\n multiple: false,\n value: 'id',\n label: 'name',\n children: 'children'\n },\n params: (_params = {\n rvLen: null,\n rvInsideLen: null,\n //境内河道长度\n rvBasArea: null,\n //境内流域面积\n rvSystem: null,\n //所属水系 \n jnBasArea: null,\n //境内流域面积\n region: null,\n //境内设计行政区\n rvFunction: null,\n //河道功能\n averSlop: null,\n //平均比降\n bank: null,\n //岸别(参考字典\n crOverType: null,\n //跨界类型参考字典\n flowArea: null\n }, _defineProperty(_params, \"rvBasArea\", null), _defineProperty(_params, \"code\", null), _defineProperty(_params, \"rvGrad\", null), _defineProperty(_params, \"rvMouLong\", null), _defineProperty(_params, \"rvMouLat\", null), _defineProperty(_params, \"rvMouLoc\", null), _defineProperty(_params, \"name\", null), _defineProperty(_params, \"rvSourLat\", null), _defineProperty(_params, \"rvSourLoc\", null), _defineProperty(_params, \"rvSourLong\", null), _defineProperty(_params, \"rvType\", null), _defineProperty(_params, \"rvSourLat\", null), _defineProperty(_params, \"parentId\", null), _defineProperty(_params, \"rvInsideStart\", null), _defineProperty(_params, \"rvInsideStartLoc\", null), _defineProperty(_params, \"rvInsideStartLong\", null), _defineProperty(_params, \"rvInsideEnd\", null), _defineProperty(_params, \"rvInsideEndLoc\", null), _defineProperty(_params, \"rvInsideEndLong\", null), _defineProperty(_params, \"note\", null), _defineProperty(_params, \"riverBaseList\", {\n name: null,\n chief: null,\n leftBank: null,\n rightBank: null,\n rvBasArea: null,\n rvSourLoc: null,\n rvMouLoc: null,\n riverAreaList: []\n }), _params),\n count: 0,\n rvFunctions: [],\n //河道功能\n areaIds: [],\n crOverTypes: [],\n //跨界类型字典数组\n banks: [],\n //岸别数组\n rvGrads: [],\n //河流级别\n rvTypes: [],\n //河流类型字典\n rvBelong: [],\n //所属水系\n parentIds: [],\n //河流下拉\n basAdNames: [],\n //行政下拉\n AdName: null,\n //接受每次选中的值\n region: null,\n areaId: null,\n setKesLabel: {\n value: 'code',\n label: 'name',\n children: 'children'\n },\n rules: {\n name: [{\n required: true,\n message: '请输入河流名称',\n trigger: 'blur'\n }],\n code: [{\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 rivers.getbasAdName({}, function (res) {\n _this.basAdNames = res.value;\n }); // 河流下拉\n\n rivers.getParentIds({}, function (res) {\n var cj = {\n fullName: \"/长江\",\n id: \"-1\",\n name: \"长江\"\n };\n res.value.unshift(cj);\n _this.parentIds = res.value;\n }); // 乡镇信息区划\n\n rivers.getAreaIds({}, function (res) {\n _this.areaIds = res.value;\n });\n },\n methods: {\n deadLevs: function deadLevs(val) {\n switch (val) {\n case '1':\n this.params.rvLen = latitude.SixTree(this.params.rvLen);\n break;\n\n case '2':\n this.params.rvBasArea = latitude.ElghtTwo(this.params.rvBasArea);\n break;\n\n case '3':\n this.params.rvMouLat = latitude.TreeFour(this.params.rvMouLat);\n break;\n\n case '4':\n this.params.rvMouLong = latitude.TreeFour(this.params.rvMouLong);\n break;\n\n case '5':\n this.params.rvSourLong = latitude.TreeFour(this.params.rvSourLong);\n break;\n\n case '6':\n this.params.rvSourLat = latitude.TreeFour(this.params.rvSourLat);\n break;\n\n case '7':\n this.params.rvInsideStartLoc = latitude.TreeFour(this.params.rvInsideStartLoc);\n break;\n\n case '8':\n this.params.rvInsideStartLong = latitude.TreeFour(this.params.rvInsideStartLong);\n break;\n\n case '9':\n this.params.rvInsideEndLoc = latitude.TreeFour(this.params.rvInsideEndLoc);\n break;\n\n case '10':\n this.params.rvInsideEndLong = latitude.TreeFour(this.params.rvInsideEndLong);\n break;\n\n case '17':\n this.params.rvInsideLen = latitude.SixTree(this.params.rvInsideLen);\n break;\n\n default:\n this.params.jnBasArea = latitude.ElghtTwo(this.params.jnBasArea);\n }\n },\n heDuan: function heDuan(val) {\n switch (val) {\n case '1':\n this.params.riverBaseList.rvBasArea = latitude.ElghtTwo(this.params.riverBaseList.rvBasArea);\n break;\n\n case '2':\n this.params.riverBaseList.leftBank = latitude.ElghtTwo(this.params.riverBaseList.leftBank);\n break;\n\n case '3':\n this.params.riverBaseList.rightBank = latitude.ElghtTwo(this.params.riverBaseList.rightBank);\n break;\n\n default:\n this.params.riverBaseList.chief = latitude.ElghtTwo(this.params.riverBaseList.chief);\n }\n },\n addAcounts: function addAcounts() {\n var num = this.count++;\n this.params.riverBaseList.riverAreaList.push({\n ident: num,\n areaId: null,\n rvMouLoc: null,\n rvSourLoc: null,\n theLength: null,\n villageIds: [],\n villageNumber: null\n });\n },\n deletAcounts: function deletAcounts() {\n if (this.multipleSelections.length != 0) {\n var list = this.arrayRepeat(this.multipleSelections, this.params.riverBaseList.riverAreaList);\n this.params.riverBaseList.riverAreaList = JSON.parse(JSON.stringify(list));\n this.$refs.multipleSelections.clearSelection();\n }\n },\n handleChanges: function handleChanges(val) {\n this.multipleSelections = val.map(function (item, index) {\n return item;\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.id;\n var isExist = false;\n\n for (var j = 0; j < array1.length; j++) {\n var aj = array1[j];\n var n = aj.id;\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 calleArr: function calleArr(array, val, data) {\n for (var i in array) {\n var item = array[i];\n\n if (item.children) {\n data.push(item.id);\n this.calleArr(item.children, val, data); //自己调用自己\n } else {\n if (item.id === val) {\n if (item.parentId != data[data.length - 1]) {\n data.splice(data.length - 1, 1);\n }\n\n data.push(item.id);\n }\n }\n }\n\n return data;\n },\n // 根据ID查询\n getDetailInfo: function getDetailInfo() {\n var _this2 = this;\n\n if (this.title === '修改') {\n rivers.getbasAdName({}, function (res) {\n _this2.basAdNames = res.value;\n rivers.detailId(_this2.pId, function (res) {\n if (res.state) {\n if (res.value.riverBaseList) {\n _this2.params = res.value;\n _this2.params.rvFunction = res.value.rvFunction.split(\",\");\n _this2.params = res.value;\n var arr = res.value.region.split(\",\");\n var arr2 = [];\n\n for (var i = 0; i < arr.length; i++) {\n arr2.push(arr[i].split(\"/\"));\n arr2[i].shift();\n arr2[i][0] = \"/\" + arr2[i][0];\n\n for (var index = 1; index < arr2[i].length; index++) {\n arr2[i][index] = arr2[i][index - 1] + \"/\" + arr2[i][index];\n }\n }\n\n _this2.params.region = arr2;\n\n if (_this2.params.riverBaseList.riverAreaList) {\n var _arr = _this2.params.riverBaseList.riverAreaList[0].villageIds.split(\",\");\n\n var _arr2 = [];\n\n for (var _i = 0; _i < _arr.length; _i++) {\n _arr2.push(_arr[_i].split(\"/\"));\n\n _arr2[_i].shift();\n\n _arr2[_i][0] = \"/\" + _arr2[_i][0];\n\n for (var _index = 1; _index < _arr2[_i].length; _index++) {\n _arr2[_i][_index] = _arr2[_i][_index - 1] + \"/\" + _arr2[_i][_index];\n }\n }\n\n _this2.params.riverBaseList.riverAreaList[0].villageIds = _arr2;\n }\n } else {\n _this2.params.name = res.value.name;\n _this2.params.code = res.value.code;\n _this2.params.jnBasArea = res.value.jnBasArea;\n _this2.params.rvSystem = res.value.rvSystem;\n _this2.params.region = res.value.region;\n _this2.params.rvBasArea = res.value.rvBasArea;\n _this2.params.rvFunction = res.value.rvFunction;\n _this2.params.averSlop = res.value.averSlop;\n _this2.params.bank = res.value.bank;\n _this2.params.crOverType = res.value.crOverType;\n _this2.params.flowArea = res.value.flowArea;\n _this2.params.rvGrad = res.value.rvGrad;\n _this2.params.rvMouLong = res.value.rvMouLong;\n _this2.params.rvMouLat = res.value.rvMouLat;\n _this2.params.rvMouLoc = res.value.rvMouLoc;\n _this2.params.rvInsideStart = res.value.rvInsideStart;\n _this2.params.rvInsideStartLoc = res.value.rvInsideStartLoc;\n _this2.params.rvInsideStartLong = res.value.rvInsideStartLong;\n _this2.params.rvInsideEnd = res.value.rvInsideEnd;\n _this2.params.rvInsideEndLoc = res.value.rvInsideEndLoc;\n _this2.params.rvInsideEndLong = res.value.rvInsideEndLong;\n _this2.params.rvSourLat = res.value.rvSourLat;\n _this2.params.rvSourLoc = res.value.rvSourLoc;\n _this2.params.rvSourLong = res.value.rvSourLong;\n _this2.params.rvType = res.value.rvType;\n _this2.params.id = res.value.id;\n _this2.params.parentId = res.value.parentId;\n _this2.params.note = res.value.note;\n _this2.params.riverBaseList.riverAreaList;\n }\n\n _this2.$set(_this2.params);\n }\n });\n });\n this.getSysDict();\n } else {}\n },\n changeAreaId: function changeAreaId(val) {\n // val.areaId = val[val.length - 1];\n this.areaId = val;\n },\n changeregion: function changeregion(val) {\n if (val) {\n var arr = [];\n val.forEach(function (e) {\n arr.push(e[e.length - 1]);\n });\n arr = arr.toString();\n this.region = arr;\n }\n },\n chanvillageIds: function chanvillageIds(val, e) {\n val.villageNumber = e.length; //个数赋值\n },\n changervFunction: function changervFunction(val) {\n if (val) {\n this.params.rvFunction = val;\n } else {\n this.params.rvFunction = null;\n }\n },\n changeparentId: function changeparentId(val) {\n if (val) {\n this.params.parentId = val[val.length - 1];\n } else {\n this.params.parentId = null;\n }\n },\n changervGrad: function changervGrad(val) {\n if (val) {\n this.params.rvGrad = val;\n } else {\n this.params.rvGrad = null;\n }\n },\n changervType: function changervType(val) {\n if (val) {\n this.params.rvType = val;\n } else {\n this.params.rvType = null;\n }\n },\n changeBank: function changeBank(val) {\n if (val) {\n this.params.bank = val;\n } else {\n this.params.bank = null;\n }\n },\n changecrOverType: function changecrOverType(val) {\n if (val) {\n this.params.crOverType = val;\n } else {\n this.params.crOverType = null;\n }\n },\n handleClose: function handleClose() {\n var _this$params;\n\n this.params = (_this$params = {\n averSlop: null,\n //平均比降\n bank: null,\n //岸别(参考字典\n crOverType: null,\n //跨界类型参考字典\n flowArea: null,\n //流经地区\n rvBasArea: null,\n //河流流域面积(单位:km2)\n code: null,\n //河流代码(唯一值,参考国标)\n rvGrad: null,\n //河流长度(单位:km)\n rvMouLong: null,\n //河口经度(单位:[°])\n rvMouLat: null,\n //河口wei度(单位:[°])\n rvMouLoc: null,\n //河口所在位置\n name: null,\n //h、河流名称\n rvSourLat: null,\n //河源纬度(单位:[°])\n rvSourLoc: null,\n //河源所在位置\n rvSourLong: null,\n //河源经度(单位:[°])\n rvType: null\n }, _defineProperty(_this$params, \"rvSourLat\", null), _defineProperty(_this$params, \"rvInsideStart\", null), _defineProperty(_this$params, \"rvInsideStartLoc\", null), _defineProperty(_this$params, \"rvInsideStartLong\", null), _defineProperty(_this$params, \"rvInsideEnd\", null), _defineProperty(_this$params, \"rvInsideEndLoc\", null), _defineProperty(_this$params, \"rvInsideEndLong\", null), _defineProperty(_this$params, \"note\", null), _defineProperty(_this$params, \"rvInsideLen\", null), _this$params);\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 var arr = JSON.parse(JSON.stringify(_this3.params));\n arr.region = _this3.region; //表格 \n\n arr.rvFunction = String(arr.rvFunction);\n\n _this3.params.riverBaseList.riverAreaList.forEach(function (v) {\n var villageIdString = [];\n\n if (v.villageIds.length != 0) {\n v.villageIds.forEach(function (itm) {\n villageIdString.push(itm[itm.length - 1]);\n });\n }\n\n arr.riverBaseList.riverAreaList.forEach(function (t) {\n t.areaId = t.areaId[t.areaId.length - 1];\n\n if (v.id === t.id) {\n delete t['villageIds'];\n t['villageIds'] = villageIdString.toString();\n }\n });\n });\n\n if (arr.riverBaseList.chief == null) {\n delete arr.riverBaseList;\n }\n\n rivers.addSave(arr, 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');\n } else {}\n });\n }\n\n if (_this3.title === '修改') {\n var _arr3 = JSON.parse(JSON.stringify(_this3.params)); // arr.region = this.region;\n //表格 \n\n\n _this3.params.riverBaseList.riverAreaList.forEach(function (v) {\n var villageIdString = [];\n\n if (v.villageIds.length != 0) {\n v.villageIds.forEach(function (itm) {\n villageIdString.push(itm[itm.length - 1]);\n });\n }\n\n _arr3.riverBaseList.riverAreaList.forEach(function (t) {\n var areid = '';\n\n if (typeof t.areaId != 'string') {\n areid = t.areaId[t.areaId.length - 1];\n } else {\n areid = t.areaId;\n }\n\n if (v.id === t.id) {\n delete t['areaId'];\n t['areaId'] = areid;\n delete t['villageIds'];\n t['villageIds'] = villageIdString.toString();\n }\n });\n });\n\n var arrs = [];\n\n for (var i = 0; i < _arr3.region.length; i++) {\n arrs.push(_arr3.region[i][_arr3.region[i].length - 1]);\n }\n\n _arr3.region = String(arrs);\n _arr3.rvFunction = String(_arr3.rvFunction);\n delete _arr3.fullId;\n delete _arr3.fullName;\n delete _arr3.flowArea;\n delete _arr3.createTime;\n rivers.upData(_arr3, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000\n });\n\n _this3.$emit('closeFormDiao');\n\n _this3.$emit('refList');\n } else {}\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.crOverTypes = response.data.kjlx;\n _this4.banks = response.data.hlab; //岸别\n\n _this4.rvGrads = response.data.hljb;\n _this4.rvTypes = response.data.hllx;\n _this4.rvFunction = response.data.hdgn;\n _this4.rvFunctions = response.data.hdgn;\n _this4.rvBelong = response.data.sx;\n _this4.params.rvSystem = _this4.rvBelong[0].value;\n _this4.params.bank = _this4.banks[0].value;\n _this4.params.rvGrad = _this4.rvGrads[0].value;\n _this4.params.rvType = _this4.rvTypes[0].value;\n _this4.params.crOverType = _this4.crOverTypes[0].value;\n }, function (error) {\n reject(error);\n });\n });\n },\n getRowKey: function getRowKey(row) {\n return row.id;\n }\n }\n};",null]}