# Conflicts:
#	src/views/TailInsightDetails/rearWingInformationList/index.vue
prod
阿丽 3 years ago
commit cfc15e4535

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-25 13:12:20
* @LastEditTime: 2021-11-08 10:07:06
* @LastEditTime: 2021-11-08 16:13:39
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/ModelInsight/index.vue
@ -113,10 +113,6 @@ export default {
this.modelData();
},
methods: {
//
goRouter(path, query = {}) {
this.$router.push({path: path, query: query});
},
openModel() {
this.modelShow = true;
},

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-13 18:14:01
* @LastEditTime: 2021-10-13 19:43:11
* @LastEditTime: 2021-11-08 16:50:27
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/TailInsightDetails/rearWingInformationList/index.vue
@ -11,8 +11,8 @@
<v-label-div title="尾翼信息列表"></v-label-div>
<div class="rwl-inner">
<a-form layout="inline" :form="form">
<a-form-item label="来源选择">
<a-select v-model="form.s1" style="width: 240px">
<!-- <a-form-item label="来源选择">
<a-select v-model="form.sSource" style="width: 240px">
<a-select-option value="jack">
Jack
</a-select-option>
@ -23,49 +23,45 @@
yiminghe
</a-select-option>
</a-select>
</a-form-item>
</a-form-item> -->
<a-form-item label="车型">
<a-select v-model="form.s2" style="width: 240px">
<a-select-option value="jack">
Jack
</a-select-option>
<a-select-option value="lucy">
Lucy
</a-select-option>
<a-select-option value="Yiminghe">
yiminghe
<a-select v-model="form.sSeriesName" style="width: 240px" @change="handlerChangeModel">
<a-select-option :value="item.name" v-for="(item,index) in models" :key="index">
{{item.name}}
</a-select-option>
</a-select>
</a-form-item>
</a-form>
<div class="rwl-tb">
<v-table :columns="columns" :data="tdata" :pagination="pagination"></v-table>
</div>
<v-table :columns="columns" :data="tdata" :pagination="pagination" @change="handlerPage"></v-table>
</div>
</div>
</div>
</template>
<script>
import {getList0528} from '@/api/TailInsightdetails'
import { getUserSeriesName } from "@/api/comm";
import { getList0528 } from "@/api/TailInsightdetails";
export default {
name: "rearWingInformationList",
data() {
return {
load: false,
form: {
s1: "",
s2: "",
sSource: "",
token: "",
ssBrand: "",
sBrand: "",
iPageIndex: 1,
iPageSize: 20,
sTimeType: 4,
sStartTime: '2021-11-01',
sEndTime: '2021-11-07'
sSeriesName: "",
},
pagination: {
"show-total": total => `${total}`
current: 1,
pageSize: 20,
total: 0,
"show-total": (total) => `${total}`,
},
models: [],
columns: [
{
title: "新闻标题",
@ -76,67 +72,100 @@ export default {
title: "来源",
key: "source",
dataIndex: "source",
width: 120
width: 120,
},
{
{
title: "作者",
key: "user_author",
dataIndex: "user_author",
width: 200
width: 200,
},
{
{
title: "发布时间",
key: "sourcetime",
dataIndex: "sourcetime",
width: 180
width: 180,
},
{
{
title: "调性",
key: "d",
dataIndex: "d",
width: 100
key: "affectionstr",
dataIndex: "affectionstr",
width: 100,
},
{
{
title: "车型",
key: "e",
dataIndex: "e",
width: 100
key: "modelName",
dataIndex: "modelName",
width: 100,
},
],
tdata: [
{
name: '为了研究长城吉利谁更强,我们砸了台吉利,',
a: '微博',
b: '车二哥说车',
c: '2021-08-18 12:00:00',
d: '正面',
e: 'A4'
}
]
tdata: [],
};
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.getBrand.brandname || '奥迪';
this.getData();
this.form.sBrand = this.getBrand.brandname || "奥迪";
this.getUserSeriesName(this.form.sBrand).then(() => {
this.getData();
});
},
methods: {
getData(){
this.load = true;
let obj = Object.assign({}, this.getCtime2, this.form);
getList0528(obj).then(res => {
let data = res.data || [];
this.list = data;
methods: {
//
getUserSeriesName() {
return new Promise((resolve, reject) => {
let obj = {
token: this.getToken,
sBrandName: this.form.sBrand,
};
getUserSeriesName(obj).then((res) => {
let data = res.data || [];
this.models = data;
if(this.models.length > 0) {
this.form.sSeriesName = this.models[0].name;
}
resolve(res)
}).catch(() => {
reject(false)
});
});
},
//
getData() {
let obj = Object.assign({}, this.getCtime2, this.form);
getList0528(obj).then((res) => {
let data = res.data || [];
let arr = [];
data.forEach((ele) => {
let o = { ...ele._source };
if (o.affections === 1) {
o.affectionstr = "正面";
} else if (o.affections === 2) {
o.affectionstr = "负面";
} else {
o.affectionstr = "中性";
}
o.modelName = this.form.sSeriesName;
arr.push(o);
});
this.tdata = arr;
let totalNum = res.totalNum || 0;
this.total = totalNum;
});
this.pagination.total = totalNum;
});
},
handlerChangeModel() {
this.form.iPageIndex = 1;
this.pagination.current = 1;
this.getData();
},
//
handlerPage(p) {
let iPageIndex = p.current;
this.form.iPageIndex = iPageIndex;
this.pagination.current = iPageIndex;
this.getData();
},
},
//
handlerPagnation(page) {
this.form.iPageIndex = page;
this.getDdta()
}
},
};
</script>

Loading…
Cancel
Save