{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\resourceManage\\components\\userOrgDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\resourceManage\\components\\userOrgDialog.vue","mtime":1667545182676},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport utils from '@/hotent-ui-util.js'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport resourceManage from '@/api/device/resourceManage.js'\r\nexport default {\r\n name: 'FormDialog',\r\n props: {\r\n showFormDias: {\r\n type: Boolean,\r\n default: false\r\n },\r\n titles: {\r\n type: String,\r\n default: ''\r\n },\r\n pId: {\r\n type: String,\r\n default: ''\r\n }\r\n },\r\n data() {\r\n return {\r\n params: {\r\n companyAddress: '',\r\n companyCode: '',\r\n companyFax: '',\r\n companyMail: '',\r\n companyMan: '',\r\n companyName: '',\r\n companyShortName: '',\r\n companyTel: '',\r\n companyTypeShow: ['1'],\r\n companyType: '',\r\n memo: ''\r\n },\r\n activeCollapse: '1',\r\n rules: {\r\n companyName: [\r\n {\r\n required: true,\r\n message: '请输入单位名称',\r\n trigger: 'blur'\r\n }\r\n ],\r\n companyShortName: [\r\n {\r\n required: true,\r\n message: '请输入单位简称',\r\n trigger: 'blur'\r\n }\r\n ],\r\n companyCode: [\r\n {\r\n required: true,\r\n message: '请输入单位编码',\r\n trigger: 'blur'\r\n }\r\n ],\r\n companyTypeShow: [\r\n {\r\n required: true,\r\n message: '请选择单位类型',\r\n trigger: 'blur'\r\n }\r\n ]\r\n },\r\n companyType: [] //单位类型\r\n }\r\n },\r\n created() {\r\n this.companyType = dictUtils.getDictItemsFromCache('dwlx')\r\n },\r\n methods: {\r\n changeType() {\r\n this.$forceUpdate()\r\n },\r\n // 根据ID查询\r\n getDetailInfo() {\r\n if (this.titles === '新增组织') {\r\n orgPerson.getPerson({}, res => {\r\n this.parentIds = res.value\r\n })\r\n }\r\n },\r\n handleClose() {\r\n this.params = {\r\n companyAddress: '',\r\n companyCode: '',\r\n companyFax: '',\r\n companyMail: '',\r\n companyMan: '',\r\n companyName: '',\r\n companyShortName: '',\r\n companyTel: '',\r\n companyTypeShow: ['1'],\r\n companyType: '',\r\n memo: ''\r\n }\r\n this.activeCollapse = '1'\r\n this.$emit('closeFormDiaos')\r\n this.$emit('refList')\r\n },\r\n handleSave() {\r\n this.$refs.formInfo.validate(valid => {\r\n if (valid) {\r\n let tempData = utils.deepClone(this.params)\r\n tempData.companyType = tempData.companyTypeShow.length\r\n ? tempData.companyTypeShow.join(',')\r\n : ''\r\n delete tempData.companyTypeShow\r\n let method\r\n if (this.titles === '新增') {\r\n method = resourceManage.addUnit\r\n }\r\n console.log(method)\r\n method(tempData, response => {\r\n if (response.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: this.titles + '成功',\r\n duration: 2000\r\n })\r\n this.$emit('closeFormDiaos')\r\n this.$emit('refList')\r\n } else {\r\n this.$message.warning(response.message)\r\n }\r\n })\r\n } else {\r\n return false\r\n }\r\n })\r\n }\r\n }\r\n}\r\n",null]}