zmq il y a 1 an
Parent
commit
15b579ede4

+ 0 - 114
src/views/admin/projectlink/components/link.vue

@@ -1,114 +0,0 @@
-<template>    
-    <el-dialog v-model="state.showDialog" destroy-on-close :title="title" draggable :close-on-click-modal="false"
-        :close-on-press-escape="false" width="769px">
-        <div class="my-layout">            
-            <el-card class="mt8" shadow="never" :body-style="{ paddingBottom: '0' }">
-                <el-form :inline="true" @submit.stop.prevent>
-                    <el-form-item>
-                            <!-- <el-select lable="选择项目" v-model="state.filter.projectId" value-key="id" clearable >                                         
-                                <el-option v-for="item in state.uploadProjectList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
-                            </el-select> -->
-                        </el-form-item>
-                    <el-form-item label="推广码来源">
-                    <el-input v-model="state.filter.keywords" placeholder="请输入推广码来源" />
-                    </el-form-item>
-                    <el-form-item>
-                    <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>          
-                    </el-form-item>
-                </el-form>
-            </el-card>
-            <el-card class="my-fill mt8" shadow="never">
-                <el-table v-loading="state.loading" :data="state.projectLinkListData" row-key="id" height="'100%'" style="width: 100%; height: 100%">
-                    <el-table-column label="项目名称" prop="projectName" min-width="120" show-overflow-tooltip/>
-                    <el-table-column label="推广码来源" prop="company" min-width="120" show-overflow-tooltip/>
-                    <el-table-column label="推广码数量(已使用/总数" prop="projectName" min-width="120" show-overflow-tooltip>
-                            <template #default="{ row }">
-                            {{ row.useCount }}/{{ row.count }}
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="操作" width="180" header-align="center" align="center" fixed="right">
-                    <!-- <template #default="{ row }">                
-                    <el-button size="small" text type="primary" @click="onEdit(row)">查看明细</el-button>                
-                    <el-button size="small" text type="primary" @click="onEdit(row)">补充推广码</el-button>                
-                    </template> -->
-                </el-table-column>
-                </el-table>
-            </el-card>
-        </div> 
-        <template #footer>
-            <span class="dialog-footer">
-                <el-button @click="onCancel" size="default">关 闭</el-button>                    
-            </span>
-        </template>
-    </el-dialog>
-    
-</template>
-
-<script lang="ts" setup name="admin/projectlink/link">
-import { reactive } from 'vue'
-import { PageInputProjectLinkGetPageDto, ProjectLinkListOutput } from '/@/api/admin/data-contracts'
-import { ProjectLinkApi } from '/@/api/admin/ProjectLink'
-// import eventBus from '/@/utils/mitt'
-
-
-defineProps({
-    title: {
-        type: String,
-        default: '',
-    },
-})
-
-
-const state = reactive({
-    showDialog: false,
-    loading:false,
-    projectName:"",
-    filter: {
-        projectId: 0,        
-        isUse: 0,
-        tenantId: 0,
-        keywords: ''
-    }, pageInput: {
-        currentPage: 1,
-        pageSize: 20,
-    } as PageInputProjectLinkGetPageDto,
-    total: 0,
-    projectLinkListData: [] as Array<ProjectLinkListOutput>,
-})
-//  const { from } = toRefs(state)
-
-
-// 打开对话框
-const open = async (row: any = {}) => {
-    state.showDialog = true;
-    // console.log("aaaaa");
-    state.filter.projectId = row.id;
-    state.projectName = row.projectName;
-
-    
-    onQuery();
-        
-}
-//查询
-const onQuery = async () => {
-    state.loading = true
-    
-    state.pageInput.filter = state.filter
-    const res = await new ProjectLinkApi().getPage(state.pageInput).catch(() => {
-        state.loading = false
-    })
-    state.projectLinkListData = res?.data?.list ?? []
-    state.total = res?.data?.total ?? 0
-    state.loading = false
-}
-// 取消
-const onCancel = () => {
-    state.showDialog = false
-}
-
-
-
-defineExpose({
-    open,
-})
-</script>

+ 20 - 4
src/views/admin/projectlink/components/linktest.vue

@@ -19,7 +19,8 @@
                         <el-table-column label="所属平台" prop="orgName" min-width="120" show-overflow-tooltip/>
                         <el-table-column label="编号" prop="num" min-width="120" show-overflow-tooltip/>
                         <el-table-column label="二维码" prop="qrcodeUrl" min-width="120" show-overflow-tooltip/>
-                        <el-table-column label="查单码" prop="company" min-width="120" show-overflow-tooltip/>
+                        <el-table-column label="短链" prop="shortUrl" min-width="120" show-overflow-tooltip/>
+                        <el-table-column label="查单码" prop="queryUrl" min-width="120" show-overflow-tooltip/>
                         <el-table-column label="口令" prop="shareCommand" min-width="120" show-overflow-tooltip/>
                         <el-table-column label="申请时间" min-width="120" show-overflow-tooltip>
                             <template #default="{ row }">                                
