mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 02:02:55 +08:00
学习路径和项目的开课编辑
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a-checkbox v-model:checked="checked" @change="change">
|
||||
<a-checkbox v-model:checked="checked" @change="change" :disabled="disabled">
|
||||
<slot></slot>
|
||||
</a-checkbox>
|
||||
</template>
|
||||
@@ -17,8 +17,12 @@ const props = defineProps({
|
||||
},
|
||||
unCheckValue: {
|
||||
type: [Boolean, Number, String],
|
||||
default: true
|
||||
default: false
|
||||
},
|
||||
disabled:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
});
|
||||
const emit = defineEmits(["update:modelValue"]);
|
||||
const checked = ref(props.modelValue);
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
:type="5"
|
||||
style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入开课名称"
|
||||
:disabled="editBeginClass"
|
||||
></NameInput>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,6 +134,7 @@
|
||||
@change="timeChange"
|
||||
separator="至"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
:disabled="editBeginClass"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -151,6 +153,7 @@
|
||||
<ProjectManager
|
||||
v-model:value="formData.teacherId"
|
||||
v-model:name="formData.teacher"
|
||||
:disabled="editBeginClass"
|
||||
></ProjectManager>
|
||||
</div>
|
||||
</div>
|
||||
@@ -172,6 +175,7 @@
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;"
|
||||
:disabled="true"
|
||||
|
||||
></a-input-number>
|
||||
<!-- v-model:value="formData.duration" -->
|
||||
@@ -277,7 +281,7 @@
|
||||
<span style="margin-right: 3px">评估设置</span>
|
||||
</div>
|
||||
<div class="b_input" style="width: 88%;">
|
||||
<CheckBox v-model="formData.evalFlag" :checkValue="1" :un-checkValue="0">
|
||||
<CheckBox v-model="formData.evalFlag" :disabled="editBeginClass" :checkValue="1" :un-checkValue="0">
|
||||
<span style="color: #6d7584">是否需要评估</span>
|
||||
</CheckBox>
|
||||
</div>
|
||||
@@ -288,6 +292,7 @@
|
||||
<AssessmentList
|
||||
v-model:assessmentName="formData.assessmentName"
|
||||
v-model:assessmentId="formData.assessmentId"
|
||||
:disabled="editBeginClass"
|
||||
>
|
||||
<button
|
||||
class="xkbtn"
|
||||
@@ -297,7 +302,7 @@
|
||||
</button>
|
||||
</AssessmentList>
|
||||
<div v-if="formData.assessmentId > 0">
|
||||
<a-tag closable @close="removePG" color="processing">
|
||||
<a-tag :closable="!editBeginClass" @close="removePG" color="processing">
|
||||
<span style="font-size: 14px; line-height: 33px">
|
||||
{{ formData.assessmentName }}
|
||||
</span>
|
||||
@@ -619,9 +624,12 @@ async function coursePlanConfirm() {
|
||||
tableRef.value.fetch();
|
||||
}
|
||||
|
||||
const editBeginClass = ref(false)
|
||||
function planEdit(record) {
|
||||
editBeginClass.value = false
|
||||
if (record.expenseStatus && !expenseStatus[record.expenseStatus]) {
|
||||
return message.warning("该开课已在审批流程中,不可进行编辑!");
|
||||
editBeginClass.value = true
|
||||
console.log(editBeginClass.value);
|
||||
}
|
||||
onceName.value = record.name;
|
||||
formData.value = { ...record };
|
||||
|
||||
@@ -31,6 +31,10 @@ import AssessmentAll from "@/components/drawers/AssessmentAll.vue";
|
||||
const props = defineProps({
|
||||
assessmentId: String,
|
||||
assessmentName: String,
|
||||
disabled:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
})
|
||||
const visible = ref(false)
|
||||
const formData = ref({
|
||||
@@ -74,6 +78,7 @@ async function confirm() {
|
||||
}
|
||||
|
||||
function openDrawer() {
|
||||
if(props.disabled) return
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
:placeholder="placeholder"
|
||||
:show-count="showCount"
|
||||
:maxlength="maxlength"
|
||||
:disabled="disabled"
|
||||
/>
|
||||
<div style="color: red; font-size: 10px" v-if="modelV.value && validated===0 && isExistName">
|
||||
名称重复,请重新输入
|
||||
@@ -43,6 +44,10 @@ const props = defineProps({
|
||||
onceName: {
|
||||
type: String,
|
||||
},
|
||||
disabled:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:value",'update:validated']);
|
||||
|
||||
Reference in New Issue
Block a user