yujialong 8 months ago
parent 8dafd693ef
commit bd996b5cc3
  1. 28
      src/components/Panel/index.vue
  2. 7
      src/views/finance/BankDetail.vue
  3. 2
      src/views/product/bank/Add.vue
  4. 1
      src/views/product/bank/Approve.vue
  5. 1
      src/views/product/bank/CardList.vue
  6. 2
      src/views/product/bank/Config.vue

@ -47,7 +47,7 @@
@click="toReport"
v-if="isSubmit">查看实验报告</el-button>
<el-button class="reload h-[40px]"
@click="reload(1)"
@click="reloadConfirm"
v-show="per == 0">重新开始</el-button>
<el-button type="primary"
class="submit btn h-[40px]"
@ -550,12 +550,7 @@ const toReport = () => {
router.push('/report');
};
//
let reload = async (fromReload?: number) => {
if (fromReload) {
getEntryTime(1);
await delCache(); //
Cookies.remove('sand-level');
}
let reload = async () => {
if (!per.value) {
reloadCount();
startCount();
@ -565,6 +560,24 @@ let reload = async (fromReload?: number) => {
router.push('/');
}
};
//
let reloadConfirm = async () => {
ElMessageBox.confirm('此操作将会清空所有操作记录,确定重新开始?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false,
})
.then(async () => {
getEntryTime(1);
await delCache(); //
Cookies.remove('sand-level');
reload();
})
.catch(() => {
submiting.value = false;
});
};
//
let submit = async () => {
if (!submiting.value) {
@ -795,6 +808,7 @@ onUnmounted(() => {
delCache = null;
setNewProject = null;
reload = null;
reloadConfirm = null
startCount = null;
setSubmit = null;
clearInterval(counterTimer.value);

@ -157,7 +157,6 @@
<script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue';
import { findById } from '@/api/bank';
import { getTheCurrentUserName } from '@/api/config';
import { useRouter, useRoute } from 'vue-router';
import Back from '@/components/Back.vue';
@ -179,14 +178,8 @@ const getDetail = async () => {
}
}
};
//
const getName = async () => {
const res = await getTheCurrentUserName();
userName.value = res.userName;
};
onMounted(() => {
getDetail();
getName();
});
</script>

@ -458,7 +458,7 @@ const getDetail = async () => {
watch(
() => route.query,
() => {
getDetail();
route.params.action === 'add' && getDetail();
},
{
immediate: true,

@ -149,7 +149,6 @@ const submit = async (formEl: FormInstance | undefined) => {
});
};
onMounted(async () => {
console.log(11);
date.value = dayjs(await getNow()).format('YYYY-MM-DD');
});
watch(

@ -67,7 +67,6 @@ import Config from './Config.vue';
import Detail from './Detail.vue';
import Add from './Add.vue';
import Approve from './Approve.vue';
import Cookies from 'js-cookie';
import { getIds } from '@/utils/common';
const router = useRouter();

@ -788,7 +788,7 @@ const denyAll = (field: string, denyId: number) => {
watch(
() => route.query,
() => {
getDetail();
route.params.action === 'config' && getDetail();
},
{
immediate: true,

Loading…
Cancel
Save