{"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\\orgForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\components\\orgForm-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.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 orgPerson from '@/api/orgPerson.js';\nimport req from '@/request.js'; // import { addCodeInfo,getCodeInfoById,editCodeInfo } from \"@/api/cold-chain-info\";\n\nexport default {\n name: 'FormDialog',\n props: {\n showFormDias: {\n type: Boolean,\n default: false\n },\n titles: {\n type: String,\n default: ''\n },\n pId: {\n type: String,\n default: ''\n }\n },\n data: function data() {\n return {\n params: {\n areaCode: '',\n //组织所属行政区划代码\n code: '',\n //组织编码\n name: '',\n //组织名称\n note: '',\n parentId: '',\n //父级_ID\n responsibilities: '',\n //部门职责\n areaName: ''\n },\n orgName: '',\n showParentId: true,\n parentIds: [],\n //组织树数组\n basAdNames: [],\n //行政下拉\n parentIdAll: null,\n //接受每次选中的值\n AdName: null,\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.getId(); // 行政区查询\n\n orgPerson.getbasAdName({}, function (res) {\n _this.basAdNames = res.value;\n });\n },\n methods: {\n // 根据ID查询\n getDetailInfo: function getDetailInfo() {\n var _this2 = this;\n\n if (this.titles === '新增组织') {\n orgPerson.getPerson({}, function (res) {\n _this2.parentIds = res.value;\n });\n }\n },\n calleArr2: function calleArr2(array, val) {\n for (var i in array) {\n var item = array[i];\n console.log(item.id, val);\n\n if (item.id == val) {\n this.orgName = item.name;\n } else {\n this.calleArr2(item.children, val); //自己调用自己\n }\n }\n },\n getId: function getId() {\n var _this3 = this;\n\n // 组织树查询\n if (this.titles === '新增组织') {\n orgPerson.detailId(this.pId, function (res) {\n if (res.state) {\n _this3.params.parentId = res.value.id;\n\n _this3.calleArr2(_this3.parentIds, res.value.id);\n }\n });\n }\n },\n onparentIds: function onparentIds(val) {\n if (val) {\n this.params.parentId = val[val.length - 1];\n }\n },\n onhouChange: function onhouChange(val) {\n if (val) {\n this.params.areaCode = val[val.length - 1];\n var arr = this.basAdNames.filter(function (ite) {\n return ite.code === val[0];\n });\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 handleClose: function handleClose() {\n this.params = {\n areaCode: '',\n //组织所属行政区划代码\n code: '',\n //组织编码\n name: '',\n //组织名称\n note: '',\n parentId: '',\n //父级_ID\n responsibilities: '' //部门职责\n\n };\n this.$emit('closeFormDiaos');\n },\n goInfo: function goInfo(e) {\n var _this4 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this4.titles === '新增组织') {\n orgPerson.addSave(_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('closeFormDiaos');\n\n _this4.$emit('refList');\n } else {\n _this4.$message.success(response.message);\n } // this.$emit('closeFormDiao')\n // this.$router.go(-1)\n\n });\n }\n\n if (_this4.titles === '新增一级组织') {\n delete _this4.params['parentId'];\n orgPerson.addSave(_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('closeFormDiaos');\n\n _this4.$emit('refList');\n } else {\n _this4.$message.success(response.message);\n }\n });\n }\n } else {\n return false;\n }\n });\n }\n }\n};",null]}