mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
持续时间可修改
This commit is contained in:
@@ -621,7 +621,13 @@ const formDataRule = {
|
|||||||
};
|
};
|
||||||
const { validate } = Form.useForm(formData, formDataRule);
|
const { validate } = Form.useForm(formData, formDataRule);
|
||||||
const durationText = computed(() => dateTime.value?.length?dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]),'minute'):'请输入持续时间');
|
const durationText = computed(() => dateTime.value?.length?dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]),'minute'):'请输入持续时间');
|
||||||
|
const nums = ref(0)
|
||||||
|
watch(durationText,(val)=>{
|
||||||
|
nums.value++
|
||||||
|
if(nums.value>1){
|
||||||
|
formData.value.duration = val;
|
||||||
|
}
|
||||||
|
})
|
||||||
function inputAdd() {
|
function inputAdd() {
|
||||||
formData.value.offteachers.push({
|
formData.value.offteachers.push({
|
||||||
teacherId: "",
|
teacherId: "",
|
||||||
@@ -815,7 +821,6 @@ const del = (id,record) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function coursePlanConfirm() {
|
async function coursePlanConfirm() {
|
||||||
|
|
||||||
if(!dateTime.value[0]){
|
if(!dateTime.value[0]){
|
||||||
message.info('开始时间未填写')
|
message.info('开始时间未填写')
|
||||||
return
|
return
|
||||||
@@ -912,6 +917,7 @@ async function coursePlanConfirm() {
|
|||||||
|
|
||||||
const editBeginClass = ref(false)
|
const editBeginClass = ref(false)
|
||||||
function planEdit(record) {
|
function planEdit(record) {
|
||||||
|
nums.value = 0
|
||||||
editBeginClass.value = false
|
editBeginClass.value = false
|
||||||
if (record.expenseStatus && !expenseStatus[record.expenseStatus]) {
|
if (record.expenseStatus && !expenseStatus[record.expenseStatus]) {
|
||||||
editBeginClass.value = true
|
editBeginClass.value = true
|
||||||
@@ -919,7 +925,7 @@ function planEdit(record) {
|
|||||||
}
|
}
|
||||||
onceName.value = record.name;
|
onceName.value = record.name;
|
||||||
formData.value = { ...record };
|
formData.value = { ...record };
|
||||||
formData.value.duration = ''
|
// formData.value.duration = ''
|
||||||
console.log({ ...record },'{ ...record }')
|
console.log({ ...record },'{ ...record }')
|
||||||
validated.value = 0;
|
validated.value = 0;
|
||||||
formData.value.homeWorkId && request(WORK_DETAIL(formData.value.homeWorkId), {}).then(res => formData.value.workInfo = res.data);
|
formData.value.homeWorkId && request(WORK_DETAIL(formData.value.homeWorkId), {}).then(res => formData.value.workInfo = res.data);
|
||||||
|
|||||||
@@ -2250,7 +2250,7 @@ export default defineComponent({
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const sysTypeOptions = computed(() => store.state.content_type);
|
const sysTypeOptions = computed(() => store.state.content_type);
|
||||||
const durationText = computed(() => state.xjkkinputV3?.length?dayjs(state.xjkkinputV3[1]).diff(dayjs(state.xjkkinputV3[0]),'minute'):'请输入持续时间');
|
const durationText = computed(() => state.xjkkinputV3?.length?dayjs(state.xjkkinputV3[1]).diff(dayjs(state.xjkkinputV3[0]),'minute'):'请输入持续时间');
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
permissions:null,
|
permissions:null,
|
||||||
createId:null,
|
createId:null,
|
||||||
@@ -2896,7 +2896,13 @@ export default defineComponent({
|
|||||||
|
|
||||||
codeType: null, //二维码类型
|
codeType: null, //二维码类型
|
||||||
});
|
});
|
||||||
|
const nums = ref(0)
|
||||||
|
watch(durationText,(val)=>{
|
||||||
|
nums.value++
|
||||||
|
if(nums.value>1){
|
||||||
|
state.duration = val;
|
||||||
|
}
|
||||||
|
})
|
||||||
// function timeChange(time, timeStr) {
|
// function timeChange(time, timeStr) {
|
||||||
// // state.duration || (state.duration = dayjs(timeStr[1]).diff(dayjs(timeStr[0]),'minute'))
|
// // state.duration || (state.duration = dayjs(timeStr[1]).diff(dayjs(timeStr[0]),'minute'))
|
||||||
// }
|
// }
|
||||||
@@ -3967,6 +3973,7 @@ function onFocusEnd(){
|
|||||||
let editBeginClass = ref(false)
|
let editBeginClass = ref(false)
|
||||||
//编辑开课
|
//编辑开课
|
||||||
const handelEditStu = async (item) => {
|
const handelEditStu = async (item) => {
|
||||||
|
nums.value = 0
|
||||||
editBeginClass.value = false
|
editBeginClass.value = false
|
||||||
if (item.expenseStatus && item.expenseStatus !== 'A10' && item.expenseStatus !== 'S00') {
|
if (item.expenseStatus && item.expenseStatus !== 'A10' && item.expenseStatus !== 'S00') {
|
||||||
editBeginClass.value = true
|
editBeginClass.value = true
|
||||||
@@ -3993,7 +4000,7 @@ function onFocusEnd(){
|
|||||||
// }
|
// }
|
||||||
console.log("获取面授课开课详情", item);
|
console.log("获取面授课开课详情", item);
|
||||||
state.xjkkinputV2 = item.address;
|
state.xjkkinputV2 = item.address;
|
||||||
// state.duration = item.duration;
|
state.duration = item.duration;
|
||||||
state.checked1 = item.applyFlag === 1 ? true : false;
|
state.checked1 = item.applyFlag === 1 ? true : false;
|
||||||
state.attach = item.attach;
|
state.attach = item.attach;
|
||||||
|
|
||||||
@@ -5179,6 +5186,7 @@ function onFocusEnd(){
|
|||||||
om_exit,
|
om_exit,
|
||||||
ckxq_hs,
|
ckxq_hs,
|
||||||
durationText,
|
durationText,
|
||||||
|
nums,
|
||||||
ftsr_exit,
|
ftsr_exit,
|
||||||
stm_exit,
|
stm_exit,
|
||||||
ft_exit_see,
|
ft_exit_see,
|
||||||
|
|||||||
Reference in New Issue
Block a user