forked from liweijie/education
课表调整申请新增
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
<div class="ops-cell">
|
||||
<el-button type="text" size="mini" icon="el-icon-view" @click="openDetail(scope.row)">详情</el-button>
|
||||
<el-button v-if="showAuditMenu(scope.row)" type="text" size="mini" @click="openAudit(scope.row)">审批</el-button>
|
||||
<el-button v-if="scope.row.sczt === 0 && scope.row.jyspzzt !== 1" type="text" size="mini" class="danger-btn" @click="handleCancel(scope.row)">撤销</el-button>
|
||||
<el-button v-if="scope.row.sczt === 0 && scope.row.jyspzzt !== 1 && scope.row.jyspzzt !== 3" type="text" size="mini" class="danger-btn" @click="handleCancel(scope.row)">撤销</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -194,9 +194,6 @@
|
||||
<el-form-item label="审批意见">
|
||||
<el-input v-model="auditForm.fhyj" type="textarea" :rows="3" placeholder="请输入审批意见(发回/拒绝时必填)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="审批人编号">
|
||||
<el-input v-model="auditForm.sprbh" placeholder="不填默认取当前登录人" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :loading="auditLoading" @click="submitAudit">确定</el-button>
|
||||
@@ -223,6 +220,7 @@
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="教研室审批人">{{ detailData.jyspzrbh || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教研室审批时间">{{ fmtDateTime(detailData.jyspzsj) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审批意见" :span="2">{{ detailData.fhyj || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教研室查收人">{{ detailData.jyscsrbh || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教研室查收时间">{{ fmtDateTime(detailData.jyscssj) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教学内容" :span="2">{{ detailData.jxnr || '-' }}</el-descriptions-item>
|
||||
@@ -316,6 +314,7 @@ import {
|
||||
} from '@/api/teachBusiness/courseRunning'
|
||||
import { listAllSemester } from '@/api/teachBusiness/semester'
|
||||
import { listAllClassroom } from '@/api/teachBusiness/classroom'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
// 节次 -> 节次区间映射
|
||||
const JC_SECTION = {
|
||||
@@ -381,13 +380,22 @@ export default {
|
||||
// 审批
|
||||
auditVisible: false,
|
||||
auditLoading: false,
|
||||
auditForm: { ssdksqbh: '', spzt: 1, fhyj: '', sprbh: '' },
|
||||
auditForm: { ssdksqbh: '', spzt: 1, fhyj: '' },
|
||||
// 详情
|
||||
detailVisible: false,
|
||||
detailLoading: false,
|
||||
detailData: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['roles']),
|
||||
isTeacher() {
|
||||
const r = this.roles || []
|
||||
const hasTeacher = r.includes('TEACHER') || r.includes('teacher') || r.includes('ROLE_TEACHER')
|
||||
const hasAdmin = r.includes('admin') || r.includes('ROLE_ADMIN')
|
||||
return hasTeacher && !hasAdmin
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadYearOptions().then(() => this.loadList())
|
||||
},
|
||||
@@ -701,14 +709,15 @@ export default {
|
||||
},
|
||||
/* ---------- 审批 ---------- */
|
||||
showAuditMenu(row) {
|
||||
return row.sczt === 0 && (row.jyspzzt === 0 || row.jyspzzt === 2 || row.jyspzzt === 3)
|
||||
// 教员角色不展示审批入口;已拒绝状态不展示审批
|
||||
if (this.isTeacher) return false
|
||||
return row.sczt === 0 && (row.jyspzzt === 0 || row.jyspzzt === 2)
|
||||
},
|
||||
openAudit(row) {
|
||||
this.auditForm = {
|
||||
ssdksqbh: row.ssdksqbh,
|
||||
spzt: 1,
|
||||
fhyj: '',
|
||||
sprbh: ''
|
||||
fhyj: ''
|
||||
}
|
||||
this.auditVisible = true
|
||||
},
|
||||
@@ -723,7 +732,6 @@ export default {
|
||||
spzt: f.spzt,
|
||||
fhyj: f.fhyj
|
||||
}
|
||||
if (f.sprbh) payload.sprbh = f.sprbh
|
||||
this.auditLoading = true
|
||||
auditByTeachingOffice(payload).then(() => {
|
||||
this.auditLoading = false
|
||||
|
||||
Reference in New Issue
Block a user