Commit 068ad2d1 by ‘巴博尔’

修改首页

parent 18d9cde6
......@@ -117,9 +117,18 @@ export function companyPlistGet(query) {
// 设置时间
export function employeesSetWorkHourPut(data) {
return request({
url: "/merchant/app/employees/setWorkHour",
method: "put",
data: data,
});
}
\ No newline at end of file
return request({
url: "/merchant/app/employees/setWorkHour",
method: "put",
data: data,
});
}
// 机构
export function companyListGet(query) {
return request({
url: `/system/data/companyList`,
method: "get",
params: query,
});
}
......@@ -8,7 +8,7 @@
<div class="index-content-nav-item-top">
<h3>所属城市</h3>
</div>
<h2>{{cityName ? cityName : ''}}</h2>
<h2>{{ cityName ? cityName : "" }}</h2>
</div>
</el-col>
<el-col :span="4">
......@@ -188,6 +188,40 @@
>
</el-option>
</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>
<!-- <h2>总量:{{ sumF }}</h2> -->
......@@ -232,6 +266,7 @@
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "./dashboard/mixins/resize";
import { cityVoListGET } from "@/api/hispotalManage/hospital";
const animationDuration = 3000;
import {
dataUserGet,
......@@ -240,17 +275,22 @@ import {
platformRevenueGet,
orderQuantityGet,
orderQuantityEchartsGet,
companyListGet,
} from "@/api/index.js";
import { mapGetters } from "vuex";
export default {
name: "Index",
mixins: [resize],
computed: {
...mapGetters(["user","cityName"]),
...mapGetters(["user", "cityName"]),
},
data() {
return {
// 版本号
companyId: "",
companyList: [],
cityVoList: [],
cityId: "",
version: "4.8.0",
valueA: 1,
sumA: 0,
......@@ -290,6 +330,7 @@ export default {
this.dataEmployeesAxios();
if (this.user.roleId != 3) {
this.saleroomAxios();
this.cityVoListAxios();
}
this.platformRevenueAxios();
this.orderQuantityAxios();
......@@ -303,6 +344,28 @@ export default {
this.chart = null;
},
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) {
console.log("changeDataer", e);
if (!e) {
......@@ -319,6 +382,8 @@ export default {
async orderQuantityEchartsAxios() {
let params = {
type: this.valueF,
cityId: this.cityId,
companyId: this.companyId,
};
if ([0, 1].includes(this.valueF)) {
} 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