Commit aa2b6913 authored by 黄奎's avatar 黄奎

页面修改

parent 450a1b57
......@@ -7,7 +7,8 @@
<el-select
v-model="parameters.branchId"
style="margin-right: 20px;"
@change="getEmpList(),parameters.empIdList=[],handleDateChange()"
@change="getDepartment(),parameters.RB_Department_Id=null,getEmpList(),parameters.empIdList=[],handleDateChange()"
:disabled="userInfo.RB_Branch_id==0?false:true"
>
<el-option
v-for="(x, i) in branchs"
......@@ -16,19 +17,22 @@
:value="x.Id"
></el-option>
</el-select>
<treeselect class="w200 fl" :options="departmentList" v-model="parameters.RB_Department_Id"
:label="$t('pub.unlimitedSel')" :normalizer="normalizer" @select="changeDepart" />
<el-select
v-model="parameters.empIdList"
style="margin-right: 20px;"
@change="handleDateChange()"
multiple
filterable
collapse-tags
collapse-tags
>
<el-option
v-for="(x, i) in empList"
:key="i"
:label="x.EmName"
:value="x.EmployeeId"
:label="x.name"
:value="x.empId"
></el-option>
</el-select>
......@@ -624,13 +628,16 @@ import Coreview from "./components/coreview.vue";
import Pagecount from "./components/pagecount.vue";
import Citiescount from "./components/citiescount.vue";
import Tradecount from "./components/tradecount.vue";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
components: {
Customer,
Coreview,
Pagecount,
Citiescount,
Tradecount
Tradecount,
Treeselect,
},
data() {
return {
......@@ -696,8 +703,20 @@ export default {
dateRange: [],
StartDate: "",
EndDate: "",
RB_Department_Id:null,
empIdList:[],
},
normalizer(node) {
var obj = {
id: node.DepartmentId,
label: node.DepartmentName,
};
if (node.ChildList != null && node.ChildList.length > 0) {
obj.children = node.ChildList;
}
return obj;
},
departmentList:[],//部门列表
empList:[],//员工列表
coreId: 1,
coreLists: [
......@@ -845,12 +864,19 @@ export default {
currentPageObj:null,
areaData:{},
currentAreaObj:null,
userInfo:{},
};
},
created() {
this.userInfo=this.getLocalStorage();
console.log("this.userInfo",this.userInfo);
if(this.userInfo.RB_Branch_id!=0)
{
this.parameters.branchId=this.userInfo.RB_Branch_id;
}
this.getCompanyList();
this.getEmpList()
this.getDepartment();
this.getEmpList();
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
......@@ -903,6 +929,7 @@ export default {
CStartDate: this.parameters.dateRange[0],
CEndDate: this.parameters.dateRange[1],
BranchId: this.parameters.branchId,
RB_Department_Id:this.parameters.RB_Department_Id,
isNormal: 1,
blank: "y",
}
......@@ -910,6 +937,7 @@ export default {
query = {
CStartDate: this.parameters.dateRange[0],
CEndDate: this.parameters.dateRange[1],
RB_Department_Id:this.parameters.RB_Department_Id,
isNormal: 1,
blank: "y",
}
......@@ -917,14 +945,15 @@ export default {
query = {
CStartDate: this.parameters.dateRange[0],
CEndDate: this.parameters.dateRange[1],
RB_Department_Id:this.parameters.RB_Department_Id,
isNormal: 1,
blank: "y",
}
}else if(type==8){
query = {
CStartDate: this.parameters.dateRange[0],
CEndDate: this.parameters.dateRange[1],
RB_Department_Id:this.parameters.RB_Department_Id,
discount: 1,
isNormal: 1,
blank: "y",
......@@ -936,25 +965,51 @@ export default {
});
}
},
changeDepart(node, instanceId){
this.parameters.RB_Department_Id=node.DepartmentId;
this.parameters.empIdList=[];
this.getEmpList();
this.handleDateChange();
},
//获取部门列表
getDepartment() {
let postMsg = {
RB_Group_Id: this.userInfo.RB_Group_id,
RB_Branch_Id: "-1",
Status: "0",
};
this.departmentList=[];
postMsg.RB_Branch_Id=this.parameters.branchId;
this.apipost(
"admin_Get_GetDepartmentTreeForReceiveQuery",
postMsg,
(res) => {
if (res.data.resultCode == 1) {
this.departmentList = res.data.data;
} else {
this.Error(res.data.message);
}
});
},
getEmpList(){
let userInfo = this.getLocalStorage();
let msg = {
GroupId: userInfo.RB_Group_id,
BranchId: "-1",
DepartmentId: "-1",
PostId: "-1",
IsLeave: "0",
this.empList=[];
let userMsg = {
RB_Group_id: this.userInfo.RB_Group_id,
RB_Branch_id: "-1",
departmentId: "0",
IsLeave: "-1",
};
msg.BranchId=this.parameters.branchId;
if(this.parameters.RB_Department_Id){
userMsg.departmentId=this.parameters.RB_Department_Id;
}
userMsg.RB_Branch_id=this.parameters.branchId;
this.apipost(
"admin_get_EmployeeGetList", msg,
"app_get_employeeInfo_v2", userMsg,
(res) => {
if (res.data.resultCode == 1) {
this.empList = res.data.data;
}
},
(err) => {}
);
});
},
handleDateChange() {
this.getCustomerStatic();
......@@ -973,7 +1028,6 @@ export default {
}
var that = this;
that.apipost("erp_post_GetCustomerStatic", that.parameters, res => {
//console.log("res", res);
if (res.data.resultCode == 1) {
this.customerObj = res.data.data;
} else {
......@@ -1018,7 +1072,6 @@ export default {
"wechatstatistics_post_HomeWechatStatisticsList",
msg,
res => {
//console.log("res", res);
if (res.data.resultCode == 1) {
this.baseWechatData = res.data.data;
this.getTrendWechatData()
......@@ -1036,7 +1089,6 @@ export default {
"wechatstatistics_post_WechatStatisticsList",
msg,
res => {
//console.log("res", res);
if (res.data.resultCode == 1) {
this.trendData = res.data.data;
this.formatCoreTrend()
......@@ -1073,7 +1125,6 @@ export default {
res => {
if (res.data.resultCode == 1) {
this.areaData = res.data.data;
console.log(this.areaData)
this.formatAreaData()
}
},
......@@ -1127,7 +1178,6 @@ export default {
data:seriesData
}
}
//console.log(this.currentCoreObj)
}
}
};
......
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