提交后不再查询列表和详情

master
yujialong 2 months ago
parent 0ca09ffa98
commit 6d8f7a338d
  1. 2
      src/components/Panel/index.vue
  2. 58
      src/views/product/bank/Add.vue
  3. 37
      src/views/product/bank/CardList.vue
  4. 2
      src/views/product/bank/Config.vue
  5. 27
      src/views/product/bank/Info.vue
  6. 6
      src/views/product/bank/List.vue
  7. 6
      src/views/product/fund/Add.vue
  8. 28
      src/views/product/fund/CardList.vue
  9. 8
      src/views/product/fund/Info.vue
  10. 16
      src/views/product/fund/List.vue
  11. 8
      src/views/product/insurance/Add.vue
  12. 30
      src/views/product/insurance/CardList.vue
  13. 5
      src/views/product/insurance/Info.vue
  14. 16
      src/views/product/insurance/List.vue
  15. 4
      src/views/report/Index.vue

@ -474,7 +474,7 @@ let handleCache = () => {
}; };
// //
const toReport = () => { const toReport = () => {
router.push('/report'); router.replace('/report');
}; };
// //
let reload = async () => { let reload = async () => {

@ -371,37 +371,39 @@ const getConfig = async () => {
}; };
// //
const getDetail = async () => { const getDetail = async () => {
if (!route.query.show) curTab.value = 'tab1'; if (!Cookies.get('sand-submit')) {
userName.value = await getUsername(); if (!route.query.show) curTab.value = 'tab1';
userName.value = await getUsername();
info.value = null;
if (id.value) { info.value = null;
try { if (id.value) {
// name try {
const { data } = await findById(id.value); // name
info.value = data; const { data } = await findById(id.value);
info.value = data;
// id
const res = await elementDetail(id.value); // id
if (res) { const res = await elementDetail(id.value);
const e = res.data.bankProducts; if (res) {
e.currentWorkingLife = e.currentWorkingLife.split(',').map((n) => +n); const e = res.data.bankProducts;
e.educationalRequirements = e.educationalRequirements.split(',').map((n) => +n); e.currentWorkingLife = e.currentWorkingLife.split(',').map((n) => +n);
e.modeRepayment = e.modeRepayment.split(',').map((n) => +n); e.educationalRequirements = e.educationalRequirements.split(',').map((n) => +n);
e.whetherToSupportEarlyRepayment = !!e.whetherToSupportEarlyRepayment; e.modeRepayment = e.modeRepayment.split(',').map((n) => +n);
e.bankGuaranteeTypeIds = []; e.whetherToSupportEarlyRepayment = !!e.whetherToSupportEarlyRepayment;
if (e.bankGuaranteeAllocationList) { e.bankGuaranteeTypeIds = [];
e.bankGuaranteeAllocationList.map((n) => { if (e.bankGuaranteeAllocationList) {
n.guaranteeTypeId && e.bankGuaranteeTypeIds.push(n.guaranteeTypeId); e.bankGuaranteeAllocationList.map((n) => {
}); n.guaranteeTypeId && e.bankGuaranteeTypeIds.push(n.guaranteeTypeId);
} });
for (const i in e) { }
if (e.hasOwnProperty(i)) { for (const i in e) {
form[i] = e[i]; if (e.hasOwnProperty(i)) {
form[i] = e[i];
}
} }
} }
} finally {
} }
} finally {
} }
} }
}; };

@ -46,6 +46,7 @@ import { bankingProductsList, batchDeletion } from '@/api/bank';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { getStatus } from '@/store/useProduct'; import { getStatus } from '@/store/useProduct';
import { getIds } from '@/utils/common'; import { getIds } from '@/utils/common';
import Cookies from 'js-cookie';
import Config from './Config.vue'; 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';
@ -63,23 +64,25 @@ const id = computed(() => +route.query.id);
const actionKey = ref<number>(1); const actionKey = ref<number>(1);
// //
const getList = async (refresh?: number) => { const getList = async (refresh?: number) => {
loading.value = true; if (!Cookies.get('sand-submit')) {
try { loading.value = true;
const { data } = await bankingProductsList({ try {
...getIds(), const { data } = await bankingProductsList({
pageNum: 1, ...getIds(),
pageSize: 1000, pageNum: 1,
productType: productType.value, pageSize: 1000,
roleId: route.query.role, productType: productType.value,
keyWord: route.query.name ?? '', roleId: route.query.role,
createDateSort: route.query.createDateSort ?? '', keyWord: route.query.name ?? '',
guarantyStyleId: route.query.guarantyStyleId ?? '', createDateSort: route.query.createDateSort ?? '',
status: route.query.status ?? '', guarantyStyleId: route.query.guarantyStyleId ?? '',
}); status: route.query.status ?? '',
list.value = data.message.records; });
((route.path !== '/product/bank/add' && list.value.length && !id.value) || refresh) && switchProduct(list.value[0], refresh); list.value = data.message.records;
} finally { ((route.path !== '/product/bank/add' && list.value.length && !id.value) || refresh) && switchProduct(list.value[0], refresh);
loading.value = false; } finally {
loading.value = false;
}
} }
}; };
onMounted(getList); onMounted(getList);

