|
@@ -1,11 +1,35 @@
|
|
import { BasicColumn } from '/@/components/Table';
|
|
import { BasicColumn } from '/@/components/Table';
|
|
import { h } from 'vue';
|
|
import { h } from 'vue';
|
|
|
|
|
|
|
|
+const formatDdjustType = (adjustType) => {
|
|
|
|
+ if (adjustType === 'course_substitute') return '顶课';
|
|
|
|
+ if (adjustType === 'course_exchange') return '调课';
|
|
|
|
+ if (adjustType === 'course_replace') return '补班';
|
|
|
|
+ if (adjustType === 'course_delete') return '删除';
|
|
|
|
+ return adjustType === '/' ? '' : adjustType;
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const formatStyle = (text: any) => {
|
|
|
|
+ let style = 'position:relative;padding:4px;';
|
|
|
|
+ if (text.adjustType === 'course_substitute') {
|
|
|
|
+ style += 'background-color:#ec808d;color:#fff;';
|
|
|
|
+ }
|
|
|
|
+ if (text.adjustType === 'course_exchange') {
|
|
|
|
+ style += 'background-color:#facd91;color:#fff;';
|
|
|
|
+ }
|
|
|
|
+ return style;
|
|
|
|
+};
|
|
|
|
+
|
|
const formatWeek = ({ text }: { text: any }) => {
|
|
const formatWeek = ({ text }: { text: any }) => {
|
|
- return h('div', null, [
|
|
|
|
|
|
+ return h('div', { style: formatStyle(text) }, [
|
|
h('div', null, text.courseName || ''),
|
|
h('div', null, text.courseName || ''),
|
|
h('div', null, text.siteName || ''),
|
|
h('div', null, text.siteName || ''),
|
|
h('div', null, text.name || ''),
|
|
h('div', null, text.name || ''),
|
|
|
|
+ h(
|
|
|
|
+ 'div',
|
|
|
|
+ { style: 'position:absolute;top:4px;right:4px;font-size:12px;' },
|
|
|
|
+ formatDdjustType(text.adjustType),
|
|
|
|
+ ),
|
|
]);
|
|
]);
|
|
};
|
|
};
|
|
|
|
|