Compare commits

...

3 Commits

Author SHA1 Message Date
bai cb1acfcde9 新增脚本,修改模式 2024-07-10 22:30:50 +08:00
bai 66aba75f64 Merge branch 'master' of http://47.115.223.229:8888/yangjun/dbsd_tjbbfx
# Conflicts:
#	jeecgboot-vue3/src/views/bl/blTeacherInfo/BlTeacherInfoList.vue
2024-07-10 22:30:18 +08:00
bai 3b77d8586a 2024年7月10日 新增debug按钮 2024-07-10 22:29:27 +08:00
15 changed files with 459 additions and 30 deletions

7
jeecgboot-vue3/build.bat Normal file
View File

@ -0,0 +1,7 @@
::@echo off & chcp 65001
call ./changePath.bat
npm run build
echo 压缩
cd dist
tar -zcvf ../dist.tar.gz *
cd ..

View File

@ -0,0 +1,7 @@
::@echo off & chcp 65001
call ./changePath.bat
npm run build --mode development
echo 压缩
cd dist
tar -zcvf ../dist.tar.gz *
cd ..

View File

@ -0,0 +1,25 @@
@echo off & chcp 65001
echo 原node版本
node -v
echo 如果运行错误请设置node版本
if not exist nodePath.txt (
echo 请在项目根目录创建【nodePath.txt】文件并填写jdk路径,文件内容大致为【D:\ProgramGreeFile\nodejs\node-21.2.0】
pause
exit
)
set /P nodePath=<nodePath.txt
if not defined nodePath (
echo 请在项目根目录创建【nodePath.txt】文件并填写jdk路径,文件内容大致为【D:\ProgramGreeFile\nodejs\node-21.2.0】
pause
exit
)
::还原
::if pathBak == '' ( ) else ( set path=%pathBak% )
if "%pathBak%"=="" (echo '跳过重置环境变量') else set path=%pathBak%
set pathBak=%path%
set path2=%nodePath%;%path%
set path=%path2%
echo 现node版本
node -v
echo 开始执行

3
jeecgboot-vue3/clean.bat Normal file
View File

@ -0,0 +1,3 @@
:: @echo off & chcp 65001
call ./changePath.bat
npm run clean

7
jeecgboot-vue3/gxdm.bat Normal file
View File

@ -0,0 +1,7 @@
@echo off
echo 更新前台代码中...
::git.exe pull -v --progress "核心库"
git.exe pull -v --progress "origin"
echo 更新成功
PAUSE
exit

View File

@ -1 +1,3 @@
pnpm install
:: @echo off & chcp 65001
call ./changePath.bat
npm run pinstall

View File

@ -0,0 +1 @@
D:\ProgramGreeFile\nodejs\node-21.2.0

View File

@ -1 +1,3 @@
pnpm dev --mode development
::@echo off & chcp 65001
call ./changePath.bat
npm run dev

View File

