@@ -9,7 +9,24 @@ export function userDict(query) { | |||||
params: 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) { | export function fetchList(query) { | ||||
return request({ | return request({ | ||||
url: '/admin/user/page', | url: '/admin/user/page', | ||||
@@ -16,7 +16,7 @@ | |||||
<el-button @click="Screeningofempty()">清空筛选条件</el-button> | <el-button @click="Screeningofempty()">清空筛选条件</el-button> | ||||
</div> | </div> | ||||
<div style="margin-left: 20px"> | <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 | >添加批次</el-button | ||||
> | > | ||||
</div> | </div> | ||||
@@ -77,7 +77,7 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column label="操作" align="center"> | <el-table-column label="操作" align="center"> | ||||
<template slot-scope="scope"> | <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> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
@@ -126,6 +126,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -165,6 +166,13 @@ export default { | |||||
isshow:'绑定' | isshow:'绑定' | ||||
}; | }; | ||||
}, | |||||
computed: { | |||||
...mapGetters(["permissions"]), | |||||
}, | |||||
created() { | |||||
this.equ_batch_add = this.permissions["equ_batch_add"]; | |||||
this.equ_index_edit = this.permissions["equ_index_edit"]; | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
this.getcompanyList() | this.getcompanyList() | ||||
@@ -561,6 +561,7 @@ | |||||
> | > | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
v-if="equ_ed_online" | |||||
prop="" | prop="" | ||||
label="操作" | label="操作" | ||||
fixed="right" | fixed="right" | ||||
@@ -640,6 +641,7 @@ | |||||
<script> | <script> | ||||
import * as echarts from "echarts"; | import * as echarts from "echarts"; | ||||
import { mapGetters } from "vuex"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -740,6 +742,12 @@ export default { | |||||
], | ], | ||||
}; | }; | ||||
}, | }, | ||||
computed: { | |||||
...mapGetters(["permissions"]), | |||||
}, | |||||
created() { | |||||
this.equ_ed_online = this.permissions["equ_ed_online"]; | |||||
}, | |||||
mounted() { | mounted() { | ||||
// return; | // return; | ||||
let theRequest = this.$route.query; | let theRequest = this.$route.query; | ||||
@@ -243,10 +243,10 @@ | |||||
align="center" | align="center" | ||||
> | > | ||||
</el-table-column> | </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 }"> | <template slot-scope="{ row }"> | ||||
<el-button | <el-button | ||||
v-if="row.recording != 0" | |||||
v-if="row.recording != 0&&equ_edg_detail" | |||||
@click.native.prevent="goinfo(row)" | @click.native.prevent="goinfo(row)" | ||||
type="text" | type="text" | ||||
size="small" | size="small" | ||||
@@ -273,6 +273,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -309,6 +310,12 @@ export default { | |||||
}, | }, | ||||
], | ], | ||||
}; | }; | ||||
}, | |||||
computed: { | |||||
...mapGetters(["permissions"]), | |||||
}, | |||||
created() { | |||||
this.equ_edg_detail = this.permissions["equ_edg_detail"]; | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
// return | // return | ||||
@@ -186,6 +186,7 @@ | |||||
<el-button | <el-button | ||||
@click="infoMasstransfer()" | @click="infoMasstransfer()" | ||||
type="primary" | type="primary" | ||||
v-if="equ_index_bind" | |||||
:disabled="multipleSelection.length == 0" | :disabled="multipleSelection.length == 0" | ||||
>批量绑定</el-button | >批量绑定</el-button | ||||
> | > | ||||
@@ -194,6 +195,7 @@ | |||||
<el-button | <el-button | ||||
@click="zkequipmentUnbind()" | @click="zkequipmentUnbind()" | ||||
type="primary" | type="primary" | ||||
v-if="equ_index_unbind" | |||||
:disabled="multipleSelection.length == 0" | :disabled="multipleSelection.length == 0" | ||||
>批量解绑</el-button | >批量解绑</el-button | ||||
> | > | ||||
@@ -201,12 +203,13 @@ | |||||
<div style="margin-left: 20px"> | <div style="margin-left: 20px"> | ||||
<el-button | <el-button | ||||
@click="infoBulkbinding()" | @click="infoBulkbinding()" | ||||
v-if="euq_index_batch" | |||||
type="primary" | type="primary" | ||||
:disabled="multipleSelection.length == 0" | :disabled="multipleSelection.length == 0" | ||||
>批量绑定批次号</el-button | >批量绑定批次号</el-button | ||||
> | > | ||||
</div> | </div> | ||||
<div style="margin-left: 20px"> | |||||
<div style="margin-left: 20px" v-if="equ_index_add"> | |||||
<el-button @click="infoadd()" type="primary">添加</el-button> | <el-button @click="infoadd()" type="primary">添加</el-button> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -364,7 +367,7 @@ | |||||
<el-dropdown-menu slot="dropdown"> | <el-dropdown-menu slot="dropdown"> | ||||
<el-dropdown-item | <el-dropdown-item | ||||
command="toinifoThereturn" | command="toinifoThereturn" | ||||
v-if="row.receiveType == 2" | |||||
v-if="row.receiveType == 2&&euq_index_back" | |||||
>归还</el-dropdown-item | >归还</el-dropdown-item | ||||
> | > | ||||
<!-- <el-dropdown-item | <!-- <el-dropdown-item | ||||
@@ -372,26 +375,29 @@ | |||||
>领用</el-dropdown-item | >领用</el-dropdown-item | ||||
> --> | > --> | ||||
<el-dropdown-item command="infotranscription" | <el-dropdown-item command="infotranscription" | ||||
v-if="equ_index_change" | |||||
>转写方式</el-dropdown-item | >转写方式</el-dropdown-item | ||||
> | > | ||||
<el-dropdown-item command="isAutoSwitch" | <el-dropdown-item command="isAutoSwitch" | ||||
v-if="equ_index_auto" | |||||
>自动转写</el-dropdown-item | >自动转写</el-dropdown-item | ||||
> | > | ||||
<el-dropdown-item | <el-dropdown-item | ||||
command="acceptance" | command="acceptance" | ||||
v-if="row.acceptanceStatus == 1" | |||||
v-if="row.acceptanceStatus == 1&&equ_index_makeSure" | |||||
>验收</el-dropdown-item | >验收</el-dropdown-item | ||||
> | > | ||||
<el-dropdown-item | <el-dropdown-item | ||||
command="getRight" | command="getRight" | ||||
v-if="row.acceptanceStatus != (1 || 0)" | |||||
v-if="(row.acceptanceStatus != (1 || 0))&&euq_index_normal" | |||||
>恢复正常</el-dropdown-item | >恢复正常</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 | ||||
> | > | ||||
<!-- <el-dropdown-item command="infoeditor">修改</el-dropdown-item> --> | <!-- <el-dropdown-item command="infoeditor">修改</el-dropdown-item> --> | ||||
<el-dropdown-item command="toinifodelete" | <el-dropdown-item command="toinifodelete" | ||||
v-if="equ_index_del" | |||||
>删除</el-dropdown-item | >删除</el-dropdown-item | ||||
> | > | ||||
</el-dropdown-menu> | </el-dropdown-menu> | ||||
@@ -672,6 +678,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | 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() { | mounted() { | ||||
// 获取设备列表 | // 获取设备列表 | ||||
this.equipmentManagement(); | this.equipmentManagement(); | ||||
@@ -146,7 +146,7 @@ | |||||
<div class="label">关机状态</div> | <div class="label">关机状态</div> | ||||
<el-select | <el-select | ||||
class="div-inp" | class="div-inp" | ||||
clearable | clearable | ||||
collapse-tags | collapse-tags | ||||
v-model="searchForm.offStatus" | v-model="searchForm.offStatus" | ||||
@@ -195,6 +195,7 @@ | |||||
<el-button | <el-button | ||||
@click="openAllLight()" | @click="openAllLight()" | ||||
type="primary" | type="primary" | ||||
v-if="equ_state_open" | |||||
:disabled="multipleSelection.length == 0" | :disabled="multipleSelection.length == 0" | ||||
>批量开启指示灯</el-button | >批量开启指示灯</el-button | ||||
> | > | ||||
@@ -203,6 +204,7 @@ | |||||
<el-button | <el-button | ||||
@click="closeAllLight()" | @click="closeAllLight()" | ||||
type="primary" | type="primary" | ||||
v-if="equ_state_off" | |||||
:disabled="multipleSelection.length == 0" | :disabled="multipleSelection.length == 0" | ||||
>批量关闭指示灯</el-button | >批量关闭指示灯</el-button | ||||
> | > | ||||
@@ -211,6 +213,7 @@ | |||||
<el-button | <el-button | ||||
@click="Batchreturn()" | @click="Batchreturn()" | ||||
type="primary" | type="primary" | ||||
v-if="equ_state_back" | |||||
:disabled="multipleSelection.length == 0" | :disabled="multipleSelection.length == 0" | ||||
>批量归还</el-button | >批量归还</el-button | ||||
> | > | ||||
@@ -219,6 +222,7 @@ | |||||
<el-button | <el-button | ||||
@click="infoMasstransfer()" | @click="infoMasstransfer()" | ||||
type="primary" | type="primary" | ||||
v-if="equ_state_tranfer" | |||||
:disabled="multipleSelection.length == 0" | :disabled="multipleSelection.length == 0" | ||||
>批量转移</el-button | >批量转移</el-button | ||||
> | > | ||||
@@ -227,6 +231,7 @@ | |||||
<el-button | <el-button | ||||
@click="zkequipmentUnbind()" | @click="zkequipmentUnbind()" | ||||
type="primary" | type="primary" | ||||
v-if="equ_state_unbind" | |||||
:disabled="multipleSelection.length == 0" | :disabled="multipleSelection.length == 0" | ||||
>批量解绑</el-button | >批量解绑</el-button | ||||
> | > | ||||
@@ -345,18 +350,19 @@ | |||||
</span> | </span> | ||||
<el-dropdown-menu slot="dropdown"> | <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.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 | ||||
> | > | ||||
<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 | ||||
> | > | ||||
<el-dropdown-item command="lightStatusChange" | <el-dropdown-item command="lightStatusChange" | ||||
v-if="equ_state_open" | |||||
>{{ | >{{ | ||||
row.lightStatus == "on" ? "关闭" : "开启" | row.lightStatus == "on" ? "关闭" : "开启" | ||||
}}指示灯</el-dropdown-item | }}指示灯</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-menu> | ||||
</el-dropdown> | </el-dropdown> | ||||
</template> | </template> | ||||
@@ -506,6 +512,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | 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() { | mounted() { | ||||
this.getTableList(); | this.getTableList(); | ||||
// 获取列表 | // 获取列表 | ||||
@@ -35,7 +35,7 @@ | |||||
<el-button>清空筛选条件</el-button> | <el-button>清空筛选条件</el-button> | ||||
</div> | </div> | ||||
<div style="margin-left: 20px"> | <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 | >上传</el-button | ||||
> | > | ||||
</div> | </div> | ||||
@@ -94,8 +94,8 @@ | |||||
<!-- scope --> | <!-- scope --> | ||||
<el-table-column label="操作" align="center"> | <el-table-column label="操作" align="center"> | ||||
<template slot-scope=""> | <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> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
@@ -122,6 +122,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -185,6 +186,14 @@ export default { | |||||
}], | }], | ||||
value: '' | 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() {}, | mounted() {}, | ||||
methods: { | methods: { | ||||
@@ -60,17 +60,17 @@ | |||||
<el-button @click="reset()">清空筛选条件</el-button> | <el-button @click="reset()">清空筛选条件</el-button> | ||||
</div> | </div> | ||||
<div style="margin-left: 20px"> | <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 | @click="addinfo()" >添加</el-button | ||||
> | > | ||||
</div> | </div> | ||||
<div style="margin-left: 20px"> | <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 | @click="alldel()" >批量删除</el-button | ||||
> | > | ||||
</div> | </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 | >批量排班</el-button | ||||
> | > | ||||
</div> | </div> | ||||
@@ -111,10 +111,10 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column label="操作" align="center"> | <el-table-column label="操作" align="center"> | ||||
<template slot-scope="scope"> | <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> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
@@ -156,6 +156,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
import Sortable from 'sortablejs' | import Sortable from 'sortablejs' | ||||
export default { | export default { | ||||
data() { | data() { | ||||
@@ -196,9 +197,18 @@ export default { | |||||
size: 6, | size: 6, | ||||
total: 0, | 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() { | mounted() { | ||||
this.getHouse(); | this.getHouse(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
@@ -225,10 +235,10 @@ export default { | |||||
} | } | ||||
}) | }) | ||||
}).catch(() => { | }).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> | <el-button style="background: #2671e2; color: #ffffff" @click="Screening()">筛选</el-button> | ||||
</div> | </div> | ||||
<div style="margin-left: 20px"> | <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 | >添加模板</el-button | ||||
> | > | ||||
</div> | </div> | ||||
@@ -84,10 +84,10 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column label="操作" align="center"> | <el-table-column label="操作" align="center"> | ||||
<template slot-scope="scope"> | <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> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
@@ -107,6 +107,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -125,6 +126,15 @@ export default { | |||||
], | ], | ||||
statetest:'', | 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() { | mounted() { | ||||
this.zkhousePage() | this.zkhousePage() | ||||
@@ -35,6 +35,7 @@ | |||||
</div> | </div> | ||||
<div style="margin-left: 20px"> | <div style="margin-left: 20px"> | ||||
<el-button | <el-button | ||||
v-if="tem_tab_add" | |||||
@click="editorinfo()" | @click="editorinfo()" | ||||
style="background: #2671e2; color: #ffffff" | style="background: #2671e2; color: #ffffff" | ||||
>新增</el-button | >新增</el-button | ||||
@@ -58,8 +59,9 @@ | |||||
<!-- scope --> | <!-- scope --> | ||||
<el-table-column label="操作" align="center"> | <el-table-column label="操作" align="center"> | ||||
<template slot-scope="scope" style=""> | <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 | <span | ||||
v-if="tem_tab_del" | |||||
style="color: #2671e2; margin-left: 10px" | style="color: #2671e2; margin-left: 10px" | ||||
@click="del(scope.row)" | @click="del(scope.row)" | ||||
>删除</span | >删除</span | ||||
@@ -106,6 +108,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -131,6 +134,14 @@ export default { | |||||
}, | }, | ||||
editFlag: false, | 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() { | mounted() { | ||||
this.zkhousePage(); | this.zkhousePage(); | ||||
@@ -45,6 +45,7 @@ | |||||
<el-button | <el-button | ||||
@click="addinfo()" | @click="addinfo()" | ||||
style="background: #2671e2; color: #ffffff" | style="background: #2671e2; color: #ffffff" | ||||
v-if="tem_ww_add" | |||||
>新增</el-button | >新增</el-button | ||||
> | > | ||||
</div> | </div> | ||||
@@ -69,8 +70,8 @@ | |||||
<!-- scope --> | <!-- scope --> | ||||
<el-table-column label="操作" align="center"> | <el-table-column label="操作" align="center"> | ||||
<template slot-scope="{ row }"> | <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> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
@@ -120,6 +121,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | 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() { | mounted() { | ||||
// 获取楼盘列表 | // 获取楼盘列表 | ||||
this.zkhousePage(); | this.zkhousePage(); | ||||
@@ -3,7 +3,7 @@ | |||||
<!-- 头 --> | <!-- 头 --> | ||||
<div class="app-top"> | <div class="app-top"> | ||||
<div class="app-titel" style="margin-top: 5px"> | <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 | <el-button | ||||
@click="editorinfo()" | @click="editorinfo()" | ||||
style="background: #2671e2; color: #ffffff" | style="background: #2671e2; color: #ffffff" | ||||
@@ -21,10 +21,11 @@ | |||||
<el-table-column prop="peopleCount" label="部门人数" align="center"> | <el-table-column prop="peopleCount" label="部门人数" align="center"> | ||||
</el-table-column> | </el-table-column> | ||||
<!-- scope --> | <!-- 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=""> | <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 | <span | ||||
v-if="sys_dept_del" | |||||
style="color: #2671e2; margin-left: 10px" | style="color: #2671e2; margin-left: 10px" | ||||
@click="del(scope.row)" | @click="del(scope.row)" | ||||
>移除</span | >移除</span | ||||
@@ -103,6 +104,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -138,6 +140,14 @@ export default { | |||||
editFlag: false, | 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() { | mounted() { | ||||
// this.zkhousePage(); | // this.zkhousePage(); | ||||
this.houseId = localStorage.getItem("houseId"); | 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> | </el-form> | ||||
</div> | </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" :disabled='checkRole.length==0' @click="delIds">批量删除</el-button> --> | ||||
<el-button type="primary" @click="addRole">添加</el-button> | <el-button type="primary" @click="addRole">添加</el-button> | ||||
</div> | </div> | ||||
@@ -190,10 +190,11 @@ | |||||
<el-table-column prop="createTime" label="注册时间"> </el-table-column> | <el-table-column prop="createTime" label="注册时间"> </el-table-column> | ||||
<el-table-column prop="address" label="操作"> | <el-table-column prop="address" label="操作"> | ||||
<template slot-scope="scope"> | <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 | ||||
> | > | ||||
<el-button | <el-button | ||||
v-if="sys_user_edit" | |||||
@click="editRole(scope.row, false)" | @click="editRole(scope.row, false)" | ||||
type="text" | type="text" | ||||
size="small" | size="small" | ||||
@@ -302,20 +303,20 @@ | |||||
<el-table-column prop="createTime" label="添加时间"> </el-table-column> | <el-table-column prop="createTime" label="添加时间"> </el-table-column> | ||||
<el-table-column prop="address" label="操作" fixed="right" width="150"> | <el-table-column prop="address" label="操作" fixed="right" width="150"> | ||||
<template slot-scope="scope"> | <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 | ||||
> | > | ||||
<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)" | @click="gochosehouse(scope.row)" | ||||
type="text" | type="text" | ||||
size="small" | size="small" | ||||
>楼盘选择</el-button | >楼盘选择</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 | {{ 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 | >移除</el-button | ||||
> | > | ||||
</template> | </template> | ||||
@@ -1129,6 +1130,11 @@ export default { | |||||
{ required: true, message: "请选择角色身份", trigger: "blur" }, | { required: true, message: "请选择角色身份", trigger: "blur" }, | ||||
], | ], | ||||
}, | }, | ||||
// 数据权限 | |||||
// sys_user_add:true, | |||||
// sys_user_edit:true, | |||||
// sys_user_del:true, | |||||
// resetPassword:true, | |||||
}; | }; | ||||
}, | }, | ||||
computed: { | computed: { | ||||
@@ -1157,7 +1163,11 @@ export default { | |||||
// 权限 | // 权限 | ||||
this.sys_user_add = this.permissions["sys_user_add"]; | this.sys_user_add = this.permissions["sys_user_add"]; | ||||
this.sys_user_edit = this.permissions["sys_user_edit"]; | 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.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 | // return | ||||
// 获取用户信息 | // 获取用户信息 | ||||
let info = getStore({ name: "userInfo" }); | let info = getStore({ name: "userInfo" }); | ||||
@@ -4,9 +4,10 @@ | |||||
*/ | */ | ||||
// const url = 'http://pigx-gateway' | // const url = 'http://pigx-gateway' | ||||
// const url = 'http://39.97.167.65:9999' //测试 | // const url = 'http://39.97.167.65:9999' //测试 | ||||
const url = 'http://192.168.31.169:9999' //长龙 | |||||
// const url = 'http://192.168.31.169:9999' //长龙 | |||||
// const url = 'http://192.168.31.133:9999' //嘉豪 | // const url = 'http://192.168.31.133:9999' //嘉豪 | ||||
// const url = 'http://192.168.31.100:9999' //王笑 | // const url = 'http://192.168.31.100:9999' //王笑 | ||||
const url = 'http://mrra2f.natappfree.cc' //王笑 | |||||
const CompressionWebpackPlugin = require('compression-webpack-plugin') | const CompressionWebpackPlugin = require('compression-webpack-plugin') | ||||
const productionGzipExtensions = ['js', 'css'] | const productionGzipExtensions = ['js', 'css'] | ||||