{"remainingRequest":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\BasicDataManagement\\accessRule\\component\\addRule.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\BasicDataManagement\\accessRule\\component\\addRule.vue","mtime":1720730442274},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport Breadcrumb from '@/components/Breadcrumb/index.vue'\r\nimport procurementManagement from '@/api/procurementManagement'\r\nimport expertPoolUnits from '../../expertManagement/component/expertPoolUnits.vue'\r\nexport default {\r\n name: 'add',\r\n components: {Breadcrumb, expertPoolUnits},\r\n props: {\r\n editData: Object,\r\n },\r\n data() {\r\n return {\r\n breadcrumbOpt: [{breadcrumbName: '准入规则'}, {breadcrumbName: '新增'}],\r\n saveing: false,\r\n loading: false,\r\n methodUnitsList: [],\r\n deptsProps: {\r\n value: 'alias',\r\n label: 'name',\r\n children: 'children',\r\n multiple: true,\r\n checkStrictly: true,\r\n },\r\n matCategoryList: [],\r\n options: [],\r\n rules: {\r\n procureOrgName: [\r\n {\r\n required: true,\r\n message: '请输入企业名称',\r\n trigger: 'blur',\r\n },\r\n ],\r\n addUserName: [\r\n {\r\n required: true,\r\n message: '请输入添加人姓名',\r\n trigger: 'blur',\r\n },\r\n ],\r\n necessaryStatus: [\r\n {\r\n required: true,\r\n message: '请选择是否必传',\r\n trigger: 'blur',\r\n },\r\n ],\r\n addTime: [\r\n {\r\n required: true,\r\n message: '请选择时间',\r\n trigger: 'blur',\r\n },\r\n ],\r\n matCategoryName: [\r\n {\r\n required: true,\r\n message: '请选择分类',\r\n trigger: 'blur',\r\n },\r\n ],\r\n level: [\r\n {\r\n required: true,\r\n message: '请选择分级',\r\n trigger: 'blur',\r\n },\r\n ],\r\n qualificationCategoryName: [\r\n {\r\n required: true,\r\n message: '请选择资质类别',\r\n trigger: 'blur',\r\n },\r\n ],\r\n },\r\n parameter: {\r\n procureOrgName: '',\r\n procureOrgId: '',\r\n procureOrgCode: '',\r\n addTime: '',\r\n matCategoryName: '',\r\n configQualificationList:[]\r\n },\r\n }\r\n },\r\n created() {\r\n this.getSupplierType()\r\n this.getQualification()\r\n this.addModifyBtn()\r\n this.currentUser = JSON.parse(sessionStorage.getItem('currentUserDetail'))\r\n this.parameter.procureOrgName = this.currentUser.org[0].orgName\r\n this.parameter.procureOrgId = this.currentUser.org[0].orgId\r\n this.parameter.procureOrgCode = this.currentUser.org[0].orgCode\r\n this.parameter.addUserName = this.currentUser.user.fullname\r\n },\r\n mounted() {},\r\n methods: {\r\n getTreeData(data) {\r\n for (let i = 0; i < data.length; i++) {\r\n if (data[i].children.length < 1) {\r\n // 最后一级没有数据将children变成undefined\r\n delete data[i].children\r\n } else {\r\n // children不为空时继续调用该方法\r\n this.getTreeData(data[i].children)\r\n }\r\n }\r\n return data\r\n },\r\n getSupplierType() {\r\n let params = {\r\n pageBean: {\r\n page: -1,\r\n pageSize: -1,\r\n },\r\n querys: [],\r\n }\r\n this.$http\r\n .post('${portal}/bizSupplierType/v1/page', params)\r\n .then((res) => {\r\n if (res.data.state) {\r\n this.matCategoryList = res.data.value.rows\r\n }\r\n })\r\n },\r\n getQualification() {\r\n let params = {\r\n pageBean: {\r\n page: -1,\r\n pageSize: -1,\r\n },\r\n }\r\n this.$http\r\n .post('${portal}/bizQualificationCategory/v1/page', params)\r\n .then((res) => {\r\n if (res.data.state) {\r\n let data = res.data.value.rows\r\n this.options = data\r\n }\r\n })\r\n },\r\n changeQualificat(item){\r\n this.parameter.list.forEach(val=>{\r\n if(val == item.code){\r\n this.parameter.configQualificationList.push({\r\n qualificationCategoryId:item.id\r\n })\r\n }\r\n })\r\n console.log(this.parameter.configQualificationList);\r\n },\r\n changeMat(item) {\r\n this.parameter.matCategoryId = item.id\r\n this.parameter.matCategoryCode = item.code\r\n this.parameter.matCategoryName = item.name\r\n this.parameter.vendorCategoryId = item.id\r\n this.parameter.vendorCategoryName = item.name\r\n this.parameter.vendorCategoryCode = item.code\r\n },\r\n openOrg() {\r\n this.$refs.troubleshooting.add()\r\n },\r\n addDetail(list) {\r\n this.parameter.procureOrgName = list[0].name\r\n this.parameter.procureOrgId = list[0].id\r\n this.parameter.procureOrgCode = list[0].code\r\n },\r\n //编辑\r\n addModifyBtn() {\r\n if (this.$route.query.editRows) {\r\n this.breadcrumbOpt[1].breadcrumbName = '编辑'\r\n this.modifychoData(this.$route.query.editRows)\r\n } else {\r\n this.breadcrumbOpt[1].breadcrumbName = '新增'\r\n }\r\n },\r\n //获取修改回显数据\r\n modifychoData(val) {\r\n this.loading = true\r\n this.$http\r\n .get('${portal}/purchasingApplicationRules/v1/' + val.id)\r\n .then((res) => {\r\n this.loading = false\r\n this.parameter = res.data\r\n this.parameter.approvalMenuAlias =\r\n this.parameter.approvalMenuAlias.split(',')\r\n })\r\n },\r\n // 关闭//面包屑点击\r\n handleClose() {\r\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\r\n this.$router.push({\r\n name: 'accessRule',\r\n })\r\n } else {\r\n this.$router.push({\r\n name: 'accessRule',\r\n })\r\n }\r\n this.parameter = {}\r\n },\r\n // 保存\r\n handleSave() {\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid) {\r\n this.saveing = true\r\n this.$http\r\n .post(\r\n '${portal}/admissionConfig/v1/saveOrUpdateEntity',\r\n this.parameter\r\n )\r\n .then((res) => {\r\n if (res.data.state) {\r\n this.$message.success(res.data.message)\r\n this.handleClose()\r\n }\r\n this.saveing = false\r\n })\r\n }\r\n })\r\n },\r\n },\r\n}\r\n",null]}