@ -11,6 +11,7 @@ enum Api {
deleteBatch = '/blStuInfo/blStuInfo/deleteBatch',
importExcel = '/blStuAnswer/blStuAnswer/importExcel',
exportXls = '/blStuAnswer/blStuAnswer/exportXls',
reloadCreate = '/blStuAnswer/blStuAnswer/createWord',
}
/**
@ -30,6 +31,8 @@ export const getImportUrl = Api.importExcel;
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
export const reloadCreateFn = (params) => defHttp.get({ url: Api.reloadCreate, params });
/**
*
* @param params

View File

@ -24,9 +24,11 @@
<BasicTable @register="registerTable" >
<!--插槽: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>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
<a-button type="primary" @click="handleV2Add" 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-switch hidden v-model:checked="reloadCreateBtn" checked-children="显示" un-checked-children="不显示"/>
</template>
<!--操作栏-->
<template #action="{ record }">
@ -40,6 +42,7 @@
</BasicTable>
<!-- 表单区域 -->
<BlStuInfoModal ref="registerModal" @success="handleSuccess"></BlStuInfoModal>
<BlStuInfoV2Modal ref="registerV2Modal" @success="handleSuccess"></BlStuInfoV2Modal>
</div>
</template>
@ -48,9 +51,10 @@
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './BlStuInfo.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './BlStuInfo.api';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, reloadCreateFn } from './BlStuInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import BlStuInfoModal from './components/BlStuInfoModal.vue'
import BlStuInfoV2Modal from './components/BlStuInfoV2Modal.vue'
import { useUserStore } from '/@/store/modules/user';
import { useMethods } from '/@/hooks/system/useMethods';
import { useMessage } from '/@/hooks/web/useMessage';
@ -63,12 +67,14 @@ const $message = useMessage();
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const reloadCreateBtn = ref<boolean>(false);
const registerModal = ref();
const registerV2Modal = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '教师调研报告',
title: '学生调研报告',
api: list,
columns,
canResize:false,
@ -82,7 +88,7 @@ const $message = useMessage();
},
},
exportConfig: {
name: "教师问卷详细信息",
name: "学生问卷详细信息",
url: getExportUrl,
params: { ...queryParam,id:-1},
},
@ -124,6 +130,11 @@ const $message = useMessage();
registerModal.value.add();
}
function handleV2Add(){
registerV2Modal.value.disableSubmit = true;
registerV2Modal.value.add();
}
/**
* 编辑事件
*/
@ -160,7 +171,7 @@ const $message = useMessage();
let title = "11111";
let paramsForm = {id:record.id};
let fileName = '学生问卷分析情况.docx';
let fileName = '学生问卷分析情况.docx';
if(record.schoolName){
fileName = record.schoolName;
if(record.xuenian){
@ -170,7 +181,7 @@ const $message = useMessage();
}
let url = realUrl
const data = await defHttp.get({ url, params: paramsForm, responseType: 'blob',timeout: 999999 }, { isTransformResponse: false, });
const data = await defHttp.get({ url, params: paramsForm, responseType: 'blob',timeout: 99999999 }, { isTransformResponse: false,timeout: 99999999 });
if (!data) {
// createMessage.warning('');
return;
@ -202,18 +213,24 @@ const $message = useMessage();
*/
function getTableAction(record) {
return [
// {
// label: '',
// onClick: handleEdit.bind(null, record),
// },
{
label: '编辑',
onClick: handleEdit.bind(null, record),
label: '下载报告',
onClick: downloadFile.bind(null, record.filePath),
},
// {
// label: '',
// onClick: handleDetail.bind(null, record),
// },
{
ifShow: reloadCreateBtn.value,
label: '重新生成',
onClick: reloadCreateFn.bind(null, record),
},
{
label: '报表',
onClick: handleTjfx.bind(null, record),
},
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',

View File

@ -0,0 +1,267 @@
<template>
<a-spin :spinning="confirmLoading">
<div style="padding: 20px;">
<a-steps :current="current" size="small">
<a-step title="基本信息" :key="1" />
<a-step title="导入数据" :key="2" />
<a-step title="生成报告" :key="3" />
</a-steps>
<div v-if="current == 0" style="padding: 20px;">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="24" class="shuoming">
<span>请注意点击后不可返回修改信息请仔细填写</span>
</a-col>
<a-col :span="24">
<a-form-item label="学校名称" v-bind="validateInfos.schoolName">
<a-input v-model:value="formData.schoolName" placeholder="请输入学校名称" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="评估单位" v-bind="validateInfos.pgdw">
<a-input v-model:value="formData.pgdw" placeholder="请输入评估单位" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="评估日期" v-bind="validateInfos.pgrq">
<a-input v-model:value="formData.pgrq" placeholder="请输入评估日期" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="学年" v-bind="validateInfos.xuenian">
<a-input v-model:value="formData.xuenian" placeholder="请输入学年" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="调查时点" v-bind="validateInfos.dysd">
<a-input v-model:value="formData.dysd" placeholder="请输入调查时点" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="学生总人数" v-bind="validateInfos.teacherSumno">
<a-input-number
v-model:value="formData.teacherSumno"
placeholder="请输入学生总人数"
style="width: 100%"
></a-input-number>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="最小有效样本数" v-bind="validateInfos.minNum">
<a-input-number
v-model:value="formData.minNum"
placeholder="请输入最小有效样本数"
style="width: 100%"
></a-input-number>
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
<div v-if="current == 1" style="padding: 20px;">
<a-col :span="24" class="shuoming">
<span>温馨提示点击导入后选择数据模板进行导入</span>
</a-col>
<span style="text-align: center;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls($event, { id: formData.id})">导入</j-upload-button>
</span>
</div>
<div v-if="current == 2" style="padding: 20px;text-align: center;line-height: 100px;">
<div>
<a-spin tip="报告生成中,请等待,生成完成后自动关闭页面...">
</a-spin>
</div>
<span>生成时间预计1分钟</span>
</div>
<div class="steps-action" style="text-align: center;">
<a-button v-if="current == 0" type="primary" @click="submitForm">下一页</a-button>
<!-- <a-button v-if="current > 0" style="margin-left: 8px" @click="prev">返回</a-button> -->
<!-- <a-button v-if="current == 2" type="primary" style="margin-left: 8px" @click="handleWancheng"> 完成 </a-button> -->
</div>
</div>
</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,getImportUrl } from '../BlStuInfo.api';
import { Form } from 'ant-design-vue';
import { useListPage } from '/@/hooks/system/useListPage';
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: '',
schoolName: '',
pgdw: '',
pgrq: '',
xuenian: '',
dysd: '',
teacherSumno: '',
minNum: '',
});
//table
const { onImportXls } = useListPage({
importConfig: {
url: getImportUrl,
success: handleSuccess
},
tableProps: {
title: '学生调研报告',
},
});
const current = ref<number>(0);
const next = () => {
current.value++;
};
const prev = () => {
current.value--;
};
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 = {
schoolName: [{ required: true, message: '请输入学校名称!' }],
pgdw: [{ required: true, message: '请输入评估单位!' }],
pgrq: [{ required: true, message: '请输入评估日期!' }],
xuenian: [{ required: true, message: '请输入学年!' }],
dysd: [{ required: true, message: '请输入调查时点!' }],
teacherSumno: [{ required: true, message: '请输入学生总人数!' }],
minNum: [{ required: true, message: '请输入最小有效样本数!' }],
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
function handleSuccess(){
current.value++;
console.log("参数--------》",{id:formData.id})
defHttp.get({url:'/blStuAnswer/blStuAnswer/createWord',params:{id:formData.id}}).then(res=>{
console.log('---生成报告--->',res);
if(res.code==200||res=='生成成功'){
handleWancheng();
}
})
}
//
function handleWancheng() {
emit('ok');
}
//
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
} else {
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
current.value = 0;
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if (record.hasOwnProperty(key)) {
tmpData[key] = record[key];
}
});
//
Object.assign(formData, tmpData);
});
}
/**
* 提交数据
*/
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) => {
console.log('------------>',res);
if (res.success) {
createMessage.success("数据保存成功");
current.value++;
formData.value = res.result;
//
Object.assign(formData, res.result);
console.log('-------formData----->',formData);
console.log('-------value----->',formData.value);
// emit('ok');
} else {
createMessage.warning("操作失败");
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
height: 490px !important;
overflow-y: auto;
padding: 14px;
}
.shuoming{
text-align: center;
padding: 20px;
color: red;
font-weight: bold;
font-size: 16px;
}
</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="关闭">
<BlStuInfoV2Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></BlStuInfoV2Form>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import BlStuInfoV2Form from './BlStuInfoV2Form.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

@ -11,6 +11,7 @@ enum Api {
deleteBatch = '/blTeacherInfo/blTeacherInfo/deleteBatch',
importExcel = '/blTeacherAnswer/blTeacherAnswer/importExcel',
exportXls = '/blTeacherAnswer/blTeacherAnswer/exportXls',
reloadCreate = '/blTeacherAnswer/blTeacherAnswer/createWord',
}
/**
@ -30,6 +31,8 @@ export const getImportUrl = Api.importExcel;
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
export const reloadCreateFn = (params) => defHttp.get({ url: Api.reloadCreate, params });
/**
*
* @param params

View File

@ -26,8 +26,9 @@
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
<a-button type="primary" @click="handleV2Add" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 下载模板</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-switch hidden v-model:checked="reloadCreateBtn" checked-children="显示" un-checked-children="不显示"/>
</template>
<!--操作栏-->
<template #action="{ record }">
@ -50,7 +51,7 @@
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './BlTeacherInfo.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './BlTeacherInfo.api';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, reloadCreateFn } from './BlTeacherInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import BlTeacherInfoModal from './components/BlTeacherInfoModal.vue'
import BlTeacherInfoV2Modal from './components/BlTeacherInfoV2Modal.vue'
@ -66,6 +67,7 @@ const $message = useMessage();
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const reloadCreateBtn = ref<boolean>(false);
const registerModal = ref();
const registerV2Modal = ref();
const userStore = useUserStore();
@ -132,7 +134,7 @@ const $message = useMessage();
registerV2Modal.value.disableSubmit = true;
registerV2Modal.value.add();
}
/**
* 编辑事件
*/
@ -140,7 +142,7 @@ const $message = useMessage();
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
@ -148,22 +150,22 @@ const $message = useMessage();
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
async function handleTjfx(record) {
let realUrl = "/blTeacherAnswer/blTeacherAnswer/createWordTjfx";
let title = "11111";
@ -222,7 +224,12 @@ const $message = useMessage();
// {
// label: '',
// onClick: handleDetail.bind(null, record),
// },
// },
{
ifShow: reloadCreateBtn.value,
label: '重新生成',
onClick: reloadCreateFn.bind(null, record),
},
{
label: '删除',
popConfirm: {
@ -233,7 +240,7 @@ const $message = useMessage();
}
];
}
/**
* 下拉操作栏
*/
@ -259,7 +266,7 @@ const $message = useMessage();
function searchQuery() {
reload();
}
/**
* 重置
*/
@ -269,7 +276,7 @@ const $message = useMessage();
//
reload();
}

3
jeecgboot-vue3/tbdm.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
TortoiseGitProc /command:sync /path:"./" /seq:0 /hwnd:0000000000390AF0 x64 TortoiseGitProc.exe
exit