whx 3 月之前
父节点
当前提交
a7ef579a24

文件差异内容过多而无法显示
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/index.html


文件差异内容过多而无法显示
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/196.080b8bcb.js


文件差异内容过多而无法显示
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9294.f4092fed.js


文件差异内容过多而无法显示
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/app.1899b194.js


文件差异内容过多而无法显示
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/app.8ca0cfe7.js


+ 25 - 25
virgo.wzfrontend/workark/src/views/work/serve/list.vue

@@ -1,7 +1,10 @@
 <template>
 	<div class="hui-flex hui-content border-box">
 		<div class="hui-content-title">
-			<div class="hui-title-item active">{{titleName}}</div>
+			<div :class="nowTitle.id === item.id?'hui-title-item active':'hui-title-item'"
+				v-for="(item,index) in titleData" :key="index" @click="changeTitle(item)">
+				{{item.name}}
+			</div>
 		</div>
 		<div class="hui-flex-box hui-flex hui-table">
 			<div class="hui-flex-box">
@@ -28,11 +31,11 @@
 									详情
 								</span>
 								<span class="table-operation" v-permission="'/work/property/change/update'"
-									v-if="!scope.row.projectFlowId" @click="updateItem(scope.row)">
+									v-if="nowTitle.id === 2" @click="updateItem(scope.row)">
 									编辑
 								</span>
 								<span class="table-operation" v-permission="'/work/property/change/delete'"
-									v-if="!scope.row.projectFlowId" @click="deleteItem(scope.row)">
+									@click="deleteItem(scope.row)">
 									删除
 								</span>
 							</div>
@@ -62,7 +65,8 @@
 	export default {
 		data() {
 			return {
-				titleName: '',
+				titleData: [],
+				nowTitle: {},
 				tableData: [],
 				currPage: 1,
 				pageSize: 10,
@@ -73,13 +77,18 @@
 			}
 		},
 		mounted() {
-			let title = this.getTitleNameByPath() || {
-				title: '服务列表'
-			};
-			this.titleName = title.title;
 			getServeDepartmentBySign(this.$route.params.type).then(res => {
 				if (res.state && res.data) {
 					this.level = res.data;
+					this.titleData = [{
+						id: 1,
+						name: res.data.name
+					}]
+					if (this.$store.getters.organization.facilitator === 1) this.titleData.push({
+						id: 2,
+						name: '订单管理'
+					})
+					this.nowTitle = this.titleData[0];
 					this.init();
 				}
 			})
@@ -87,9 +96,10 @@
 		methods: {
 			init() {
 				let filterOption = {
-					payOrganizationId: this.$store.getters.organization.id,
 					productLevelId: this.level.id
 				};
+				if (this.nowTitle.id === 1) filterOption['payOrganizationId'] = this.$store.getters.organization.id;
+				if (this.nowTitle.id === 2) filterOption['organizationId'] = this.$store.getters.organization.id;
 				filterOption = Object.assign(filterOption, this.filterOption);
 				this.loading = true;
 				getOrderListByQueryAndSize(this.currPage, this.pageSize, filterOption).then(res => {
@@ -100,6 +110,12 @@
 					this.loading = false;
 				})
 			},
+			changeTitle(item) {
+				if (this.nowTitle.id === item.id) return;
+				this.nowTitle = item;
+				this.currPage = 1;
+				this.init();
+			},
 			currentChange(currPage) {
 				this.currPage = currPage;
 				this.init();
@@ -130,22 +146,6 @@
 						}
 					})
 				});
-			},
-			getTitleNameByPath() {
-				function findNodeById(nodes, index) {
-					for (const node of nodes) {
-						if (node.index === index) {
-							return node; // 找到匹配的节点,直接返回
-						}
-						// 检查子节点是否存在且为数组
-						if (Array.isArray(node.children)) {
-							const found = findNodeById(node.children, index); // 递归查找子节点
-							if (found) return found;
-						}
-					}
-					return null; // 遍历结束未找到,返回 null
-				}
-				return findNodeById(this.$store.getters.menuData, this.$route.path);
 			}
 		}
 	}