Commit 87e6bfee by 米嘉伟

Merge branch 'dev_zwpt' of http://47.92.108.28/changchao/founder_vue into dev_zwpt

parents 352ed89c f8075e03
......@@ -21,6 +21,7 @@
"lib-flexible": "^0.3.2",
"moment": "^2.29.1",
"nprogress": "^0.2.0",
"pinyin-match": "^1.2.2",
"postcss-px2rem": "^0.3.0",
"px2rem": "^0.5.0",
"px2rem-loader": "^0.1.9",
......
<!--
* @Author: your name
* @Date: 2021-09-07 09:58:13
* @LastEditTime: 2021-11-30 11:11:01
* @LastEditTime: 2021-11-30 17:43:22
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\App.vue
......@@ -123,6 +123,26 @@ export default {
color: #2e3846;
}
}
.el-message-box {
display: inline-block;
width: 26.25rem;
padding-bottom: 0.625rem;
vertical-align: middle;
background-color: #fff;
height: 190px!important;
border-radius: 0.25rem;
border: 0.0625rem solid #ebeef5;
font-size: 1.125rem;
-webkit-box-shadow: 0 0.125rem 0.75rem 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 0.125rem 0.75rem 0 rgba(0, 0, 0, 0.1);
text-align: left;
overflow: hidden;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.el-message-box__status {
display: none !important;
}
.el-popconfirm__main {
margin: 23px 24px 17px 24px;
font-size: 14px;
......
<!--
* @Author: your name
* @Date: 2021-11-25 10:15:01
* @LastEditTime: 2021-11-30 13:44:55
* @LastEditTime: 2021-11-30 19:59:08
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\components\SelectCode.vue
......@@ -22,21 +22,23 @@
@focus="placeholder = '请输入'"
@blur="placeholder = '请选择'"
:clearable="clearable"
:filter-method="!multiple ? pinyingMatch : null"
collapse-tags
@change="change"
@visible-change="visibleChange"
>
<el-checkbox-group v-model="newForm[id]">
<el-option
ref="option"
v-for="item in options"
:key="item.id"
:label="item.name"
:label="item.str"
:value="item.code"
>
<div class="options" v-if="multiple" @click.stop="() => {}">
<el-checkbox :label="item.code">{{ item.name }}</el-checkbox>
<el-checkbox :label="item.code">{{ item.str }}</el-checkbox>
</div>
<div class="options" v-else>{{ item.name }}</div>
<div class="options" v-else>{{ item.str }}</div>
</el-option>
</el-checkbox-group>
</el-select>
......@@ -52,6 +54,7 @@ export default {
value: [],
checkList: [],
newForm: this.form,
allData: [],
};
},
props: {
......@@ -89,6 +92,29 @@ export default {
// },
},
methods: {
pinyingMatch(val) {
const pinyingMatch = require("pinyin-match");
if (val) {
var result = [];
result = this.options.filter((i) => i.str.indexOf(val) >= 0);
if (result.length <= 0) {
result = this.options.filter((i) => {
let m = pinyingMatch.default.match(i.str, val);
if (m) return i;
});
}
this.options = result;
} else {
this.options = JSON.parse(JSON.stringify(this.allData));
}
},
visibleChange(a) {
if (!a && !this.multiple) {
setTimeout(() => {
this.options = JSON.parse(JSON.stringify(this.allData));
}, 200);
}
},
change(val) {
let newVal = val;
if (!newVal) newVal = "";
......@@ -100,7 +126,12 @@ export default {
(res.data.code == 0 || res.data.code == 200) &&
(res.data.message == "success" || res.data.info == "success")
) {
this.options = res.data.ret || res.data.detail || [];
let result = res.data.ret || res.data.detail || [];
this.options = result.map((i) => {
i.str = `${i.name}[${i.code}]`;
return i;
});
this.allData = JSON.parse(JSON.stringify(this.options));
}
});
},
......@@ -120,6 +151,11 @@ export default {
padding: 0 10px;
}
.el-select /deep/ {
.el-select-dropdown__item.selected {
color: #606266;
font-weight: 400;
background-color: #f5f7fa;
}
width: 100% !important;
.popperClass {
.el-select-dropdown__item {
......
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-11-30 13:24:54
* @LastEditTime: 2021-11-30 17:46:05
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\plugins\axios.js
......@@ -79,7 +79,7 @@ _axios.interceptors.response.use(
if (response.data.code == 401) {
if (resTimer) clearTimeout(resTimer)
resTimer = setTimeout(() => {
MessageBox.confirm('没有登陆账号,请登录, 是否继续?', '提示', {
MessageBox.confirm('登陆超时请重新登录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......
......@@ -126,6 +126,7 @@
<span style="margin-left: 5px">...</span>
<div slot="content" class="tooTipBtn">
<div
:title="item"
v-for="item in scope.row.roleNames &&
scope.row.roleNames.split(',')"
:key="item"
......@@ -156,7 +157,7 @@
<el-table-column>
<template slot-scope="scope">
<div class="set-btn" :width="btnwidth" @click="setUser(scope.row)">
用户列表
用户设置
</div>
</template>
</el-table-column>
......@@ -385,13 +386,13 @@
:key="item.id"
:title="item.name"
>
<img
src="@/assets/img/jianhao.png"
alt=""
<i
class="el-icon-remove icon"
style="color: #055fe7"
@click="
settingPerson(item, 'xtCheckPersonArr', 'ktjxtPerson')
"
/>
></i>
<p>{{ item.name || "-" }}</p>
</div>
</div>
......@@ -411,13 +412,13 @@
:key="item.id"
:title="item.name"
>
<img
src="@/assets/img/jianhao.png"
alt=""
<i
class="el-icon-remove icon"
style="color: #055fe7"
@click="
settingPerson(item, 'zdyCheckPersonArr', 'ktjzdyPerson')
"
/>
></i>
<p>{{ item.name || "-" }}</p>
</div>
</div>
......@@ -445,13 +446,13 @@
:key="item.id"
:title="item.name"
>
<img
src="@/assets/img/jiahao.png"
alt=""
<i
class="el-icon-circle-plus icon"
style="color: #055fe7"
@click="
settingPerson(item, 'ktjxtPerson', 'xtCheckPersonArr')
"
/>
></i>
<p>{{ item.name || "-" }}</p>
</div>
</div>
......@@ -471,13 +472,13 @@
:key="item.id"
:title="item.name"
>
<img
src="@/assets/img/jiahao.png"
alt=""
<i
class="el-icon-circle-plus icon"
style="color: #055fe7"
@click="
settingPerson(item, 'ktjzdyPerson', 'zdyCheckPersonArr')
"
/>
></i>
<p>{{ item.name || "-" }}</p>
</div>
</div>
......@@ -558,20 +559,44 @@
v-if="isUserSelected"
>
</el-table-column>
<el-table-column prop="username" label="用户名"> </el-table-column>
<el-table-column prop="truename" label="姓名"> </el-table-column>
<el-table-column prop="policemanid" label="警号"> </el-table-column>
<el-table-column prop="group" label="用户组"> </el-table-column>
<el-table-column prop="unitname" label="所属单位">
<el-table-column
prop="username"
label="用户名"
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="name" label="姓名" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="unitname" label="启用状态">
<el-table-column
prop="policeNumber"
label="警号"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="userGroupNames"
label="用户组"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="unitName"
label="所属单位"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="status"
label="启用状态"
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="unitname" label="操作"> </el-table-column>
</el-table>
</div>
</div>
<div class="addbtns">
<div class="btn1">确认</div>
<div class="btn1" @click="userSave">确认</div>
<div class="btn2" @click="canceluser">取消</div>
</div>
</div>
......@@ -585,6 +610,7 @@ import Confirmation from "@/components/Confirmation.vue";
// import "@/assets/imp/police-badge.png";
import Cascader from "@/components/Cascader.vue";
import SelectCode from "@/components/SelectCode.vue";
import qs from "qs";
export default {
name: "GroupManage",
components: {
......@@ -800,8 +826,23 @@ export default {
savePerson() {
let arr = [...this.xtCheckPersonArr, ...this.zdyCheckPersonArr];
let str = arr.map((i) => i.id).join();
console.log(str, this.personId);
////////////////
this.$axios({
method: "post",
url: "/security/roles/saveRoleSetting",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
data: qs.stringify({
groupId: this.personId,
groupRoles: str,
}),
}).then((res) => {
if (res.data.code == 200 && res.data.info == "success") {
this.$message.success("设置成功");
this.search();
this.cancelrole();
}
});
},
strArr(str) {
let arr = str.split(",");
......@@ -854,6 +895,30 @@ export default {
this.isShowUserTip = false;
}
},
userSave() {
let ids = this.userMultipleSelection.map((i) => i.id);
ids = ids.join(",");
let id = this.checkItem.id;
this.$axios({
method: "delete",
url: "/security/users/delUserFromGroup",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
data: qs.stringify({
groupId: id,
userId: ids,
}),
}).then((res) => {
if (res.data.code == 200 && res.data.info == "success") {
setTimeout(() => {
this.$message.success("删除成功");
}, 500);
this.getUserList();
this.search();
}
});
},
// 用户设置 批量操作
userBatch() {
this.isUserSelected = !this.isUserSelected;
......@@ -931,10 +996,21 @@ export default {
// 打开用户设置弹窗
setUser(row) {
this.checkItem = row;
this.userTableData = [];
// this.visible.setUserVisible = true;
this.isShowUserDialog = true;
this.isShowUserDialogBg = true;
this.title.unitname = row.groupname;
this.getUserList();
},
getUserList() {
this.$axios
.get("/security/users/userList/" + this.checkItem.id)
.then((res) => {
if (res.data.code == 200 && res.data.info == "success") {
this.userTableData = res.data.detail;
}
});
},
// 打开角色弹窗
setRole(row) {
......
......@@ -135,6 +135,7 @@
<div
v-for="item in scope.row.roleNames &&
scope.row.roleNames.split(',')"
:title="item"
:key="item"
>
{{ item }}
......@@ -313,6 +314,7 @@
v-for="item in scope.row.roleNames &&
scope.row.roleNames.split(',')"
:key="item"
:title="item"
>
{{ item }}
</div>
......
......@@ -165,6 +165,7 @@
<div
v-for="item in scope.row.roleNames &&
scope.row.roleNames.split(',')"
:title="item"
:key="item"
>
{{ item }}
......@@ -933,12 +934,12 @@ export default {
this.$set(
this.editFormParams,
"userGroupId",
result["userGroupIds"] && result["userGroupIds"].split(",")
result["userGroupIds"] && result["userGroupIds"].split(",") || []
);
this.$set(
this.editFormParams,
"roleId",
result["roleIds"] && result["roleIds"].split(",")
result["roleIds"] && result["roleIds"].split(",") || []
);
}
});
......
.tooTipBtn {
padding: 10px;
max-height: 317px;
overflow: auto;
// 滚动条的宽度
&::-webkit-scrollbar {
width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
/* 滚动槽 */
&::-webkit-scrollbar-track {
height: 65px;
-webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
border-radius: 10px;
}
/* 滚动条滑块 */
&::-webkit-scrollbar-thumb {
border-radius: 10px;
height: 65px;
background: #595a5a;
}
> div {
width: 100px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-wrap: break-word;
height: 24px;
background: #5e5e5e;
border-radius: 4px;
......@@ -13,11 +36,11 @@
}
}
}
.groupEditDialog /deep/{
.groupEditDialog /deep/ {
height: 20rem !important;
width: 39.6rem !important;
.el-form-item__label{
width: 6rem!important;
.el-form-item__label {
width: 6rem !important;
}
}
.el-checkbox /deep/ {
......@@ -759,7 +782,7 @@
.content {
display: inline-block;
width: calc(100% - 105px);
max-height: 94px !important;
height: 94px !important;
box-sizing: border-box;
overflow: auto;
.contentItem {
......@@ -783,7 +806,7 @@
box-sizing: border-box;
padding: 0 10px;
}
> img {
> .icon {
position: absolute;
top: -6px;
right: -6px;
......
.tooTipBtn {
padding: 10px;
max-height: 317px;
overflow: auto;
// 滚动条的宽度
&::-webkit-scrollbar {
width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
/* 滚动槽 */
&::-webkit-scrollbar-track {
height: 65px;
-webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
border-radius: 10px;
}
/* 滚动条滑块 */
&::-webkit-scrollbar-thumb {
border-radius: 10px;
height: 65px;
background: #595a5a;
}
> div {
width: 100px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-wrap: break-word;
height: 24px;
background: #5e5e5e;
border-radius: 4px;
......
.tooTipBtn {
padding: 10px;
max-height: 317px;
overflow: auto;
// 滚动条的宽度
&::-webkit-scrollbar {
width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
/* 滚动槽 */
&::-webkit-scrollbar-track {
height: 65px;
-webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
border-radius: 10px;
}
/* 滚动条滑块 */
&::-webkit-scrollbar-thumb {
border-radius: 10px;
height: 65px;
background: #595a5a;
}
> div {
width: 100px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-wrap: break-word;
height: 24px;
background: #5e5e5e;
border-radius: 4px;
......
......@@ -271,6 +271,7 @@
@row-click="confirm"
@expand-change="hadnlExpandChange"
>
<!-- @select-all="handleSelectAll" -->
<el-table-column
type="selection"
height
......@@ -395,19 +396,19 @@
</el-table-column>
<el-table-column width="auto" label="操作" align="left">
<template slot-scope="scope">
<Confirmation content="编辑用户" v-if="scope.row.barcode">
<Confirmation content="复制条码" v-if="scope.row.barcode">
<img
style="
width: 1.125rem;
height: 1.125rem;
width: 1rem;
height: 1rem;
margin-right: 1.125rem;
cursor: pointer;
"
:src="editUrl"
src="@/assets/img/qbryk/fz.svg"
@click.stop="
() => {
delSelect();
edit(scope.row.id);
edit(scope.row);
}
"
/>
......@@ -754,6 +755,10 @@ export default {
},
// 多选删除
delMore() {
if (this.selectBoo == false) {
this.selectBoo = true;
return;
}
// 检查table选择的数据 如果没有选择则不可以删除
// this.selectBoo = !this.selectBoo;
if (this.selectionData.length === 0) {
......@@ -942,7 +947,36 @@ export default {
this.toggleSelection();
},
// 编辑
edit() {},
edit(row) {
let self = this;
this.$copyText(row.barcode).then(
function (e) {
self.$message({
type: "success",
// message: "复制条码号:" + this.copyNum + "成功!"
message: "已复制到剪切板",
});
},
function (e) {
this.$message.error("抱歉,复制条码号失败!");
}
);
},
// handleSelectAll(val) {
// console.log(val);
// for (let item of this.list) {
// //一级数据 加入到toggleRowSelection中会触发handleSelectionChange
// this.$refs.confirmTable.toggleRowSelection(item);
// if (item.children !== null && !item.barcode) {
// //一级数据,children数据
// for (let item1 of item.children) {
// //加入到toggleRowSelection中会触发handleSelectionChange方法
// this.$refs.confirmTable.toggleRowSelection(item1);
// }
// }
// }
// },
// 展开或关闭行
hadnlExpandChange(row, expanded) {
// 获取展开标志
......@@ -1005,17 +1039,14 @@ export default {
getBarcode() {
let self = this;
this.barcode = [];
// if (this.selectionData.length === 0) {
// this.$message.error("请选择需要复制条码号的数据!");
// } else if (this.selectionData.length === 1) {
// this.barcode = this.selectionData[0].barcode;
// } else {
// this.$message.error("只能复制单条数据的条码号!");
// }
if (this.selectBoo == false) {
this.selectBoo = true;
return;
}
if (this.selectionData.length === 0) {
this.$message.error("请选择需要复制条码号的数据!");
} else {
//console.log(this.selectionData);
self.selectionData.forEach((item) => {
self.barcode.push(item.barcode);
});
......
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-11-30 13:52:04
* @LastEditTime: 2021-11-30 21:26:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js
......@@ -91,8 +91,8 @@ module.exports = {
"/api": {
// target: "http://192.168.0.137:8080/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/
// target: "http://172.18.108.2:8099/", // 张 认定
// target: "http://192.168.128.166:8099", // 湖南-张
target: "http://192.168.128.114:8099", // 湖南-马
target: "http://192.168.128.108:8099", // 湖南-张
// target: "http://192.168.128.114:8099", // 湖南-马
// target: "http://192.168.128.116:8099", // 湖南-王
// target: "http://192.168.128.118:8764", // 湖南-张呈光
// target: "http://172.18.116.73:8099/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/ ma
......@@ -126,8 +126,8 @@ module.exports = {
"/security": {
//target: "http://192.168.128.106:8765", // 湖南-王
// target: "http://192.168.128.108:8764", // 湖南-张
target: "http://www.meetfood.cn:2390", // 湖南-王
target: "http://192.168.128.108:8764", // 湖南-张
// target: "http://www.meetfood.cn:2390", // 湖南-王
ws: true,
changeOrigin: true,
pathRewrite: {
......
......@@ -7372,6 +7372,13 @@ pinkie@^2.0.0:
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
pinyin-match@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/pinyin-match/-/pinyin-match-1.2.2.tgz#24a60a5bce89fb2903f33f37492782d3f8e34eeb"
integrity sha512-C0yOq4LkToJMkDHiQFKOY69El2GRcwdS2lVEjgWjIV8go3wE4mloGFNkVicGHFGYHDg523m2/lKzW8Hh+JR9nw==
dependencies:
rollup "^2.44.0"
pkcs7@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/pkcs7/-/pkcs7-1.0.4.tgz#6090b9e71160dabf69209d719cbafa538b00a1cb"
......@@ -8426,6 +8433,13 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^3.0.0"
inherits "^2.0.1"
rollup@^2.44.0:
version "2.60.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.60.2.tgz#3f45ace36a9b10b4297181831ea0719922513463"
integrity sha512-1Bgjpq61sPjgoZzuiDSGvbI1tD91giZABgjCQBKM5aYLnzjq52GoDuWVwT/cm/MCxCMPU8gqQvkj8doQ5C8Oqw==
optionalDependencies:
fsevents "~2.3.2"
run-async@^2.4.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment