| | |
| | | <div class="select-member-content-right-header"> |
| | | <div class="select-member-content-right-header-text">人员列表</div> |
| | | <div class="select-member-content-right-header-search"> |
| | | <el-input clearable v-model="nickNameOrPhone" placeholder="请输入姓名" /> |
| | | <el-input clearable v-model="nickNameOrPhone" placeholder="请输入姓名" /> |
| | | <el-button type="primary" @click="searchUserList(null)">搜索</el-button> |
| | | </div> |
| | | </div> |
| | | <Table ref="memberTable" :height="500" :row-key="row => row.userId" :data="tableData" |
| | | :total="0" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"> |
| | | <Table ref="memberTable" :height="500" :row-key="row => row.userId" :data="tableData" :total="0" |
| | | @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column label="角色" prop="roleId" > |
| | | <el-table-column label="角色" prop="roleId"> |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.roleId == 1">超级管理员</span> |
| | | <span v-if="scope.row.roleId == 2">审批人</span> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="姓名" prop="nickName" /> |
| | | <el-table-column label="头像" prop="avatar" > |
| | | <el-table-column label="头像" prop="avatar"> |
| | | <template #default="scope"> |
| | | <img :src="scope.row.avatar || require('../../assets/login/img1111.png')" style="width: 50px;height: 50px;border-radius: 50%;" /> |
| | | <img :src="scope.row.avatar || require('../../assets/login/img1111.png')" |
| | | style="width: 50px;height: 50px;border-radius: 50%;" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" prop="createTime" /> |
| | |
| | | projectId: { |
| | | type: [String, Number], |
| | | default: null |
| | | } |
| | | }, |
| | | roleType: { |
| | | type: [String, Number], |
| | | default: null |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | searchRole(){ |
| | | if(this.search){ |
| | | this.roleList=this.roleList.filter(item=> item.roleName.includes(this.search)) |
| | | }else{ |
| | | searchRole() { |
| | | if (this.search) { |
| | | this.roleList = this.roleList.filter(item => item.roleName.includes(this.search)) |
| | | } else { |
| | | getRoleList().then(res => { |
| | | if (this.projectId) { |
| | | // 过滤出实验员和化验师角色 |
| | | this.roleList = res.filter(item => item.roleId == 4 || item.roleId == 5); |
| | | } else { |
| | | this.roleList = res; |
| | | } |
| | | }); |
| | | if (this.projectId) { |
| | | // 过滤出实验员和化验师角色 |
| | | this.roleList = res.filter(item => item.roleId == 4 || item.roleId == 5); |
| | | } else { |
| | | this.roleList = res; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | }, |
| | | setSelection(selected) { |
| | | this.selectData = selected; |
| | |
| | | if (this.projectId) { |
| | | // 过滤出实验员和化验师角色 |
| | | this.roleList = res.filter(item => item.roleId == 4 || item.roleId == 5); |
| | | } else if (this.roleType) { |
| | | this.roleList = res.filter(item => item.roleId == this.roleType); |
| | | } else { |
| | | this.roleList = res; |
| | | } |
| | |
| | | pageNum: 1 |
| | | }; |
| | | if (this.projectId) { |
| | | params={ |
| | | params = { |
| | | ...params, |
| | | roleId: roleId?roleId:'', |
| | | roleId: roleId ? roleId : '', |
| | | projectId: this.projectId, |
| | | nickName: this.nickNameOrPhone, |
| | | } |
| | | delete params.roleIds; |
| | | // TODO: 这里需要替换为新的接口调用 |
| | | const res = await listByRole(params); |
| | | this.tableData = res.filter(item => item.status==0 && (item.roleId == 4 || item.roleId == 5)); |
| | | this.tableData = res.filter(item => item.status == 0 && (item.roleId == 4 || item.roleId == 5)); |
| | | } else if (this.roleType) { |
| | | params = { |
| | | ...params, |
| | | roleIds: [this.roleType], |
| | | } |
| | | const res = await getUserList(params); |
| | | this.tableData = res.records.filter(item => item.status == 0); |
| | | } else { |
| | | const res = await getUserList(params); |
| | | this.tableData = res.records.filter(item=> item.status==0); |
| | | this.tableData = res.records.filter(item => item.status == 0); |
| | | } |
| | | // 数据加载完成后重新应用选中状态 |
| | | this.setSelection(this.selectData) |
| | |
| | | meta: { |
| | | title: "新增实验员工作评定", |
| | | hide: true, |
| | | keepAlive: true, |
| | | // keepAlive: true, |
| | | }, |
| | | component: () => import("../views/deliveryAssessment/testerWorkerEvaluate/add"), |
| | | }, |
| | |
| | | <el-table-column prop="teamName" label="项目组名称" /> |
| | | <el-table-column prop="personCharge" label="项目负责人" /> |
| | | <el-table-column prop="staffName" label="项目组成员"> |
| | | <template #default="{ row }"> |
| | | <span>{{row.staffName?row.staffName:row.staffs.map(item => item.nickName).join(',')}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <template #default="{ row }"> |
| | | <span>{{row.staffName ? row.staffName : row.staffs.map(item => item.nickName).join(',')}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" /> |
| | | </template> |
| | | </Table> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item prop="itemName" label="检测项名称"> |
| | | <el-input v-model="form.itemName" style="width: 100%;" placeholder="请输入检测项名称" :disabled="isDetail" /> |
| | | <el-input v-model="form.itemName" style="width: 100%;" placeholder="请输入检测项名称" |
| | | :disabled="isDetail" /> |
| | | </el-form-item> |
| | | <el-form-item prop="itemCode" label="检测项编号" style="margin-left: 100px;"> |
| | | <el-input v-model="form.itemCode" style="width: 100%;" placeholder="请输入检测项编号" :disabled="isDetail" /> |
| | | <el-input v-model="form.itemCode" style="width: 100%;" placeholder="请输入检测项编号" |
| | | :disabled="isDetail" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | |
| | | </el-row> |
| | | |
| | | <div class="notice">备注内容</div> |
| | | |
| | | <div prop="remark" style="margin-top: 18px"> |
| | | <el-input v-model="form.remark" type="textarea" :rows="4" style="width: 100%;" placeholder="请输入备注内容" :disabled="isDetail" /> |
| | | <el-input v-model="form.remark" type="textarea" :rows="4" style="width: 100%;" placeholder="请输入备注内容" |
| | | :disabled="isDetail" /> |
| | | </div> |
| | | |
| | | |
| | | <div class="notice" style="margin: 18px 0;" v-if="isDetail">报告列表</div> |
| | | |
| | | <div class="table-setting" v-if="isDetail"> |
| | | <div class="flex a-center"> |
| | | <div class="table-title" :class="{ active: currentType === 'list' }" @click="handleTypeChange('list')"> |
| | | <div class="table-title" :class="{ active: currentType === 'list' }" |
| | | @click="handleTypeChange('list')"> |
| | | 项目检测项、检验包列表 |
| | | </div> |
| | | <div class="table-tit" :class="{ active: currentType === 'draft' }" @click="handleTypeChange('draft')"> |
| | | <div class="table-tit" :class="{ active: currentType === 'draft' }" |
| | | @click="handleTypeChange('draft')"> |
| | | 草稿箱 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <Table :data="reportTableData" :total="reportTotal" row-key="id" :height="null" @handlePageChange="handlePageChange" @handleSizeChange="handleSizeChange" |
| | | v-if="isDetail"> |
| | | <Table :data="reportTableData" :total="reportTotal" row-key="id" :height="null" v-if="isDetail"> |
| | | <el-table-column prop="reportContent" label="报告内容"> |
| | | <template #default="{ row }"> |
| | | <span>{{ getReportContentText(row.reportContent) }}</span> |
| | |
| | | <el-table-column prop="auditTime" label="审批时间" /> |
| | | <el-table-column prop="status" label="状态"> |
| | | <template #default="{ row }"> |
| | | <el-tag v-if="row.status == -1" type="info" color="#fff">草稿箱</el-tag> |
| | | <el-tag v-if="row.status == 1" type="info" color="#fff">待审核</el-tag> |
| | | <el-tag v-if="row.status == 2" type="success" color="#fff">已通过</el-tag> |
| | | <el-tag v-if="row.status == 3" type="danger">已驳回</el-tag> |
| | |
| | | <el-button type="text" @click="handleWithdraw(row)">编辑</el-button> |
| | | <el-button type="text" @click="handleDelete(row)">删除</el-button> |
| | | </template> |
| | | <template v-else-if="row.status === -1"> |
| | | <el-button type="text" @click="handleReportDetail(row)">详情</el-button> |
| | | <el-button type="text" @click="handleWithdraw(row)">编辑</el-button> |
| | | <el-button type="text" @click="handleDelete(row)">删除</el-button> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | </Table> |
| | |
| | | </el-form> |
| | | </Card> |
| | | <chooseProject @submit="getProjectData" :show="showChoose" @close="showChoose = false"></chooseProject> |
| | | <!-- 删除确认弹窗 --> |
| | | <ShowDelConfirm |
| | | :title="changeStatusTitle" |
| | | :tip="changeStatusTip" |
| | | :show="changeStatus" |
| | | @close="changeStatus = false" |
| | | @confirm="handleChangeStatusConfirm" |
| | | /> |
| | | <!-- 删除确认弹窗 --> |
| | | <ShowDelConfirm :title="changeStatusTitle" :tip="changeStatusTip" :show="changeStatus" |
| | | @close="changeStatus = false" @confirm="handleChangeStatusConfirm" /> |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | import AiEditor from '@/components/AiEditor' |
| | | import chooseProject from '@/components/chooseProject' |
| | | import ShowDelConfirm from "@/components/showDelConfirm/index.vue"; |
| | | import {addData, editData, getDetail} from './service' |
| | | import { addData, editData, getDetail,revokedReport,deleteDetail } from './service' |
| | | |
| | | export default { |
| | | components: { |
| | | components: { |
| | | AiEditor, |
| | | chooseProject,ShowDelConfirm |
| | | chooseProject, ShowDelConfirm |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | changeStatusTitle: '', |
| | | changeStatusTip: '', |
| | | currentRow: null, |
| | | itemId: null, |
| | | currentAction: '' // 'revoke' 或 'delete' |
| | | } |
| | | }, |
| | |
| | | } |
| | | this.getDetail() |
| | | } |
| | | if (this.$route.query.itemId) { |
| | | this.itemId = this.$route.query.itemId |
| | | } |
| | | }, |
| | | methods: { |
| | | getDetail() { |
| | | getDetail(this.$route.query.id).then(res => { |
| | | if (res) { |
| | | this.form = res |
| | | this.form = { ...res } |
| | | if (res.projectTeamVO) { |
| | | this.tableData = [{ |
| | | ...res.projectTeamVO, |
| | | }] |
| | | } |
| | | if(res.qaTestItemReportList.length > 0){ |
| | | if (res.qaTestItemReportList.length > 0) { |
| | | this.allReportTableData = res.qaTestItemReportList |
| | | this.reportTableData = res.qaTestItemReportList.filter(item => item.status != '-1') |
| | | } |
| | |
| | | handleReportDetail(row) { |
| | | // 处理报告详情 |
| | | this.$router.push({ |
| | | path: '/chemistQa/projectTesting/add', |
| | | path: '/chemistQa/addDetectionReport', |
| | | query: { |
| | | id: row.id, |
| | | itemId: this.$route.query.id, |
| | | type: 'detail' |
| | | } |
| | | }) |
| | |
| | | getReportList(type) { |
| | | // 获取报告列表数据 |
| | | // TODO: 调用接口获取数据 |
| | | if(type=='list'){ |
| | | if (type == 'list') { |
| | | this.reportTableData = this.allReportTableData.filter(item => item.status != '-1'); |
| | | }else{ |
| | | } else { |
| | | this.reportTableData = this.allReportTableData.filter(item => item.status == '-1'); |
| | | } |
| | | |
| | | |
| | | }, |
| | | handleRevokeApproval(row) { |
| | | this.currentRow = row; |
| | |
| | | this.changeStatus = true; |
| | | }, |
| | | handleWithdraw(row) { |
| | | this.$confirm('确认撤回该记录吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | // TODO: 调用撤回接口 |
| | | this.$message.success('撤回成功') |
| | | }).catch(() => { |
| | | this.$message.info('已取消撤回') |
| | | this.$router.push({ |
| | | path: '/chemistQa/addDetectionReport', |
| | | query: { |
| | | id: row.id, |
| | | itemId: this.$route.query.id, |
| | | type: 'edit' |
| | | } |
| | | }) |
| | | }, |
| | | handleDelete(row) { |
| | |
| | | this.changeStatusTip = '删除后记录将无法找回'; |
| | | this.changeStatus = true; |
| | | }, |
| | | handleChangeStatusConfirm() { |
| | | async handleChangeStatusConfirm() { |
| | | if (this.currentAction === 'revoke') { |
| | | // TODO: 调用撤销审批接口 |
| | | const res = await revokedReport({ id: this.currentRow.id }); |
| | | if (res.code === 200) { |
| | | this.loading = false; |
| | | this.$message.success('撤销审批成功'); |
| | | this.changeStatus = false; |
| | | this.currentRow = null; |
| | | this.currentAction = ''; |
| | | // 刷新列表 |
| | | this.getReportList(); |
| | | |
| | | } else { |
| | | this.$message.error(res.msg || '撤销审批失败'); |
| | | } |
| | | this.$message.success('撤销审批成功'); |
| | | } else if (this.currentAction === 'delete') { |
| | | // TODO: 调用删除接口 |
| | | const res = await deleteDetail({ id: this.currentRow.id }); |
| | | if (res) { |
| | | this.loading = false; |
| | | this.$message.success('删除成功'); |
| | | this.changeStatus = false; |
| | | this.currentRow = null; |
| | | this.currentAction = ''; |
| | | // 刷新列表 |
| | | this.getReportList(); |
| | | |
| | | } else { |
| | | this.$message.error(res.msg || '删除失败'); |
| | | } |
| | | this.$message.success('删除成功'); |
| | | } |
| | | this.changeStatus = false; |
| | | this.currentRow = null; |
| | | this.currentAction = ''; |
| | | // 刷新列表 |
| | | this.getReportList(); |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | getReportContentText(value) { |
| | | const contentMap = { |
| | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .notice{ |
| | | .notice { |
| | | flex-shrink: 0; |
| | | font-weight: bold; |
| | | font-size: 18px; |
| | | color: #222222; |
| | | line-height: 27px; |
| | | font-family: "Source Han Sans CN Bold Bold"; |
| | | font-weight: bold; |
| | | font-size: 18px; |
| | | color: #222222; |
| | | line-height: 27px; |
| | | font-family: "Source Han Sans CN Bold Bold"; |
| | | } |
| | | |
| | | .header-title { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | } |
| | | } |
| | | |
| | | .end-btn{ |
| | | .end-btn { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 10px; |
| | | |
| | | button{ |
| | | button { |
| | | width: 180px; |
| | | height: 36px; |
| | | // background: #409EFF; |
| | |
| | | <el-form ref="form" :model="form" :rules="rules" inline label-position="top" style="margin-top: 18px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item prop="reportContent" label="报告内容"> |
| | | <el-select v-model="form.reportContent" style="width: 100%;" placeholder="请选择报告内容"> |
| | | <el-form-item prop="reportContent" label="报告内容" > |
| | | <el-select v-model="form.reportContent" style="width: 100%;" placeholder="请选择报告内容" :disabled="this.$route.query.type === 'detail'"> |
| | | <el-option label="国家标准" :value="1" /> |
| | | <el-option label="分析方法开发" :value="2" /> |
| | | <el-option label="方法验证报告" :value="3" /> |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="reportText" style="margin-top: 18px"> |
| | | <ai-editor ref="materialEditor" :value="form.reportText" style="width: 100%;" |
| | | <ai-editor ref="materialEditor" :value="form.reportText" style="width: 100%;" :readOnly="this.$route.query.type === 'detail'" |
| | | placeholder="请输入报告正文" /> |
| | | </el-form-item> |
| | | <div class="header-title" style="width: 100%;"> |
| | |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div> |
| | | </el-upload> --> |
| | | <el-upload action="#" :file-list="fileList" :http-request="handleUpload" |
| | | <el-upload action="#" :file-list="fileList" :http-request="handleUpload" :disabled="this.$route.query.type === 'detail'" |
| | | :before-upload="beforeUpload" :on-remove="handleRemove"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div> |
| | |
| | | itemId: "", |
| | | status: 1, |
| | | itemId: "", |
| | | qaReportFileList: [], |
| | | qaReportFiles: [], |
| | | commitPersonId: null, |
| | | }, |
| | | tableData: [], |
| | |
| | | createBy: res.createBy, |
| | | createTime: res.createTime |
| | | } |
| | | this.form.itemId = res.teamId |
| | | this.form.itemId = this.$route.query.itemId |
| | | this.form.teamId = this.$route.query.teamId |
| | | |
| | | this.tableData = [{ ...item }] |
| | | } |
| | | }) |
| | |
| | | url: getFullUrl(file.fileUrl), |
| | | uid: file.id |
| | | })) |
| | | this.form.qaReportFileList = res.fileList |
| | | this.form.qaReportFiles = res.qaReportFileList |
| | | } else { |
| | | this.fileList = [] |
| | | this.form.qaReportFileList = [] |
| | | this.form.qaReportFiles = [] |
| | | } |
| | | } else { |
| | | this.$message.error(res.message || '获取详情失败') |
| | |
| | | }); |
| | | |
| | | // 添加到表单数据 |
| | | this.form.qaReportFileList.push(fileObj); |
| | | this.form.qaReportFiles.push(fileObj); |
| | | |
| | | this.$message.success('文件上传成功'); |
| | | onSuccess(res); |
| | |
| | | const index = this.fileList.findIndex(item => item.name === file.name); |
| | | if (index !== -1) { |
| | | this.fileList.splice(index, 1); |
| | | this.form.qaReportFileList.splice(index, 1); |
| | | this.form.qaReportFiles.splice(index, 1); |
| | | } |
| | | }, |
| | | }, |
| | |
| | | <template> |
| | | <el-dialog :title="dialogTitle" :visible.sync="visible" width="80%" po :close-on-click-modal="false" |
| | | <el-dialog :title="dialogTitle" :visible.sync="visible" width="80%" @open="open" :close-on-click-modal="false" |
| | | @close="handleClose"> |
| | | <div class="approval-dialog"> |
| | | <!-- 左侧审批内容 --> |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | open(){ |
| | | this.status=1; |
| | | this.remark='' |
| | | }, |
| | | getDetailInfo() { |
| | | getDetailInfo({ id: this.data.id }).then(res => { |
| | | if (res) { |
| | |
| | | path: '/chemistQa/addDetectionReport', |
| | | query: { |
| | | itemId: row.id, |
| | | teamId: row.teamId, |
| | | type: 'add' |
| | | } |
| | | }) |
| | |
| | | path: '/chemistQa/add', |
| | | query: { |
| | | id: row.id, |
| | | // itemId: row.itemId, |
| | | type: 'detail' |
| | | } |
| | | }) |
| | |
| | | :file-list="photoList" |
| | | :auto-upload="false" |
| | | list-type="picture-card" |
| | | :on-change="handlePhotoChange" |
| | | :http-request="handlePhotoUpload" |
| | | :on-remove="handlePhotoRemove" |
| | | > |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | |
| | | action="#" |
| | | :file-list="spectrumList" |
| | | :auto-upload="false" |
| | | :on-change="handleSpectrumChange" |
| | | :http-request="handleSpectrumUpload" |
| | | :on-remove="handleSpectrumRemove" |
| | | > |
| | | <el-button type="primary"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { customUploadRequest, getFullUrl } from '@/utils/utils' |
| | | export default { |
| | | name: "AddDialog", |
| | | props: { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | handlePhotoChange(file, fileList) { |
| | | // 模拟上传成功 |
| | | const mockFile = { |
| | | name: file.name || '测试图片.jpg', |
| | | url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', |
| | | status: 'success' |
| | | }; |
| | | this.photoList = [...this.photoList, mockFile]; |
| | | this.$refs.form.validateField('photos'); |
| | | // 真实图片上传 |
| | | handlePhotoUpload(options) { |
| | | const { file, onSuccess, onError } = options; |
| | | customUploadRequest({ |
| | | file, |
| | | onSuccess: (res) => { |
| | | if (res.code === 200) { |
| | | const fileObj = { |
| | | name: file.name, |
| | | url: getFullUrl(res.msg || res.data || ''), |
| | | status: 'success' |
| | | }; |
| | | this.photoList.push(fileObj); |
| | | this.$refs.form.validateField('photos'); |
| | | this.$message.success('图片上传成功'); |
| | | onSuccess(res); |
| | | } else { |
| | | this.$message.error(res.message || '图片上传失败'); |
| | | onError(); |
| | | } |
| | | }, |
| | | onError: (err) => { |
| | | this.$message.error('图片上传失败'); |
| | | onError(err); |
| | | } |
| | | }); |
| | | }, |
| | | handleSpectrumChange(file, fileList) { |
| | | // 模拟上传成功 |
| | | const mockFile = { |
| | | name: file.name || '测试图谱.pdf', |
| | | url: 'https://example.com/test.pdf', |
| | | status: 'success' |
| | | }; |
| | | this.spectrumList = [...this.spectrumList, mockFile]; |
| | | this.$refs.form.validateField('spectrums'); |
| | | handlePhotoRemove(file) { |
| | | const index = this.photoList.findIndex(item => item.name === file.name); |
| | | if (index !== -1) { |
| | | this.photoList.splice(index, 1); |
| | | this.$refs.form.validateField('photos'); |
| | | } |
| | | }, |
| | | // 真实图谱上传 |
| | | handleSpectrumUpload(options) { |
| | | const { file, onSuccess, onError } = options; |
| | | customUploadRequest({ |
| | | file, |
| | | onSuccess: (res) => { |
| | | if (res.code === 200) { |
| | | const fileObj = { |
| | | name: file.name, |
| | | url: getFullUrl(res.msg || res.data || ''), |
| | | status: 'success' |
| | | }; |
| | | this.spectrumList.push(fileObj); |
| | | this.$refs.form.validateField('spectrums'); |
| | | this.$message.success('文件上传成功'); |
| | | onSuccess(res); |
| | | } else { |
| | | this.$message.error(res.message || '文件上传失败'); |
| | | onError(); |
| | | } |
| | | }, |
| | | onError: (err) => { |
| | | this.$message.error('文件上传失败'); |
| | | onError(err); |
| | | } |
| | | }); |
| | | }, |
| | | handleSpectrumRemove(file) { |
| | | // 处理文件移除逻辑 |
| | | const index = this.spectrumList.findIndex(item => item.name === file.name); |
| | | if (index !== -1) { |
| | | this.spectrumList.splice(index, 1); |
| | | this.$refs.form.validateField('spectrums'); |
| | | } |
| | | }, |
| | | // iPad 相关方法 |
| | | handleIPadPhoto() { |
| | |
| | | } |
| | | |
| | | // 根据是否为编辑模式调用不同接口 |
| | | const apiCall = this.editId |
| | | const apiCall = (this.editId && !this.isEdit) |
| | | ? update(formData) |
| | | : this.isEdit |
| | | ? updateTester(formData) |
| | |
| | | </template> |
| | | <template v-else> |
| | | <div class="no-data">暂未评定</div> |
| | | <div v-if="canEvaluate" class="to-evaluate" @click="handleEvaluate('processEngineer')">去评价</div> |
| | | <div v-if="isView && form.status == 2 &&(userRole==1 || userRole==2)" class="to-evaluate" @click="handleEvaluate('processEngineer')">去评价</div> |
| | | </template> |
| | | </template> |
| | | </div> |
| | |
| | | <div>工作标准评定</div> |
| | | </div> |
| | | </div> |
| | | <EvaluateTable :type="1" ref="evaluateTable" /> |
| | | <div class="add-project-footer"> |
| | | <EvaluateTable :type="1" ref="evaluateTable" :isReadonly="!isEdit" :viewJson="resultEvaluateJson" /> |
| | | <div class="add-project-footer" v-if="isEdit"> |
| | | <el-button type="primary" @click="submitForm()">保存</el-button> |
| | | <!-- <el-button>存草稿</el-button> --> |
| | | </div> |
| | |
| | | <script> |
| | | import SelectMemberSimple from "@/components/SelectMemberSimple/index.vue"; |
| | | import ExperimentalScheduling from "@/views/dataManagement/schemeManagement/components/experimental-scheduling"; |
| | | import { getEvaluateChemist, add } from "./service.js"; |
| | | import { getEvaluateChemist, add,getEvaluateDetailById,update } from "./service.js"; |
| | | import moment from "moment"; |
| | | export default { |
| | | name: "AddchemistEvaluate", |
| | |
| | | participantsData: [], |
| | | selectedParticipants: [], |
| | | tableData: [], |
| | | resultEvaluateJson:'', |
| | | isEdit: true, // 是否为编辑模式 |
| | | // 状态映射表 |
| | | statusTypeMap: { |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | activated() { |
| | | this.participantsData = []; |
| | | this.selectedParticipants = []; |
| | | this.tableData = []; |
| | | // this.isEdit = true; // 是否为编辑模式 |
| | | |
| | | if (this.$route.query.id) { |
| | | this.isEdit = this.$route.query.type == "view" ? false : true; |
| | | console.log('this.$route.query.type == "view"',this.$route.query.type == "view") |
| | | this.editId = this.$route.query.id; |
| | | this.loadEditData(); |
| | | } |
| | | }, |
| | | async created() { |
| | | // const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}"); |
| | | // this.userRole = userInfo.roleType || ""; |
| | |
| | | this.participantsData = []; |
| | | this.selectedParticipants = []; |
| | | this.tableData = []; |
| | | this.isEdit = true; // 是否为编辑模式 |
| | | if (this.$route.query.id) { |
| | | this.isEdit = this.$route.query.type === "view" ? false : true; |
| | | this.editId = this.$route.query.id; |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | loadEditData(){ |
| | | getEvaluateDetailById({ id: this.editId }).then((res) => { |
| | | if(res.experimentDispatch){ |
| | | this.handleSchedulingSubmit([{...res.experimentDispatch}]) |
| | | } |
| | | if(res.userId){ |
| | | this.selectedParticipants = [{...res,nickName:res.testerName}] |
| | | } |
| | | if(res.resultEvaluateJson){ |
| | | this.resultEvaluateJson=res.resultEvaluateJson |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | handleSchedulingClose() { |
| | | this.showScheduling = false; |
| | | }, |
| | |
| | | getEvaluateValue(score) { |
| | | // 2分 = 良好(1), 1分 = 正确(2), 0分 = 失误(3) |
| | | const scoreMap = { |
| | | 2: 1, // 良好 |
| | | 1: 2, // 正确 |
| | | 0: 3, // 失误 |
| | | 2: 2, // 良好 |
| | | 1: 1, // 正确 |
| | | 0: 0, // 失误 |
| | | '-3':'-3' |
| | | }; |
| | | return scoreMap[score] || 3; // 默认返回失误 |
| | | return scoreMap[score] || 0; // 默认返回失误 |
| | | }, |
| | | submitForm() { |
| | | const evaluateTable = this.$refs.evaluateTable; |
| | |
| | | dispatchId:this.tableData[0]?.id, |
| | | status: 1 |
| | | }; |
| | | if(this.editId){ |
| | | update({...evaluateData,id:this.editId}).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("编辑成功"); |
| | | this.$router.back(); |
| | | } else { |
| | | this.$message.error(res.msg || "编辑失败"); |
| | | } |
| | | }); |
| | | return; |
| | | } |
| | | add(evaluateData).then(res=>{ |
| | | if(res.code==200){ |
| | | this.$message.success("保存成功"); |
| | |
| | | <el-input v-model="form.experimentName" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="评定时间:"> |
| | | <el-date-picker v-model="form.dateRange" type="daterange" range-separator="至" start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | <el-date-picker v-model="form.dateRange" type="daterange" range-separator="至" |
| | | start-placeholder="开始日期" end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item class="search-btn-box"> |
| | |
| | | </div> |
| | | <el-button @click="handleAdd" class="el-icon-plus" type="primary"> |
| | | 新增化验师工作评定</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template #table> |
| | | <el-table-column prop="teamName" label="所属项目课题方案" /> |
| | | <el-table-column prop="projectName" label="所属项目课题方案" /> |
| | | <el-table-column prop="experimentCode" label="实验编号" /> |
| | | <el-table-column prop="experimentName" label="实验名称" /> |
| | | <el-table-column prop="chemistName" label="被评定化验师" /> |
| | | <el-table-column prop="chemistIntegral" label="评定分数" /> |
| | | <el-table-column prop="chemistIntegral" label="评定分数"> |
| | | <template #default="{ row }"> |
| | | <div> |
| | | {{ |
| | | (row.evaluateOne * 1) + |
| | | (row.evaluateTwo * 1) + |
| | | (row.evaluateThree * 1) + |
| | | (row.evaluateFour * 1) + |
| | | (row.evaluateFive * 1) + |
| | | (row.evaluateSix * 1) |
| | | }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="evaluateTime" label="评定时间" /> |
| | | <el-table-column label="操作" width="180"> |
| | | <template #default="{ row }"> |
| | |
| | | </el-table-column> |
| | | </template> |
| | | </TableCustom> |
| | | <ShowDelConfirm title="确认要删除这条信息吗?" tip="删除后信息无法找回" :show="changeStatus" @close="changeStatus = false" |
| | | @confirm="handleChangeStatusConfirm" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { chemistEvaluateList } from './service' |
| | | import { chemistEvaluateList, deleteById } from './service' |
| | | |
| | | export default { |
| | | name: 'ChemistEvaluate', |
| | |
| | | pageSize: 10, |
| | | pageNum: 1 |
| | | }, |
| | | changeStatus: false, |
| | | total: 0, |
| | | rowed:{}, |
| | | loading: false |
| | | } |
| | | }, |
| | |
| | | try { |
| | | const res = await chemistEvaluateList(params) |
| | | this.tableData = (res.data?.records || []).map(item => { |
| | | let score = ''; |
| | | try { |
| | | const json = typeof item.resultEvaluateJson === 'string' |
| | | ? JSON.parse(item.resultEvaluateJson) |
| | | : item.resultEvaluateJson; |
| | | score = json?.score || ''; |
| | | } catch (e) {} |
| | | return { ...item, score }; |
| | | let score = ''; |
| | | try { |
| | | const json = typeof item.resultEvaluateJson === 'string' |
| | | ? JSON.parse(item.resultEvaluateJson) |
| | | : item.resultEvaluateJson; |
| | | score = json?.score || ''; |
| | | } catch (e) { } |
| | | return { ...item, score }; |
| | | }) |
| | | this.total = res.data?.total || 0 |
| | | } finally { |
| | |
| | | }, |
| | | handleDetail(row) { |
| | | // 详情逻辑后续补充 |
| | | this.$router.push({ |
| | | path: '/deliveryAssessment/addchemistEvaluate', |
| | | query: { id: row.id, type: 'view' }, |
| | | }) |
| | | }, |
| | | handleEdit(row) { |
| | | // 编辑逻辑后续补充 |
| | | this.$router.push({ |
| | | path: '/deliveryAssessment/addchemistEvaluate', |
| | | query: { id: row.id, type: 'edit' }, |
| | | }) |
| | | }, |
| | | handleDelete(row) { |
| | | // 删除逻辑后续补充 |
| | | this.changeStatus = true; |
| | | this.rowed = row; |
| | | }, |
| | | handleChangeStatusConfirm() { |
| | | deleteById({ id: this.rowed.id }).then(() => { |
| | | this.$message.success('删除成功'); |
| | | this.changeStatus = false; |
| | | this.getList(); |
| | | }) |
| | | .catch(() => { |
| | | this.$message.error('删除失败'); |
| | | }); |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | return axios.get('/open/t-result-work-evaluate/getEvaluateChemist', { params:data }) |
| | | } |
| | | |
| | | // export const getEvaluateChemist = (data) => { |
| | | // return axios.get('/open/t-result-work-evaluate/getEvaluateTester', { params:data }) |
| | | // } |
| | | export const getEvaluateDetailById = (data) => { |
| | | return axios.get('/open/t-result-work-evaluate/getEvaluateDetailById', { params:data }) |
| | | } |
| | | |
| | | // export const update = (data) => { |
| | | // return axios.post('/api/t-tester-other-task/update', { ...data }) |
| | | // } |
| | | // export const deleteById = (data) => { |
| | | // return axios.delete('/open/t-tester-other-task/deleteById', { params:data }) |
| | | // } |
| | | // export const deleteByIds = (data) => { |
| | | // return axios.delete('/open/t-tester-other-task/deleteByIds', { params:data }) |
| | | // } |
| | | export const update = (data) => { |
| | | return axios.post('/api/t-result-work-evaluate/edit', { ...data }) |
| | | } |
| | | export const deleteById = (data) => { |
| | | return axios.delete('/open/t-result-work-evaluate/deleteById', { params:data }) |
| | | } |
| | | |
| | |
| | | fetchTopData() { |
| | | if (!this.detailId) return; |
| | | getDetailById({ id: this.detailId }).then((res) => { |
| | | if (res && res.data) { |
| | | this.topData = res.data; |
| | | if (res) { |
| | | this.topData = res; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | open(){ |
| | | getDetailByUserId().then(res=>{ |
| | | if(this.type=='add'){ |
| | | getDetailByUserId().then(res=>{ |
| | | this.criteriaList=[{...res}] |
| | | this.memberList=res.staffs.filter(item => item.roleType == '5') || [] |
| | | this.form.teamId = res.id || '' |
| | | }) |
| | | } |
| | | |
| | | // 如果是详情,获取详情数据 |
| | | if(this.type === 'detail' && this.id){ |
| | | getDetailById({id: this.id}).then(res => { |
| | | if(res && res){ |
| | | this.form = { |
| | | this.criteriaList=[{...res.projectTeam}] |
| | | this.memberList=res.projectTeam.staffs.filter(item => item.roleType == '5') || []; |
| | | this.$nextTick(() => { |
| | | this.form = { |
| | | id: res.id || '', |
| | | teamId: res.teamId || '', |
| | | assignee: res.testerId || '', |
| | |
| | | taskTime: res.taskTime || '', |
| | | score: res.evaluateScore || '', |
| | | } |
| | | console.log('memberList memberList',this.memberList,'res.testerId',res.testerId) |
| | | }) |
| | | } |
| | | }) |
| | | } else if(this.type === 'add') { |
| | |
| | | <el-table-column prop="taskTime" label="任务时间" /> |
| | | <el-table-column prop="createBy" label="添加人" /> |
| | | <el-table-column prop="evaluateScore" label="评定积分" /> |
| | | <el-table-column label="累计分数"> |
| | | <template #default> |
| | | <!-- 累计分数接口未返回,留空或后端补充 --> |
| | | </template> |
| | | <el-table-column prop="totalScore" label="累计分数"> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="评定时间" /> |
| | | <el-table-column label="操作"> |
| | |
| | | <div>工作标准评定</div> |
| | | </div> |
| | | </div> |
| | | <EvaluateTable :type="2" ref="evaluateTable" /> |
| | | <div class="add-project-footer"> |
| | | <EvaluateTable :type="2" ref="evaluateTable" :isReadonly="!isEdit" :viewJson="resultEvaluateJson" /> |
| | | <div class="add-project-footer" v-if="isEdit"> |
| | | <el-button type="primary" @click="submitForm()">保存</el-button> |
| | | <!-- <el-button>存草稿</el-button> --> |
| | | </div> |
| | |
| | | <script> |
| | | import SelectMemberSimple from "@/components/SelectMemberSimple/index.vue"; |
| | | import ExperimentalScheduling from "@/views/dataManagement/schemeManagement/components/experimental-scheduling"; |
| | | import { getEvaluateChemist, add } from "./service.js"; |
| | | import { getEvaluateChemist, add ,getEvaluateDetailById,update} from "./service.js"; |
| | | import moment from "moment"; |
| | | |
| | | export default { |
| | |
| | | participantsData: [], |
| | | selectedParticipants: [], |
| | | tableData: [], |
| | | resultEvaluateJson:'', |
| | | isEdit: true, // 是否为编辑模式 |
| | | // 状态映射表 |
| | | statusTypeMap: { |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | async created() { |
| | | activated() { |
| | | this.participantsData = []; |
| | | this.selectedParticipants = []; |
| | | this.tableData = []; |
| | | // this.isEdit = true; // 是否为编辑模式 |
| | | |
| | | if (this.$route.query.id) { |
| | | this.isEdit = this.$route.query.type == "view" ? false : true; |
| | | console.log('this.$route.query.type == "view"',this.$route.query.type == "view") |
| | | this.editId = this.$route.query.id; |
| | | this.loadEditData(); |
| | | } |
| | | }, |
| | | mounted() { |
| | | // const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}"); |
| | | // this.userRole = userInfo.roleType || ""; |
| | | // 检查是否为编辑模式 |
| | | this.participantsData = []; |
| | | this.selectedParticipants = []; |
| | | this.tableData = []; |
| | | this.isEdit = true; // 是否为编辑模式 |
| | | // this.isEdit = true; // 是否为编辑模式 |
| | | |
| | | if (this.$route.query.id) { |
| | | this.isEdit = this.$route.query.type === "view" ? false : true; |
| | | this.isEdit = this.$route.query.type == "view" ? false : true; |
| | | this.editId = this.$route.query.id; |
| | | await this.loadEditData(); |
| | | this.loadEditData(); |
| | | } |
| | | }, |
| | | methods: { |
| | | loadEditData(){ |
| | | getEvaluateDetailById({ id: this.editId }).then((res) => { |
| | | if(res.experimentDispatch){ |
| | | this.handleSchedulingSubmit([{...res.experimentDispatch}]) |
| | | } |
| | | if(res.userId){ |
| | | this.selectedParticipants = [{...res,nickName:res.testerName}] |
| | | } |
| | | if(res.resultEvaluateJson){ |
| | | this.resultEvaluateJson=res.resultEvaluateJson |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | handleSchedulingClose() { |
| | | this.showScheduling = false; |
| | | }, |
| | |
| | | getEvaluateValue(score) { |
| | | // 2分 = 良好(1), 1分 = 正确(2), 0分 = 失误(3) |
| | | const scoreMap = { |
| | | 2: 1, // 良好 |
| | | 1: 2, // 正确 |
| | | 0: 3, // 失误 |
| | | 2: 2, // 良好 |
| | | 1: 1, // 正确 |
| | | 0: 0, // 失误 |
| | | '-3':'-3' |
| | | }; |
| | | return scoreMap[score] || 3; // 默认返回失误 |
| | | return scoreMap[score] || 0; // 默认返回失误 |
| | | }, |
| | | submitForm() { |
| | | const evaluateTable = this.$refs.evaluateTable; |
| | |
| | | return; |
| | | } |
| | | const activeIndex = evaluateTable.activeIndex; |
| | | |
| | | const evaluateData = { |
| | | evaluateOne: this.getEvaluateValue(activeIndex[0].score), |
| | | evaluateTwo: this.getEvaluateValue(activeIndex[1].score), |
| | |
| | | dispatchId: this.tableData[0]?.id, |
| | | status: 1, |
| | | }; |
| | | if(this.editId){ |
| | | update({...evaluateData,id:this.editId}).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("编辑成功"); |
| | | this.$router.back(); |
| | | } else { |
| | | this.$message.error(res.msg || "编辑失败"); |
| | | } |
| | | }); |
| | | return; |
| | | } |
| | | add(evaluateData).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("保存成功"); |
| | |
| | | <template> |
| | | <div class="list"> |
| | | <TableCustom :queryForm="queryForm" :tableData="tableData" :total="total" @currentChange="handleCurrentChange" |
| | | @sizeChange="handleSizeChange"> |
| | | <template #search> |
| | | <el-form :model="form" label-width="140px" inline> |
| | | <el-form-item label="所属项目课题方案:"> |
| | | <el-input v-model="form.projectName" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="实验编号:"> |
| | | <el-input v-model="form.experimentNo" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="实验名称:"> |
| | | <el-input v-model="form.experimentName" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="评定时间:"> |
| | | <el-date-picker v-model="form.dateRange" type="daterange" range-separator="至" start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item class="search-btn-box"> |
| | | <el-button @click="handleReset">重置</el-button> |
| | | <el-button type="primary" @click="handleSearch">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <template #setting> |
| | | <div class="tableTitle"> |
| | | <div class="flex a-center "> |
| | | <div class="title active" > |
| | | 实验员工作评定列表</div> |
| | | |
| | | </div> |
| | | <el-button @click="handleAdd" class="el-icon-plus" type="primary"> |
| | | 新增实验员工作评定</el-button> |
| | | </div> |
| | | </template> |
| | | <template #table> |
| | | <el-table-column prop="teamName" label="所属项目课题方案" /> |
| | | <el-table-column prop="experimentCode" label="实验编号" /> |
| | | <el-table-column prop="experimentName" label="实验名称" /> |
| | | <el-table-column prop="chemistName" label="被评定实验员" /> |
| | | <el-table-column prop="chemistIntegral" label="评定分数" /> |
| | | <el-table-column prop="evaluateTime" label="评定时间" /> |
| | | <el-table-column label="操作" width="180"> |
| | | <template #default="{ row }"> |
| | | <el-button type="text" style="color: #1890ff" @click="handleDetail(row)">详情</el-button> |
| | | <el-button type="text" style="color: #1890ff" @click="handleEdit(row)">编辑</el-button> |
| | | <el-button type="text" style="color: #1890ff" @click="handleDelete(row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </TableCustom> |
| | | </div> |
| | | <div class="list"> |
| | | <TableCustom :queryForm="queryForm" :tableData="tableData" :total="total" @currentChange="handleCurrentChange" |
| | | @sizeChange="handleSizeChange"> |
| | | <template #search> |
| | | <el-form :model="form" label-width="140px" inline> |
| | | <el-form-item label="所属项目课题方案:"> |
| | | <el-input v-model="form.projectName" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="实验编号:"> |
| | | <el-input v-model="form.experimentNo" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="实验名称:"> |
| | | <el-input v-model="form.experimentName" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="评定时间:"> |
| | | <el-date-picker v-model="form.dateRange" type="daterange" range-separator="至" start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item class="search-btn-box"> |
| | | <el-button @click="handleReset">重置</el-button> |
| | | <el-button type="primary" @click="handleSearch">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <template #setting> |
| | | <div class="tableTitle"> |
| | | <div class="flex a-center"> |
| | | <div class="title active">实验员工作评定列表</div> |
| | | </div> |
| | | <el-button @click="handleAdd" class="el-icon-plus" type="primary"> |
| | | 新增实验员工作评定</el-button> |
| | | </div> |
| | | </template> |
| | | <template #table> |
| | | <el-table-column prop="projectName" label="所属项目课题方案" /> |
| | | <el-table-column prop="experimentCode" label="实验编号" /> |
| | | <el-table-column prop="experimentName" label="实验名称" /> |
| | | <el-table-column prop="testerName" label="被评定实验员" /> |
| | | <el-table-column prop="chemistIntegral" label="评定分数"> |
| | | <template #default="{ row }"> |
| | | <div> |
| | | {{ |
| | | (row.evaluateOne * 1) + |
| | | (row.evaluateTwo * 1) + |
| | | (row.evaluateThree * 1) + |
| | | (row.evaluateFour * 1) + |
| | | (row.evaluateFive * 1) + |
| | | (row.evaluateSix * 1) |
| | | }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="evaluateTime" label="评定时间" /> |
| | | <el-table-column label="操作" width="180"> |
| | | <template #default="{ row }"> |
| | | <el-button type="text" style="color: #1890ff" @click="handleDetail(row)">详情</el-button> |
| | | <el-button type="text" style="color: #1890ff" @click="handleEdit(row)">编辑</el-button> |
| | | <el-button type="text" style="color: #1890ff" @click="handleDelete(row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </TableCustom> |
| | | <ShowDelConfirm title="确认要删除这条信息吗?" tip="删除后信息无法找回" :show="changeStatus" @close="changeStatus = false" |
| | | @confirm="handleChangeStatusConfirm" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { chemistEvaluateList } from './service' |
| | | import { chemistEvaluateList, deleteById } from "./service"; |
| | | export default { |
| | | name: 'TesterWorkerEvaluate', |
| | | data() { |
| | | return { |
| | | currentType: 'list', // 当前显示类型:list-列表,draft-草稿箱 |
| | | form: { |
| | | projectName: '', |
| | | experimentNo: '', |
| | | experimentName: '', |
| | | dateRange: [] |
| | | }, |
| | | tableData: [], |
| | | queryForm: { |
| | | pageSize: 10, |
| | | pageNum: 1 |
| | | }, |
| | | total: 0, |
| | | loading: false |
| | | } |
| | | name: "TesterWorkerEvaluate", |
| | | data() { |
| | | return { |
| | | currentType: "list", // 当前显示类型:list-列表,draft-草稿箱 |
| | | form: { |
| | | projectName: "", |
| | | experimentNo: "", |
| | | experimentName: "", |
| | | dateRange: [], |
| | | }, |
| | | tableData: [], |
| | | queryForm: { |
| | | pageSize: 10, |
| | | pageNum: 1, |
| | | }, |
| | | changeStatus: false, |
| | | total: 0, |
| | | rowed:{}, |
| | | loading: false, |
| | | }; |
| | | }, |
| | | methods: { |
| | | async getList() { |
| | | this.loading = true; |
| | | const params = { |
| | | ...this.queryForm, |
| | | projectName: this.form.projectName, |
| | | experimentNo: this.form.experimentNo, |
| | | experimentName: this.form.experimentName, |
| | | startTime: |
| | | this.form.dateRange && this.form.dateRange[0] |
| | | ? this.form.dateRange[0] |
| | | : "", |
| | | endTime: |
| | | this.form.dateRange && this.form.dateRange[1] |
| | | ? this.form.dateRange[1] |
| | | : "", |
| | | }; |
| | | try { |
| | | const res = await chemistEvaluateList(params); |
| | | this.tableData = (res.data?.records || []).map((item) => { |
| | | let score = ""; |
| | | try { |
| | | const json = |
| | | typeof item.resultEvaluateJson === "string" |
| | | ? JSON.parse(item.resultEvaluateJson) |
| | | : item.resultEvaluateJson; |
| | | score = json?.score || ""; |
| | | } catch (e) { } |
| | | return { ...item, score }; |
| | | }); |
| | | this.total = res.data?.total || 0; |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | | }, |
| | | methods: { |
| | | async getList() { |
| | | this.loading = true |
| | | const params = { |
| | | ...this.queryForm, |
| | | projectName: this.form.projectName, |
| | | experimentNo: this.form.experimentNo, |
| | | experimentName: this.form.experimentName, |
| | | startTime: this.form.dateRange && this.form.dateRange[0] ? this.form.dateRange[0] : '', |
| | | endTime: this.form.dateRange && this.form.dateRange[1] ? this.form.dateRange[1] : '' |
| | | } |
| | | try { |
| | | const res = await chemistEvaluateList(params) |
| | | this.tableData = (res.data?.records || []).map(item => { |
| | | let score = ''; |
| | | try { |
| | | const json = typeof item.resultEvaluateJson === 'string' |
| | | ? JSON.parse(item.resultEvaluateJson) |
| | | : item.resultEvaluateJson; |
| | | score = json?.score || ''; |
| | | } catch (e) {} |
| | | return { ...item, score }; |
| | | }) |
| | | this.total = res.data?.total || 0 |
| | | } finally { |
| | | this.loading = false |
| | | } |
| | | }, |
| | | handleSearch() { |
| | | this.queryForm.pageNum = 1 |
| | | this.getList() |
| | | }, |
| | | handleReset() { |
| | | this.form = { |
| | | projectName: '', |
| | | experimentNo: '', |
| | | experimentName: '', |
| | | dateRange: [] |
| | | } |
| | | this.queryForm.pageNum = 1 |
| | | this.getList() |
| | | }, |
| | | |
| | | handleCurrentChange(page) { |
| | | this.queryForm.pageNum = page |
| | | this.getList() |
| | | }, |
| | | handleSizeChange(size) { |
| | | this.queryForm.pageSize = size |
| | | this.getList() |
| | | }, |
| | | handleAdd() { |
| | | this.$router.push({ |
| | | path: '/deliveryAssessment/addTesterWorkerEvaluate' |
| | | }) |
| | | }, |
| | | handleDetail(row) { |
| | | // 详情逻辑后续补充 |
| | | }, |
| | | handleEdit(row) { |
| | | // 编辑逻辑后续补充 |
| | | }, |
| | | handleDelete(row) { |
| | | // 删除逻辑后续补充 |
| | | } |
| | | |
| | | handleSearch() { |
| | | this.queryForm.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | mounted() { |
| | | this.getList() |
| | | handleReset() { |
| | | this.form = { |
| | | projectName: "", |
| | | experimentNo: "", |
| | | experimentName: "", |
| | | dateRange: [], |
| | | }; |
| | | this.queryForm.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | |
| | | handleCurrentChange(page) { |
| | | this.queryForm.pageNum = page; |
| | | this.getList(); |
| | | }, |
| | | handleSizeChange(size) { |
| | | this.queryForm.pageSize = size; |
| | | this.getList(); |
| | | }, |
| | | handleAdd() { |
| | | this.$router.push({ |
| | | path: "/deliveryAssessment/addTesterWorkerEvaluate", |
| | | }); |
| | | }, |
| | | handleDetail(row) { |
| | | // 详情逻辑后续补充 |
| | | this.$router.push({ |
| | | path: "/deliveryAssessment/addTesterWorkerEvaluate", |
| | | query: { id: row.id, type: 'view' }, |
| | | }); |
| | | }, |
| | | handleEdit(row) { |
| | | // 编辑逻辑后续补充 |
| | | this.$router.push({ |
| | | path: "/deliveryAssessment/addTesterWorkerEvaluate", |
| | | query: { id: row.id, type: 'edit' }, |
| | | }); |
| | | }, |
| | | handleDelete(row) { |
| | | // 删除逻辑后续补充 |
| | | this.changeStatus = true; |
| | | this.rowed = row; |
| | | }, |
| | | handleChangeStatusConfirm() { |
| | | deleteById({ id: this.rowed.id }).then(() => { |
| | | this.$message.success('删除成功'); |
| | | this.changeStatus = false; |
| | | this.getList(); |
| | | }) |
| | | .catch(() => { |
| | | this.$message.error('删除失败'); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getList(); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .list { |
| | | height: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .top-box-integral { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | flex-wrap: wrap; |
| | | gap: 28px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | flex-wrap: wrap; |
| | | gap: 28px; |
| | | |
| | | &-card { |
| | | flex: 1; |
| | | background: #E8FAF6; |
| | | box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.06); |
| | | border-radius: 10px; |
| | | padding: 21px 20px; |
| | | &-card { |
| | | flex: 1; |
| | | background: #e8faf6; |
| | | box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.06); |
| | | border-radius: 10px; |
| | | padding: 21px 20px; |
| | | |
| | | &-title { |
| | | font-family: 'SourceHanSansCN-Medium'; |
| | | font-size: 14px; |
| | | color: rgba(0, 0, 0, 0.8); |
| | | } |
| | | |
| | | &-num { |
| | | font-family: 'SF Compact Display Black'; |
| | | text-align: center; |
| | | font-weight: 900; |
| | | font-size: 50px; |
| | | color: #049C9A; |
| | | line-height: 60px; |
| | | } |
| | | &-title { |
| | | font-family: "SourceHanSansCN-Medium"; |
| | | font-size: 14px; |
| | | color: rgba(0, 0, 0, 0.8); |
| | | } |
| | | |
| | | &-num { |
| | | font-family: "SF Compact Display Black"; |
| | | text-align: center; |
| | | font-weight: 900; |
| | | font-size: 50px; |
| | | color: #049c9a; |
| | | line-height: 60px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .tip-warring { |
| | | margin-top: 20px; |
| | | color: rgba(255, 73, 85, 1); |
| | | margin-top: 20px; |
| | | color: rgba(255, 73, 85, 1); |
| | | } |
| | | |
| | | .table-title { |
| | | width: 220px; |
| | | height: 50px; |
| | | background: #FFFFFF; |
| | | border-radius: 8px 8px 0px 0px; |
| | | border: 1px solid #049C9A; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-family: SourceHanSansCN, SourceHanSansCN; |
| | | font-weight: bold; |
| | | font-size: 18px; |
| | | color: #049C9A; |
| | | line-height: 27px; |
| | | width: 220px; |
| | | height: 50px; |
| | | background: #ffffff; |
| | | border-radius: 8px 8px 0px 0px; |
| | | border: 1px solid #049c9a; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-family: SourceHanSansCN, SourceHanSansCN; |
| | | font-weight: bold; |
| | | font-size: 18px; |
| | | color: #049c9a; |
| | | line-height: 27px; |
| | | } |
| | | |
| | | .expand-box { |
| | | padding: 20px; |
| | | background: linear-gradient(180deg, #049C9A 0%, #0ACBCA 100%); |
| | | border-radius: 20px; |
| | | padding: 20px; |
| | | background: linear-gradient(180deg, #049c9a 0%, #0acbca 100%); |
| | | border-radius: 20px; |
| | | |
| | | &-title { |
| | | font-weight: 500; |
| | | font-size: 16px; |
| | | color: #FFFFFF; |
| | | line-height: 24px; |
| | | margin-bottom: 20px; |
| | | } |
| | | &-title { |
| | | font-weight: 500; |
| | | font-size: 16px; |
| | | color: #ffffff; |
| | | line-height: 24px; |
| | | margin-bottom: 20px; |
| | | } |
| | | } |
| | | |
| | | .flex { |
| | | display: flex; |
| | | align-items: center; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .tableTitle { |
| | | display: flex; |
| | | padding-bottom: 20px; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | display: flex; |
| | | padding-bottom: 20px; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | |
| | | .title { |
| | | background: #fafafc; |
| | | border-radius: 8px 8px 0px 0px; |
| | | border: 1px solid #dcdfe6; |
| | | padding: 16px 29px; |
| | | font-weight: bold; |
| | | font-size: 18px; |
| | | color: #606266; |
| | | width: unset; |
| | | cursor: pointer; |
| | | } |
| | | .title { |
| | | background: #fafafc; |
| | | border-radius: 8px 8px 0px 0px; |
| | | border: 1px solid #dcdfe6; |
| | | padding: 16px 29px; |
| | | font-weight: bold; |
| | | font-size: 18px; |
| | | color: #606266; |
| | | width: unset; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .drafts { |
| | | padding: 16px 65px; |
| | | background: #fafafc; |
| | | border-radius: 8px 8px 0px 0px; |
| | | border: 1px solid #dcdfe6; |
| | | font-weight: 400; |
| | | font-size: 18px; |
| | | color: #606266; |
| | | margin-left: 16px; |
| | | cursor: pointer; |
| | | } |
| | | .drafts { |
| | | padding: 16px 65px; |
| | | background: #fafafc; |
| | | border-radius: 8px 8px 0px 0px; |
| | | border: 1px solid #dcdfe6; |
| | | font-weight: 400; |
| | | font-size: 18px; |
| | | color: #606266; |
| | | margin-left: 16px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .active { |
| | | color: #049c9a; |
| | | background: #ffffff; |
| | | border-radius: 8px 8px 0px 0px; |
| | | border: 1px solid #049c9a; |
| | | } |
| | | .active { |
| | | color: #049c9a; |
| | | background: #ffffff; |
| | | border-radius: 8px 8px 0px 0px; |
| | | border: 1px solid #049c9a; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | return axios.get('/open/t-result-work-evaluate/getEvaluateTester', { params:data }) |
| | | } |
| | | |
| | | // export const getEvaluateChemist = (data) => { |
| | | // return axios.get('/open/t-result-work-evaluate/getEvaluateTester', { params:data }) |
| | | // } |
| | | export const getEvaluateDetailById = (data) => { |
| | | return axios.get('/open/t-result-work-evaluate/getEvaluateDetailById', { params:data }) |
| | | } |
| | | |
| | | // export const update = (data) => { |
| | | // return axios.post('/api/t-tester-other-task/update', { ...data }) |
| | | // } |
| | | // export const deleteById = (data) => { |
| | | // return axios.delete('/open/t-tester-other-task/deleteById', { params:data }) |
| | | // } |
| | | export const update = (data) => { |
| | | return axios.post('/api/t-result-work-evaluate/edit', { ...data }) |
| | | } |
| | | export const deleteById = (data) => { |
| | | return axios.delete('/open/t-result-work-evaluate/deleteById', { params:data }) |
| | | } |
| | | // export const deleteByIds = (data) => { |
| | | // return axios.delete('/open/t-tester-other-task/deleteByIds', { params:data }) |
| | | // } |
| | |
| | | icon: require("../../assets/login/img4.png"), |
| | | path: "/deliveryAssessment/projectTeamIntegral", |
| | | }, |
| | | { |
| | | text: "专业报告库", |
| | | icon: require("../../assets/login/img2.png"), |
| | | path: "/reportLibrary/feasibilityStudy", |
| | | }, |
| | | // { |
| | | // text: "专业报告库", |
| | | // icon: require("../../assets/login/img2.png"), |
| | | // path: "/reportLibrary/feasibilityStudy", |
| | | // }, |
| | | { |
| | | text: "化验师提交", |
| | | icon: require("../../assets/login/img7.png"), |
| | |
| | | icon: require('../../assets/login/img4.png'), |
| | | path: '/deliveryAssessment/projectTeamIntegral' |
| | | }, |
| | | { |
| | | text: "专业报告库", |
| | | icon: require("../../assets/login/img2.png"), |
| | | path: "/reportLibrary/feasibilityStudy", |
| | | }, |
| | | { |
| | | text: "化验师提交", |
| | | icon: require("../../assets/login/img3.png"), |
| | | path: "/chemistQa/projectTesting", |
| | | }, |
| | | // { |
| | | // text: "专业报告库", |
| | | // icon: require("../../assets/login/img2.png"), |
| | | // path: "/reportLibrary/feasibilityStudy", |
| | | // }, |
| | | // { |
| | | // text: "化验师提交", |
| | | // icon: require("../../assets/login/img3.png"), |
| | | // path: "/chemistQa/projectTesting", |
| | | // }, |
| | | |
| | | ], |
| | | // 超级管理员 |
| | |
| | | <el-button type="primary" @click="selectMember">选择人员</el-button> |
| | | </div> |
| | | <Table :data="tableData" :total="0" :height='null'> |
| | | <el-table-column label="姓名" prop="role" /> |
| | | <el-table-column label="联系电话" prop="name" /> |
| | | <el-table-column label="角色" prop="createTime" /> |
| | | <el-table-column label="登陆账号" prop="createTime" /> |
| | | <el-table-column label="登录状态" prop="createTime" /> |
| | | <el-table-column label="姓名" prop="nickName" /> |
| | | <el-table-column label="联系电话" prop="phonenumber" /> |
| | | <el-table-column label="角色" prop="roleName" /> |
| | | <el-table-column label="登陆账号" prop="phonenumber" /> |
| | | <el-table-column label="登录状态" prop="status"> |
| | | <template v-if="row.status==1"> |
| | | <el-tag>正常</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" prop="createTime" /> |
| | | </Table> |
| | | <div class="select-member-footer"> |
| | |
| | | <el-button type="primary" @click="submit">保存</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <SelectMember ref="selectMember" @submit='submitChoose'/> |
| | | <SelectMember ref="selectMember" @submit='submitChoose' :roleType='row.roleType' /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {inherit} from '../service' |
| | | export default { |
| | | props: { |
| | | dialogVisible: { |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | console.log('this.row this.row',this.row) |
| | | if (Object.keys(this.row).length) { |
| | | this.form = { |
| | | ...this.row |
| | |
| | | } |
| | | this.$refs.selectMember.close() |
| | | this.tableData=data |
| | | console.log('data data data',data) |
| | | |
| | | }, |
| | | submit() { |
| | | let params={ |
| | | userId:this.id, |
| | | oldUserId:this.tableData[0].id |
| | | } |
| | | inherit(params).then(res=>{ |
| | | this.$message.success('继承成功') |
| | | this.$emit('close') |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | }; |
| | |
| | | <template slot-scope="{ row }"> |
| | | <div> |
| | | <el-button type="text" @click="edit(row)" class="action-button">编辑</el-button> |
| | | <el-button type="text" @click="inherit(row)" class="action-button">账号继承</el-button> |
| | | <el-button type="text" @click="inherit(row)" class="action-button" v-if="row.status == 1">账号继承</el-button> |
| | | <el-button v-if="row.status != 0" type="text" @click="updateStatus(row, true)" class="action-button"> |
| | | 启用 |
| | | </el-button> |
| | |
| | | } |
| | | export const typeList = () => { |
| | | return axios.get(`/t-business-dept/list/type?type=1`,) |
| | | } |
| | | |
| | | export const inherit = (data) => { |
| | | return axios.put(`/open/system/user/inherit`, { ...data }) |
| | | } |