| | |
| | | v-model="state.formData.leader.name" |
| | | size="large" |
| | | placeholder="请选择项目负责人" |
| | | @focus="openExperts('项目负责人')" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openExperts('项目负责人')"/> |
| | |
| | | v-model="state.formData.transmitPerson" |
| | | size="large" |
| | | placeholder="请选择任务下达人" |
| | | @focus="openExperts('任务下达人')" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openExperts('任务下达人')"/> |
| | |
| | | import {defineEmits, onMounted, reactive, ref} from "vue"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {Search} from '@element-plus/icons-vue' |
| | | import {addRisk, editRisk, getRiskDetail} from "@/api/projectManage/riskAnalysis"; |
| | | import {addRecord, editRecord, getDetail} from "@/api/projectManage/evaTaskNotice"; |
| | | import Cookies from "js-cookie" |
| | | import ExpertsList from "./expertsList"; |
| | | const emit = defineEmits(["getNextStatus"]); |
| | |
| | | const state = reactive({ |
| | | formData: { |
| | | id: '', |
| | | projectId: null, |
| | | leader: { |
| | | name: '' |
| | | }, |
| | | fax: '', |
| | | leaderId: null, |
| | | linkMan: '', |
| | | transmitPerson: '', |
| | |
| | | }) |
| | | |
| | | const riskOpen = async (type,val) => { |
| | | state.formData.projectId = val |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | const res = await getRiskDetail({projectId: val}); |
| | | const res = await getDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | state.formData = res.data; |
| | | }else { |
| | |
| | | } |
| | | if(type === 'add'){ |
| | | const {id, ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await addRisk(data); |
| | | const res = await addRecord(data); |
| | | if (res.code == 200) { |
| | | ElMessage.success('保存成功') |
| | | formRef.value.clearValidate(); |
| | | emit('getNextStatus', res.data); |
| | | emit('getNextStatus', state.formData.projectId); |
| | | |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }else if(type === 'clickEdit'){ |
| | | }else{ |
| | | const { ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await editRisk(data); |
| | | const res = await editRecord(data); |
| | | if (res.code == 200) { |
| | | ElMessage.success('变更成功') |
| | | formRef.value.clearValidate(); |