代码备份

prod
anthonywj 2 years ago
parent e68beb4141
commit 9fd20e58ce

@ -1,4 +1,4 @@
{
"BASE_URL": "http://192.168.0.122:9991",
"BASE_URL": "http://192.168.0.166:9991",
"hosp_name": "平和县医院"
}

@ -123,11 +123,9 @@
.el-button [class*="el-icon-"] + span {
margin-left: 1px;
}
td {
padding: 3px;
padding: 0;
}
tr.current-row > td,
.el-table__body tr:hover > td {
background: #ecd1cf;
@ -343,3 +341,5 @@
/*transition: all .5s;*/
}

@ -1,6 +1,5 @@
<template>
<div>
<!-- 部门信息相关-->
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
@ -250,7 +249,7 @@
<!-- 部门绑定仓库信息-->
<el-tab-pane>
<span slot="label">{{ currentRow.name }}-仓库信息</span>
<span slot="label">{{ currentRow.name }}-仓库列表</span>
<el-form :inline="true" :model="invQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="仓库名称/编码:">
<el-input
@ -502,7 +501,7 @@ export default {
status: 1,
remark: "",
pcode: "0",
pId: 0,
pid: 0,
level: 1,
};
},
@ -510,7 +509,7 @@ export default {
this.formName = "add";
this.formVisible = true;
this.formData = {
pId: row.id,
pid: row.id,
pcode: row.code,
status: 1
}

@ -29,7 +29,7 @@
border
highlight-current-row
@current-change="handSubInvCurrentChange"
style="width: 100%;">
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
prop="name"
@ -46,6 +46,11 @@
label="所属部门"
>
</el-table-column>
<el-table-column
prop="parentInvName"
label="上级仓库"
>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
@ -67,6 +72,128 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="query.page"
:limit.sync="query.limit"
@pagination="getList"
/>
<!--仓库编辑界面-->
<el-dialog
:title="formMap[formName]"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="subFormVisible"
:before-close="hideForm"
width="60%"
top="5vh"
>
<el-form :model="subData" ref="dataForm" :rules="formRules" label-width="80px">
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="所属部门" prop="parentId">
<el-select v-model="subData.parentId" placeholder="顶级" style="width: 80%">
<el-option
v-for="item in fromDeptOptions"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left"
><span v-html="item.html"></span>{{ item.name }}</span
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="上级仓库" prop="parentCode">
<treeselect v-model="subData.parentCode" :options="invOptions" :normalizer="normalizer"
style="width: 80%"
placeholder="选择上级仓库"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="仓库编码" prop="code" class="query-form-item">
<el-input
disabled
v-model="subData.code" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="仓库名称" prop="name" class="query-form-item">
<el-input
v-model="subData.name" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row class="el-row" type="flex">
<el-col class="el-col">
<el-form-item label="备注" prop="name" class="query-form-item">
<el-input
v-model="subData.remark"
type="textarea"
style="width: 90%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-table :data="sysSubList" style="width: 100%; margin-bottom: 30px;" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="外部系统名称"
prop="sysName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="外部仓库编码"
prop="thirdId"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="外部仓库名称"
prop="thirdName"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="!configParms.basicInv"
@click="intentSubSelect(scope.row)"
>关联
</el-button
>
<el-button type="text" size="small" @click.native.stop="unbindSubThrWarehouse(scope.row)"
:disabled="scope.row.thirdId=='' ||scope.row.thirdId==null ||!configParms.basicInv"
>解绑
</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button>
<el-button
type="primary"
@click.native="forInvSubmit()"
>提交
</el-button
>
</div>
</el-dialog>
</el-card>
<el-tabs type="border-card" style="margin: 15px">
<el-tab-pane>
@ -93,7 +220,7 @@
</el-button
>
<el-button type="primary" @click="addUser()"
icon="el-icon-plus"
icon="el-icon-document-add"
>选入用户
</el-button
>
@ -131,12 +258,12 @@
移除
</el-button>
<el-button
type="text"
size="small" :disabled="!configParms.basicInv"
@click.native="rmInvUser(scope.row)">
授权
</el-button>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small" :disabled="!configParms.basicInv"-->
<!-- @click.native="rmInvUser(scope.row)">-->
<!-- 授权-->
<!-- </el-button>-->
<el-button
type="text"
size="small" :disabled="!configParms.basicInv"
@ -149,7 +276,6 @@
</el-tab-pane>
<el-tab-pane>
<span slot="label">{{ currentRow.name }}-单据类型</span>
<el-form :inline="true" :model="userQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="单据类型名称:">
<el-input
@ -171,8 +297,8 @@
>查询
</el-button
>
<el-button type="primary" @click="addUser()"
icon="el-icon-plus"
<el-button type="primary" @click="addBussinessType()"
icon="el-icon-document-add"
>选入单据类型
</el-button
>
@ -180,7 +306,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userBussinessTypeList" ref="typeList"
<el-table :data="userBussinessTypeList" ref="typeList"
border
style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
@ -209,7 +335,7 @@
<!--添加用户弹窗-->
<el-dialog
v-if="userFormVisible"
title="仓库信息-添加用户"
title="仓库信息-选入用户"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="userFormVisible"
@ -247,62 +373,32 @@
@pagination="getSelectUser"
/>
</el-dialog>
<!--添加单据类型弹窗-->
<el-dialog
title="仓库关联单据类型"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="userBussinessTypeFormVisible"
>
<el-row type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button
type="primary"
@click.native="addBussinessType()"
:loading="loading"
>选入
</el-button
>
</el-button-group>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button @click.native="userBussinessTypeFormVisible = !userBussinessTypeFormVisible"
>取消
</el-button
>
</div>
</el-dialog>
<!--选入单据类型弹窗-->
<el-dialog
title="单据类型"
title="仓库信息-选入单据类型"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="bussinessTypeFormVisible"
>
<el-table v-loading="loading" :data="bussinessTypeList" ref="typeList"
@selection-change="handleBussinessTypeSelectionChange"
border
style="width: 100%">
<el-table-column
type="selection"
:reserve-selection="true"
width="55">
</el-table-column>
<el-table-column label="单据类型编码" prop="action" fixed></el-table-column>
<el-table-column label="单据类型名称" prop="name" fixed></el-table-column>
<el-table-column label="单据类型编码" prop="action"></el-table-column>
<el-table-column label="单据类型名称" prop="name"></el-table-column>
</el-table>
<el-pagination
:page-size="bussinessTypeQuery.limit"
@current-change="getBussinessType"
layout="prev, pager, next"
<pagination
v-show="bussinessTypeTotal>0"
:total="bussinessTypeTotal"
:current-page="bussinessTypeQuery.page"
>
</el-pagination>
:page.sync="bussinessTypeQuery.page"
:limit.sync="bussinessTypeQuery.limit"
@pagination="getSelectUser"
/>
<div slot="footer" class="dialog-footer">
<el-button @click.native="bussinessTypeFormVisible = !bussinessTypeFormVisible"
>取消
@ -329,99 +425,6 @@
<relBusUserDialog :inputQuery="curSeleUser" :closeDialog="cancelRelBusDiaolog"></relBusUserDialog>
</el-dialog>
<!--编辑表单界面-->
<el-dialog
:title="formMap[formName]"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="subFormVisible"
:before-close="hideForm"
width="60%"
top="5vh"
>
<el-form :model="subData" ref="dataForm">
<el-form-item label="所属仓库" prop="pid">
<el-select v-model="subData.parentId" placeholder="顶级" disabled>
<el-option
v-for="item in mergeList"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left"
><span v-html="item.html"></span>{{ item.name }}</span
>
</el-option>
</el-select>
</el-form-item>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="分库编码" prop="title" class="query-form-item">
<el-input
disabled
v-model="subData.code" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="分库名称" prop="name" class="query-form-item">
<el-input
v-model="subData.name" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-table :data="sysSubList" style="width: 100%; margin-bottom: 30px;" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="第三方系统名称"
prop="sysName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="第三方仓库ID"
prop="thirdId"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="第三方仓库名称"
prop="thirdName"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="!configParms.basicInv"
@click="intentSubSelect(scope.row)"
>关联
</el-button
>
<el-button type="text" size="small" @click.native.stop="unbindSubThrWarehouse(scope.row)"
:disabled="scope.row.thirdId=='' ||scope.row.thirdId==null ||!configParms.basicInv"
>解绑
</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button>
<el-button
type="primary"
@click.native="forSubSubmit()"
:loading="formLoading"
>提交
</el-button
>
</div>
</el-dialog>
<!--货位管理-->
<el-dialog
title="货位管理"
@ -442,69 +445,81 @@ import {
filterSubAll, saveSubWarehouse, deleteSubWarehouse,
getSubThrsysDetail, bindThrSubWarehouse, unbindSubThrWarehouse
} from "@/api/system/invSubWarehouse";
import {filterThrList} from "@/api/thrsys/thrInvWarehouse";
import {getHospitalUserList, selectNotSelectUser} from "@/api/auth/authUser";
import {getJoinBussinessType} from "@/api/basic/bussinessType";
import {formatDate} from "@/utils/date";
import axios from "axios";
import store from "@/store";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
import relBusUserDialog from "./invWarehouseRelBusTypes";
import {selectSysParamByKey} from "@/api/system/param/systemParamConfig";
import {filterUserBusTypeList} from "@/api/basic/invRelBusTypes";
import invSpaceManage from "@/views/inventory/InvSpaceManage";
import {
addWarehouseUser, deleteWarehouseBussinessType,
saveWarehouseUser,
addWarehouseUser, deleteWarehouseBussinessType, deleteWarehouseUser, filterList,
warehouseBussinessTypeList,
warehouseUserList
} from "@/api/system/invWarehouse";
import {superSearch} from "@/api/biz/udiInfo";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import Treeselect from "@riophae/vue-treeselect";
export default {
data() {
return {
//----------------------------------
query: {
id: null,
pid: null,
name: null,
code: null,
status: "1",
advanceType: null,
isDefault: null
page: 1,
limit: 10,
},
loading: true,
list: [],
total: 0,
formMap: {
add: "仓库信息-新增",
edit: "仓库信息-编辑"
},
formName: null,
configParms: {},
currentCode: null,
currentRow: {name: "仓库"},
mutiInvMode: true,
subFormVisible: false,
formRules: {
parentId: [
{required: true, message: "请选择所属部门", trigger: "blur"}
],
name: [
{required: true, message: "请选择仓库名称", trigger: "blur"}
]
},
subData: {},
fromDeptOptions: [],
invOptions: [],
//-------------------------------------
userQuery: {
code: null,
page: 1,
limit: 10
},
loading: true,
list: [],
userData: [],
userTotal: 0,
selectUserList: [],
selectUserToatl: 0,
selectAddUser: [],
configParms: {},
mutiInvMode: true,
subRadioCheck: null,
currentCode: null,
currentRow: {name: "仓库"},
curSeleUser: null,
//--------------------
selectUserQuery: {
code: null,
page: 1,
limit: 10
},
userloading: false,
userFormVisible: false,
subData: {},
userloading: false,
selectUserList: [],
selectUserToatl: 0,
selectAddUser: [],
//------------------------------
curSeleUser: null,
relBusUserVisile: false,
userBussinessTypeList: [],
userBussinessTypeFormVisible: false,
bussinessTypeQuery: {
enabled: true,
@ -518,14 +533,6 @@ export default {
page: 1,
limit: 10
},
formName: null,
formMap: {
addTop: "添加分库",
add: "添加货位",
edit: "编辑"
},
subFormVisible: false,
selectBussinessTypeList: [],
bussinessTypeFormVisible: false,
@ -540,7 +547,9 @@ export default {
};
},
methods: {
onReset() {
//---------------------------------
onReset() { //
this.$router.push({
path: "",
});
@ -552,25 +561,90 @@ export default {
this.busQuery.page = 1;
this.getList();
},
//
onSubmit() {
onSubmit() { //
this.getList();
},
//
getList() {
getList() { //
this.loading = true;
filterSubAll(this.query)
.then((response) => {
this.loading = false;
this.list = response.data || [];
this.total = response.data.total;
this.list = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.total = 0;
this.list = [];
});
},
//
getSyncConfig() {
handleSubForm(data, formName) { //
this.formName = formName;
if (formName === "edit") {
this.subData = JSON.parse(JSON.stringify(data));
} else if (formName === "add") {
this.subData = {};
}
this.subFormVisible = true;
this.getSubThrsysDetailData();
filterSubAll(this.query)
.then((response) => {
let invList = response.data.list || [];
this.invOptions = this.handleTree(invList, "code", "parentCode");
})
.catch(() => {
});
},
hideForm() { // ---
this.formVisible = false;
this.subFormVisible = false;
return true;
},
forInvSubmit() { // ---
this.$refs["dataForm"].validate(valid => {
if (valid) {
saveSubWarehouse(this.subData, this.formName).then((response) => {
if (response.code == 20000) {
this.loadSubData(this.subData.parentId);
this.subFormVisible = false;
} else {
this.$message.error(response.message);
this.subFormVisible = false;
}
}).catch(() => {
this.subFormVisible = false;
});
}
});
},
findDeptMethod() { //---
let query = {
status: 1,
};
filterList(query)
.then((response) => {
this.loading = false;
this.fromDeptOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.fromDeptOptions = [];
});
},
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.code,
label: node.name,
children: node.children
};
},
getSyncConfig() {//
findConfig()
.then((response) => {
if (response.code == 20000) {
@ -579,8 +653,6 @@ export default {
})
.catch(() => {
});
let query = {
paramKey: "muti_inv_mode",
};
@ -594,33 +666,21 @@ export default {
}
});
},
handSubInvCurrentChange(row) {
handSubInvCurrentChange(row) { //
this.currentCode = row.code;
this.currentRow = row;
this.curSeleUser = null;
//
this.loadLinkData(row)
//
this.selsectBussinessType(row);
//
this.invSpaceManage(row);
},
loadLinkData(row) {
this.userQuery.page = 1;
this.userQuery.code = row.code;
this.curSeleUser = null;
//
this.loadUserList();
},
loadUserList(val) {
//-------------------------
loadUserList(val) { //
if (val != null) {
this.userQuery.page = val;
}
@ -632,6 +692,38 @@ export default {
this.$message.error("用户数据加载失败")
});
},
rmInvUser(row) { //
this.$confirm("确定移除该仓库关联用户?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let params = {id: row.id};
deleteWarehouseUser(params).then((res) => {
if (res.code == 20000) {
this.loadUserList();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
});
})
.catch(() => {
});
},
loadLinkData(row) {
this.userQuery.page = 1;
this.userQuery.code = row.code;
this.curSeleUser = null;
//
this.loadUserList();
},
//
addUser() {
@ -686,20 +778,6 @@ export default {
},
//
rmInvUser() {
this.$confirm("确定移除该关联用户信息?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true;
})
.catch(() => {
});
},
relBusttype(row) {
this.curSeleUser = row;
this.relBusUserVisile = true;
@ -796,17 +874,6 @@ export default {
};
},
handleSubForm(data, formName) {
this.subFromName = formName;
if (formName === "edit") {
this.subData = JSON.parse(JSON.stringify(data));
} else if (formName === "add") {
this.subData = {};
// this.subData.parentId = data.code;
}
this.subFormVisible = true;
this.getSubThrsysDetailData();
},
getSubThrsysDetailData() {
let params = {
@ -823,29 +890,34 @@ export default {
});
},
//
hideForm() {
//
this.formVisible = false;
this.subFormVisible = false;
// this.loadSubData(this.currentCode);
return true;
},
},
mounted() {
},
components: {
relBusUserDialog,
invSpaceManage
invSpaceManage, Treeselect
},
created() {
this.getList();
this.getSyncConfig();
this.findDeptMethod();
}
};
</script>
<style type="text/scss" lang="scss">
<style scoped>
.vue-treeselect >>> .vue-treeselect__placeholder {
font-size: 12px;
}
.vue-treeselect >>> .vue-treeselect__value-container {
font-size: 12px;
}
.vue-treeselect >>> .vue-treeselect__control {
height: 20px;
}
</style>

@ -1,239 +1,243 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="mini" :inline="true" v-show="showSearch">
<el-form-item label="角色名称:" prop="roleName">
<el-input
v-model="queryParams.roleName"
placeholder="请输入角色名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态:" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择角色状态"
clearable
>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
<div>
<el-card>
<el-form :model="queryParams" ref="queryForm" size="mini" :inline="true" v-show="showSearch">
<el-form-item label="角色名称:" prop="roleName">
<el-input
v-model="queryParams.roleName"
placeholder="请输入角色名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
</el-form-item>
<el-form-item label="状态:" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择角色状态"
clearable
>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"></el-button>
</el-button-group>
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"></el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-form-item>
</el-form>
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- >新增-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- >编辑-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- >新增-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- >编辑-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange" border
highlight-current-row
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150"/>-->
<!-- <el-table-column label="显示顺序" prop="roleSort" width="100"/>-->
<el-table-column label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status | statusFilterType">{{
scope.row.status | statusFilterName
}}
</el-tag>
</template>
</el-table-column>
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150"/>-->
<!-- <el-table-column label="显示顺序" prop="roleSort" width="100"/>-->
<el-table-column label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.status | statusFilterType">{{
scope.row.status | statusFilterName
}}
</el-tag>
</template>
</el-table-column>
<!-- <el-table-column label="状态" align="center" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-switch-->
<!-- v-model="scope.row.status"-->
<!-- active-value="0"-->
<!-- inactive-value="1"-->
<!-- @change="handleStatusChange(scope.row)"-->
<!-- ></el-switch>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button
size="mini"
type="text"
@click="handleUpdate(scope.row)"
>编辑
</el-button>
<el-button
size="mini"
type="text"
@click="handleDelete(scope.row)"
>删除
</el-button>
<!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"-->
<!-- >-->
<!-- <span class="el-dropdown-link">-->
<!-- <i class="el-icon-d-arrow-right el-icon&#45;&#45;right"></i>更多-->
<!-- </span>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item command="handleDataScope" icon="el-icon-circle-check"-->
<!-- >数据权限-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item command="handleAuthUser" icon="el-icon-user"-->
<!-- >分配用户-->
<!-- </el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
</template>
</el-table-column>
</el-table>
<!-- <el-table-column label="状态" align="center" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-switch-->
<!-- v-model="scope.row.status"-->
<!-- active-value="0"-->
<!-- inactive-value="1"-->
<!-- @change="handleStatusChange(scope.row)"-->
<!-- ></el-switch>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button
size="mini"
type="text"
@click="handleUpdate(scope.row)"
>编辑
</el-button>
<el-button
size="mini"
type="text"
@click="handleDelete(scope.row)"
>删除
</el-button>
<!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"-->
<!-- >-->
<!-- <span class="el-dropdown-link">-->
<!-- <i class="el-icon-d-arrow-right el-icon&#45;&#45;right"></i>更多-->
<!-- </span>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item command="handleDataScope" icon="el-icon-circle-check"-->
<!-- >数据权限-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item command="handleAuthUser" icon="el-icon-user"-->
<!-- >分配用户-->
<!-- </el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改角色配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="form.roleName" placeholder="请输入角色名称"/>
</el-form-item>
<!-- <el-form-item prop="roleKey">-->
<!-- <span slot="label">-->
<!-- <el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">-->
<!-- <i class="el-icon-question"></i>-->
<!-- </el-tooltip>-->
<!-- 权限字符-->
<!-- </span>-->
<!-- <el-input v-model="form.roleKey" placeholder="请输入权限字符"/>-->
<!-- </el-form-item>-->
<el-form-item label="角色顺序" prop="roleSort">
<el-input-number v-model="form.roleSort" controls-position="right" :min="0"/>
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="菜单权限">
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">/</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">/</el-checkbox>
<el-tree
class="tree-border"
:data="menuOptions"
show-checkbox
ref="menu"
node-key="id"
:check-strictly="!form.menuCheckStrictly"
empty-text="加载中,请稍候"
:props="defaultProps"
></el-tree>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" size="small">提交</el-button>
<el-button @click="cancel" size="small">取消</el-button>
</div>
</el-dialog>
<!-- 添加或修改角色配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="form.roleName" placeholder="请输入角色名称"/>
</el-form-item>
<!-- <el-form-item prop="roleKey">-->
<!-- <span slot="label">-->
<!-- <el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">-->
<!-- <i class="el-icon-question"></i>-->
<!-- </el-tooltip>-->
<!-- 权限字符-->
<!-- </span>-->
<!-- <el-input v-model="form.roleKey" placeholder="请输入权限字符"/>-->
<!-- </el-form-item>-->
<el-form-item label="角色顺序" prop="roleSort">
<el-input-number v-model="form.roleSort" controls-position="right" :min="0"/>
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="菜单权限">
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">/</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">/</el-checkbox>
<el-tree
class="tree-border"
:data="menuOptions"
show-checkbox
ref="menu"
node-key="id"
:check-strictly="!form.menuCheckStrictly"
empty-text="加载中,请稍候"
:props="defaultProps"
></el-tree>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" size="small">提交</el-button>
<el-button @click="cancel" size="small">取消</el-button>
</div>
</el-dialog>
<!-- 分配角色数据权限对话框 -->
<el-dialog :title="title" :visible.sync="openDataScope" width="40%" append-to-body>
<el-form :model="form" label-width="80px">
<el-form-item label="角色名称">
<el-input v-model="form.roleName" :disabled="true"/>
</el-form-item>
<el-form-item label="权限字符">
<el-input v-model="form.roleKey" :disabled="true"/>
</el-form-item>
<el-form-item label="权限范围">
<el-select v-model="form.dataScope" @change="dataScopeSelectChange">
<el-option
v-for="item in dataScopeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据权限" v-show="form.dataScope == 2">
<el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">/</el-checkbox>
<el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">/</el-checkbox>
<el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">
</el-checkbox>
<el-tree
class="tree-border"
:data="deptOptions"
show-checkbox
default-expand-all
ref="dept"
node-key="id"
:check-strictly="!form.deptCheckStrictly"
empty-text="加载中,请稍候"
:props="defaultProps"
></el-tree>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitDataScope"> </el-button>
<el-button @click="cancelDataScope"> </el-button>
</div>
</el-dialog>
<!-- 分配角色数据权限对话框 -->
<el-dialog :title="title" :visible.sync="openDataScope" width="40%" append-to-body>
<el-form :model="form" label-width="80px">
<el-form-item label="角色名称">
<el-input v-model="form.roleName" :disabled="true"/>
</el-form-item>
<el-form-item label="权限字符">
<el-input v-model="form.roleKey" :disabled="true"/>
</el-form-item>
<el-form-item label="权限范围">
<el-select v-model="form.dataScope" @change="dataScopeSelectChange">
<el-option
v-for="item in dataScopeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据权限" v-show="form.dataScope == 2">
<el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">/</el-checkbox>
<el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">/</el-checkbox>
<el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">
</el-checkbox>
<el-tree
class="tree-border"
:data="deptOptions"
show-checkbox
default-expand-all
ref="dept"
node-key="id"
:check-strictly="!form.deptCheckStrictly"
empty-text="加载中,请稍候"
:props="defaultProps"
></el-tree>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitDataScope"> </el-button>
<el-button @click="cancelDataScope"> </el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>

@ -15,9 +15,9 @@
</el-col>
</el-row>
</el-form>
<h4 class="form-header h4">角色信息</h4>
<el-table v-loading="loading" :row-key="getRowKey" @row-click="clickRow" ref="table" @selection-change="handleSelectionChange" :data="roles.slice((pageNum-1)*pageSize,pageNum*pageSize)">
<el-table v-loading="loading" :row-key="getRowKey" @row-click="clickRow" ref="table"
@selection-change="handleSelectionChange" :data="roles.slice((pageNum-1)*pageSize,pageNum*pageSize)">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>

@ -35,7 +35,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.0.113:9991`,
target: `http://192.168.0.166:9991`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save