2023年5月22日 修改问题

This commit is contained in:
bai 2023-05-22 20:37:15 +08:00
parent b9f0c98b18
commit 08bf2a8f98
19 changed files with 1478 additions and 24 deletions

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/kcCasusers/kcCasusers/list',
save='/kcCasusers/kcCasusers/add',
edit='/kcCasusers/kcCasusers/edit',
deleteOne = '/kcCasusers/kcCasusers/delete',
deleteBatch = '/kcCasusers/kcCasusers/deleteBatch',
importExcel = '/kcCasusers/kcCasusers/importExcel',
exportXls = '/kcCasusers/kcCasusers/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
* @param handleSuccess
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -0,0 +1,137 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '学院编码',
align: "center",
dataIndex: 'collegecode'
},
{
title: '学院',
align: "center",
dataIndex: 'college'
},
{
title: '工号',
align: "center",
dataIndex: 'user'
},
{
title: '姓名',
align: "center",
dataIndex: 'cn'
},
{
title: '职务',
align: "center",
dataIndex: 'duties'
},
{
title: '身份',
align: "center",
dataIndex: 'identity'
},
{
title: '状态',
align: "center",
dataIndex: 'status'
},
{
title: '职称',
align: "center",
dataIndex: 'zdxms'
},
{
title: '职务名称',
align: "center",
dataIndex: 'zwmc'
},
{
title: '职务代码',
align: "center",
dataIndex: 'zwdm'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '学院编码',
field: 'collegecode',
component: 'Input',
},
{
label: '学院',
field: 'college',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入学院!'},
];
},
},
{
label: '工号',
field: 'user',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入工号!'},
];
},
},
{
label: '姓名',
field: 'cn',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入姓名!'},
];
},
},
{
label: '职务',
field: 'duties',
component: 'Input',
},
{
label: '身份',
field: 'identity',
component: 'Input',
},
{
label: '状态',
field: 'status',
component: 'Input',
},
{
label: '职称',
field: 'zdxms',
component: 'Input',
},
{
label: '职务名称',
field: 'zwmc',
component: 'Input',
},
{
label: '职务代码',
field: 'zwdm',
component: 'Input',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -0,0 +1,215 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<!--<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>-->
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<KcCasusersModal ref="registerModal" @success="handleSuccess"></KcCasusersModal>
</div>
</template>
<script lang="ts" name="kcCasusers-kcCasusers" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './KcCasusers.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcCasusers.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import KcCasusersModal from './components/KcCasusersModal.vue'
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: 'kc_casusers',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
},
exportConfig: {
name: "kc_casusers",
url: getExportUrl,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>

View File

@ -0,0 +1,184 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="24">
<a-form-item label="学院编码" v-bind="validateInfos.collegecode">
<a-input v-model:value="formData.collegecode" placeholder="请输入学院编码" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="学院" v-bind="validateInfos.college">
<a-input v-model:value="formData.college" placeholder="请输入学院" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="工号" v-bind="validateInfos.user">
<a-input v-model:value="formData.user" placeholder="请输入工号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="姓名" v-bind="validateInfos.cn">
<a-input v-model:value="formData.cn" placeholder="请输入姓名" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="职务" v-bind="validateInfos.duties">
<a-input v-model:value="formData.duties" placeholder="请输入职务" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="身份" v-bind="validateInfos.identity">
<a-input v-model:value="formData.identity" placeholder="请输入身份" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="状态" v-bind="validateInfos.status">
<a-input v-model:value="formData.status" placeholder="请输入状态" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="职称" v-bind="validateInfos.zdxms">
<a-input v-model:value="formData.zdxms" placeholder="请输入职称" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="职务名称" v-bind="validateInfos.zwmc">
<a-input v-model:value="formData.zwmc" placeholder="请输入职务名称" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="职务代码" v-bind="validateInfos.zwdm">
<a-input v-model:value="formData.zwdm" placeholder="请输入职务代码" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../KcCasusers.api';
import { Form } from 'ant-design-vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
collegecode: '',
college: '',
user: '',
cn: '',
duties: '',
identity: '',
status: '',
zdxms: '',
zwmc: '',
zwdm: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = {
college: [{ required: true, message: '请输入学院!'},],
user: [{ required: true, message: '请输入工号!'},],
cn: [{ required: true, message: '请输入姓名!'},],
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
//
Object.assign(formData, record);
});
}
/**
* 提交数据
*/
async function submitForm() {
//
await validate();
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
min-height: 500px !important;
overflow-y: auto;
padding: 24px 24px 24px 24px;
}
</style>

