|
@@ -311,7 +311,7 @@ const activeName = ref('first')
|
|
|
|
|
|
const WeekMap = '一二三四五六日'
|
|
|
|
|
|
-const tableData2 = ref()
|
|
|
+const tableData2 = ref<any>({})
|
|
|
|
|
|
const queryForm_Data2 = ref({
|
|
|
skzc: '1'
|
|
@@ -331,13 +331,15 @@ const queryApi2 = async () => {
|
|
|
data: { limit: 100, xjj_zgbh: user.user_no, ...queryForm_Data2.value }
|
|
|
}).then(res => {
|
|
|
const d = res.data.page_data
|
|
|
- tableData2.value = (Array.from({ length: 8 }).map((_, i) => Array.from({ length: 7 }).map((_, j) => (null))))
|
|
|
+ tableData2.value = {}
|
|
|
+ // tableData2.value = (Array.from({ length: 8 }).map((_, i) => Array.from({ length: 7 }).map((_, j) => (null))))
|
|
|
|
|
|
d.forEach((el: any) => {
|
|
|
const { skjc, skxq } = el
|
|
|
+ tableData2.value[skjc] = tableData2.value[skjc] ?? {}
|
|
|
tableData2.value[skjc][skxq] = el
|
|
|
});
|
|
|
- console.log('tableData2 :>> ', tableData2.value);
|
|
|
+ // console.log('tableData2 :>> ', tableData2.value);
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -385,7 +387,34 @@ const handleTargetChange = (item: any) => {
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="divider"></div>
|
|
|
- <el-table :data="tableData2" border>
|
|
|
+ <div class="my_table">
|
|
|
+ <div class="thead">
|
|
|
+ <div v-for="i in 7" :key="i">
|
|
|
+ {{ `星期${WeekMap.at(i - 1)}` }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tbody">
|
|
|
+ <div v-for="(i) in 8" :key="i" class="trow">
|
|
|
+ <div v-for="j in 8" :key="j" class="tcell">
|
|
|
+ <div v-if="tableData2[i - 1][j - 1]">
|
|
|
+ <div class="h-40px w-full"
|
|
|
+ :class="tableData2[i - 1][j - 1]?.tkzt_option_k === '3' ? 'text-hex-909099' : 'text-dark-900'">
|
|
|
+ <div class="flex w-full">
|
|
|
+ <div class="flex-auto">{{ tableData2[i - 1][j - 1]?.lesson_name }}</div>
|
|
|
+ <div class="flex-none text-sm" v-show="tableData2[i - 1][j - 1]?.tkzt_option_k !== '1'">
|
|
|
+ {{ tableData2[i - 1][j - 1]?.tkzt }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>{{ tableData2[i - 1][j - 1]?.class_name }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- <el-table :data="tableData2" border>
|
|
|
<el-table-column type="index" label="" width="60" />
|
|
|
<el-table-column v-for="i in 7" :key="i" :label="`星期${WeekMap.at(i - 1)}`" width="auto" show-overflow-tooltip>
|
|
|
<template #default="scope">
|
|
@@ -393,7 +422,7 @@ const handleTargetChange = (item: any) => {
|
|
|
:class="scope.row[i - 1]?.tkzt_option_k === '3' ? 'text-hex-909099' : 'text-dark-900'">
|
|
|
<div class="flex w-full">
|
|
|
<div class="flex-auto">{{ scope.row[i - 1]?.lesson_name }}</div>
|
|
|
- <!-- v-show="scope.row[i - 1]?.tkzt_option_k !== '1'" -->
|
|
|
+ <!~~ v-show="scope.row[i - 1]?.tkzt_option_k !== '1'" ~~>
|
|
|
<div class="flex-none text-sm" v-show="scope.row[i - 1]?.tkzt_option_k !== '1'">{{ scope.row[i -
|
|
|
1]?.tkzt
|
|
|
}}</div>
|
|
@@ -402,7 +431,7 @@ const handleTargetChange = (item: any) => {
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- </el-table>
|
|
|
+ </el-table> -->
|
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
@@ -630,8 +659,8 @@ lesson_name].join(' / ')">
|
|
|
|
|
|
<el-form-item label="换课名称" prop="xtw_hdkmc" v-if="dialogForm_Data.xtw_tklx === '2'">
|
|
|
<remote-select v-model="dialogForm_Data.id_new" url="/xdjx/kbgl_jskbmx/index"
|
|
|
- :d="{ tkzt: '1,4',not_in:user.user_no,/*xjj_zgbh: user.user_no, team_id: info_team_id*/ }" :fields="['id', 'lesson_name']"
|
|
|
- :change="handleTargetChange" :label="({ xjj_xm, skrq, skjc, lesson_name }) => [xjj_xm, skrq, `第${skjc}节`,
|
|
|
+ :d="{ tkzt: '1,4', not_in: user.user_no,/*xjj_zgbh: user.user_no, team_id: info_team_id*/ }"
|
|
|
+ :fields="['id', 'lesson_name']" :change="handleTargetChange" :label="({ xjj_xm, skrq, skjc, lesson_name }) => [xjj_xm, skrq, `第${skjc}节`,
|
|
|
lesson_name].join(' / ')">
|
|
|
<template #default="{ item: { xjj_xm, skrq, skjc, lesson_name } }">{{ [xjj_xm, skrq, `第${skjc}节`,
|
|
|
lesson_name].join(' / ')
|
|
@@ -641,7 +670,8 @@ lesson_name].join(' / ')">
|
|
|
<el-form-item label="代课教师" prop="xtw_hdkjsxm" v-if="dialogForm_Data.xtw_tklx === '1'">
|
|
|
<!-- <el-input v-model="dialogForm_Data.xtw_hdkjsxm" clearable /> -->
|
|
|
<remote-select url="/user/main/index" :fields="['user_no', 'user_realname']"
|
|
|
- :d="{ not_in:user.user_no,user_role_id: '7', dept_id: user.dept_id }" v-model="dialogForm_Data.xtw_hdkjs_user_id"
|
|
|
+ :d="{ not_in: user.user_no, user_role_id: '7', dept_id: user.dept_id }"
|
|
|
+ v-model="dialogForm_Data.xtw_hdkjs_user_id"
|
|
|
v-model:model-name="dialogForm_Data.xtw_hdkjsxm"></remote-select>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="换代课周次" prop="xtw_hdkzc">
|