Skip to content

Commit 65809f4

Browse files
author
sheepzh
committed
Support config multiple URLs for time limit (sheepzh#273)
1 parent 44d93e7 commit 65809f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1054
-1042
lines changed

src/app/components/DataManage/ClearPanel/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ function generateParamAndSelect(option: FilterOption): Promise<timer.stat.Row[]>
3333
dateEnd = new Date(new Date().getTime() - MILL_PER_DAY)
3434
}
3535
param.date = [dateStart, dateEnd]
36-
console.log(param)
3736
return statService.select(param)
3837
}
3938

@@ -99,7 +98,7 @@ const _default = defineComponent({
9998
confirmButtonText: t(msg => msg.button.confirm)
10099
}).then(async () => {
101100
await statService.batchDelete(result)
102-
ElMessage(t(msg => msg.dataManage.deleteSuccess))
101+
ElMessage(t(msg => msg.operation.successMsg))
103102
ctx.emit('dataDelete')
104103
}).catch(() => { })
105104
}

src/app/components/DataManage/Migration/ImportButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async function handleFileSelected(fileInputRef: Ref<HTMLInputElement>, callback:
2929
await immigration.importData(data)
3030
loading.close()
3131
callback?.()
32-
ElMessage.success(t(msg => msg.dataManage.migrated))
32+
ElMessage.success(t(msg => msg.operation.successMsg))
3333
}
3434

3535
const _default = defineComponent({

src/app/components/DataManage/Migration/ImportOtherButton/Step2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const _default = defineComponent({
3434
importing.value = true
3535
processImportedData(props.data, resolutionVal)
3636
.then(() => {
37-
ElMessage.success(t(msg => msg.dataManage.migrated))
37+
ElMessage.success(t(msg => msg.operation.successMsg))
3838
ctx.emit('import')
3939
})
4040
.catch(e => ElMessage.error(e))

src/app/components/Habit/components/Period/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* https://opensource.org/licenses/MIT
66
*/
77

8-
import { PERIODS_PER_DATE, after, keyOf, rowOf, startOrderOfRow } from "@util/period"
8+
import { PERIOD_PER_DATE, after, keyOf, rowOf, startOrderOfRow } from "@util/period"
99
import { MILL_PER_DAY } from "@util/time"
1010

1111
export function averageByDay(data: timer.period.Row[], periodSize: number): timer.period.Row[] {
@@ -21,7 +21,7 @@ export function averageByDay(data: timer.period.Row[], periodSize: number): time
2121
})
2222
const result = []
2323
let period = keyOf(new Date(), 0)
24-
for (let i = 0; i < PERIODS_PER_DATE / periodSize; i++) {
24+
for (let i = 0; i < PERIOD_PER_DATE / periodSize; i++) {
2525
const key = period.order / periodSize
2626
const val = map.get(key) || 0
2727
const averageMill = Math.round(val / dateNum)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { t } from "@app/locale"
2+
import { Right, Back, Close, Check } from "@element-plus/icons-vue"
3+
import { ElButton } from "element-plus"
4+
import { defineComponent } from "vue"
5+
6+
const _default = defineComponent({
7+
props: {
8+
last: Boolean,
9+
first: Boolean,
10+
},
11+
emits: {
12+
back: () => true,
13+
next: () => true,
14+
},
15+
setup(props, ctx) {
16+
return () => <div class="sop-footer">
17+
<ElButton
18+
type="info"
19+
icon={props.first ? <Close /> : <Back />}
20+
onClick={() => ctx.emit("back")}
21+
>
22+
{t(msg => props.first ? msg.button.cancel : msg.button.previous)}
23+
</ElButton>
24+
<ElButton
25+
type={props.last ? "success" : "primary"}
26+
icon={props.last ? <Check /> : <Right />}
27+
onClick={() => ctx.emit("next")}
28+
>
29+
{t(msg => props.last ? msg.button.save : msg.button.next)}
30+
</ElButton>
31+
</div>
32+
}
33+
})
34+
35+
export default _default

src/app/components/Limit/LimitModify/Sop/LimitPathEdit.tsx

Lines changed: 0 additions & 109 deletions
This file was deleted.

src/app/components/Limit/LimitModify/Sop/LimitPeriodFormItem.tsx

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)