@@ -9,7 +9,24 @@ export function userDict(query) { | |||
params: query | |||
}) | |||
} | |||
// 组织权限获取数组 | |||
export function fetchRoleTree(orgType) { | |||
return request({ | |||
url: '/admin/sysorgmenu/tree/' + orgType, | |||
method: 'get' | |||
}) | |||
} | |||
//添加组织用户权限 | |||
export function permissionUpd(orgType, menuIds) { | |||
return request({ | |||
url: 'admin/sysorgmenu', | |||
method: 'post', | |||
data: { | |||
orgType:orgType , | |||
menuIds: menuIds | |||
} | |||
}) | |||
} | |||
export function fetchList(query) { | |||
return request({ | |||
url: '/admin/user/page', | |||
@@ -138,7 +138,7 @@ export default { | |||
// this.list = res.data.records; | |||
// this.total = res.data.total; | |||
if (res.data.total == 0) { | |||
this.$message.warning("您当前并未绑定楼盘"); | |||
this.$message.warning("您当前并未绑定公司"); | |||
return; | |||
} else if (res.data.total > 1) { | |||
// 公司后台 | |||
@@ -19,13 +19,22 @@ | |||
line-height: 30px; | |||
cursor: pointer; | |||
" | |||
@click="goChange" | |||
> | |||
<div class="daili">{{orgType==0?'系统后台':orgType==1?'代理商后台':orgType==2?'公司后台':'楼盘后台'}}</div> | |||
<div class="daili" @click="goChange"> | |||
{{ | |||
orgType == 0 | |||
? "系统后台" | |||
: orgType == 1 | |||
? "代理商后台" | |||
: orgType == 2 | |||
? "公司后台" | |||
: "楼盘后台" | |||
}} | |||
</div> | |||
<span style="font-size: 16px; margin-left: 20px">{{ | |||
companyName | |||
}}</span> | |||
<span class="change">切换</span> | |||
<span class="change" @click="goBack">切换</span> | |||
<!-- <span style="color:#fff; margin-right:10px;">楼盘选择:</span> | |||
<el-select v-model="value" placeholder="请选择" @change="selectChange"> | |||
<el-option | |||
@@ -149,9 +158,9 @@ export default { | |||
return { | |||
options: [], | |||
value: "", | |||
companyName: localStorage.getItem('topName'), | |||
orgType:localStorage.getItem('orgType'), | |||
info:{}, | |||
companyName: localStorage.getItem("topName"), | |||
orgType: localStorage.getItem("orgType"), | |||
info: {}, | |||
}; | |||
}, | |||
computed: { | |||
@@ -201,48 +210,72 @@ export default { | |||
// localStorage.setItem('houseId',this.value) | |||
// }) | |||
// }, | |||
goBack() { | |||
// 判断后退是否退回去选择页面 | |||
let idx = localStorage.getItem("orgType"); | |||
if (idx == 0) { | |||
// 质控管家后台 | |||
// localStorage.setItem("topName", ""); | |||
// localStorage.setItem("orgCode", ""); | |||
// localStorage.setItem("houseId", ""); | |||
// localStorage.setItem("agentId", ""); | |||
return | |||
} | |||
// 当他为其他时 先获取是否只有一个选项,然后在来进行判断 | |||
if (idx == 1) { | |||
this.getAgentList(); | |||
// 代理商 | |||
} | |||
if (idx == 2) { | |||
this.getCompanyList(); | |||
// 公司后台 | |||
} | |||
if (idx == 3) { | |||
this.findByUserName(); | |||
// 楼盘后台 | |||
} | |||
}, | |||
goChange() { | |||
let that = this; | |||
this.$api.api.getTab().then((res) => { | |||
// console.log(res) | |||
// 循环数组,给定各种标志 | |||
if (res.data.length == 0) { | |||
// this.$message.warning("您已经被禁用"); | |||
this.$message.warning("别看了你进不了"); | |||
} else if (res.data.length == 1) { | |||
let idx = res.data[0].orgType; | |||
localStorage.setItem("orgType", idx); | |||
// 给定一个判断是否可以跳转的东西 | |||
localStorage.setItem("backFlag", false); | |||
// 当他只有质控后台时,不需要多余操作 | |||
if (idx == 0) { | |||
// 质控管家后台 | |||
localStorage.setItem("topName", ""); | |||
localStorage.setItem("orgCode", ""); | |||
localStorage.setItem("houseId", ""); | |||
localStorage.setItem("agentId", ""); | |||
that.$router.push({ path: "/wel" }); | |||
} | |||
// 当他为其他时 先获取是否只有一个选项,然后在来进行判断 | |||
if (idx == 1) { | |||
this.getAgentList(); | |||
// 代理商 | |||
} | |||
if (idx == 2) { | |||
this.getCompanyList(); | |||
// 公司后台 | |||
} | |||
if (idx == 3) { | |||
this.findByUserName(); | |||
// 楼盘后台 | |||
} | |||
if (res.data.length == 0) { | |||
// this.$message.warning("您已经被禁用"); | |||
this.$message.warning("别看了你进不了"); | |||
} else if (res.data.length == 1) { | |||
let idx = res.data[0].orgType; | |||
localStorage.setItem("orgType", idx); | |||
// 给定一个判断是否可以跳转的东西 | |||
localStorage.setItem("backFlag", false); | |||
// 当他只有质控后台时,不需要多余操作 | |||
if (idx == 0) { | |||
// 质控管家后台 | |||
localStorage.setItem("topName", ""); | |||
localStorage.setItem("orgCode", ""); | |||
localStorage.setItem("houseId", ""); | |||
localStorage.setItem("agentId", ""); | |||
// that.$router.push({ path: "/wel" }); | |||
} | |||
// 当他为其他时 先获取是否只有一个选项,然后在来进行判断 | |||
if (idx == 1) { | |||
this.getAgentList(); | |||
// 代理商 | |||
} | |||
if (idx == 2) { | |||
this.getCompanyList(); | |||
// 公司后台 | |||
} | |||
else { | |||
if (idx == 3) { | |||
this.findByUserName(); | |||
// 楼盘后台 | |||
} | |||
} else { | |||
this.$router.push({ path: "/check", query: { backFlag: true } }); | |||
} | |||
}); | |||
}, | |||
// 获取代理商 | |||
// 获取代理商 | |||
getAgentList() { | |||
this.$api.api | |||
.zkagentPage({ | |||
@@ -254,12 +287,14 @@ export default { | |||
// this.list = res.data.records; | |||
// this.total = res.data.total; | |||
if (res.data.total == 0) { | |||
this.$message.warning("您当前并未绑定楼盘"); | |||
this.$message.warning("您当前并未代理商"); | |||
return; | |||
} else if (res.data.total > 1) { | |||
// 公司后台 | |||
this.$router.push({ path: "/chose", query: { flag: 1 } }); | |||
} else { | |||
this.$message.warning('您没有多余的代理商') | |||
return | |||
this.$router.push({ path: "/wel" }); | |||
localStorage.setItem("topName", res.data.records[0].agentName); | |||
localStorage.setItem("agentId", res.data.records[0].id); | |||
@@ -281,13 +316,15 @@ export default { | |||
// this.list = res.data.records; | |||
// this.total = res.data.total; | |||
if (res.data.total == 0) { | |||
this.$message.warning("您当前并未绑定楼盘"); | |||
this.$message.warning("您当前并未绑定公司"); | |||
return; | |||
} else if (res.data.total > 1) { | |||
// 公司后台 | |||
this.$router.push({ path: "/chose", query: { flag: 2 } }); | |||
} else { | |||
this.$router.push({ path: "/wel" }); | |||
this.$message.warning('您没有多余的公司') | |||
return | |||
// this.$router.push({ path: "/wel" }); | |||
localStorage.setItem("topName", res.data.records[0].name); | |||
localStorage.setItem("orgCode", res.data.records[0].orgCode); | |||
localStorage.setItem("agentId", ""); | |||
@@ -325,7 +362,9 @@ export default { | |||
// 公司后台 | |||
this.$router.push({ path: "/chose", query: { flag: 3 } }); | |||
} else { | |||
this.$router.push({ path: "/wel" }); | |||
this.$message.warning('您没有多余的楼盘') | |||
return | |||
// this.$router.push({ path: "/wel" }); | |||
localStorage.setItem("topName", res.data.records[0].propertyName); | |||
localStorage.setItem("orgCode", res.data.records[0].orgCode); | |||
localStorage.setItem("agentId", ""); | |||
@@ -350,7 +389,9 @@ export default { | |||
// 公司后台 | |||
this.$router.push({ path: "/chose", query: { flag: 3 } }); | |||
} else { | |||
this.$router.push({ path: "/wel" }); | |||
this.$message.warning('您没有多余的楼盘') | |||
return | |||
// this.$router.push({ path: "/wel" }); | |||
localStorage.setItem("topName", res.data.records[0].propertyName); | |||
localStorage.setItem("orgCode", res.data.records[0].orgCode); | |||
localStorage.setItem("houseId", res.data.records[0].id); | |||
@@ -120,13 +120,19 @@ | |||
</el-table-column> --> | |||
<el-table-column | |||
label="状态" | |||
width="150" | |||
align="center"> | |||
<template slot-scope="scope"> | |||
<div v-if="scope.row.residueTime >0&&scope.row.lockFlag==0">在服务期内({{residueTime}})</div> | |||
<div v-if="scope.row.residueTime <=0&&scope.row.lockFlag==0">过期({{residueTime}})</div> | |||
<div v-if="scope.row.lockFlag==1">禁用({{residueTime}})</div> | |||
<div v-if="scope.row.residueTime >0&&scope.row.lockFlag==0">在服务期内({{scope.row.residueTime}})</div> | |||
<div v-if="scope.row.residueTime <=0&&scope.row.lockFlag==0">过期({{scope.row.residueTime}})</div> | |||
<div v-if="scope.row.lockFlag==1">禁用</div> | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="lockFlag" label="状态" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{row.lockFlag==1?'禁用':'启用'}} | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="操作" align="center" fixed="right" width="200"> | |||
<template slot-scope="scope"> | |||
<el-button type="text" size="small" @click="infoeditor(scope.row)">编辑</el-button> | |||
@@ -313,7 +319,7 @@ | |||
<el-dialog title="编辑运营人员" :visible.sync="operaVisible" > | |||
<el-form :model="operaForm" label-position="labelPosition" :rules="operaRules" ref="operaForm" label-width="140px"> | |||
<el-form-item label="运营人员:" prop="operationalPeople"> | |||
<el-select v-model="operaForm.operationalPeople" style="width:80%" filterable collapse-tags multiple placeholder="请选择"> | |||
<el-select v-model="operaForm.operationalPeople" style="width:80%" filterable multiple placeholder="请选择"> | |||
<el-option | |||
v-for="item in optionsoperationalPeople" | |||
:key="item.value" | |||
@@ -703,12 +709,13 @@ export default { | |||
cancelButtonText: '取消', | |||
type: 'warning' | |||
}).then(() => { | |||
return | |||
this.$api.http.delAgent({id:item.row.id}).then((res) => { | |||
// return | |||
// console.log(123); | |||
this.$api.http.editorAgent({id:row.id,lockFlag:row.lockFlag==0?'1':'0'}).then((res) => { | |||
if(res.code==0){ | |||
this.$message({ | |||
type: 'success', | |||
message: '删除成功!' | |||
message: '操作成功!' | |||
}); | |||
this.Screeningofempty() | |||
this.getAgentList() | |||
@@ -718,7 +725,8 @@ export default { | |||
}) | |||
}) | |||
.catch(err=>{ | |||
console.log('关闭'); | |||
// console.log('关闭'); | |||
// console.log(err); | |||
}) | |||
}, | |||
//时间选择 | |||
@@ -752,7 +760,7 @@ export default { | |||
serviceStatus:this.serviceStatus, | |||
agentName:this.agentName, | |||
operationalName:this.operationalName, | |||
}).then((res) => { | |||
console.log(res.data); | |||
this.tableData=res.data.records; | |||
@@ -0,0 +1,859 @@ | |||
<template> | |||
<div class="box-center"> | |||
<!-- 头 --> | |||
<div class="app-top"> | |||
<div class="app-titel" style="margin-top: 5px"> | |||
<div v-if="orgType==0" class="label">代理商名称:</div> | |||
<div v-if="orgType==0"> | |||
<el-input v-model="operatorName"></el-input> | |||
</div> | |||
<div class="label">公司名称:</div> | |||
<div> | |||
<el-input v-model="name"></el-input> | |||
</div> | |||
<div v-if="orgType==0" class="label">运营人员名称:</div> | |||
<div v-if="orgType==0"> | |||
<el-input v-model="operationStaffName"></el-input> | |||
</div> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div class="label" style="color: #ffffff">筛选相关:</div> | |||
<div> | |||
<el-button @click="infoadd()" style="background: #2671e2; color: #ffffff" | |||
>新增</el-button | |||
> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button @click="Screening()" style="background: #2671e2; color: #ffffff" | |||
>筛选</el-button | |||
> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button @click="Screeningofempty()">清空筛选条件</el-button> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- 表格 --> | |||
<div class="cen-tab"> | |||
<el-table | |||
:data="tableData" | |||
stripe | |||
height="400" | |||
style="width: 100%"> | |||
<el-table-column | |||
prop="name" | |||
label="公司名称" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
v-if="orgType==0" | |||
prop="operatorName" | |||
label="代理商" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
v-if="orgType==0" | |||
prop="operationStaffName" | |||
label="运营人员" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
prop="address" | |||
label="公司地址" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
label="联系人信息" | |||
align="center"> | |||
<template slot-scope="scope"> | |||
<p>{{scope.row.contactPerson}}:{{scope.row.contactNumber}}</p> | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
prop="managerPhone" | |||
label="管理员账号" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
prop="houseNum" | |||
label="服务期楼盘" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column prop="lockFlag" label="状态" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{row.lockFlag==1?'禁用':'启用'}} | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="操作" align="center" fixed="right" width="200"> | |||
<template slot-scope="scope"> | |||
<el-button type="text" size="small" @click="infoeditor(scope.row)">编辑</el-button> | |||
<el-button type="text" size="small" @click="inforeplace(scope.row)">更换账号</el-button> | |||
<el-button type="text" size="small" @click="toinifodelete(scope)">删除</el-button> | |||
<!-- <el-button type="text" size="small" @click="editOpera(scope.row,0)">管理系统运营</el-button> | |||
<el-button type="text" size="small" @click="editOpera(scope.row,1)">管理代理商运营</el-button> --> | |||
<el-button type="text" size="small" @click="bindAgent(scope.row)">绑定代理商</el-button> | |||
<el-button type="text" size="small" @click="toDisable(scope.row)">{{scope.row.lockFlag==0?'禁用':'启用'}}</el-button> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<div style="display: flex;justify-content:flex-end;margin-top: 10px;"> | |||
<el-pagination | |||
@size-change="handleSizeChange" | |||
@current-change="handleCurrentChange" | |||
:current-page="currentPage4" | |||
:page-sizes="[7, 14, 21, 28]" | |||
:page-size="7" | |||
layout="total, sizes, prev, pager, next, jumper" | |||
:total="total"> | |||
</el-pagination> | |||
</div> | |||
</div> | |||
<el-dialog title="新增公司" :visible.sync="dialogVisible" > | |||
<el-form :model="addagentobj" label-position="labelPosition" :rules="rules" ref="addagentobj" label-width="140px" style="width:60%; margin: 0 auto;"> | |||
<!-- <el-form-item label="代理商名称:" prop="agentId"> --> | |||
<!-- <el-select v-model="addagentobj.agentId" placeholder="请选择" @change='clickagentId()'> --> | |||
<!-- <el-select v-model="addagentobj.agentId" placeholder="请选择"> | |||
<el-option v-for="item in optionsagentId" :key="item.value" :label="item.agentName" :value="item.id" ></el-option> | |||
</el-select> --> | |||
<!-- </el-form-item> --> | |||
<el-form-item label="公司名称:" prop="name"> | |||
<el-input v-model="addagentobj.name"></el-input> | |||
</el-form-item> | |||
<el-form-item label="联系人:" prop="contactPerson"> | |||
<el-input v-model="addagentobj.contactPerson"></el-input> | |||
</el-form-item> | |||
<el-form-item label="联系手机:" prop="contactNumber"> | |||
<el-input v-model="addagentobj.contactNumber"></el-input> | |||
</el-form-item> | |||
<el-form-item label="省:" prop="provinceId"> | |||
<el-select v-model="addagentobj.provinceId" placeholder="请选择" @change='clickprovinceId()'> | |||
<el-option v-for="item in optionsparentId" :key="item.value" :label="item.name" :value="item.id" > </el-option> | |||
</el-select> | |||
</el-form-item> | |||
<el-form-item label="市:" prop="cityId"> | |||
<el-select v-model="addagentobj.cityId" placeholder="请选择"> | |||
<el-option | |||
v-for="item in optionscityId" | |||
:key="item.value" | |||
:label="item.name" | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
<el-form-item label="详细地址:" prop="address"> | |||
<el-input v-model="addagentobj.address"></el-input> | |||
</el-form-item> | |||
<!-- <el-form-item label="运营人员:" prop="operationStaff"> | |||
<el-select v-model="addagentobj.operationStaff" placeholder="请选择"> | |||
<el-option | |||
v-for="item in optionsoperationStaff" | |||
:key="item.value" | |||
:label="item.name" | |||
:value="item.accountId" | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> --> | |||
<el-form-item label="管理员账号:" prop="managerPhone"> | |||
<el-input v-model="addagentobj.managerPhone"></el-input> | |||
</el-form-item> | |||
<el-form-item label="密码:" prop="managerPassword"> | |||
<el-input v-model="addagentobj.managerPassword"></el-input> | |||
</el-form-item> | |||
</el-form> | |||
<div slot="footer" class="dialog-footer"> | |||
<el-button @click="dialogVisible = false">取 消</el-button> | |||
<el-button type="primary" @click="add()">保存</el-button> | |||
</div> | |||
</el-dialog> | |||
<el-dialog title="编辑" :visible.sync="dialogVisible2" > | |||
<el-form :model="editoragentobj" label-position="labelPosition" :rules="editorrules" ref="editoragentobj" label-width="140px" style="width:60%; margin: 0 auto;"> | |||
<!-- <el-form-item label="代理商名称:" prop="operator"> --> | |||
<!-- <el-select v-model="editoragentobj.operator" placeholder="请选择" @change='clickagentId22()'> --> | |||
<!-- <el-select v-model="editoragentobj.operator" placeholder="请选择"> | |||
<el-option v-for="item in optionsagentId" :key="item.value" :label="item.agentName" :value="item.id" ></el-option> | |||
</el-select> --> | |||
<!-- </el-form-item> --> | |||
<el-form-item label="公司名称:" prop="name"> | |||
<el-input v-model="editoragentobj.name"></el-input> | |||
</el-form-item> | |||
<el-form-item label="联系人:" prop="contactPerson"> | |||
<el-input v-model="editoragentobj.contactPerson"></el-input> | |||
</el-form-item> | |||
<el-form-item label="联系手机:" prop="contactNumber"> | |||
<el-input v-model="editoragentobj.contactNumber"></el-input> | |||
</el-form-item> | |||
<el-form-item label="省:" prop="provinceId"> | |||
<el-select v-model="editoragentobj.provinceId" placeholder="请选择" @change='clickprovinceId3()'> | |||
<el-option v-for="item in optionsparentId" :key="item.value" :label="item.name" :value="item.id" > </el-option> | |||
</el-select> | |||
</el-form-item> | |||
<el-form-item label="市:" prop="cityId"> | |||
<el-select v-model="editoragentobj.cityId" placeholder="请选择"> | |||
<el-option | |||
v-for="item in optionscityId" | |||
:key="item.value" | |||
:label="item.name" | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
<el-form-item label="详细地址:" prop="address"> | |||
<el-input v-model="editoragentobj.address"></el-input> | |||
</el-form-item> | |||
<!-- <el-form-item label="运营人员:" prop="operationStaff"> | |||
<el-select v-model="editoragentobj.operationStaff" placeholder="请选择"> | |||
<el-option | |||
v-for="item in optionsoperationStaff" | |||
:key="item.value" | |||
:label="item.name" | |||
:value="item.accountId" | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> --> | |||
</el-form> | |||
<div slot="footer" class="dialog-footer"> | |||
<el-button @click="dialogVisible2 = false">取 消</el-button> | |||
<el-button type="primary" @click="editor()">保存</el-button> | |||
</div> | |||
</el-dialog> | |||
<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-form-item> | |||
<el-form-item label="密码:" prop="managerPassword"> | |||
<el-input v-model="replaceagentobj.managerPassword"></el-input> | |||
</el-form-item> | |||
</el-form> | |||
<div slot="footer" class="dialog-footer"> | |||
<el-button @click="dialogVisible3 = false">取 消</el-button> | |||
<el-button type="primary" @click="replace()">保存</el-button> | |||
</div> | |||
</el-dialog> | |||
<el-dialog :title="sysFlag==0?'绑定系统运营':'绑定代理商运营'" :visible.sync="operaVisible" > | |||
<el-form :model="operaForm" label-position="labelPosition" :rules="operaRules" ref="operaForm" label-width="140px"> | |||
<el-form-item label="运营人员:" prop="operationalPeople"> | |||
<el-select v-model="operaForm.operationalPeople" style="width:80%" multiple placeholder="请选择"> | |||
<el-option | |||
v-for="item in optionsoperationStaff" | |||
:key="item.value" | |||
:label="item.name" | |||
:value="item.accountId" | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-form> | |||
<div slot="footer" class="dialog-footer"> | |||
<el-button @click="operaVisible = false">取 消</el-button> | |||
<el-button type="primary" @click="saveOpera()">保存</el-button> | |||
</div> | |||
</el-dialog> | |||
<el-dialog title="管理代理商" :visible.sync="agentVisible" > | |||
<el-form :model="agentForm" label-position="labelPosition" :rules="agentRule" ref="agentForm" label-width="140px"> | |||
<el-form-item label="代理商:" prop="agentId"> | |||
<el-select v-model="agentForm.agentId" style="width:80%" multiple filterable placeholder="请选择"> | |||
<el-option | |||
v-for="item in optionsagentId" | |||
:key="item.id" | |||
:label="item.agentName" | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-form> | |||
<div slot="footer" class="dialog-footer"> | |||
<el-button @click="agentVisible = false">取 消</el-button> | |||
<el-button type="primary" @click="saveAgent()">保存</el-button> | |||
</div> | |||
</el-dialog> | |||
</div> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
addagentobj:{ | |||
agentId:'',// 代理商名称 | |||
name:'',// 公司名称 | |||
contactPerson:'',// 联系人 | |||
contactNumber:'',// 联系人手机号 | |||
provinceId:'',// 省id | |||
cityId:'',// 市id | |||
address:'',// 详细地址 | |||
operationStaff:'',// 运营人员id | |||
managerPhone:'',// 管理员账号 | |||
managerPassword:'',// 管理员账号密码 | |||
}, | |||
rules:{ | |||
// agentId: [ | |||
// { required: true, message: '请选择代理商', trigger: 'blur' }, | |||
// ], | |||
name: [ | |||
{ required: true, message: '请输入公司名称', trigger: 'blur' }, | |||
], | |||
contactPerson: [ | |||
{ required: true, message: '请输入联系人名称', trigger: 'blur' }, | |||
], | |||
contactNumber: [ | |||
{ required: true, message: '请输入联系人手机号', trigger: 'blur' }, | |||
{ min: 11, max: 11, message: '请输入手机号', trigger: 'blur' } | |||
], | |||
provinceId: [ | |||
{ required: true, message: '请输入选择省', trigger: 'blur' }, | |||
], | |||
cityId: [ | |||
{ required: true, message: '请输入选择市', trigger: 'blur' }, | |||
], | |||
address: [ | |||
{ required: true, message: '请输入详细地址', trigger: 'blur' }, | |||
], | |||
// operationStaff: [ | |||
// { required: true, message: '请选择运营人员', trigger: 'blur' }, | |||
// ], | |||
managerPhone: [ | |||
{ required: true, message: '请输入管理员账号', trigger: 'blur' }, | |||
], | |||
managerPassword: [ | |||
{ required: true, message: '请输入管理员账号密码', trigger: 'blur' }, | |||
], | |||
}, | |||
optionsparentId:[],//省份列表 | |||
optionscityId:[],//市列表 | |||
optionsagentId:[],//代理商列表 | |||
optionsoperationStaff:[],//运营人员列表 | |||
currentPage4:1, | |||
tableData: [], | |||
dialogVisible:false, | |||
dialogVisible2:false, | |||
dialogVisible3:false, | |||
operaVisible:false, | |||
agentVisible:false, | |||
currentPage4:1, | |||
operatorName:'',//代理商名称 | |||
operationStaffName:'',//运营人员名称 | |||
name:'',//公司名称 | |||
total:0,//总条数 | |||
pageNum:1, | |||
pageSize:7, | |||
orgType:'', | |||
sysFlag:'0', | |||
replaceagentobj:{ | |||
id:'', | |||
managerPhone:'', | |||
managerPassword:'' | |||
}, | |||
ruleser:{ | |||
managerPhone: [ | |||
{ required: true, message: '请输入管理员账号', trigger: 'blur' }, | |||
], | |||
managerPassword: [ | |||
{ required: true, message: '请输入管理员账号密码', trigger: 'blur' }, | |||
], | |||
}, | |||
editoragentobj:{ | |||
id:'', | |||
operator:'',// 代理商名称 | |||
name:'',// 公司名称 | |||
contactPerson:'',// 联系人 | |||
contactNumber:'',// 联系人手机号 | |||
provinceId:'',// 省id | |||
cityId:'',// 市id | |||
address:'',// 详细地址 | |||
// operationStaff:'',// 运营人员id | |||
}, | |||
idx:'0', | |||
operaForm:{ | |||
operationalPeople:'' | |||
}, | |||
agentForm:{ | |||
agentId:[], | |||
}, | |||
operaRules:{ | |||
operationalPeople: [ | |||
{ required: true, message: '请选择运营人员', trigger: 'blur' }, | |||
], | |||
}, | |||
agentRule:{ | |||
agentId: [ | |||
{ required: true, message: '请选择代理商', trigger: 'blur' }, | |||
], | |||
}, | |||
editorrules:{ | |||
// operator: [ | |||
// { required: true, message: '请选择代理商', trigger: 'blur' }, | |||
// ], | |||
name: [ | |||
{ required: true, message: '请输入公司名称', trigger: 'blur' }, | |||
], | |||
contactPerson: [ | |||
{ required: true, message: '请输入联系人名称', trigger: 'blur' }, | |||
], | |||
contactNumber: [ | |||
{ required: true, message: '请输入联系人手机号', trigger: 'blur' }, | |||
{ min: 11, max: 11, message: '请输入手机号', trigger: 'blur' } | |||
], | |||
provinceId: [ | |||
{ required: true, message: '请输入选择省', trigger: 'blur' }, | |||
], | |||
cityId: [ | |||
{ required: true, message: '请输入选择市', trigger: 'blur' }, | |||
], | |||
address: [ | |||
{ required: true, message: '请输入详细地址', trigger: 'blur' }, | |||
], | |||
// operationStaff: [ | |||
// { required: true, message: '请选择运营人员', trigger: 'blur' }, | |||
// ], | |||
} | |||
}; | |||
}, | |||
mounted() { | |||
this.orgType=localStorage.getItem('orgType') | |||
this.getcompanyList() | |||
}, | |||
methods: { | |||
bindAgent(row){ | |||
// console.log(row); | |||
this.agentForm.orgCode=row.orgCode | |||
this.agentForm.agentId=[] | |||
this.findMyAgent() | |||
this.agentVisible=true | |||
}, | |||
saveAgent(){ | |||
this.$refs.agentForm.validate(valid=>{ | |||
if(valid){ | |||
console.log(this.agentForm); | |||
this.$api.api.bindAgent({ | |||
agentIds:this.agentForm.agentId.join(','), | |||
orgCode:this.agentForm.orgCode | |||
}) | |||
.then(res=>{ | |||
this.$message.success('操作成功') | |||
this.agentVisible=false | |||
}) | |||
} | |||
}) | |||
}, | |||
saveOpera(){ | |||
this.$refs.operaForm.validate(valid=>{ | |||
if(valid){ | |||
// console.log(valid,this.operaForm); | |||
this.$api.api.zkoperationrecordSaveCompany({ | |||
orgType:this.idx==0?'1':'2', | |||
accountIds:this.operaForm.operationalPeople.join(','), | |||
orgId: this.operaForm.orgId | |||
}) | |||
.then(res=>{ | |||
console.log(res); | |||
this.$message.success('操作成功') | |||
this.operaVisible=false | |||
}) | |||
} | |||
}) | |||
}, | |||
editOpera(row,idx){ | |||
console.log(row,idx); | |||
// 获取运营人员列表 | |||
this.operaForm.orgId=row.orgCode | |||
this.sysFlag=idx | |||
// 获取所有代理商运营 | |||
this.getAllOperationsStaff(idx) | |||
this.idx=idx | |||
this.zkoperationrecordFindByOrg(row.orgCode,idx) | |||
// this.operaVisible=true | |||
}, | |||
zkoperationrecordFindByOrg(orgId,idx){ | |||
// console.log(idx,orgId); | |||
// return | |||
this.$api.api.zkoperationrecordFindByOrg({ | |||
orgType:idx==0?'1':'2', | |||
orgId | |||
}) | |||
.then(res=>{ | |||
// console.log(res); | |||
if(res.data.length==0){ | |||
// 没有运营人员 | |||
this.operaForm.operationalPeople=[] | |||
}else{ | |||
let arr=[] | |||
// 有运营 | |||
res.data.map(item=>{ | |||
arr.push(item.accountId) | |||
}) | |||
this.operaForm.operationalPeople=arr | |||
} | |||
}) | |||
}, | |||
//编辑 | |||
infoeditor(row){ | |||
this.editoragentobj.id=row.id; | |||
this.$api.http.gitfindById({id:row.id}).then((res) => { | |||
this.editoragentobj.operator=res.data.operator; | |||
this.editoragentobj.name=res.data.name; | |||
this.editoragentobj.contactPerson=res.data.contactPerson; | |||
this.editoragentobj.contactNumber=res.data.contactNumber; | |||
this.editoragentobj.provinceId=res.data.provinceId; | |||
this.editoragentobj.cityId=res.data.cityId; | |||
this.editoragentobj.address=res.data.address; | |||
// this.editoragentobj.operationStaff=res.data.operationStaff; | |||
}); | |||
// this.findMyAgent() | |||
this.getparentIdList() | |||
this.clickprovinceId2(this.editoragentobj.provinceId) | |||
this.dialogVisible2=true; | |||
}, | |||
//获取市 | |||
clickprovinceId2(item){ | |||
this.$api.http.getparentIdList({ | |||
parentId: item | |||
}).then((res) => { | |||
this.optionscityId= res.data | |||
}); | |||
}, | |||
//选择省的时候请求市并清空市 | |||
clickprovinceId3(){ | |||
this.optionscityId=[]; | |||
this.editoragentobj.cityId=''; | |||
this.$api.http.getparentIdList({ | |||
parentId: this.editoragentobj.provinceId | |||
}).then((res) => { | |||
this.optionscityId= res.data | |||
}); | |||
}, | |||
//选择代理商获取运营人员列表并清空运营人员选择 | |||
clickagentId22(){ | |||
this.optionsoperationStaff=[]; | |||
this.editoragentobj.operationStaff=''; | |||
this.$api.http.getAllOperationsStaffByAgent({ | |||
agentId: this.editoragentobj.operator | |||
}).then((res) => { | |||
this.optionsoperationStaff= res.data | |||
}); | |||
}, | |||
//确认编辑 | |||
editor(){ | |||
this.$refs.editoragentobj.validate((valid) => { | |||
if (valid) { | |||
this.$api.http.updateOrg(this.editoragentobj).then((res) => { | |||
if(res.code==0){ | |||
this.dialogVisible2=false; | |||
this.editoragentobj.id=''; | |||
this.$refs.editoragentobj.resetFields(); | |||
this.Screeningofempty() | |||
}else{ | |||
this.$message.error(res.message); | |||
} | |||
}); | |||
} else { | |||
return false; | |||
} | |||
}); | |||
}, | |||
toDisable(row){ | |||
this.$confirm(`确定${row.lockFlag==0?'禁用':'启用'}此代理商么?`, '提示', { | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消', | |||
type: 'warning' | |||
}).then(() => { | |||
// return | |||
// console.log(123); | |||
this.$api.http.updateOrg({id:row.id,lockFlag:row.lockFlag==0?'1':'0'}).then((res) => { | |||
if(res.code==0){ | |||
this.$message({ | |||
type: 'success', | |||
message: '操作成功!' | |||
}); | |||
this.Screeningofempty() | |||
}else{ | |||
this.$message.error(res.message); | |||
} | |||
}) | |||
}) | |||
.catch(err=>{ | |||
// console.log('关闭'); | |||
// console.log(err); | |||
}) | |||
}, | |||
//更换 | |||
inforeplace(row){ | |||
this.replaceagentobj.id=row.id; | |||
this.dialogVisible3=true; | |||
}, | |||
//确认更换 | |||
replace(){ | |||
this.$refs.replaceagentobj.validate((valid) => { | |||
if (valid) { | |||
this.$api.http.changeAccount(this.replaceagentobj).then((res) => { | |||
if(res.code==0){ | |||
this.dialogVisible3=false; | |||
this.$refs.replaceagentobj.resetFields(); | |||
this.Screeningofempty() | |||
}else{ | |||
this.$message.error(res.message); | |||
} | |||
}); | |||
} else { | |||
return false; | |||
} | |||
}); | |||
}, | |||
//删除 | |||
toinifodelete(item){ | |||
this.$confirm('此操作将永久删除, 是否继续?', '提示', { | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消', | |||
type: 'warning' | |||
}).then(() => { | |||
this.$api.http.delOrg({id:item.row.id}).then((res) => { | |||
if(res.code==0){ | |||
this.$message({ | |||
type: 'success', | |||
message: '删除成功!' | |||
}); | |||
this.Screeningofempty() | |||
}else{ | |||
this.$message.error(res.message); | |||
} | |||
}) | |||
}).catch(() => { | |||
this.$message({ | |||
type: 'info', | |||
message: '已取消删除' | |||
}); | |||
}); | |||
}, | |||
//新增 | |||
infoadd(){ | |||
// this.findMyAgent() | |||
this.getparentIdList() | |||
this.dialogVisible=true; | |||
}, | |||
//获取运营人员 | |||
getAllOperationsStaff(idx){ | |||
this.optionsoperationStaff=[]; | |||
if(idx==1){ | |||
this.$api.http.getAllOperationsStaffByAgent({ | |||
agentId:localStorage.getItem('agentId') | |||
}).then((res) => { | |||
this.optionsoperationStaff= res.data | |||
this.operaVisible=true | |||
}); | |||
}else{ | |||
this.$api.http.getAllOperationsStaff().then((res) => { | |||
this.optionsoperationStaff= res.data | |||
this.operaVisible=true | |||
}); | |||
} | |||
}, | |||
//选择代理商获取运营人员列表并清空运营人员选择 | |||
clickagentId(){ | |||
this.optionsoperationStaff=[]; | |||
this.addagentobj.operationStaff=''; | |||
this.$api.http.getAllOperationsStaffByAgent({ | |||
agentId: this.addagentobj.agentId | |||
}).then((res) => { | |||
this.optionsoperationStaff= res.data | |||
}); | |||
}, | |||
//获取代理商 | |||
findMyAgent(){ | |||
this.$api.http.findMyAgent({orgType:this.orgType}).then((res) => { | |||
console.log(res.data) | |||
this.optionsagentId= res.data | |||
this.findAgentByOrgCode() | |||
}); | |||
}, | |||
findAgentByOrgCode(){ | |||
this.$api.api.findAgentByOrgCode({ | |||
orgCode:this.agentForm.orgCode | |||
}) | |||
.then(res=>{ | |||
if(res.data.length==0){ | |||
// 没有代理商 | |||
this.agentForm.agentId=[] | |||
}else{ | |||
let arr=[] | |||
// 有 | |||
res.data.map(item=>{ | |||
arr.push(item.agentId) | |||
}) | |||
// console.log(arr,'123'); | |||
this.agentForm.agentId=arr | |||
} | |||
}) | |||
}, | |||
//选择省的时候请求市并清空市 | |||
clickprovinceId(){ | |||
this.optionscityId=[]; | |||
this.addagentobj.cityId=''; | |||
this.$api.http.getparentIdList({ | |||
parentId: this.addagentobj.provinceId | |||
}).then((res) => { | |||
this.optionscityId= res.data | |||
}); | |||
}, | |||
//获取省 | |||
getparentIdList(){ | |||
this.optionsparentId=[]; | |||
this.$api.http.getparentIdList({ | |||
parentId: 0 | |||
}).then((res) => { | |||
this.optionsparentId= res.data | |||
}); | |||
}, | |||
//确认新增 | |||
add(){ | |||
this.$refs.addagentobj.validate((valid) => { | |||
if (valid) { | |||
this.addagentobj.pid=0; | |||
this.$api.http.AddaddOrg(this.addagentobj).then((res) => { | |||
if(res.code==0){ | |||
this.dialogVisible=false; | |||
this.$refs.addagentobj.resetFields(); | |||
this.Screeningofempty() | |||
}else{ | |||
this.$message.error(res.message); | |||
} | |||
}); | |||
} else { | |||
return false; | |||
} | |||
}); | |||
}, | |||
//清空筛选 | |||
Screeningofempty(){ | |||
this.operatorName=''; | |||
this.operationStaffName=''; | |||
this.name=''; | |||
this.getcompanyList() | |||
}, | |||
//筛选 | |||
Screening(){ | |||
this.getcompanyList() | |||
}, | |||
// 获取列表 | |||
getcompanyList() { | |||
this.tableData=[]; | |||
let parmest={ | |||
current: this.pageNum, | |||
size: this.pageSize, | |||
operatorName:this.operatorName, | |||
operationStaffName:this.operationStaffName, | |||
name:this.name, | |||
agentId:localStorage.getItem('agentId'), | |||
orgType: localStorage.getItem("orgType"), | |||
} | |||
this.$api.http.getcompanyList(parmest).then((res) => { | |||
console.log(res.data); | |||
this.tableData=res.data.records; | |||
this.total=res.data.total | |||
}); | |||
}, | |||
handleSizeChange(val) { | |||
this.pageSize=val; | |||
this.getcompanyList() | |||
}, | |||
handleCurrentChange(val) { | |||
this.pageNum=val; | |||
this.getcompanyList() | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style scoped="scoped" lang="scss" > | |||
.box-center { | |||
width: 100%; | |||
padding: 15px; | |||
min-width: 1200px; | |||
padding-bottom: 100px; | |||
} | |||
.cen-tab{ | |||
width: 100%; | |||
padding: 15px; | |||
background: #FFFFFF; | |||
margin-top: 15px; | |||
} | |||
.tophove { | |||
color: #ffffff; | |||
background: #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; | |||
.label { | |||
font-size: 14px; | |||
font-weight: 400; | |||
color: #32363d; | |||
line-height: 14px; | |||
margin-left: 15px; | |||
} | |||
.toptimeqhuan { | |||
height: 30px; | |||
background: #ffffff; | |||
display: flex; | |||
align-items: center; | |||
} | |||
.toptimeqhuan div { | |||
padding-left: 20px; | |||
padding-right: 20px; | |||
text-align: center; | |||
line-height: 30px; | |||
font-size: 14px; | |||
margin-right: 15px; | |||
border-radius: 4px; | |||
border: 1px solid #e0e0e0; | |||
} | |||
} | |||
} | |||
</style> |
@@ -20,11 +20,11 @@ | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div class="label" style="color: #ffffff">筛选相关:</div> | |||
<div> | |||
<!-- <div> | |||
<el-button @click="infoadd()" style="background: #2671e2; color: #ffffff" | |||
>新增</el-button | |||
> | |||
</div> | |||
</div> --> | |||
<div style="margin-left: 20px"> | |||
<el-button @click="Screening()" style="background: #2671e2; color: #ffffff" | |||
>筛选</el-button | |||
@@ -49,15 +49,14 @@ | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
<!-- <el-table-column | |||
v-if="orgType==0" | |||
prop="operatorName" | |||
label="代理商" | |||
align="center" | |||
> | |||
</el-table-column> | |||
</el-table-column> --> | |||
<el-table-column | |||
v-if="orgType==0" | |||
prop="operationStaffName" | |||
label="运营人员" | |||
align="center" | |||
@@ -69,20 +68,20 @@ | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
<!-- <el-table-column | |||
label="联系人信息" | |||
align="center"> | |||
<template slot-scope="scope"> | |||
<p>{{scope.row.contactPerson}}:{{scope.row.contactNumber}}</p> | |||
</template> | |||
</el-table-column> | |||
</el-table-column> --> | |||
<!-- | |||
<el-table-column | |||
prop="managerPhone" | |||
label="管理员账号" | |||
align="center" | |||
> | |||
</el-table-column> | |||
</el-table-column> --> | |||
<el-table-column | |||
prop="houseNum" | |||
label="服务期楼盘" | |||
@@ -91,12 +90,12 @@ | |||
</el-table-column> | |||
<el-table-column label="操作" align="center" fixed="right" width="200"> | |||
<template slot-scope="scope"> | |||
<el-button type="text" size="small" @click="infoeditor(scope.row)">编辑</el-button> | |||
<!-- <el-button type="text" size="small" @click="infoeditor(scope.row)">编辑</el-button> | |||
<el-button type="text" size="small" @click="inforeplace(scope.row)">更换账号</el-button> | |||
<el-button type="text" size="small" @click="toinifodelete(scope)">删除</el-button> | |||
<el-button type="text" size="small" @click="toinifodelete(scope)">删除</el-button> --> | |||
<el-button type="text" size="small" @click="editOpera(scope.row,0)">管理系统运营</el-button> | |||
<el-button type="text" size="small" @click="editOpera(scope.row,1)">管理代理商运营</el-button> | |||
<el-button type="text" size="small" @click="bindAgent(scope.row)">绑定代理商</el-button> | |||
<!-- <el-button type="text" size="small" @click="bindAgent(scope.row)">绑定代理商</el-button> --> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -478,7 +477,7 @@ export default { | |||
this.operaForm.orgId=row.orgCode | |||
this.sysFlag=idx | |||
// 获取所有代理商运营 | |||
this.getAllOperationsStaff(idx) | |||
this.getAllOperationsStaff(idx,row) | |||
this.idx=idx | |||
this.zkoperationrecordFindByOrg(row.orgCode,idx) | |||
// this.operaVisible=true | |||
@@ -635,11 +634,11 @@ export default { | |||
this.dialogVisible=true; | |||
}, | |||
//获取运营人员 | |||
getAllOperationsStaff(idx){ | |||
getAllOperationsStaff(idx,row){ | |||
this.optionsoperationStaff=[]; | |||
if(idx==1){ | |||
this.$api.http.getAllOperationsStaffByAgent({ | |||
agentId:localStorage.getItem('agentId') | |||
orgCode:row.orgCode | |||
}).then((res) => { | |||
this.optionsoperationStaff= res.data | |||
this.operaVisible=true | |||
@@ -751,7 +750,8 @@ export default { | |||
operatorName:this.operatorName, | |||
operationStaffName:this.operationStaffName, | |||
name:this.name, | |||
agentId:localStorage.getItem('agentId') | |||
agentId:localStorage.getItem('agentId'), | |||
orgType: localStorage.getItem("orgType"), | |||
} | |||
this.$api.http.getcompanyList(parmest).then((res) => { | |||
console.log(res.data); | |||
@@ -16,7 +16,7 @@ | |||
<el-button @click="Screeningofempty()">清空筛选条件</el-button> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button @click="editorinfo()" style="background: #2671e2; color: #ffffff" | |||
<el-button v-if="equ_batch_add" @click="editorinfo()" style="background: #2671e2; color: #ffffff" | |||
>添加批次</el-button | |||
> | |||
</div> | |||
@@ -77,7 +77,7 @@ | |||
</el-table-column> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope="scope"> | |||
<div style="color: #2671E2;" @click="clickbianji(scope.row)">修改</div> | |||
<div v-if="equ_batch_edit" style="color: #2671E2;" @click="clickbianji(scope.row)">修改</div> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -126,6 +126,7 @@ | |||
</template> | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -165,6 +166,13 @@ export default { | |||
isshow:'绑定' | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created() { | |||
this.equ_batch_add = this.permissions["equ_batch_add"]; | |||
this.equ_index_edit = this.permissions["equ_index_edit"]; | |||
}, | |||
mounted() { | |||
this.getcompanyList() | |||
@@ -561,6 +561,7 @@ | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
v-if="equ_ed_online" | |||
prop="" | |||
label="操作" | |||
fixed="right" | |||
@@ -640,6 +641,7 @@ | |||
<script> | |||
import * as echarts from "echarts"; | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -740,6 +742,12 @@ export default { | |||
], | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created() { | |||
this.equ_ed_online = this.permissions["equ_ed_online"]; | |||
}, | |||
mounted() { | |||
// return; | |||
let theRequest = this.$route.query; | |||
@@ -243,10 +243,10 @@ | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column prop="" label="操作" align="center"> | |||
<el-table-column prop="" label="操作" align="center" v-if="equ_edg_detail"> | |||
<template slot-scope="{ row }"> | |||
<el-button | |||
v-if="row.recording != 0" | |||
v-if="row.recording != 0&&equ_edg_detail" | |||
@click.native.prevent="goinfo(row)" | |||
type="text" | |||
size="small" | |||
@@ -273,6 +273,7 @@ | |||
</template> | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -309,6 +310,12 @@ export default { | |||
}, | |||
], | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created() { | |||
this.equ_edg_detail = this.permissions["equ_edg_detail"]; | |||
}, | |||
mounted() { | |||
// return | |||
@@ -186,6 +186,7 @@ | |||
<el-button | |||
@click="infoMasstransfer()" | |||
type="primary" | |||
v-if="equ_index_bind" | |||
:disabled="multipleSelection.length == 0" | |||
>批量绑定</el-button | |||
> | |||
@@ -194,6 +195,7 @@ | |||
<el-button | |||
@click="zkequipmentUnbind()" | |||
type="primary" | |||
v-if="equ_index_unbind" | |||
:disabled="multipleSelection.length == 0" | |||
>批量解绑</el-button | |||
> | |||
@@ -201,12 +203,13 @@ | |||
<div style="margin-left: 20px"> | |||
<el-button | |||
@click="infoBulkbinding()" | |||
v-if="euq_index_batch" | |||
type="primary" | |||
:disabled="multipleSelection.length == 0" | |||
>批量绑定批次号</el-button | |||
> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<div style="margin-left: 20px" v-if="equ_index_add"> | |||
<el-button @click="infoadd()" type="primary">添加</el-button> | |||
</div> | |||
</div> | |||
@@ -364,7 +367,7 @@ | |||
<el-dropdown-menu slot="dropdown"> | |||
<el-dropdown-item | |||
command="toinifoThereturn" | |||
v-if="row.receiveType == 2" | |||
v-if="row.receiveType == 2&&euq_index_back" | |||
>归还</el-dropdown-item | |||
> | |||
<!-- <el-dropdown-item | |||
@@ -372,26 +375,29 @@ | |||
>领用</el-dropdown-item | |||
> --> | |||
<el-dropdown-item command="infotranscription" | |||
v-if="equ_index_change" | |||
>转写方式</el-dropdown-item | |||
> | |||
<el-dropdown-item command="isAutoSwitch" | |||
v-if="equ_index_auto" | |||
>自动转写</el-dropdown-item | |||
> | |||
<el-dropdown-item | |||
command="acceptance" | |||
v-if="row.acceptanceStatus == 1" | |||
v-if="row.acceptanceStatus == 1&&equ_index_makeSure" | |||
>验收</el-dropdown-item | |||
> | |||
<el-dropdown-item | |||
command="getRight" | |||
v-if="row.acceptanceStatus != (1 || 0)" | |||
v-if="(row.acceptanceStatus != (1 || 0))&&euq_index_normal" | |||
>恢复正常</el-dropdown-item | |||
> | |||
<el-dropdown-item command="toinfobinding" v-if="orgType == 0" | |||
<el-dropdown-item command="toinfobinding" v-if="orgType == 0&&equ_index_bind" | |||
>绑定</el-dropdown-item | |||
> | |||
<!-- <el-dropdown-item command="infoeditor">修改</el-dropdown-item> --> | |||
<el-dropdown-item command="toinifodelete" | |||
v-if="equ_index_del" | |||
>删除</el-dropdown-item | |||
> | |||
</el-dropdown-menu> | |||
@@ -672,6 +678,7 @@ | |||
</template> | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -830,6 +837,21 @@ export default { | |||
], | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created() { | |||
this.equ_index_add = this.permissions["equ_index_add"]; | |||
this.equ_index_bind = this.permissions["equ_index_bind"]; | |||
this.equ_index_unbind = this.permissions["equ_index_unbind"]; | |||
this.equ_index_change = this.permissions["equ_index_change"]; | |||
this.equ_index_auto = this.permissions["equ_index_auto"]; | |||
this.equ_index_makeSure = this.permissions["equ_index_makeSure"]; | |||
this.equ_index_del = this.permissions["equ_index_del"]; | |||
this.euq_index_batch = this.permissions["euq_index_batch"]; | |||
this.euq_index_back = this.permissions["euq_index_back"]; | |||
this.euq_index_normal = this.permissions["euq_index_normal"]; | |||
}, | |||
mounted() { | |||
// 获取设备列表 | |||
this.equipmentManagement(); | |||
@@ -146,7 +146,7 @@ | |||
<div class="label">关机状态</div> | |||
<el-select | |||
class="div-inp" | |||
clearable | |||
collapse-tags | |||
v-model="searchForm.offStatus" | |||
@@ -195,6 +195,7 @@ | |||
<el-button | |||
@click="openAllLight()" | |||
type="primary" | |||
v-if="equ_state_open" | |||
:disabled="multipleSelection.length == 0" | |||
>批量开启指示灯</el-button | |||
> | |||
@@ -203,6 +204,7 @@ | |||
<el-button | |||
@click="closeAllLight()" | |||
type="primary" | |||
v-if="equ_state_off" | |||
:disabled="multipleSelection.length == 0" | |||
>批量关闭指示灯</el-button | |||
> | |||
@@ -211,6 +213,7 @@ | |||
<el-button | |||
@click="Batchreturn()" | |||
type="primary" | |||
v-if="equ_state_back" | |||
:disabled="multipleSelection.length == 0" | |||
>批量归还</el-button | |||
> | |||
@@ -219,6 +222,7 @@ | |||
<el-button | |||
@click="infoMasstransfer()" | |||
type="primary" | |||
v-if="equ_state_tranfer" | |||
:disabled="multipleSelection.length == 0" | |||
>批量转移</el-button | |||
> | |||
@@ -227,6 +231,7 @@ | |||
<el-button | |||
@click="zkequipmentUnbind()" | |||
type="primary" | |||
v-if="equ_state_unbind" | |||
:disabled="multipleSelection.length == 0" | |||
>批量解绑</el-button | |||
> | |||
@@ -345,18 +350,19 @@ | |||
</span> | |||
<el-dropdown-menu slot="dropdown"> | |||
<!-- <el-dropdown-item command="toinifoThereturn" v-if="row.receiveType == 2" >归还</el-dropdown-item> --> | |||
<el-dropdown-item command="toinifoThereturn" v-if="row.userName" | |||
<el-dropdown-item command="toinifoThereturn" v-if="row.userName&&equ_state_take" | |||
>归还</el-dropdown-item | |||
> | |||
<el-dropdown-item command="receive" v-if="!row.userName" | |||
<el-dropdown-item command="receive" v-if="!row.userName&&equ_state_take" | |||
>领用</el-dropdown-item | |||
> | |||
<el-dropdown-item command="lightStatusChange" | |||
v-if="equ_state_open" | |||
>{{ | |||
row.lightStatus == "on" ? "关闭" : "开启" | |||
}}指示灯</el-dropdown-item | |||
> | |||
<el-dropdown-item command="wifiShow">WiFi管理</el-dropdown-item> | |||
<el-dropdown-item v-if="equ_state_WiFi" command="wifiShow">WiFi管理</el-dropdown-item> | |||
</el-dropdown-menu> | |||
</el-dropdown> | |||
</template> | |||
@@ -506,6 +512,7 @@ | |||
</template> | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -687,6 +694,18 @@ export default { | |||
], | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created() { | |||
this.equ_state_open = this.permissions["equ_state_open"]; | |||
this.equ_state_off = this.permissions["equ_state_off"]; | |||
this.equ_state_back = this.permissions["equ_state_back"]; | |||
this.equ_state_tranfer = this.permissions["equ_state_tranfer"]; | |||
this.equ_state_unbind = this.permissions["equ_state_unbind"]; | |||
this.equ_state_take = this.permissions["equ_state_take"]; | |||
this.equ_state_WiFi = this.permissions["equ_state_WiFi"]; | |||
}, | |||
mounted() { | |||
this.getTableList(); | |||
// 获取列表 | |||
@@ -35,7 +35,7 @@ | |||
<el-button>清空筛选条件</el-button> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button style="background: #2671e2; color: #ffffff" | |||
<el-button v-if="file_index_upload" style="background: #2671e2; color: #ffffff" | |||
>上传</el-button | |||
> | |||
</div> | |||
@@ -94,8 +94,8 @@ | |||
<!-- scope --> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope=""> | |||
<span style="color: #2671E2;">编辑</span> | |||
<span style="color: #2671E2;margin-left: 10px;">播放</span> | |||
<span style="color: #2671E2;" v-if="file_index_edit">编辑</span> | |||
<span style="color: #2671E2;margin-left: 10px;" v-if="file_index_start">播放</span> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -122,6 +122,7 @@ | |||
</template> | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -185,6 +186,14 @@ export default { | |||
}], | |||
value: '' | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created() { | |||
this.file_index_upload = this.permissions["file_index_upload"]; | |||
this.file_index_edit = this.permissions["file_index_edit"]; | |||
this.file_index_start = this.permissions["file_index_start"]; | |||
}, | |||
mounted() {}, | |||
methods: { | |||
@@ -60,17 +60,17 @@ | |||
<el-button @click="reset()">清空筛选条件</el-button> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button style="background: #2671e2; color: #ffffff" | |||
<el-button v-if="sch_index_add" style="background: #2671e2; color: #ffffff" | |||
@click="addinfo()" >添加</el-button | |||
> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button style="background: #2671e2; color: #ffffff" | |||
<el-button v-if="sch_index_del" style="background: #2671e2; color: #ffffff" | |||
@click="alldel()" >批量删除</el-button | |||
> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button style="background: #2671e2; color: #ffffff" | |||
<div style="margin-left: 20px"> | |||
<el-button v-if="sch_index_sort" style="background: #2671e2; color: #ffffff" | |||
>批量排班</el-button | |||
> | |||
</div> | |||
@@ -111,10 +111,10 @@ | |||
</el-table-column> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope="scope"> | |||
<span style="color: #2671e2" @click="switchstatus(scope.row,2)" v-if="scope.row.status == 0">暂停接待</span> | |||
<span style="color: #2671e2" @click="switchstatus(scope.row,0)" v-if="scope.row.status == 2">空闲</span> | |||
<span style="color: #2671e2; margin-left: 10px">工作安排</span> | |||
<span style="color: #2671e2; margin-left: 10px" @click="del(scope.row)">删除</span> | |||
<span style="color: #2671e2" @click="switchstatus(scope.row,2)" v-if="scope.row.status == 0&&sch_index_pause">暂停接待</span> | |||
<span style="color: #2671e2" @click="switchstatus(scope.row,0)" v-if="scope.row.status == 2&&sch_index_pause">空闲</span> | |||
<span style="color: #2671e2; margin-left: 10px" v-if="sch_index_job">工作安排</span> | |||
<span style="color: #2671e2; margin-left: 10px" v-if="sch_index_del" @click="del(scope.row)">删除</span> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -156,6 +156,7 @@ | |||
</template> | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
import Sortable from 'sortablejs' | |||
export default { | |||
data() { | |||
@@ -196,9 +197,18 @@ export default { | |||
size: 6, | |||
total: 0, | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created() { | |||
this.sch_index_add = this.permissions["sch_index_add"]; | |||
this.sch_index_del = this.permissions["sch_index_del"]; | |||
this.sch_index_sort = this.permissions["sch_index_sort"]; | |||
this.sch_index_pause = this.permissions["sch_index_pause"]; | |||
this.sch_index_job = this.permissions["sch_index_job"]; | |||
}, | |||
mounted() { | |||
this.getHouse(); | |||
}, | |||
methods: { | |||
@@ -225,10 +235,10 @@ export default { | |||
} | |||
}) | |||
}).catch(() => { | |||
this.$message({ | |||
type: 'info', | |||
message: '已取消修改' | |||
}); | |||
// this.$message({ | |||
// type: 'info', | |||
// message: '已取消修改' | |||
// }); | |||
}); | |||
}, | |||
@@ -40,7 +40,7 @@ | |||
<el-button style="background: #2671e2; color: #ffffff" @click="Screening()">筛选</el-button> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button @click="editorinfo()" style="background: #2671e2; color: #ffffff" | |||
<el-button v-if="tem_pwl_add" @click="editorinfo()" style="background: #2671e2; color: #ffffff" | |||
>添加模板</el-button | |||
> | |||
</div> | |||
@@ -84,10 +84,10 @@ | |||
</el-table-column> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope="scope"> | |||
<el-button type="text" size="small" v-if="scope.row.status==1" @click="clickstateis(scope.row)">启用</el-button> | |||
<el-button type="text" size="small" v-if="scope.row.status==0" @click="clickstateno(scope.row)">停用</el-button> | |||
<el-button type="text" size="small" @click="clickbianji(scope.row)">编辑</el-button> | |||
<el-button type="text" size="small" @click="templatedel(scope.row)">删除</el-button> | |||
<el-button type="text" size="small" v-if="scope.row.status==1&&tem_pwl_stop" @click="clickstateis(scope.row)">启用</el-button> | |||
<el-button type="text" size="small" v-if="scope.row.status==0&&tem_pwl_stop" @click="clickstateno(scope.row)">停用</el-button> | |||
<el-button type="text" size="small" v-if="tem_pwl_edit" @click="clickbianji(scope.row)">编辑</el-button> | |||
<el-button type="text" size="small" v-if="tem_pwl_del" @click="templatedel(scope.row)">删除</el-button> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -107,6 +107,7 @@ | |||
</template> | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -125,6 +126,15 @@ export default { | |||
], | |||
statetest:'', | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created() { | |||
this.tem_pwl_add = this.permissions["tem_pwl_add"]; | |||
this.tem_pwl_edit = this.permissions["tem_pwl_edit"]; | |||
this.tem_pwl_stop = this.permissions["tem_pwl_stop"]; | |||
this.tem_pwl_del = this.permissions["tem_pwl_del"]; | |||
}, | |||
mounted() { | |||
this.zkhousePage() | |||
@@ -35,6 +35,7 @@ | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button | |||
v-if="tem_tab_add" | |||
@click="editorinfo()" | |||
style="background: #2671e2; color: #ffffff" | |||
>新增</el-button | |||
@@ -58,8 +59,9 @@ | |||
<!-- scope --> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope="scope" style=""> | |||
<span style="color: #2671e2" @click="bianji(scope.row)">编辑</span> | |||
<span v-if="tem_tab_edit" style="color: #2671e2" @click="bianji(scope.row)">编辑</span> | |||
<span | |||
v-if="tem_tab_del" | |||
style="color: #2671e2; margin-left: 10px" | |||
@click="del(scope.row)" | |||
>删除</span | |||
@@ -106,6 +108,7 @@ | |||
</template> | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -131,6 +134,14 @@ export default { | |||
}, | |||
editFlag: false, | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created() { | |||
this.tem_tab_add = this.permissions["tem_tab_add"]; | |||
this.tem_tab_del = this.permissions["tem_tab_del"]; | |||
this.tem_tab_edit = this.permissions["tem_tab_edit"]; | |||
}, | |||
mounted() { | |||
this.zkhousePage(); | |||
@@ -45,6 +45,7 @@ | |||
<el-button | |||
@click="addinfo()" | |||
style="background: #2671e2; color: #ffffff" | |||
v-if="tem_ww_add" | |||
>新增</el-button | |||
> | |||
</div> | |||
@@ -69,8 +70,8 @@ | |||
<!-- scope --> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope="{ row }"> | |||
<el-button type="text" @click="edit(row)">修改</el-button> | |||
<el-button type="text" @click="del(row)">删除</el-button> | |||
<el-button v-if="tem_ww_edit" type="text" @click="edit(row)">修改</el-button> | |||
<el-button v-if="tem_ww_del" type="text" @click="del(row)">删除</el-button> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -120,6 +121,7 @@ | |||
</template> | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -155,6 +157,14 @@ export default { | |||
}, | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created() { | |||
this.tem_ww_add = this.permissions["tem_ww_add"]; | |||
this.tem_ww_del = this.permissions["tem_ww_del"]; | |||
this.tem_ww_edit = this.permissions["tem_ww_edit"]; | |||
}, | |||
mounted() { | |||
// 获取楼盘列表 | |||
this.zkhousePage(); | |||
@@ -3,7 +3,7 @@ | |||
<!-- 头 --> | |||
<div class="app-top"> | |||
<div class="app-titel" style="margin-top: 5px"> | |||
<div style="margin-left: 20px"> | |||
<div style="margin-left: 20px" v-if="sys_dept_add"> | |||
<el-button | |||
@click="editorinfo()" | |||
style="background: #2671e2; color: #ffffff" | |||
@@ -21,10 +21,11 @@ | |||
<el-table-column prop="peopleCount" label="部门人数" align="center"> | |||
</el-table-column> | |||
<!-- scope --> | |||
<el-table-column label="操作" align="center"> | |||
<el-table-column label="操作" v-if="sys_dept_edit||sys_dept_del" align="center"> | |||
<template slot-scope="scope" style=""> | |||
<span style="color: #2671e2" @click="bianji(scope.row)">编辑</span> | |||
<span v-if="sys_dept_edit" style="color: #2671e2" @click="bianji(scope.row)">编辑</span> | |||
<span | |||
v-if="sys_dept_del" | |||
style="color: #2671e2; margin-left: 10px" | |||
@click="del(scope.row)" | |||
>移除</span | |||
@@ -103,6 +104,7 @@ | |||
</template> | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -138,6 +140,14 @@ export default { | |||
editFlag: false, | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["permissions"]), | |||
}, | |||
created(){ | |||
this.sys_dept_add = this.permissions["sys_dept_add"]; | |||
this.sys_dept_edit = this.permissions["sys_dept_edit"]; | |||
this.sys_dept_del = this.permissions["sys_dept_del"]; | |||
}, | |||
mounted() { | |||
// this.zkhousePage(); | |||
this.houseId = localStorage.getItem("houseId"); | |||
@@ -0,0 +1,299 @@ | |||
<template> | |||
<div class="app-container calendar-list-container"> | |||
<basic-container> | |||
<el-table | |||
:data="list" | |||
border | |||
style="width: 100%" | |||
:header-cell-style="{ textAlign: 'center' }" | |||
:cell-style="{ textAlign: 'center' }" | |||
> | |||
<el-table-column prop="dictName" label="角色名字" > | |||
</el-table-column> | |||
<el-table-column prop="address" label="操作"> | |||
<template slot-scope="scope"> | |||
<el-button | |||
v-if="roleManager_btn_perm" | |||
type="text" | |||
size="small" | |||
icon="el-icon-plus" | |||
@click="handlePermission(scope.row)" | |||
>权限 | |||
</el-button> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<!-- <el-pagination | |||
style="text-align: center" | |||
background | |||
@size-change="sizeChange" | |||
@current-change="currentChange" | |||
:current-page.sync="page.pageNum" | |||
:page-size="page.pageSize" | |||
layout="total,prev, pager, next, jumper" | |||
:total="page.total" | |||
> | |||
</el-pagination> --> | |||
</basic-container> | |||
<el-dialog | |||
:visible.sync="dialogPermissionVisible" | |||
:close-on-click-modal="false" | |||
title="分配权限" | |||
> | |||
<div class="dialog-main-tree"> | |||
<el-tree | |||
ref="menuTree" | |||
:data="treeData" | |||
:default-checked-keys="checkedKeys" | |||
:check-strictly="false" | |||
:props="defaultProps" | |||
:filter-node-method="filterNode" | |||
class="filter-tree" | |||
node-key="id" | |||
highlight-current | |||
show-checkbox | |||
/> | |||
<!-- default-expand-all --> | |||
</div> | |||
<div slot="footer" class="dialog-footer"> | |||
<el-button type="primary" size="small" @click="updatePermession(orgType)" | |||
>更 新 | |||
</el-button> | |||
<el-button type="default" size="small" @click="cancal()" | |||
>取消</el-button | |||
> | |||
</div> | |||
</el-dialog> | |||
</div> | |||
</template> | |||
<script> | |||
import { | |||
addObj, | |||
delObj, | |||
fetchList, | |||
fetchRoleTree, | |||
permissionUpd, | |||
putObj, | |||
} from "@/api/admin/role"; | |||
import { tableOption } from "@/const/crud/admin/role"; | |||
import { fetchTree } from "@/api/admin/dept"; | |||
import { fetchMenuTree } from "@/api/admin/menu"; | |||
import { mapGetters } from "vuex"; | |||
export default { | |||
name: "TableRole", | |||
data() { | |||
return { | |||
searchForm: {}, | |||
tabselect: "0", | |||
agentList: [], //代理商 | |||
orgList: [], | |||
orgId: "", | |||
agentId: "", | |||
selectKeys: [], | |||
tableOption: tableOption, | |||
dsScopeData: [], | |||
treeData: [], | |||
checkRole: [], | |||
filterText: "", | |||
treeDataList: [], | |||
checkedKeys: [], | |||
checkedDsScope: [], | |||
searchMsg: { | |||
roleName: "", | |||
lockFlag: "", | |||
}, | |||
defaultProps: { | |||
label: "name", | |||
value: "id", | |||
}, | |||
formTitle: "新增", | |||
orgCode: "", | |||
defaultProps1: { | |||
label: "name", | |||
value: "id", | |||
}, | |||
treeOption: { | |||
nodeKey: "aid", | |||
addBtn: false, | |||
defaultCheckedKeys: [1], | |||
menu: false, | |||
props: { | |||
label: "name", | |||
value: "aid", | |||
}, | |||
}, | |||
page: { | |||
total: 0, // 总页数 | |||
currentPage: 1, // 当前页数 | |||
pageSize: 10, // 每页显示多少条 | |||
}, | |||
menuIds: "", | |||
list: [], | |||
listLoading: true, | |||
dialogFormVisible: false, | |||
form: { | |||
roleName: "", //角色名称 | |||
// dsType: "", //数据权限 | |||
roleDesc: "", //描述 | |||
orgCode: "", //公司 | |||
lockFlag: "0", //状态 | |||
}, | |||
addFlag: true, | |||
rules: { | |||
roleName: [ | |||
{ required: true, message: "请填写角色名称", trigger: "blur" }, | |||
], | |||
// dsType: [ | |||
// { required: true, message: "请选择数据权限", trigger: "blur" }, | |||
// ], | |||
}, | |||
editFlag: false, | |||
roleId: undefined, | |||
roleCode: undefined, | |||
rolesOptions: undefined, | |||
dialogPermissionVisible: false, | |||
roleManager_btn_add: false, | |||
roleManager_btn_edit: false, | |||
roleManager_btn_del: false, | |||
roleManager_btn_perm: false, | |||
}; | |||
}, | |||
async created() { | |||
this.roleManager_btn_add = this.permissions["sys_role_add"]; | |||
this.roleManager_btn_edit = this.permissions["sys_role_edit"]; | |||
this.roleManager_btn_del = this.permissions["sys_role_del"]; | |||
this.roleManager_btn_perm = this.permissions["sys_role_perm"]; | |||
this.getTableList() | |||
// this.getTreeDataList()//获取部门树 | |||
}, | |||
watch: { | |||
}, | |||
computed: { | |||
...mapGetters(["elements", "permissions"]), | |||
}, | |||
methods: { | |||
getTableList(){ | |||
this.$api.api.userDict({ | |||
dictType:1, | |||
dictKey:null | |||
}).then(res=>{ | |||
console.log(res); | |||
this.list=res.data | |||
}) | |||
}, | |||
cancal() { | |||
this.dialogPermissionVisible = false; | |||
}, | |||
handlePermission(row) { | |||
console.log(row.dictValue); | |||
this.$api.api.fetchRoleTree(row.dictValue) | |||
.then((response) => { | |||
this.checkedKeys = response.data; | |||
return fetchMenuTree(); | |||
}) | |||
.then((response) => { | |||
this.treeData = response.data; | |||
// 解析出所有的太监节点 | |||
this.checkedKeys = this.resolveAllEunuchNodeId( | |||
this.treeData, | |||
this.checkedKeys, | |||
[] | |||
); | |||
this.dialogPermissionVisible = true; | |||
this.orgType = row.dictValue; | |||
// this.roleCode = row.roleCode; | |||
}); | |||
}, | |||
filterNode(value, data) { | |||
// console.log(value,data); | |||
// return | |||
if (!value) return true; | |||
return data.name.indexOf(value) !== -1; | |||
}, | |||
/** | |||
* 解析出所有的太监节点id | |||
* @param json 待解析的json串 | |||
* @param idArr 原始节点数组 | |||
* @param temp 临时存放节点id的数组 | |||
* @return 太监节点id数组 | |||
*/ | |||
resolveAllEunuchNodeId(json, idArr, temp) { | |||
for (let i = 0; i < json.length; i++) { | |||
const item = json[i]; | |||
// 存在子节点,递归遍历;不存在子节点,将json的id添加到临时数组中 | |||
if (item.children && item.children.length !== 0) { | |||
this.resolveAllEunuchNodeId(item.children, idArr, temp); | |||
} else { | |||
temp.push(idArr.filter((id) => id === item.id)); | |||
} | |||
} | |||
return temp; | |||
}, | |||
// filterNode(value, data) { | |||
// if (!value) return true | |||
// return data.label.indexOf(value) !== -1 | |||
// }, | |||
getNodeData(data, done) { | |||
done(); | |||
}, | |||
create(row, done, loading) { | |||
if (this.form.dsType === 1) { | |||
this.form.dsScope = this.$refs.scopeTree.getCheckedKeys().join(","); | |||
} | |||
addObj(...this.form, ...{ orgCode: this.orgCode }) | |||
.then(() => { | |||
this.getList(); | |||
done(); | |||
this.$notify.success("创建成功"); | |||
}) | |||
.catch(() => { | |||
loading(); | |||
}); | |||
}, | |||
handleSelectionChange(e) { | |||
this.checkRole = []; | |||
console.log(e); | |||
e.map((item) => { | |||
this.checkRole.push(item.roleId); | |||
}); | |||
}, | |||
updatePermession(orgType) { | |||
this.menuIds = ""; | |||
this.menuIds = this.$refs.menuTree | |||
.getCheckedKeys() | |||
.join(",") | |||
.concat(",") | |||
.concat(this.$refs.menuTree.getHalfCheckedKeys().join(",")); | |||
this.$api.api.permissionUpd(orgType, this.menuIds).then(() => { | |||
this.dialogPermissionVisible = false; | |||
this.$notify.success("修改成功"); | |||
}); | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.el-dialog__wrapper { | |||
.el-dialog { | |||
width: 61% !important; | |||
.dialog-main-tree { | |||
max-height: 400px; | |||
overflow-y: auto; | |||
} | |||
} | |||
.el-form-item__label { | |||
width: 20% !important; | |||
padding-right: 20px; | |||
} | |||
.el-form-item__content { | |||
margin-left: 20% !important; | |||
} | |||
} |
@@ -161,7 +161,7 @@ | |||
</el-form> | |||
</div> | |||
<div style="margin: 0 0 10px 10px"> | |||
<div style="margin: 0 0 10px 10px" v-if="sys_user_add"> | |||
<!-- <el-button type="primary" :disabled='checkRole.length==0' @click="delIds">批量删除</el-button> --> | |||
<el-button type="primary" @click="addRole">添加</el-button> | |||
</div> | |||
@@ -190,10 +190,11 @@ | |||
<el-table-column prop="createTime" label="注册时间"> </el-table-column> | |||
<el-table-column prop="address" label="操作"> | |||
<template slot-scope="scope"> | |||
<el-button @click="resetPwd(scope.row)" type="text" size="small" | |||
<el-button v-if="resetPassword" @click="resetPwd(scope.row)" type="text" size="small" | |||
>密码重置</el-button | |||
> | |||
<el-button | |||
v-if="sys_user_edit" | |||
@click="editRole(scope.row, false)" | |||
type="text" | |||
size="small" | |||
@@ -302,20 +303,20 @@ | |||
<el-table-column prop="createTime" label="添加时间"> </el-table-column> | |||
<el-table-column prop="address" label="操作" fixed="right" width="150"> | |||
<template slot-scope="scope"> | |||
<el-button @click="editTwo(scope.row)" type="text" size="small" | |||
<el-button @click="editTwo(scope.row)" v-if="sys_user_edit1" type="text" size="small" | |||
>编辑</el-button | |||
> | |||
<el-button | |||
v-if="scope.row.orgType == 3 || scope.row.userRoleType == 8" | |||
v-if="(scope.row.orgType == 3 || scope.row.userRoleType == 8)&&sys_user_choseHouse" | |||
@click="gochosehouse(scope.row)" | |||
type="text" | |||
size="small" | |||
>楼盘选择</el-button | |||
> | |||
<el-button @click="startorg(scope.row)" type="text" size="small"> | |||
<el-button v-if="sys_user_bind" @click="startorg(scope.row)" type="text" size="small"> | |||
{{ scope.row.lockFlag == 0 ? "禁用" : "启用" }}</el-button | |||
> | |||
<el-button @click="deletes(scope.row)" type="text" size="small" | |||
<el-button v-if="sys_user_del" @click="deletes(scope.row)" type="text" size="small" | |||
>移除</el-button | |||
> | |||
</template> | |||
@@ -1129,6 +1130,11 @@ export default { | |||
{ required: true, message: "请选择角色身份", trigger: "blur" }, | |||
], | |||
}, | |||
// 数据权限 | |||
// sys_user_add:true, | |||
// sys_user_edit:true, | |||
// sys_user_del:true, | |||
// resetPassword:true, | |||
}; | |||
}, | |||
computed: { | |||
@@ -1157,7 +1163,11 @@ export default { | |||
// 权限 | |||
this.sys_user_add = this.permissions["sys_user_add"]; | |||
this.sys_user_edit = this.permissions["sys_user_edit"]; | |||
this.sys_user_edit1 = this.permissions["sys_user_edit1"]; | |||
this.sys_user_del = this.permissions["sys_user_del"]; | |||
this.resetPassword = this.permissions["resetPassword"]; | |||
this.sys_user_choseHouse = this.permissions["sys_user_choseHouse"]; | |||
this.sys_user_bind = this.permissions["sys_user_bind"]; | |||
// return | |||
// 获取用户信息 | |||
let info = getStore({ name: "userInfo" }); | |||
@@ -1816,6 +1826,10 @@ export default { | |||
if (this.addFlag) { | |||
this.$refs.form.validate((valid) => { | |||
if (valid) { | |||
if(localStorage.getItem('orgType')==2||localStorage.getItem('orgType')==3){ | |||
// console.log(123); | |||
this.form.orgCode=localStorage.getItem('orgCode') | |||
} | |||
this.$api.api.addUser(this.form).then((res) => { | |||
console.log(res); | |||
this.roleList(); | |||
@@ -214,6 +214,11 @@ | |||
<template slot-scope="{ row }"> | |||
{{ row.serviceStatus == 0 ? "在服务期内" : "已过期" }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="lockFlag" label="状态" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{row.lockFlag==1?'禁用':'启用'}} | |||
</template> | |||
</el-table-column> | |||
<!-- scope --> | |||
<el-table-column label="操作" align="center" fixed="right" width="200"> | |||
@@ -231,6 +236,7 @@ | |||
<!-- <el-button type="text">添加员工</el-button> --> | |||
<el-button type="text" size="small" @click="bindAgent(row)">绑定代理商</el-button> | |||
<el-button type="text" @click="del(row)">删除</el-button> | |||
<el-button type="text" size="small" @click="toDisable(row)">{{row.lockFlag==0?'禁用':'启用'}}</el-button> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -729,7 +735,7 @@ export default { | |||
this.operaForm.orgCode = row.orgCode; | |||
this.sysFlag=idx | |||
this.idx=idx | |||
this.AllOperationsStaff(idx); | |||
this.AllOperationsStaff(idx,row); | |||
this.zkoperationrecordFindByOrg(row.id,idx); | |||
}, | |||
zkoperationrecordFindByOrg(orgId,idx) { | |||
@@ -754,12 +760,12 @@ export default { | |||
}); | |||
}, | |||
//获取运营人员 | |||
AllOperationsStaff(idx) { | |||
AllOperationsStaff(idx,row) { | |||
console.log(idx); | |||
this.optionsoperationalPeople = []; | |||
if(idx==1){ | |||
this.$api.http.getAllOperationsStaffByAgent({ | |||
agentId:localStorage.getItem('agentId') | |||
agentId:row.agentId | |||
}).then((res) => { | |||
this.optionsoperationalPeople= res.data | |||
this.operaVisible = true; | |||
@@ -810,6 +816,31 @@ export default { | |||
} | |||
}); | |||
}, | |||
toDisable(row){ | |||
this.$confirm(`确定${row.lockFlag==0?'禁用':'启用'}此代理商么?`, '提示', { | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消', | |||
type: 'warning' | |||
}).then(() => { | |||
// return | |||
// console.log(123); | |||
this.$api.api.editZkhouse({id:row.id,lockFlag:row.lockFlag==0?1:0}).then((res) => { | |||
if(res.code==0){ | |||
this.$message({ | |||
type: 'success', | |||
message: '操作成功!' | |||
}); | |||
this.zkhousePage(); | |||
}else{ | |||
this.$message.error(res.message); | |||
} | |||
}) | |||
}) | |||
.catch(err=>{ | |||
// console.log('关闭'); | |||
// console.log(err); | |||
}) | |||
}, | |||
dialogClose() { | |||
this.restFrom(); | |||
}, | |||
@@ -946,7 +977,7 @@ export default { | |||
let _this = this; | |||
this.addressOptions = []; | |||
let res = await getAreaList({ parentId }); | |||
console.log(res); | |||
// console.log(res); | |||
// 当他没有值时给addressOptions赋值,这是第一个数组 | |||
if (res.code == 0) { | |||
// _this.$set(_this, 'addressOptions',_this.ruleForm.cityIds&&_this.ruleForm.provinceId ? this.loadOptions(res.data||[] ):res.data) | |||
@@ -5,8 +5,9 @@ | |||
// const url = 'http://pigx-gateway' | |||
// const url = 'http://39.97.167.65:9999' //测试 | |||
// const url = 'http://192.168.31.169:9999' //长龙 | |||
const url = 'http://192.168.31.134:9999' //嘉豪 | |||
// const url = 'http://192.168.31.133:9999' //嘉豪 | |||
// const url = 'http://192.168.31.100:9999' //王笑 | |||
const url = 'http://mrra2f.natappfree.cc' //王笑 | |||
const CompressionWebpackPlugin = require('compression-webpack-plugin') | |||
const productionGzipExtensions = ['js', 'css'] | |||