|
@@ -1,7 +1,10 @@
|
|
<template>
|
|
<template>
|
|
<div class="hui-flex hui-content border-box">
|
|
<div class="hui-flex hui-content border-box">
|
|
<div class="hui-content-title">
|
|
<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>
|
|
<div class="hui-flex-box hui-flex hui-table">
|
|
<div class="hui-flex-box hui-flex hui-table">
|
|
<div class="hui-flex-box">
|
|
<div class="hui-flex-box">
|
|
@@ -28,11 +31,11 @@
|
|
详情
|
|
详情
|
|
</span>
|
|
</span>
|
|
<span class="table-operation" v-permission="'/work/property/change/update'"
|
|
<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>
|
|
<span class="table-operation" v-permission="'/work/property/change/delete'"
|
|
<span class="table-operation" v-permission="'/work/property/change/delete'"
|
|
- v-if="!scope.row.projectFlowId" @click="deleteItem(scope.row)">
|
|
|
|
|
|
+ @click="deleteItem(scope.row)">
|
|
删除
|
|
删除
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
@@ -62,7 +65,8 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- titleName: '',
|
|
|
|
|
|
+ titleData: [],
|
|
|
|
+ nowTitle: {},
|
|
tableData: [],
|
|
tableData: [],
|
|
currPage: 1,
|
|
currPage: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
@@ -73,13 +77,18 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- let title = this.getTitleNameByPath() || {
|
|
|
|
- title: '服务列表'
|
|
|
|
- };
|
|
|
|
- this.titleName = title.title;
|
|
|
|
getServeDepartmentBySign(this.$route.params.type).then(res => {
|
|
getServeDepartmentBySign(this.$route.params.type).then(res => {
|
|
if (res.state && res.data) {
|
|
if (res.state && res.data) {
|
|
this.level = 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();
|
|
this.init();
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -87,9 +96,10 @@
|
|
methods: {
|
|
methods: {
|
|
init() {
|
|
init() {
|
|
let filterOption = {
|
|
let filterOption = {
|
|
- payOrganizationId: this.$store.getters.organization.id,
|
|
|
|
productLevelId: this.level.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);
|
|
filterOption = Object.assign(filterOption, this.filterOption);
|
|
this.loading = true;
|
|
this.loading = true;
|
|
getOrderListByQueryAndSize(this.currPage, this.pageSize, filterOption).then(res => {
|
|
getOrderListByQueryAndSize(this.currPage, this.pageSize, filterOption).then(res => {
|
|
@@ -100,6 +110,12 @@
|
|
this.loading = false;
|
|
this.loading = false;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ changeTitle(item) {
|
|
|
|
+ if (this.nowTitle.id === item.id) return;
|
|
|
|
+ this.nowTitle = item;
|
|
|
|
+ this.currPage = 1;
|
|
|
|
+ this.init();
|
|
|
|
+ },
|
|
currentChange(currPage) {
|
|
currentChange(currPage) {
|
|
this.currPage = currPage;
|
|
this.currPage = currPage;
|
|
this.init();
|
|
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);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|