diff --git a/src/views/report/Caseess.vue b/src/views/report/Caseess.vue index 6f6773fe..2d207078 100644 --- a/src/views/report/Caseess.vue +++ b/src/views/report/Caseess.vue @@ -39,7 +39,7 @@ v-model:value="orgId" style="width: 100%" placeholder="请选择归属组织" - :allowClear="allowClear" + :allowClear = false :fieldNames="{ label: 'orgName', value: 'organizationId', @@ -162,7 +162,6 @@ export default { state.option = res.data?.result.orgTreeList; state.orgId = res.data?.result.treeNodeList; state.resetOrgId = res.data?.result.treeNodeList; - state.allowClear = true; getTableData(); } }; @@ -276,8 +275,8 @@ export default { author: state.author, authorName: state.authorName, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:00", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", boeRouterInfoName: state.boeRouterInfoName, }); if (res) { @@ -332,8 +331,8 @@ export default { title: state.title, author: state.author, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:00", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", }; axios({ method: "post", diff --git a/src/views/report/Curriculum.vue b/src/views/report/Curriculum.vue index ac788f7a..915ab694 100644 --- a/src/views/report/Curriculum.vue +++ b/src/views/report/Curriculum.vue @@ -167,7 +167,7 @@ export default { type: null, createName: "", publishTime: "", // 发布时间 - allowClear: true, + allowClear: false, option: [], selectedRowKeys: [], typeOption:[] @@ -190,7 +190,7 @@ export default { state.option = res.data?.result.orgTreeList; state.orgId = res.data?.result.treeNodeList; state.resetOrgId = res.data?.result.treeNodeList; - state.allowClear = true + state.allowClear = false getTableData(); } }; @@ -206,8 +206,8 @@ export default { type: state.type ? state.type[state.type.length - 1]:null, createName: state.createName, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", }; const res = await api.boeuCourseListPageV2(params); if (res) { @@ -445,8 +445,8 @@ export default { type: state.type ? state.type[state.type.length - 1]:null, createName: state.createName, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", }; axios({ method: "post", @@ -495,8 +495,8 @@ export default { type: state.type ? state.type[state.type.length - 1]:null, createName: state.createName, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", }; axios({ method: "post", @@ -563,8 +563,8 @@ export default { type: state.type ? state.type[state.type.length - 1]:null, createName: state.createName, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", }; axios({ method: "post", diff --git a/src/views/report/Employeelearning.vue b/src/views/report/Employeelearning.vue index 1c4fd80f..9d144683 100644 --- a/src/views/report/Employeelearning.vue +++ b/src/views/report/Employeelearning.vue @@ -17,7 +17,7 @@ v-model:value="orgId" style="width: 100%" placeholder="请选择归属组织" - :allowClear="allowClear" + :allowClear = false :fieldNames="{ label: 'orgName', value: 'organizationId', @@ -221,9 +221,6 @@ export default { state.option = res.data?.result.orgTreeList; state.orgId = res.data?.result.treeNodeList; state.resetOrgId = res.data?.result.treeNodeList; - res.data?.result?.userType === 1 - ? (state.allowClear = true) - : (state.allowClear = false); getTableData(); } }; diff --git a/src/views/report/Examination.vue b/src/views/report/Examination.vue index 0ae8ebe3..f0dac1fe 100644 --- a/src/views/report/Examination.vue +++ b/src/views/report/Examination.vue @@ -28,7 +28,7 @@ :options="option" placeholder="请选择组织" v-model:value="orgId" - :allowClear="allowClear" + :allowClear= false style="width: 100%" :fieldNames="{ label: 'name', diff --git a/src/views/report/Learningpathmap.vue b/src/views/report/Learningpathmap.vue index 2f39ffb1..e67ba079 100644 --- a/src/views/report/Learningpathmap.vue +++ b/src/views/report/Learningpathmap.vue @@ -10,7 +10,7 @@ v-model:value="orgId" style="width: 100%" placeholder="请选择归属组织" - :allowClear="allowClear" + :allowClear = false :fieldNames="{ label: 'orgName', value: 'organizationId', @@ -143,11 +143,9 @@ import downLoad from "../../utils/downLoad"; import Cookies from "vue-cookies"; import axios from "axios"; import dayjs from "dayjs"; -import { useStore } from "vuex"; export default { name: "LearningPathMap", setup() { - const store = useStore(); const state = reactive({ tableLoading: false, // table加载图标 tableDataTotal: 0, // 数据总条数 @@ -379,8 +377,8 @@ export default { orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, routerName: state.routerName, createName: state.createName, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] + " 00:00:01", + endTime: typeof state.publishTime[1] == 'undefined' ? null : state.publishTime[1] + " 23:59:59", // publishTime: state.publishTime, name: state.name, }); @@ -427,8 +425,8 @@ export default { const params = { createName: state.createName, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] + " 00:00:01", + endTime: typeof state.publishTime[1] == 'undefined' ? null : state.publishTime[1] + " 23:59:59", routerName: state.routerName, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, }; @@ -469,8 +467,8 @@ export default { const params = { createName: state.createName, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] + " 00:00:01", + endTime: typeof state.publishTime[1] == 'undefined' ? null : state.publishTime[1] + " 23:59:59", routerName: state.routerName, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, }; diff --git a/src/views/report/Overvoew.vue b/src/views/report/Overvoew.vue index af1058da..9ad0dfea 100644 --- a/src/views/report/Overvoew.vue +++ b/src/views/report/Overvoew.vue @@ -17,7 +17,7 @@ v-model:value="orgId" style="width: 100%" placeholder="请选择归属组织" - :allowClear="allowClear" + :allowClear=false :fieldNames="{ label: 'orgName', value: 'organizationId', @@ -341,8 +341,8 @@ export default { name: state.name, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, creator: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }, headers: { token: Cookies.get("token"), @@ -475,8 +475,8 @@ export default { ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }, responseType: "blob", headers: { @@ -495,8 +495,8 @@ export default { ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }, responseType: "blob", headers: { @@ -515,8 +515,8 @@ export default { ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }, responseType: "blob", headers: { @@ -535,8 +535,8 @@ export default { ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }, responseType: "blob", headers: { @@ -555,8 +555,8 @@ export default { ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }, responseType: "blob", headers: { @@ -573,8 +573,8 @@ export default { name: state.name, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, - startCreateTime: state.publishTime[0]+" 00:00:01", - endCreateTime: state.publishTime[1]+" 23:59:59", + startCreateTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endCreateTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }, responseType: "blob", headers: { @@ -597,8 +597,8 @@ export default { //考试列表 const res = await api.boeuExamPageList({ creator: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, testName: state.name, page: state.pageNo, @@ -619,8 +619,8 @@ export default { //案例列表 const res = await api.boeuCasePageList({ author: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, title: state.name, page: state.pageNo, @@ -646,8 +646,8 @@ export default { ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }); const list = res.data.result.rows.map((item) => { return { @@ -665,8 +665,8 @@ export default { teachingName: state.name, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }); const list = res.data.result.rows?.map((item) => { return { @@ -684,8 +684,8 @@ export default { routerName: state.name, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }); const list = res.data.result.rows?.map((item) => { return { @@ -703,8 +703,8 @@ export default { orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, createName: state.creator, projectName: state.name, - startCreateTime: state.publishTime[0]+" 00:00:01", - endCreateTime: state.publishTime[1]+" 23:59:59", + startCreateTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endCreateTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", }); if (res) { const fun = (arr) => { diff --git a/src/views/report/Questionsandanswers.vue b/src/views/report/Questionsandanswers.vue index 80fb7bba..c633e39a 100644 --- a/src/views/report/Questionsandanswers.vue +++ b/src/views/report/Questionsandanswers.vue @@ -130,8 +130,8 @@ export default { title: state.title, createName: state.createName, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", pageNo: state.pageNo, pageSize: state.pageSize, }; @@ -249,8 +249,8 @@ export default { title: state.title, createName: state.createName, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0] +" 00:00:01", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", pageNo: state.pageNo, pageSize: state.pageSize, }; diff --git a/src/views/report/ReportArticle.vue b/src/views/report/ReportArticle.vue index afe83fce..a210253c 100644 --- a/src/views/report/ReportArticle.vue +++ b/src/views/report/ReportArticle.vue @@ -169,8 +169,8 @@ export default { } if (state.publishTime.length>0) { // params.publishTime = state.publishTime; - params.startTime = state.publishTime[0]+" 00:00:00"; - params.endTime = state.publishTime[1]+" 23:59:59"; + params.startTime = typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+" 00:00:00"; + params.endTime = typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59"; } axios({ method: "post", @@ -202,8 +202,8 @@ export default { title: state.title, createName: state.createName, // publishTime: state.publishTime, - startTime: state.publishTime[0]+" 00:00:00", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+" 00:00:00", + endTime: typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59", page: state.pageNo, size: state.pageSize }; diff --git a/src/views/report/ReportExamination.vue b/src/views/report/ReportExamination.vue index 70c66604..671e21f0 100644 --- a/src/views/report/ReportExamination.vue +++ b/src/views/report/ReportExamination.vue @@ -17,7 +17,7 @@ v-model:value="orgId" style="width: 100%" placeholder="请选择归属组织" - :allowClear="allowClear" + :allowClear=false :fieldNames="{ label: 'orgName', value: 'organizationId', @@ -424,8 +424,8 @@ export default { // userNo: state.userNo, testName: state.testName, creator: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", // name: state.name, departmentId: state.orgId ? state.orgId[state.orgId.length - 1] : null, // bandCode: state.band, @@ -465,8 +465,8 @@ export default { // name: state.name, testName: state.testName, creator: state.creator, - startTime: state.publishTime[0]+" 00:00:01", - endTime: state.publishTime[1]+" 23:59:59", + startTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+ " 00:00:00", + endTime: typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[1]+ " 23:59:59", departmentId: state.orgId ? state.orgId[state.orgId.length - 1] : null, // bandCode: state.band, }, diff --git a/src/views/report/ReportProject.vue b/src/views/report/ReportProject.vue index 1b07942e..c2ff5827 100644 --- a/src/views/report/ReportProject.vue +++ b/src/views/report/ReportProject.vue @@ -30,7 +30,7 @@ v-model:value="orgId" style="width: 100%" placeholder="请选择归属组织" - :allowClear="allowClear" + :allowClear=false :fieldNames="{ label: 'orgName', value: 'organizationId', @@ -229,8 +229,8 @@ export default { params.createName = state.createName; params.projectName = state.projectName; // params.publishTime = state.publishTime; - params.startPublishTime = state.publishTime[0]+" 00:00:01"; - params.endPublishTime = state.publishTime[1]+" 23:59:59"; + params.startPublishTime =typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+" 00:00:01"; + params.endPublishTime = typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59"; params.page = state.pageNo; params.size = state.pageSize; params.orgId = state.orgId ? state.orgId[state.orgId.length - 1] : null; @@ -278,8 +278,8 @@ export default { params.createName = state.createName; params.projectName = state.projectName; // params.publishTime = state.publishTime; - params.startPublishTime = state.publishTime[0]+" 00:00:01"; - params.endPublishTime = state.publishTime[1]+" 23:59:59"; + params.startPublishTime =typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+" 00:00:01"; + params.endPublishTime = typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59"; params.page = state.pageNo; params.size = state.pageSize; params.orgId = state.orgId ? state.orgId[state.orgId.length - 1] : null; @@ -347,8 +347,8 @@ export default { params.createName = state.createName; params.projectName = state.projectName; // params.publishTime = state.publishTime; - params.startPublishTime = state.publishTime[0]+" 00:00:01"; - params.endPublishTime = state.publishTime[1]+" 23:59:59"; + params.startPublishTime =typeof state.publishTime[0] === 'undefined' ? null : state.publishTime[0]+" 00:00:01"; + params.endPublishTime = typeof state.publishTime[1] === 'undefined' ? null : state.publishTime[1]+" 23:59:59"; params.page = state.pageNo; params.size = state.pageSize; params.orgId = state.orgId ? state.orgId[state.orgId.length - 1] : null;