|
|
@@ -1,89 +1,80 @@
|
|
|
<template>
|
|
|
- <!-- 客户信息: 停用 -->
|
|
|
- <div class="custom-normal"
|
|
|
- :loading="loading">
|
|
|
- <filterCustomTable @search="search">
|
|
|
- <a-button class="operBtn"
|
|
|
- v-if="hasPermission('custom_info_btn_add')"
|
|
|
- @click="addAction">新增</a-button>
|
|
|
- </filterCustomTable>
|
|
|
- <contextMenu :contextMenuList="contextMenuList"
|
|
|
- :tableList="customList">
|
|
|
- <a-table :columns="columns"
|
|
|
- class="topTable"
|
|
|
- :pagination="false"
|
|
|
- rowKey="key"
|
|
|
- :data-source="customList">
|
|
|
- <template #userinfotype="{ text }">
|
|
|
- <a>{{ text === '2' ? '企业' : '个人' }}</a>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- </contextMenu>
|
|
|
- <!-- 新增 -->
|
|
|
- <AddCustom />
|
|
|
- <!-- 详情 -->
|
|
|
- <CustomDetail />
|
|
|
- <!-- 删除 -->
|
|
|
- <DeleteCustom />
|
|
|
- <!-- 恢复客户资料 -->@/common/methods
|
|
|
- <RecoverCustom />
|
|
|
- </div>
|
|
|
+ <!-- 客户信息: 停用 -->
|
|
|
+ <div class="custom-normal" :loading="loading">
|
|
|
+ <filterCustomTable @search="search">
|
|
|
+ <a-button class="operBtn" v-if="hasPermission('custom_info_btn_add')" @click="addAction">新增</a-button>
|
|
|
+ </filterCustomTable>
|
|
|
+ <contextMenu :contextMenuList="contextMenuList" :tableList="customList">
|
|
|
+ <a-table :columns="columns" class="topTable" :pagination="false" rowKey="key" :data-source="customList">
|
|
|
+ <template #userinfotype="{ text }">
|
|
|
+ <a>{{ text === '2' ? '企业' : '个人' }}</a>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ </contextMenu>
|
|
|
+ <!-- 新增 -->
|
|
|
+ <AddCustom />
|
|
|
+ <!-- 详情 -->
|
|
|
+ <CustomDetail />
|
|
|
+ <!-- 删除 -->
|
|
|
+ <DeleteCustom />
|
|
|
+ <!-- 恢复客户资料 -->@/common/methods
|
|
|
+ <RecoverCustom />
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, onUnmounted, Ref, ref, watchEffect } from 'vue';
|
|
|
+ import { defineComponent, onUnmounted, Ref, ref, watchEffect } from 'vue';
|
|
|
|
|
|
-import { initData } from '@/common/methods/index';
|
|
|
-import filterCustomTable from '@/views/information/custom/compoments/filterTable/index.vue';
|
|
|
-import { MenuItem } from '@/common/components/contextMenu/interface';
|
|
|
-import contextMenu from '@/common/components/contextMenu/index.vue';
|
|
|
-import { getCustomList } from '../setup';
|
|
|
-import { openModal } from '@/common/setup/modal/index';
|
|
|
-import CustomDetail from '@/views/information/custom/compoments/detail/index.vue';
|
|
|
-import DeleteCustom from '@/views/information/custom/compoments/delete/index.vue';
|
|
|
-import RecoverCustom from '@/views/information/custom/compoments/recover/index.vue';
|
|
|
-import AddCustom from '@/views/information/custom/compoments/add/index.vue';
|
|
|
-import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
|
|
|
+ import { initData } from '@/common/methods/index';
|
|
|
+ import filterCustomTable from '@/views/information/custom/compoments/filterTable/index.vue';
|
|
|
+ import { MenuItem } from '@/common/components/contextMenu/interface';
|
|
|
+ import contextMenu from '@/common/components/contextMenu/index.vue';
|
|
|
+ import { getCustomList } from '../setup';
|
|
|
+ import { openModal } from '@/common/setup/modal/index';
|
|
|
+ import CustomDetail from '@/views/information/custom/compoments/detail/index.vue';
|
|
|
+ import DeleteCustom from '@/views/information/custom/compoments/delete/index.vue';
|
|
|
+ import RecoverCustom from '@/views/information/custom/compoments/recover/index.vue';
|
|
|
+ import AddCustom from '@/views/information/custom/compoments/add/index.vue';
|
|
|
+ import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
|
|
|
|
|
|
-export default defineComponent({
|
|
|
- name: 'custom-normal',
|
|
|
- components: {
|
|
|
- filterCustomTable,
|
|
|
- contextMenu,
|
|
|
- CustomDetail,
|
|
|
- DeleteCustom,
|
|
|
- RecoverCustom,
|
|
|
- AddCustom,
|
|
|
- },
|
|
|
- setup() {
|
|
|
- const { customList, actionQuery, columns, getColumns, search, loading } = getCustomList();
|
|
|
- const { hasPermission } = handlePermission('custom_info_normal');
|
|
|
- const contextMenuList = ref<MenuItem[]>([]);
|
|
|
+ export default defineComponent({
|
|
|
+ name: 'custom-normal',
|
|
|
+ components: {
|
|
|
+ filterCustomTable,
|
|
|
+ contextMenu,
|
|
|
+ CustomDetail,
|
|
|
+ DeleteCustom,
|
|
|
+ RecoverCustom,
|
|
|
+ AddCustom,
|
|
|
+ },
|
|
|
+ setup() {
|
|
|
+ const { customList, actionQuery, columns, getColumns, search, loading } = getCustomList();
|
|
|
+ const { hasPermission } = handlePermission('custom_info_normal');
|
|
|
+ const contextMenuList = ref<MenuItem[]>([]);
|
|
|
|
|
|
- const { openAction: addAction } = openModal('addCustomInfo');
|
|
|
+ const { openAction: addAction } = openModal('addCustomInfo');
|
|
|
|
|
|
- detailButton('customDetail', contextMenuList);
|
|
|
- const { action: deleteAction } = permissionButton('deleteCustomInfo', '删除', contextMenuList);
|
|
|
- const { action: recoverAction } = permissionButton('recoverCustomInfo', '恢复', contextMenuList);
|
|
|
+ detailButton('customDetail', contextMenuList);
|
|
|
+ const { action: deleteAction } = permissionButton('deleteCustomInfo', '删除', contextMenuList);
|
|
|
+ const { action: recoverAction } = permissionButton('recoverCustomInfo', '恢复', contextMenuList);
|
|
|
|
|
|
- const stop = watchEffect(() => {
|
|
|
- hasPermission('custom_info_btn_recover') && recoverAction();
|
|
|
- hasPermission('custom_info_btn_delete') && deleteAction();
|
|
|
- });
|
|
|
- onUnmounted(() => {
|
|
|
- stop();
|
|
|
- });
|
|
|
- initData(() => {
|
|
|
- actionQuery(4);
|
|
|
- getColumns();
|
|
|
- });
|
|
|
- return { customList, columns, search, loading, contextMenuList, hasPermission, addAction };
|
|
|
- },
|
|
|
-});
|
|
|
+ const stop = watchEffect(() => {
|
|
|
+ hasPermission('custom_info_btn_recover') && recoverAction();
|
|
|
+ hasPermission('custom_info_btn_delete') && deleteAction();
|
|
|
+ });
|
|
|
+ onUnmounted(() => {
|
|
|
+ stop();
|
|
|
+ });
|
|
|
+ initData(() => {
|
|
|
+ actionQuery(4);
|
|
|
+ getColumns();
|
|
|
+ });
|
|
|
+ return { customList, columns, search, loading, contextMenuList, hasPermission, addAction };
|
|
|
+ },
|
|
|
+ });
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
-.custom-normal {
|
|
|
-}
|
|
|
-</style
|
|
|
+ .custom-normal {
|
|
|
+ }</style
|
|
|
>;
|