| | |
| | | </div> |
| | | <AiEditor |
| | | ref="purposeEditor" |
| | | v-model="editorContents.experimentObjective" |
| | | :value="editorContents.experimentObjective" |
| | | height="200px" |
| | | placeholder="请输入实验目的..." |
| | | /> |
| | |
| | | </div> |
| | | <AiEditor |
| | | ref="materialEditor" |
| | | v-model="editorContents.experimentMaterial" |
| | | :value="editorContents.experimentMaterial" |
| | | height="200px" |
| | | placeholder="请输入实验材料..." |
| | | /> |
| | |
| | | </div> |
| | | <AiEditor |
| | | ref="equipmentEditor" |
| | | v-model="editorContents.experimentDevice" |
| | | :value="editorContents.experimentDevice" |
| | | height="200px" |
| | | placeholder="请输入实验设备..." |
| | | /> |
| | |
| | | </div> |
| | | <AiEditor |
| | | ref="methodEditor" |
| | | v-model="editorContents.experimentTestMethod" |
| | | :value="editorContents.experimentTestMethod" |
| | | height="200px" |
| | | placeholder="请输入检测方法及开发..." |
| | | /> |
| | |
| | | </div> |
| | | <AiEditor |
| | | ref="stepsEditor" |
| | | v-model="editorContents.experimentProcedure" |
| | | :value="editorContents.experimentProcedure" |
| | | height="200px" |
| | | placeholder="请输入实验步骤..." |
| | | /> |
| | |
| | | </div> |
| | | <AiEditor |
| | | ref="dataAnalysisEditor" |
| | | v-model="editorContents.dataAcquisition" |
| | | :value="editorContents.dataAcquisition" |
| | | height="200px" |
| | | placeholder="请输入数据采集及分析..." |
| | | /> |
| | |
| | | </div> |
| | | <AiEditor |
| | | ref="evaluationEditor" |
| | | v-model="editorContents.resultEvaluation" |
| | | :value="editorContents.resultEvaluation" |
| | | height="200px" |
| | | placeholder="请输入结果评估..." |
| | | /> |
| | |
| | | </div> |
| | | <AiEditor |
| | | ref="notesEditor" |
| | | v-model="editorContents.precautions" |
| | | :value="editorContents.precautions" |
| | | height="200px" |
| | | placeholder="请输入注意事项..." |
| | | /> |
| | |
| | | resultEvaluation: [ |
| | | { required: true, message: "请输入结果评估", trigger: "blur" }, |
| | | ], |
| | | precautions: [ |
| | | { required: true, message: "请输入注意事项", trigger: "blur" }, |
| | | ], |
| | | // precautions: [ |
| | | // { required: true, message: "请输入注意事项", trigger: "blur" }, |
| | | // ], |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | if (isEmptyContent(editorContents.experimentProcedure)) emptyFields.push('实验步骤') |
| | | if (isEmptyContent(editorContents.dataAcquisition)) emptyFields.push('数据采集及分析') |
| | | if (isEmptyContent(editorContents.resultEvaluation)) emptyFields.push('结果评估') |
| | | if (isEmptyContent(editorContents.precautions)) emptyFields.push('注意事项') |
| | | // if (isEmptyContent(editorContents.precautions)) emptyFields.push('注意事项') |
| | | |
| | | if (emptyFields.length > 0) { |
| | | this.$message.warning(`请填写${emptyFields.join('、')}`) |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="approval-dialog-approve"> |
| | | <div class="approval-dialog-approve" v-if="type === 'approve'"> |
| | | <div class="status"> |
| | | <div class="status-title">审批结果</div> |
| | | <div class="status-content"> |
| | |
| | | createTime: "", |
| | | approver: "", |
| | | approveTime: "", |
| | | processData: [], |
| | | }, |
| | | rules: {}, |
| | | status: "1", |
| | |
| | | .then((res) => { |
| | | console.log("获取详情:", res); |
| | | if (res) { |
| | | this.form = { ...res }; |
| | | this.form = { ...res, processData: [] }; |
| | | // 组装流程数据 |
| | | const processData = []; |
| | | let processData = []; |
| | | // 提交节点 |
| | | processData.push({ |
| | | type: "primary", |
| | |
| | | if (res.auditStatus == 2 || res.auditStatus == 3) { |
| | | processData.push({ |
| | | type: |
| | | audit.status === 2 |
| | | ? "success" |
| | | : audit.status === 3 |
| | | res.auditStatus === 2 |
| | | ? "primary" |
| | | : res.auditStatus === 3 |
| | | ? "danger" |
| | | : "warning", |
| | | mode: "list", |
| | | fields: [ |
| | | { |
| | | label: "审核结果", |
| | | label: "审核结果:", |
| | | value: |
| | | audit.status === 2 |
| | | res.auditStatus === 2 |
| | | ? "通过" |
| | | : audit.status === 3 |
| | | : res.auditStatus === 3 |
| | | ? "驳回" |
| | | : "待审批", |
| | | }, |
| | | { label: "审批意见:", value: audit.auditRemark || "" }, |
| | | { label: "审核人:", value: audit.auditPersonName || "" }, |
| | | { label: "审核时间:", value: audit.auditTime || "" }, |
| | | { label: "审批意见:", value: res.auditRemark || "" }, |
| | | { label: "审核人:", value: res.auditPersonName || "" }, |
| | | { label: "审核时间:", value: res.auditTime || "" }, |
| | | ], |
| | | }); |
| | | }else{ |
| | | processData.push({ |
| | | type: "primary", |
| | | mode: "list", |
| | | fields: [ |
| | | { label: "等待审核"}, |
| | | ], |
| | | }); |
| | | type: "warning", |
| | | mode: "list", |
| | | fields: [ |
| | | { label: "等待审核"}, |
| | | ], |
| | | }); |
| | | } |
| | | // 如有卡片模式,按前述结构 push |
| | | |
| | | this.form.processData = processData; |
| | | this.$nextTick(() => { |
| | | this.form.processData = processData; |
| | | }) |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | |
| | | } |
| | | const params = { |
| | | id: this.form.id, |
| | | auditStatus: this.status === "1" ? 2 : 3, // 2-通过,3-驳回 |
| | | auditComment: this.remark, |
| | | auditStatus: this.status === "1" ? 2 : 3, // 2-已通过,3-已驳回 |
| | | auditRemark: this.remark, |
| | | }; |
| | | console.log('审批请求参数:', params); |
| | | audit(params) |
| | | .then((res) => { |
| | | console.log('审批返回结果:', res); |
| | | if (res.code === 200) { |
| | | this.$message.success("审批成功"); |
| | | this.$emit("update:visible", false); |
| | |
| | | <script> |
| | | import ShowDelConfirm from "@/components/showDelConfirm/index.vue"; |
| | | import ApprovalDialog from "./components/approvalDialog.vue"; |
| | | import { getProposalList } from "./service"; |
| | | import { getProposalList, upAndDown, deleteById } from "./service"; |
| | | |
| | | export default { |
| | | name: "ProjectList", |
| | |
| | | createBy: "", |
| | | createTime: [], |
| | | auditPersonName: "", |
| | | auditStatus: 1, |
| | | auditStatus: '', |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | startTime: "", |
| | |
| | | }, |
| | | computed: { |
| | | isProcessEngineer() { |
| | | return false; |
| | | // 这里需要根据实际的用户角色判断逻辑来修改 |
| | | return this.$store.state.user.role === 'processEngineer'; |
| | | const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}'); |
| | | return userInfo.roleType === 3; // 3是工艺工程师 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | createBy: "", |
| | | createTime: [], |
| | | auditPersonName: "", |
| | | auditStatus: this.currentType === "draft" ? -1 : 1, |
| | | auditStatus: this.currentType === "draft" ? -1 : '', |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | startTime: "", |
| | | endTime: "", |
| | | }; |
| | | this.getTableData(); |
| | | }, |
| | | handleSearch() { |
| | | if (this.form.createTime && this.form.createTime.length === 2) { |
| | |
| | | this.changeStatus = true; |
| | | }, |
| | | handleEdit(row) { |
| | | // 实现编辑逻辑 |
| | | console.log("编辑数据:", row); |
| | | this.$router.push({ |
| | | path: "/dataManagement/addPlan", |
| | | query: { |
| | | id: row.id |
| | | } |
| | | }); |
| | | }, |
| | | handleDelete(row) { |
| | | this.currentOperationType = "delete"; |
| | |
| | | handleChangeStatusConfirm() { |
| | | if (this.currentOperationType === "revoke") { |
| | | // 处理撤销审批逻辑 |
| | | console.log("撤销审批数据:", this.currentOperationRow); |
| | | // TODO: 调用撤销审批接口 |
| | | this.$message.success("撤销审批成功"); |
| | | upAndDown({ |
| | | id: this.currentOperationRow.id, |
| | | status: 4 // 已撤销状态 |
| | | }).then(() => { |
| | | this.$message.success("撤销审批成功"); |
| | | this.changeStatus = false; |
| | | this.getTableData(); |
| | | }).catch(error => { |
| | | this.$message.error("撤销审批失败"); |
| | | }); |
| | | } else if (this.currentOperationType === "delete") { |
| | | // 处理删除逻辑 |
| | | console.log("删除数据:", this.currentOperationRow); |
| | | // TODO: 调用删除接口 |
| | | this.$message.success("删除成功"); |
| | | deleteById({ |
| | | id: this.currentOperationRow.id |
| | | }).then(() => { |
| | | this.$message.success("删除成功"); |
| | | this.changeStatus = false; |
| | | this.getTableData(); |
| | | }).catch(error => { |
| | | this.$message.error("删除失败"); |
| | | }); |
| | | } |
| | | this.changeStatus = false; |
| | | this.getTableData(); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | |
| | | //删除 |
| | | export function deleteById(data) { |
| | | return axios.delete('/open/t-project-proposal/deleteById', { ...data }) |
| | | return axios.delete('/open/t-project-proposal/deleteById', { params:data }) |
| | | } |
| | | |
| | | //批量删除 |
| | | export function deleteByIds(data) { |
| | | return axios.delete('/open/t-project-proposal/deleteByIds', { ...data }) |
| | | return axios.delete('/open/t-project-proposal/deleteByIds', { params:data }) |
| | | } |
| | | //根据id查询方案详情 |
| | | export function getDetailById(data) { |