From f0f8c661274cca5a3802a311e03ce6a77d7de953 Mon Sep 17 00:00:00 2001 From: JP Gao Date: Sat, 8 Feb 2025 21:08:13 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=BE=85=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/addDuty.vue | 44 +++++++++++--- components/calendar.vue | 41 ++++++++++++- components/changeColor.vue | 119 +++++++++++++++++++++++++++++++++++++ components/myDuty.vue | 46 +++++++------- 4 files changed, 217 insertions(+), 33 deletions(-) create mode 100644 components/changeColor.vue diff --git a/components/addDuty.vue b/components/addDuty.vue index 70ca726..32c444b 100644 --- a/components/addDuty.vue +++ b/components/addDuty.vue @@ -13,14 +13,19 @@ - + + + - + - + @@ -33,11 +38,18 @@ import { defineProps,defineEmits} from "vue"; const props =defineProps({ - visible: Boolean, - default:false + visible: { + type: Boolean, + default: false, + }, + color: { + type: String, + default: '#F7DFB4' // 设置默认颜色 + } }) - const emit = defineEmits(['closeModal']) + + const emit = defineEmits(['closeModal','showChangeColor']) // 点击背景遮罩关闭 function closeModal () { emit("closeModal") @@ -50,6 +62,7 @@ } function changeColor () { console.log("更改颜色") + emit("showChangeColor") } @@ -76,7 +89,6 @@ margin-left: 10px; } .sendDuty_btn { - height: 40px; width:40px; background-color: transparent; @@ -91,13 +103,29 @@ height: 40px; width:40px; } + .color { + border-radius: 50%; + width: 16px; + height: 16px; + background-color: transparent; + border: 1px solid #FFFFFF; + + } .changeColor_btn { border: 1px solid #FFFFFF; background-color: transparent; box-shadow: none; font-size: 16px; font-weight: 600; - + border-radius: 15px; + height:30px; + margin: 0; + padding: 0; + width: 100px; + + display: flex; + justify-content: space-around; + align-items: center; } .changeColor_btn::after { border: none; diff --git a/components/calendar.vue b/components/calendar.vue index 062eeb8..9515e1d 100644 --- a/components/calendar.vue +++ b/components/calendar.vue @@ -6,10 +6,25 @@ > - + - + + + + @@ -17,6 +32,9 @@ import reserveCalendar from './reserve-calendar.vue'; import myDuty from './myDuty.vue'; import addDuty from './addDuty.vue'; + +import changeColor from './changeColor.vue'; + import { ref } from 'vue'; // 我的日程 @@ -25,6 +43,12 @@ const isMyDutyVisible = ref(false); // 添加日程 const isAddDutyVisible = ref(false); +// 更改日程颜色 +const isChangeColorVisible = ref(false); + +// 日程颜色 +const dutyColor=ref("#F7DFB4") + // 显示添加我的日程弹窗 function showMyDuty() { isMyDutyVisible.value = true; @@ -34,15 +58,26 @@ function close() { isMyDutyVisible.value = false; } +// 显示添加日程弹窗 function showAddDuty() { isAddDutyVisible.value = true; } - // 关闭添加日程弹窗 function closeAddDuty() { isAddDutyVisible.value = false; } +// 获得选择的颜色 +const chosenColor=function (color) { + dutyColor.value=color; + console.log(dutyColor.value,typeof(dutyColor.value)); +} +function closeChangeColor() { + isChangeColorVisible.value=false; +} +function showChangeColor() { + isChangeColorVisible.value=true; +} diff --git a/components/changeColor.vue b/components/changeColor.vue new file mode 100644 index 0000000..c349c00 --- /dev/null +++ b/components/changeColor.vue @@ -0,0 +1,119 @@ + + + + + \ No newline at end of file diff --git a/components/myDuty.vue b/components/myDuty.vue index 2ae145e..aa087a2 100644 --- a/components/myDuty.vue +++ b/components/myDuty.vue @@ -1,27 +1,25 @@ diff --git a/components/changeColor.vue b/components/changeColor.vue index c349c00..62264fd 100644 --- a/components/changeColor.vue +++ b/components/changeColor.vue @@ -1,25 +1,27 @@ @@ -38,8 +40,9 @@ // 颜色 const colorList= - ['#F7DFB4', '#DAB2FF', '#54A2F2', '#F5E877', - '#7DE7B4', '#A94DEB', '#22D7E7', '#F8BDE4']; + ['#FABAC8', '#D2B9D7', '#B0C5B8', '#82B498', + '#F7BD3D', '#CFA26A', '#BCE0EC', '#79ABD2']; + const selectedIndex= ref(0); @@ -69,12 +72,23 @@ - + .duty-item { + display: flex; + align-items: center; + margin-bottom: 10px; + } + .circle { + width: 20px; + height: 20px; + border: 2px solid #DEB0FF9C; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-right: 10px; + cursor: pointer; + } + .tick { + color: #DEB0FF9C; + font-size: 14px; + font-weight: bold; + } + .duty-content { + flex: 1; + display: flex; + align-items: center; + } + .duty-title { + font-size: 16px; + font-weight: 600; + margin-right: 10px; + } + .duty-description { + font-size: 14px; + color: #666; + } + \ No newline at end of file diff --git a/components/reserve-calendar.vue b/components/reserve-calendar.vue index 263fac7..0356c9a 100644 --- a/components/reserve-calendar.vue +++ b/components/reserve-calendar.vue @@ -121,6 +121,8 @@ const weeks = computed(() => { }); function showPicker() { + PickerCurMonth.value=curMonth.value; + PickerCurYear.value=curYear.value; IsShowPicker.value = !IsShowPicker.value; } @@ -150,7 +152,7 @@ function weekTitle(index) { onMounted( () => { calendar.value = dateInfo; - static_calendar.value = getRangeDates(year, month, 6); + static_calendar.value = getRangeDates(year, month,99999); //用来触发第一次watch,不知道为什么immediate无效 curMonth.value = new Date().getMonth() + 1; From 6e07cd99a18d7c9d075aea6f2ac8e59dc2ae7257 Mon Sep 17 00:00:00 2001 From: JP Gao Date: Sat, 22 Feb 2025 20:03:11 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E6=B7=BB=E5=8A=A0whs=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=97=A5=E7=A8=8B=E4=BB=A3=E7=A0=81,=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=96=87=E6=9C=AC=E6=BA=A2=E5=87=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/addDuty.vue | 38 +++++++--- components/calendar.vue | 83 ++++++++++---------- components/myDuty.vue | 130 ++++++++++++++++++++++++-------- components/reserve-calendar.vue | 19 +++-- 4 files changed, 177 insertions(+), 93 deletions(-) diff --git a/components/addDuty.vue b/components/addDuty.vue index 0a00444..1d38f2c 100644 --- a/components/addDuty.vue +++ b/components/addDuty.vue @@ -1,13 +1,13 @@ diff --git a/components/myDuty.vue b/components/myDuty.vue index 88b5b10..a913e2b 100644 --- a/components/myDuty.vue +++ b/components/myDuty.vue @@ -1,34 +1,44 @@ - + .duties { + flex-grow: 1; + flex-shrink: 1; + margin: 10px 5px; + overflow: scroll; + /* border: 1px solid black; */ + } + .duty-item { + display: flex; + align-items: center; + margin-bottom: 10px; + } + .circle { + width: 20px; + height: 20px; + border: 2px solid #DEB0FF9C; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-right: 10px; + cursor: pointer; + } + .tick { + color: #DEB0FF9C; + font-size: 14px; + font-weight: bold; + } + .duty-content { + flex: 1; + display: flex; + align-items: center; + } + .duty-title { + font-size: 16px; + font-weight: 600; + margin-right: 10px; + } + .duty-description { + font-size: 14px; + color: #666; + } + \ No newline at end of file diff --git a/components/reserve-calendar.vue b/components/reserve-calendar.vue index 36bf836..1b5f4bc 100644 --- a/components/reserve-calendar.vue +++ b/components/reserve-calendar.vue @@ -12,20 +12,20 @@ --> {{ curYear }}年{{ curMonth }}月 - + @@ -41,7 +41,7 @@ weekTitle(index2) }} - + - - 点击安排日程 + @@ -107,6 +106,7 @@ const IsShowPicker = ref(false); const props = defineProps({}); const calendar = ref(); + //客观上当前的时间 const year = new Date().getFullYear(); const month = new Date().getMonth() + 1; // 月份是从0开始的,所以加1 @@ -137,6 +137,8 @@ const weeks = computed(() => { }); function showPicker() { + PickerCurMonth.value=curMonth.value; + PickerCurYear.value=curYear.value; IsShowPicker.value = !IsShowPicker.value; } @@ -166,7 +168,7 @@ function weekTitle(index) { onMounted( () => { calendar.value = dateInfo; - static_calendar.value = getRangeDates(year, month, 6); + static_calendar.value = getRangeDates(year, month,99999); //用来触发第一次watch,不知道为什么immediate无效 curMonth.value = new Date().getMonth() + 1; @@ -305,7 +307,8 @@ const navigateToAI = () => { justify-content: center; align-items: center; flex-direction: column; - height: 120rpx; + height: 16vh; + min-height: 16vh; } .fixed { /* position: fixed; */ From 29cd76ab256c9fc39816c3c2c7000a4cde465dd4 Mon Sep 17 00:00:00 2001 From: Aystb <3185269857@qq.com> Date: Wed, 26 Feb 2025 11:18:28 +0800 Subject: [PATCH 08/17] =?UTF-8?q?feat:ai=E5=88=9B=E5=BB=BA=E6=96=B0?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E5=8A=9F=E8=83=BD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/aiCom/talk.vue | 17 ++++++-- components/aiCom/talkMode.vue | 2 +- css/flexCF.css | 2 + pages/AI/newTalk.vue | 76 ++++++++++++++++++++++++++--------- store/requestModeStore.js | 2 +- store/userStore.js | 4 +- 6 files changed, 77 insertions(+), 26 deletions(-) diff --git a/components/aiCom/talk.vue b/components/aiCom/talk.vue index aab1e13..1ecfd85 100644 --- a/components/aiCom/talk.vue +++ b/components/aiCom/talk.vue @@ -1,4 +1,5 @@ + diff --git a/css/flexCF.css b/css/flexCF.css index 551f5d2..724b366 100644 --- a/css/flexCF.css +++ b/css/flexCF.css @@ -63,6 +63,7 @@ text { .items-start { align-items: flex-start; + } .items-end { @@ -83,6 +84,7 @@ text { .self-start { align-self: flex-start; + } .self-end { diff --git a/pages/AI/newTalk.vue b/pages/AI/newTalk.vue index c9f988a..627825d 100644 --- a/pages/AI/newTalk.vue +++ b/pages/AI/newTalk.vue @@ -1,14 +1,26 @@ \ No newline at end of file diff --git a/store/requestModeStore.js b/store/requestModeStore.js index e41508d..d9d7036 100644 --- a/store/requestModeStore.js +++ b/store/requestModeStore.js @@ -5,7 +5,7 @@ export const useRequestModeStore = defineStore('requestModeStore',()=>{ const model = ref("gpt-3.5-turbo") const max_tokens=ref(1600) const temperature = ref(0.5) //介于 0 和 2 之间。较高的值(如 0.8)将使输出更加随机,而较低的值(如 0.2)将使输出更加集中和确定。 -const stream = ref(false) +const stream = ref(true) const n = ref(1) const presence_penalty = ref(0)//-2.0 和 2.0 之间的数字。正值会根据到目前为止是否出现在文本中来惩罚新标记,从而增加模型谈论新主题的可能性。 const frequency_penalty = ref(0)//-2.0 和 2.0 之间的数字。正值会根据新标记在文本中的现有频率对其进行惩罚,从而降低模型逐字重复同一行的可能性。 diff --git a/store/userStore.js b/store/userStore.js index 5f299e8..a3e34e7 100644 --- a/store/userStore.js +++ b/store/userStore.js @@ -3,8 +3,8 @@ import {ref} from 'vue' export const useUserStone = defineStore('userStone',()=>{ const userid = ref(1) +const nowRequestAIHistoryId = ref() - -return {userid} +return {userid,nowRequestAIHistoryId} }) \ No newline at end of file From 6fb8478f71d53e8031ee79c9900f8f8cd7c29490 Mon Sep 17 00:00:00 2001 From: JP Gao Date: Wed, 26 Feb 2025 22:25:05 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E6=88=91=E7=9A=84=E6=97=A5=E7=A8=8B?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=A0=B9=E6=8D=AE=E6=97=A5=E6=9C=9F=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=EF=BC=8C=E6=97=A5=E6=9C=9F=E5=B0=8F=E6=A0=BC=E5=AD=90?= =?UTF-8?q?=E9=87=8C=E9=9D=A2=E5=BE=85=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/addDuty.vue | 7 +++- components/calendar.vue | 32 ++++++++++------ components/myDuty.vue | 48 ++++++++++++++++-------- components/reserve-calendar.vue | 65 +++++++++++++++++++++++++-------- components/scrollPicker.vue | 2 +- 5 files changed, 110 insertions(+), 44 deletions(-) diff --git a/components/addDuty.vue b/components/addDuty.vue index 1d38f2c..03e30b8 100644 --- a/components/addDuty.vue +++ b/components/addDuty.vue @@ -48,13 +48,15 @@ }) - const emit = defineEmits(['closeModal','showChangeColor','resetColor']) + const emit = defineEmits(['closeModal','showChangeColor','resetColor','addDuty']) const dutyTitle = ref(''); const dutyDescription = ref(''); // 点击背景遮罩关闭 function closeModal () { + dutyTitle.value = ''; + dutyDescription.value = ''; emit("closeModal") emit("resetColor") // console.log("关闭添加日程界面") @@ -69,7 +71,8 @@ const newDuty = { title: dutyTitle.value, - description: dutyDescription.value + description: dutyDescription.value, + color:props.color }; emit('addDuty', newDuty); diff --git a/components/calendar.vue b/components/calendar.vue index 137688c..02dc72f 100644 --- a/components/calendar.vue +++ b/components/calendar.vue @@ -1,20 +1,19 @@