@@ -29,8 +30,14 @@
                         <el-table-column label="姓名" prop="salesman" min-width="120" show-overflow-tooltip/>
                         <el-table-column label="手机号" prop="salesmanPhone" min-width="120" show-overflow-tooltip/>
                         <el-table-column label="备注" prop="salesmanRemark" min-width="120" show-overflow-tooltip/>                        
-                    </el-table>
-                </el-card>
+                    </el-table>                    
+                    <div class="my-flex my-flex-end" style="margin-top: 20px">
+                        <el-pagination v-model:currentPage="state.pageInput.currentPage"
+                            v-model:page-size="state.pageInput.pageSize" :total="state.total" :page-sizes="[10, 20, 50, 100]" small
+                            background @size-change="onSizeChange" @current-change="onCurrentChange"
+                            layout="total, sizes, prev, pager, next, jumper" />
+                    </div>
+                </el-card>                
             </div>        
         </el-dialog>
     </div>
@@ -68,7 +75,7 @@ const state = reactive({
         keywords: ''
     }, pageInput: {
         currentPage: 1,
-        pageSize: 20,
+        pageSize: 10,
     } as PageInputProjectLinkGetPageDto,
     total: 0, 
     projectLinkListData: [] as Array<ProjectLinkListOutput>,
@@ -106,6 +113,15 @@ const initQrcode = (text:string) => {
         colorLight: '#ffffff',
     })
 }
+const onSizeChange = (val: number) => {
+    state.pageInput.pageSize = val
+    onQuery()
+}
+
+const onCurrentChange = (val: number) => {
+    state.pageInput.currentPage = val
+    onQuery()
+}
 
 defineExpose({
     open,

+ 18 - 2
src/views/admin/projectlink/index.vue

@@ -58,8 +58,15 @@
               </template>
             </el-table-column>
             </el-table>
+            <div class="my-flex my-flex-end" style="margin-top: 20px">
+                <el-pagination v-model:currentPage="state.pageInput.currentPage"
+                    v-model:page-size="state.pageInput.pageSize" :total="state.total" :page-sizes="[10, 20, 50, 100]" small
+                    background @size-change="onSizeChange" @current-change="onCurrentChange"
+                    layout="total, sizes, prev, pager, next, jumper" />
+            </div>
         </el-card>
 
+        
         <!-- <LinkForm ref="LinkFormRef" :title="state.linkFormTitle"></LinkForm> -->
         <tenant-form ref="tenantFormRef" :title="state.tenantFormTitle"></tenant-form>
    </div> 
@@ -191,12 +198,21 @@ const OnUploadLinkBefore = () => {
     state.token = storesUserInfo.getToken()
     state.LinkLoading = true    
 }
-const onDetail = (row: ProjectLinkManagePageOutput) => {
-    state.tenantFormTitle = 'mingxi'
+const onDetail = (row: ProjectLinkManagePageOutput) => {    
+    state.tenantFormTitle = `【${row.projectName}】推广明细`
     tenantFormRef.value.open(row)
 
     // state.linkFormTitle = '明细'
     // linkFormRef.value.open(row)
 }
+const onSizeChange = (val: number) => {
+    state.pageInput.pageSize = val
+    onQuery()
+}
+
+const onCurrentChange = (val: number) => {
+    state.pageInput.currentPage = val
+    onQuery()
+}
 
 </script>

+ 16 - 1
src/views/admin/projectstat/index.vue

@@ -81,7 +81,14 @@
           </template>
         </el-table-column> -->
       </el-table>
-    </el-card>    
+      <div class="my-flex my-flex-end" style="margin-top: 20px">
+          <el-pagination v-model:currentPage="state.pageInput.currentPage"
+              v-model:page-size="state.pageInput.pageSize" :total="state.total" :page-sizes="[10, 20, 50, 100]" small
+              background @size-change="onSizeChange" @current-change="onCurrentChange"
+              layout="total, sizes, prev, pager, next, jumper" />
+      </div>    
+    </el-card>
+    
   </div>
 </template>
 <script lang="ts" setup name="admin/projectlink">
@@ -248,5 +255,13 @@ const onDownExcel = () => {
   let url = import.meta.env.VITE_API_URL + '/stat/项目统计模板.xlsx'
   window.open(url, '_self');
 }
+const onSizeChange = (val: number) => {
+  state.pageInput.pageSize = val
+  onQuery()
+}
 
+const onCurrentChange = (val: number) => {
+  state.pageInput.currentPage = val
+  onQuery()
+}
 </script>