|
@@ -2,38 +2,14 @@
|
|
|
<!-- ETA试用列表+审批列表 -->
|
|
|
<div class="eta-trial-list">
|
|
|
<div class="table-select">
|
|
|
- <div class="btn-list">
|
|
|
- <template v-if="false">
|
|
|
- <!-- !Role.includes('admin') -->
|
|
|
- <!-- 管理员-ETA试用列表 -->
|
|
|
- <template v-if="currentPath === '/etaTrial/etaTrialList'">
|
|
|
- <t-button @click="changePath('/etaTrial/etaApprovalList')">审批列表</t-button>
|
|
|
- <div class="approval-hint" v-if="approvalNum">
|
|
|
- ·{{ approvalNum }}条申请记录待审批
|
|
|
- </div>
|
|
|
- <t-button type="primary" @click="toQuestionnaireSurvey" style="margin-left: 30px;">问卷调研</t-button>
|
|
|
- </template>
|
|
|
- <!-- 管理员-审批列表 -->
|
|
|
- <template v-if="currentPath === '/etaTrial/etaApprovalList'">
|
|
|
- <t-select v-model="approvalState" placeholder="请选择" @change="selectHandle">
|
|
|
- <t-option
|
|
|
- v-for="item in approvalStateArr"
|
|
|
- :key="item.key"
|
|
|
- :label="item.label"
|
|
|
- :value="item.key"
|
|
|
- ></t-option>
|
|
|
- </t-select>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <!-- 非管理员-ETA试用列表 -->
|
|
|
+ <div class="btn-list" :class="currentPath === '/etaTrial/etaTrialList' ? 'align-center' : ''">
|
|
|
+ <!-- ETA试用列表 -->
|
|
|
<template v-if="currentPath === '/etaTrial/etaTrialList'">
|
|
|
<t-button @click="changePath('/etaTrial/etaAddApproval')">新增试用客户</t-button>
|
|
|
<t-button plain @click="changePath('/etaTrial/etaApprovalList')" style="margin-left: 30px;">客户管理</t-button>
|
|
|
- <!-- <t-button type="primary" @click="toQuestionnaireSurvey" style="margin-left: 30px;">问卷调研</t-button> -->
|
|
|
- <t-checkbox v-model="onlyMine" @change="onlyMineChange" style="margin-left: 30px;">我申请的</t-checkbox>
|
|
|
+ <t-checkbox v-model="onlyMine" @change="onlyMineChange" style="margin-left: 30px; line-height: 40px;">我申请的</t-checkbox>
|
|
|
</template>
|
|
|
- <!-- 非管理员-我的审批+账号列表 -->
|
|
|
+ <!-- 客户列表 -->
|
|
|
<template v-if="currentPath === '/etaTrial/etaApprovalList'">
|
|
|
<div class="tips">*账号用于登录ETA试用平台:https://exptest.hzinsights.com/</div>
|
|
|
<div class="right-header">
|
|
@@ -41,7 +17,6 @@
|
|
|
<t-checkbox :indeterminate="indeterminate" v-model="checkAll" @change="handleClickCheckAll" style="margin-left: 40px;">列表全选</t-checkbox>
|
|
|
</div>
|
|
|
</template>
|
|
|
- </template>
|
|
|
</div>
|
|
|
<div class="search-wrap">
|
|
|
<template v-if="currentPath === '/etaTrial/etaApprovalList'">
|
|
@@ -62,7 +37,7 @@
|
|
|
<t-table
|
|
|
:data="tableData"
|
|
|
v-model:selectedRowKeys="selectedRowKeys"
|
|
|
- @sort-change="tableSelectChange"
|
|
|
+ @sort-change="sortChangeHandle"
|
|
|
@select-change="tableSelectChange"
|
|
|
:columns="columnList"
|
|
|
ref="dataRef"
|
|
@@ -86,20 +61,11 @@
|
|
|
<t-button variant="text" theme="primary" @click="Move(row)">移动</t-button>
|
|
|
<t-button variant="text" theme="primary" v-if="row.Enabled === 0" @click="handleOperate('active', row)">申请启用</t-button>
|
|
|
</div>
|
|
|
- <!-- 非管理员-我的审批操作: 撤回,重新申请,删除,驳回理由-->
|
|
|
- <div v-if="!Role.includes('admin') && listType === 'all'">
|
|
|
- <t-button variant="text" theme="primary" size="small" v-if="ApprovalStatus[row.ApprovalStatus] === 0" @click="handleOperate('withdraw', row)">撤回</t-button>
|
|
|
- <t-button variant="text" theme="primary" size="small" v-if="ApprovalStatus[row.ApprovalStatus] >= 2" @click="handleOperate('apply', row)">重新申请</t-button>
|
|
|
- <t-button variant="text" theme="primary" size="small" v-if="ApprovalStatus[row.ApprovalStatus] === 3" @click="handleOperate('checkReplay', row)">驳回理由</t-button>
|
|
|
- <t-button variant="text" theme="primary" size="small" v-if="ApprovalStatus[row.ApprovalStatus] === 2" class="color-hint" @click="handleOperate('delete', row)">删除</t-button>
|
|
|
- <!-- 已审批通过的:查看密码 -->
|
|
|
- <t-button variant="text" theme="primary" size="small" v-if="ApprovalStatus[row.ApprovalStatus] === 1" @click="handleOperate('showDetail', row)">账号密码</t-button>
|
|
|
- </div>
|
|
|
</template>
|
|
|
</t-table>
|
|
|
<t-pagination
|
|
|
background
|
|
|
- :current-page="currentPage"
|
|
|
+ :current="currentPage"
|
|
|
@current-change="handleCurrentChange"
|
|
|
:page-size="pageSize"
|
|
|
:showPageSize="false"
|
|
@@ -227,14 +193,14 @@ watch(() => route.path,(newVal) => {
|
|
|
getTableData();
|
|
|
}
|
|
|
);
|
|
|
-watch( listType, (val) => {
|
|
|
- currentPage.value = 1;
|
|
|
- SortParam.value = '';
|
|
|
- SortType.value = '';
|
|
|
- approvalState.value = 2;
|
|
|
- searchText.value = '';
|
|
|
- getTableData();
|
|
|
-});
|
|
|
+// watch( listType, (val) => {
|
|
|
+// currentPage.value = 1;
|
|
|
+// SortParam.value = '';
|
|
|
+// SortType.value = '';
|
|
|
+// approvalState.value = 2;
|
|
|
+// searchText.value = '';
|
|
|
+// getTableData();
|
|
|
+// });
|
|
|
|
|
|
// 方法
|
|
|
const getSalesArr = async () => {
|
|
@@ -269,7 +235,7 @@ const getTableData = async (type) => {
|
|
|
});
|
|
|
if (res.Ret !== 200) return;
|
|
|
const { List, Paging, ApprovalNum } = res.Data;
|
|
|
- AlltableData.value = [...List, ...AlltableData.value]
|
|
|
+ AlltableData.value = [...List || [], ...AlltableData.value]
|
|
|
tableData.value = List || [];
|
|
|
total.value = Paging.Totals;
|
|
|
approvalNum.value = ApprovalNum || 0;
|
|
@@ -286,9 +252,16 @@ const getTableData = async (type) => {
|
|
|
};
|
|
|
|
|
|
|
|
|
-const sortChangeHandle = ({ prop, order }) => {
|
|
|
- SortParam.value = prop;
|
|
|
- SortType.value = order === 'ascending' ? 'asc' : 'desc';
|
|
|
+const sortChangeHandle = (params) => {
|
|
|
+
|
|
|
+ if (params) {
|
|
|
+ SortParam.value = params.sortBy
|
|
|
+ SortType.value = params.descending === true ? 'desc' : 'asc' ;
|
|
|
+ } else {
|
|
|
+ SortParam.value = 0
|
|
|
+ SortType.value = 0
|
|
|
+ }
|
|
|
+
|
|
|
currentPage.value = 1;
|
|
|
getTableData();
|
|
|
};
|
|
@@ -315,10 +288,6 @@ const changePath = (path) => {
|
|
|
router.push(path);
|
|
|
};
|
|
|
|
|
|
-const toQuestionnaireSurvey = () => {
|
|
|
- router.push('/questionnaireSurvey');
|
|
|
-};
|
|
|
-
|
|
|
const handleCurrentChange = (pageNo) => {
|
|
|
currentPage.value = pageNo;
|
|
|
getTableData();
|
|
@@ -571,6 +540,10 @@ onMounted(() => {
|
|
|
margin-top: 40px;
|
|
|
}
|
|
|
}
|
|
|
+ .align-center {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
.search-wrap{
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|