|
@@ -24,11 +24,51 @@
|
24
|
24
|
<div class="flex tMar15">
|
25
|
25
|
<div class="label">筛选维度:</div>
|
26
|
26
|
<div class="flex flex_1">
|
27
|
|
- <el-input v-model="pageInfo.keyword" v-if="pageInfo.data_group != 'project'" style="width: 200px" placeholder="请输入关键词" clearable @clear="init" @keyup.enter.native="init">
|
28
|
|
- <template #append>
|
29
|
|
- <el-button :icon="Search" @click="init"/>
|
|
27
|
+ <template v-if="pageInfo.data_group != 'project'" >
|
|
28
|
+ <el-input v-model="pageInfo.keyword" style="width: 200px" placeholder="请输入关键词" clearable @clear="init" @keyup.enter.native="init">
|
|
29
|
+ <template #append>
|
|
30
|
+ <el-button :icon="Search" @click="init"/>
|
|
31
|
+ </template>
|
|
32
|
+ </el-input>
|
|
33
|
+ <template v-if="userInfo?.userAuth <= 10">
|
|
34
|
+ <div class="label lMar20 rMar10">团队</div>
|
|
35
|
+ <Select ref="teamRef"
|
|
36
|
+ selectWidth="180px"
|
|
37
|
+ @changeEvent="selectChange('teamRef')" @clearEvent="selectChange('teamRef')"
|
|
38
|
+ :isMultiple="true"
|
|
39
|
+ :filterFlag="true"
|
|
40
|
+ :optObj="{k:'id',la:'name',val:'id'}"
|
|
41
|
+ :options="pageInfo.teamList"/>
|
30
|
42
|
</template>
|
31
|
|
- </el-input>
|
|
43
|
+ </template>
|
|
44
|
+
|
|
45
|
+ <template v-if="pageInfo.data_group == 'project'">
|
|
46
|
+ <div class="label lMar20 rMar10">项目</div>
|
|
47
|
+ <Select ref="projectRef"
|
|
48
|
+ selectWidth="180px"
|
|
49
|
+ @changeEvent="selectChange('projectRef')" @clearEvent="selectChange('projectRef')"
|
|
50
|
+ :isMultiple="true"
|
|
51
|
+ :filterFlag="true"
|
|
52
|
+ :optObj="{k:'id',la:'name',val:'id'}"
|
|
53
|
+ :options="pageInfo.projectList"/>
|
|
54
|
+ <div class="label lMar20 rMar10">部门</div>
|
|
55
|
+ <el-tree-select
|
|
56
|
+ v-model="pageInfo.department_ids"
|
|
57
|
+ :data="pageInfo.departList"
|
|
58
|
+ :props="pageInfo.departmentProps"
|
|
59
|
+ node-key="id"
|
|
60
|
+ multiple
|
|
61
|
+ collapse-tags
|
|
62
|
+ clearable
|
|
63
|
+ check-strictly
|
|
64
|
+ :render-after-expand="false"
|
|
65
|
+ show-checkbox
|
|
66
|
+ @clear="selectChange('departmentRef')"
|
|
67
|
+ @change="selectChange('departmentRef')"
|
|
68
|
+ style="width: 240px"
|
|
69
|
+ />
|
|
70
|
+ </template>
|
|
71
|
+
|
32
|
72
|
<div class="label lMar20 rMar10">优化师</div>
|
33
|
73
|
<Select ref="userRef"
|
34
|
74
|
selectWidth="180px"
|
|
@@ -37,16 +77,6 @@
|
37
|
77
|
:filterFlag="true"
|
38
|
78
|
:optObj="{k:'id',la:'username',val:'id'}"
|
39
|
79
|
:options="pageInfo.userList"/>
|
40
|
|
- <template v-if="userInfo?.userAuth <= 10">
|
41
|
|
- <div class="label lMar20 rMar10">团队</div>
|
42
|
|
- <Select ref="teamRef"
|
43
|
|
- selectWidth="180px"
|
44
|
|
- @changeEvent="selectChange('teamRef')" @clearEvent="selectChange('teamRef')"
|
45
|
|
- :isMultiple="true"
|
46
|
|
- :filterFlag="true"
|
47
|
|
- :optObj="{k:'id',la:'name',val:'id'}"
|
48
|
|
- :options="pageInfo.teamList"/>
|
49
|
|
- </template>
|
50
|
80
|
<div class="label lMar20 rMar10">账户</div>
|
51
|
81
|
<Select ref="acRef"
|
52
|
82
|
selectWidth="180px"
|
|
@@ -77,6 +107,7 @@ import projectDataList from './projectDataList.vue'
|
77
|
107
|
const userInfo = ref()
|
78
|
108
|
const showDateGroup = ref(true)
|
79
|
109
|
const {
|
|
110
|
+ projectRef,
|
80
|
111
|
projectDataListRef,
|
81
|
112
|
dataListRef,
|
82
|
113
|
acTrendRef,
|
|
@@ -86,7 +117,9 @@ const {
|
86
|
117
|
pageInfo,
|
87
|
118
|
init_acList,
|
88
|
119
|
getUserList,
|
89
|
|
- getTeamList
|
|
120
|
+ getTeamList,
|
|
121
|
+ getProjectList,
|
|
122
|
+ getDepartList
|
90
|
123
|
} = ExpIndex()
|
91
|
124
|
|
92
|
125
|
/**点击数据维度 */
|
|
@@ -108,30 +141,44 @@ const selectChange = (key) => {
|
108
|
141
|
if(key == 'acRef') {
|
109
|
142
|
pageInfo.account_ids = acRef.value?.value;
|
110
|
143
|
}
|
|
144
|
+ if(key == 'projectRef') {
|
|
145
|
+ pageInfo.project_ids = projectRef.value?.value;
|
|
146
|
+ }
|
111
|
147
|
init()
|
112
|
148
|
}
|
113
|
149
|
|
114
|
150
|
const init = () => {
|
115
|
|
- nextTick(()=>{
|
116
|
|
- if(acTrendRef.value) {
|
117
|
|
- acTrendRef.value.change()
|
118
|
|
- }
|
119
|
|
- if(pageInfo.data_group == 'project') {
|
120
|
|
- if(projectDataListRef.value) {
|
121
|
|
- projectDataListRef.value.init(1)
|
|
151
|
+ if(pageInfo.data_group == 'project') {
|
|
152
|
+ pageInfo.keyword = '';
|
|
153
|
+ pageInfo.team_ids = [];
|
|
154
|
+ nextTick(()=>{
|
|
155
|
+ if(acTrendRef.value) {
|
|
156
|
+ acTrendRef.value.change()
|
|
157
|
+ }
|
|
158
|
+ if(projectDataListRef.value) {
|
|
159
|
+ projectDataListRef.value.init(1)
|
|
160
|
+ }
|
|
161
|
+ })
|
|
162
|
+ }else{
|
|
163
|
+ pageInfo.project_ids = [];
|
|
164
|
+ pageInfo.department_ids = [];
|
|
165
|
+ nextTick(()=>{
|
|
166
|
+ if(acTrendRef.value) {
|
|
167
|
+ acTrendRef.value.change()
|
122
|
168
|
}
|
123
|
|
- }else {
|
124
|
169
|
if(dataListRef.value) {
|
125
|
170
|
dataListRef.value.init(1)
|
126
|
171
|
}
|
127
|
|
- }
|
128
|
|
- })
|
|
172
|
+ })
|
|
173
|
+ }
|
129
|
174
|
}
|
130
|
175
|
|
131
|
176
|
onBeforeMount(()=>{
|
132
|
177
|
userInfo.value = JSON.parse(getCookie('userInfo') as string)
|
133
|
178
|
init_acList()
|
134
|
179
|
getUserList()
|
|
180
|
+ getProjectList()
|
|
181
|
+ getDepartList()
|
135
|
182
|
if(userInfo.value?.userAuth <= 10){//管理员
|
136
|
183
|
getTeamList()
|
137
|
184
|
}
|