View File

@ -0,0 +1,75 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<KcCasusersForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcCasusersForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import KcCasusersForm from './KcCasusersForm.vue'
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -113,7 +113,7 @@
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
@ -121,7 +121,7 @@
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
@ -129,28 +129,28 @@
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
@ -162,7 +162,7 @@
},
];
}
/**
* 下拉操作栏
*/
@ -187,7 +187,7 @@
function searchQuery() {
reload();
}
/**
* 重置
*/
@ -197,7 +197,7 @@
//
reload();
}

View File

@ -0,0 +1,228 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<div style="width: 100%;height: 100%;">
<div>
<j-dict-select-tag v-model:value="formData.assesscode" style="width: 100%;" dictCode="kc_assessidentity,assessl2,assesscode" placeholder="请选择听课身份"/>
</div>
<a-transfer
:rowKey="record => record.cn + '-' + record.college"
v-model:target-keys="targetKeys"
style="width: 100%;"
:data-source="userData"
:pagination="false"
show-search
:filter-option="filterOption"
:render="item => item.cn + '-' + item.college"
@change="handleChange"
@search="handleSearch"
/>
</div>
</a-form>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import { getValueType } from '/@/utils';
import { saveOrUpdate, findUserList } from '../kcTkSfWh.api';
import { Form } from 'ant-design-vue';
interface TableData {
key: string;
title: string;
description: string;
chosen: boolean;
}
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const userData = ref<TableData[]>([]);
const targetKeys = ref<string[]>([]);
const userDataMap = ref<any>({});
const formData = reactive<Record<string, any>>({
id: '',
assessl1: '',
assessl2: '',
demand: undefined,
assesscode: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = {
assesscode: [{ required: true, message: '请选择听课身份!'},],
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
targetKeys.value = [];
userDataMap.value = {};
userData.value = [];
//
Object.assign(formData, record);
//
findUserList({pageSize: -1}).then(res => {
userData.value = res.records;
let map = {};
res.records.forEach(x => {
map[x.cn + '-' + x.college] = x;
});
userDataMap.value = map;
})
});
}
const filterOption = (inputValue: string, option: TableData) => {
return option.description.indexOf(inputValue) > -1;
};
const handleChange = (keys: string[], direction: string, moveKeys: string[]) => {
console.log(keys, direction, moveKeys);
// saveKeys.value = keys;
console.log('targetKeys ->',targetKeys);
};
const handleSearch = (dir: string, value: string) => {
console.log('search:', dir, value);
};
/**
* 提交数据
*/
async function submitForm() {
//
await validate();
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = Object.assign({},formData);
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
//
//userDataMap
model.lists = []
console.log('',targetKeys,userDataMap);
if(targetKeys.value && targetKeys.value.length){
targetKeys.value.forEach(key => {
console.log(`🚀 --------------------------------------------------------🚀`);
console.log(`🚀 ~ file: kcTkSfWhForm.vue:158 ~ submitForm ~ key:`, key,userDataMap);
console.log(`🚀 --------------------------------------------------------🚀`);
let data = userDataMap.value[key];
// cn: ""
// college: ""
// collegecode: "122000"
// duties: null
// id: 76442
// identity: null
// key: "-"
// status: null
// user: "1000900312"
// zdxms: ""
// let { usercode: user, username: cn, assesscode, assess1, assess2, dwmc, tkyq } = data;
let newData = Object.assign({},data);
delete newData.id
model.lists.push({
...newData,
college: model.assesscode,
// zwmc: ????
})
})
}else{
createMessage.warning("请选择人员");
confirmLoading.value = false;
return;
}
if(!model.lists || !model.lists.length){
createMessage.warning("请选择人员");
confirmLoading.value = false;
return;
}
console.log('model => ',model);
//confirmLoading.value = false;
//return;
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
min-height: 500px !important;
overflow-y: auto;
padding: 24px 24px 24px 24px;
}
</style>

