pyt
7 天以前 be31adc8150e5b21008aa7d6212fc105fc425818
laboratory/src/views/reportLibrary/processDevelopment/index.vue
@@ -30,13 +30,15 @@
                    <el-form-item label="状态:">
                        <el-select v-model="form.status" placeholder="请选择">
                            <el-option label="待审核" value="1"></el-option>
                            <el-option label="已通过" value="0"></el-option>
                            <el-option label="已驳回" value="2"></el-option>
                            <el-option label="待评定" value="2"></el-option>
                            <el-option label="已驳回" value="4"></el-option>
                            <el-option label="已评定" value="3"></el-option>
                            <el-option label="已撤回" value="5"></el-option>
                        </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>
@@ -73,11 +75,12 @@
                    <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>
@@ -131,8 +134,6 @@
    mounted() {
        this.roleType = JSON.parse(sessionStorage.getItem('userInfo'))?.roleType
        console.log('adwqedwqeqwe', this.roleType);
        this.getList()
    },
@@ -148,14 +149,14 @@
        },
        handleEdit(row) {
            this.$router.push({
                path: '/reportLibrary/edit',
                path: '/reportLibrary/editProcessDevelopment',
                query: {
                    id: row.id
                }
            })
        },
        handleAddProject() {
            this.$router.push('/reportLibrary/add')
            this.$router.push('/reportLibrary/addProcessDevelopment')
        },
        changeTab(status) {
            if (status == -1) {
@@ -175,7 +176,7 @@
        handleRevoke(row) {
            this.rowId = row.id
            this.changeStatusTitle = '确认要撤销审批吗?'
            this.changeStatusTip = '撤销审批后,可研报告将被撤销。'
            this.changeStatusTip = '撤销审批后,工艺开发工具将被撤销。'
            this.changeStatus = true
        },
        handleDelConfirm() {
@@ -214,6 +215,14 @@
            } 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 || []
@@ -235,6 +244,18 @@
                    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()
        }
    }
}