| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-form ref="formRef" :model="state.formData" :rules="state.rules" class="register-form" label-position="top"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="projectName" label="项目名称"> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item prop="projectName" label="项目名称(事由)"> |
| | | <el-input |
| | | maxlength="100" |
| | | show-word-limit |
| | | v-model.trim="state.formData.projectName" |
| | | size="large" |
| | | placeholder="请输入项目名称" |
| | | placeholder="请输入项目名称(事由)" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="12"> |
| | | <el-form-item prop="projectDateStart" label="项目预计时间区间"> |
| | | <el-date-picker |
| | | v-model="searchTime" |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="companyName" label="被检查/对接单位"> |
| | | <el-input |
| | | v-model.trim="state.formData.companyName" |
| | | size="large" |
| | | placeholder="请输入被检查/对接单位" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="projectAddress" label="项目地点"> |
| | | |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item prop="projectAddress" label="目的地及相关企业名称等"> |
| | | <el-input |
| | | v-model.trim="state.formData.projectAddress" |
| | | size="large" |
| | | placeholder="请输入项目地点" |
| | | placeholder="请输入目的地及相关企业名称等" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="deptUserName" label="处室带队人员"> |
| | | <el-input |
| | | v-model.trim="state.formData.deptUserName" |
| | | size="large" |
| | | placeholder="请输入处室带队人员" |
| | | > |
| | | </el-input> |
| | | <el-col :span="12"> |
| | | <el-form-item prop="jobCategoryArr" label="工作类别"> |
| | | <el-checkbox-group v-model="state.formData.jobCategoryArr"> |
| | | <el-checkbox v-for="item in state.directionList" :label="item.value" :key="item.value">{{ item.label }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="24"> |
| | | <el-form-item prop="remark" label="概况描述"> |
| | | <el-form-item prop="deptUserName" label="处室人员及职务"> |
| | | <div style="display: flex"> |
| | | <div style="display: flex;flex-direction: column;"> |
| | | <div v-for="(item,index) in state.personNameJob" :key="index" style="display:flex;margin-bottom: 5px" > |
| | | <div> |
| | | <span style="font-size: 14px;font-weight: 500">姓名:</span> |
| | | <el-input |
| | | v-model.trim="item.deptUserName" |
| | | size="large" |
| | | placeholder="请输入姓名" |
| | | style="width: 200px;" |
| | | clearable |
| | | > |
| | | </el-input> |
| | | </div> |
| | | <div style="margin-left: 20px;display: flex;align-items: center"> |
| | | <span>职务:</span> |
| | | <el-input |
| | | v-model.trim="item.deptPostName" |
| | | size="large" |
| | | placeholder="请输入职务" |
| | | style="width: 200px;" |
| | | clearable |
| | | > |
| | | </el-input> |
| | | <el-icon style="margin-left: 5px;cursor: pointer" :size="20" color="red" v-if="index !== 0" @click="delPerson(index)" > |
| | | <Delete /> |
| | | </el-icon> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <el-button style="margin-left: 5px;color: white" color="#0FC7F0" @click="addPerson">增加一行</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="24"> |
| | | <el-form-item prop="remark" label="备注"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="6" |
| | | v-model.trim="state.formData.remark" |
| | | size="large" |
| | | placeholder="请输入概况描述" |
| | | placeholder="请输入备注" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | projectName: '', |
| | | projectDateStart: '', |
| | | projectDateEnd: '', |
| | | companyName: '', |
| | | jobCategoryArr: [], |
| | | projectAddress: '', |
| | | deptUserName: '', |
| | | deptPostName: { |
| | | postVos: [] |
| | | }, |
| | | remark: '' |
| | | }, |
| | | personNameJob: [ |
| | | { |
| | | deptPostName: '', |
| | | deptUserName: '' |
| | | } |
| | | ], |
| | | rules: { |
| | | projectName: [{ required: true, message: "项目名称不能为空", trigger: "blur" }], |
| | | projectName: [{ required: true, message: "项目名称(事由)不能为空", trigger: "blur" }], |
| | | projectDateStart: [{ required: true, message: "项目预计时间不能为空", trigger: "change" }], |
| | | projectAddress: [{ required: true, message: "项目地点不能为空", trigger: "blur" }], |
| | | deptUserName: [{ required: true, message: "处室带队人员不能为空", trigger: "blur" }], |
| | | remark: [{ required: true, message: "概况描述不能为空", trigger: "blur" }], |
| | | projectAddress: [{ required: true, message: "目的地及相关企业名称等不能为空", trigger: "blur" }], |
| | | // deptUserName: [{ required: true, message: "处室人人员及职务不能为空", trigger: "blur" }], |
| | | jobCategoryArr: [{ required: true, message: "工作类别不能为空", trigger: "blur" }], |
| | | }, |
| | | isAdmin: false |
| | | isAdmin: false, |
| | | directionList: [ |
| | | { |
| | | value: '1', |
| | | label: '现场检查' |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '调查评估' |
| | | }, |
| | | { |
| | | value: '3', |
| | | label: '咨询服务' |
| | | }, |
| | | { |
| | | value: '4', |
| | | label: '教育培训' |
| | | }, |
| | | { |
| | | value: '5', |
| | | label: '其他' |
| | | } |
| | | ], |
| | | }) |
| | | const formRef = ref(); |
| | | const userInfo = ref() |
| | |
| | | } |
| | | if(type === 'add'){ |
| | | if(valid){ |
| | | for(let i = 0; i < state.personNameJob.length; i++){ |
| | | if(state.personNameJob[i].deptPostName === '' || state.personNameJob[i].deptUserName === ''){ |
| | | ElMessage.warning("请输入处室人员及职务"); |
| | | return |
| | | } |
| | | } |
| | | //保存按钮 |
| | | const {id,...data} = state.formData |
| | | const {id,jobCategoryArr,...data} = state.formData |
| | | data.jobCategory = Array.isArray(state.formData.jobCategoryArr)? state.formData.jobCategoryArr.join(',') : '' |
| | | data.deptPostName.postVos = state.personNameJob |
| | | console.log('data',data) |
| | | const res = await addProject(data); |
| | | if(res.code == 200){ |
| | | ElMessage.success('新增成功') |
| | |
| | | }else if(type === 'clickEdit'){ |
| | | if(valid){ |
| | | //变更按钮 |
| | | const {...data} = state.formData |
| | | for(let i = 0; i < state.personNameJob.length; i++){ |
| | | if(state.personNameJob[i].deptPostName === '' || state.personNameJob[i].deptUserName === ''){ |
| | | ElMessage.warning("请输入处室人员及职务"); |
| | | return |
| | | } |
| | | } |
| | | const {jobCategoryArr,...data} = state.formData |
| | | data.jobCategory = Array.isArray(state.formData.jobCategoryArr)? state.formData.jobCategoryArr.join(',') : '' |
| | | data.deptPostName.postVos = state.personNameJob |
| | | const res = await addProject(data); |
| | | if(res.code == 200){ |
| | | ElMessage.success('修改成功') |
| | |
| | | } |
| | | } |
| | | searchTime.value = [res.data.projectDateStart,res.data.projectDateEnd] |
| | | } |
| | | if(res.data.jobCategory && res.data.jobCategory!==''){ |
| | | state.formData.jobCategoryArr = res.data.jobCategory.split(',') |
| | | }else{ |
| | | state.formData.jobCategoryArr = [] |
| | | } |
| | | if(res.data.deptPostName && res.data.deptPostName.postVos.length>0){ |
| | | state.personNameJob = res.data.deptPostName.postVos |
| | | }else { |
| | | state.personNameJob = [ |
| | | { |
| | | deptPostName: '', |
| | | deptUserName: '' |
| | | } |
| | | ] |
| | | } |
| | | |
| | | } |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | projectName: '', |
| | | projectDateStart: '', |
| | | projectDateEnd: '', |
| | | companyName: '', |
| | | jobCategoryArr: [], |
| | | projectAddress: '', |
| | | deptUserName: '', |
| | | remark: '' |
| | |
| | | state.formData.projectDateEnd = searchTime.value[1] |
| | | } |
| | | } |
| | | const addPerson = () => { |
| | | const obj = { |
| | | deptPostName: '', |
| | | deptUserName: '' |
| | | } |
| | | state.personNameJob.push(obj) |
| | | } |
| | | |
| | | const delPerson = (val) => { |
| | | state.personNameJob = state.personNameJob.filter((item,index) => index != val) |
| | | } |
| | | |
| | | defineExpose({ |
| | | riskOpen |
| | | }); |
| | |
| | | <template> |
| | | <div class="expertChoose"> |
| | | <div style="margin-bottom: 50px"> |
| | | <div class="fTop"> |
| | | <span style="font-weight: 600">固定选用部分</span> |
| | | <el-button type="primary" :disabled="state.info.step == 4 || state.isAdmin" style="width: 100px" @click="chooseExpert('选取专家')">选取专家</el-button> |
| | | </div> |
| | | <el-table v-loading="fLoading" :data="fixedDataList" :border="true" ref="fTableRef" style="width: 100%;"> |
| | | <el-table-column label="姓名" prop="name" align="center" /> |
| | | <el-table-column label="性别" prop="sex" align="center" > |
| | | <template #default="scope"> |
| | | {{scope.row.sex === 0 ? '男' : '女' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="身份证号" prop="idCard" align="center" /> |
| | | <el-table-column label="等级" prop="ratingLevel" align="center" > |
| | | <template #default="scope"> |
| | | <span>{{scope.row.ratingLevel == 1 ?'一级':scope.row.ratingLevel == 1?'二级':'三级'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="专业领域" prop="domain" align="center" /> |
| | | <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="180"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="delF(scope.row)" :disabled="state.info.step == 4 || state.isAdmin">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!-- <div style="margin-bottom: 50px">--> |
| | | <!-- <div class="fTop">--> |
| | | <!-- <span style="font-weight: 600">固定选用部分</span>--> |
| | | <!-- <el-button type="primary" :disabled="state.info.step == 4 || state.isAdmin" style="width: 100px" @click="chooseExpert('选取专家')">选取专家</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- <el-table v-loading="fLoading" :data="fixedDataList" :border="true" ref="fTableRef" style="width: 100%;">--> |
| | | <!-- <el-table-column label="姓名" prop="name" align="center" />--> |
| | | <!-- <el-table-column label="性别" prop="sex" align="center" >--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- {{scope.row.sex === 0 ? '男' : '女' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column label="身份证号" prop="idCard" align="center" />--> |
| | | <!-- <el-table-column label="等级" prop="ratingLevel" align="center" >--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <span>{{scope.row.ratingLevel == 1 ?'一级':scope.row.ratingLevel == 1?'二级':'三级'}}</span>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column label="专业领域" prop="domain" align="center" />--> |
| | | <!-- <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="180">--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-button link type="primary" @click="delF(scope.row)" :disabled="state.info.step == 4 || state.isAdmin">删除</el-button>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- </el-table>--> |
| | | <!-- </div>--> |
| | | <div style="display: flex;flex-direction: column"> |
| | | <span style="font-weight: 600">随机选用部分</span> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" style="margin-top: 10px" label-width="90px"> |
| | |
| | | <template> |
| | | <div class="approval"> |
| | | <el-form :model="state.dataForm" ref="dataForm" :inline="true" style="margin-top: 10px" label-width="130px" > |
| | | <el-form :model="state.dataForm" ref="dataForm" :inline="true" style="margin-top: 10px" label-width="180px" > |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目名称:"> |
| | | <el-form-item label="项目名称(事由):"> |
| | | <span>{{state.dataForm.projectName}}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="被检查/对接单位:"> |
| | | <span>{{state.dataForm.companyName ? state.dataForm.companyName: '--'}}</span> |
| | | <el-form-item label="项目预计时间区间:"> |
| | | <span>{{state.dataForm.projectDateStart}}—{{state.dataForm.projectDateEnd}}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计划实行时间:"> |
| | | <span>{{state.dataForm.projectDateStart}}—{{state.dataForm.projectDateEnd}}</span> |
| | | <el-form-item label="目的地及相关企业名称等:"> |
| | | <span>{{state.dataForm.projectAddress}}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目地点:"> |
| | | <span>{{state.dataForm.projectAddress}}</span> |
| | | <el-form-item prop="jobCategoryArr" label="工作类别"> |
| | | <el-checkbox-group v-model="state.jobCategoryArr" disabled> |
| | | <el-checkbox v-for="item in state.directionList" :label="item.value" :key="item.value">{{ item.label }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="项目概况:"> |
| | | <el-form-item label="备注:"> |
| | | <span>{{state.dataForm.remark}}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | import {generateWordDocument} from "@/views/safetyReview/projectManage/components/exportWord"; |
| | | import {addProject, checkProject, choose, getCheckInfo, getFileInfo, getProjectList} from "@/api/projectManage"; |
| | | import Cookies from "js-cookie"; |
| | | import moment from "moment"; |
| | | const emit = defineEmits(["getNextStatus","backStatus"]); |
| | | const prop = defineProps(['projectId']) |
| | | const tableRef = ref() |
| | |
| | | projectCheckTime: '', |
| | | state: '' |
| | | }, |
| | | jobCategoryArr: [], |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 20, |
| | |
| | | }, |
| | | fileList: [], |
| | | projectId: null, |
| | | isAdmin: false |
| | | isAdmin: false, |
| | | directionList: [ |
| | | { |
| | | value: '1', |
| | | label: '现场检查' |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '调查评估' |
| | | }, |
| | | { |
| | | value: '3', |
| | | label: '咨询服务' |
| | | }, |
| | | { |
| | | value: '4', |
| | | label: '教育培训' |
| | | }, |
| | | { |
| | | value: '5', |
| | | label: '其他' |
| | | } |
| | | ], |
| | | }); |
| | | const projectType = ref('') |
| | | const userInfo = ref() |
| | |
| | | state.dataList = res.data.projectExpertCheckResp.map(item => { |
| | | return { |
| | | ...item, |
| | | teamLeader: item.teamLeader ? item.teamLeader : 0 |
| | | teamLeader: item.teamLeader ? item.teamLeader : 0, |
| | | expertName: item.name |
| | | } |
| | | }) |
| | | if(res.data) { |
| | |
| | | } |
| | | } |
| | | state.dataForm.projectCheckTime = res.data.projectCheckTime ?res.data.projectCheckTime : '' |
| | | if(res.data.jobCategory && res.data.jobCategory!==''){ |
| | | state.jobCategoryArr = res.data.jobCategory.split(',') |
| | | }else{ |
| | | state.jobCategoryArr = [] |
| | | } |
| | | } |
| | | state.loading = false; |
| | | }else{ |
| | |
| | | const templatePath = '/example.docx'; |
| | | const startGeneration = async () => { |
| | | const data = state.dataForm |
| | | data.companyName = data.companyName != '' ? data.companyName: '-' |
| | | data.projectCheckTime = data.projectCheckTime != '' ? data.projectCheckTime: '-' |
| | | let day = new Date(data.projectDateEnd).getTime() - new Date(data.projectDateStart).getTime(); |
| | | let dayCount = Math.floor(day / 86400000) ; |
| | | data.planTime = moment(data.projectDateStart).format('YYYY年MM月DD日') + ' 至 ' + moment(data.projectDateEnd).format('YYYY年MM月DD日') +','+`共计${dayCount}天。` |
| | | |
| | | // state.jobCategoryArr.forEach(item => { |
| | | // let checked |
| | | // const val = state.directionList.find(i => i.value === item) |
| | | // typeList.push(val) |
| | | // }) |
| | | state.directionList.forEach(item => { |
| | | if(state.jobCategoryArr.some(i => i === item.value)){ |
| | | item.checked = false |
| | | }else { |
| | | item.checked = true |
| | | } |
| | | }) |
| | | console.log('xx',state.directionList) |
| | | data.typeList = state.directionList |
| | | |
| | | data.tableData = state.dataList.map(item => { |
| | | return { |
| | | ...item, |
| | | ratingLevel: item.ratingLevel == 1 ? '一级' : item.ratingLevel == 2 ? '二级':item.ratingLevel == 3 ? '三级' : '', |
| | | sex: item.sex == 0 ? '男' : '女', |
| | | selectionMode: item.selectionMode == 1 ? '固定' : '随机', |
| | | teamLeader: item.teamLeader == 1 ? '是' : '否', |
| | | selectionTime: item.selectionTime ? moment(item.selectionTime).format('YYYY年MM月DD日 HH:mm:ss') : '--', |
| | | expertRemark: item.expertRemark ? item.expertRemark : '' |
| | | } |
| | | }) |
| | | console.log('dataList',state.dataList) |
| | | try { |
| | | generateWordDocument(templatePath, data); |
| | | } catch (error){ |
| | |
| | | <el-table-column label="申请时间" prop="createTime" align="center" :show-overflow-tooltip="true" width="180" /> |
| | | <el-table-column label="项目名称" prop="projectName" align="center" :show-overflow-tooltip="true" width="180" /> |
| | | <el-table-column label="部门" prop="deptName" align="center" /> |
| | | <el-table-column label="专家组组长" prop="deptUserName" align="center" width="150"/> |
| | | <el-table-column label="专家组组长" prop="expertName" align="center" width="150"/> |
| | | <el-table-column label="专家组人数" prop="expertNum" align="center" width="150"/> |
| | | <el-table-column label="当前状态" prop="state" align="center" width="200"> |
| | | <template #default="scope"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-drawer> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | // import {delProject, getProjectList, getProjectStatistics} from "@/api/projectManage/project"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | // import {getRegionTree} from "@/api/area"; |
| | | // import {getDict} from "@/api/login"; |
| | | // import {getDictList} from "@/api/backManage/evaluate"; |
| | | import Cookies from "js-cookie" |
| | | import {delProject, getProjectList, getProjectNum} from "@/api/projectManage"; |
| | | |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const loading = ref(false); |
| | |
| | | total: 0 |
| | | } |
| | | }); |
| | | |
| | | const searchTime = ref([]); |
| | | const area = ref([]); |
| | | const stateList = ref([ |
| | |
| | | getStatistics(); |
| | | |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |