mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 15:56:47 +08:00
讲师管理bug
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
<a-descriptions-item v-if="formData?.isParent==1" label="二级审批人">{{formData?.two||'-'}}</a-descriptions-item>
|
||||
<a-descriptions-item v-if="formData?.isParent==1" label="三级审批人">{{formData?.three||'-'}}</a-descriptions-item>
|
||||
<a-descriptions-item label="状态">
|
||||
{{{1:'待审核', 2:'审核中',3: '已完成',4: '审核失败',5:'待审核'}[formData?.status]}}
|
||||
{{{1:'待提交', 2:'审核中',3: '已完成',4: '审核失败',5:'待审核'}[formData?.status]}}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</div>
|
||||
@@ -74,17 +74,20 @@
|
||||
</a-tabs>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div> -->
|
||||
<div class="btnn" v-if="formData?.status==1||formData?.status==4">
|
||||
<!-- <button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button> -->
|
||||
<button class="btn2" @click="confirm">撤销编辑内容</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {defineEmits, defineProps, ref,watch} from "vue";
|
||||
import dialog from '@/utils/dialog'
|
||||
import * as api from '@/api/Lecturer'
|
||||
import { message } from 'ant-design-vue';
|
||||
const props = defineProps({
|
||||
id: {
|
||||
type: String,
|
||||
@@ -131,7 +134,7 @@ const columns = [
|
||||
customRender: ({text})=>{
|
||||
switch (text) {
|
||||
case 1:
|
||||
return <span>待审核</span>;
|
||||
return <span>待提交</span>;
|
||||
case 2:
|
||||
return <span>审核中</span>;
|
||||
case 3:
|
||||
@@ -213,18 +216,21 @@ const lookList = (record) => {
|
||||
}
|
||||
const visible = ref(false);
|
||||
watch(visible, (val)=>{
|
||||
console.log(val,'val',props.id)
|
||||
if(val){
|
||||
threeList.value = false
|
||||
api.getAffiliationById(props.id).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
formData.value = res.data.data
|
||||
formData.value.act = filterList(formData.value.affiliationUserList,0)
|
||||
formData.value.one = filterList(formData.value.affiliationUserList,1)
|
||||
formData.value.two = filterList(formData.value.affiliationUserList,2)
|
||||
formData.value.three = filterList(formData.value.affiliationUserList,3)
|
||||
formData.value.tableData = res.data.data.affiliationOrgList
|
||||
// formData.value.tableDataTwo = res.data.data.affiliationOrgList
|
||||
if(res.data.code == 200){
|
||||
formData.value = res.data.data
|
||||
formData.value.act = filterList(formData.value.affiliationUserList,0)
|
||||
formData.value.one = filterList(formData.value.affiliationUserList,1)
|
||||
formData.value.two = filterList(formData.value.affiliationUserList,2)
|
||||
formData.value.three = filterList(formData.value.affiliationUserList,3)
|
||||
formData.value.tableData = res.data.data.affiliationOrgList
|
||||
// formData.value.tableDataTwo = res.data.data.affiliationOrgList
|
||||
}
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -234,6 +240,23 @@ const filterList = (val,index) => {
|
||||
const closeDrawer = () => {
|
||||
visible.value = false;
|
||||
};
|
||||
const confirm = () => {
|
||||
dialog({
|
||||
content: "您确定撤销编辑吗?撤销后将恢复到'已完成”前状态,且无法恢复。请谨慎操作。",
|
||||
ok: () => {
|
||||
api.recovery(props.id).then(res=>{
|
||||
if(res.data.code == 200){
|
||||
message.success("撤销成功")
|
||||
visible.value = false;
|
||||
emit('searchList',true)
|
||||
}
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const activeKey = ref("1");
|
||||
const change = (val)=>{
|
||||
console.log(val,'val')
|
||||
@@ -319,7 +342,7 @@ function openDrawer() {
|
||||
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
|
||||
Reference in New Issue
Block a user