Parcourir la source

统计添加跳转bug修改

asd26269546 il y a 1 an
Parent
commit
716805f23b

+ 6 - 0
src/components/byTable/demo.vue

@@ -294,6 +294,9 @@ const statConfig = computed(() => {
 					label:'吃鸡数量',
 					num:100000.00,
 					type:6,//一共6总样式,默认1
+					click:(e,index)=>{//点击事件
+						console.log(e,index)
+					},
 				},
 				{
 					label:'吃鸡数量',
@@ -329,6 +332,9 @@ const statConfig = computed(() => {
 				//一个卡牌多数据配置
 				{
 					label:'刺激战场',
+					click:(e,index)=>{//点击事件
+						console.log(e,index)
+					},
 					data:[
 						{
 							label:'吃鸡数量',

+ 13 - 2
src/components/byTable/index.vue

@@ -46,6 +46,8 @@
         :class="'theme' + i.type"
         v-for="(i, index) in statConfig[statSelectVal].data"
         :key="index"
+        @click="i.click ? i.click(i,index) : ''"
+        :style="i.click ? 'cursor: pointer' : ''"
       >
         <div class="label">{{ i.label }}</div>
         <div class="num">{{ i.num }}</div>
@@ -55,6 +57,8 @@
         v-for="(i, index) in statConfig[statSelectVal].data"
         :key="index"
         class="multi-data"
+        @click="i.click ? i.click(i,index) : ''"
+        :style="i.click ? 'cursor: pointer' : ''"
       >
         <div class="label">{{ i.label }}</div>
         <div class="num-warp">
@@ -82,8 +86,15 @@
           style="margin-right: 10px"
         >
           <div class="by-dropdown-title">
-            {{ i.label || i.labelCopy
-            }}<i
+            {{ 
+              pagination[i.prop] ?  
+              i.data.find(j => j.value === pagination[i.prop]) ? 
+              i.data.find(j => j.value === pagination[i.prop]).label : 
+              i.label : 
+              i.labelCopy
+            }}
+            <!-- {{ i.label || i.labelCopy }} -->
+            <i
               style="margin-left: 5px"
               class="iconfont icon-iconm_xialan1"
             ></i>

+ 9 - 4
src/views/index.vue

@@ -3,14 +3,14 @@
 		
 		<div class="stat-warp">
 			<ul>
-				<li class="theme1">
+				<li class="theme1" @click="toUrl('DealWith',1)">
 					<div class="num">{{toBeProcessedData.total}}</div>
 					<div class="label">我的待审批</div>
 					<div class="icon-box">
 						<i class="icon iconfont icon-iconm_waixht"></i>
 					</div>
 				</li>
-				<li class="theme2">
+				<li class="theme2" @click="toUrl('DealWith',1)">
 					<div class="num">{{haveInitiatedData.total}}</div>
 					<div class="label">我的发起(未结束)</div>
 					<div class="icon-box">
@@ -44,7 +44,7 @@
 								size="small"
 								@click="pushProcessApproval(scope.row)"
 							>
-								查看
+								审批
 							</el-button>
 						</template>
 					</el-table-column>
@@ -173,8 +173,13 @@ const getData = (() => {
 	}).then(res=>{
 		sendMegData.value = res
 	})
-	
 })
+const toUrl = (name,type) => {
+	//获取name为name的路由的基础信息
+	const route = proxy.$router.resolve({ name: name, params: {  } })
+	console.log(route)
+	proxy.$router.push(route.path + '?type=' + type)
+}
 getData()
 // ​
 onMounted(() => {})

+ 6 - 2
src/views/process/dealWith/index.vue

@@ -51,7 +51,7 @@
 	</div>
 </template>
     
-  <script setup>
+  <script setup name="DealWith">
 /* eslint-disable vue/no-unused-components */
 import { ElMessage, ElMessageBox } from 'element-plus'
 import byTable from '@/components/byTable/index'
@@ -346,8 +346,12 @@ const changeStatus = (row) => {
 			getList()
 		})
 }
+onMounted(() => {
+	const route = useRoute();
+	sourceList.value.pagination.status = route.query.type
+	getList()
+})
 
-getList()
 </script>
     
   <style lang="scss" scoped>

+ 9 - 2
src/views/system/dept2/index.vue

@@ -220,7 +220,7 @@ const formConfig = computed(() => {
           value: 2,
         },
         {
-          label: proxy.t('dept.'),
+          label: proxy.t('dept.group'),
           value: 3,
         },
       ],
@@ -390,6 +390,8 @@ const showType = (type) => {
 };
 const getDtl = (row) => {
   formData.data = { ...row };
+  sourceList.value.pagination.tenantId = row.tenantId;
+  getUserList()
   modalType.value = "edit";
   
   dialogVisible.value = true;
@@ -407,9 +409,14 @@ const getUserList = () => {
         item.label = item.nickName;
         item.id = item.userId;
       });
+      message.rows.unshift({
+        label:'无',
+        id:'',
+      })
       formConfig.value[3].data = message.rows;
       formConfig.value[4].data = message.rows;
-      console.log(config);
+      
+      
     });
 };
 getUserList();