| | |
| | | }, |
| | | methods: { |
| | | open() { |
| | | if(this.form.date && this.form.date.length === 2){ |
| | | this.form.startTime=this.form.date[0] |
| | | this.form.endTime=this.form.date[1] |
| | | } |
| | | getDataList({ ...this.form }).then(res => { |
| | | console.log('/////////////', res); |
| | | this.tableData = res.data.records || [] |
| | |
| | | { |
| | | path: "editVerificationRelease", |
| | | meta: { |
| | | title: "新增验证与发布", |
| | | title: "编辑验证与发布", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="reportCode" style="margin-top: 38px"> |
| | | <el-input v-model="form.reportCode" style="width: 100%;" placeholder="请输入报告编号" /> |
| | | <el-input v-model="form.reportCode" disabled style="width: 100%;" placeholder="请输入报告编号" /> |
| | | </el-form-item> |
| | | |
| | | <div class="header-title" style="width: 100%;"> |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="name" style="margin-top: 38px"> |
| | | <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList"> |
| | | <el-upload action="#" :file-list="fileList" :http-request="handleUpload" |
| | | :before-upload="beforeUpload" :on-remove="handleRemove"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | |
| | |
| | | import AiEditor from '@/components/AiEditor' |
| | | import chooseProject from '@/components/chooseProject' |
| | | import { addData, getDetail, editData } from './service' |
| | | import { customUploadRequest, getFullUrl } from '@/utils/utils' |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | form: { |
| | | reportCode: "", |
| | | reportName: "", |
| | | reportText: "" |
| | | reportText: "", |
| | | feasibilityReportFiles:[] |
| | | }, |
| | | tableData: [], |
| | | fileList: [], // 附件列表 |
| | | showChoose: false, |
| | | rules: { |
| | | reportCode: [ |
| | | { required: true, message: '请输入报告编号', trigger: 'blur' } |
| | | ], |
| | | // reportCode: [ |
| | | // { required: true, message: '请输入报告编号', trigger: 'blur' } |
| | | // ], |
| | | reportName: [ |
| | | { required: true, message: '请输入报告名称', trigger: 'blur' } |
| | | ], |
| | |
| | | getDetail(this.$route.query.id).then(res => { |
| | | this.form = res |
| | | this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }] |
| | | this.fileList = res.fileList |
| | | if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) { |
| | | this.fileList = res.feasibilityReportFiles.map(file => ({ |
| | | name: file.fileName, |
| | | url: getFullUrl(file.fileUrl), |
| | | uid: file.id |
| | | })) |
| | | this.form.feasibilityReportFiles = res.fileList |
| | | } else { |
| | | this.fileList = [] |
| | | this.form.feasibilityReportFiles = [] |
| | | } |
| | | }) |
| | | }, |
| | | getProjectData(data) { |
| | | this.tableData = [data] |
| | | this.$forceUpdate() |
| | | this.showChoose = false |
| | | }, |
| | | // 上传前校验 |
| | | beforeUpload(file) { |
| | | return true; |
| | | }, |
| | | // 自定义上传处理 |
| | | handleUpload(options) { |
| | | const { file, onSuccess, onError } = options; |
| | | |
| | | // 使用封装的customUploadRequest方法 |
| | | customUploadRequest({ |
| | | file, |
| | | onSuccess: (res) => { |
| | | console.log() |
| | | if (res.code === 200) { |
| | | const fileObj = { |
| | | id: new Date().getTime(), |
| | | reportId: this.$route.query.id ? this.$route.query.id : '', |
| | | fileUrl: res.msg || res.data || '', |
| | | reportType: 2, // 报告类型 |
| | | fileName: file.name, |
| | | fileSize: file.size, |
| | | }; |
| | | |
| | | // 添加到文件列表显示 |
| | | this.fileList.push({ |
| | | name: file.name, |
| | | url: getFullUrl(fileObj.fileUrl), |
| | | uid: fileObj.id |
| | | }); |
| | | |
| | | // 添加到表单数据 |
| | | this.form.feasibilityReportFiles.push(fileObj); |
| | | |
| | | this.$message.success('文件上传成功'); |
| | | onSuccess(res); |
| | | } else { |
| | | this.$message.error(res.message || '文件上传失败'); |
| | | onError(); |
| | | } |
| | | }, |
| | | onError: (err) => { |
| | | this.$message.error('文件上传失败'); |
| | | onError(err); |
| | | } |
| | | }); |
| | | }, |
| | | // 删除文件 |
| | | handleRemove(file) { |
| | | const index = this.fileList.findIndex(item => item.name === file.name); |
| | | if (index !== -1) { |
| | | this.fileList.splice(index, 1); |
| | | this.form.feasibilityReportFiles.splice(index, 1); |
| | | } |
| | | }, |
| | | submit() { |
| | | if (this.tableData.length == 0) { |
| | |
| | | |
| | | if (valid) { |
| | | this.loading = true |
| | | if (this.$route.query.id) { |
| | | editData({ ...data, id: this.$route.query.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('修改成功') |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | } |
| | | }) |
| | | } else { |
| | | addData({ ...data }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('提交成功') |
| | | this.$message.success('发布成功') |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.message) |
| | |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2"> |
| | | 通过 |
| | | </div> |
| | | <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3"> |
| | | <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4"> |
| | | 驳回 |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button> |
| | | <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button> |
| | | <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确认</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | type: data.status === 2 ? "primary" : "danger", |
| | | mode: "list", |
| | | fields: [ |
| | | { label: "审核结果:", value: data.status == 4 ? '驳回' : "通过" || "" }, |
| | | { label: "审批意见:", value: data.auditRemark || "" }, |
| | | { label: "审核人:", value: data.auditPersonName || "" }, |
| | | { label: "审核时间:", value: data.auditTime || "" }, |
| | |
| | | type: "success", |
| | | mode: "list", |
| | | fields: [ |
| | | { label: "已评定" }, |
| | | { label: "评定状态:已评定" }, |
| | | { label: "评定人:", value: data.evaluatePersonName || "" }, |
| | | { label: "评定时间:", value: data.evaluateTime || "" } |
| | | ], |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="" style="margin-left: 63px;"> |
| | | <el-button type="default" style="margin-right: 10px;">重置</el-button> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="default" style="margin-right: 10px;" @click="handleReset">重置</el-button> |
| | | <el-button type="primary" @click="handleSearch">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | <template #default="{ row }"> |
| | | <el-button type="text" @click="handleApproval(row)" |
| | | v-if="row.status == 1 && [1, 2].includes(roleType)">审核</el-button> |
| | | <el-button type="text" @click="handleDetail(row)">详情</el-button> |
| | | <el-button type="text" @click="handleDetail(row)" v-if="!isDraft">详情</el-button> |
| | | <el-button type="text" @click="handleEdit(row)" |
| | | v-if="[4, 5].includes(row.status) && roleType == 3">编辑</el-button> |
| | | v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">编辑</el-button> |
| | | <el-button type="text" @click="handleDelete(row)" |
| | | v-if="[4, 5].includes(row.status) && roleType == 3">删除</el-button> |
| | | v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">删除</el-button> |
| | | |
| | | <el-button type="text" @click="handleRevoke(row)" |
| | | v-if="row.status == 1 && roleType == 3">撤销审批</el-button> |
| | |
| | | } else { |
| | | data = this.form |
| | | } |
| | | |
| | | // 处理日期范围 |
| | | if (data.date && data.date.length === 2) { |
| | | data.startTime = this.formatDate(data.date[0]) |
| | | data.endTime = this.formatDate(data.date[1]) |
| | | } else { |
| | | data.startTime = '' |
| | | data.endTime = '' |
| | | } |
| | | |
| | | getDataList(data).then(res => { |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records || [] |
| | |
| | | this.getList() |
| | | } |
| | | }) |
| | | }, |
| | | handleReset() { |
| | | this.form.teamName = '' |
| | | this.form.reportName = '' |
| | | this.form.reportCode = '' |
| | | this.form.date = '' |
| | | this.form.status = '' |
| | | this.form.startTime = '' |
| | | this.form.endTime = '' |
| | | this.form.pageNum = 1 |
| | | this.getList() |
| | | }, |
| | | handleSearch() { |
| | | this.form.pageNum = 1 |
| | | this.getList() |
| | | }, |
| | | formatDate(date) { |
| | | const year = date.getFullYear() |
| | | const month = String(date.getMonth() + 1).padStart(2, '0') |
| | | const day = String(date.getDate()).padStart(2, '0') |
| | | return `${year}-${month}-${day}` |
| | | } |
| | | } |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="reportCode" style="margin-top: 38px"> |
| | | <el-input v-model="form.reportCode" style="width: 100%;" placeholder="请输入报告编号" /> |
| | | <el-input v-model="form.reportCode" disabled style="width: 100%;" placeholder="请输入报告编号" /> |
| | | </el-form-item> |
| | | |
| | | <div class="header-title" style="width: 100%;"> |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="name" style="margin-top: 38px"> |
| | | <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList"> |
| | | <el-upload action="#" :file-list="fileList" :http-request="handleUpload" |
| | | :before-upload="beforeUpload" :on-remove="handleRemove"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | |
| | |
| | | import AiEditor from '@/components/AiEditor' |
| | | import chooseProject from '@/components/chooseProject' |
| | | import { addData, getDetail, editData } from './service' |
| | | import { customUploadRequest, getFullUrl } from '@/utils/utils' |
| | | |
| | | export default { |
| | | components: { |
| | | AiEditor, |
| | |
| | | form: { |
| | | reportCode: "", |
| | | reportName: "", |
| | | reportText: "" |
| | | reportText: "", |
| | | feasibilityReportFiles: [] // 添加附件数组 |
| | | }, |
| | | tableData: [], |
| | | fileList: [], // 附件列表 |
| | | showChoose: false, |
| | | rules: { |
| | | reportCode: [ |
| | | { required: true, message: '请输入报告编号', trigger: 'blur' } |
| | | ], |
| | | // reportCode: [ |
| | | // { required: true, message: '请输入报告编号', trigger: 'blur' } |
| | | // ], |
| | | reportName: [ |
| | | { required: true, message: '请输入报告名称', trigger: 'blur' } |
| | | ], |
| | |
| | | getDetail(this.$route.query.id).then(res => { |
| | | this.form = res |
| | | this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }] |
| | | this.fileList = res.fileList |
| | | // 处理文件回显 |
| | | if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) { |
| | | this.fileList = res.feasibilityReportFiles.map(file => ({ |
| | | name: file.fileName, |
| | | url: getFullUrl(file.fileUrl), |
| | | uid: file.id |
| | | })) |
| | | this.form.feasibilityReportFiles = res.fileList |
| | | } else { |
| | | this.fileList = [] |
| | | this.form.feasibilityReportFiles = [] |
| | | } |
| | | }) |
| | | }, |
| | | //获取选择项目组数据 |
| | |
| | | this.tableData = [data] |
| | | this.$forceUpdate() |
| | | this.showChoose = false |
| | | }, |
| | | // 上传前校验 |
| | | beforeUpload(file) { |
| | | return true; |
| | | }, |
| | | // 自定义上传处理 |
| | | handleUpload(options) { |
| | | const { file, onSuccess, onError } = options; |
| | | |
| | | // 使用封装的customUploadRequest方法 |
| | | customUploadRequest({ |
| | | file, |
| | | onSuccess: (res) => { |
| | | console.log() |
| | | if (res.code === 200) { |
| | | const fileObj = { |
| | | id: new Date().getTime(), |
| | | reportId: this.$route.query.id ? this.$route.query.id : '', |
| | | fileUrl: res.msg || res.data || '', |
| | | reportType: 1, // 可行性研究报告类型 |
| | | fileName: file.name, |
| | | fileSize: file.size, |
| | | }; |
| | | |
| | | // 添加到文件列表显示 |
| | | this.fileList.push({ |
| | | name: file.name, |
| | | url: getFullUrl(fileObj.fileUrl), |
| | | uid: fileObj.id |
| | | }); |
| | | |
| | | // 添加到表单数据 |
| | | this.form.feasibilityReportFiles.push(fileObj); |
| | | |
| | | this.$message.success('文件上传成功'); |
| | | onSuccess(res); |
| | | } else { |
| | | this.$message.error(res.message || '文件上传失败'); |
| | | onError(); |
| | | } |
| | | }, |
| | | onError: (err) => { |
| | | this.$message.error('文件上传失败'); |
| | | onError(err); |
| | | } |
| | | }); |
| | | }, |
| | | // 删除文件 |
| | | handleRemove(file) { |
| | | const index = this.fileList.findIndex(item => item.name === file.name); |
| | | if (index !== -1) { |
| | | this.fileList.splice(index, 1); |
| | | this.form.feasibilityReportFiles.splice(index, 1); |
| | | } |
| | | }, |
| | | submit() { |
| | | console.log(this.$refs.materialEditor.getContent()); |
| | |
| | | |
| | | if (valid) { |
| | | this.loading = true |
| | | if (this.$route.query.id) { |
| | | editData({ ...data, id: this.$route.query.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('修改成功') |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | } |
| | | }) |
| | | } else { |
| | | addData({ ...data }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('提交成功') |
| | | this.$message.success('发布成功') |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.message) |
| | |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2"> |
| | | 通过 |
| | | </div> |
| | | <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3"> |
| | | <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4"> |
| | | 驳回 |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button> |
| | | <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button> |
| | | <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确认</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | ] |
| | | }); |
| | | |
| | | if (data.status == 2 || data.status == 3) { |
| | | if (data.status == 2 || data.status == 4) { |
| | | processData.push({ |
| | | type: data.status === 2 ? "primary" : "danger", |
| | | type: 'primary', |
| | | mode: "list", |
| | | fields: [ |
| | | { label: "审核结果:", value: data.status == 4 ? '驳回' : "通过" || "" }, |
| | | { label: "审批意见:", value: data.auditRemark || "" }, |
| | | { label: "审核人:", value: data.auditPersonName || "" }, |
| | | { label: "审核时间:", value: data.auditTime || "" }, |
| | |
| | | type: "success", |
| | | mode: "list", |
| | | fields: [ |
| | | { label: "已评定" }, |
| | | { label: "评定状态:已评定" }, |
| | | { label: "评定人:", value: data.evaluatePersonName || "" }, |
| | | { label: "评定时间:", value: data.evaluateTime || "" } |
| | | ], |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="" style="margin-left: 63px;"> |
| | | <el-button type="default" style="margin-right: 10px;">重置</el-button> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="default" style="margin-right: 10px;" @click="handleReset">重置</el-button> |
| | | <el-button type="primary" @click="handleSearch">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | <template #default="{ row }"> |
| | | <el-button type="text" @click="handleApproval(row)" |
| | | v-if="row.status == 1 && [1, 2].includes(roleType)">审核</el-button> |
| | | <el-button type="text" @click="handleDetail(row)">详情</el-button> |
| | | <el-button type="text" @click="handleDelete(row)" |
| | | v-if="[4, 5].includes(row.status) && roleType == 3">删除</el-button> |
| | | <el-button type="text" @click="handleDetail(row)" v-if="!isDraft">详情</el-button> |
| | | <el-button type="text" @click="handleEdit(row)" |
| | | v-if="[4, 5].includes(row.status) && roleType == 3">编辑</el-button> |
| | | v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">编辑</el-button> |
| | | <el-button type="text" @click="handleDelete(row)" |
| | | v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">删除</el-button> |
| | | |
| | | <el-button type="text" @click="handleRevoke(row)" |
| | | v-if="row.status == 1 && roleType == 3">撤销审批</el-button> |
| | | </template> |
| | |
| | | } else { |
| | | data = this.form |
| | | } |
| | | |
| | | // 处理日期范围 |
| | | if (this.form.date && this.form.date.length === 2) { |
| | | data.startTime = this.form.date[0] |
| | | data.endTime = this.form.date[1] |
| | | } else { |
| | | data.startTime = '' |
| | | data.endTime = '' |
| | | } |
| | | |
| | | getDataList(data).then(res => { |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records || [] |
| | |
| | | this.getList() |
| | | } |
| | | }) |
| | | }, |
| | | handleReset() { |
| | | this.form.pageNum = 1 |
| | | this.form.teamName = '' |
| | | this.form.reportName = '' |
| | | this.form.reportCode = '' |
| | | this.form.date = '' |
| | | this.form.status = '' |
| | | this.getList() |
| | | }, |
| | | handleSearch() { |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | justify-content: center; |
| | | // margin-bottom: 21px; |
| | | font-family: SourceHanSansCN, SourceHanSansCN; |
| | | font-weight: bold; |
| | | |
| | | font-size: 18px; |
| | | color: #606266; |
| | | line-height: 27px; |
| | |
| | | justify-content: center; |
| | | // margin-bottom: 21px; |
| | | font-family: SourceHanSansCN, SourceHanSansCN; |
| | | font-weight: bold; |
| | | font-size: 18px; |
| | | color: #049C9A; |
| | | line-height: 27px; |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="reportCode" style="margin-top: 38px"> |
| | | <el-input v-model="form.reportCode" style="width: 100%;" placeholder="请输入报告编号" /> |
| | | <el-input v-model="form.reportCode" disabled style="width: 100%;" placeholder="请输入报告编号" /> |
| | | </el-form-item> |
| | | |
| | | <div class="header-title" style="width: 100%;"> |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="name" style="margin-top: 38px"> |
| | | <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList"> |
| | | <el-upload action="#" :file-list="fileList" :http-request="handleUpload" |
| | | :before-upload="beforeUpload" :on-remove="handleRemove"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | |
| | |
| | | import AiEditor from '@/components/AiEditor' |
| | | import chooseProject from '@/components/chooseProject' |
| | | import { addData, getDetail, editData } from './service' |
| | | import { customUploadRequest, getFullUrl } from '@/utils/utils' |
| | | export default { |
| | | components: { |
| | | AiEditor, |
| | |
| | | form: { |
| | | reportCode: "", |
| | | reportName: "", |
| | | reportText: "" |
| | | reportText: "", |
| | | feasibilityReportFiles: [] // 添加附件数组 |
| | | }, |
| | | tableData: [], |
| | | fileList: [], // 附件列表 |
| | | showChoose: false, |
| | | rules: { |
| | | reportCode: [ |
| | | { required: true, message: '请输入报告编号', trigger: 'blur' } |
| | | ], |
| | | // reportCode: [ |
| | | // { required: true, message: '请输入报告编号', trigger: 'blur' } |
| | | // ], |
| | | reportName: [ |
| | | { required: true, message: '请输入报告名称', trigger: 'blur' } |
| | | ], |
| | |
| | | getDetail(this.$route.query.id).then(res => { |
| | | this.form = res |
| | | this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }] |
| | | this.fileList = res.fileList |
| | | if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) { |
| | | this.fileList = res.feasibilityReportFiles.map(file => ({ |
| | | name: file.fileName, |
| | | url: getFullUrl(file.fileUrl), |
| | | uid: file.id |
| | | })) |
| | | this.form.feasibilityReportFiles = res.fileList |
| | | } else { |
| | | this.fileList = [] |
| | | this.form.feasibilityReportFiles = [] |
| | | } |
| | | }) |
| | | }, |
| | | //获取选择项目组数据 |
| | |
| | | this.tableData = [data] |
| | | this.$forceUpdate() |
| | | this.showChoose = false |
| | | }, |
| | | // 上传前校验 |
| | | beforeUpload(file) { |
| | | return true; |
| | | }, |
| | | // 自定义上传处理 |
| | | handleUpload(options) { |
| | | const { file, onSuccess, onError } = options; |
| | | |
| | | // 使用封装的customUploadRequest方法 |
| | | customUploadRequest({ |
| | | file, |
| | | onSuccess: (res) => { |
| | | console.log() |
| | | if (res.code === 200) { |
| | | const fileObj = { |
| | | id: new Date().getTime(), |
| | | reportId: this.$route.query.id ? this.$route.query.id : '', |
| | | fileUrl: res.msg || res.data || '', |
| | | reportType: 3, // 可行性研究报告类型 |
| | | fileName: file.name, |
| | | fileSize: file.size, |
| | | }; |
| | | |
| | | // 添加到文件列表显示 |
| | | this.fileList.push({ |
| | | name: file.name, |
| | | url: getFullUrl(fileObj.fileUrl), |
| | | uid: fileObj.id |
| | | }); |
| | | |
| | | // 添加到表单数据 |
| | | this.form.feasibilityReportFiles.push(fileObj); |
| | | |
| | | this.$message.success('文件上传成功'); |
| | | onSuccess(res); |
| | | } else { |
| | | this.$message.error(res.message || '文件上传失败'); |
| | | onError(); |
| | | } |
| | | }, |
| | | onError: (err) => { |
| | | this.$message.error('文件上传失败'); |
| | | onError(err); |
| | | } |
| | | }); |
| | | }, |
| | | // 删除文件 |
| | | handleRemove(file) { |
| | | const index = this.fileList.findIndex(item => item.name === file.name); |
| | | if (index !== -1) { |
| | | this.fileList.splice(index, 1); |
| | | this.form.feasibilityReportFiles.splice(index, 1); |
| | | } |
| | | }, |
| | | submit() { |
| | | console.log(this.$refs.materialEditor.getContent()); |
| | |
| | | |
| | | if (valid) { |
| | | this.loading = true |
| | | if (this.$route.query.id) { |
| | | editData({ ...data, id: this.$route.query.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('修改成功') |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | } |
| | | }) |
| | | } else { |
| | | addData({ ...data }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('提交成功') |
| | | this.$message.success('发布成功') |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.message) |
| | |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2"> |
| | | 通过 |
| | | </div> |
| | | <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3"> |
| | | <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4"> |
| | | 驳回 |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button> |
| | | <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button> |
| | | <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | |
| | | if (data.status == 2 || data.status == 3) { |
| | | processData.push({ |
| | | type: data.status === 2 ? "primary" : "danger", |
| | | type: "primary", |
| | | mode: "list", |
| | | fields: [ |
| | | { label: "审核结果:", value: data.status == 4 ? '驳回' : "通过" || "" }, |
| | | { label: "审批意见:", value: data.auditRemark || "" }, |
| | | { label: "审核人:", value: data.auditPersonName || "" }, |
| | | { label: "审核时间:", value: data.auditTime || "" }, |
| | |
| | | type: "success", |
| | | mode: "list", |
| | | fields: [ |
| | | { label: "已评定" }, |
| | | { label: "评定状态:已评定" }, |
| | | { label: "评定人:", value: data.evaluatePersonName || "" }, |
| | | { label: "评定时间:", value: data.evaluateTime || "" } |
| | | ], |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="" style="margin-left: 63px;"> |
| | | <el-button type="default" style="margin-right: 10px;">重置</el-button> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="default" style="margin-right: 10px;" @click="handleReset">重置</el-button> |
| | | <el-button type="primary" @click="handleSearch">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | <template #default="{ row }"> |
| | | <el-button type="text" @click="handleApproval(row)" |
| | | v-if="row.status == 1 && [1, 2].includes(roleType)">审核</el-button> |
| | | <el-button type="text" @click="handleDetail(row)">详情</el-button> |
| | | <el-button type="text" @click="handleDelete(row)" |
| | | v-if="[4, 5].includes(row.status) && roleType == 3">删除</el-button> |
| | | <el-button type="text" @click="handleDetail(row)" v-if="!isDraft">详情</el-button> |
| | | <el-button type="text" @click="handleEdit(row)" |
| | | v-if="[4, 5].includes(row.status) && roleType == 3">编辑</el-button> |
| | | v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">编辑</el-button> |
| | | <el-button type="text" @click="handleDelete(row)" |
| | | v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">删除</el-button> |
| | | |
| | | <el-button type="text" @click="handleRevoke(row)" |
| | | v-if="row.status == 1 && roleType == 3">撤销审批</el-button> |
| | | </template> |
| | |
| | | } else { |
| | | data = this.form |
| | | } |
| | | // 处理日期范围 |
| | | if (this.form.date && this.form.date.length === 2) { |
| | | data.startTime = this.form.date[0] |
| | | data.endTime = this.form.date[1] |
| | | } else { |
| | | data.startTime = '' |
| | | data.endTime = '' |
| | | } |
| | | getDataList(data).then(res => { |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records || [] |
| | |
| | | this.getList() |
| | | } |
| | | }) |
| | | }, |
| | | handleReset() { |
| | | this.form.pageNum = 1 |
| | | this.form.teamName = '' |
| | | this.form.reportName = '' |
| | | this.form.reportCode = '' |
| | | this.form.date = '' |
| | | this.form.status = '' |
| | | this.getList() |
| | | }, |
| | | handleSearch() { |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="reportCode" style="margin-top: 38px"> |
| | | <el-input v-model="form.reportCode" style="width: 100%;" placeholder="请输入报告编号" /> |
| | | <el-input v-model="form.reportCode" disabled style="width: 100%;" placeholder="请输入报告编号" /> |
| | | </el-form-item> |
| | | |
| | | <div class="header-title" style="width: 100%;"> |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="name" style="margin-top: 38px"> |
| | | <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList"> |
| | | <el-upload action="#" :file-list="fileList" :http-request="handleUpload" |
| | | :before-upload="beforeUpload" :on-remove="handleRemove"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | |
| | |
| | | import AiEditor from '@/components/AiEditor' |
| | | import chooseProject from '@/components/chooseProject' |
| | | import { addData, getDetail, editData } from './service' |
| | | import { customUploadRequest, getFullUrl } from '@/utils/utils' |
| | | export default { |
| | | components: { |
| | | AiEditor, |
| | |
| | | form: { |
| | | reportCode: "", |
| | | reportName: "", |
| | | reportText: "" |
| | | reportText: "", feasibilityReportFiles: [] // 添加附件数组 |
| | | }, |
| | | tableData: [], |
| | | fileList: [], // 附件列表 |
| | | showChoose: false, |
| | | rules: { |
| | | reportCode: [ |
| | | { required: true, message: '请输入报告编号', trigger: 'blur' } |
| | | ], |
| | | // reportCode: [ |
| | | // { required: true, message: '请输入报告编号', trigger: 'blur' } |
| | | // ], |
| | | reportName: [ |
| | | { required: true, message: '请输入报告名称', trigger: 'blur' } |
| | | ], |
| | |
| | | getDetail(this.$route.query.id).then(res => { |
| | | this.form = res |
| | | this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }] |
| | | this.fileList = res.fileList |
| | | // 处理文件回显 |
| | | if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) { |
| | | this.fileList = res.feasibilityReportFiles.map(file => ({ |
| | | name: file.fileName, |
| | | url: getFullUrl(file.fileUrl), |
| | | uid: file.id |
| | | })) |
| | | this.form.feasibilityReportFiles = res.fileList |
| | | } else { |
| | | this.fileList = [] |
| | | this.form.feasibilityReportFiles = [] |
| | | } |
| | | }) |
| | | }, |
| | | //获取选择项目组数据 |
| | |
| | | this.tableData = [data] |
| | | this.$forceUpdate() |
| | | this.showChoose = false |
| | | }, |
| | | |
| | | // 上传前校验 |
| | | beforeUpload(file) { |
| | | return true; |
| | | }, |
| | | // 自定义上传处理 |
| | | handleUpload(options) { |
| | | const { file, onSuccess, onError } = options; |
| | | |
| | | // 使用封装的customUploadRequest方法 |
| | | customUploadRequest({ |
| | | file, |
| | | onSuccess: (res) => { |
| | | console.log() |
| | | if (res.code === 200) { |
| | | const fileObj = { |
| | | id: new Date().getTime(), |
| | | reportId: this.$route.query.id ? this.$route.query.id : '', |
| | | fileUrl: res.msg || res.data || '', |
| | | reportType: 1, // 可行性研究报告类型 |
| | | fileName: file.name, |
| | | fileSize: file.size, |
| | | }; |
| | | |
| | | // 添加到文件列表显示 |
| | | this.fileList.push({ |
| | | name: file.name, |
| | | url: getFullUrl(fileObj.fileUrl), |
| | | uid: fileObj.id |
| | | }); |
| | | |
| | | // 添加到表单数据 |
| | | this.form.feasibilityReportFiles.push(fileObj); |
| | | |
| | | this.$message.success('文件上传成功'); |
| | | onSuccess(res); |
| | | } else { |
| | | this.$message.error(res.message || '文件上传失败'); |
| | | onError(); |
| | | } |
| | | }, |
| | | onError: (err) => { |
| | | this.$message.error('文件上传失败'); |
| | | onError(err); |
| | | } |
| | | }); |
| | | }, |
| | | // 删除文件 |
| | | handleRemove(file) { |
| | | const index = this.fileList.findIndex(item => item.name === file.name); |
| | | if (index !== -1) { |
| | | this.fileList.splice(index, 1); |
| | | this.form.feasibilityReportFiles.splice(index, 1); |
| | | } |
| | | }, |
| | | submit() { |
| | | console.log(this.$refs.materialEditor.getContent()); |
| | |
| | | |
| | | if (valid) { |
| | | this.loading = true |
| | | if (this.$route.query.id) { |
| | | editData({ ...data, id: this.$route.query.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('修改成功') |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | } |
| | | }) |
| | | } else { |
| | | addData({ ...data }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('提交成功') |
| | | this.$message.success('发布成功') |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.message) |
| | |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2"> |
| | | 通过 |
| | | </div> |
| | | <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3"> |
| | | <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4"> |
| | | 驳回 |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button> |
| | | <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button> |
| | | <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="" style="margin-left: 63px;"> |
| | | <el-button type="default" style="margin-right: 10px;">重置</el-button> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="default" style="margin-right: 10px;" @click="handleReset">重置</el-button> |
| | | <el-button type="primary" @click="handleSearch">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | <template #default="{ row }"> |
| | | <el-button type="text" @click="handleApproval(row)" |
| | | v-if="row.status == 1 && [1, 2].includes(roleType)">审核</el-button> |
| | | <el-button type="text" @click="handleDetail(row)">详情</el-button> |
| | | <el-button type="text" @click="handleDelete(row)" |
| | | v-if="[4, 5].includes(row.status) && roleType == 3">删除</el-button> |
| | | <el-button type="text" @click="handleDetail(row)" v-if="!isDraft">详情</el-button> |
| | | <el-button type="text" @click="handleEdit(row)" |
| | | v-if="[4, 5].includes(row.status) && roleType == 3">编辑</el-button> |
| | | v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">编辑</el-button> |
| | | <el-button type="text" @click="handleDelete(row)" |
| | | v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">删除</el-button> |
| | | |
| | | <el-button type="text" @click="handleRevoke(row)" |
| | | v-if="row.status == 1 && roleType == 3">撤销审批</el-button> |
| | | </template> |
| | |
| | | } else { |
| | | data = this.form |
| | | } |
| | | |
| | | // 处理日期范围 |
| | | if (this.form.date && this.form.date.length === 2) { |
| | | data.startTime = this.form.date[0] |
| | | data.endTime = this.form.date[1] |
| | | } else { |
| | | data.startTime = '' |
| | | data.endTime = '' |
| | | } |
| | | getDataList(data).then(res => { |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records || [] |
| | |
| | | this.getList() |
| | | } |
| | | }) |
| | | }, |
| | | handleReset() { |
| | | this.form.pageNum = 1 |
| | | this.form.teamName = '' |
| | | this.form.reportName = '' |
| | | this.form.reportCode = '' |
| | | this.form.date = '' |
| | | this.form.status = '' |
| | | this.getList() |
| | | }, |
| | | handleSearch() { |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="reportCode" style="margin-top: 38px"> |
| | | <el-input v-model="form.reportCode" style="width: 100%;" placeholder="请输入报告编号" /> |
| | | <el-input v-model="form.reportCode" disabled style="width: 100%;" placeholder="请输入报告编号" /> |
| | | </el-form-item> |
| | | |
| | | <div class="header-title" style="width: 100%;"> |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="name" style="margin-top: 38px"> |
| | | <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList"> |
| | | <el-upload action="#" :file-list="fileList" :http-request="handleUpload" |
| | | :before-upload="beforeUpload" :on-remove="handleRemove"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | |
| | |
| | | import AiEditor from '@/components/AiEditor' |
| | | import chooseProject from '@/components/chooseProject' |
| | | import { addData, getDetail, editData } from './service' |
| | | import { customUploadRequest, getFullUrl } from '@/utils/utils' |
| | | export default { |
| | | components: { |
| | | AiEditor, |
| | |
| | | form: { |
| | | reportCode: "", |
| | | reportName: "", |
| | | reportText: "" |
| | | reportText: "", |
| | | feasibilityReportFiles: [] // 添加附件数组 |
| | | }, |
| | | tableData: [], |
| | | fileList: [], // 附件列表 |
| | | showChoose: false, |
| | | rules: { |
| | | reportCode: [ |
| | | { required: true, message: '请输入报告编号', trigger: 'blur' } |
| | | ], |
| | | // reportCode: [ |
| | | // { required: true, message: '请输入报告编号', trigger: 'blur' } |
| | | // ], |
| | | reportName: [ |
| | | { required: true, message: '请输入报告名称', trigger: 'blur' } |
| | | ], |
| | |
| | | getDetail(this.$route.query.id).then(res => { |
| | | this.form = res |
| | | this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }] |
| | | this.fileList = res.fileList |
| | | // 处理文件回显 |
| | | if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) { |
| | | this.fileList = res.feasibilityReportFiles.map(file => ({ |
| | | name: file.fileName, |
| | | url: getFullUrl(file.fileUrl), |
| | | uid: file.id |
| | | })) |
| | | this.form.feasibilityReportFiles = res.fileList |
| | | } else { |
| | | this.fileList = [] |
| | | this.form.feasibilityReportFiles = [] |
| | | } |
| | | }) |
| | | }, |
| | | //获取选择项目组数据 |
| | |
| | | this.tableData = [data] |
| | | this.$forceUpdate() |
| | | this.showChoose = false |
| | | }, |
| | | |
| | | // 上传前校验 |
| | | beforeUpload(file) { |
| | | return true; |
| | | }, |
| | | // 自定义上传处理 |
| | | handleUpload(options) { |
| | | const { file, onSuccess, onError } = options; |
| | | |
| | | // 使用封装的customUploadRequest方法 |
| | | customUploadRequest({ |
| | | file, |
| | | onSuccess: (res) => { |
| | | console.log() |
| | | if (res.code === 200) { |
| | | const fileObj = { |
| | | id: new Date().getTime(), |
| | | reportId: this.$route.query.id ? this.$route.query.id : '', |
| | | fileUrl: res.msg || res.data || '', |
| | | reportType: 4, // 可行性研究报告类型 |
| | | fileName: file.name, |
| | | fileSize: file.size, |
| | | }; |
| | | |
| | | // 添加到文件列表显示 |
| | | this.fileList.push({ |
| | | name: file.name, |
| | | url: getFullUrl(fileObj.fileUrl), |
| | | uid: fileObj.id |
| | | }); |
| | | |
| | | // 添加到表单数据 |
| | | this.form.feasibilityReportFiles.push(fileObj); |
| | | |
| | | this.$message.success('文件上传成功'); |
| | | onSuccess(res); |
| | | } else { |
| | | this.$message.error(res.message || '文件上传失败'); |
| | | onError(); |
| | | } |
| | | }, |
| | | onError: (err) => { |
| | | this.$message.error('文件上传失败'); |
| | | onError(err); |
| | | } |
| | | }); |
| | | }, |
| | | // 删除文件 |
| | | handleRemove(file) { |
| | | const index = this.fileList.findIndex(item => item.name === file.name); |
| | | if (index !== -1) { |
| | | this.fileList.splice(index, 1); |
| | | this.form.feasibilityReportFiles.splice(index, 1); |
| | | } |
| | | }, |
| | | submit() { |
| | | console.log(this.$refs.materialEditor.getContent()); |
| | |
| | | } |
| | | let data = { |
| | | ...this.form, |
| | | reportType: 4, |
| | | status: 1, |
| | | reportText: this.$refs.materialEditor.getContent(), |
| | | teamId: this.tableData[0].id |
| | |
| | | this.$refs.form.validate((valid) => { |
| | | let data = { |
| | | ...this.form, |
| | | reportType: 4, |
| | | status: -1, |
| | | reportText: this.$refs.materialEditor.getContent(), |
| | | teamId: this.tableData[0].id |
| | |
| | | |
| | | if (valid) { |
| | | this.loading = true |
| | | if (this.$route.query.id) { |
| | | editData({ ...data, id: this.$route.query.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('修改成功') |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | } |
| | | }) |
| | | } else { |
| | | addData({ ...data }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('提交成功') |
| | | this.$message.success('发布成功') |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.message) |
| | |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2"> |
| | | 通过 |
| | | </div> |
| | | <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3"> |
| | | <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4"> |
| | | 驳回 |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button> |
| | | <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button> |
| | | <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | |
| | | if (data.status == 2 || data.status == 3) { |
| | | processData.push({ |
| | | type: data.status === 2 ? "primary" : "danger", |
| | | type: "primary", |
| | | mode: "list", |
| | | fields: [ |
| | | { label: "审核结果:", value: data.status == 4 ? '驳回' : "通过" || "" }, |
| | | { label: "审批意见:", value: data.auditRemark || "" }, |
| | | { label: "审核人:", value: data.auditPersonName || "" }, |
| | | { label: "审核时间:", value: data.auditTime || "" }, |
| | |
| | | type: "success", |
| | | mode: "list", |
| | | fields: [ |
| | | { label: "已评定" }, |
| | | { label: "评定状态:已评定" }, |
| | | { label: "评定人:", value: data.evaluatePersonName || "" }, |
| | | { label: "评定时间:", value: data.evaluateTime || "" } |
| | | ], |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="" style="margin-left: 63px;"> |
| | | <el-button type="default" style="margin-right: 10px;">重置</el-button> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="default" style="margin-right: 10px;" @click="handleReset">重置</el-button> |
| | | <el-button type="primary" @click="handleSearch">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | <template #default="{ row }"> |
| | | <el-button type="text" @click="handleApproval(row)" |
| | | v-if="row.status == 1 && [1, 2].includes(roleType)">审核</el-button> |
| | | <el-button type="text" @click="handleDetail(row)">详情</el-button> |
| | | <el-button type="text" @click="handleDelete(row)" |
| | | v-if="[4, 5].includes(row.status) && roleType == 3">删除</el-button> |
| | | <el-button type="text" @click="handleDetail(row)" v-if="!isDraft">详情</el-button> |
| | | <el-button type="text" @click="handleEdit(row)" |
| | | v-if="[4, 5].includes(row.status) && roleType == 3">编辑</el-button> |
| | | v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">编辑</el-button> |
| | | <el-button type="text" @click="handleDelete(row)" |
| | | v-if="([4, 5].includes(row.status) && roleType == 3) || isDraft">删除</el-button> |
| | | |
| | | <el-button type="text" @click="handleRevoke(row)" |
| | | v-if="row.status == 1 && roleType == 3">撤销审批</el-button> |
| | | </template> |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | handleReset() { |
| | | this.form.pageNum = 1 |
| | | this.form.teamName = '' |
| | | this.form.reportName = '' |
| | | this.form.reportCode = '' |
| | | this.form.date = '' |
| | | this.form.status = '' |
| | | this.getList() |
| | | }, |
| | | handleSearch() { |
| | | this.getList() |
| | | }, |
| | | handleApproval(row) { |
| | | this.rowData = row |
| | | this.showApproval = true |
| | |
| | | }, |
| | | handleEdit(row) { |
| | | this.$router.push({ |
| | | path: '/reportLibrary/', |
| | | path: '/reportLibrary/editVerificationRelease', |
| | | query: { |
| | | id: row.id |
| | | } |
| | | }) |
| | | }, |
| | | handleAddProject() { |
| | | this.$router.push('/reportLibrary/addProjectProposalLibrary') |
| | | this.$router.push('/reportLibrary/addVerificationRelease') |
| | | }, |
| | | changeTab(status) { |
| | | if (status == -1) { |
| | |
| | | } else { |
| | | data = this.form |
| | | } |
| | | // 处理日期范围 |
| | | if (this.form.date && this.form.date.length === 2) { |
| | | data.startTime = this.form.date[0] |
| | | data.endTime = this.form.date[1] |
| | | } else { |
| | | data.startTime = '' |
| | | data.endTime = '' |
| | | } |
| | | getDataList(data).then(res => { |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records || [] |