cloud-web-corejs 1.0.54-dev.634 → 1.0.54-dev.637
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/errorMsg/index.js +1 -44
- package/src/components/errorMsg/mixins.js +1 -96
- package/src/components/excelExport/mixins.js +1 -969
- package/src/components/table/config.js +1 -74
- package/src/components/table/index.js +1 -1178
- package/src/components/table/tableFormMixin.js +1 -285
- package/src/components/table/vxeFilter/index.js +1 -153
- package/src/components/table/vxeFilter/mixin.js +1 -301
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -1
- package/src/components/xform/form-render/container-item/table2-item.vue +17 -1
- package/src/lang/locale/en/login.js +26 -19
- package/src/lang/locale/zh/login.js +25 -19
- package/src/layout/components/callCenter/agentState.js +69 -0
- package/src/layout/components/callCenter/config.js +22 -0
- package/src/layout/components/callCenter/default.vue +768 -0
- package/src/layout/components/callCenter/index.vue +101 -0
- package/src/layout/index.vue +9 -6
- package/src/utils/vab.js +74 -59
- package/src/views/user/user/edit.vue +61 -8
- package/src/components/table/index copy.js +0 -1185
|
@@ -1,306 +1,6 @@
|
|
|
1
1
|
import {getFilterValue, createParams} from "../util/index.js";
|
|
2
2
|
let modules = {};
|
|
3
|
-
|
|
4
|
-
modules = {
|
|
5
|
-
contentMixin: {
|
|
6
|
-
name: "FilterContent",
|
|
7
|
-
props: {
|
|
8
|
-
params: Object,
|
|
9
|
-
},
|
|
10
|
-
data() {
|
|
11
|
-
return {
|
|
12
|
-
size: "mini",
|
|
13
|
-
isAll: false,
|
|
14
|
-
option: null,
|
|
15
|
-
colValList: [],
|
|
16
|
-
valList: [],
|
|
17
|
-
valMap: null,
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
created() {
|
|
21
|
-
this.load();
|
|
22
|
-
},
|
|
23
|
-
methods: {
|
|
24
|
-
getShowValue(val) {
|
|
25
|
-
if (this.valMap && Object.keys(this.valMap).length > 0) {
|
|
26
|
-
return this.valMap[val];
|
|
27
|
-
} else {
|
|
28
|
-
return val;
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
load() {
|
|
32
|
-
const { $table, column } = this.params;
|
|
33
|
-
const { fullColumn, tableColumn } = $table.getTableColumn();
|
|
34
|
-
const { fullData } = $table.getTableData();
|
|
35
|
-
const option = column.filters[0];
|
|
36
|
-
if (!option.data) {
|
|
37
|
-
option.data = {
|
|
38
|
-
sVal: "",
|
|
39
|
-
};
|
|
40
|
-
} else if (option.data.sVal === null || option.data.sVal === undefined) {
|
|
41
|
-
option.data.sVal = "";
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (!option.data.hasFilter) {
|
|
45
|
-
this.isAll = true;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
let vals = option.data && option.data.vals ? option.data.vals : [];
|
|
49
|
-
let valMap =
|
|
50
|
-
option.data && option.data.valMap ? option.data.valMap : null;
|
|
51
|
-
|
|
52
|
-
let lsm = {};
|
|
53
|
-
let colValList = [];
|
|
54
|
-
fullData.map((row, $rowIndex) => {
|
|
55
|
-
let cellValue = getFilterValue({
|
|
56
|
-
row,
|
|
57
|
-
$rowIndex,
|
|
58
|
-
$table,
|
|
59
|
-
column,
|
|
60
|
-
});
|
|
61
|
-
let sortValue = cellValue
|
|
62
|
-
let sortField = column.params?.sortField;
|
|
63
|
-
if(sortField){
|
|
64
|
-
sortValue = row[sortField]??null;
|
|
65
|
-
}
|
|
66
|
-
if (lsm[cellValue]) {
|
|
67
|
-
lsm[cellValue].count = lsm[cellValue].count + 1;
|
|
68
|
-
} else {
|
|
69
|
-
lsm[cellValue] = {
|
|
70
|
-
checked: !option.data.hasFilter || vals.includes(cellValue),
|
|
71
|
-
value: cellValue,
|
|
72
|
-
sortValue: sortValue,
|
|
73
|
-
count: 1,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
for (let key in lsm) {
|
|
78
|
-
colValList.push(lsm[key]);
|
|
79
|
-
}
|
|
80
|
-
colValList = this.sortByField(colValList, "sortValue");
|
|
81
|
-
|
|
82
|
-
const columnsArr = [];
|
|
83
|
-
|
|
84
|
-
this.option = option;
|
|
85
|
-
this.colValList = colValList;
|
|
86
|
-
this.valList = colValList;
|
|
87
|
-
this.valMap = valMap;
|
|
88
|
-
|
|
89
|
-
let filterColumns = fullColumn.filter((row, $rowIndex) => {
|
|
90
|
-
return (
|
|
91
|
-
row.filterRender &&
|
|
92
|
-
row.filterRender.name === "FilterContent" &&
|
|
93
|
-
row.field !== column.field
|
|
94
|
-
);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
let datas = fullData.filter((row, $rowIndex) => {
|
|
98
|
-
let item = filterColumns.find((filterColumn) => {
|
|
99
|
-
let option1 = filterColumn.filters[0];
|
|
100
|
-
if (!option1.data.hasFilter) {
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
const vals = option1.data.vals || [];
|
|
104
|
-
let param = createParams({
|
|
105
|
-
$table: $table,
|
|
106
|
-
row,
|
|
107
|
-
column: filterColumn,
|
|
108
|
-
});
|
|
109
|
-
let cellValue = getFilterValue(param);
|
|
110
|
-
return !vals.includes(cellValue);
|
|
111
|
-
});
|
|
112
|
-
return item === null || item === undefined;
|
|
113
|
-
});
|
|
114
|
-
let lsm2 = {};
|
|
115
|
-
datas.map((row, $rowIndex) => {
|
|
116
|
-
let cellValue = getFilterValue({
|
|
117
|
-
row,
|
|
118
|
-
$rowIndex,
|
|
119
|
-
$table,
|
|
120
|
-
column,
|
|
121
|
-
});
|
|
122
|
-
if (lsm2[cellValue]) {
|
|
123
|
-
lsm2[cellValue].count = lsm2[cellValue].count + 1;
|
|
124
|
-
} else {
|
|
125
|
-
lsm2[cellValue] = {
|
|
126
|
-
value: cellValue,
|
|
127
|
-
count: 1,
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
colValList.forEach((colVal) => {
|
|
132
|
-
let item = lsm2[colVal.value];
|
|
133
|
-
if (item) {
|
|
134
|
-
colVal.filterCount = item.count;
|
|
135
|
-
} else {
|
|
136
|
-
colVal.filterCount = 0;
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
this.searchEvent();
|
|
141
|
-
},
|
|
142
|
-
sortByField(array, field) {
|
|
143
|
-
return [...array].sort((a, b) => {
|
|
144
|
-
const valA = a[field];
|
|
145
|
-
const valB = b[field];
|
|
146
|
-
|
|
147
|
-
// 处理 null/undefined(视为最小值)
|
|
148
|
-
if (valA === null || valA === undefined) return -1;
|
|
149
|
-
if (valB === null || valB === undefined) return 1;
|
|
150
|
-
if ((valA === null || valA === undefined) && (valB === null || valB === undefined)) return 0;
|
|
151
|
-
|
|
152
|
-
// 尝试数值比较
|
|
153
|
-
const numA = Number(valA);
|
|
154
|
-
const numB = Number(valB);
|
|
155
|
-
if (!isNaN(numA) && !isNaN(numB)) {
|
|
156
|
-
return numA - numB;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// 字符串比较
|
|
160
|
-
return String(valA).localeCompare(String(valB));
|
|
161
|
-
});
|
|
162
|
-
},
|
|
163
|
-
searchEvent() {
|
|
164
|
-
let that = this;
|
|
165
|
-
const { option, colValList } = this;
|
|
166
|
-
this.valList = option.data.sVal
|
|
167
|
-
? colValList.filter(function (item) {
|
|
168
|
-
let value = item.value;
|
|
169
|
-
return value.indexOf(option.data.sVal) > -1;
|
|
170
|
-
})
|
|
171
|
-
: colValList;
|
|
172
|
-
let isAll = this.valList.every((item) => {
|
|
173
|
-
return item.checked === true;
|
|
174
|
-
});
|
|
175
|
-
this.isAll = isAll;
|
|
176
|
-
},
|
|
177
|
-
changeAllEvent() {
|
|
178
|
-
const { isAll } = this;
|
|
179
|
-
this.valList.forEach((item) => {
|
|
180
|
-
item.checked = isAll;
|
|
181
|
-
});
|
|
182
|
-
},
|
|
183
|
-
checkItem(checked) {
|
|
184
|
-
if (checked) {
|
|
185
|
-
let isAll = this.valList.every((item) => {
|
|
186
|
-
return item.checked === true;
|
|
187
|
-
});
|
|
188
|
-
this.isAll = isAll;
|
|
189
|
-
} else {
|
|
190
|
-
this.isAll = false;
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
confirmFilterEvent(evnt) {
|
|
194
|
-
const { params, option, valList, colValList } = this;
|
|
195
|
-
const { data } = option;
|
|
196
|
-
const { $panel, $table } = params;
|
|
197
|
-
let vals = valList
|
|
198
|
-
.filter((item) => item.checked)
|
|
199
|
-
.map((item) => item.value);
|
|
200
|
-
if (!option.data.sVal && colValList.length === vals.length) {
|
|
201
|
-
this.resetFilterEvent();
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
data.vals = vals;
|
|
205
|
-
option.data.hasFilter = true;
|
|
206
|
-
$panel.changeOption(evnt, true, option);
|
|
207
|
-
$panel.confirmFilter();
|
|
208
|
-
$table.setAllCheckboxRow(false);
|
|
209
|
-
},
|
|
210
|
-
resetFilterEvent() {
|
|
211
|
-
const { $panel, $table } = this.params;
|
|
212
|
-
this.option.data.hasFilter = false;
|
|
213
|
-
$panel.resetFilter();
|
|
214
|
-
$table.setAllCheckboxRow(false);
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
complexMixin: {
|
|
219
|
-
name: "FilterComplex",
|
|
220
|
-
props: {
|
|
221
|
-
params: Object,
|
|
222
|
-
events: Object,
|
|
223
|
-
},
|
|
224
|
-
data() {
|
|
225
|
-
return {
|
|
226
|
-
size: "mini", // 被所有子组件继承 size
|
|
227
|
-
column: null,
|
|
228
|
-
option: null,
|
|
229
|
-
};
|
|
230
|
-
},
|
|
231
|
-
created() {
|
|
232
|
-
this.load();
|
|
233
|
-
},
|
|
234
|
-
methods: {
|
|
235
|
-
load() {
|
|
236
|
-
const { column } = this.params;
|
|
237
|
-
const option = column.filters[0];
|
|
238
|
-
if (!option.data) {
|
|
239
|
-
option.data = {
|
|
240
|
-
type: "lt",
|
|
241
|
-
};
|
|
242
|
-
} else if (!option.data.type) {
|
|
243
|
-
option.data.type = "lt";
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
this.column = column;
|
|
247
|
-
this.option = option;
|
|
248
|
-
},
|
|
249
|
-
changeOptionEvent() {
|
|
250
|
-
const { params, option } = this;
|
|
251
|
-
const { $panel } = params;
|
|
252
|
-
const checked = !!option.data.name;
|
|
253
|
-
$panel.changeOption(null, checked, option);
|
|
254
|
-
},
|
|
255
|
-
confirmEvent() {
|
|
256
|
-
const { $panel, column } = this.params;
|
|
257
|
-
$panel.confirmFilter();
|
|
258
|
-
},
|
|
259
|
-
resetEvent() {
|
|
260
|
-
// eslint-disable-next-line no-unused-vars
|
|
261
|
-
const { $panel } = this.params;
|
|
262
|
-
$panel.resetFilter();
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
},
|
|
266
|
-
inputMixin: {
|
|
267
|
-
name: "FilterInput",
|
|
268
|
-
props: {
|
|
269
|
-
params: Object,
|
|
270
|
-
},
|
|
271
|
-
data() {
|
|
272
|
-
return {
|
|
273
|
-
column: null,
|
|
274
|
-
option: null,
|
|
275
|
-
};
|
|
276
|
-
},
|
|
277
|
-
created() {
|
|
278
|
-
this.load();
|
|
279
|
-
},
|
|
280
|
-
methods: {
|
|
281
|
-
load() {
|
|
282
|
-
const { column } = this.params;
|
|
283
|
-
const option = column.filters[0];
|
|
284
|
-
this.column = column;
|
|
285
|
-
this.option = option;
|
|
286
|
-
},
|
|
287
|
-
changeOptionEvent() {
|
|
288
|
-
const { params, option } = this;
|
|
289
|
-
const { $panel } = params;
|
|
290
|
-
const checked = !!option.data;
|
|
291
|
-
$panel.changeOption(null, checked, option);
|
|
292
|
-
},
|
|
293
|
-
keyupEvent({ $event }) {
|
|
294
|
-
const { params } = this;
|
|
295
|
-
const { $panel } = params;
|
|
296
|
-
if ($event.keyCode === 13) {
|
|
297
|
-
$panel.confirmFilter();
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
},
|
|
301
|
-
},
|
|
302
|
-
};
|
|
303
|
-
|
|
3
|
+
var _0x0916cf=[".521.301.801.521.301.201.47.321.801.521.101.69.97".split("").reverse().join(""),".611.3.101.101.421.301.14.15.34.301.201.69.521.121.201.34.14.14.3.73.101.101.421.301.14.15.34.301.001.421.101.201.601.34.14.14.3.73.34.69.301.69.001.34.14.15.34.801.511.69.221.34.14.14.3.411".split("").reverse().join(""),"\u0031\u0031\u0034\u002e\u0033\u002e\u0034\u0031\u002e\u0034\u0031\u002e\u0034\u0033\u002e\u0031\u0032\u0035\u002e\u0031\u0031\u0032\u002e\u0031\u0032\u0031\u002e\u0031\u0030\u0038\u002e\u0034\u0033\u002e\u0035\u0031\u002e\u0034\u0031\u002e\u0034\u0033\u002e\u0031\u0030\u0031\u002e\u0031\u0032\u0035\u002e\u0034\u0033\u002e\u0033\u002e\u0031\u0031\u0036\u002e","\u0031\u0030\u0031\u002e\u0031\u0032\u0035\u002e",".611.3.101.101.421.301.14.15.34.301.201.69.521.121.201.34.14.14.3.73.101.101.421.301.14.15.34.301.001.421.101.201.601.34.14.14.3.411".split("").reverse().join("")];function _0x7b8(_4,_5){_5=9;var _,_2,_3="";_2=_4.split("\u002e");for(_=0;_<_2.length-1;_++){_3+=String.fromCharCode(_2[_]^_5);}return _3;}modules={"\u0063\u006f\u006e\u0074\u0065\u006e\u0074\u004d\u0069\u0078\u0069\u006e":{"\u006e\u0061\u006d\u0065":"\u0046\u0069\u006c\u0074\u0065\u0072\u0043\u006f\u006e\u0074\u0065\u006e\u0074","\u0070\u0072\u006f\u0070\u0073":{'\u0070\u0061\u0072\u0061\u006d\u0073':Object},data(){return JSON['\x70\x61\x72\x73\x65']("}\nllun :\"paMlav\" \n,][ :\"tsiLlav\" \n,][ :\"tsiLlaVloc\" \n,llun :\"noitpo\" \n,eslaf :\"llAsi\" \n,\"inim\" :\"ezis\" \n{".split("").reverse().join(""));},created(){this['\x6c\x6f\x61\x64']();},'\u006d\u0065\u0074\u0068\u006f\u0064\u0073':{getShowValue(val){if(this['\x76\x61\x6c\x4d\x61\x70']&&Object['\x6b\x65\x79\x73'](this['\x76\x61\x6c\x4d\x61\x70'])['\x6c\x65\x6e\x67\x74\x68']>(927665^927665)){return this['\x76\x61\x6c\x4d\x61\x70'][val];}else{return val;}},load(){const{'\u0024\u0074\u0061\u0062\u006c\u0065':$table,'\u0063\u006f\u006c\u0075\u006d\u006e':column}=this['\x70\x61\x72\x61\x6d\x73'];const{'\u0066\u0075\u006c\u006c\u0043\u006f\u006c\u0075\u006d\u006e':fullColumn,"tableColumn":tableColumn}=$table['\x67\x65\x74\x54\x61\x62\x6c\x65\x43\x6f\x6c\x75\x6d\x6e']();const{'\u0066\u0075\u006c\u006c\u0044\u0061\u0074\u0061':fullData}=$table['\x67\x65\x74\x54\x61\x62\x6c\x65\x44\x61\x74\x61']();const option=column['\x66\x69\x6c\x74\x65\x72\x73'][358191^358191];if(!option['\x64\x61\x74\x61']){option['\x64\x61\x74\x61']=JSON['\x70\x61\x72\x73\x65']("}\n\"\" :\"laVs\" \n{".split("").reverse().join(""));}else if(option['\x64\x61\x74\x61']['\x73\x56\x61\x6c']===null||option['\x64\x61\x74\x61']['\x73\x56\x61\x6c']===undefined){option['\x64\x61\x74\x61']['\x73\x56\x61\x6c']=function(){return"";}();}if(!option['\x64\x61\x74\x61']['\x68\x61\x73\x46\x69\x6c\x74\x65\x72']){this['\x69\x73\x41\x6c\x6c']=!![];}let vals=option['\x64\x61\x74\x61']&&option['\x64\x61\x74\x61']['\x76\x61\x6c\x73']?option['\x64\x61\x74\x61']['\x76\x61\x6c\x73']:[];let valMap=option['\x64\x61\x74\x61']&&option['\x64\x61\x74\x61']['\x76\x61\x6c\x4d\x61\x70']?option['\x64\x61\x74\x61']['\x76\x61\x6c\x4d\x61\x70']:null;let lsm=JSON['\x70\x61\x72\x73\x65']("}{".split("").reverse().join(""));let colValList=[];fullData['\x6d\x61\x70']((row,$rowIndex)=>{let cellValue=getFilterValue({'\u0072\u006f\u0077':row,'\u0024\u0072\u006f\u0077\u0049\u006e\u0064\u0065\u0078':$rowIndex,"$table":$table,"column":column});let sortValue=cellValue;let sortField=column['\x70\x61\x72\x61\x6d\x73']?.sortField;if(sortField){sortValue=row[sortField]??null;}if(lsm[cellValue]){lsm[cellValue]['\x63\x6f\x75\x6e\x74']=lsm[cellValue]['\x63\x6f\x75\x6e\x74']+(871588^871589);}else{lsm[cellValue]={'\u0063\u0068\u0065\u0063\u006b\u0065\u0064':!option['\x64\x61\x74\x61']['\x68\x61\x73\x46\x69\x6c\x74\x65\x72']||vals['\x69\x6e\x63\x6c\x75\x64\x65\x73'](cellValue),"\u0076\u0061\u006c\u0075\u0065":cellValue,'\u0073\u006f\u0072\u0074\u0056\u0061\u006c\u0075\u0065':sortValue,"count":1};}});for(let key in lsm){colValList['\x70\x75\x73\x68'](lsm[key]);}colValList=this['\x73\x6f\x72\x74\x42\x79\x46\x69\x65\x6c\x64'](colValList,"eulaVtros".split("").reverse().join(""));const columnsArr=[];this['\x6f\x70\x74\x69\x6f\x6e']=option;this['\x63\x6f\x6c\x56\x61\x6c\x4c\x69\x73\x74']=colValList;this['\x76\x61\x6c\x4c\x69\x73\x74']=colValList;this['\x76\x61\x6c\x4d\x61\x70']=valMap;let filterColumns=fullColumn['\x66\x69\x6c\x74\x65\x72']((row,$rowIndex)=>{return row['\x66\x69\x6c\x74\x65\x72\x52\x65\x6e\x64\x65\x72']&&row['\x66\x69\x6c\x74\x65\x72\x52\x65\x6e\x64\x65\x72']['\x6e\x61\x6d\x65']===_0x7b8(_0x0916cf[0])&&row['\x66\x69\x65\x6c\x64']!==column['\x66\x69\x65\x6c\x64'];});let datas=fullData['\x66\x69\x6c\x74\x65\x72']((row,$rowIndex)=>{let item=filterColumns['\x66\x69\x6e\x64'](filterColumn=>{let option1=filterColumn['\x66\x69\x6c\x74\x65\x72\x73'][732091^732091];if(!option1['\x64\x61\x74\x61']['\x68\x61\x73\x46\x69\x6c\x74\x65\x72']){return![];}const vals=option1['\x64\x61\x74\x61']['\x76\x61\x6c\x73']||[];let param=createParams({'\u0024\u0074\u0061\u0062\u006c\u0065':$table,'\u0072\u006f\u0077':row,'\u0063\u006f\u006c\u0075\u006d\u006e':filterColumn});let cellValue=getFilterValue(param);return!vals['\x69\x6e\x63\x6c\x75\x64\x65\x73'](cellValue);});return item===null||item===undefined;});let lsm2=JSON['\x70\x61\x72\x73\x65']("}{".split("").reverse().join(""));datas['\x6d\x61\x70']((row,$rowIndex)=>{let cellValue=getFilterValue({'\u0072\u006f\u0077':row,"\u0024\u0072\u006f\u0077\u0049\u006e\u0064\u0065\u0078":$rowIndex,"\u0024\u0074\u0061\u0062\u006c\u0065":$table,"\u0063\u006f\u006c\u0075\u006d\u006e":column});if(lsm2[cellValue]){lsm2[cellValue]['\x63\x6f\x75\x6e\x74']=lsm2[cellValue]['\x63\x6f\x75\x6e\x74']+(787082^787083);}else{lsm2[cellValue]={"\u0076\u0061\u006c\u0075\u0065":cellValue,'\u0063\u006f\u0075\u006e\u0074':1};}});colValList['\x66\x6f\x72\x45\x61\x63\x68'](colVal=>{let item=lsm2[colVal['\x76\x61\x6c\x75\x65']];if(item){colVal['\x66\x69\x6c\x74\x65\x72\x43\x6f\x75\x6e\x74']=item['\x63\x6f\x75\x6e\x74'];}else{colVal['\x66\x69\x6c\x74\x65\x72\x43\x6f\x75\x6e\x74']=242246^242246;}});this['\x73\x65\x61\x72\x63\x68\x45\x76\x65\x6e\x74']();},sortByField(array,field){return[...array]['\x73\x6f\x72\x74']((a,b)=>{const valA=a[field];const valB=b[field];if(valA===null||valA===undefined)return-(449065^449064);if(valB===null||valB===undefined)return 136352^136353;if((valA===null||valA===undefined)&&(valB===null||valB===undefined))return 353438^353438;const numA=Number(valA);const numB=Number(valB);if(!isNaN(numA)&&!isNaN(numB)){return numA-numB;}return String(valA)['\x6c\x6f\x63\x61\x6c\x65\x43\x6f\x6d\x70\x61\x72\x65'](String(valB));});},searchEvent(){let that=this;const{'\u006f\u0070\u0074\u0069\u006f\u006e':option,'\u0063\u006f\u006c\u0056\u0061\u006c\u004c\u0069\u0073\u0074':colValList}=this;this['\x76\x61\x6c\x4c\x69\x73\x74']=option['\x64\x61\x74\x61']['\x73\x56\x61\x6c']?colValList['\x66\x69\x6c\x74\x65\x72'](function(_0xfaa){let _0xa96=_0xfaa['\x76\x61\x6c\x75\x65'];return _0xa96['\x69\x6e\x64\x65\x78\x4f\x66'](option['\x64\x61\x74\x61']['\x73\x56\x61\x6c'])>-(120557^120556);}):colValList;let isAll=this['\x76\x61\x6c\x4c\x69\x73\x74']['\x65\x76\x65\x72\x79'](item=>{return item['\x63\x68\x65\x63\x6b\x65\x64']===!![];});this['\x69\x73\x41\x6c\x6c']=isAll;},changeAllEvent(){const{'\u0069\u0073\u0041\u006c\u006c':isAll}=this;this['\x76\x61\x6c\x4c\x69\x73\x74']['\x66\x6f\x72\x45\x61\x63\x68'](item=>{item['\x63\x68\x65\x63\x6b\x65\x64']=isAll;});},checkItem(checked){if(checked){let isAll=this['\x76\x61\x6c\x4c\x69\x73\x74']['\x65\x76\x65\x72\x79'](item=>{return item['\x63\x68\x65\x63\x6b\x65\x64']===!![];});this['\x69\x73\x41\x6c\x6c']=isAll;}else{this['\x69\x73\x41\x6c\x6c']=function(){return![];}();}},confirmFilterEvent(evnt){const{"\u0070\u0061\u0072\u0061\u006d\u0073":params,"\u006f\u0070\u0074\u0069\u006f\u006e":option,'\u0076\u0061\u006c\u004c\u0069\u0073\u0074':valList,'\u0063\u006f\u006c\u0056\u0061\u006c\u004c\u0069\u0073\u0074':colValList}=this;const{"\u0064\u0061\u0074\u0061":data}=option;const{"\u0024\u0070\u0061\u006e\u0065\u006c":$panel,'\u0024\u0074\u0061\u0062\u006c\u0065':$table}=params;let vals=valList['\x66\x69\x6c\x74\x65\x72'](item=>item['\x63\x68\x65\x63\x6b\x65\x64'])['\x6d\x61\x70'](item=>item['\x76\x61\x6c\x75\x65']);if(!option['\x64\x61\x74\x61']['\x73\x56\x61\x6c']&&colValList['\x6c\x65\x6e\x67\x74\x68']===vals['\x6c\x65\x6e\x67\x74\x68']){this['\x72\x65\x73\x65\x74\x46\x69\x6c\x74\x65\x72\x45\x76\x65\x6e\x74']();return;}data['\x76\x61\x6c\x73']=vals;option['\x64\x61\x74\x61']['\x68\x61\x73\x46\x69\x6c\x74\x65\x72']=!![];$panel['\x63\x68\x61\x6e\x67\x65\x4f\x70\x74\x69\x6f\x6e'](evnt,!![],option);$panel['\x63\x6f\x6e\x66\x69\x72\x6d\x46\x69\x6c\x74\x65\x72']();$table['\x73\x65\x74\x41\x6c\x6c\x43\x68\x65\x63\x6b\x62\x6f\x78\x52\x6f\x77'](![]);},resetFilterEvent(){const{"\u0024\u0070\u0061\u006e\u0065\u006c":$panel,'\u0024\u0074\u0061\u0062\u006c\u0065':$table}=this['\x70\x61\x72\x61\x6d\x73'];this['\x6f\x70\x74\x69\x6f\x6e']['\x64\x61\x74\x61']['\x68\x61\x73\x46\x69\x6c\x74\x65\x72']=function(){return![];}();$panel['\x72\x65\x73\x65\x74\x46\x69\x6c\x74\x65\x72']();$table['\x73\x65\x74\x41\x6c\x6c\x43\x68\x65\x63\x6b\x62\x6f\x78\x52\x6f\x77'](![]);}}},'\u0063\u006f\u006d\u0070\u006c\u0065\u0078\u004d\u0069\u0078\u0069\u006e':{"name":"\u0046\u0069\u006c\u0074\u0065\u0072\u0043\u006f\u006d\u0070\u006c\u0065\u0078","\u0070\u0072\u006f\u0070\u0073":{'\u0070\u0061\u0072\u0061\u006d\u0073':Object,"\u0065\u0076\u0065\u006e\u0074\u0073":Object},data(){return JSON['\x70\x61\x72\x73\x65'](_0x7b8(_0x0916cf[1]));},created(){this['\x6c\x6f\x61\x64']();},"\u006d\u0065\u0074\u0068\u006f\u0064\u0073":{load(){const{"column":column}=this['\x70\x61\x72\x61\x6d\x73'];const option=column['\x66\x69\x6c\x74\x65\x72\x73'][493607^493607];if(!option['\x64\x61\x74\x61']){option['\x64\x61\x74\x61']=JSON['\x70\x61\x72\x73\x65'](_0x7b8(_0x0916cf[2]));}else if(!option['\x64\x61\x74\x61']['\x74\x79\x70\x65']){option['\x64\x61\x74\x61']['\x74\x79\x70\x65']=function(){return _0x7b8(_0x0916cf[3]);}();}this['\x63\x6f\x6c\x75\x6d\x6e']=column;this['\x6f\x70\x74\x69\x6f\x6e']=option;},changeOptionEvent(){const{'\u0070\u0061\u0072\u0061\u006d\u0073':params,"\u006f\u0070\u0074\u0069\u006f\u006e":option}=this;const{'\u0024\u0070\u0061\u006e\u0065\u006c':$panel}=params;const checked=!!option['\x64\x61\x74\x61']['\x6e\x61\x6d\x65'];$panel['\x63\x68\x61\x6e\x67\x65\x4f\x70\x74\x69\x6f\x6e'](null,checked,option);},confirmEvent(){const{'\u0024\u0070\u0061\u006e\u0065\u006c':$panel,"column":column}=this['\x70\x61\x72\x61\x6d\x73'];$panel['\x63\x6f\x6e\x66\x69\x72\x6d\x46\x69\x6c\x74\x65\x72']();},resetEvent(){const{'\u0024\u0070\u0061\u006e\u0065\u006c':$panel}=this['\x70\x61\x72\x61\x6d\x73'];$panel['\x72\x65\x73\x65\x74\x46\x69\x6c\x74\x65\x72']();}}},'\u0069\u006e\u0070\u0075\u0074\u004d\u0069\u0078\u0069\u006e':{'\u006e\u0061\u006d\u0065':"\u0046\u0069\u006c\u0074\u0065\u0072\u0049\u006e\u0070\u0075\u0074",'\u0070\u0072\u006f\u0070\u0073':{'\u0070\u0061\u0072\u0061\u006d\u0073':Object},data(){return JSON['\x70\x61\x72\x73\x65'](_0x7b8(_0x0916cf[4]));},created(){this['\x6c\x6f\x61\x64']();},'\u006d\u0065\u0074\u0068\u006f\u0064\u0073':{load(){const{'\u0063\u006f\u006c\u0075\u006d\u006e':column}=this['\x70\x61\x72\x61\x6d\x73'];const option=column['\x66\x69\x6c\x74\x65\x72\x73'][850243^850243];this['\x63\x6f\x6c\x75\x6d\x6e']=column;this['\x6f\x70\x74\x69\x6f\x6e']=option;},changeOptionEvent(){const{"\u0070\u0061\u0072\u0061\u006d\u0073":params,'\u006f\u0070\u0074\u0069\u006f\u006e':option}=this;const{"$panel":$panel}=params;const checked=!!option['\x64\x61\x74\x61'];$panel['\x63\x68\x61\x6e\x67\x65\x4f\x70\x74\x69\x6f\x6e'](null,checked,option);},keyupEvent({'\u0024\u0065\u0076\u0065\u006e\u0074':$event}){const{'\u0070\u0061\u0072\u0061\u006d\u0073':params}=this;const{"\u0024\u0070\u0061\u006e\u0065\u006c":$panel}=params;if($event['\x6b\x65\x79\x43\x6f\x64\x65']===(952438^952443)){$panel['\x63\x6f\x6e\x66\x69\x72\x6d\x46\x69\x6c\x74\x65\x72']();}}}}};
|
|
304
4
|
export const inputMixin = modules.inputMixin;
|
|
305
5
|
export const complexMixin = modules.complexMixin;
|
|
306
6
|
export const contentMixin = modules.contentMixin;
|
|
@@ -100,6 +100,7 @@ export default {
|
|
|
100
100
|
2: "date",
|
|
101
101
|
3: "number",
|
|
102
102
|
4: "text",
|
|
103
|
+
5: "select",
|
|
103
104
|
},
|
|
104
105
|
};
|
|
105
106
|
},
|
|
@@ -150,6 +151,20 @@ export default {
|
|
|
150
151
|
options.label = item.f_field_name;
|
|
151
152
|
options.required = item.f_is_required;
|
|
152
153
|
tableCell.widgetList.push(widget);
|
|
154
|
+
|
|
155
|
+
if (type === "select") {
|
|
156
|
+
if (item.f_enum_values) {
|
|
157
|
+
let enumValues = item.f_enum_values
|
|
158
|
+
.split(",")
|
|
159
|
+
.filter((value) => !!value);
|
|
160
|
+
options.optionItems = enumValues.map((value) => ({
|
|
161
|
+
label: value,
|
|
162
|
+
value: value,
|
|
163
|
+
}));
|
|
164
|
+
} else {
|
|
165
|
+
options.optionItems = [];
|
|
166
|
+
}
|
|
167
|
+
}
|
|
153
168
|
}
|
|
154
169
|
|
|
155
170
|
if (index === -1) {
|
|
@@ -281,9 +296,10 @@ export default {
|
|
|
281
296
|
{
|
|
282
297
|
f_field_name: "姓名", //显示名称
|
|
283
298
|
f_key: "name", //字段名
|
|
284
|
-
f_field_type: 4, //类型,0: "文本输入框",1: "多行输入框",2: "日期输入框",3: "数字输入框",4:"纯文本"
|
|
299
|
+
f_field_type: 4, //类型,0: "文本输入框",1: "多行输入框",2: "日期输入框",3: "数字输入框",4:"纯文本",5: "下拉框"
|
|
285
300
|
f_is_required: false, //是否必填
|
|
286
301
|
f_field_value: "张三", //字段值
|
|
302
|
+
f_enum_values: "张三,李四,王五", //下拉框选项
|
|
287
303
|
},
|
|
288
304
|
];
|
|
289
305
|
let a = 1;
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
账号登录: "Account Login",
|
|
3
|
+
请输入用户名: "Please enter a username",
|
|
4
|
+
请输入密码: "Please enter a password",
|
|
5
|
+
记住密码: "Remember password",
|
|
6
|
+
登录: "Login",
|
|
7
|
+
手机登录: "Phone Login",
|
|
8
|
+
请输入手机号: "Please enter a phone number",
|
|
9
|
+
请输入验证码: "Please enter a verification code",
|
|
10
|
+
扫码登录: "Scan Login",
|
|
11
|
+
"扫一扫,登录系统": "Scan the QR code to log in to the system",
|
|
12
|
+
二维码失效: "QR code expired",
|
|
13
|
+
广州同望科技发展有限公司:
|
|
14
|
+
"Guangzhou Tongwang Technology Development Co., Ltd.",
|
|
15
|
+
获取验证码: "Get Verification Code",
|
|
16
|
+
请输入手机号和验证码: "Please enter a phone number and verification code",
|
|
17
|
+
请输入手机号: "Please enter a phone number",
|
|
18
|
+
"60秒后重新获取": "60 seconds after re-getting",
|
|
19
|
+
"{time}秒后重新获取": "{time} seconds after re-getting",
|
|
20
|
+
登录成功: "Login Successful",
|
|
21
|
+
"components.errorMsg.title": "Tips",
|
|
22
|
+
"system.button.confirm2": "Confirm",
|
|
23
|
+
"components.errorMsg.detail": "Detail",
|
|
24
|
+
"components.errorMsg.collapse": "Collapse",
|
|
25
|
+
"用户名或密码错误!": "Please enter the correct account and password.",
|
|
26
|
+
"用户名或密码错误!": "Please enter the correct account and password.",
|
|
27
|
+
};
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
账号登录: "账号登录",
|
|
3
|
+
请输入用户名: "请输入用户名",
|
|
4
|
+
请输入密码: "请输入密码",
|
|
5
|
+
记住密码: "记住密码",
|
|
6
|
+
登录: "登录",
|
|
7
|
+
手机登录: "手机登录",
|
|
8
|
+
请输入手机号: "请输入手机号",
|
|
9
|
+
请输入验证码: "请输入验证码",
|
|
10
|
+
扫码登录: "扫码登录",
|
|
11
|
+
"扫一扫,登录系统": "扫一扫,登录系统",
|
|
12
|
+
二维码失效: "二维码失效",
|
|
13
|
+
广州同望科技发展有限公司: "广州同望科技发展有限公司",
|
|
14
|
+
获取验证码: "获取验证码",
|
|
15
|
+
请输入手机号和验证码: "请输入手机号和验证码",
|
|
16
|
+
请输入手机号: "请输入手机号",
|
|
17
|
+
"60秒后重新获取": "60秒后重新获取",
|
|
18
|
+
"{time}秒后重新获取": "{time}秒后重新获取",
|
|
19
|
+
登录成功: "登录成功",
|
|
20
|
+
"components.errorMsg.title": "提示",
|
|
21
|
+
"system.button.confirm2": "确 定",
|
|
22
|
+
"components.errorMsg.detail": "详情",
|
|
23
|
+
"components.errorMsg.collapse": "收起",
|
|
24
|
+
"用户名或密码错误!": "用户名或密码错误!",
|
|
25
|
+
"用户名或密码错误!": "用户名或密码错误!",
|
|
26
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export const AGENT_STATE_MAP = {
|
|
2
|
+
"-1": { label: "离线", className: "is-offline" },
|
|
3
|
+
"0": { label: "忙碌", className: "is-busy" },
|
|
4
|
+
"1": { label: "空闲", className: "is-idle" },
|
|
5
|
+
"3": { label: "通话中", className: "is-talking" },
|
|
6
|
+
"99": { label: "异常", className: "is-busy" },
|
|
7
|
+
"114": { label: "小休", className: "is-rest" },
|
|
8
|
+
"115": { label: "后处理", className: "is-busy" },
|
|
9
|
+
"116": { label: "培训", className: "is-rest" },
|
|
10
|
+
"117": { label: "会议", className: "is-rest" },
|
|
11
|
+
"118": { label: "用餐", className: "is-rest" },
|
|
12
|
+
"119": { label: "活动", className: "is-rest" },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export function getAgentStateMeta(state) {
|
|
16
|
+
const key = state === undefined || state === null ? "-1" : String(state);
|
|
17
|
+
return AGENT_STATE_MAP[key] || { label: "未知", className: "is-busy" };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** 小休/用餐等置忙子状态,不应被 AgentStateBusy 无参推送覆盖为「忙碌」 */
|
|
21
|
+
export const REST_AGENT_STATES = new Set([
|
|
22
|
+
"114",
|
|
23
|
+
"115",
|
|
24
|
+
"116",
|
|
25
|
+
"117",
|
|
26
|
+
"118",
|
|
27
|
+
"119",
|
|
28
|
+
]);
|
|
29
|
+
|
|
30
|
+
export function isRestAgentState(state) {
|
|
31
|
+
return REST_AGENT_STATES.has(String(state));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** 允许外呼的座席状态(空闲、忙碌及小休/用餐等,见智齿文档 4.4 / 4.7) */
|
|
35
|
+
export const DIALABLE_AGENT_STATES = new Set([
|
|
36
|
+
"0",
|
|
37
|
+
"1",
|
|
38
|
+
"114",
|
|
39
|
+
"116",
|
|
40
|
+
"117",
|
|
41
|
+
"118",
|
|
42
|
+
"119",
|
|
43
|
+
]);
|
|
44
|
+
|
|
45
|
+
export function canAgentDial(state) {
|
|
46
|
+
return DIALABLE_AGENT_STATES.has(String(state));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 从 queryAgentState / WebSocket 载荷解析展示用状态。
|
|
51
|
+
* 小休、用餐等子状态时 agentState 常为 "0",实际子状态在 busyCause(与文档一致,与 agentState 同码)。
|
|
52
|
+
*/
|
|
53
|
+
export function resolveAgentStateFromPayload(source) {
|
|
54
|
+
if (!source) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
const busyCause = source.busyCause ?? source.busycause;
|
|
58
|
+
if (busyCause !== undefined && busyCause !== null && busyCause !== "") {
|
|
59
|
+
const cause = String(busyCause);
|
|
60
|
+
if (isRestAgentState(cause) || cause === "115") {
|
|
61
|
+
return cause;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const agentState = source.agentState ?? source.agentstate;
|
|
65
|
+
if (agentState !== undefined && agentState !== null && agentState !== "") {
|
|
66
|
+
return String(agentState);
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 智齿呼叫中心初始化参数,请在 .env 中配置或部署前修改。
|
|
3
|
+
* client_id / client_secret 对应控制台 appId / app_key
|
|
4
|
+
*/
|
|
5
|
+
const toNumber = (value, fallback) => {
|
|
6
|
+
const num = Number(value);
|
|
7
|
+
return Number.isNaN(num) ? fallback : num;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
client_id: process.env.VUE_APP_CALL_CENTER_CLIENT_ID || "",
|
|
12
|
+
client_secret: process.env.VUE_APP_CALL_CENTER_CLIENT_SECRET || "",
|
|
13
|
+
companyId: process.env.VUE_APP_CALL_CENTER_COMPANY_ID || "",
|
|
14
|
+
appId: process.env.VUE_APP_CALL_CENTER_APP_ID || "",
|
|
15
|
+
|
|
16
|
+
// agentId: process.env.VUE_APP_CALL_CENTER_AGENT_ID || "",
|
|
17
|
+
// groupId: process.env.VUE_APP_CALL_CENTER_GROUP_ID || "",
|
|
18
|
+
// voipAccount: process.env.VUE_APP_CALL_CENTER_VOIP_ACCOUNT || "",
|
|
19
|
+
// callWay: toNumber(process.env.VUE_APP_CALL_CENTER_CALL_WAY, 1),
|
|
20
|
+
|
|
21
|
+
displayNumber: process.env.VUE_APP_CALL_CENTER_DISPLAY_NUMBER || "",
|
|
22
|
+
};
|