mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
fix:修改学员操作样式
This commit is contained in:
@@ -44,7 +44,7 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
// console.log("router", router.getRoutes(), route);
|
||||
console.log("版本0.9.16------------");
|
||||
console.log("版本0.9.17------------");
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
:validate="validate"
|
||||
@blur="validateProName"
|
||||
@change="validateProName"
|
||||
|
||||
/>
|
||||
<div style="color:red;font-size: 10px" v-if="value && !validate">名称重复,请重新输入</div>
|
||||
<div style="color: red; font-size: 10px" v-if="value && !validate">
|
||||
名称重复,请重新输入
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { defineProps, defineEmits, watch, ref, onMounted } from "vue";
|
||||
@@ -21,7 +22,7 @@ const props = defineProps({
|
||||
},
|
||||
validate: {
|
||||
type: Boolean,
|
||||
default:true
|
||||
default: true,
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
@@ -31,49 +32,54 @@ const props = defineProps({
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 1
|
||||
default: 1,
|
||||
},
|
||||
maxlength: {
|
||||
type: Number,
|
||||
default: 30
|
||||
default: 30,
|
||||
},
|
||||
showCount: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits({})
|
||||
const emit = defineEmits({});
|
||||
|
||||
const modelV = ref()
|
||||
const modelV = ref();
|
||||
|
||||
onMounted(() => {
|
||||
modelV.value = props.value
|
||||
})
|
||||
modelV.value = props.value;
|
||||
});
|
||||
|
||||
watch(() => props.value, () => {
|
||||
watch(
|
||||
() => props.value,
|
||||
() => {
|
||||
if (props.value !== modelV.value) {
|
||||
modelV.value = props.value
|
||||
modelV.value = props.value;
|
||||
}
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
watch(modelV, () => {
|
||||
emit('update:value', modelV.value)
|
||||
})
|
||||
emit("update:value", modelV.value);
|
||||
});
|
||||
|
||||
function validateProName() {
|
||||
emit('update:finished', false);
|
||||
props.value && validateName({name: props.value, type: props.type, id: props.id}).then(res => {
|
||||
emit("update:finished", false);
|
||||
props.value &&
|
||||
validateName({ name: props.value, type: props.type, id: props.id }).then(
|
||||
(res) => {
|
||||
console.log("resresresres", res);
|
||||
if (props.value == "") {
|
||||
emit('update:validate', res.data.data === 1)
|
||||
emit("update:validate", res.data.data === 1);
|
||||
} else {
|
||||
emit('update:validate', res.data.data !== 1)
|
||||
emit('update:finished', true);
|
||||
emit("update:validate", res.data.data !== 1);
|
||||
emit("update:finished", true);
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.in {
|
||||
@@ -116,8 +122,8 @@ function validateProName() {
|
||||
}
|
||||
}
|
||||
|
||||
.b_input,.i1_input{
|
||||
|
||||
.b_input,
|
||||
.i1_input {
|
||||
.ant-input-affix-wrapper {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
@@ -135,5 +141,4 @@ function validateProName() {
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -66,7 +66,13 @@
|
||||
:row-selection="stuRowSelection"
|
||||
>
|
||||
<template #action="{ record }">
|
||||
<a-row gutter="12">
|
||||
<div
|
||||
@click="del(record.id)"
|
||||
style="color: #4ea6ff; font-size: 14px; text-align: center"
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
<!-- <a-row gutter="12">
|
||||
<a-col>
|
||||
<slot name="extension" v-bind:data="{ record }"></slot>
|
||||
</a-col>
|
||||
@@ -76,8 +82,14 @@
|
||||
<div @click="del(record.id)">删除</div>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<div
|
||||
@click="del(record.id)"
|
||||
style="color: #4ea6ff; font-size: 14px; text-align: center"
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-row> -->
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
@@ -2036,7 +2036,9 @@
|
||||
<div class="cstm_items main_item">
|
||||
<div class="signbox"></div>
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn" @click="showDrawerAddHomework">配置作业</button>
|
||||
<button class="xkbtn" @click="showDrawerAddHomework">
|
||||
配置作业
|
||||
</button>
|
||||
<div v-if="EditWorkId > 0">
|
||||
<a-tag closable @close="logW" color="processing">
|
||||
<span style="font-size: 14px; line-height: 33px">
|
||||
@@ -3303,38 +3305,38 @@ const columns7 = [
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "签到状态",
|
||||
width: 200,
|
||||
dataIndex: "signstatus",
|
||||
key: "7",
|
||||
align: "center",
|
||||
customRender: ({ record }) => {
|
||||
switch (String(record.signStatus)) {
|
||||
case "0":
|
||||
return "未签到";
|
||||
case "1":
|
||||
return "已签到";
|
||||
case "2":
|
||||
return "请假";
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "评估状态",
|
||||
width: 200,
|
||||
dataIndex: "evastatus",
|
||||
key: "8",
|
||||
align: "center",
|
||||
customRender: ({ record }) => {
|
||||
switch (String(record.evalStatus)) {
|
||||
case "0":
|
||||
return "未评估";
|
||||
case "1":
|
||||
return "已评估";
|
||||
}
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: "签到状态",
|
||||
// width: 200,
|
||||
// dataIndex: "signstatus",
|
||||
// key: "7",
|
||||
// align: "center",
|
||||
// customRender: ({ record }) => {
|
||||
// switch (String(record.signStatus)) {
|
||||
// case "0":
|
||||
// return "未签到";
|
||||
// case "1":
|
||||
// return "已签到";
|
||||
// case "2":
|
||||
// return "请假";
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: "评估状态",
|
||||
// width: 200,
|
||||
// dataIndex: "evastatus",
|
||||
// key: "8",
|
||||
// align: "center",
|
||||
// customRender: ({ record }) => {
|
||||
// switch (String(record.evalStatus)) {
|
||||
// case "0":
|
||||
// return "未评估";
|
||||
// case "1":
|
||||
// return "已评估";
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: "结业状态",
|
||||
// width: 100,
|
||||
@@ -3395,7 +3397,7 @@ export default defineComponent({
|
||||
stuColumns: [
|
||||
{
|
||||
title: "报名状态",
|
||||
width: '10%',
|
||||
width: "10%",
|
||||
dataIndex: "status",
|
||||
key: "5",
|
||||
align: "center",
|
||||
@@ -3412,7 +3414,7 @@ export default defineComponent({
|
||||
},
|
||||
{
|
||||
title: "加入方式",
|
||||
width: '10%',
|
||||
width: "10%",
|
||||
dataIndex: "join",
|
||||
key: "6",
|
||||
align: "center",
|
||||
@@ -3425,38 +3427,38 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "签到状态",
|
||||
width: '10%',
|
||||
dataIndex: "signstatus",
|
||||
key: "7",
|
||||
align: "center",
|
||||
customRender: ({ record }) => {
|
||||
switch (String(record.signStatus)) {
|
||||
case "0":
|
||||
return "未签到";
|
||||
case "1":
|
||||
return "已签到";
|
||||
case "2":
|
||||
return "请假";
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "评估状态",
|
||||
width: '10%',
|
||||
dataIndex: "evastatus",
|
||||
key: "8",
|
||||
align: "center",
|
||||
customRender: ({ record }) => {
|
||||
switch (String(record.evalStatus)) {
|
||||
case "0":
|
||||
return "未评估";
|
||||
case "1":
|
||||
return "已评估";
|
||||
}
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: "签到状态",
|
||||
// width: '10%',
|
||||
// dataIndex: "signstatus",
|
||||
// key: "7",
|
||||
// align: "center",
|
||||
// customRender: ({ record }) => {
|
||||
// switch (String(record.signStatus)) {
|
||||
// case "0":
|
||||
// return "未签到";
|
||||
// case "1":
|
||||
// return "已签到";
|
||||
// case "2":
|
||||
// return "请假";
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: "评估状态",
|
||||
// width: '10%',
|
||||
// dataIndex: "evastatus",
|
||||
// key: "8",
|
||||
// align: "center",
|
||||
// customRender: ({ record }) => {
|
||||
// switch (String(record.evalStatus)) {
|
||||
// case "0":
|
||||
// return "未评估";
|
||||
// case "1":
|
||||
// return "已评估";
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
],
|
||||
shipType: 1,
|
||||
addLoading: false,
|
||||
@@ -4035,7 +4037,6 @@ export default defineComponent({
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (state.projectTime) {
|
||||
|
||||
startTime = toDate(
|
||||
new Date(state.projectTime[0].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
@@ -4044,7 +4045,6 @@ export default defineComponent({
|
||||
new Date(state.projectTime[1].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
|
||||
}
|
||||
let res = await list({
|
||||
pageNo: state.currentPage1,
|
||||
@@ -4924,11 +4924,12 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
if (item.testId) {
|
||||
queryExaminationDetailById({ examinationId: item.testId }).then((res)=>{
|
||||
queryExaminationDetailById({ examinationId: item.testId }).then(
|
||||
(res) => {
|
||||
state.testName = res.data.data.examinationName;
|
||||
});
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
console.log("res");
|
||||
console.log("获取面授课详情", item);
|
||||
|
||||
@@ -100,12 +100,20 @@
|
||||
<div class="name">
|
||||
<div class="inname">评估名称</div>
|
||||
<div class="in">
|
||||
<a-input
|
||||
<!-- <a-input
|
||||
v-model:value="assessmentName"
|
||||
show-count
|
||||
:maxlength="15"
|
||||
style="border-radius: 8px"
|
||||
/>
|
||||
/> -->
|
||||
<NameInput
|
||||
placeholder="请输入路径名称"
|
||||
v-model:value="assessmentName"
|
||||
v-model:validate="validate"
|
||||
:maxlength="15"
|
||||
show-count
|
||||
:type="4"
|
||||
></NameInput>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn">
|
||||
@@ -184,9 +192,12 @@ import { useRouter } from "vue-router";
|
||||
import { toDate } from "../../api/method.js";
|
||||
import store from "@/store";
|
||||
import { message } from "ant-design-vue";
|
||||
|
||||
import NameInput from "@/components/project/NameInput";
|
||||
export default {
|
||||
name: "learningPath",
|
||||
components: {
|
||||
NameInput,
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
@@ -295,6 +306,8 @@ export default {
|
||||
copy_hs: false,
|
||||
back_hs: false,
|
||||
pub_hs: false,
|
||||
|
||||
validate: true,
|
||||
});
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
@@ -577,6 +590,11 @@ export default {
|
||||
message.error("请输入评估名称");
|
||||
return false;
|
||||
}
|
||||
if (!state.validate) {
|
||||
message.destroy();
|
||||
message.warning("评估名称重复");
|
||||
return;
|
||||
}
|
||||
store.commit("SET_assessmentName", state.assessmentName);
|
||||
router.push("/researchadd");
|
||||
handleCancel();
|
||||
@@ -677,6 +695,7 @@ export default {
|
||||
// 复制
|
||||
if (state.copy_hs) {
|
||||
let resultPost = restData(state.copyItem);
|
||||
resultPost.assessmentName = resultPost.assessmentName + "(1)";
|
||||
console.log("resultPost");
|
||||
console.log(resultPost);
|
||||
createResearch(resultPost).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user