@ -844,7 +844,7 @@ const getConfig = async () => {
}; };
// //
const getDetail = async () => { const getDetail = async () => {
if (id.value) { if (id.value && !Cookies.get('sand-submit')) {
try { try {
// //
const { data } = await findById(id.value); const { data } = await findById(id.value);

@ -155,6 +155,7 @@ import { findById, approvalRecord } from '@/api/bank';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { getStatus } from '@/store/useProduct'; import { getStatus } from '@/store/useProduct';
import { getUsername } from '@/utils/common'; import { getUsername } from '@/utils/common';
import Cookies from 'js-cookie';
const emit = defineEmits(['updateAudits']); const emit = defineEmits(['updateAudits']);
const route = useRoute(); const route = useRoute();
@ -205,20 +206,22 @@ const loadComponent = async (componentName: string) => {
// //
const getDetail = async () => { const getDetail = async () => {
userName.value = await getUsername(); if (!Cookies.get('sand-submit')) {
userName.value = await getUsername();
if (id.value) { if (id.value) {
try { try {
const { data } = await findById(id.value); const { data } = await findById(id.value);
info.value = data; info.value = data;
if (info.value.riskControlDetails) riskInfo.value = data.riskControlDetails; if (info.value.riskControlDetails) riskInfo.value = data.riskControlDetails;
const res = await approvalRecord({ const res = await approvalRecord({
id: id.value, id: id.value,
}); });
approvals.value = res.list; approvals.value = res.list;
emit('updateAudits', res.list.length); emit('updateAudits', res.list.length);
} catch (e) {} } catch (e) {}
}
} }
}; };
watch( watch(

@ -143,8 +143,10 @@ const initList = async () => {
getList(); getList();
}; };
onMounted(() => { onMounted(() => {
getGuarantee(); if (!Cookies.get('sand-submit')) {
getList(); getGuarantee();
getList();
}
}); });
watch([params, () => route.query], initList); watch([params, () => route.query], initList);

@ -207,7 +207,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, computed, watch, onMounted, defineEmits } from 'vue'; import { ref, reactive, computed, onMounted, defineEmits } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import { Plus, Minus } from '@element-plus/icons-vue'; import { Plus, Minus } from '@element-plus/icons-vue';
import { getAListOfAShares, saveFund } from '@/api/fund'; import { getAListOfAShares, saveFund } from '@/api/fund';
@ -461,7 +461,9 @@ const submit = async () => {
} }
}; };
onMounted(() => { onMounted(() => {
getConfig(); if (!Cookies.get('sand-submit')) {
getConfig();
}
}); });
</script> </script>

@ -55,19 +55,21 @@ const loading = ref<boolean>(false);
const id = computed(() => +route.query.id); const id = computed(() => +route.query.id);
// //
const getList = async (refresh?: number) => { const getList = async (refresh?: number) => {
loading.value = true; if (!Cookies.get('sand-submit')) {
try { loading.value = true;
const { data } = await fundProductList({ try {
...getIds(), const { data } = await fundProductList({
pageNum: 1, ...getIds(),
pageSize: 1000, pageNum: 1,
fundName: route.query.name ?? '', pageSize: 1000,
createDateSort: route.query.createDateSort ?? '', fundName: route.query.name ?? '',
}); createDateSort: route.query.createDateSort ?? '',
list.value = data.data.records; });
refresh && list.value.length && switchProduct(list.value[0].id); list.value = data.data.records;
} finally { refresh && list.value.length && switchProduct(list.value[0].id);
loading.value = false; } finally {
loading.value = false;
}
} }
}; };
onMounted(() => { onMounted(() => {

@ -50,18 +50,18 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue'; import { ref, computed, watch } from 'vue';
import { findById } from '@/api/fund'; import { findById } from '@/api/fund';
import { useRouter, useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import Cookies from 'js-cookie';
const router = useRouter();
const route = useRoute(); const route = useRoute();
const id = computed(() => +route.query.id); const id = computed(() => +route.query.id);
const info = ref<Record<string, any>>({}); const info = ref<Record<string, any>>({});
// //
const getDetail = async () => { const getDetail = async () => {
if (id.value) { if (id.value && !Cookies.get('sand-submit')) {
try { try {
const { data } = await findById(id.value); const { data } = await findById(id.value);
info.value = data; info.value = data;

@ -72,13 +72,15 @@ const list = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false); const loading = ref<boolean>(false);
// //
const getList = async () => { const getList = async () => {
loading.value = true; if (!Cookies.get('sand-submit')) {
try { loading.value = true;
const { data } = await fundProductList({ pageNum: currentPage.value, pageSize: pageSize.value, ...toParams(params) }); try {
list.value = data.data.records; const { data } = await fundProductList({ pageNum: currentPage.value, pageSize: pageSize.value, ...toParams(params) });
total.value = data.data.total; list.value = data.data.records;
} finally { total.value = data.data.total;
loading.value = false; } finally {
loading.value = false;
}
} }
}; };
// //

@ -113,12 +113,14 @@ const form = reactive({
// //
const getConfig = async () => { const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(275); if (!Cookies.get('sand-submit')) {
config.value = process; const { process } = await getProcessInformationBasedOnRoles(275);
config.value = process;
}
}; };
// //
const getDetail = async () => { const getDetail = async () => {
if (id.value) { if (id.value && !Cookies.get('sand-submit')) {
try { try {
const { data } = await insuranceProductDetails(id.value); const { data } = await insuranceProductDetails(id.value);
info.value = data; info.value = data;

@ -57,20 +57,22 @@ const loading = ref<boolean>(false);
const id = computed(() => +route.query.id); const id = computed(() => +route.query.id);
// //
const getList = async (first: any) => { const getList = async (first: any) => {
loading.value = true; if (!Cookies.get('sand-submit')) {
try { loading.value = true;
const { data } = await insuranceList({ try {
...getIds(), const { data } = await insuranceList({
pageNum: 1, ...getIds(),
pageSize: 1000, pageNum: 1,
insuranceName: route.query.name ?? '', pageSize: 1000,
createDateSort: route.query.createDateSort ?? '', insuranceName: route.query.name ?? '',
insuranceType: route.query.insuranceType ?? '', createDateSort: route.query.createDateSort ?? '',
}); insuranceType: route.query.insuranceType ?? '',
list.value = data.records; });
first && list.value.length && switchProduct(list.value[0].insuranceId); list.value = data.records;
} finally { first && list.value.length && switchProduct(list.value[0].insuranceId);
loading.value = false; } finally {
loading.value = false;
}
} }
}; };
onMounted(() => { onMounted(() => {

@ -28,9 +28,10 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue'; import { ref, computed, watch } from 'vue';
import { insuranceProductDetails } from '@/api/insurance'; import { insuranceProductDetails } from '@/api/insurance';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
@ -39,7 +40,7 @@ const info = ref<Record<string, any>>({});
// //
const getDetail = async () => { const getDetail = async () => {
if (id.value) { if (id.value && !Cookies.get('sand-submit')) {
try { try {
const { data } = await insuranceProductDetails(id.value); const { data } = await insuranceProductDetails(id.value);
info.value = data; info.value = data;

@ -104,13 +104,15 @@ const loading = ref<boolean>(false);
const stop = () => {}; const stop = () => {};
// //
const getList = async () => { const getList = async () => {
loading.value = true; if (!Cookies.get('sand-submit')) {
try { loading.value = true;
const { data } = await insuranceList({ pageNum: currentPage.value, pageSize: pageSize.value, ...toParams(params) }); try {
list.value = data.records; const { data } = await insuranceList({ pageNum: currentPage.value, pageSize: pageSize.value, ...toParams(params) });
total.value = data.total; list.value = data.records;
} finally { total.value = data.total;
loading.value = false; } finally {
loading.value = false;
}
} }
}; };
// //

@ -143,7 +143,7 @@ import { ref, onMounted } from 'vue';
import { logout } from '@/store/useCurrentUser'; import { logout } from '@/store/useCurrentUser';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { useRouter, useRoute } from 'vue-router'; import { useRouter } from 'vue-router';
import { reportDetail, exportBankExperimentReport, updateReport, editExperimentalData } from '@/api/system'; import { reportDetail, exportBankExperimentReport, updateReport, editExperimentalData } from '@/api/system';
import Tinymce from '@/components/Tinymce/index.vue'; import Tinymce from '@/components/Tinymce/index.vue';
import { downloadFileDirect } from '@/utils/common'; import { downloadFileDirect } from '@/utils/common';
@ -252,7 +252,7 @@ const editReport = async () => {
}; };
// //
const toLevel = () => { const toLevel = () => {
router.push('/'); router.replace('/');
}; };
onMounted(getData); onMounted(getData);

Loading…
Cancel
Save