Browse Source

init

newStyle
lancer 3 years ago
parent
commit
9acca8211e
11 changed files with 1198 additions and 31 deletions
  1. +17
    -0
      src/api/modules/api.js
  2. +47
    -5
      src/views/Customer/AgentManagement.vue
  3. +7
    -4
      src/views/Customer/Companymanagement.vue
  4. +2
    -2
      src/views/Statistics/dataScreeAge.vue
  5. +2
    -2
      src/views/Statistics/dataScreeOrg.vue
  6. +3
    -2
      src/views/Statistics/dataScreeSys.vue
  7. +120
    -13
      src/views/Statistics/houseDataSys.vue
  8. +993
    -0
      src/views/Statistics/trend.vue
  9. +2
    -0
      src/views/admin/user/index.vue
  10. +4
    -2
      src/views/building/index.vue
  11. +1
    -1
      vue.config.js

+ 17
- 0
src/api/modules/api.js View File

@@ -877,3 +877,20 @@ export function houseTrends(data) {
data
})
}
// 趋势分析tab
export function receptionOverviewOfSystem(data) {
return request({
url: 'autoSR/cusStageStatistics/receptionOverviewOfSystem',
method:'post',
data
})
}

// 趋势分析折线图
export function receptionDataOfSystem(data) {
return request({
url: 'autoSR/cusStageStatistics/receptionDataOfSystem',
method:'post',
data
})
}

+ 47
- 5
src/views/Customer/AgentManagement.vue View File

@@ -221,10 +221,10 @@

