Commit 068ad2d1 by ‘巴博尔’

修改首页

parent 18d9cde6
...@@ -117,9 +117,18 @@ export function companyPlistGet(query) { ...@@ -117,9 +117,18 @@ export function companyPlistGet(query) {
// 设置时间 // 设置时间
export function employeesSetWorkHourPut(data) { export function employeesSetWorkHourPut(data) {
return request({ return request({
url: "/merchant/app/employees/setWorkHour", url: "/merchant/app/employees/setWorkHour",
method: "put", method: "put",
data: data, data: data,
}); });
} }
\ No newline at end of file
// 机构
export function companyListGet(query) {
return request({
url: `/system/data/companyList`,
method: "get",
params: query,
});
}
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="index-content-nav-item-top"> <div class="index-content-nav-item-top">
<h3>所属城市</h3> <h3>所属城市</h3>
</div> </div>
<h2>{{cityName ? cityName : ''}}</h2> <h2>{{ cityName ? cityName : "" }}</h2>
</div> </div>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
...@@ -188,6 +188,40 @@ ...@@ -188,6 +188,40 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<template v-if="user.roleId != 3">
<el-select
v-model="cityId"
placeholder="请选择城市"
style="margin-left: 15px; width: 10em"
filterable
clearable=""
@change="changeCtypChange"
>
<el-option
v-for="item in cityVoList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
<el-select
v-model="companyId"
placeholder="请选择机构"
style="margin-left: 15px; width: 10em"
filterable
clearable=""
@change="orderQuantityEchartsAxios"
>
<el-option
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</template>
</div> </div>
</div> </div>
<!-- <h2>总量:{{ sumF }}</h2> --> <!-- <h2>总量:{{ sumF }}</h2> -->
...@@ -232,6 +266,7 @@ ...@@ -232,6 +266,7 @@
import * as echarts from "echarts"; import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme require("echarts/theme/macarons"); // echarts theme
import resize from "./dashboard/mixins/resize"; import resize from "./dashboard/mixins/resize";
import { cityVoListGET } from "@/api/hispotalManage/hospital";
const animationDuration = 3000; const animationDuration = 3000;
import { import {
dataUserGet, dataUserGet,
...@@ -240,17 +275,22 @@ import { ...@@ -240,17 +275,22 @@ import {
platformRevenueGet, platformRevenueGet,
orderQuantityGet, orderQuantityGet,
orderQuantityEchartsGet, orderQuantityEchartsGet,
companyListGet,
} from "@/api/index.js"; } from "@/api/index.js";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
name: "Index", name: "Index",
mixins: [resize], mixins: [resize],
computed: { computed: {
...mapGetters(["user","cityName"]), ...mapGetters(["user", "cityName"]),
}, },
data() { data() {
return { return {
// 版本号 // 版本号
companyId: "",
companyList: [],
cityVoList: [],
cityId: "",
version: "4.8.0", version: "4.8.0",
valueA: 1, valueA: 1,
sumA: 0, sumA: 0,
...@@ -290,6 +330,7 @@ export default { ...@@ -290,6 +330,7 @@ export default {
this.dataEmployeesAxios(); this.dataEmployeesAxios();
if (this.user.roleId != 3) { if (this.user.roleId != 3) {
this.saleroomAxios(); this.saleroomAxios();
this.cityVoListAxios();
} }
this.platformRevenueAxios(); this.platformRevenueAxios();
this.orderQuantityAxios(); this.orderQuantityAxios();
...@@ -303,6 +344,28 @@ export default { ...@@ -303,6 +344,28 @@ export default {
this.chart = null; this.chart = null;
}, },
methods: { methods: {
changeCtypChange() {
this.companyId = ''
this.companyList = []
this.companyListAxios()
},
async companyListAxios() {
const data_back = await companyListGet({
cityId: this.cityId
});
const { code, data } = data_back;
if (code === 200) {
this.companyList = data;
this.orderQuantityEchartsAxios()
}
},
async cityVoListAxios() {
const data_back = await cityVoListGET();
const { code, data } = data_back;
if (code === 200) {
this.cityVoList = data;
}
},
changeDataer(e) { changeDataer(e) {
console.log("changeDataer", e); console.log("changeDataer", e);
if (!e) { if (!e) {
...@@ -319,6 +382,8 @@ export default { ...@@ -319,6 +382,8 @@ export default {
async orderQuantityEchartsAxios() { async orderQuantityEchartsAxios() {
let params = { let params = {
type: this.valueF, type: this.valueF,
cityId: this.cityId,
companyId: this.companyId,
}; };
if ([0, 1].includes(this.valueF)) { if ([0, 1].includes(this.valueF)) {
} else if (this.valueF == 2) { } else if (this.valueF == 2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment