| | |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="评审文件:" prop="productItemIds"> |
| | | <el-form-item label="评审文件:" required> |
| | | <el-select |
| | | clearable |
| | | multiple |
| | | v-model="state.productItems" |
| | | :disabled="state.title =='查看'" |
| | | filterable |
| | | @change="changeFile" |
| | | value-key="id" |
| | | style="width: 100%"> |
| | | <el-option |
| | | v-for="item in state.itemFileList" |
| | |
| | | import {getToken} from "@/utils/auth"; |
| | | import {delPic} from "@/api/onlineEducation/banner"; |
| | | import {addFile, editFile} from "@/api/qualityManage/range"; |
| | | import {addProductFile, editProductFile, getProductFilePage, getProductSet} from "@/api/selfProblems/productFile"; |
| | | import { |
| | | addProductFile, |
| | | editProductFile, |
| | | getProductFileList, |
| | | getProductFilePage, |
| | | getProductSet |
| | | } from "@/api/selfProblems/productFile"; |
| | | import Cookies from "js-cookie"; |
| | | import {addReview, editReview} from "@/api/selfProblems/projectReview"; |
| | | import {getStudent} from "@/api/onlineEducation/student"; |
| | |
| | | leaderId: null, |
| | | leaderTime: "", |
| | | productItemIds: null, |
| | | processItemIds:null |
| | | }, |
| | | formRules:{ |
| | | companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }], |
| | |
| | | groupTime: [{ required: true, message: '请选择时间', trigger: 'blur' }], |
| | | leaderId: [{ required: true, message: '请选择评审领导', trigger: 'blur' }], |
| | | leaderTime: [{ required: true, message: '请选择时间', trigger: 'blur' }], |
| | | productItemIds: [{ required: true, message: '请选择项目文件', trigger: 'blur' }], |
| | | // productItemIds: [{ required: true, message: '请选择项目文件', trigger: 'blur' }], |
| | | }, |
| | | rules:{ |
| | | reviewUserId: [{ required: true, message: '', trigger: 'blur' }], |
| | |
| | | name: '评审组员' |
| | | }, |
| | | ], |
| | | productItems:[] |
| | | productItems:[], |
| | | paojectDocuments:[], |
| | | processInspections:[] |
| | | }) |
| | | onMounted(() => { |
| | | |
| | |
| | | } |
| | | }) |
| | | await nextTick(); |
| | | state.productItems = state.form.productItemIds.split(',').map(item => Number(item)) |
| | | |
| | | |
| | | const productItemIdList = state.form.productItemIds ?state.form.productItemIds.split(',').map(item => Number(item)):[] |
| | | const processItemIdList = state.form.processItemIds?state.form.processItemIds.split(',').map(item => Number(item)):[] |
| | | state.productItems = productItemIdList.concat(processItemIdList) |
| | | if(value.filePath) { |
| | | const obj = { |
| | | url: value.filePath, |
| | |
| | | }; |
| | | |
| | | const onSubmit = async () => { |
| | | state.form.productItemIds = state.productItems.join(',') |
| | | // state.form.productItemIds = state.productItems.join(',') |
| | | const valid = await superRef.value.validate(); |
| | | if(valid){ |
| | | if(!state.form.processItemIds && !state.form.productItemIds){ |
| | | ElMessage.warning('请选择评审文件') |
| | | return |
| | | } |
| | | if(state.form.type == 1 && state.form.reviewUsers && state.form.reviewUsers.length == 0){ |
| | | ElMessage.warning('请填写合同评审人员签署表') |
| | | return |
| | |
| | | leaderId: null, |
| | | leaderTime: "", |
| | | productItemIds: null, |
| | | processItemIds:null |
| | | } |
| | | state.fileList = [] |
| | | state.peopleList = [] |
| | | state.productItems = [] |
| | | state.paojectDocuments=[] |
| | | state.processInspections=[] |
| | | superRef.value.clearValidate(); |
| | | superRef.value.resetFields() |
| | | dialogVisible.value = false; |
| | |
| | | const changeCom = () => { |
| | | state.form.itemId = null |
| | | state.form.productItemIds = null |
| | | state.form.processItemIds = null |
| | | state.productItems = [] |
| | | state.form.reviewUsers.forEach(item => { |
| | | item.reviewUserId = null |
| | |
| | | |
| | | const changeItem = () => { |
| | | state.form.productItemIds = null |
| | | state.form.processItemIds = null |
| | | state.productItems = [] |
| | | getFileList() |
| | | } |
| | |
| | | } |
| | | const queryParams = { |
| | | companyId: state.form.companyId, |
| | | type: 2, |
| | | itemId: state.form.itemId, |
| | | pageSize:9999, |
| | | pageNum: 1 |
| | | } |
| | | const res = await getProductFilePage(queryParams) |
| | | const res = await getProductFileList(queryParams) |
| | | if (res.code == 200) { |
| | | state.itemFileList = res.data.list.map(item => { |
| | | state.paojectDocuments = res.data.data.paojectDocuments.map(item => { |
| | | return { |
| | | ...item, |
| | | fileNameSimple: item.fileName.split('.')[0] |
| | | flag:1 |
| | | } |
| | | }) |
| | | state.processInspections = res.data.data.processInspections.map(item => { |
| | | return { |
| | | ...item, |
| | | flag:2 |
| | | } |
| | | }) |
| | | state.itemFileList = state.paojectDocuments.concat(state.processInspections) |
| | | // state.itemFileList = res.data.list.map(item => { |
| | | // return { |
| | | // ...item, |
| | | // fileNameSimple: item.fileName.split('.')[0] |
| | | // } |
| | | // }) |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | state.form.leaderId = null |
| | | state.form.leaderTime = null |
| | | state.form.productItemIds = null |
| | | state.form.processItemIds = null |
| | | |
| | | state.productItems = [] |
| | | }else if(state.form.type == 1){ |
| | | state.form.stage = '' |
| | |
| | | state.form.reviewUsers[index].userDuty = obj[0].duty |
| | | |
| | | } |
| | | const changeFile = (ids) => { |
| | | state.form.productItemIds = ids.filter(id => { |
| | | const item = state.itemFileList.find(i => i.id === id); |
| | | return item?.flag === 1; |
| | | }); |
| | | state.form.productItemIds = state.form.productItemIds.join(',') |
| | | |
| | | state.form.processItemIds = ids.filter(id => { |
| | | const item = state.itemFileList.find(i => i.id === id); |
| | | return item?.flag === 2; |
| | | }); |
| | | state.form.processItemIds = state.form.processItemIds.join(',') |
| | | } |
| | | |
| | | defineExpose({ |
| | | openDialog |