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