{"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\\expertManagement\\component\\expertPoolAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\BasicDataManagement\\expertManagement\\component\\expertPoolAddDialog.vue","mtime":1720125638776},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 basicData from '@/api/basicData'\r\nimport {mapState} from 'vuex'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\n\r\nexport default {\r\n name: 'domesticDialog',\r\n components: {Breadcrumb,dictUtils},\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 dialogVisible: false,\r\n visible: false,\r\n index: null,\r\n loading: false,\r\n aptitudeList: [],\r\n params: {},\r\n multipleSelection: [],\r\n option:[],\r\n fileList: [],\r\n sexOptions: [\r\n {\r\n name: '女',\r\n value: '0',\r\n },\r\n {\r\n name: '男',\r\n value: '1',\r\n },\r\n ],\r\n rules: {\r\n // email: [\r\n // {\r\n // required: true,\r\n // message: '请输入邮箱',\r\n // trigger: 'blur'\r\n // },\r\n // {\r\n // pattern: /^\\w{1,64}@[a-z0-9\\-]{1,256}(\\.[a-z]{2,6}){1,2}$/,\r\n // message: '邮箱格式不正确',\r\n // trigger: 'blur'\r\n // }\r\n // ],\r\n idCard: [\r\n {\r\n required: true,\r\n message: '请输入身份证号',\r\n trigger: 'blur',\r\n },\r\n {\r\n pattern: /(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)/,\r\n message: '身份证号格式不正确',\r\n trigger: 'blur',\r\n },\r\n ],\r\n mobile: [\r\n {\r\n required: true,\r\n message: '请输入手机号码',\r\n trigger: 'blur',\r\n },\r\n {\r\n pattern: /^1[3456789]\\d{9}$/,\r\n message: '手机号码格式不正确',\r\n trigger: 'blur',\r\n },\r\n ],\r\n account: [\r\n {\r\n required: true,\r\n message: '请输入门户账号',\r\n trigger: 'blur',\r\n },\r\n ],\r\n expertTypeName: [\r\n {\r\n required: true,\r\n message: '请选择专家分类',\r\n trigger: 'blur',\r\n },\r\n ],\r\n fullname: [\r\n {\r\n required: true,\r\n message: '请输入专家名称',\r\n trigger: 'blur',\r\n },\r\n ],\r\n evaType: [\r\n {\r\n required: true,\r\n message: '请选择评标类型',\r\n trigger: 'blur'\r\n }\r\n ],\r\n sex: [\r\n {\r\n required: true,\r\n message: '请选择性别',\r\n trigger: 'blur',\r\n },\r\n ],\r\n },\r\n dataList: [],\r\n parameter: {\r\n fullname: '',\r\n account: '',\r\n nation: '',\r\n address: '',\r\n idCard: '',\r\n birthday: '',\r\n type: 1,\r\n mobile: '',\r\n email: '',\r\n sex: '1',\r\n academicDegree: '',\r\n orgName: '',\r\n userNumber: '',\r\n expertTypeName: '',\r\n typeList: [],\r\n evaType:'',\r\n isAddAccount: '',\r\n qualificationLabelList: [],\r\n },\r\n }\r\n },\r\n created() {\r\n this.currentUser = JSON.parse(sessionStorage.getItem('currentUserDetail'))\r\n this.parameter.orgName = this.currentUser.org[0].orgName\r\n this.parameter.orgId = this.currentUser.org[0].orgId\r\n this.parameter.orgCode = this.currentUser.org[0].orgCode\r\n this.addModifyBtn()\r\n this.option = dictUtils.getDictItemsFromCache('zjpbfl')\r\n },\r\n computed: {\r\n ...mapState({\r\n headers: (state) => {\r\n return {Authorization: `Bearer ${state.login.currentUser.token}`}\r\n },\r\n action: function () {\r\n return window.context.portal + '/biz/universal/v1/minioUpload'\r\n },\r\n }),\r\n },\r\n mounted() {},\r\n methods: {\r\n open() {\r\n this.getExpert()\r\n this.dialogVisible = true\r\n },\r\n handleOpen(row, index) {\r\n this.params = row\r\n this.index = index\r\n this.loading = true\r\n this.visible = true\r\n basicData.bizQualificationCategoryQuery(this.queryParam).then((res) => {\r\n this.loading = false\r\n this.aptitudeList = res.value.rows\r\n })\r\n },\r\n dialogBeforeClose() {\r\n this.visible = false\r\n this.dialogVisible = false\r\n },\r\n // 上传附件成功回调\r\n handleSuccess(res, row, index) {\r\n this.parameter.qualificationLabelList.forEach((item, i) => {\r\n if (i == this.index) {\r\n item.accessoryList.push(res.value)\r\n }\r\n item.accessoryList.forEach((val) => {\r\n item.name = val.name\r\n item.fileTime = val.createTime\r\n item.url = val.url\r\n })\r\n })\r\n },\r\n openUpload(row) {\r\n if (\r\n row.qualificationTypeName == '' ||\r\n row.qualificationTypeName == undefined\r\n ) {\r\n this.$message.warning('请先选择资质分类')\r\n } else {\r\n this.clickUpload()\r\n }\r\n },\r\n clickUpload() {\r\n this.$refs['upload'].$refs['upload-inner'].handleClick()\r\n },\r\n //下载按钮回调\r\n downloadFile(name, url) {\r\n var a = document.createElement('a')\r\n var event = new MouseEvent('click')\r\n a.download = name\r\n a.target = '_blank'\r\n a.href = url\r\n a.dispatchEvent(event)\r\n },\r\n // 删除\r\n deleteHandle(row, index) {\r\n this.$confirm('是否确认删除该附件', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning',\r\n }).then(() => {\r\n row.accessoryList.splice(index, 1)\r\n row.name = ''\r\n row.fileTime = ''\r\n row.url = ''\r\n row.accessoryList = []\r\n })\r\n },\r\n addTable() {\r\n this.parameter.qualificationLabelList.push({\r\n qualificationTypeName: '',\r\n qualificationTypeCode: '',\r\n qualificationAcquisitionDate: '',\r\n expiryDate: '',\r\n accessoryList: [],\r\n })\r\n },\r\n //列表删除行\r\n delTable(index, row) {\r\n this.parameter.qualificationLabelList.splice(index, 1)\r\n if (row.id) {\r\n this.parameter.qualificationLabelList.push(row.id)\r\n }\r\n },\r\n //编辑\r\n addModifyBtn() {\r\n if (this.$route.query.editRows) {\r\n console.log()\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 getExpert() {\r\n basicData.bizExpertTypeQuery(this.queryParam).then((res) => {\r\n this.dataList = res.rows\r\n })\r\n },\r\n saveExpert() {\r\n this.parameter.typeList = this.multipleSelection\r\n let data = this.parameter.typeList.map((item) => {\r\n return item.expertTypeName\r\n })\r\n this.parameter.expertTypeName = data.toString()\r\n this.dialogVisible = false\r\n },\r\n clearExpertType() {\r\n this.parameter.expertTypeName = ''\r\n this.parameter.typeList = []\r\n this.multipleSelection = []\r\n this.$forceUpdate()\r\n },\r\n handleSelectionChange(val) {\r\n this.multipleSelection = val\r\n },\r\n // 联系方式验证账号是否存在\r\n handleInput(event) {\r\n let data = {\r\n mobile: event,\r\n }\r\n if (this.breadcrumbOpt[1].breadcrumbName === '新增') {\r\n this.$http.post('${portal}/api/user/query', data).then((res) => {\r\n if (res.data.value == undefined) {\r\n this.parameter.account = event\r\n this.parameter.isAddAccount = 1\r\n } else {\r\n this.parameter.account = res.data.value.account\r\n this.parameter.isAddAccount = 0\r\n }\r\n })\r\n }\r\n },\r\n selectChange(val) {\r\n this.multipleSelection = val\r\n if (this.multipleSelection.length > 1) {\r\n this.$refs.multipleSelection.toggleRowSelection(\r\n this.multipleSelection[0],\r\n false\r\n )\r\n }\r\n },\r\n save() {\r\n this.parameter.qualificationLabelList.forEach((item, index) => {\r\n if (index == this.index) {\r\n this.multipleSelection.forEach((val) => {\r\n item.qualificationTypeName = val.name\r\n item.qualificationTypeCode = val.code\r\n })\r\n }\r\n })\r\n this.dialogBeforeClose()\r\n },\r\n //获取修改回显数据\r\n modifychoData(val) {\r\n this.$http\r\n .post('${portal}/bizExpertDatabase/v1/selectOne?id=' + val.id)\r\n .then((res) => {\r\n if (res.data.state) {\r\n this.parameter = res.data.value\r\n if (this.parameter.qualificationLabelList == undefined) {\r\n this.parameter.qualificationLabelList = []\r\n }\r\n this.parameter.expertTypeName = ''\r\n if (\r\n this.parameter.typeList &&\r\n this.parameter.typeList.length != 0\r\n ) {\r\n this.parameter.expertTypeName = this.parameter.typeList.map(\r\n (item) => {\r\n return item.expertTypeName\r\n }\r\n )\r\n }\r\n if (this.parameter.orgList && this.parameter.orgList.length != 0) {\r\n this.parameter.useOrgList = this.parameter.orgList.map((item) => {\r\n return item.name\r\n })\r\n }\r\n this.parameter.qualificationLabelList.forEach((item) => {\r\n item.accessoryList.forEach((val) => {\r\n if (item.id == val.sourceId) {\r\n item.name = val.name\r\n item.url = val.url\r\n item.fileTime = val.createTime\r\n }\r\n })\r\n })\r\n }\r\n })\r\n },\r\n // 关闭//面包屑点击\r\n handleClose() {\r\n this.$router.go(-1)\r\n this.parameter = {}\r\n },\r\n // 保存\r\n handleSave() {\r\n this.parameter.qualificationLabelList.forEach((item) => {\r\n if (item.id) {\r\n delete item.id\r\n }\r\n if (item.accessoryList) {\r\n item.accessoryList.forEach((val) => {\r\n if (val.id) {\r\n delete val.id\r\n }\r\n })\r\n }\r\n })\r\n this.parameter.evaType = this.parameter.evaType.toString()\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid) {\r\n this.saveing = true\r\n basicData.bizExpertDatabaseSave(this.parameter).then((res) => {\r\n this.saveing = false\r\n if (res.state) {\r\n this.$message.success('保存成功')\r\n this.handleClose()\r\n }\r\n })\r\n }\r\n })\r\n },\r\n },\r\n}\r\n",null]}