diff --git a/src/components/project/ProjectManagerOutTeacher.vue b/src/components/project/ProjectManagerOutTeacher.vue
index 04ebef97..1a16c7fd 100644
--- a/src/components/project/ProjectManagerOutTeacher.vue
+++ b/src/components/project/ProjectManagerOutTeacher.vue
@@ -1,10 +1,25 @@
-
+
@@ -17,31 +32,38 @@ import { getTeacherList } from "@/api/Lecturer";
const props = defineProps({
value: {
type: String,
- default: ''
+ default: "",
},
name: {
type: String,
- default: ''
+ default: "",
+ },
+ supplier: {
+ type: String,
+ default: ""
},
mobile: {
type: String,
- default: ''
+ default: "",
},
disabled: Boolean,
placeholder: {
type: String,
default: "请输入搜索关键字",
},
- mode: String
-})
+ mode: String,
+});
-const selectOptions = ref([])
+const selectOptions = ref([]);
-const managerArray = computed(() => props.value === '' ? null : props.value)
+const supplier = ref('')
-const emit = defineEmits({})
-const isOpen = ref(false)
+const managerArray = computed(() => (props.value === "" ? null : props.value));
+
+const emit = defineEmits({});
+
+const isOpen = ref(false);
function debounce(func, wait) {
let timeout;
return function (...args) {
@@ -49,29 +71,36 @@ function debounce(func, wait) {
timeout = setTimeout(() => func.apply(this, args), wait);
};
}
-const memberParam = ref({ name: '', pageNo: 1, pageSize: 999, teacherType: 2, status: 1 })
+const memberParam = ref({
+ name: "",
+ pageNo: 1,
+ pageSize: 999,
+ teacherType: 2,
+ status: 1,
+});
-const userList = ref([])
-const loading = ref(false)
+const userList = ref([]);
+const loading = ref(false);
const getOutTeacher = () => {
- getTeacherList(memberParam.value).then(res => {
+ getTeacherList(memberParam.value).then((res) => {
if (res.data.code == 200) {
- userList.value = res.data.data.records
- loading.value = false
+ userList.value = res.data.data.records;
+ loading.value = false;
}
- })
-}
-const options = computed(() =>
- userList.value.map(e => ({
- // label: e.name + '(' + e.userNo + ')' + e.organizationName,
- label: e.name + '/' + e.supplier,
- value: e.name,
- ...e,
- audienceList: null
- })
-))
+ });
+};
+const options = computed(() =>
+ userList.value.map((e) => ({
+ // label: e.name + '(' + e.userNo + ')' + e.organizationName,
+ label: e.name + "/" + e.supplier,
+ value: e.name,
+ supplier: e.supplier,
+ ...e,
+ audienceList: null,
+ }))
+);
-watch(props, init)
+watch(props, init);
function init() {
//第一次进来 编辑赋值
@@ -81,46 +110,47 @@ function init() {
}
onMounted(() => {
- console.log('onMounted')
- init()
- getOutTeacher()
-})
+ console.log("onMounted");
+ init();
+ getOutTeacher();
+});
-
-const memberScroll = ({ target: { scrollHeight, scrollTop, clientHeight } }) => {
- scrollHeight === (clientHeight + scrollTop) && memberParam.value.pageNo++
+const memberScroll = ({
+ target: { scrollHeight, scrollTop, clientHeight },
+}) => {
+ scrollHeight === clientHeight + scrollTop && memberParam.value.pageNo++;
};
-const debounceObject = debounce(getOutTeacher, 1000)
+const debounceObject = debounce(getOutTeacher, 1000);
//搜索学员
const searchMember = (keyword) => {
- console.log('searchMember', keyword)
- loading.value = true
- isOpen.value = true
- userList.value = []
- memberParam.value.pageNo = 1
- memberParam.value.teacherType = 2
- memberParam.value.name = keyword
- console.log('searchMember', memberParam.value)
- debounceObject()
+ console.log("searchMember", keyword);
+ loading.value = true;
+ isOpen.value = true;
+ userList.value = [];
+ memberParam.value.pageNo = 1;
+ memberParam.value.teacherType = 2;
+ memberParam.value.name = keyword;
+ console.log("searchMember", memberParam.value);
+ debounceObject();
};
function blur() {
- isOpen.value = false
- memberParam.value.name = ''
- memberParam.value.pageNo = 1
- memberParam.value.teacherType = 2
+ isOpen.value = false;
+ memberParam.value.name = "";
+ memberParam.value.pageNo = 1;
+ memberParam.value.teacherType = 2;
}
function change(e, l) {
- memberParam.value.name = ''
- memberParam.value.teacherType = 2
- memberParam.value.pageNo = 1
- isOpen.value = false
- Array.isArray(l) && (selectOptions.value = l)
- Array.isArray(selectOptions.value) && emit('onChange', e, l)
- emit('update:name', l?.label)
- emit('update:value', l?.value)
- emit('update:mobile', l?.label)
+ memberParam.value.name = "";
+ memberParam.value.teacherType = 2;
+ memberParam.value.pageNo = 1;
+ isOpen.value = false;
+ Array.isArray(l) && (selectOptions.value = l);
+ Array.isArray(selectOptions.value) && emit("onChange", e, l);
+ emit("update:name", l?.label);
+ emit("update:value", l?.value);
+ emit("update:supplier", l?.supplier);
+ emit("update:mobile", l?.label);
}
-
diff --git a/src/views/lecturer/ExternalTeaching.vue b/src/views/lecturer/ExternalTeaching.vue
index 26f45501..bdd80857 100644
--- a/src/views/lecturer/ExternalTeaching.vue
+++ b/src/views/lecturer/ExternalTeaching.vue
@@ -139,7 +139,8 @@
+ v-model:supplier="formParam.supplier"
+ placeholder="请输入工号/讲师姓名进行检索" @onChange="managerChange">
@@ -474,15 +475,15 @@ export default {
//获取内容分类
const sysTypeOptions = computed(() => store.state.content_type);
-
- //TODO GX01
- watch(() => state.formParam.name ,
- (newValue, oldValue) => {
- console.log('教师姓名值 发生了变更', newValue, oldValue);
- },
- { immediate: true }
- )
-
+
+ watch(() => state.formParam.name, (val) => {
+ console.log(val, 'name gx data')
+ })
+
+ watch(() => state.formParam.teacherName, (val) => {
+ console.log(val, 'teacherName gx data')
+ })
+
const treetype = (val, lab) => {
state.formParam.courseTypeName = lab.toString()
}
diff --git a/src/views/lecturer/InsideLecturer.vue b/src/views/lecturer/InsideLecturer.vue
index 61d13853..763088f1 100644
--- a/src/views/lecturer/InsideLecturer.vue
+++ b/src/views/lecturer/InsideLecturer.vue
@@ -172,6 +172,7 @@
src="@/assets/images/coursewareManage/asterisk.png" alt="" />
讲师姓名
+