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

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 = () => {
router.push('/report');
router.replace('/report');
};
//
let reload = async () => {

@ -371,37 +371,39 @@ const getConfig = async () => {
};
//
const getDetail = async () => {
if (!route.query.show) curTab.value = 'tab1';
userName.value = await getUsername();
info.value = null;
if (id.value) {
try {
// name
const { data } = await findById(id.value);
info.value = data;
// id
const res = await elementDetail(id.value);
if (res) {
const e = res.data.bankProducts;
e.currentWorkingLife = e.currentWorkingLife.split(',').map((n) => +n);
e.educationalRequirements = e.educationalRequirements.split(',').map((n) => +n);
e.modeRepayment = e.modeRepayment.split(',').map((n) => +n);
e.whetherToSupportEarlyRepayment = !!e.whetherToSupportEarlyRepayment;
e.bankGuaranteeTypeIds = [];
if (e.bankGuaranteeAllocationList) {
e.bankGuaranteeAllocationList.map((n) => {
n.guaranteeTypeId && e.bankGuaranteeTypeIds.push(n.guaranteeTypeId);
});
}
for (const i in e) {
if (e.hasOwnProperty(i)) {
form[i] = e[i];
if (!Cookies.get('sand-submit')) {
if (!route.query.show) curTab.value = 'tab1';
userName.value = await getUsername();
info.value = null;
if (id.value) {
try {
// name
const { data } = await findById(id.value);
info.value = data;
// id
const res = await elementDetail(id.value);
if (res) {
const e = res.data.bankProducts;
e.currentWorkingLife = e.currentWorkingLife.split(',').map((n) => +n);
e.educationalRequirements = e.educationalRequirements.split(',').map((n) => +n);
e.modeRepayment = e.modeRepayment.split(',').map((n) => +n);
e.whetherToSupportEarlyRepayment = !!e.whetherToSupportEarlyRepayment;
e.bankGuaranteeTypeIds = [];
if (e.bankGuaranteeAllocationList) {
e.bankGuaranteeAllocationList.map((n) => {
n.guaranteeTypeId && e.bankGuaranteeTypeIds.push(n.guaranteeTypeId);
});
}
for (const i in e) {
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 { getStatus } from '@/store/useProduct';
import { getIds } from '@/utils/common';
import Cookies from 'js-cookie';
import Config from './Config.vue';
import Detail from './Detail.vue';
import Add from './Add.vue';
@ -63,23 +64,25 @@ const id = computed(() => +route.query.id);
const actionKey = ref<number>(1);
//
const getList = async (refresh?: number) => {
loading.value = true;
try {
const { data } = await bankingProductsList({
...getIds(),
pageNum: 1,
pageSize: 1000,
productType: productType.value,
roleId: route.query.role,
keyWord: route.query.name ?? '',
createDateSort: route.query.createDateSort ?? '',
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);
} finally {
loading.value = false;
if (!Cookies.get('sand-submit')) {
loading.value = true;
try {
const { data } = await bankingProductsList({
...getIds(),
pageNum: 1,
pageSize: 1000,
productType: productType.value,
roleId: route.query.role,
keyWord: route.query.name ?? '',
createDateSort: route.query.createDateSort ?? '',
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);
} finally {
loading.value = false;
}
}
};
onMounted(getList);

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

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

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

@ -207,7 +207,7 @@
</template>
<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 { Plus, Minus } from '@element-plus/icons-vue';
import { getAListOfAShares, saveFund } from '@/api/fund';
@ -461,7 +461,9 @@ const submit = async () => {
}
};
onMounted(() => {
getConfig();
if (!Cookies.get('sand-submit')) {
getConfig();
}
});
</script>

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

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

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

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

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

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

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

@ -143,7 +143,7 @@ import { ref, onMounted } from 'vue';
import { logout } from '@/store/useCurrentUser';
import { ElMessage } from 'element-plus';
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 Tinymce from '@/components/Tinymce/index.vue';
import { downloadFileDirect } from '@/utils/common';
@ -252,7 +252,7 @@ const editReport = async () => {
};
//
const toLevel = () => {
router.push('/');
router.replace('/');
};
onMounted(getData);

Loading…
Cancel
Save