|
|
@@ -127,12 +127,21 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { CrudLoad, Table, Upsert } from "cl-admin-crud-vue3/types";
|
|
|
-import { defineComponent, inject, onMounted, reactive, ref, watch } from "vue";
|
|
|
+import {
|
|
|
+ defineComponent,
|
|
|
+ inject,
|
|
|
+ onBeforeMount,
|
|
|
+ onMounted,
|
|
|
+ onUpdated,
|
|
|
+ reactive,
|
|
|
+ ref,
|
|
|
+ watch
|
|
|
+} from "vue";
|
|
|
import AdvSearch from "../components/adv-search-target.vue";
|
|
|
import dayjs from "dayjs";
|
|
|
import Query from "../components/query-isfinish.vue";
|
|
|
import ProblemType from "../components/shuyouProblemType-select.vue";
|
|
|
-import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
+import { ElMessage, ElMessageBox, ElNotification } from "element-plus";
|
|
|
import { useRefs } from "/@/core";
|
|
|
|
|
|
export default defineComponent({
|
|
|
@@ -502,24 +511,27 @@ export default defineComponent({
|
|
|
});
|
|
|
|
|
|
// crud 加载
|
|
|
- function onLoad({ ctx, app }: CrudLoad) {
|
|
|
+ async function onLoad({ ctx, app }: CrudLoad) {
|
|
|
// console.log(service);
|
|
|
- ctx.service(service.shuyouGameTarget).done();
|
|
|
- app.refresh();
|
|
|
+ // const aa = await service.shuyouTargetFlag.getTodayFlag();
|
|
|
+ const aa = await service.shuyouTargetFlag.getTodayFlag();
|
|
|
+ // console.log(aa);
|
|
|
+ if(aa.code==1000){
|
|
|
+ ctx.service(service.shuyouGameTarget).done();
|
|
|
+ app.refresh();
|
|
|
+ }else{
|
|
|
+ ElMessageBox.confirm(aa.message, "数据查询失败", {
|
|
|
+ type: "error"
|
|
|
+ })
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => null);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- // onMounted(async () => {
|
|
|
- // const aa = await service.shuyouTargetFlag.getTodayFlag();
|
|
|
- // // console.log(getTodayFlag);
|
|
|
- // // alert(111);
|
|
|
- // // if (getTodayFlag.code == -1) {
|
|
|
- // // ElMessageBox.confirm("11111111", "数据查询失败", {
|
|
|
- // // type: "error"
|
|
|
- // // })
|
|
|
- // // .then(() => {})
|
|
|
- // // .catch(() => null);
|
|
|
- // // }
|
|
|
- // });
|
|
|
+
|
|
|
|
|
|
// 表单值
|
|
|
const reasonForm = reactive<any>({
|