|
@@ -44,8 +44,7 @@
|
44
|
44
|
<el-tooltip :disabled="!(scope.row[item.key_value] && scope.row[item.key_value].length > 30)"
|
45
|
45
|
effect="dark" :content="scope.row[item.key_value] + ''">
|
46
|
46
|
<div class="clampTwo line21" style="flex: 1">
|
47
|
|
- {{ scope.row[item.key_value] || scope.row[item.key_value] == 0 ?
|
48
|
|
- hasDot(scope.row[item.key_value], 2, true) : '-' }}<span
|
|
47
|
+ {{ scope.row[item.key_value] || scope.row[item.key_value] == 0 ? (item.label.indexOf('ID') != -1 || item.label.indexOf('id') != -1 ? scope.row[item.key_value] : hasDot(scope.row[item.key_value], 2, true)) : '-' }}<span
|
49
|
48
|
v-if="item.label.indexOf('率') != -1 && (scope.row[item.key_value] || scope.row[item.key_value] == 0)">%</span>
|
50
|
49
|
</div>
|
51
|
50
|
</el-tooltip>
|
|
@@ -94,7 +93,7 @@ const tableInfo = reactive<any>({
|
94
|
93
|
updateKey: 1,
|
95
|
94
|
dimensionList:[
|
96
|
95
|
{ name: '账户', key: 'account' },
|
97
|
|
- { name: '人员', key: 'user' },
|
|
96
|
+ { name: '优化师', key: 'user' },
|
98
|
97
|
{ name: '部门', key: 'department' },
|
99
|
98
|
]
|
100
|
99
|
})
|
|
@@ -136,19 +135,7 @@ const exportEvent = async () => {
|
136
|
135
|
loading.value = false;
|
137
|
136
|
if (res && res.errNo == '0') {
|
138
|
137
|
let list = res.rst.data.list;
|
139
|
|
- let descol = [{
|
140
|
|
- disabled: 1,
|
141
|
|
- if_sort: 1,
|
142
|
|
- key_value: "time",
|
143
|
|
- label: "时间",
|
144
|
|
- tooltip: ""
|
145
|
|
- },{
|
146
|
|
- disabled: 1,
|
147
|
|
- if_sort: 0,
|
148
|
|
- key_value: "project_name",
|
149
|
|
- label: "项目名称",
|
150
|
|
- tooltip: ""
|
151
|
|
- }].concat(res.rst.data?.explain)
|
|
138
|
+ let descol = getDesolOther().concat(res.rst.data?.explain)
|
152
|
139
|
|
153
|
140
|
let tHeader = descol.map((v) => {
|
154
|
141
|
return v.label;
|
|
@@ -193,7 +180,18 @@ const init = async (page?: any, pageSize?: any) => {
|
193
|
180
|
loading.value = false;
|
194
|
181
|
if (res && res.errNo == '0') {
|
195
|
182
|
tableInfo.summary = res.rst?.data?.summary;
|
196
|
|
- tableInfo.descol = [{
|
|
183
|
+ tableInfo.descol = getDesolOther().concat(res.rst?.data?.explain);
|
|
184
|
+ tableInfo.tableList = res.rst?.data?.list;
|
|
185
|
+ tableInfo.total = res.rst?.pageInfo.total
|
|
186
|
+ tableInfo.totalPages = res.rst?.pageInfo.total
|
|
187
|
+ tableInfo.updateKey ++;
|
|
188
|
+ } else {
|
|
189
|
+ ElMessage.error(res.errMsg)
|
|
190
|
+ }
|
|
191
|
+}
|
|
192
|
+
|
|
193
|
+const getDesolOther = () => {
|
|
194
|
+ let desArr = [{
|
197
|
195
|
disabled: 1,
|
198
|
196
|
if_sort: 1,
|
199
|
197
|
key_value: "time",
|
|
@@ -205,14 +203,46 @@ const init = async (page?: any, pageSize?: any) => {
|
205
|
203
|
key_value: "project_name",
|
206
|
204
|
label: "项目名称",
|
207
|
205
|
tooltip: ""
|
208
|
|
- }].concat(res.rst?.data?.explain);
|
209
|
|
- tableInfo.tableList = res.rst?.data?.list;
|
210
|
|
- tableInfo.total = res.rst?.pageInfo.total
|
211
|
|
- tableInfo.totalPages = res.rst?.pageInfo.total
|
212
|
|
- tableInfo.updateKey ++;
|
213
|
|
- } else {
|
214
|
|
- ElMessage.error(res.errMsg)
|
215
|
|
- }
|
|
206
|
+ }]
|
|
207
|
+ if(dimensionRef.value){
|
|
208
|
+ if( dimensionRef.value.value.includes('account') ) {
|
|
209
|
+ desArr = desArr.concat([
|
|
210
|
+ {
|
|
211
|
+ disabled: 0,
|
|
212
|
+ if_sort: 0,
|
|
213
|
+ key_value: "advertiser_nick",
|
|
214
|
+ label: "账户名称",
|
|
215
|
+ tooltip: ""
|
|
216
|
+ },
|
|
217
|
+ {
|
|
218
|
+ disabled: 0,
|
|
219
|
+ if_sort: 0,
|
|
220
|
+ key_value: "advertiser_id",
|
|
221
|
+ label: "账户ID",
|
|
222
|
+ tooltip: ""
|
|
223
|
+ }
|
|
224
|
+ ])
|
|
225
|
+ }
|
|
226
|
+ if( dimensionRef.value.value.includes('user') ) {
|
|
227
|
+ desArr.push({
|
|
228
|
+ disabled: 0,
|
|
229
|
+ if_sort: 0,
|
|
230
|
+ key_value: "user_name",
|
|
231
|
+ label: "优化师",
|
|
232
|
+ tooltip: ""
|
|
233
|
+ })
|
|
234
|
+ }
|
|
235
|
+ if( dimensionRef.value.value.includes('department') ) {
|
|
236
|
+ desArr.push({
|
|
237
|
+ disabled: 0,
|
|
238
|
+ if_sort: 0,
|
|
239
|
+ key_value: "department_name",
|
|
240
|
+ label: "部门",
|
|
241
|
+ tooltip: ""
|
|
242
|
+ })
|
|
243
|
+ }
|
|
244
|
+ }
|
|
245
|
+ return desArr
|
216
|
246
|
}
|
217
|
247
|
|
218
|
248
|
/**合计计算 */
|