View File

@ -0,0 +1,75 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<KcAssessidentityForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcAssessidentityForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import KcAssessidentityForm from './kcTkSfWhForm.vue'
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -0,0 +1,79 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/kcAssessuser/kcAssessuser/allList',
save='/kcAssessuser/kcAssessuser/addAll',
edit='/kcAssessuser/kcAssessuser/edit',
deleteOne = '/kcAssessuser/kcAssessuser//delete',
deleteBatch = '/kcAssessuser/kcAssessuser/deleteBatch',
importExcel = '/kcAssessuser/kcAssessuser/importExcel',
exportXls = '/kcAssessuser/kcAssessuser/exportXls',
findUserList = '/kcCasusers/kcCasusers/list',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
*/
export const findUserList = (params) => defHttp.get({ url: Api.findUserList, params });
/**
*
* @param params
* @param handleSuccess
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -0,0 +1,107 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
// 序号
// 姓名
// 工号
// 所在单位
// 职务
// 一级听课身份
// 二级听课身份
// private String cn;
// private String user;
// private String college;
// private String zwmc;
{
title: '姓名',
align: "center",
dataIndex: 'cn',
// slots: { customRender: 'nullIsShow' },
},
{
title: '工号',
align: "center",
dataIndex: 'user',
// slots: { customRender: 'nullIsShow' },
},
{
title: '所在单位',
align: "center",
dataIndex: 'college',
// slots: { customRender: 'nullIsShow' },
},
{
title: '职务',
align: "center",
dataIndex: 'zwmc',
slots: { customRender: 'nullIsShow' },
},
// {
// title: '听课身份代码',
// align: "center",
// dataIndex: 'assesscode'
// },
{
title: '一级听课身份',
align: "center",
dataIndex: 'assess1',
slots: { customRender: 'nullIsShow' },
},
{
title: '二级听课身份',
align: "center",
dataIndex: 'assess2',
slots: { customRender: 'nullIsShow' },
},
// {
// title: '听课要求',
// align: "center",
// dataIndex: 'demand'
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '听课身份一级',
field: 'assessl1',
component: 'Input',
},
{
label: '听课身份二级',
field: 'assessl2',
component: 'Input',
},
{
label: '要求听课次数',
field: 'demand',
component: 'InputNumber',
},
{
label: '身份编码',
field: 'assesscode',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入身份编码!'},
];
},
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -0,0 +1,236 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="">
<a-input placeholder="搜索" v-model:value="queryParam.cn"/>
</a-form-item>
</a-col>
<a-col :span="4">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined" style="margin-left: 10px;"> 听课身份设置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #nullIsShow="{text}">
<div>{{ text??'-' }}</div>
</template>
<!--省市区字段回显插槽-->
<!--<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>-->
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<KcAssessidentityModal ref="registerModal" @success="handleSuccess"></KcAssessidentityModal>
</div>
</template>
<script lang="ts" name="kcAssessidentity-kcAssessidentity" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './kcTkSfWh.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './kcTkSfWh.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import KcAssessidentityModal from './components/kcTkSfWhModal.vue'
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: 'kc_assessidentity',
api: list,
columns,
canResize:false,
useSearchForm: false,
showIndexColumn: true,
pagination: false,
rowKey: (r) => r.user + '-' + r.assesscode,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
},
exportConfig: {
name: "kc_assessidentity",
url: getExportUrl,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
// {
// label: '',
// onClick: handleEdit.bind(null, record),
// },
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
// {
// label: '',
// onClick: handleDetail.bind(null, record),
// }, {
// label: '',
// popConfirm: {
// title: '',
// confirm: handleDelete.bind(null, record),
// }
// }
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>

View File

@ -13,10 +13,17 @@
意见反馈
</div>
</a-col>
<div style="line-height: 1rem;width: 100%;">&nbsp;</div>
<div style="line-height: 1rem;padding-top: 0.5rem;font-size: .7rem;" class="topLinkTextEllipsis"><a @click="toDom('tkzjDom')">听课足迹</a></div>
<div style="line-height: 1rem;padding-top: 0.5rem;font-size: .7rem;" class="topLinkTextEllipsis"><a @click="toDom('rkjcDom')">任课教程</a></div>
<div style="line-height: 1rem;padding-top: 0.5rem;font-size: .7rem;" class="topLinkTextEllipsis"><a @click="toDom('yykcDom')">预约课程</a></div>
<div style="line-height: 1rem;padding-top: 0.5rem;font-size: .7rem;" class="topLinkTextEllipsis"><a @click="toDom('jcgkkDom')">精彩公开课</a></div>
<div style="line-height: 1rem;padding-top: 0.5rem;font-size: .7rem;" class="topLinkTextEllipsis"><a @click="toDom('kxstkktDom')">可线上听课课堂</a></div>
<div style="line-height: 1rem;padding-top: 0.5rem;font-size: .7rem;" class="topLinkTextEllipsis"><a @click="toDom('jrkclbDom')">今日课程列表</a></div>
</a-row>
</div>
<span class="topTitle" >
<RouterLink :to="{path:'/site/index'}" style="color:white;">{{ projectName }}</RouterLink>
<RouterLink :to="{path:'/site/index'}" style="color:white;">{{ projectName }}</RouterLink>
<RouterLink hidden target='_blank' :to="{path:'/site/liveView',query:{ url: 'rtsp://176.139.87.16/axis-media/media.amp' }}">直播测试页rtsp</RouterLink>
<RouterLink hidden target='_blank' :to="{path:'/site/liveFlvView',query:{ url: 'rtsp://176.139.87.16/axis-media/media.amp' }}">直播测试页flv</RouterLink>
<RouterLink hidden target='_blank' :to="{path:'/site/livem3u8View',query:{ url: 'https://bylwcs.nenu.edu.cn:9553/live_hls/yfjxl101s_lbzj.m3u8' }}">直播测试页m3u8</RouterLink>
@ -76,9 +83,31 @@ function toIndex(){
},1);
}
function toTop(){
let topNum = document.body.scrollTop;
smoothScroll(topNum);
function toTop(toId){
let topNum = 0;
if(toId){
let toDom: any = document?.querySelector('#' + toId);
console.log(`🚀 ------------------------------------------------🚀`);
console.log(`🚀 ~ file: header.vue:91 ~ toTop ~ toDom:`, toDom);
console.log(`🚀 ------------------------------------------------🚀`);
topNum = toDom?.offsetTop??0;
console.log(`🚀 --------------------------------------------------🚀`);
console.log(`🚀 ~ file: header.vue:97 ~ toTop ~ topNum:`, topNum);
console.log(`🚀 --------------------------------------------------🚀`);
}else{
topNum = document.body.scrollTop;
smoothScroll(topNum);
}
}
function toDom(toId){
let toDom: any = document?.querySelector('#' + toId);
let topNum = toDom?.offsetTop??0;
document.body.scrollTop = topNum;
}
/**
@ -127,6 +156,12 @@ function toIndex(){
width: 4rem;
line-height: 2.1rem;
}
.topLinkTextEllipsis {
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
}

View File

@ -23,7 +23,14 @@
<!-- 可线上听课课堂 -->
<kxstkktPage v-if="getUserSf()=='T'"/>
<!-- 今日课程列表 -->
<a-card class="rowGutter" v-if="getUserSf()=='T'">
<!-- <div style="line-height: 1rem;" class="topLinkTextEllipsis"><a @click="toTop('tkzjDom')">听课足迹</a></div>
<div style="line-height: 1rem;" class="topLinkTextEllipsis"><a @click="toTop('rkjcDom')">任课教程</a></div>
<div style="line-height: 1rem;" class="topLinkTextEllipsis"><a @click="toTop('yykcDom')">预约课程</a></div>
<div style="line-height: 1rem;" class="topLinkTextEllipsis"><a @click="toTop('jcgkkDom')">精彩公开课</a></div>
<div style="line-height: 1rem;" class="topLinkTextEllipsis"><a @click="toTop('kxstkktDom')">可线上听课课堂</a></div>
<div style="line-height: 1rem;" class="topLinkTextEllipsis"><a @click="toTop('jrkclbDom')">今日课程列表</a></div> -->
<a-card class="rowGutter" v-if="getUserSf()=='T'" id="jrkclbDom">
<template #title>
<span style="font-size: 24px;font-weight: bold;">今日课程列表</span>
</template>

View File

@ -1,5 +1,5 @@
<template>
<a-card class="rowGutter">
<a-card class="rowGutter" id="jcgkkDom">
<template #title>
<div style="font-size: 24px;font-weight: bold;">精彩公开课</div>
<div style="font-weight: 400; line-height: 1; color: #777;">荟萃多学科优秀教师展现多样化精彩教学</div>
@ -20,7 +20,7 @@
<img style="border-radius: 10px 10px 0 0;margin-bottom: 8px;" :class="classFun(index)" v-if="!item.tpmc" src="/resource/img/kc/moren.png" height="170px"/>
<AImage style="border-radius: 10px 10px 0 0;" :class="classFun(index)" v-else :src="getFileAccessHttpUrl(item.tpmc)" :preview="false" :width="'100%'" height="170px"/>
</div>
</div>
<div style="padding: 10px 1rem 1rem;background: #f3f3f3;">
<div class="ggkTitle ggkCcxs" :title="item.hxr +`·`+item.hxrlb">{{item.hxr}} · {{item.hxrlb}}</div>

View File

@ -1,5 +1,5 @@
<template>
<a-card class="rowGutter">
<a-card class="rowGutter" id="kxstkktDom">
<div>
<div style="font-size: 24px;font-weight: bold;">可线上听课课堂</div>
</div>
@ -126,7 +126,7 @@ function rkbLoadData() {
queryParam.value.skxs = 1
queryParam.value.type = 1
console.log(`🚀 ~ file: index.vue:112 ~ rkbLoadData ~ newRow:`, queryParam)
if(queryParam.value.hh!=","){
list(queryParam.value).then(res => {
// console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
@ -136,7 +136,7 @@ function rkbLoadData() {
// console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
})
}
}
function funpingjia(record){
@ -174,7 +174,7 @@ function funMore(){
}
/**
* 听课按钮
* @param item
* @param item
*/
function toLivePage(item){
// route.push({ path:'/site/liveRoom',query:{ id: item.jsbh } })

View File

@ -1,5 +1,5 @@
<template>
<a-card class="rowGutter">
<a-card class="rowGutter" id="rkjcDom">
<template #title>
<span style="font-size: 24px;font-weight: bold;">任课教程</span>
<span style="margin-left: 10px;"><a href="javascript:void(0);" @click="openChangeKcPage">修改课程提醒</a></span>

View File

@ -1,8 +1,8 @@
<template>
<a-card class="rowGutter">
<a-card class="rowGutter" id="tkzjDom">
<template #title>
<span style="font-size: 24px;font-weight: bold;">听课足迹</span>
<!-- <span style="margin-left: 10px;"><a href="javascript:void(0);">修改课程提醒</a></span> -->
<span style="margin-left: 10px;"><a href="javascript:void(0);" @click="addPingJia">新增评价</a></span>
</template>
<template #extra>
<RouterLink target='_blank' to="/site/tingKeZuJiMore">查看更多</RouterLink>
@ -12,6 +12,10 @@
</template>
<script setup lang="ts">
import listPage from '/@/views/site/tingKeZuJi/list.vue';
function addPingJia(){
//
}
</script>
<style lang="less" scoped>
.wenZiJuZhong {

View File

@ -1,5 +1,5 @@
<template>
<a-card class="rowGutter">
<a-card class="rowGutter" id="yykcDom">
<template #title>
<span class="titleName">预约课程</span>
<span class="titleDownload"><a @click="downloadByUrl({url:'/downPath/tkpjb.docx',target: '_self',fileName:'线上教学听课评价表-新.docx'})">线上课堂评价表</a></span>