</el-form-item> -->
<el-form-item label="管理员账号:" prop="managerPhone">
<el-input v-model="addagentobj.managerPhone"></el-input>
<el-input v-model="addagentobj.managerPhone" maxlength="11"></el-input>
</el-form-item>
<el-form-item label="密码:" prop="managerPassword">
<el-input v-model="addagentobj.managerPassword"></el-input>
<el-input :disabled='passFlag' show-password v-model="addagentobj.managerPassword"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -342,6 +342,44 @@
import { mapGetters } from "vuex";
export default {
data() {
var validatePass = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入管理员账号"));
} else {
if (value) {
// 验证电话号码
this.$api.api.verPhone(value).then((res) => {
// console.log(res);
// 判断数据是否已经有了
if (res.data) {
// 由用户
this.$api.api.userVerify({
orgType:localStorage.getItem('orgType'),
accountId:res.data.sysUser.accountId,
username:res.data.sysUser.username,
agentId:localStorage.getItem('agentId'),
orgCode:localStorage.getItem('orgCode'),
})
.then(res1=>{
callback();
this.passFlag=true
})
.catch(err=>{
console.log(err)
allback(new Error(err));
})
} else {
// 没有用户
// console.log("没有用户");
// callback(new Error("没有管理员账号"));
callback();

}
});
}
callback();
}
};
return {
options: [
{
@@ -353,6 +391,7 @@ export default {
label: "已过期",
},
],
passFlag:false,
dialogVisible:false,
dialogVisible2:false,
dialogVisible3:false,
@@ -418,7 +457,8 @@ export default {
// { required: true, message: '请选择运营人员', trigger: 'blur' },
// ],
managerPhone: [
{ required: true, message: '请输入管理员账号', trigger: 'blur' },
// { required: true, message: '请输入管理员账号', trigger: 'blur' },
{ validator: validatePass, trigger: "blur" },
],
managerPassword: [
{ required: true, message: '请输入管理员账号密码', trigger: 'blur' },
@@ -504,7 +544,8 @@ export default {
this.$api.api.zkoperationrecord({
orgType:1,
accountIds:this.operaForm.operationalPeople.join(','),
orgId: this.operaForm.orgId
orgId: this.operaForm.orgId,
operationType:1
})
.then(res=>{
console.log(res);
@@ -525,7 +566,8 @@ export default {
zkoperationrecordFindByOrg(orgId){
this.$api.api.zkoperationrecordFindByOrg({
orgType:'1',
orgId
orgId,
operationType:1
})
.then(res=>{
// console.log(res);


+ 7
- 4
src/views/Customer/Companymanagement.vue View File

@@ -467,9 +467,11 @@ export default {
if(valid){
// console.log(valid,this.operaForm);
this.$api.api.zkoperationrecordSaveCompany({
orgType:this.idx==0?'1':'2',
// orgType:this.idx==0?'1':'2',
orgType:2,
accountIds:this.operaForm.operationalPeople.join(','),
orgId: this.operaForm.orgId
orgId: this.operaForm.orgId,
operationType:this.idx==0?'1':'2'
})
.then(res=>{
console.log(res);
@@ -495,8 +497,9 @@ export default {
// console.log(idx,orgId);
// return
this.$api.api.zkoperationrecordFindByOrg({
orgType:idx==0?'1':'2',
orgId
orgType:2,
orgId,
operationType:this.idx==0?'1':'2'
})
.then(res=>{
// console.log(res);


+ 2
- 2
src/views/Statistics/dataScreeAge.vue View File

@@ -28,7 +28,7 @@
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.propertyName"
:label="item.name"
:value="item.id"
>
</el-option>
@@ -352,7 +352,7 @@ export default {
// 当为楼盘选择时
if (this.selValue == 1) {
this.$api.api
.findHouseByUser({
.findMyOrg({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {


+ 2
- 2
src/views/Statistics/dataScreeOrg.vue View File

@@ -288,7 +288,7 @@ export default {
secondTab: {},
thirdTab: {},
selValue: "1",
choicValue:localStorage.getItem('houseId'),
choicValue:localStorage.getItem('orgCode'),
houseList: [],
secindex: "1",
dateType: 4,
@@ -329,7 +329,7 @@ export default {
// 当为楼盘选择时
if (this.selValue == 1) {
this.$api.api
.findHouseByUser({
.findMyOrg({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {


+ 3
- 2
src/views/Statistics/dataScreeSys.vue View File

@@ -27,7 +27,7 @@
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.propertyName"
:label="item.name"
:value="item.id"
>
</el-option>
@@ -351,7 +351,7 @@ export default {
// 当为楼盘选择时
if (this.selValue == 1) {
this.$api.api
.findHouseByUser({
.findMyOrg({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {
@@ -901,4 +901,5 @@ export default {
display: flex;
justify-content: space-between;
}

</style>

+ 120
- 13
src/views/Statistics/houseDataSys.vue View File

@@ -27,7 +27,7 @@
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.propertyName"
:label="item.name"
:value="item.id"
>
</el-option>
@@ -143,25 +143,77 @@
</div>

<div class="container">
<div class="grid-content" @click="secondChange('1')">
<div class="grid-content" @click="secondChange('1')" style="height:auto; padding-bottom:10px;">
<div class="text1" :class="{ tophovese: secindex == 1 }">
活跃楼盘数
</div>
<div class="text2" :class="{ tophovese: secindex == 1 }">
{{ secondTab.receptionQuantity || 0 }}
{{ compare.houseQuantity || 0 }}
</div>
<div class="text33" v-if="selectTime1">
<div>
对比时段: <span style="text-indent: 20px;">{{compare1.houseQuantity||0}}</span>
</div>
<div :style="compare2.houseQuantity>=0 ? 'color:green;': 'color:red;'">
{{compare2.houseQuantity||0}}
</div>
</div>
</div>
<div class="grid-content" @click="secondChange('2')">
<div class="grid-content" @click="secondChange('2')" style="height:auto;">
<div class="text1" :class="{ tophovese: secindex == 2 }">
服务器内楼盘数
</div>
<div class="text2" :class="{ tophovese: secindex == 2 }">
{{ secondTab.receptionQuantity || 0 }}
{{ compare.houseQofEnough || 0 }}
</div>
<div class="text33" v-if="selectTime1">
<div>
对比时段: <span style="text-indent: 20px;">{{compare1.houseQofEnough||0}}</span>
</div>
<div :style="compare2.houseQofEnough>=0 ? 'color:green;': 'color:red;'">
{{compare2.houseQofEnough||0}}
</div>
</div>
</div>
</div>
<div id="main"></div>
</div>

<div class="app-box-er" v-if="selectTime1">
<template>
<el-table :data="tableData" style="width: 100%" height="320">
<el-table-column prop="time" label="时间" align="center">
</el-table-column>
<el-table-column prop="data1" label="时段一" align="center">
</el-table-column>
<el-table-column prop="data2" label="时段二" align="center">
</el-table-column>
<el-table-column prop="data3" label="变化" align="center">
<template slot-scope="scope">
<span
:style="
scope.row.data3>=0
? 'color:green;'
: 'color:red;'
"
>{{ scope.row.data3 }}</span>
</template>
</el-table-column>
</el-table>
</template>
<!-- <div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"
:current-page="currentPage3"
:page-sizes="[6, 10, 14, 20]"
:page-size="6"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div> -->
</div>
</div>
</template>

@@ -177,6 +229,7 @@ export default {
},
},
firstTab: {},
tableData:[],
secondTab: {},
thirdTab: {},
selValue: "0",
@@ -189,6 +242,7 @@ export default {
dateType: 4,
compare: {},
compare1: {},
compare2: {},
time: [],
customtime: [],
Confirmthecontrast: false,
@@ -243,12 +297,14 @@ export default {
if (this.selectTime1) {
// 有对比
this.compare1 = res.data.secondData;
// 将得到的三者的数据进行组装为一个数组
this.compare2 = res.data.thirdData;
}
this.getChars(1);
});
},
getChars(idx) {
if (!this.timeSelect1) {
if (!this.selectTime1) {
// console.log(idx);
let Strname = [];
let timeDate = [];
@@ -280,29 +336,72 @@ export default {
];
this.SwitchCARDS(arr, "main", timeDate, Strname);
} else {
let Strname = ["选择时间", "对比时间"];
console.log(223);
let Strname = ["时段一", "时段二"];
let timeDate = [];
// 判断是第几个然后对数据进行渲染
// 先处理时间
let arr1 = [];
let arr2 = [];
let arr3 = [];
if (idx == 1) {
this.compare.activeHouseQuantityList.map((item) => {
timeDate.push(item.time.substring(5, 10));
this.compare.activeHouseQuantityList.map((item, idx) => {
timeDate.push(
item.time.substring(5, 10) +
"VS" +
this.compare1.activeHouseQuantityList[idx].time.substring(5, 10)
);
arr1.push(item.data);
});
this.compare1.activeHouseQuantityList.map((item) => {
arr2.push(item.data);
});
this.compare2.contrastList.map((item) => {
arr3.push(item);
});
} else if (idx == 2) {
this.compare.houseQofEnoughList.map((item) => {
timeDate.push(item.time.substring(5, 10));
this.compare.houseQofEnoughList.map((item, idx) => {
timeDate.push(
item.time.substring(5, 10) +
"VS" +
this.compare1.houseQofEnoughList[idx].time.substring(5, 10)
);
arr1.push(item.data);
});
this.compare1.houseQofEnoughList.map((item) => {
arr1.push(item.data);
arr2.push(item.data);
});
this.compare2.contrastList2.map((item) => {
arr3.push(item);
});
}
let arr = [
{
name: Strname[0],
data: arr1,
type: "line",
smooth: true,
},
{
name: Strname[1],
data: arr2,
type: "line",
smooth: true,
},
];
this.SwitchCARDS(arr, "main", timeDate, Strname);
let tableData = [];
timeDate.map((item,idx) => {
let obj = {
time:item,
data1:arr1[idx],
data2:arr2[idx],
data3:arr3[idx],
};
tableData.push(obj)
});
this.tableData=tableData
// console.log(tableData);
}
},
//时间tab切换
@@ -368,7 +467,7 @@ export default {
// 当为楼盘选择时
if (this.selValue == 1) {
this.$api.api
.findHouseByUser({
.findMyOrg({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {
@@ -757,4 +856,12 @@ export default {
display: flex;
justify-content: space-between;
}
.text33{
font-size: 12px;
text-indent: 20px;
line-height: 20px;
display: flex;
justify-content: space-between;
margin-right: 20px;
}
</style>

+ 993
- 0
src/views/Statistics/trend.vue View File

@@ -0,0 +1,993 @@
<template>
<div class="box-center">
<!-- 头 -->
<div class="app-top">
<div class="app-titel" style="margin-left: 15px">
<el-select
v-model="selValue"
@change="selChange"
style="width: 100px"
placeholder="请选择"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<!-- -->
<div style="margin-left: 26px" v-if="selValue == 1">
<el-select
v-model="choicValue"
@change="valuechange"
placeholder="默认为全部"
clearable
>
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
<!-- 楼盘 -->
<div style="margin-left: 26px" v-else-if="selValue == 2">
<el-select
v-model="choicValue"
@change="valuechange"
placeholder="默认为全部"
clearable
>
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.propertyName"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div style="margin-left: 26px" v-else>
<el-select
v-model="choicValue"
@change="valuechange"
clearable
placeholder="默认为全部"
>
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.agentName"
:value="item.id"
>
</el-option>
</el-select>
</div>
</div>
</div>

<div class="app-box-er">
<div class="app-titel" style="margin-bottom: 10px">
<div class="titel-text" style="text-indent: 0">楼盘趋势</div>
<div class="toptimeqhuan">
<div :class="{ tophove: dateType == 4 }" @click="tabtimetap(4)">
近7天
</div>
<div :class="{ tophove: dateType == 5 }" @click="tabtimetap(5)">
近15天
</div>
<div :class="{ tophove: dateType == 6 }" @click="tabtimetap(6)">
近30天
</div>
</div>
<div style="margin-left: 20px">
<el-date-picker
@change="confirmtime"
v-model="customtime"
:clearable="false"
type="daterange"
range-separator="-"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
<div style="margin-left: 20px">
<el-checkbox v-model="checked" @change="radioChange"
>对比时间段</el-checkbox
>
</div>
<div
v-if="checked"
style="
margin-left: 20px;
border: 1px solid #dcdfe6;
min-width: 220px;
height: 30px;
border-radius: 4px;
max-width: 250px;
font-size: 13px;
line-height: 30px;
text-indent: 8px;
"
@click="show"
>
{{ selectTime1 ? "时段二: " : "请选择: " }}
<span v-if="selectTime1">{{ selectTime + "-" + selectTime1 }}</span>
<el-date-picker
style="opacity: 0"
v-model="time"
@change="timeChange"
ref="time"
type="date"
placeholder="选择日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
</div>

<div class="container">
<div
class="grid-content"
@click="secondChange('receptionCount')"
style="height: auto; padding-bottom: 10px"
>
<div
class="text1"
:class="{ tophovese: secindex == 'receptionCount' }"
>
接待量
</div>
<div
class="text2"
:class="{ tophovese: secindex == 'receptionCount' }"
>
{{ compare.receptionCount || 0 }}
</div>
<div class="text33" v-if="selectTime1">
<div>
对比时段:
<span style="text-indent: 20px">{{
compare1.receptionCount || 0
}}</span>
</div>
<div
:style="
compare2.receptionCount >= 0 ? 'color:green;' : 'color:red;'
"
>
{{ compare2.receptionCount || 0 }}
</div>
</div>
</div>
<div
class="grid-content"
@click="secondChange('avgDuration')"
style="height: auto"
>
<div class="text1" :class="{ tophovese: secindex == 'avgDuration' }">
平均接待时长(分钟)
</div>
<div class="text2" :class="{ tophovese: secindex == 'avgDuration' }">
{{ compare.avgDuration || 0 }}
</div>
<div class="text33" v-if="selectTime1">
<div>
对比时段:
<span style="text-indent: 20px">{{
compare1.avgDuration || 0
}}</span>
</div>
<div
:style="compare2.avgDuration >= 0 ? 'color:green;' : 'color:red;'"
>
{{ compare2.avgDuration || 0 }}
</div>
</div>
</div>
<div
class="grid-content"
@click="secondChange('prohibitedCustomer')"
style="height: auto; padding-bottom: 10px"
>
<div
class="text1"
:class="{ tophovese: secindex == 'prohibitedCustomer' }"
>
违禁接待次数
</div>
<div
class="text2"
:class="{ tophovese: secindex == 'prohibitedCustomer' }"
>
{{ compare.prohibitedCustomer || 0 }}
</div>
<div class="text33" v-if="selectTime1">
<div>
对比时段:
<span style="text-indent: 20px">{{
compare1.prohibitedCustomer || 0
}}</span>
</div>
<div
:style="
compare2.prohibitedCustomer >= 0 ? 'color:green;' : 'color:red;'
"
>
{{ compare2.prohibitedCustomer || 0 }}
</div>
</div>
</div>
<div
class="grid-content"
@click="secondChange('activeCustomer')"
style="height: auto; padding-bottom: 10px"
>
<div
class="text1"
:class="{ tophovese: secindex == 'activeCustomer' }"
>
有效接待
</div>
<div
class="text2"
:class="{ tophovese: secindex == 'activeCustomer' }"
>
{{ compare.activeCustomer || 0 }}
</div>
<div class="text33" v-if="selectTime1">
<div>
对比时段:
<span style="text-indent: 20px">{{
compare1.activeCustomer || 0
}}</span>
</div>
<div
:style="
compare2.activeCustomer >= 0 ? 'color:green;' : 'color:red;'
"
>
{{ compare2.activeCustomer || 0 }}
</div>
</div>
</div>
<div
class="grid-content"
@click="secondChange('activeCustomerRate')"
style="height: auto; padding-bottom: 10px"
>
<div
class="text1"
:class="{ tophovese: secindex == 'activeCustomerRate' }"
>
有效接待占比
</div>
<div
class="text2"
:class="{ tophovese: secindex == 'activeCustomerRate' }"
>
{{ compare.activeCustomerRate || 0 }}
</div>
<div class="text33" v-if="selectTime1">
<div>
对比时段:
<span style="text-indent: 20px">{{
compare1.activeCustomerRate || 0
}}</span>
</div>
<div
:style="
compare2.activeCustomerRate >= 0 ? 'color:green;' : 'color:red;'
"
>
{{ compare2.activeCustomerRate || 0 }}
</div>
</div>
</div>
<div
class="grid-content"
@click="secondChange('fraction')"
style="height: auto; padding-bottom: 10px"
>
<div class="text1" :class="{ tophovese: secindex == 'fraction' }">
平均执行率
</div>
<div class="text2" :class="{ tophovese: secindex == 'fraction' }">
{{ compare.fraction || 0 }}
</div>
<div class="text33" v-if="selectTime1">
<div>
对比时段:
<span style="text-indent: 20px">{{
compare1.fraction || 0
}}</span>
</div>
<div
:style="compare2.fraction >= 0 ? 'color:green;' : 'color:red;'"
>
{{ compare2.fraction || 0 }}
</div>
</div>
</div>
</div>
<div id="main"></div>
</div>

<div class="app-box-er" v-if="selectTime1">
<template>
<el-table :data="tableData" style="width: 100%" height="320">
<el-table-column prop="time" label="时间" align="center">
</el-table-column>
<el-table-column prop="data1" label="时段一" align="center">
</el-table-column>
<el-table-column prop="data2" label="时段二" align="center">
</el-table-column>
<el-table-column prop="data3" label="变化" align="center">
<template slot-scope="scope">
<span
:style="scope.row.data3 >= 0 ? 'color:green;' : 'color:red;'"
>{{ scope.row.data3 }}</span
>
</template>
</el-table-column>
</el-table>
</template>
<!-- <div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"
:current-page="currentPage3"
:page-sizes="[6, 10, 14, 20]"
:page-size="6"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div> -->
</div>
</div>
</template>

<script>
import * as echarts from "echarts";
export default {
data() {
return {
pickerOptions: {
disabledDate(time) {
//根据当前日期 --- 禁止选中之后的日期
return time.getTime() > Date.now();
},
},
firstTab: {},
tableData: [],
secondTab: {},
thirdTab: {},
selValue: "0",
checked: false,
selectTime1: "", //对比时间
selectTime: "", //对比时间
choicValue: localStorage.getItem("houseId"),
houseList: [],
secindex: "receptionCount",
dateType: 4,
compare: {},
compare1: {},
compare2: {},
time: [],
customtime: [],
Confirmthecontrast: false,
cardindex: "1",
options: [
{
label: "代理商",
value: "0",
},
{
label: "公司",
value: "1",
},
{
label: "楼盘",
value: "2",
},
],
};
},
mounted() {
this.getList();
this.tabtimetap(4);
},
methods: {
// 获取tab2
receptionOverviewOfSystem() {
console.log(this.time);
let obj = {
startDate: this.dateType ? "" : this.customtime[0],
endDate: this.dateType ? "" : this.customtime[1],
contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1,
dateType: this.dateType,
agentId: this.selValue == 0 ? this.choicValue : null,
orgCode: this.selValue == 1 ? this.choicValue : null,
houseId: this.selValue == 2 ? this.choicValue : null,
};
this.$api.api.receptionOverviewOfSystem(obj).then((res) => {
console.log(res);
// 数据处理
// 判断是否选择了对比
// return
this.compare = res.data.firstData;

if (this.selectTime1) {
// 有对比
this.compare1 = res.data.secondData;
// 将得到的三者的数据进行组装为一个数组
this.compare2 = res.data.thirdData;
}
this.getChars("receptionCount");
});
},
async getChars(str) {
let obj = {
startDate: this.dateType ? "" : this.customtime[0],
endDate: this.dateType ? "" : this.customtime[1],
contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1,
dateType: this.dateType,
agentId: this.selValue == 0 ? this.choicValue : null,
orgCode: this.selValue == 1 ? this.choicValue : null,
houseId: this.selValue == 2 ? this.choicValue : null,
};
if (!this.selectTime1) {
let res = await this.$api.api.receptionDataOfSystem(obj);
// console.log(res, str);
// return
// console.log(idx);
let Strname = ["时段一"];
let timeDate = [];
let arr1 = [];
// 判断是第几个然后对数据进行渲染
// 先处理时间
// console.log(timeDate);
res.data.firstValue.map((item) => {
timeDate.push(item.statDate.substring(5, 10));
arr1.push(item[str]);
});

let arr = [
{
name: Strname[0],
data: arr1,
type: "line",
smooth: true,
},
];
this.SwitchCARDS(arr, "main", timeDate, Strname);
} else {
let res = await this.$api.api.receptionDataOfSystem(obj);
// console.log(res, str);
// return
let Strname = ["时段一", "时段二"];
let timeDate = [];
// 判断是第几个然后对数据进行渲染
// 先处理时间
let arr1 = [];
let arr2 = [];
let arr3 = [];
res.data.firstValue.map((item, idx) => {
timeDate.push(
item.statDate.substring(5, 10) +
"VS" +
res.data.secondValue[idx].statDate.substring(5, 10)
);
arr1.push(item[str]);
arr2.push(res.data.secondValue[idx][str]);
arr3.push(res.data.thirdData[idx][str]);
});
let arr = [
{
name: Strname[0],
data: arr1,
type: "line",
smooth: true,
},
{
name: Strname[1],
data: arr2,
type: "line",
smooth: true,
},
];
this.SwitchCARDS(arr, "main", timeDate, Strname);
let tableData = [];
timeDate.map((item, idx) => {
let obj = {
time: item,
data1: arr1[idx],
data2: arr2[idx],
data3: arr3[idx],
};
tableData.push(obj);
});
this.tableData = tableData;
// console.log(tableData);
}
},
//时间tab切换
tabtimetap(i) {
this.dateType = i;
this.checked = false;
this.selectTime = "";
this.selectTime1 = "";
//给时间选择器赋值
let num = 24 * 3600 * 1000;
// 获取当前时间戳转换为日期格式
if (this.dateType == 4) {
num = 24 * 3600 * 1000 * 6;
}
if (this.dateType == 5) {
num = 24 * 3600 * 1000 * 14;
}
if (this.dateType == 6) {
num = 24 * 3600 * 1000 * 29;
}
this.customtime = [
this.timestampToTime(new Date().getTime() - num),
this.timestampToTime(new Date().getTime()),
];
this.$set(this, "time", null);
this.Confirmthecontrast = false;
this.receptionOverviewOfSystem();
},
show() {
this.$refs.time.pickerVisible = true;
},
timeChange(e) {
// 对数据进行处理
// 当当前选择的为自定义时间时
this.selectTime = "";
this.selectTime1 = "";
this.timeSelect(e);
},
timeSelect(e) {
// 获取今天昨天近一周
// 获取一天的时间戳
let num = 24 * 3600 * 1000;
// 获取当前时间戳转换为日期格式
if (this.dateType == 4) {
num = 24 * 3600 * 1000 * 6;
}
if (this.dateType == 5) {
num = 24 * 3600 * 1000 * 14;
}
if (this.dateType == 6) {
num = 24 * 3600 * 1000 * 29;
}
this.selectTime = e;
this.selectTime1 = this.timestampToTime(new Date(e).getTime() + num);
console.log(this.selectTime, this.selectTime1);
this.Confirmthecontrast = true;
// this.page.openTime = this.customtime[0];
// this.page.closeTime = this.customtime[1];
this.receptionOverviewOfSystem();
},
getList() {
console.log(this.selValue);
// 当为楼盘选择时
if (this.selValue == 1) {
this.$api.api
.findMyOrg({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {
this.houseList = res.data;
this.receptionOverviewOfSystem();
});
} else if (this.selValue == 2) {
this.$api.api
.findHouseByUser({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {
this.houseList = res.data;
this.receptionOverviewOfSystem();
});
} else {
this.$api.api
.findMyAgent({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {
this.houseList = res.data;
this.receptionOverviewOfSystem();
});
}
},
secondChange(i) {
this.secindex = i;
this.getChars(i);
},
confirmtime(e) {
this.dateType = null;
this.checked = false;
this.selectTime = "";
this.selectTime1 = "";
this.$set(this, "time", null);
if (!e) return;
// this.page.openTime = this.customtime[0];
// this.page.closeTime = this.customtime[1];
this.Confirmthecontrast = false;
// this.trendtrendAnalysis()
},
selChange() {
this.choicValue = "";
this.dateType = 4;
this.getList();
},
valuechange() {
// console.log(this.choicValue);
this.receptionOverviewOfSystem();
},
radioChange() {
this.selectTime = "";
this.selectTime1 = "";
this.$set(this, "time", null);
},
timestampToTime(timestamp) {
var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
// var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000

var yyyy = date.getFullYear() + "-";

var MM =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";

// var dd = date.getDate() + ' ';
var dd =
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";

// var HH = date.getHours() + ':';
// var HH = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':';
//
// // var mm = date.getMinutes() + ':';
// var mm = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':';
//
// // var ss = date.getSeconds();
// var ss = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds());

// return yyyy+MM+dd+HH+mm+ss;
return yyyy + MM + dd;
},
//卡片下折线图
SwitchCARDS(arr, str, timeDate, Strname) {
// console.log(arr,str,timeDate,Strname);
var chartDom = document.getElementById(str);
var myChart = echarts.init(chartDom);
var option;

option = {
tooltip: {
trigger: "axis",
},
legend: {
data: Strname,
bottom: "10",
},
grid: {
left: 10,
right: 10,

containLabel: true,
},
xAxis: {
type: "category",
data: timeDate,
axisLabel: {
//重点在这一块,其余可以忽略
textStyle: {
color: "#212121", //更改坐标轴文字颜色
},
},
axisLine: {
lineStyle: {
type: "solid",
color: "#DDE1EE", //x线的颜色
width: "1", //坐标线的宽度
},
},
},
yAxis: {
type: "value",
splitNumber: 4,
axisLabel: {
//重点在这一块,其余可以忽略
textStyle: {
color: "#212121", //更改坐标轴文字颜色
},
},
axisLine: {
lineStyle: {
ype: "solid",
color: "#DDE1EE", //x线的颜色
width: "1", //坐标线的宽度
},
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
},
},
axisTick: {
//y轴刻度线
show: false,
},
},
series: arr,
};
option && myChart.setOption(option);
window.addEventListener("resize", () => {
myChart.resize();
});
},
},
};
</script>

<style scoped="scoped" lang="scss" >
.box-center {
width: 100%;
padding: 15px;
min-width: 1200px;
padding-bottom: 100px;
}

.container {
display: grid;
grid-template-columns: repeat(6, 16%);
grid-column-gap: 12px;
grid-row-gap: 18px;
}
.container1 {
display: grid;
grid-template-columns: repeat(3, 30%);
grid-column-gap: 66px;
grid-row-gap: 18px;
}
// 进度条
.jinbox {
width: 100%;
height: 18px;
line-height: 18px;
display: flex;
font-size: 16px;
color: #2c3542;
margin-top: 20px;
.jinboxtit {
width: 14%;
height: 18px;
padding-right: 6px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.jinbox-box {
width: 75%;
height: 100%;
border-radius: 8px;
background: #f2f2f2;
}
.boxbaifenbi {
height: 100%;
background: #60d7a0;
border-radius: 8px;
}
.boxbaifenbi2 {
height: 100%;
background: #5b8ff9;
}
.jinboxbott {
width: 16%;
text-indent: 20px;
}
}

#main {
width: 100%;
height: 380px;
}
#echar2 {
width: 100%;
height: 380px;
}
#Brokenline1 {
width: 100%;
height: 350px;
}
#Brokenline2 {
width: 100%;
height: 350px;
}
#Pinspeak1 {
width: 100%;
height: 350px;
}
#Pinspeak2 {
width: 100%;
height: 350px;
}
.app-box-san {
width: 100%;
// height: 400px;
display: flex;
margin-top: 15px;
.zuo {
flex: 1;
height: 100%;
margin-right: 15px;
background: #ffffff;
border-radius: 4px;
.title {
width: 100%;
height: 55px;
border-bottom: 1px solid #e0e0e0;
display: flex;
align-content: center;
.text1 {
flex: 2;
line-height: 55px;
text-indent: 20px;
font-weight: 500;
font-size: 16px;
color: #333333;
}
.text2 {
flex: 1;
height: 55px;
display: flex;
align-items: center;
}
}
}
.you {
height: 100%;
flex: 1;
background: #ffffff;
border-radius: 4px;
.title {
width: 100%;
height: 55px;
border-bottom: 1px solid #e0e0e0;
display: flex;
align-content: center;
.text1 {
flex: 2;
line-height: 55px;
text-indent: 20px;
font-weight: 500;
font-size: 16px;
color: #333333;
}
.text2 {
flex: 1;
height: 55px;
display: flex;
align-items: center;
}
}
}
}

.app-box-er {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 4px;
margin-top: 15px;
padding: 15px;
}
.grid-content {
background: #ffffff;
height: 90px;
border: 1px solid #e0e0e0;
.text1 {
height: 16px;
font-size: 16px;
font-weight: 400;
line-height: 16px;
text-indent: 20px;
margin-top: 20px;
}
.text2 {
height: 32px;
font-size: 32px;
font-weight: normal;
line-height: 32px;
text-indent: 20px;
margin-top: 10px;
}
}

.tophove {
color: #ffffff;
background: #2671e2;
}
.tophovese {
color: #2671e2;
}
.app-top {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 4px;
padding-top: 15px;
padding-bottom: 15px;
}
.app-titel {
width: 100%;
display: flex;
align-items: center;
.titel-text {
height: 100%;
font-size: 16px;
font-weight: 600;
color: #32363d;
text-indent: 30px;
}
.toptimeqhuan {
width: 190px;
height: 32px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e0e0e0;
display: flex;
align-items: center;
overflow: hidden;
margin-left: 20px;
cursor: pointer;
}
.toptimeqhuan div {
flex: 1;
text-align: center;
line-height: 32px;
font-size: 14px;
}
}
.hejisan {
width: 92%;
margin: 0 auto;
display: flex;
margin-top: 15px;
.text1-1 {
color: #666666;
}
.text1-2 {
color: #333333;
margin-top: 10px;
}
}
.app_titile {
display: flex;
justify-content: space-between;
}
.text33 {
font-size: 12px;
text-indent: 20px;
line-height: 20px;
display: flex;
justify-content: space-between;
margin-right: 20px;
}
</style>

+ 2
- 0
src/views/admin/user/index.vue View File

@@ -1378,6 +1378,8 @@ export default {
orgType:localStorage.getItem('orgType'),
accountId:res.data.sysUser.accountId,
username:res.data.sysUser.username,
agentId:localStorage.getItem('agentId'),
orgCode:localStorage.getItem('orgCode'),
})
.then(res1=>{
// console.log(res1);


+ 4
- 2
src/views/building/index.vue View File

@@ -730,10 +730,11 @@ export default {
// console.log(valid,this.operaForm);
this.$api.api
.zkoperationrecordSaveHouse({
orgType: this.idx==0?'1':'2',
orgType: 3,
accountIds: this.operaForm.operationalPeople.join(","),
orgId: this.operaForm.orgId,
orgCode: this.operaForm.orgCode,
operationType:this.idx==0?'1':'2'
})
.then((res) => {
console.log(res);
@@ -756,8 +757,9 @@ export default {
zkoperationrecordFindByOrg(orgId,idx) {
this.$api.api
.zkoperationrecordFindByOrg({
orgType: idx==0?'1':'2',
orgType:3,
orgId,
operationType:this.idx==0?'1':'2'
})
.then((res) => {
// console.log(res);


+ 1
- 1
vue.config.js View File

@@ -7,7 +7,7 @@ const url = 'http://39.97.167.65:9999' //测试
// const url = 'http://192.168.31.169:9999' //长龙
// const url = 'http://192.168.31.133:9999' //嘉豪
// const url = 'http://192.168.31.100:9999' //王笑
// const url = 'http://68jyh3.natappfree.cc' //王笑
// const url = 'http://mp7i3c.natappfree.cc' //王笑

const CompressionWebpackPlugin = require('compression-webpack-plugin')
const productionGzipExtensions = ['js', 'css']


Loading…
Cancel
Save