|
@@ -38,6 +38,23 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="来源">
|
|
|
|
+ <el-select
|
|
|
|
+ collapse-tags
|
|
|
|
+ clearable
|
|
|
|
+ v-model="form.client"
|
|
|
|
+ placeholder="请选择来源"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in client"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ :disabled="item.disabled"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item style="float: right">
|
|
<el-form-item style="float: right">
|
|
<el-button type="primary" @click="regularData">查询</el-button>
|
|
<el-button type="primary" @click="regularData">查询</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -109,12 +126,14 @@ export default {
|
|
form: {
|
|
form: {
|
|
app: '',
|
|
app: '',
|
|
lidu: '',
|
|
lidu: '',
|
|
|
|
+ client: -1
|
|
},
|
|
},
|
|
total: {},
|
|
total: {},
|
|
tableData: [],
|
|
tableData: [],
|
|
cycle: [],
|
|
cycle: [],
|
|
lidu: [],
|
|
lidu: [],
|
|
realForm: {},
|
|
realForm: {},
|
|
|
|
+ client: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -124,7 +143,8 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
async init() {
|
|
async init() {
|
|
if (chart && chart.dispose) chart.dispose();
|
|
if (chart && chart.dispose) chart.dispose();
|
|
- const { source, appli, lidu } = await this.getAppListFunc();
|
|
|
|
|
|
+ const { source, appli, lidu, clentli, clentV } =
|
|
|
|
+ await this.getAppListFunc();
|
|
appli.map(v => {
|
|
appli.map(v => {
|
|
if ((length.length && source[v.mcode]) || source.length === 0)
|
|
if ((length.length && source[v.mcode]) || source.length === 0)
|
|
this.cycle.push({
|
|
this.cycle.push({
|
|
@@ -138,18 +158,44 @@ export default {
|
|
label: v.mname,
|
|
label: v.mname,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
|
|
+ this.client = this.verifyList(
|
|
|
|
+ clentli,
|
|
|
|
+ clentV,
|
|
|
|
+ {
|
|
|
|
+ value: 'mcode',
|
|
|
|
+ label: 'mname',
|
|
|
|
+ },
|
|
|
|
+ true
|
|
|
|
+ );
|
|
this.form = {
|
|
this.form = {
|
|
// app: (this.cycle[0] || { value: "" }).value,
|
|
// app: (this.cycle[0] || { value: "" }).value,
|
|
app: defaultAppNameFunc(this.cycle),
|
|
app: defaultAppNameFunc(this.cycle),
|
|
lidu: '60',
|
|
lidu: '60',
|
|
|
|
+ client: -1
|
|
};
|
|
};
|
|
this.regularData();
|
|
this.regularData();
|
|
},
|
|
},
|
|
|
|
+ verifyList(list, verify, obj, more) {
|
|
|
|
+ if (!obj) return;
|
|
|
|
+ let li = list || [];
|
|
|
|
+ const out = [];
|
|
|
|
+ more && out.push({ value: -1, label: '不限' });
|
|
|
|
+ for (let i = 0; i < li.length; i++) {
|
|
|
|
+ const v = li[i];
|
|
|
|
+ if (verify.length !== 0 && !verify[v.mcode]) continue;
|
|
|
|
+ out.push({
|
|
|
|
+ value: v[obj.value],
|
|
|
|
+ label: v[obj.label],
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return out;
|
|
|
|
+ },
|
|
regularData() {
|
|
regularData() {
|
|
if (time) clearInterval(time);
|
|
if (time) clearInterval(time);
|
|
this.realForm = {
|
|
this.realForm = {
|
|
appName: this.form.app,
|
|
appName: this.form.app,
|
|
minute: this.form.lidu,
|
|
minute: this.form.lidu,
|
|
|
|
+ lib: this.form.client == -1 ? undefined : this.form.client,
|
|
};
|
|
};
|
|
this.onSubmit();
|
|
this.onSubmit();
|
|
time = setInterval(this.onSubmit, 5000);
|
|
time = setInterval(this.onSubmit, 5000);
|
|
@@ -306,22 +352,28 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
async getAppListFunc() {
|
|
async getAppListFunc() {
|
|
- const { r, li, lidu } = await this.getAppListOri();
|
|
|
|
|
|
+ const { r, li, lidu, clientList } = await this.getAppListOri();
|
|
let source = {
|
|
let source = {
|
|
length: 0,
|
|
length: 0,
|
|
},
|
|
},
|
|
appli = [];
|
|
appli = [];
|
|
- let prvList = r.output.data.prvRolectrl || [];
|
|
|
|
|
|
+ let clentV = { length: 0 },
|
|
|
|
+ clentli = [];
|
|
|
|
+ let prvList =
|
|
|
|
+ r && r.output && r.output.data ? r.output.data.prvRolectrl || [] : [];
|
|
for (let i = 0; i < prvList.length; i++) {
|
|
for (let i = 0; i < prvList.length; i++) {
|
|
const v = prvList[i];
|
|
const v = prvList[i];
|
|
if (v.controlid == 'RMT_SOURCE')
|
|
if (v.controlid == 'RMT_SOURCE')
|
|
(source[v.detid] = true), (source.length = source.length + 1);
|
|
(source[v.detid] = true), (source.length = source.length + 1);
|
|
}
|
|
}
|
|
if (li.status === '0') appli = li.output.data || [];
|
|
if (li.status === '0') appli = li.output.data || [];
|
|
|
|
+ if (clientList.length) clentli = clientList || [];
|
|
return {
|
|
return {
|
|
source,
|
|
source,
|
|
appli,
|
|
appli,
|
|
lidu,
|
|
lidu,
|
|
|
|
+ clentV,
|
|
|
|
+ clentli,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async getAppListOri() {
|
|
async getAppListOri() {
|
|
@@ -334,19 +386,25 @@ export default {
|
|
menuid: 400,
|
|
menuid: 400,
|
|
roleid,
|
|
roleid,
|
|
});
|
|
});
|
|
|
|
+ // 端列表
|
|
const li = await getAppList({
|
|
const li = await getAppList({
|
|
exportMark: '0',
|
|
exportMark: '0',
|
|
gcode: 'SOURCE',
|
|
gcode: 'SOURCE',
|
|
pageid: 1,
|
|
pageid: 1,
|
|
pagesize: 1000,
|
|
pagesize: 1000,
|
|
});
|
|
});
|
|
|
|
+ const cycle = li.output ? li.output.data || [] : [];
|
|
|
|
+ const clientList = await getSearchData({
|
|
|
|
+ gcode: 'CLIENT_TYPE',
|
|
|
|
+ source: defaultAppNameFunc(cycle, 'mname'),
|
|
|
|
+ });
|
|
|
|
|
|
const defaultAppName = li.status == '0' ? li.output.data[0].mname : '';
|
|
const defaultAppName = li.status == '0' ? li.output.data[0].mname : '';
|
|
const lidu = await getSearchData({
|
|
const lidu = await getSearchData({
|
|
gcode: 'TIME_MINUTE',
|
|
gcode: 'TIME_MINUTE',
|
|
source: defaultAppName,
|
|
source: defaultAppName,
|
|
});
|
|
});
|
|
- return { r, li, lidu };
|
|
|
|
|
|
+ return { r, li, lidu, clientList };
|
|
},
|
|
},
|
|
},
|
|
},
|
|
components: { countTo },
|
|
components: { countTo },
|