From ebfc739bdbbc0dd0fccd0bf47b7d2d5397c3c511 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Fri, 22 Mar 2024 12:44:21 +0800
Subject: [PATCH] 轮播图片

---
 src/views/work/start.vue |   71 ++++++++++++++++++++++-------------
 1 files changed, 45 insertions(+), 26 deletions(-)

diff --git a/src/views/work/start.vue b/src/views/work/start.vue
index 99b5c04..ac99ec7 100644
--- a/src/views/work/start.vue
+++ b/src/views/work/start.vue
@@ -9,25 +9,29 @@
                     <el-radio-button label="2">定制流程</el-radio-button>
                 </el-radio-group>
             </template>
-            <template slot-scope="scope" slot="menu">
-                <el-button type="text" size="small" icon="el-icon-video-play" v-if="permission.work_start_flow"
-                    @click.stop="handleStart(scope.row)">发起
+
+            <template slot-scope="{row, size, index}" slot="menu">
+                <el-button type="text" :size="size" icon="el-icon-video-play" v-if="permission.work_start_flow"
+                    @click.stop="handleStart(row)">发起
                 </el-button>
-                <el-button type="text" size="small" icon="el-icon-search" v-if="permission.work_start_image"
-                    @click.stop="handleImage(scope.row, scope.index)">流程图
+                <el-button type="text" :size="size" icon="el-icon-search" v-if="permission.work_start_image"
+                    @click.stop="handleImage(row, index)">流程图
                 </el-button>
             </template>
-            <template slot-scope="{row}" slot="tenantId">
-                <el-tag>{{ row.tenantId === '' ? '通用' : row.tenantId }}</el-tag>
+
+            <template slot-scope="{row, size}" slot="tenantId">
+                <el-tag :size="size">{{ row.tenantId === '' ? '通用' : row.tenantId }}</el-tag>
             </template>
-            <template slot-scope="{row}" slot="version">
-                <el-tag>v{{ row.version }}</el-tag>
+            <template slot-scope="{row, size}" slot="version">
+                <el-tag :size="size">v{{ row.version }}</el-tag>
             </template>
-            <template slot-scope="{row}" slot="suspensionState">
-                <el-tag>{{ row.suspensionState === 1 ? '激活' : '挂起' }}</el-tag>
+            <template slot-scope="{row, size}" slot="suspensionState">
+                <el-tag :size="size" :type="row.suspensionState === 1 ? 'success' : 'info'">{{ row.suspensionState === 1 ?
+                    '激活' : '挂起'
+                }}</el-tag>
             </template>
-            <template slot-scope="{row}" slot="category">
-                <el-tag>{{ row.categoryName }}</el-tag>
+            <template slot-scope="{row, size}" slot="category">
+                <el-tag :size="size">{{ row.categoryName }}</el-tag>
             </template>
         </avue-crud>
         <flow-design is-dialog :is-display.sync="flowBox" :process-definition-id="processDefinitionId"></flow-design>
@@ -35,9 +39,16 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex"
-import { startList } from "@/api/work/work"
-import { flowCategory, flowRoute } from "@/util/flow"
+import {
+    mapGetters
+} from "vuex"
+import {
+    startList
+} from "@/api/work/work"
+import {
+    flowCategory,
+    flowRoute
+} from "@/util/flow"
 
 export default {
     data () {
@@ -57,11 +68,14 @@
             flowBox: false,
             workBox: false,
             option: {
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 140,
+
                 height: 'auto',
                 calcHeight: 30,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 6,
                 border: true,
                 index: true,
                 selection: true,
@@ -69,17 +83,17 @@
                 addBtn: false,
                 viewBtn: false,
                 delBtn: false,
-                menuWidth: 280,
                 dialogWidth: 900,
                 dialogClickModal: false,
                 column: [
                     {
+                        width: 120,
                         label: '租户编号',
                         prop: 'tenantId',
                         slot: true,
-                        width: 120,
                     },
                     {
+                        width: 120,
                         label: "流程分类",
                         type: "select",
                         row: true,
@@ -91,8 +105,9 @@
                         dataType: "number",
                         slot: true,
                         prop: "category",
+                        searchSpan: 4,
                         search: true,
-                        width: 100,
+                        searchLabelWidth: 76,
                     },
                     {
                         label: '流程标识',
@@ -101,24 +116,25 @@
                     {
                         label: '流程名称',
                         prop: 'name',
+                        searchSpan: 4,
                         search: true,
                     },
                     {
+                        width: 100,
                         label: '流程版本',
                         prop: 'version',
                         slot: true,
-                        width: 80,
                     },
                     {
+                        width: 100,
                         label: '状态',
                         prop: 'suspensionState',
                         slot: true,
-                        width: 80,
                     },
                     {
+                        width: 144,
                         label: '部署时间',
                         prop: 'deploymentTime',
-                        width: 165,
                     },
                 ]
             },
@@ -159,7 +175,10 @@
             this.$refs.crud.toggleSelection()
         },
         handleStart (row) {
-            this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}` })
+            // console.log("+++++++++++++++++" + `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`)
+            this.$router.push({
+                path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`
+            })
         },
         handleImage (row) {
             this.processDefinitionId = row.id
@@ -191,4 +210,4 @@
         }
     }
 }
-</script>
+</script>
\ No newline at end of file

--
Gitblit v1.9.3