diff --git a/package.json b/package.json index 00b0866..f73c457 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "dayjs": "^1.11.10", "echarts": "^5.4.3", "echarts-liquidfill": "^3.1.0", - "element-plus": "^2.3.7", + "element-plus": "^2.6.2", "lottie-web": "^5.12.2", "naive-ui": "^2.34.4", "pinia": "^2.0.32", diff --git a/src/App.vue b/src/App.vue index 84fd8e6..2eaebc7 100755 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,7 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/src/views/company/index.vue b/src/views/company/index.vue index 68bb97d..42df633 100755 --- a/src/views/company/index.vue +++ b/src/views/company/index.vue @@ -10,73 +10,73 @@ import { cateFileList } from '@/api/daikin/base' const { day, week } = useDate() const { push } = useRouter() const array = ref([ - { - content1: '将扩大的机遇转为成果 更强更大地展翅飞翔', - content2: 'ひろがるチャンスを 成果につなげ 強く大きく 羽ばたこう', - year: '2023年' - }, - { content1: '领先时代的变化 开创崭新的未来', content2: '', year: '2022年' }, - { - content1: '以“重大变化”为契机 向新课题发起挑战', - content2: '', - year: '2021年' - }, - { - content1: '加速推进三个协创 决胜于变化的时代', - content2: '', - year: '2020年' - }, - { - content1: '以三个协创为轴心 人人迅速果断行动', - content2: '', - year: '2016年' - }, - { - content1: '突破壁垒 集中优势 不断挑战新课题', - content2: '', - year: '2018年' - }, - { - content1: '坚持以人为轴心,融合新的力量', - content2: '集团上下齐心协力提升企业价值', - year: '2017年' - }, - { content1: '站稳脚跟 强化优势 大步迈进', content2: '', year: '2016年' }, - { content1: '创造未来,决胜于变化的时代', content2: '', year: '2015年' } + { + content1: '将扩大的机遇转为成果 更强更大地展翅飞翔', + content2: 'ひろがるチャンスを 成果につなげ 強く大きく 羽ばたこう', + year: '2023年' + }, + { content1: '领先时代的变化 开创崭新的未来', content2: '', year: '2022年' }, + { + content1: '以“重大变化”为契机 向新课题发起挑战', + content2: '', + year: '2021年' + }, + { + content1: '加速推进三个协创 决胜于变化的时代', + content2: '', + year: '2020年' + }, + { + content1: '以三个协创为轴心 人人迅速果断行动', + content2: '', + year: '2016年' + }, + { + content1: '突破壁垒 集中优势 不断挑战新课题', + content2: '', + year: '2018年' + }, + { + content1: '坚持以人为轴心,融合新的力量', + content2: '集团上下齐心协力提升企业价值', + year: '2017年' + }, + { content1: '站稳脚跟 强化优势 大步迈进', content2: '', year: '2016年' }, + { content1: '创造未来,决胜于变化的时代', content2: '', year: '2015年' } ]) const fileItem = ref({}) const message = useMessage() const getFile = async () => { - const { rows }: any = await cateFileList({ - cateId: 261, - pageNum: 1, - pageSize: 100 - }) - fileItem.value = rows.find((item: any) => item.id == 1693) || {} + const { rows }: any = await cateFileList({ + cateId: 261, + pageNum: 1, + pageSize: 100 + }) + fileItem.value = rows.find((item: any) => item.id == 1693) || {} } const goFile = () => { - const { isSelect, filePath } = fileItem.value - if (!isSelect || isSelect === 2) { - message.info('没有访问权限!') - return - } - if (!filePath) { - message.info('暂无文件') - } - window.open(filePath) + const { isSelect, filePath } = fileItem.value + if (!isSelect || isSelect === 2) { + message.info('没有访问权限!') + return + } + if (!filePath) { + message.info('暂无文件') + } + window.open(filePath) } getFile() - - - - - - + + + - - - - - - 2024年グループ年頭方针 - - + + + + + + 2024年グループ年頭方针 + + + diff --git a/src/views/home/csr/CSR.vue b/src/views/home/csr/CSR.vue index 7bd9a11..2415da8 100755 --- a/src/views/home/csr/CSR.vue +++ b/src/views/home/csr/CSR.vue @@ -15,33 +15,37 @@ const store = useUserStore() const { push } = useRouter() const route = useRoute() -const userCode = ['admin', 'csr_dandang', 'tech_service'].includes( - store.user.roleCode -) -const Navs = [{ name: '集团*部门方针' }, { name: '年度活动日程表' }, { name: '其他链接' }, { name: '紧急联络' }, { name: 'CN/JP' }] +const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(store.user.roleCode) +const Navs = [ + { name: '集团*部门方针' }, + { name: '年度活动日程表' }, + { name: '其他链接' }, + { name: '紧急联络' }, + { name: 'CN/JP' } +] const Content = [ { key: '1-1', component: () => }, - { key: '1-2', component: () => }, + { key: '1-2', component: () => }, { key: '1-3', component: () => }, // { key: '1-4', component: () => }, - { key: '1-4', component: () => }, + { key: '1-4', component: () => } ] const activeNav = ref(route.query.key || '1-4') const activeContent = computed(() => { const nav = unref(activeNav) const curContent = Content.find((i) => nav.includes(i.key)) - console.log(curContent,1111) + console.log(curContent, 1111) return curContent?.component || null }) const shomks = () => { - // push('csr/modifyCsr2') - push({ name: 'modifyCsrCarbon' }) + // push('csr/modifyCsr2') + push({ name: 'modifyCsrCarbon' }) } watch(activeNav, (newVal) => { - push({ path: '/Home/csr',replace:true, query: { key: newVal } }) + push({ path: '/Home/csr', replace: true, query: { key: newVal } }) }) @@ -54,14 +58,18 @@ watch(activeNav, (newVal) => { - 管理 + 管理 - + diff --git a/src/views/home/csr/CSRContent23.vue b/src/views/home/csr/CSRContent23.vue index a6c438d..e19ffc7 100755 --- a/src/views/home/csr/CSRContent23.vue +++ b/src/views/home/csr/CSRContent23.vue @@ -1,15 +1,15 @@ - - - - - - 供方月度碳排放数据提交情况 - - 明道云 - - - - - - - 查询 - - - - - - 1月 - - - 已提交:45 - - - 未提交:100 - - - - - 2月 - - - - - 3月 - - - - - - - - {{ +it }}月 - - - - {{ +it }}月 - - - 已提交:{{ csrSupplierObj[it]?.submitedCount || 0 }} - - - 未提交:{{ csrSupplierObj[it]?.submitunCount || 0 }} - - - - - - - 5月 - - - - 已提交:45 - - - 未提交:100 - - - - - - 6月 - - - - - - - 7月 - - - - - 8月 - - - - - - 9月 - - - 已提交:45 - - - 未提交:100 - - - - - - - 10月 - - - - - 11月 - - - - - 12月 - - - - - - - 1月 - - - - 已提交:45 - - - 未提交:100 - - - - - - 2月 - - - - - 3月 - - - - - - - - 未提交供应商明细({{ query.year }}年{{ selMonth }}) - - - 更新时间:{{ updateTime }} - - - - - {{ ++key }} - {{ i.supplierName }} - - - {{ i.submitunCount }}次未提交 - - - - - - - - - - - - - + + + + + + 供方月度碳排放数据提交情况 + + 明道云 + + + + + + + 查询 + + + + + + 1月 + + + 已提交:45 + + + 未提交:100 + + + + + 2月 + + + + + 3月 + + + + + + + + {{ +it }}月 + + + + {{ +it }}月 + + + 已提交:{{ csrSupplierObj[it]?.submitedCount || 0 }} + + + 未提交:{{ csrSupplierObj[it]?.submitunCount || 0 }} + + + + + + + 5月 + + + + 已提交:45 + + + 未提交:100 + + + + + + 6月 + + + + + + + 7月 + + + + + 8月 + + + + + + 9月 + + + 已提交:45 + + + 未提交:100 + + + + + + + 10月 + + + + + 11月 + + + + + 12月 + + + + + + + 1月 + + + + 已提交:45 + + + 未提交:100 + + + + + + 2月 + + + + + 3月 + + + + + + + 未提交供应商明细({{ query.year }}年{{ selMonth }}) + + 更新时间:{{ updateTime }} + + + + + {{ + ++key + }} + {{ i.supplierName }} + + {{ i.submitunCount }}次未提交 + + + + + + + + + + + + - - + + diff --git a/src/views/home/database/index.vue b/src/views/home/database/index.vue index bf44458..569d900 100755 --- a/src/views/home/database/index.vue +++ b/src/views/home/database/index.vue @@ -15,343 +15,336 @@ let idx = ref(0) const onClic = ref(false) const titles = ref() function menuHandler(menu: any, index: number) { - console.log(menu, index) - activeMenuKey.value = menu.id - titles.value = menu.name - idx.value = index - activeItem.value = menu.id - if (menu.childList && menu.childList.length > 0) { - activeItem.value = menu.childList[0].id - } - if (database.database.id == activeItem.value && onClic.value) { - onClic.value = false - } else { - onClic.value = !!menu.childList?.length - // onClic.value = !onClic.value - } - database.database.id = activeItem.value - goListPage() + console.log(menu, index) + activeMenuKey.value = menu.id + titles.value = menu.name + idx.value = index + activeItem.value = menu.id + if (menu.childList && menu.childList.length > 0) { + activeItem.value = menu.childList[0].id + } + if (database.database.id == activeItem.value && onClic.value) { + onClic.value = false + } else { + onClic.value = !!menu.childList?.length + // onClic.value = !onClic.value + } + database.database.id = activeItem.value + goListPage() } function goChild(menu: any) { - activeItem.value = menu.id - console.log('🚀 ~ menu:', menu.id, menu.name) - database.database.id = menu.id - goListPage() + activeItem.value = menu.id + console.log('🚀 ~ menu:', menu.id, menu.name) + database.database.id = menu.id + goListPage() } function goListPage() { - const { path } = route - if (path === '/DataBase/review') push('/DataBase') + const { path } = route + if (path === '/DataBase/review') push('/DataBase') } var activeItem = ref(0) const tableData = ref() async function getTree() { - const { data = [] } = await treeDbList({}) - tableData.value = data + const { data = [] } = await treeDbList({}) + tableData.value = data - if (data && data[0]) { - // console.log(data[0]) - titles.value = data[0].name - activeMenuKey.value = data[0].id - // if(data[0].childList&&data[0].childList.length>0){ - // activeItem.value = data[0].childList[0].id - // activeMenuKey.value = data[0].childList[0].id - // } - } - const { id } = route.query - if (id) { - activeItem.value = +id - // const index = data.findIndex((i: any) => i.id == id) - // if (index > -1) { - // const item = data[index] - // if (item) { - // // menuHandler(item, index) - // // onClic.value = true - // // titles.value = item.name - // // activeMenuKey.value = item.id - // // database.database.id = item.id - // } - // } - } - if (activeItem.value) { - const { topLevelItem, targetItem } = findItemById(data, activeItem.value) - console.log('🚀 ~ topLevelItem, targetItem:', topLevelItem, targetItem) - if (topLevelItem && targetItem) { - const index = data.findIndex((i: any) => i.id === topLevelItem.id) - nextTick(() => { - // onClic.value = true - menuHandler(topLevelItem, index === -1 ? 0 : index) - goChild(targetItem) - }) - } else { - const index = data.findIndex((i: any) => i.id == id) - if (index > -1) { - const item = data[index] - if (item) { - menuHandler(item, index) - } - } - } - } else { - database.database.id = data[0].id - } + if (data && data[0]) { + // console.log(data[0]) + titles.value = data[0].name + activeMenuKey.value = data[0].id + // if(data[0].childList&&data[0].childList.length>0){ + // activeItem.value = data[0].childList[0].id + // activeMenuKey.value = data[0].childList[0].id + // } + } + const { id } = route.query + if (id) { + activeItem.value = +id + // const index = data.findIndex((i: any) => i.id == id) + // if (index > -1) { + // const item = data[index] + // if (item) { + // // menuHandler(item, index) + // // onClic.value = true + // // titles.value = item.name + // // activeMenuKey.value = item.id + // // database.database.id = item.id + // } + // } + } + if (activeItem.value) { + const { topLevelItem, targetItem } = findItemById(data, activeItem.value) + console.log('🚀 ~ topLevelItem, targetItem:', topLevelItem, targetItem) + if (topLevelItem && targetItem) { + const index = data.findIndex((i: any) => i.id === topLevelItem.id) + nextTick(() => { + // onClic.value = true + menuHandler(topLevelItem, index === -1 ? 0 : index) + goChild(targetItem) + }) + } else { + const index = data.findIndex((i: any) => i.id == id) + if (index > -1) { + const item = data[index] + if (item) { + menuHandler(item, index) + } + } + } + } else { + database.database.id = data[0].id + } } getTree() -function findItemById( - items: any, - targetId: any, - topLevelItem: any = null -): any { - for (let i = 0; i < items.length; i++) { - const item = items[i] - if (item.id === targetId) { - return { topLevelItem: topLevelItem || item, targetItem: item } - } else if (item.childList?.length > 0) { - const result = findItemById( - item.childList, - targetId, - topLevelItem || item - ) - if (result.targetItem) { - return result - } - } - } - return { topLevelItem: null, targetItem: null } +function findItemById(items: any, targetId: any, topLevelItem: any = null): any { + for (let i = 0; i < items.length; i++) { + const item = items[i] + if (item.id === targetId) { + return { topLevelItem: topLevelItem || item, targetItem: item } + } else if (item.childList?.length > 0) { + const result = findItemById(item.childList, targetId, topLevelItem || item) + if (result.targetItem) { + return result + } + } + } + return { topLevelItem: null, targetItem: null } } - - - - - - + + + + + + - - menuHandler(m, index)" - > - - - + - - - - {{ m.name }} - - - - - - + + + + {{ m.name }} + + + + + + - - - - - - {{ item.name }} - - - {{ item.name }} - - - + + + + + + + {{ item.name }} + + + {{ item.name }} + + + + + - - - - - - {{ ite.name }} - - - {{ ite.name }} - - - - + + + + + + {{ ite.name }} + + + {{ ite.name }} + + + + - - - - - {{ it.name }} - - - {{ it.name }} - - - - - - - - - - - - + + + + + {{ it.name }} + + + {{ it.name }} + + + + + + + + + + + + - - - - - + + + + + diff --git a/src/views/home/market/Market.vue b/src/views/home/market/Market.vue index 44cbcef..72a310c 100755 --- a/src/views/home/market/Market.vue +++ b/src/views/home/market/Market.vue @@ -6,7 +6,7 @@ import AppBlock from '@/components/AppBlock.vue' import AppNewsBox from '@/components/AppNewsBox.vue' // import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue' import { useDate } from '@/views/home/hooks/useDate' -import zhCn from "element-plus/lib/locale/lang/zh-cn"; +import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import { getList ,marketPreADD,getMarketUser,saveMarketUser,MarketDownload,MarketPreview,getCurrencyList,getMetalList} from '@/api/daikin/base' import { NModal,NCard } from 'naive-ui' import {formatDate} from '@/utils/format' diff --git a/src/views/home/phone/inv.vue b/src/views/home/phone/inv.vue index 368e6eb..2b68725 100755 --- a/src/views/home/phone/inv.vue +++ b/src/views/home/phone/inv.vue @@ -3,76 +3,74 @@ import HomeHead from '@/views/home/components/HomeHead.vue' // import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue' import { useDate } from '@/views/home/hooks/useDate' -import {NForm,NFormItem,NInput,NModal,NButton,useMessage} from 'naive-ui' -import zhCn from "element-plus/lib/locale/lang/zh-cn"; +import { NForm, NFormItem, NInput, NModal, NButton, useMessage } from 'naive-ui' +import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import UserPage from '@/views/home/intelligence/process/UserPages.vue' import Editor from '@/views/home/intelligence/components/TinyECE.vue' -import {addPageInv} from '@/api/daikin/base' +import { addPageInv } from '@/api/daikin/base' const message = useMessage() const { day, week } = useDate() const { push } = useRouter() let rules = { - title: { - required: false, - message: '请输入标题', - trigger: 'blur' - }, - actName:{ - required: false, - message: '请输入名称', - trigger: 'blur' - }, - actSTime: { - required: false, - message: '请选择开始', - trigger: 'blur' - }, - actETime: { - required: false, - message: '请选择结束', - trigger: 'blur' - }, - position:{ - required: false, - message: '请输入职务', - trigger: 'blur' - }, - + title: { + required: false, + message: '请输入标题', + trigger: 'blur' + }, + actName: { + required: false, + message: '请输入名称', + trigger: 'blur' + }, + actSTime: { + required: false, + message: '请选择开始', + trigger: 'blur' + }, + actETime: { + required: false, + message: '请选择结束', + trigger: 'blur' + }, + position: { + required: false, + message: '请输入职务', + trigger: 'blur' + } } -const showModals =ref(false) +const showModals = ref(false) const showModal = ref(false) const dataList = ref() -const handleChild = (data)=>{ - const { showModal: show, multipleSelection } = data - showModal.value = unref(show) - dataList.value = unref(multipleSelection) +const handleChild = (data) => { + const { showModal: show, multipleSelection } = data + showModal.value = unref(show) + dataList.value = unref(multipleSelection) } -const CloseThis = (data)=>{ - showModal.value = data +const CloseThis = (data) => { + showModal.value = data } const handleClose = (tag: any) => { - - dataList.value.splice(dataList.value.indexOf(tag), 1) - console.log( dataList.value) + dataList.value.splice(dataList.value.indexOf(tag), 1) + console.log(dataList.value) } const formValue = ref({ - title:'', - content:'', - actName:'', - actSTime:'', - actETime:'', - position:'', - userIdList:[], + title: '', + content: '', + actName: '', + actSTime: '', + actETime: '', + position: '', + userIdList: [] }) -const editorContent =ref() +const editorContent = ref() function escapeHTML(html: string): string { - const tempElement = document.createElement('div'); - tempElement.textContent = html; - return tempElement.innerHTML; + const tempElement = document.createElement('div') + tempElement.textContent = html + return tempElement.innerHTML } // 获取子组件传过来的值 const handleChild2 = (data: string) => { @@ -80,152 +78,184 @@ const handleChild2 = (data: string) => { } async function sure() { - const cont = editorContent.value - const content = escapeHTML(cont) - const {title, actName, actSTime, actETime,position } = formValue.value + const cont = editorContent.value + const content = escapeHTML(cont) + const { title, actName, actSTime, actETime, position } = formValue.value - - const starTime = new Date(actSTime).getTime() - const endTime = new Date(actETime).getTime() - console.log(starTime,endTime) - let userIdList: any[] =[] - if(!dataList.value){ - message.success("请选择要提醒的对象") - return - } - dataList.value.forEach((i: { userId: any })=>{ - userIdList.push(i.userId) - }) - console.log(formValue.value,dataList,content) - if(userIdList.length<0) return - let formdata = new FormData(); - formdata.append("title",title); - formdata.append("actName",actName); - formdata.append("actSTime",starTime); - formdata.append("actETime",endTime); - formdata.append("content",content); - formdata.append("position",position); - formdata.append("userIdList",userIdList); - const { msg, code } = await addPageInv(formdata,{headers: {'Content-Type': 'application/form-data'}}) - if (code === 200) { - message.success("添加成功") - } - else { message.success(msg); } + const starTime = new Date(actSTime).getTime() + const endTime = new Date(actETime).getTime() + console.log(starTime, endTime) + let userIdList: any[] = [] + if (!dataList.value) { + message.success('请选择要提醒的对象') + return + } + dataList.value.forEach((i: { userId: any }) => { + userIdList.push(i.userId) + }) + console.log(formValue.value, dataList, content) + if (userIdList.length < 0) return + let formdata = new FormData() + formdata.append('title', title) + formdata.append('actName', actName) + formdata.append('actSTime', starTime) + formdata.append('actETime', endTime) + formdata.append('content', content) + formdata.append('position', position) + formdata.append('userIdList', userIdList) + const { msg, code } = await addPageInv(formdata, { + headers: { 'Content-Type': 'application/form-data' } + }) + if (code === 200) { + message.success('添加成功') + } else { + message.success(msg) + } } - - - - - - - - - 邀请 - {{ day }} - {{ week }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 文本内容预览 - - - - 情报公开范围 - - - - {{ i.nickName }} - - - - - 提交 - - - + + + + + + + + 邀请 + {{ day }} + {{ week }} - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + 文本内容预览 + + + 情报公开范围 + + + {{ i.nickName }} + + - - - - - 【做成中,敬请期待】 + + 提交 + + + + + + + + + + + + + + + 【做成中,敬请期待】 + diff --git a/src/views/home/phone/visit.vue b/src/views/home/phone/visit.vue index c192bd8..9059798 100755 --- a/src/views/home/phone/visit.vue +++ b/src/views/home/phone/visit.vue @@ -3,233 +3,259 @@ import HomeHead from '@/views/home/components/HomeHead.vue' // import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue' import { useDate } from '@/views/home/hooks/useDate' -import {NForm,NFormItem,NInput,NModal,NButton,useMessage} from 'naive-ui' -import zhCn from "element-plus/lib/locale/lang/zh-cn"; +import { NForm, NFormItem, NInput, NModal, NButton, useMessage } from 'naive-ui' +import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import UserPage from '@/views/home/intelligence/process/UserPages.vue' import Editor from '@/views/home/intelligence/components/TinyECE.vue' -import {addPageVisit} from '@/api/daikin/base' +import { addPageVisit } from '@/api/daikin/base' const message = useMessage() const { day, week } = useDate() const { push } = useRouter() let rules = { - title: { - required: false, - message: '请输入标题', - trigger: 'blur' - }, - actName:{ - required: false, - message: '请输入名称', - trigger: 'blur' - }, - actSTime: { - required: false, - message: '请选择开始', - trigger: 'blur' - }, - actETime: { - required: false, - message: '请选择结束', - trigger: 'blur' - }, - position:{ - required: false, - message: '请输入职务', - trigger: 'blur' - }, - + title: { + required: false, + message: '请输入标题', + trigger: 'blur' + }, + actName: { + required: false, + message: '请输入名称', + trigger: 'blur' + }, + actSTime: { + required: false, + message: '请选择开始', + trigger: 'blur' + }, + actETime: { + required: false, + message: '请选择结束', + trigger: 'blur' + }, + position: { + required: false, + message: '请输入职务', + trigger: 'blur' + } } const showModal = ref(false) const dataList = ref() -const handleChild = (data)=>{ - const { showModal: show, multipleSelection } = data - showModal.value = unref(show) - dataList.value = unref(multipleSelection) +const handleChild = (data) => { + const { showModal: show, multipleSelection } = data + showModal.value = unref(show) + dataList.value = unref(multipleSelection) } -const CloseThis = (data)=>{ - showModal.value = data +const CloseThis = (data) => { + showModal.value = data } const handleClose = (tag: any) => { - - dataList.value.splice(dataList.value.indexOf(tag), 1) - console.log( dataList.value) + dataList.value.splice(dataList.value.indexOf(tag), 1) + console.log(dataList.value) } const formValue = ref({ - title:'', - content:'', - actName:'', - actSTime:'', - actETime:'', - position:'', - userIdList:[], + title: '', + content: '', + actName: '', + actSTime: '', + actETime: '', + position: '', + userIdList: [] }) -const editorContent =ref() +const editorContent = ref() function escapeHTML(html: string): string { - const tempElement = document.createElement('div'); - tempElement.textContent = html; - return tempElement.innerHTML; + const tempElement = document.createElement('div') + tempElement.textContent = html + return tempElement.innerHTML } -const showModals =ref(false) +const showModals = ref(false) // 获取子组件传过来的值 const handleChild2 = (data: string) => { editorContent.value = data } async function sure() { - const cont = editorContent.value - const content = escapeHTML(cont) - const {title, actName, actSTime, actETime,position } = formValue.value + const cont = editorContent.value + const content = escapeHTML(cont) + const { title, actName, actSTime, actETime, position } = formValue.value - - const starTime = new Date(actSTime).getTime() - const endTime = new Date(actETime).getTime() - console.log(starTime,endTime) - let userIdList: any[] =[] - if(!dataList.value){ - message.success("请选择要提醒的对象") - return - } - dataList.value.forEach((i: { userId: any })=>{ - userIdList.push(i.userId) - }) - console.log(formValue.value,dataList,content) - if(userIdList.length<0) return - let formdata = new FormData(); - formdata.append("title",title); - formdata.append("actName",actName); - formdata.append("actSTime",starTime); - formdata.append("actETime",endTime); - formdata.append("content",content); - formdata.append("position",position); - formdata.append("userIdList",userIdList); - const { msg, code } = await addPageVisit(formdata,{headers: {'Content-Type': 'application/form-data'}}) - if (code === 200) { - message.success("添加成功") - } - else { message.success(msg); } + const starTime = new Date(actSTime).getTime() + const endTime = new Date(actETime).getTime() + console.log(starTime, endTime) + let userIdList: any[] = [] + if (!dataList.value) { + message.success('请选择要提醒的对象') + return + } + dataList.value.forEach((i: { userId: any }) => { + userIdList.push(i.userId) + }) + console.log(formValue.value, dataList, content) + if (userIdList.length < 0) return + let formdata = new FormData() + formdata.append('title', title) + formdata.append('actName', actName) + formdata.append('actSTime', starTime) + formdata.append('actETime', endTime) + formdata.append('content', content) + formdata.append('position', position) + formdata.append('userIdList', userIdList) + const { msg, code } = await addPageVisit(formdata, { + headers: { 'Content-Type': 'application/form-data' } + }) + if (code === 200) { + message.success('添加成功') + } else { + message.success(msg) + } } - - - - - - - - - 拜访 - {{ day }} - {{ week }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 文本内容预览 - - - - - - - - - 情报公开范围 - - - - {{ i.nickName }} - - - - - 提交 - - - + + + + + + + + 拜访 + {{ day }} + {{ week }} - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - 【做成中,敬请期待】 + + + 文本内容预览 + + + + 情报公开范围 + + + {{ i.nickName }} + + + + + 提交 + + + + + + + + + + + + + + 【做成中,敬请期待】 + diff --git a/vite.config.ts b/vite.config.ts index d9c750e..d045062 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -13,59 +13,59 @@ import PurgeIcons from 'vite-plugin-purge-icons' // https://vitejs.dev/config/ export default defineConfig({ - server: { - proxy: { - '/test-api': { - target: 'http://admin.echo.mteam01.com/openApi/', - changeOrigin: true, - rewrite: (path) => path.replace(/^\/test-api/, '') // 设置重写的路径 - } - } - }, - resolve: { - alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)) - } - }, + server: { + proxy: { + '/test-api': { + target: 'http://admin.echo.mteam01.com/openApi/', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/test-api/, '') // 设置重写的路径 + } + } + }, + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + } + }, - plugins: [ - vue(), - vueJsx(), - Unocss({ - presets: [presetUno()] - }), - AutoImport({ - imports: ['vue', 'vue-router', '@vueuse/core'], // 自动导入vue和vue-router相关函数 - dts: 'src/types/auto-import.d.ts', - // eslint报错解决 https://blog.csdn.net/sayUonly/article/details/123482912 - eslintrc: { - enabled: false, // Default `false` - filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json` - globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable') - }, - resolvers: [ElementPlusResolver()] - }), - Components({ - resolvers: [ElementPlusResolver()] - }), - PurgeIcons(), - ViteCompression({ - algorithm: 'gzip', // 选择压缩算法,支持 'gzip' 或 'brotli' - ext: '.gz', // 压缩后文件的扩展名 - verbose: false - }) - ], - build: { - chunkSizeWarningLimit: 4000, - sourcemap: false, // Builds sourcemaps for better debugging but could be disabled for performance - minify: 'esbuild', // Use 'terser' for minimizing your codes, it could be 'esbuild' but 'terser' is more accurate - rollupOptions: { - treeshake: true // Enable tree-shaking - }, - terserOptions: { - compress: { - // pure_funcs: ['console.log', 'console.info'] // Remove console.log and console.info from production build - } - } - } + plugins: [ + vue(), + vueJsx(), + Unocss({ + presets: [presetUno()] + }), + AutoImport({ + imports: ['vue', 'vue-router', '@vueuse/core'], // 自动导入vue和vue-router相关函数 + dts: 'src/types/auto-import.d.ts', + // eslint报错解决 https://blog.csdn.net/sayUonly/article/details/123482912 + eslintrc: { + enabled: false, // Default `false` + filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json` + globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable') + }, + resolvers: [ElementPlusResolver()] + }), + Components({ + resolvers: [ElementPlusResolver()] + }), + PurgeIcons(), + ViteCompression({ + algorithm: 'gzip', // 选择压缩算法,支持 'gzip' 或 'brotli' + ext: '.gz', // 压缩后文件的扩展名 + verbose: false + }) + ], + build: { + chunkSizeWarningLimit: 6300, + sourcemap: false, // Builds sourcemaps for better debugging but could be disabled for performance + minify: 'esbuild', // Use 'terser' for minimizing your codes, it could be 'esbuild' but 'terser' is more accurate + rollupOptions: { + treeshake: true // Enable tree-shaking + }, + terserOptions: { + compress: { + // pure_funcs: ['console.log', 'console.info'] // Remove console.log and console.info from production build + } + } + } })