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" @click="toReport"
v-if="isSubmit">查看实验报告</el-button> v-if="isSubmit">查看实验报告</el-button>
<el-button class="reload h-[40px]" <el-button class="reload h-[40px]"
@click="reload(1)" @click="reloadConfirm"
v-show="per == 0">重新开始</el-button> v-show="per == 0">重新开始</el-button>
<el-button type="primary" <el-button type="primary"
class="submit btn h-[40px]" class="submit btn h-[40px]"
@ -550,12 +550,7 @@ const toReport = () => {
router.push('/report'); router.push('/report');
}; };
// //
let reload = async (fromReload?: number) => { let reload = async () => {
if (fromReload) {
getEntryTime(1);
await delCache(); //
Cookies.remove('sand-level');
}
if (!per.value) { if (!per.value) {
reloadCount(); reloadCount();
startCount(); startCount();
@ -565,6 +560,24 @@ let reload = async (fromReload?: number) => {
router.push('/'); 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 () => { let submit = async () => {
if (!submiting.value) { if (!submiting.value) {
@ -795,6 +808,7 @@ onUnmounted(() => {
delCache = null; delCache = null;
setNewProject = null; setNewProject = null;
reload = null; reload = null;
reloadConfirm = null
startCount = null; startCount = null;
setSubmit = null; setSubmit = null;
clearInterval(counterTimer.value); clearInterval(counterTimer.value);

@ -157,7 +157,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue'; import { ref, computed, watch, onMounted } from 'vue';
import { findById } from '@/api/bank'; import { findById } from '@/api/bank';
import { getTheCurrentUserName } from '@/api/config';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import Back from '@/components/Back.vue'; 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(() => { onMounted(() => {
getDetail(); getDetail();
getName();
}); });
</script> </script>

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

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

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

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

Loading…
Cancel
Save