专业力必修提交

This commit is contained in:
Pengxiansen
2025-01-21 21:20:25 +08:00
parent 1f06c11bda
commit 3fdfe61062
6 changed files with 132 additions and 439 deletions

View File

@@ -137,7 +137,6 @@ const closeDrawer = () => {
};
function timeChange(time, timeStr) {
console.log(dateTime.value);
formData.value.submitStartTime = timeStr[0];
formData.value.submitEndTime = timeStr[1];
}

View File

@@ -1,6 +1,6 @@
<template>
<a-select
:getPopupContainer="
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
@@ -21,69 +21,73 @@
</template>
<script>
import { ref, watch } from 'vue';
import { getQualificationLevel } from "@/api/growthpath"
import { ref, watch } from "vue";
import { getQualsLevelCode } from "@/api/growthpath";
export default {
name: 'PostSelect',
name: "PostSelect",
props: {
value: String,
multiple: {
type: String,
default: '',
default: "",
},
width: {
type: String,
default: '',
default: "",
},
searchData: {
type: String,
default: '',
default: "",
},
disabled: {
type: Boolean,
default: false
}
default: false,
},
},
emits: ['update:value'],
emits: ["update:value"],
setup(props, { emit }) {
const selectedValue = ref(null);
const options = ref([]);
async function fetchOptions(val='') {
async function fetchOptions(val = "") {
try {
const data = await getQualificationLevel(val)
const data = await getQualsLevelCode({
val,
});
options.value = data.data.data.map((item) => {
return {
label: item.qualsLevelDesr,
value: item.qualsLevelCode,
key: item.qualsLevelCode,
bandCodes: item.bandCodes
};
})
});
} catch (error) {
console.error('error', error);
console.error("error", error);
}
}
watch(()=>props.searchData, (val) => {
if(val){
fetchOptions(props.searchData||'');
watch(
() => props.searchData,
(val) => {
if (val) {
fetchOptions(props.searchData || "");
}
}
});
watch(()=>props.value, (val) => {
selectedValue.value = val;
});
function onSelectChange(newVal,postList ) {
emit('update:value', postList?.key);
emit('update:postList', postList);
emit('bandCodes',postList?.bandCodes)
);
watch(
() => props.value,
(val) => {
selectedValue.value = val;
}
);
function onSelectChange(newVal, postList) {
emit("update:value", postList?.key);
emit("update:postList", postList);
}
async function handleSearch(val){
console.log(val,'val')
async function handleSearch(val) {
console.log(val, "val");
}
function focus () {
fetchOptions(props.searchData||'')
function focus() {
fetchOptions(props.searchData || "");
}
return {
selectedValue,
@@ -101,4 +105,4 @@ export default {
text-overflow: ellipsis;
overflow: hidden;
}
</style>
</style>

View File

@@ -11,7 +11,6 @@
placeholder="请选择岗位"
:options="options"
@change="onSelectChange"
@search="handleSearch"
allowClear
showArrow
showSearch
@@ -20,7 +19,7 @@
<script>
import { ref, watch } from 'vue';
import { getAllPosition } from "@/api/growthpath"
import { getStdPosition } from "@/api/growthpath"
export default {
name: 'PostSelect',
props: {
@@ -45,12 +44,12 @@ export default {
async function fetchOptions() {
try {
const data = await getAllPosition({positionName: ''})
const data = await getStdPosition({positionName: ''})
options.value = data.data.data.map((item) => {
return {
id: item.positionId,
label: item.positionName,
value: item.positionName,
id: item.stdPosition,
label: item.stdPositionName,
value: item.stdPosition,
};
})
} catch (error) {
@@ -67,17 +66,11 @@ export default {
function onSelectChange(newVal,postList ) {
emit('update:value', newVal);
emit('update:postList', postList);
console.log(newVal,postList,'aaaaaa')
}
async function handleSearch(val){
console.log(val,'val')
}
return {
selectedValue,
options,
onSelectChange,
handleSearch,
};
},
};