lancer 3 роки тому
джерело
коміт
eef55c4e3c
6 змінених файлів з 328 додано та 36 видалено
  1. +24
    -0
      src/api/modules/api.js
  2. +26
    -4
      src/views/Customer/AgentManagement.vue
  3. +65
    -6
      src/views/Customer/CompanyRecord.vue
  4. +148
    -22
      src/views/building/Count.vue
  5. +64
    -3
      src/views/building/index.vue
  6. +1
    -1
      vue.config.js

+ 24
- 0
src/api/modules/api.js Переглянути файл

@@ -894,3 +894,27 @@ export function receptionDataOfSystem(data) {
data
})
}
// 楼盘统计公司
export function companyStatistics(query) {
return request({
url: 'autoSR/cusStageStatistics/companyStatistics',
method:'get',
params:query
})
}
// 楼盘统计代理商
export function agentStatistics(query) {
return request({
url: 'autoSR/cusStageStatistics/agentStatistics',
method:'get',
params:query
})
}
// 楼盘统计代理商
export function houseStatistics1(query) {
return request({
url: 'autoSR/cusStageStatistics/houseStatistics',
method:'get',
params:query
})
}

+ 26
- 4
src/views/Customer/AgentManagement.vue Переглянути файл

@@ -304,10 +304,10 @@
<el-dialog title="更换账号" :visible.sync="dialogVisible3" >
<el-form :model="replaceagentobj" label-position="labelPosition" :rules="ruleser" ref="replaceagentobj" label-width="140px" style="width:60%; margin: 0 auto;">
<el-form-item label="管理员账号:" prop="managerPhone">
<el-input v-model="replaceagentobj.managerPhone"></el-input>
<el-input maxlength="11" v-model="replaceagentobj.managerPhone"></el-input>
</el-form-item>
<el-form-item label="密码:" prop="managerPassword">
<el-input v-model="replaceagentobj.managerPassword"></el-input>
<el-input show-password :disabled='passFlag' v-model="replaceagentobj.managerPassword"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -347,6 +347,11 @@ export default {
callback(new Error("请输入管理员账号"));
} else {
if (value) {
this.passFlag=false
if (!/^1[3456789]\d{9}$/.test(value)) {
// alert("手机号码不合法,请重新输入");
callback(new Error("手机号码不合法,请重新输入"));
}else{
// 验证电话号码
this.$api.api.verPhone(value).then((res) => {
// console.log(res);
@@ -363,19 +368,33 @@ export default {
.then(res1=>{
callback();
this.passFlag=true
if(this.dialogVisible3){
this.replaceagentobj.managerPassword=res.data.sysUser.resultPwd
}else{
this.addagentobj.managerPassword=res.data.sysUser.resultPwd
}

})
.catch(err=>{
console.log(err)
allback(new Error(err));
callback(new Error(err));
})
} else {
// 没有用户
// console.log("没有用户");
// callback(new Error("没有管理员账号"));
if(this.dialogVisible3){
this.replaceagentobj.managerPassword=''
}else{
this.addagentobj.managerPassword=''
}
this.passFlag=false
callback();

}
});
}

}
callback();
}
@@ -513,7 +532,8 @@ export default {
},
ruleser:{
managerPhone: [
{ required: true, message: '请输入管理员账号', trigger: 'blur' },
// { required: true, message: '请输入管理员账号', trigger: 'blur' },
{ validator: validatePass, trigger: "blur" },
],
managerPassword: [
{ required: true, message: '请输入管理员账号密码', trigger: 'blur' },
@@ -681,6 +701,7 @@ export default {
inforeplace(row){
this.replaceagentobj.id=row.id;
this.dialogVisible3=true;
this.passFlag=false
},
//确认更换
replace(){
@@ -704,6 +725,7 @@ export default {
//新增
infoadd(){
this.dialogVisible=true;
this.passFlag=false
this.getparentIdList()
this.getAllOperationsStaff()
},


+ 65
- 6
src/views/Customer/CompanyRecord.vue Переглянути файл

@@ -170,10 +170,10 @@

</el-form-item> -->
<el-form-item label="管理员账号:" prop="managerPhone">
<el-input v-model="addagentobj.managerPhone"></el-input>
<el-input maxlength="11" v-model="addagentobj.managerPhone"></el-input>
</el-form-item>
<el-form-item label="密码:" prop="managerPassword">
<el-input v-model="addagentobj.managerPassword"></el-input>
<el-input show-password :disabled='passFlag' v-model="addagentobj.managerPassword"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -241,10 +241,10 @@
<el-dialog title="更换账号" :visible.sync="dialogVisible3" >
<el-form :model="replaceagentobj" label-position="labelPosition" :rules="ruleser" ref="replaceagentobj" label-width="140px" style="width:60%; margin: 0 auto;">
<el-form-item label="管理员账号:" prop="managerPhone">
<el-input v-model="replaceagentobj.managerPhone"></el-input>
<el-input maxlength="11" v-model="replaceagentobj.managerPhone"></el-input>
</el-form-item>
<el-form-item label="密码:" prop="managerPassword">
<el-input v-model="replaceagentobj.managerPassword"></el-input>
<el-input show-password :disabled='passFlag' v-model="replaceagentobj.managerPassword"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -299,6 +299,61 @@
import { mapGetters } from "vuex";
export default {
data() {
var validatePass = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入管理员账号"));
} else {
if (value) {
if (!/^1[3456789]\d{9}$/.test(value)) {
// alert("手机号码不合法,请重新输入");
callback(new Error("手机号码不合法,请重新输入"));
}else{
// 验证电话号码
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
if(this.dialogVisible3){
this.replaceagentobj.managerPassword=res.data.sysUser.resultPwd
}else{
this.addagentobj.managerPassword=res.data.sysUser.resultPwd
}

})
.catch(err=>{
console.log(err)
callback(new Error(err));
})
} else {
// 没有用户
// console.log("没有用户");
// callback(new Error("没有管理员账号"));
if(this.dialogVisible3){
this.replaceagentobj.managerPassword=''
}else{
this.addagentobj.managerPassword=''
}
this.passFlag=false
callback();

}
});
}
}
callback();
}
};
return {
addagentobj:{
agentId:'',// 代理商名称
@@ -339,7 +394,7 @@ export default {
// { required: true, message: '请选择运营人员', trigger: 'blur' },
// ],
managerPhone: [
{ required: true, message: '请输入管理员账号', trigger: 'blur' },
{ validator: validatePass, trigger: "blur" },
],
managerPassword: [
{ required: true, message: '请输入管理员账号密码', trigger: 'blur' },
@@ -356,6 +411,7 @@ export default {
dialogVisible3:false,
operaVisible:false,
agentVisible:false,
passFlag:false,
currentPage4:1,
operatorName:'',//代理商名称
operationStaffName:'',//运营人员名称
@@ -372,7 +428,8 @@ export default {
},
ruleser:{
managerPhone: [
{ required: true, message: '请输入管理员账号', trigger: 'blur' },
// { required: true, message: '请输入管理员账号', trigger: 'blur' },
{ validator: validatePass, trigger: "blur" },
],
managerPassword: [
{ required: true, message: '请输入管理员账号密码', trigger: 'blur' },
@@ -623,6 +680,7 @@ export default {
inforeplace(row){
this.replaceagentobj.id=row.id;
this.dialogVisible3=true;
this.passFlag=false
},
//确认更换
replace(){
@@ -675,6 +733,7 @@ export default {
// this.findMyAgent()
this.getparentIdList()
this.dialogVisible=true;
this.passFlag=false
},
//获取运营人员
getAllOperationsStaff(idx){


+ 148
- 22
src/views/building/Count.vue Переглянути файл

@@ -1,6 +1,6 @@
<template>
<div class="box-center">
<div class="toptab" style="display: none">
<div class="toptab" v-if="orgType!=2">
<div
@click="tapclickyab(0)"
:class="{ activecllasscet: activeTotal == 0 }"
@@ -9,6 +9,7 @@
楼盘
</div>
<div
v-if="orgType==0"
@click="tapclickyab(1)"
:class="{ activecllasscet: activeTotal == 1 }"
:style="{ background: activeTotal == 1 ? '#2671E2' : '#ffffff' }"
@@ -16,6 +17,7 @@
代理商
</div>
<div
v-if="orgType==0||orgType==0"
@click="tapclickyab(2)"
:class="{ activecllasscet: activeTotal == 2 }"
:style="{ background: activeTotal == 2 ? '#2671E2' : '#ffffff' }"
@@ -30,19 +32,19 @@
<div class="label" style="margin-left: 15px">时间:</div>
<div class="toptimeqhuan">
<div
:class="{ tophove: searchForm.timeType == 4 }"
:class="{ tophove: searchForm.dateType == 4 }"
@click="tabtimetap(4)"
>
近七天
</div>
<div
:class="{ tophove: searchForm.timeType == 5 }"
:class="{ tophove: searchForm.dateType == 5 }"
@click="tabtimetap(5)"
>
近十五天
</div>
<div
:class="{ tophove: searchForm.timeType == 6 }"
:class="{ tophove: searchForm.dateType == 6 }"
@click="tabtimetap(6)"
>
近三十天
@@ -63,7 +65,7 @@
</el-date-picker>
</div>
</div>
<div class="div-lab">
<div class="div-lab" v-if="orgType!=2">
<el-input
v-model="changeValue"
clearable
@@ -80,7 +82,7 @@
@change="selChange"
>
<el-option label="公司名称" value="1"></el-option>
<el-option label="代理商名称" value="2"></el-option>
<el-option v-if="orgType==0" label="代理商名称" value="2"></el-option>
<el-option label="楼盘名称" value="3"></el-option>
</el-select>
</el-input>
@@ -99,10 +101,10 @@
clearable
></el-cascader>
</div>
<div class="div-lab">
<!-- <div class="div-lab">
<div class="label">运营人:</div>
<el-input class="div-inp" v-model="searchForm.userName"></el-input>
</div>
</div> -->
</div>
<div class="app-titel" style="margin-top: 15px">
<div style="margin-left: 20px">
@@ -118,8 +120,8 @@

<!-- 表格 -->
<div class="cen-tab">
<el-table :data="tableData" stripe style="width: 100%">
<el-table-column prop="houseName" label="楼盘名称" align="center">
<el-table v-if="activeTotal==0" :data="tableData" stripe style="width: 100%">
<el-table-column prop="propertyName" label="楼盘名称" align="center">
</el-table-column>
<el-table-column prop="orgName" label="公司名称" align="center">
</el-table-column>
@@ -127,8 +129,8 @@
</el-table-column>
<el-table-column prop="area" label="地区" align="center">
</el-table-column>
<el-table-column prop="userName" label="运营人" align="center">
</el-table-column>
<!-- <el-table-column prop="userName" label="运营人" align="center">
</el-table-column> -->
<el-table-column prop="linkman" label="负责人" align="center">
</el-table-column>
<el-table-column prop="onlineQuantity" label="在线设备" align="center">
@@ -170,6 +172,91 @@
</el-table-column> -->
<!-- scope -->
</el-table>


<el-table v-if="activeTotal==2" :data="tableData" stripe style="width: 100%">
<el-table-column prop="orgName" label="公司名称" align="center">
</el-table-column>
<el-table-column prop="agentName" label="代理商" align="center">
</el-table-column>
<el-table-column prop="area" label="服务器内楼盘" align="center">
</el-table-column>
<el-table-column prop="onlineQuantity" label="在线设备" align="center">
</el-table-column>
<el-table-column
prop="noOnlineQuantity"
label="离线设备"
align="center"
>
</el-table-column>
<el-table-column prop="activeQuantity" label="活跃设备" align="center">
</el-table-column>
<el-table-column prop="activeAccount" label="活跃顾问" align="center">
</el-table-column>
<el-table-column prop="sumReception" label="接待量" align="center">
</el-table-column>
<el-table-column prop="sumRecordTime" label="接待时长" align="center">
</el-table-column>
<el-table-column
prop="avgExacutiveRate"
label="平均执行率"
align="center"
>
<template slot-scope="{row}">
{{row.avgExacutiveRate||0}}%
</template>
</el-table-column>
<el-table-column
prop="sumProhibitedQuantity"
label="违禁次数"
align="center"
>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="{ row }">
<el-button type="text" @click="goDetail(row,2)">查看详情</el-button>
</template>
</el-table-column>
<!-- <el-table-column prop="date" label="备注" align="center">
</el-table-column> -->
<!-- scope -->
</el-table>

<el-table v-if="activeTotal==1" :data="tableData" stripe style="width: 100%">
<el-table-column prop="agentName" label="代理商名称" align="center">
</el-table-column>
<!-- <el-table-column prop="area" label="服务器内公司" align="center">
</el-table-column> -->
<el-table-column prop="houseQuantityOfEnough" label="服务器内楼盘" align="center">
</el-table-column>
<el-table-column prop="sumReception" label="接待量" align="center">
</el-table-column>
<el-table-column prop="sumRecordTime" label="接待时长" align="center">
</el-table-column>
<el-table-column
prop="avgExacutiveRate"
label="平均执行率"
align="center"
>
<template slot-scope="{row}">
{{row.avgExacutiveRate||0}}%
</template>
</el-table-column>
<el-table-column
prop="sumProhibitedQuantity"
label="违禁次数"
align="center"
>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="{ row }">
<el-button type="text" @click="goDetail(row,1)">查看详情</el-button>
</template>
</el-table-column>
<!-- <el-table-column prop="date" label="备注" align="center">
</el-table-column> -->
<!-- scope -->
</el-table>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange"
@@ -230,14 +317,15 @@ export default {
dialogVisible: false,
houseList: [],
time: [],
orgType:localStorage.getItem('orgType'),
searchForm: {
houseName: "",
propertyName: "",
provinceId: "",
cityId: "",
orgName: "",
agentName: "",
userName: "",
timeType: "4",
dateType: "4",
staDate: "",
endDate: "",
},
@@ -270,7 +358,7 @@ export default {
this.searchForm.agentName = e;
}
if (this.selflag == 3) {
this.searchForm.houseName = e;
this.searchForm.propertyName = e;
}
},
goEquiment(row) {
@@ -281,16 +369,33 @@ export default {
houseId: row.id,
startDate: this.searchForm.staDate,
endDate: this.searchForm.endDate,
timeType: this.searchForm.timeType,
dateType: this.searchForm.dateType,
},
});
},
goDetail(row,i){
this.activeTotal=0
console.log(row);
if(i==1){
// 代理商
this.selflag='2'
this.changeValue=row.agentName
this.searchForm.agentName=row.agentName
this.houseStatistics();
}else{
// 公司
this.selflag='1'
this.changeValue=row.orgName
this.searchForm.agentName=row.orgName
this.houseStatistics();
}
},
tapclickyab(i) {
this.activeTotal = i;
this.houseStatistics();
},
timeChange(e) {
this.searchForm.timeType = -1;
this.searchForm.dateType = -1;
this.searchForm.staDate = e[0];
this.searchForm.endDate = e[1];
// this.houseChange();
@@ -299,7 +404,7 @@ export default {
this.searchForm.staDate = "";
this.searchForm.endDate = "";
// this.$set(this, "time", null);
this.searchForm.timeType = idx;
this.searchForm.dateType = idx;
let num = 24 * 3600 * 1000;
// 获取当前时间戳转换为日期格式
if (idx == 4) {
@@ -366,30 +471,51 @@ export default {
this.provice = [];
this.changeValue = "";
this.searchForm = {
houseName: "",
propertyName: "",
provinceId: "",
cityId: "",
orgName: "",
agentName: "",
userName: "",
timeType: "4",
dateType: "4",
staDate: "",
endDate: "",
};
this.houseStatistics();
},
// 获取常错词列表
houseStatistics() {
let obj = {
current: this.currentPage,
size: this.size,
...this.searchForm,
agentId:localStorage.getItem('agentId'),
orgCode:localStorage.getItem('orgCode'),
houseId:localStorage.getItem('houseId'),
orgType:localStorage.getItem('orgType'),
};
this.$api.api.houseStatistics(obj).then((res) => {
if(this.activeTotal==0){
// 楼盘
this.$api.api.houseStatistics1(obj).then((res) => {
// console.log(res);
this.tableData = res.data.records;
this.total = res.data.total;
});
}else if(this.activeTotal==1){
// 代理商
this.$api.api.agentStatistics(obj).then((res) => {
// console.log(res);
this.tableData = res.data.records;
this.total = res.data.total;
});
}else{
// 公司
this.$api.api.companyStatistics(obj).then((res) => {
// console.log(res);
this.tableData = res.data.records;
this.total = res.data.total;
});
}

},
handleSelectionChange(val) {
this.multipleSelection = val;


+ 64
- 3
src/views/building/index.vue Переглянути файл

@@ -351,7 +351,7 @@
</el-select>
</el-form-item> -->
<el-form-item label="管理员账号" prop="managerPhone" v-if="!editFlag">
<el-input v-model="ruleForm.managerPhone"></el-input>
<el-input maxlength="11" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));" v-model="ruleForm.managerPhone"></el-input>
</el-form-item>
<el-form-item
label="管理员密码"
@@ -362,6 +362,7 @@
v-model="ruleForm.managerPassword"
type="passsword"
show-password
:disabled='passFlag'
></el-input>
</el-form-item>
</el-form>
@@ -396,6 +397,7 @@
<el-form-item label="管理员密码:" prop="managerPassword">
<el-input
style="width: 200px"
:disabled='passFlag'
show-password
v-model.number="accountForm.managerPassword"
></el-input>
@@ -532,6 +534,62 @@ export default {
callback();
}
};
var validatePass1 = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入管理员账号"));
} else {
if (value) {
this.passFlag=false
if (!/^1[3456789]\d{9}$/.test(value)) {
// alert("手机号码不合法,请重新输入");
callback(new Error("手机号码不合法,请重新输入"));
}else{
// 验证电话号码
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
if(this.changeFlag){
this.accountForm.managerPassword=res.data.sysUser.resultPwd
}else{
this.ruleForm.managerPassword=res.data.sysUser.resultPwd
}

})
.catch(err=>{
console.log(err)
callback(new Error(err));
})
} else {
// 没有用户
// console.log("没有用户");
// callback(new Error("没有管理员账号"));
if(this.changeFlag){
this.accountForm.managerPassword=''
}else{
this.ruleForm.managerPassword=''
}
this.passFlag=false
callback();

}
});
}
}
callback();
}
};
return {
props: {
lazy: true,
@@ -565,6 +623,7 @@ export default {
editFlag: false,
changeFlag: false,
operaVisible: false,
passFlag:false,
starTime: [],
searchForm: {
corporateName: "",
@@ -623,7 +682,7 @@ export default {
managerPhone: "",
},
accountRules: {
managerPhone: [{ validator: validatePass, trigger: "change" }],
managerPhone: [{ validator: validatePass1, trigger: "change" }],
},
ruleForm: {
orgCode: "", //公司标识
@@ -651,7 +710,7 @@ export default {
startWorking: [
{ required: true, message: "请选择时间", trigger: "change" },
],
managerPhone: [{ validator: validatePass, trigger: "blur" }],
managerPhone: [{ validator: validatePass1, trigger: "blur" }],
linkmanPhone: [{ validator: validatePass, trigger: "blur" }],
},
operaForm: {
@@ -885,6 +944,7 @@ export default {
addHouse() {
this.editFlag = false;
this.dialogVisible = true;
this.passFlag=false
},
edit(row) {
console.log(row);
@@ -905,6 +965,7 @@ export default {
// 更换账号
changeAccount(row) {
this.changeFlag = true;
this.passFlag=false
this.accountForm.id = row.id;
},
changeSure() {


+ 1
- 1
vue.config.js Переглянути файл

@@ -7,7 +7,7 @@
// 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://chrrx3.natappfree.cc' //王笑
const url = 'http://pmsa8v.natappfree.cc' //王笑

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


Завантаження…
Відмінити
Зберегти