Răsfoiți Sursa

Merge branch 'ch/bug7297' of eta_forum/eta_forum_admin_front into master

leichen 2 luni în urmă
părinte
comite
612b5bb7ba

+ 1 - 1
src/views/business_manage/businessList.vue

@@ -129,7 +129,7 @@
         </t-table>
         <div style="margin-top: 20px">
           <t-pagination
-            :current-page="page"
+            :current="page"
             :page-size="pageSize"
             :total="total"
             :showPageSize="false"

+ 17 - 7
src/views/etaTrial/config.js

@@ -20,33 +20,41 @@ export const etaTrialColumn = [
   },{
     colKey:'Expiration',
     title:'账号到期时长',
-    minWidth:'80'
+    minWidth:'80',
+    sorter: true
   },{
     colKey:'ModifyTime',
     title:'账号更新时间',
-    minWidth:'120'
+    minWidth:'120',
+    sorter: true
   },{
     colKey:'LastLoginTime',
     title:'最近一次登录时间',
-    minWidth:'120'
+    minWidth:'120',
+    sorter: true
   },{
     colKey:'LastLoginDuration',
     title:'最近一次登录时长',
+    sorter: true
   },{
     colKey:'LoginNum',
     title:'累计登录次数',
+    sorter: true
   },{
     colKey:'ActiveTime',
     title:'累计活跃时长',
+    sorter: true
   },{
     colKey:'IndexNum',
     title:'累计添加指标',
-    minWidth:'80'
+    minWidth:'80',
+    sorter: true
   },
   {
     colKey:'ChartNum',
     title:'累计添加图表',
-    minWidth:'80'
+    minWidth:'80',
+    sorter: true
   },
   {
     colKey:'InterestModule',
@@ -127,11 +135,13 @@ export const approvedList=[
   },{
     colKey:'Expiration',
     title:'账号到期时长',
-    minWidth:'80'
+    minWidth:'80',
+    sorter: true
   },{
     colKey:'ModifyTime',
     title:'更新时间',
-    minWidth:'80'
+    minWidth:'80',
+    sorter: true
   },
   {
     align: 'center', colKey: 'opt', title: '操作'

+ 29 - 56
src/views/etaTrial/etaTrialList.vue

@@ -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;

+ 1 - 1
src/views/training/labelManage.vue

@@ -18,7 +18,7 @@
             </t-table>
             <t-pagination
                 background
-                :current-page="currentPage"
+                :current="currentPage"
                 @current-change="handleCurrentChange"
                 :page-size="pageSize" 
                 :showPageSize="false"

+ 2 - 2
src/views/training/videoManage.vue

@@ -79,7 +79,7 @@
             </t-table>
             <t-pagination
                 background
-                :current-page="currentPage"
+                :current="currentPage"
                 @current-change="handleCurrentChange"
                 :showPageSize="false"
                 :total="total"
@@ -243,7 +243,7 @@ const publishVideo = async (data) => {
     const hint = data.PublishState === 0 ? '是否确认发布' : '是否取消发布';
     await  $confirmDialog({
         body: hint,
-        confirmBtn:{default:'确认',theme:'danger'},
+        confirmBtn:{default:'确认',theme:'primary'},
     })
     try {
       const res = await VideoInterface.publishVideo({