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

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

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

Loading…
Cancel
Save