|
@@ -6,14 +6,36 @@
|
|
|
<div class="table-box">
|
|
<div class="table-box">
|
|
|
<pageSearch
|
|
<pageSearch
|
|
|
ref="searchTableRef"
|
|
ref="searchTableRef"
|
|
|
- :searchConfig="activeTab === 'industry' ? searchConfig : searchNonIndustryConfig"
|
|
|
|
|
|
|
+ :searchConfig="activeTab === '1' ? searchConfig : searchNonIndustryConfig"
|
|
|
/>
|
|
/>
|
|
|
<pageContent
|
|
<pageContent
|
|
|
ref="tableListRef"
|
|
ref="tableListRef"
|
|
|
:total="total"
|
|
:total="total"
|
|
|
- :contentConfig="activeTab === 'industry' ? contentConfig : contentNonIndustryConfig"
|
|
|
|
|
|
|
+ :contentConfig="activeTab === '1' ? contentConfig : contentNonIndustryConfig"
|
|
|
:pageList="tableData"
|
|
:pageList="tableData"
|
|
|
>
|
|
>
|
|
|
|
|
+ <!-- 短信接收人 -->
|
|
|
|
|
+ <template #msgRecipient="scope">
|
|
|
|
|
+ <template :index="index" v-for="(item, index) in bj_msg_recipient">
|
|
|
|
|
+ <el-tag
|
|
|
|
|
+ :index="index"
|
|
|
|
|
+ v-if="item.value == scope.row.msgRecipient"
|
|
|
|
|
+ :type="scope.row.msgRecipient == '1' ? 'success' : 'danger'"
|
|
|
|
|
+ >{{ item.label }}</el-tag
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 通讯录状态 -->
|
|
|
|
|
+ <template #abStatus="scope">
|
|
|
|
|
+ <template :index="index" v-for="(item, index) in bj_ab_status">
|
|
|
|
|
+ <el-tag
|
|
|
|
|
+ :index="index"
|
|
|
|
|
+ v-if="item.value == scope.row.abStatus"
|
|
|
|
|
+ :type="scope.row.abStatus == '1' ? 'success' : 'danger'"
|
|
|
|
|
+ >{{ item.label }}</el-tag
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
<template #button>
|
|
<template #button>
|
|
|
<el-button type="primary" @click="onImport()">导入</el-button>
|
|
<el-button type="primary" @click="onImport()">导入</el-button>
|
|
|
<el-button type="primary" @click="onImport()">下载模版</el-button>
|
|
<el-button type="primary" @click="onImport()">下载模版</el-button>
|
|
@@ -32,7 +54,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
</el-tabs>
|
|
|
- <pageDetail :modalConfig="activeTab === 'industry' ? detailConfig : detailNonIndustryConfig" ref="modalRef">
|
|
|
|
|
|
|
+ <pageDetail :modalConfig="activeTab === '1' ? detailConfig : detailNonIndustryConfig" ref="modalRef">
|
|
|
</pageDetail>
|
|
</pageDetail>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -49,9 +71,16 @@ import pageDetail from './components/detail.vue';
|
|
|
import useSystemStore from '@/store/main';
|
|
import useSystemStore from '@/store/main';
|
|
|
import TreeSelect from './components/treeSelect.vue';
|
|
import TreeSelect from './components/treeSelect.vue';
|
|
|
import { type TabsPaneContext } from 'element-plus';
|
|
import { type TabsPaneContext } from 'element-plus';
|
|
|
|
|
+import { outTypeList } from '@/libs/commonMeth';
|
|
|
|
|
+
|
|
|
|
|
+const bj_msg_recipient = outTypeList('bj_msg_recipient'); //短信接收人
|
|
|
|
|
+const bj_ab_status: any = outTypeList('bj_ab_status'); //通讯录状态
|
|
|
// 使用pinia数据
|
|
// 使用pinia数据
|
|
|
const systemStore = useSystemStore();
|
|
const systemStore = useSystemStore();
|
|
|
-const { pageDetailInfo } = storeToRefs(systemStore);
|
|
|
|
|
|
|
+const { pageDetailInfo, searchObj } = storeToRefs(systemStore);
|
|
|
|
|
+watch(searchObj, newval => {
|
|
|
|
|
+ console.log('=====' + JSON.stringify(newval));
|
|
|
|
|
+});
|
|
|
|
|
|
|
|
const total = ref(0);
|
|
const total = ref(0);
|
|
|
const pageSize = ref([10, 20, 30]);
|
|
const pageSize = ref([10, 20, 30]);
|
|
@@ -60,7 +89,7 @@ const tableListRef = ref<InstanceType<typeof pageContent>>();
|
|
|
|
|
|
|
|
const tabs = reactive([
|
|
const tabs = reactive([
|
|
|
{
|
|
{
|
|
|
- key: 'industry',
|
|
|
|
|
|
|
+ key: '1',
|
|
|
label: '行业内联络员',
|
|
label: '行业内联络员',
|
|
|
total: 0,
|
|
total: 0,
|
|
|
tableData: [],
|
|
tableData: [],
|
|
@@ -68,7 +97,7 @@ const tabs = reactive([
|
|
|
showDetail: true,
|
|
showDetail: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- key: 'nonIndustry',
|
|
|
|
|
|
|
+ key: '2',
|
|
|
label: '行业外联络员',
|
|
label: '行业外联络员',
|
|
|
total: 0,
|
|
total: 0,
|
|
|
tableData: [],
|
|
tableData: [],
|
|
@@ -77,7 +106,7 @@ const tabs = reactive([
|
|
|
},
|
|
},
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
-const activeTab = ref('industry');
|
|
|
|
|
|
|
+const activeTab = ref('1');
|
|
|
|
|
|
|
|
// 操作弹框
|
|
// 操作弹框
|
|
|
import usePageModal from '@/components/components/hooks/usePageDetails';
|
|
import usePageModal from '@/components/components/hooks/usePageDetails';
|
|
@@ -85,22 +114,23 @@ const { modalRef, handleNewDataClick, handleEditDataClick, handleCheckDataClick,
|
|
|
usePageModal();
|
|
usePageModal();
|
|
|
|
|
|
|
|
const getTreeCheck = async data => {
|
|
const getTreeCheck = async data => {
|
|
|
- // console.log(await tableListRef.value);
|
|
|
|
|
- // console.log(data);
|
|
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ // console.log(searchObj);
|
|
|
if (tableListRef.value) {
|
|
if (tableListRef.value) {
|
|
|
- if (activeTab.value == 'industry') {
|
|
|
|
|
- searchConfig.pageListParams.deptIds = data.join();
|
|
|
|
|
- } else {
|
|
|
|
|
- searchNonIndustryConfig.pageListParams.deptIds = data.join();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- await tableListRef.value[0].fetchPageListData({ deptIds: data.join() });
|
|
|
|
|
|
|
+ // if (activeTab.value == '1') {
|
|
|
|
|
+ // console.log(data.join());
|
|
|
|
|
+ // searchConfig.pageListParams.belongsDept = data.join();
|
|
|
|
|
+ // console.log(searchConfig);
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // searchNonIndustryConfig.pageListParams.belongsDept = data.join();
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ await tableListRef.value[0].fetchPageListData({ belongsDept: data.join() });
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
const treeSelectdRef = ref<InstanceType<typeof TreeSelect>>();
|
|
const treeSelectdRef = ref<InstanceType<typeof TreeSelect>>();
|
|
|
const searchTableRef = ref<InstanceType<typeof pageSearch>>();
|
|
const searchTableRef = ref<InstanceType<typeof pageSearch>>();
|
|
|
const handleClick = async (tab: TabsPaneContext) => {
|
|
const handleClick = async (tab: TabsPaneContext) => {
|
|
|
- console.log(tab.props.name);
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
if (treeSelectdRef.value) {
|
|
if (treeSelectdRef.value) {
|
|
|
treeSelectdRef.value[0].handleReset(false);
|
|
treeSelectdRef.value[0].handleReset(false);
|
|
@@ -154,11 +184,19 @@ function onDelete(value: any) {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 筛选-状态赋值
|
|
|
|
|
|
|
+// 筛选-状态赋值 bj_notification_status
|
|
|
async function searchItem() {
|
|
async function searchItem() {
|
|
|
searchConfig.formItems.forEach(item => {
|
|
searchConfig.formItems.forEach(item => {
|
|
|
- if (item.prop === 'status') {
|
|
|
|
|
- // item.options = searchList.value;
|
|
|
|
|
|
|
+ if (item.prop === 'msgRecipient') {
|
|
|
|
|
+ item.options = bj_msg_recipient;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.prop === 'abStatus') {
|
|
|
|
|
+ item.options = bj_ab_status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ searchNonIndustryConfig.formItems.forEach(item => {
|
|
|
|
|
+ if (item.prop === 'abStatus') {
|
|
|
|
|
+ item.options = bj_ab_status;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|