Commit 77eddc99 by 米嘉伟

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

parents 0afe8c62 8388b47f
<!--
* @Author: your name
* @Date: 2021-09-07 09:58:13
* @LastEditTime: 2021-11-15 21:12:58
* @LastEditTime: 2021-11-24 17:21:02
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\App.vue
......@@ -14,7 +14,12 @@
<script>
import zoom from "./utils/autosize";
export default {};
export default {
mounted() {
//所在单位数据
this.$store.dispatch("publicData/_getList");
},
};
</script>
<style lang="scss">
......
// 参考文档:https://element.faas.ele.me/#/zh-CN/component/color#fu-zhu-se
* {
padding: 0;
margin: 0;
box-sizing: border-box;
padding: 0;
margin: 0;
box-sizing: border-box;
}
.disabel {
border: none !important;
background-color: #ecedf1 !important;
color: #c2c4c7 !important;
}
//主色调,红色:#FF0036,绿色 #4CAF50,蓝色:#03A9F4,黄色:#FF9800,粉色:#FF547B,棕色:#C3A769,浅绿色:#65C4AA,黑色:#333333,紫色:#B323B4,淡粉色:#FF8B8B,element UI:#409eff
$base-color: #03A9F4;
$base-color: #03a9f4;
$base-color-success: #4caf50;
$base-color-warning: #e6a23c;
$base-color-danger: #f56c6c;
......@@ -25,47 +29,48 @@ $width: 1210px;
// 小
.ns-font-size-sm {
font-size: $ns-font-size-sm;
font-size: $ns-font-size-sm;
}
// 标准
.ns-font-size-base {
font-size: $ns-font-size-base;
font-size: $ns-font-size-base;
}
// 标准
.ns-font-size-lg {
font-size: $ns-font-size-lg;
font-size: $ns-font-size-lg;
}
//文字颜色
.ns-text-color {
color: $base-color !important;
color: $base-color !important;
}
.ns-text-color-black {
color: $ns-text-color-black !important;
color: $ns-text-color-black !important;
}
//边框
.ns-border-color {
border-color: $base-color !important;
border-color: $base-color !important;
}
//背景色
.ns-bg-color {
background-color: $base-color !important;
background-color: $base-color !important;
}
body {
line-height: 1.8;
font-family: 'Helvetica Neue', Helvetica, 'MicrosoftYaHei', 'PingFang SC', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', sans-serif;
background-color: #f7f7f7;
font-size: $ns-font-size-base;
color: $ns-text-color-black;
line-height: 1.8;
font-family: "Helvetica Neue", Helvetica, "MicrosoftYaHei", "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei",
sans-serif;
background-color: #f7f7f7;
font-size: $ns-font-size-base;
color: $ns-text-color-black;
}
#nprogress .bar {
background: $base-color !important; //自定义颜色
background: $base-color !important; //自定义颜色
}
html,
......@@ -82,8 +87,8 @@ h4,
h5,
h6,
p {
margin: 0;
padding: 0;
margin: 0;
padding: 0;
}
article,
aside,
......@@ -96,42 +101,42 @@ hgroup,
menu,
nav,
section {
display: block;
display: block;
}
ol,
ul,
li {
list-style: none;
list-style: none;
}
i,
em {
font-style: normal;
font-style: normal;
}
// 去掉a标签的默认样式
a {
text-decoration: none;
color: $ns-text-color-black;
&:hover {
color: $base-color;
}
text-decoration: none;
color: $ns-text-color-black;
&:hover {
color: $base-color;
}
}
.el-main {
border-top: solid 1px #f2f2f2;
overflow: initial;
width: $width;
margin: 0 auto;
padding: 0;
border-top: solid 1px #f2f2f2;
overflow: initial;
width: $width;
margin: 0 auto;
padding: 0;
}
img {
border-style: none;
max-width: 100%;
vertical-align: middle;
border-style: none;
max-width: 100%;
vertical-align: middle;
}
// 居中
.ns-text-align {
text-align: center;
text-align: center;
}
<!--
* @Author: your name
* @Date: 2021-11-13 16:32:50
* @LastEditTime: 2021-11-19 14:50:32
* @LastEditors: 赵鹏龙
* @LastEditTime: 2021-11-24 16:14:47
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\components\swiper.vue
-->
......@@ -35,7 +35,7 @@
</p>
<p>
<span>源条码号:</span>
<span>{{ item.barcode }}</span>
<span :class="{ del: souceDel }">{{ item.barcode }}</span>
</p>
</div>
</div>
......@@ -45,7 +45,7 @@
<!-- 可以点击上一条的左侧按钮-->
<div v-show="carIndex > 0" class="left" @click="btnQiehuan('left')">
<img
style="transform: rotate(180deg);"
style="transform: rotate(180deg)"
src="@/assets/img/right.png"
alt="暂无图片"
/>
......@@ -69,7 +69,7 @@
@click="noData('right')"
>
<img
style="transform: rotate(180deg);"
style="transform: rotate(180deg)"
src="@/assets/img/left.png"
alt="暂无图片"
/>
......@@ -80,7 +80,7 @@
export default {
data() {
return {
carIndex: 0
carIndex: 0,
};
},
methods: {
......@@ -107,17 +107,27 @@ export default {
this.$refs.carousel.next();
this.$emit("next", this.carIndex);
}
}
},
},
props: {
carData: {
type: Array,
default: () => []
}
}
default: () => [],
},
souceDel: {
type: Boolean,
default: false,
},
},
};
</script>
<style lang="scss" scoped>
.del {
text-decoration: none; /*没有文本装饰*/
text-decoration: underline red; /*红色下划线*/
text-decoration: underline wavy red; /*红色波浪形下划线*/
text-decoration: line-through red; /*红色删除线*/
}
.el-carousel__item h3 {
color: #475669;
font-size: 18px;
......
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-11-22 15:53:22
* @LastEditTime: 2021-11-24 17:23:34
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\plugins\axios.js
......@@ -45,6 +45,7 @@ _axios.interceptors.request.use(
loadingIndex++;
}
NProgress.start();
console.log('请求前' + loadingIndex)
// 在发送请求之前做些什么
// 判断是否存在token,如果存在将每个页面header添加token
if (localStorage.getItem("token")) {
......@@ -64,7 +65,8 @@ _axios.interceptors.response.use(
function (response) {
NProgress.done();
if (loadingBoo) loadingIndex--;
if (loadingIndex == 0) {
console.log('请求后' + loadingIndex)
if (loadingIndex <= 0) {
clearTimeout(timer)
timer = setTimeout(() => {
loading && loading.close();
......
......@@ -6,8 +6,8 @@
top="1.25rem"
append-to-body
:before-close="handleClose"
:close-on-click-modal='false'
:modal='false'
:close-on-click-modal="false"
:modal="false"
>
<el-form
:label-position="labelPosition"
......@@ -25,10 +25,7 @@
<!-- 二 -->
<el-row>
<el-col :span="12">
<el-form-item
label="案事件编号:"
prop="ysxtAsjbh"
>
<el-form-item label="案事件编号:" prop="ysxtAsjbh">
<el-input
class="inputBh"
v-model.trim="ruleForm.ysxtAsjbh"
......@@ -36,14 +33,12 @@
maxlength="22"
show-word-limit
clearable
><template slot="prepend">A</template></el-input>
><template slot="prepend">A</template></el-input
>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="现场勘验编号:"
prop="xckybh"
>
<el-form-item label="现场勘验编号:" prop="xckybh">
<el-input
class="inputBh"
v-model.trim="ruleForm.xckybh"
......@@ -51,29 +46,21 @@
maxlength="22"
show-word-limit
clearable
><template slot="prepend">K</template></el-input>
><template slot="prepend">K</template></el-input
>
</el-form-item>
</el-col>
</el-row>
<!-- 三 -->
<el-row>
<el-col :span="12">
<el-form-item
label="案事件发生地点:"
prop="asjfsddDzmc"
>
<el-form-item label="案事件发生地点:" prop="asjfsddDzmc">
<el-select
v-model="ruleForm.asjfsddDzmc"
placeholder="请选择案事件发生地点"
>
<el-option
label="区域一"
value="shanghai"
></el-option>
<el-option
label="区域二"
value="beijing"
></el-option>
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -103,10 +90,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="是否命案:"
prop="sfmaPdbz"
>
<el-form-item label="是否命案:" prop="sfmaPdbz">
<el-radio-group v-model="ruleForm.sfmaPdbz">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
......@@ -118,24 +102,13 @@
<el-row>
<el-col :span="12">
<el-form-item label="案件类别:">
<el-select
v-model="ruleForm.ajlbdm"
placeholder="请选择案件类别"
>
<el-option
label="区域一"
value="1"
></el-option>
<el-option
label="区域二"
value="2"
></el-option>
<el-select v-model="ruleForm.ajlbdm" placeholder="请选择案件类别">
<el-option label="区域一" value="1"></el-option>
<el-option label="区域二" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
</el-col>
<el-col :span="12"> </el-col>
</el-row>
<el-row>
<el-col :span="24">
......@@ -163,17 +136,16 @@
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
>全选</el-checkbox>
<div style="margin: 15px 0;"></div>
>全选</el-checkbox
>
<div style="margin: 15px 0"></div>
<el-checkbox-group
v-model="checkedTargets"
@change="handleCheckedTargetsChange"
>
<el-checkbox
v-for="city in targets"
:label="city"
:key="city"
>{{city}}</el-checkbox>
<el-checkbox v-for="city in targets" :label="city" :key="city">{{
city
}}</el-checkbox>
</el-checkbox-group>
</el-row>
<el-divider></el-divider>
......@@ -185,25 +157,21 @@
<!-- 七 -->
<el-row>
<el-col :span="12">
<el-form-item
label="提取单位代码:"
prop="tqdwGajgjgdm"
>
<el-input
<el-form-item label="提取单位:" prop="tqdwGajgjgdm">
<Cascader :form="ruleForm" id="tqdwGajgjgdm"></Cascader>
<!-- <el-input
v-model.trim="ruleForm.tqdwGajgjgdm"
placeholder="请输入提取单位代码"
maxlength="12"
show-word-limit
clearable
>
</el-input>
</el-input> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="提取人姓名:"
prop="tqryXm"
>
<el-form-item label="提取人姓名:" prop="tqryXm">
<el-input
v-model.trim="ruleForm.tqryXm"
placeholder="请输入提取人姓名"
......@@ -217,15 +185,12 @@
<!-- 八 -->
<el-row>
<el-col :span="12">
<el-form-item
label="提取时间:"
prop="tqsj"
>
<el-form-item label="提取时间:" prop="tqsj">
<el-date-picker
type="datetime"
placeholder="请选择提取时间"
v-model="ruleForm.tqsj"
style="width: 100%;"
style="width: 100%"
:picker-options="{
disabledDate: disabledDate,
}"
......@@ -233,10 +198,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="提取人身份证号:"
prop="tqryGmsfhm"
>
<el-form-item label="提取人身份证号:" prop="tqryGmsfhm">
<el-input
v-model.trim="ruleForm.tqryGmsfhm"
placeholder="请输入提取人身份证号"
......@@ -250,15 +212,10 @@
<!-- 九 -->
<el-row>
<el-col :span="12">
<el-form-item>
</el-form-item>
<el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="提取人联系电话:"
prop="tqryLxdh"
>
<el-form-item label="提取人联系电话:" prop="tqryLxdh">
<el-input
v-model.trim="ruleForm.tqryLxdh"
placeholder="请输入提取人联系电话"
......@@ -269,124 +226,136 @@
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-divider></el-divider>
<!-- 十 -->
<span
slot="footer"
class="dialog-footer"
>
<span slot="footer" class="dialog-footer">
<el-button @click="submitForm('ruleForm')">提交并新增指掌纹</el-button>
<el-button
@click="resetForm('ruleForm')"
type="primary"
>取 消</el-button>
<el-button @click="resetForm('ruleForm')" type="primary">取 消</el-button>
</span>
</el-dialog>
</template>
<script>
const targetOptions = ['本地案件库', '比中案件库', '已破案件库', '重大案件库', 'B类案件库', 'C类案件库', '勘查案件库', '协查案件库'];
import Cascader from "@/components/Cascader.vue";
const targetOptions = [
"本地案件库",
"比中案件库",
"已破案件库",
"重大案件库",
"B类案件库",
"C类案件库",
"勘查案件库",
"协查案件库",
];
export default {
name: "xzaj",
components: {
Cascader,
},
props: {
isShowXzaj: {
type: [Number, String, Boolean],
default: false
}
default: false,
},
},
data () {
data() {
return {
dialogVisible: false, // 弹窗状态
labelPosition: 'left',// 数据项对齐方式
labelPosition: "left", // 数据项对齐方式
checkAll: false, // 目标逻辑库
checkedTargets: [], // 选定的目标逻辑库
checkedTargets: [], // 选定的目标逻辑库
targets: targetOptions, // 目标逻辑库
isIndeterminate: false, // 目标逻辑库不确定状态
isIndeterminate: false, // 目标逻辑库不确定状态
ruleForm: {
ysxtAsjbh: '', // 案事件编号
xckybh: '', // 现场勘验编号
asjfsddXzqhdm: '1212',// 行政区代码
asjfsddDzmc: '', // 案事件发生地
ssjzrmby: '', // 损失价值
xczzhwkbh: '', // 现场掌指纹卡编号
ajlbdm: '', // 案件类别
sfmaPdbz: '0', // 命案
jyaq: '', // 简要案情
tqdwGajgjgdm: '', // 提取单位代码
tqryXm: '', // 提取人姓名
tqsj: '', // 提取时间
tqryGmsfhm: '', // 提取人身份证号
tqryLxdh: '', // 提取人联系电话
zwbdxtlxms: '默认', //
tqdwGajgmc: '默认',//
barcode: "1"
ysxtAsjbh: "", // 案事件编号
xckybh: "", // 现场勘验编号
asjfsddXzqhdm: "1212", // 行政区代码
asjfsddDzmc: "", // 案事件发生地
ssjzrmby: "", // 损失价值
xczzhwkbh: "", // 现场掌指纹卡编号
ajlbdm: "", // 案件类别
sfmaPdbz: "0", // 命案
jyaq: "", // 简要案情
tqdwGajgjgdm: "", // 提取单位代码
tqryXm: "", // 提取人姓名
tqsj: "", // 提取时间
tqryGmsfhm: "", // 提取人身份证号
tqryLxdh: "", // 提取人联系电话
zwbdxtlxms: "默认", //
tqdwGajgmc: "默认", //
barcode: "1",
},
rules: {
ysxtAsjbh: [
{ required: true, message: '请输入案事件编号', trigger: 'blur' },
{ required: true, message: "请输入案事件编号", trigger: "blur" },
],
xckybh: [
{ required: true, message: '请输入现场勘验编号', trigger: 'blur' },
{ required: true, message: "请输入现场勘验编号", trigger: "blur" },
],
asjfsddDzmc: [
{ required: true, message: '请输入案事件发生地', trigger: 'blur' },
{ required: true, message: "请输入案事件发生地", trigger: "blur" },
],
sfmaPdbz: [
{ required: true, message: '请选择是否命案', trigger: 'change' }
{ required: true, message: "请选择是否命案", trigger: "change" },
],
tqdwGajgjgdm: [
{ required: true, message: '请输入提取单位代码', trigger: 'blur' },
{ required: true, message: "请输入提取单位代码", trigger: "blur" },
],
tqryXm: [
{ required: true, message: '请输入提取人姓名', trigger: 'blur' },
{ required: true, message: "请输入提取人姓名", trigger: "blur" },
],
tqsj: [
{ type: 'date', required: true, message: '请选择提取时间', trigger: 'change' }
{
type: "date",
required: true,
message: "请选择提取时间",
trigger: "change",
},
],
tqryGmsfhm: [
{ required: true, message: '请输入提取人身份证号', trigger: 'blur' },
{ required: true, message: "请输入提取人身份证号", trigger: "blur" },
],
}
},
};
},
mounted () {
mounted() {
this.dialogVisible = this.isShowXzaj;
},
watch: {
isShowXzaj (newVal, oldVal) {
isShowXzaj(newVal, oldVal) {
this.dialogVisible = newVal;
},
dialogVisible (val) {
this.$emit('closeXzaj', this.dialogVisible);
}
dialogVisible(val) {
this.$emit("closeXzaj", this.dialogVisible);
},
},
methods: {
disabledDate (a) {
disabledDate(a) {
if (a.getTime() > new Date().getTime()) {
return true;
} else {
return false;
}
},
submitForm (formName) {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let reqParam = {
caseBase: ""
}
reqParam.caseBase = this.ruleForm
reqParam.caseBase.ysxtAsjbh = 'A' + this.ruleForm.ysxtAsjbh
reqParam.caseBase.xckybh = 'K' + this.ruleForm.xckybh
caseBase: "",
};
reqParam.caseBase = this.ruleForm;
reqParam.caseBase.ysxtAsjbh = "A" + this.ruleForm.ysxtAsjbh;
reqParam.caseBase.xckybh = "K" + this.ruleForm.xckybh;
this.$axios
.post("/api/casestore/caseadd", reqParam)
.then(response => {
.then((response) => {
if (response.data.code === 0) {
this.$message.success("新增成功");
this.dialogVisible = false;
this.$router.push('/ajzwbj/' + 'xz' + '/' + this.ruleForm.ysxtAsjbh)
this.$router.push(
"/ajzwbj/" + "xz" + "/" + this.ruleForm.ysxtAsjbh
);
} else {
this.$message.error("新增失败");
}
......@@ -396,24 +365,25 @@ export default {
}
});
},
resetForm (formName) {
resetForm(formName) {
this.$refs[formName].resetFields();
this.dialogVisible = false
this.dialogVisible = false;
},
handleClose (done) {
handleClose(done) {
this.dialogVisible = false;
this.$refs[formName].resetFields();
},
handleCheckAllChange (val) {
handleCheckAllChange(val) {
this.checkedTargets = val ? targetOptions : [];
this.isIndeterminate = false;
},
handleCheckedTargetsChange (value) {
handleCheckedTargetsChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.targets.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.targets.length;
}
}
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.targets.length;
},
},
};
</script>
......
......@@ -389,14 +389,7 @@
label="捺印单位:"
prop="nydwGajgmc"
>
<el-input
v-model="ruleForm.nydwGajgmc"
placeholder="请输入捺印单位名称"
maxlength="100"
show-word-limit
clearable
>
</el-input>
<Cascader :form="ruleForm" id="nydwGajgmc"></Cascader>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -484,6 +477,7 @@
</template>
<script>
import Cascader from "@/components/Cascader.vue";
const targetOptions = [
"本地案件库",
"比中案件库",
......@@ -496,6 +490,9 @@ const targetOptions = [
];
export default {
name: "xzry",
components: {
Cascader
},
props: {
isShowXzry: {
type: [Number, String, Boolean],
......@@ -587,7 +584,7 @@ export default {
{ required: true, message: "请输入现住地址", trigger: "blur" },
],
nydwGajgmc: [
{ required: true, message: "请输入捺印单位", trigger: "blur" },
{ required: true, message: "请输入捺印单位", trigger: "change" },
],
nyryXm: [
{ required: true, message: "请输入捺印人员姓名", trigger: "change" },
......
......@@ -228,11 +228,10 @@
</div>
<!-- 新增弹窗-->
<div
class="addUserDialogBg"
v-show="isShowAddUserDialogBg"
@click="canceladd"
></div>
<div class="addUserDialog dialog" v-show="isShowAddUserDialog">
class="addUserDialog dialog groupAddDialog"
v-show="isShowAddUserDialog"
ref="isShowAddUserDialog"
>
<div class="head-title">
<div class="left">新增用户组</div>
<div class="close" @click="canceladd">
......@@ -296,11 +295,10 @@
</div>
<!--编辑弹窗-->
<div
class="addUserDialogBg"
v-show="isShowEditGroupDialogBg"
@click="canceledit"
></div>
<div class="addUserDialog dialog" v-show="isShowEditGroupDialog">
class="addUserDialog dialog groupEditDialog"
v-show="isShowEditGroupDialog"
ref="isShowEditGroupDialog"
>
<div class="head-title">
<div class="left">编辑用户组</div>
<div class="close" @click="canceledit">
......@@ -364,11 +362,10 @@
</div>
<!-- 角色设置 -->
<div
class="roleDialogBg"
v-show="isShowRoleDialogBg"
@click="cancelrole"
></div>
<div class="roleDialog" v-show="isShowRoleDialog">
class="roleDialog groupJueseDialog"
v-show="isShowRoleDialog"
ref="isShowRoleDialog"
>
<div class="head-title">
<div class="left">
<img class="title-img" :src="src" alt="" />
......@@ -387,7 +384,14 @@
<div class="infor_card">
<div>
<div class="label">系统角色</div>
<div class="content">
<div
:class="{
content: true,
barlen:
checkItem.roleNames &&
checkItem.roleNames.split(',').length <= 6,
}"
>
<div
class="contentItem"
v-for="item in checkItem.roleNames &&
......@@ -402,7 +406,15 @@
</div>
<div>
<div class="label">自定义角色:</div>
<div class="content">
<div
:class="{
content: true,
ziding: true,
barlen:
checkItem.roleNames &&
checkItem.roleNames.split(',').length <= 6,
}"
>
<div class="contentItem">
<img src="@/assets/img/jianhao.png" alt="" />
<p>指纹入库员</p>
......@@ -432,8 +444,17 @@
<div class="infor_card danlan">
<div>
<div class="label">系统角色</div>
<div class="content">
<div class="contentItem" v-for="item in userArr" :key="item.id">
<div
:class="{
content: true,
barlen: defaultPerson.length <= 6,
}"
>
<div
class="contentItem"
v-for="item in defaultPerson"
:key="item.id"
>
<img src="@/assets/img/jiahao.png" alt="" />
<p>{{ item.name }}</p>
</div>
......@@ -441,22 +462,20 @@
</div>
<div>
<div class="label">自定义角色:</div>
<div class="content">
<div class="contentItem">
<img src="@/assets/img/jianhao.png" alt="" />
<p>指纹入库员</p>
</div>
<div class="contentItem">
<img src="@/assets/img/jianhao.png" alt="" />
<p>指纹入库员</p>
</div>
<div class="contentItem">
<img src="@/assets/img/jianhao.png" alt="" />
<p>指纹入库员</p>
</div>
<div class="contentItem">
<img src="@/assets/img/jianhao.png" alt="" />
<p>指纹入库员</p>
<div
:class="{
content: true,
ziding: true,
barlen: customPerson.length <= 6,
}"
>
<div
class="contentItem"
v-for="item in customPerson"
:key="item.id"
>
<img src="@/assets/img/jiahao.png" alt="" />
<p>{{ item.name }}</p>
</div>
</div>
</div>
......@@ -468,14 +487,12 @@
<div class="btn2" @click="cancelrole">取消</div>
</div>
</div>
<!-- 用户设置 -->
<div
class="userDialogBg"
v-show="isShowUserDialogBg"
@click="canceluser"
></div>
<div class="userDialog" v-show="isShowUserDialog">
class="userDialog groupYonghuDialog"
v-show="isShowUserDialog"
ref="isShowUserDialog"
>
<div class="head-title">
<div class="left">
<img class="title-img" :src="src" alt="" />
......@@ -671,7 +688,6 @@ export default {
status: 1, // 0 未激活 1 已激活
},
editFormParams: {
id: "",
name: "", // 组名称
describe: "", // 用户组描述
userId: "", // 加入组用户
......@@ -706,6 +722,8 @@ export default {
checkItem: {}, //选中后的信息
userArr: [], //用户集合
checked: false,
defaultPerson: [], //系统默认角色集合
customPerson: [], //自定义角色集合
};
},
computed: {
......@@ -756,11 +774,18 @@ export default {
this.$axios
.get("/system/roles")
.then((res) => {
if (res.data !== null) {
self.userArr = res.data;
if (res.data.code == 200 && res.data.detail.length > 0) {
let result = res.data.detail;
self.defaultPerson = result.filter((i) => i.defaultFlag == 1);
self.customPerson = result.filter((i) => i.defaultFlag == 0);
} else {
this.$message.error("获取角色信息失败!");
}
// if (res.data !== null) {
// self.userArr = res.data;
// } else {
// this.$message.error("获取角色信息失败!");
// }
})
.catch(() => {});
},
......@@ -875,23 +900,10 @@ export default {
// 打开编辑弹窗
openedit(row) {
this.checkItem = row;
let id = row.id;
var usergroup = new URLSearchParams();
usergroup.append("Id", id);
this.$axios
.post("/login/usergroup/queryusergroup", usergroup)
.then((res) => {
console.log(res);
this.editFormParams.id = id;
this.editFormParams.status = res.data.usergroup.status;
this.editFormParams.groupname = res.data.usergroup.groupname;
this.editFormParams.groupdesc = res.data.usergroup.groupdesc;
this.editFormParams.roleId = res.data.usergroup.roleId;
this.editFormParams.rolename = res.data.usergroup.rolename;
this.editFormParams.username = res.data.usergroup.username;
this.editFormParams.userId = res.data.usergroup.userId;
})
.catch((failResponse) => {});
for (let key in this.editFormParams) {
this.$set(this.editFormParams, key, row[key]);
}
this.$set(this.editFormParams, "id", row["id"]);
this.isShowEditGroupDialog = true;
this.isShowEditGroupDialogBg = true;
},
......@@ -933,13 +945,21 @@ export default {
this.$axios
.post("/system/user-groups", this.addFormParams)
.then((res) => {
if (res.status == "201") {
this.isShowAddUserDialogBg = false;
this.isShowAddUserDialog = false;
if (res.data.code == 201) {
setTimeout(() => {
this.$message.success("添加成功");
}, 1400);
}, 800);
this.isShowAddUserDialogBg = false;
this.isShowAddUserDialog = false;
this.search();
} else if (res.data.code == 400 || res.data.code == 500) {
setTimeout(() => {
this.$message.error(res.data.detail);
}, 500);
} else if (res.data.code == 404) {
setTimeout(() => {
this.$message.error("服务不存在");
}, 500);
}
})
.catch((failResponse) => {});
......@@ -953,31 +973,27 @@ export default {
this.$refs.editFormParams.validate((valid) => {
console.info(valid);
if (valid) {
var usergroup = new URLSearchParams();
usergroup.append("id", this.editFormParams.id);
usergroup.append("groupname", this.editFormParams.groupname);
usergroup.append("groupdesc", this.editFormParams.groupdesc);
usergroup.append("userId", this.editFormParams.userId);
usergroup.append("username", this.editFormParams.username);
usergroup.append("roleId", this.editFormParams.roleId); // roleId(多个角色id之间用逗号隔开),
usergroup.append("rolename", this.editFormParams.rolename); // roleId(多个角色id之间用逗号隔开),
usergroup.append("status", this.editFormParams.status); // status(激活状态:0未激活;1已激活)
this.$axios
.post("/login/usergroup/update", usergroup)
.put("/system/user-groups", this.editFormParams)
.then((res) => {
if (res.data.message === "用户组名已存在,请重新修改用户组名!") {
this.$message.error(res.data.message);
} else {
this.search();
console.log(res);
if (res.data.code == 200) {
setTimeout(() => {
this.$message.success("修改成功");
}, 800);
this.isShowEditGroupDialog = false;
this.isShowEditGroupDialogBg = false;
this.$message.success(res.data.message);
this.search();
} else if (res.data.code == 400 || res.data.code == 500) {
setTimeout(() => {
this.$message.error(res.data.detail);
}, 500);
} else if (res.data.code == 404) {
setTimeout(() => {
this.$message.error("服务不存在");
}, 500);
}
})
.catch((failResponse) => {});
});
} else {
this.$message.error("数据提交失败!请联系管理员");
return false;
}
});
......@@ -1015,19 +1031,41 @@ export default {
search() {
console.info("搜索用户列表");
this.$axios.get("/system/user-groups").then((res) => {
console.info(res);
this.tableData = res.data;
if (res.data.code == "200") {
this.tableData = res.data.detail;
}
});
},
},
mounted() {
this.search();
this.searchUser();
setTimeout(() => {
console.log(this.newStr);
}, 2000);
this.$nextTick(() => {
document.body.appendChild(this.$refs.isShowEditGroupDialog);
document.body.appendChild(this.$refs.isShowAddUserDialog);
document.body.appendChild(this.$refs.isShowRoleDialog);
document.body.appendChild(this.$refs.isShowUserDialog);
});
},
destroyed() {
$(".groupAddDialog").remove();
$(".groupEditDialog").remove();
$(".groupJueseDialog").remove();
$(".groupYonghuDialog").remove();
},
watch: {
isShowEditGroupDialog(val) {
this.$bus.emit("isBlur", val);
},
isShowUserDialog(val) {
this.$bus.emit("isBlur", val);
},
isShowRoleDialog(val) {
this.$bus.emit("isBlur", val);
},
isShowAddUserDialog(val) {
this.$bus.emit("isBlur", val);
},
selectBoo: {
handler(newval) {
if (this.selectBoo) {
......
......@@ -193,7 +193,7 @@
cursor: pointer;
"
src="../../assets/img/qbryk/bj.png"
@click="userEdit(scope.row.userId, scope.row.roleName)"
@click="userEdit(scope.row.id)"
/>
<!-- <img-->
<!-- style="width: 1.125rem;height: 1.125rem;cursor: pointer"-->
......@@ -653,8 +653,9 @@ export default {
searchUser() {
console.info("搜索用户列表");
this.$axios.get("/system/users").then((res) => {
console.info(res);
this.userTableData = res.data;
if (res.data.code == 200) {
this.userTableData = res.data.detail;
}
});
// // todo 多条件筛选
// this.$axios
......@@ -669,13 +670,12 @@ export default {
// .catch(failResponse => {});
},
// 编辑用户权限
userEdit(id, rolename) {
console.info("用户id=====>", id);
userEdit(id) {
this.$store.commit("layout/delcachePageName", "UserPermission");
this.$router.push({
name: "UserPermission",
params: {
path: "/UserPermission",
query: {
id: id,
rolename: rolename,
},
});
},
......@@ -693,21 +693,10 @@ export default {
// 获取用户组信息
searchGroup() {
this.$axios.get("/system/user-groups").then((res) => {
console.info(res);
this.groupTableData = res.data;
if (res.data.code == 200) {
this.groupTableData = res.data.detail;
}
});
// // todo 多条件筛选
// this.$axios
// .post("/login/usergroup/queryUserGroupList", usergroup)
// .then(res => {
// console.log(res.data);
// this.groupTableData = res.data.data;
// this.groupSearchParams.page.total = res.data.total;
// this.groupSearchParams.page.page = res.data.page;
// this.groupSearchParams.page.count = res.data.count;
// this.$message.success(res.message);
// })
// .catch(failResponse => {});
},
groupEdit(id) {
console.info("用户id=====>", id);
......
......@@ -12,9 +12,7 @@
"
icon-class="ic_add"
/>
<span class="add-role-span">
新增角色
</span>
<span class="add-role-span"> 新增角色 </span>
</div>
<div
class="img-btn"
......@@ -61,7 +59,7 @@
<div class="delbtns">
<div
class="delicon"
v-if="!delimgBoo"
v-if="!delimgBoo && diyRoleList.length > 0"
@click="
() => {
delimgBoo = !delimgBoo;
......@@ -101,7 +99,7 @@
:class="{
'diy-role-item': true,
active: item.id === diyRoleItemIndex,
delWidth: delimgBoo
delWidth: delimgBoo,
}"
>
<div
......@@ -113,9 +111,10 @@
{{ item.name }}
</div>
<el-input
v-show="item.edit"
v-if="item.edit"
size="mini"
class="diy-edit-title"
ref="edit_input"
v-model="item.name"
></el-input>
<div class="diy-edit-btn">
......@@ -230,7 +229,7 @@
<div
class="line"
v-for="item in permissionDataList[0] &&
permissionDataList[0].children"
permissionDataList[0].children"
:key="item.id"
>
<el-checkbox :label="item.id"> {{ item.name }}</el-checkbox>
......@@ -239,7 +238,7 @@
<div
class="line"
v-for="item in permissionDataList[1] &&
permissionDataList[1].children"
permissionDataList[1].children"
:key="item.id"
>
<el-checkbox :label="item.id"> {{ item.name }}</el-checkbox>
......@@ -248,7 +247,7 @@
<div
class="line"
v-for="item in permissionDataList[2] &&
permissionDataList[2].children"
permissionDataList[2].children"
:key="item.id"
>
<el-checkbox :label="item.id"> {{ item.name }}</el-checkbox>
......@@ -258,7 +257,7 @@
<div
class="line"
v-for="item in permissionDataList[3] &&
permissionDataList[3].children"
permissionDataList[3].children"
:key="item.id"
>
<el-checkbox :label="item.id"> {{ item.name }}</el-checkbox>
......@@ -268,7 +267,7 @@
<div
class="line"
v-for="item in permissionDataList[4] &&
permissionDataList[4].children"
permissionDataList[4].children"
:key="item.id"
>
<el-checkbox :label="item.id"> {{ item.name }}</el-checkbox>
......@@ -278,7 +277,7 @@
<div
class="line"
v-for="item in permissionDataList[5] &&
permissionDataList[5].children"
permissionDataList[5].children"
:key="item.id"
>
<el-checkbox :label="item.id"> {{ item.name }}</el-checkbox>
......@@ -288,7 +287,7 @@
<div
class="line"
v-for="item in permissionDataList[6] &&
permissionDataList[6].children"
permissionDataList[6].children"
:key="item.id"
>
<el-checkbox :label="item.id"> {{ item.name }}</el-checkbox>
......@@ -298,7 +297,7 @@
<div
class="line"
v-for="item in permissionDataList[7] &&
permissionDataList[7].children"
permissionDataList[7].children"
:key="item.id"
>
<el-checkbox :label="item.id"> {{ item.name }}</el-checkbox>
......@@ -308,7 +307,7 @@
<div
class="line"
v-for="item in permissionDataList[8] &&
permissionDataList[8].children"
permissionDataList[8].children"
:key="item.id"
>
<el-checkbox :label="item.id"> {{ item.name }}</el-checkbox>
......@@ -329,20 +328,20 @@ import Confirmation from "@/components/Confirmation.vue";
export default {
name: "RoleManage",
components: {
Confirmation
Confirmation,
},
watch: {
roleMenusSelection: function(val) {
roleMenusSelection: function (val) {
console.info(val);
},
diyRoleItemIndex: {
handler(val, oldval) {
this.oldCurrtId = oldval;
let arr = [...this.diyRoleList, ...this.defaultRoleBtns];
let obj = arr.find(i => i.id == val);
let obj = arr.find((i) => i.id == val);
this.checkItem = JSON.parse(JSON.stringify(obj));
console.log(this.checkItem);
}
},
},
// checkItem: null
btnType: {
......@@ -354,8 +353,8 @@ export default {
} else {
this.disabled = false;
}
}
}
},
},
},
data() {
return {
......@@ -376,7 +375,7 @@ export default {
// 自定义的角色组
diyRoleList: [],
//正在选择的角色框样式
diyRoleItemIndex: 2,
diyRoleItemIndex: 1,
//现在点击的按钮是默认人员还是自加人员
btnType: "default",
//权限是否不可编辑
......@@ -396,24 +395,25 @@ export default {
//复制标识出现
fuzhi: false,
//复制标记鼠标移入
copybz: false
copybz: false,
};
},
methods: {
// 获取权限列表
getPermissionDataLists() {
this.$axios.get("/system/permissions").then(res => {
if (res.data.length > 0) {
this.$axios.get("/system/permissions").then((res) => {
if (res.data.code == 200 && res.data.detail.length > 0) {
let result = res.data.detail;
var arr = [];
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].parentId === 0) {
res.data[i].children = [];
arr.push(res.data[i]);
for (let i = 0; i < result.length; i++) {
if (result[i].parentId === 0) {
result[i].children = [];
arr.push(result[i]);
}
if (res.data[i].parentId !== 0) {
if (result[i].parentId !== 0) {
arr.forEach((item, index) => {
if (item.id === res.data[i].parentId) {
item.children.push(res.data[i]);
if (item.id === result[i].parentId) {
item.children.push(result[i]);
}
});
}
......@@ -427,15 +427,6 @@ export default {
item.enter = true;
console.log(item);
},
addrole() {
var role = {
name: "测试角色",
permissionIds: [11, 12]
};
this.$axios.post("/system/roles", role).then(res => {
console.info(res);
});
},
copy2() {
this.fuzhi = !this.fuzhi;
},
......@@ -449,7 +440,7 @@ export default {
this.fuzhi = false;
this.resetEdit();
let arr = [...this.defaultRoleBtns, ...this.diyRoleList];
let item = arr.find(i => i.id == diyRoleItemIndex);
let item = arr.find((i) => i.id == diyRoleItemIndex);
if (item) {
let id = this.diyRoleList.length + 20 + "copy";
var roleitem = {
......@@ -458,15 +449,19 @@ export default {
code: this.diyRoleList.length,
edit: true,
id,
permissions: item.permissions
permissions: item.permissions,
};
setTimeout(() => {
this.$refs["edit_input"]?.[0]?.focus();
}, 20);
// this.$refs['edit_input'].focus();
this.diyRoleItemIndex = id;
//加列表
this.diyRoleList.push(roleitem);
//加添加的人员
this.customAddUser.push(roleitem);
//加权限
this.checkList = item?.permissions?.map(i => i.id) || [];
this.checkList = item?.permissions?.map((i) => i.id) || [];
this.btnType = "custom";
setTimeout(() => {
this.$refs.diyRoles.scrollTop = this.$refs.diyRoles.scrollHeight;
......@@ -482,13 +477,13 @@ export default {
let checkArr = this.checkList;
let params = {
name,
permissionIds: checkArr
permissionIds: checkArr,
};
let index = this.diyRoleList.findIndex(i => i.name == name);
let index = this.diyRoleList.findIndex((i) => i.name == name);
if (checkArr.length > 0) {
let diyRolePermissions = checkArr.map(i => {
let diyRolePermissions = checkArr.map((i) => {
return {
id: i
id: i,
};
});
this.$set(this.diyRoleList[index], "permissions", diyRolePermissions);
......@@ -497,21 +492,21 @@ export default {
method: "post",
url: "/system/roles",
headers: {
"Content-Type": "application/json;charset=UTF-8"
"Content-Type": "application/json;charset=UTF-8",
},
data: JSON.stringify(params)
}).then(res => {
if (res.data) {
data: JSON.stringify(params),
}).then((res) => {
if (res.data.code == 201) {
self.customAddUser = [];
self.resetEdit();
self.fuzhi = false;
setTimeout(() => {
this.$message.success("新增角色成功!");
}, 1500);
}, 800);
} else {
setTimeout(() => {
this.$message.success("新增角色失败!");
}, 1500);
}, 800);
}
});
} else {
......@@ -522,39 +517,18 @@ export default {
search() {
this.$axios
.get("/system/roles")
.then(res => {
if (res.data !== null) {
res.data.forEach((item, index) => {
var arr = [];
var rolePermissions = item.permissions;
for (let i = 0; i < rolePermissions; i++) {
if (rolePermissions[i].parentId === 0) {
rolePermissions[i].children = [];
arr.push(rolePermissions[i]);
}
if (rolePermissions[i].parentId !== 0) {
arr.forEach((father, index) => {
if (father.id === rolePermissions[i].parentId) {
father.children.push(rolePermissions[i]);
}
});
}
}
item.permissions = rolePermissions;
if (index < 7) {
this.defaultRoleBtns.push(item);
} else {
this.diyRoleList.push(item);
}
if (res.data.length > 0) {
this.checkList = res.data[0].permissions.map(i => i.id);
} else {
this.checkList = [];
}
});
.then((res) => {
if (res.data.code == "200" && res.data.detail.length > 0) {
let result = res.data.detail;
if (res.data.detail.length > 0) {
this.checkList = res.data.detail[0].permissions.map((i) => i.id);
} else {
this.checkList = [];
}
this.defaultRoleBtns = result.filter((i) => i.defaultFlag == 1);
this.diyRoleList = result.filter((i) => i.defaultFlag == 0);
let arr = [...this.diyRoleList, ...this.defaultRoleBtns];
let obj = arr.find(i => i.id == this.diyRoleItemIndex);
let obj = arr.find((i) => i.id == this.diyRoleItemIndex);
this.checkItem = JSON.parse(JSON.stringify(obj));
console.info("角色权限===》", this.defaultRoleBtns);
console.info("角色权限===》", this.diyRoleList);
......@@ -563,7 +537,7 @@ export default {
this.$message.error("获取角色信息失败!");
}
})
.catch(failResponse => {});
.catch((failResponse) => {});
},
// 删除
del(id) {
......@@ -584,8 +558,11 @@ export default {
flag: false,
code: this.diyRoleList.length,
edit: true,
id
id,
};
setTimeout(() => {
this.$refs["edit_input"]?.[0]?.focus();
}, 20);
this.diyRoleItemIndex = id;
this.diyRoleList.push(roleitem);
this.customAddUser.push(roleitem);
......@@ -598,7 +575,7 @@ export default {
//查看用户组的信息
viewGroupItem(id) {
let arr = [...this.diyRoleList, ...this.defaultRoleBtns];
let obj = arr.find(i => i.id == id);
let obj = arr.find((i) => i.id == id);
return JSON.parse(JSON.stringify(obj));
},
//修改名
......@@ -617,7 +594,7 @@ export default {
},
viewSelect(item) {
this.checkList =
(item.permissions && item.permissions.map(i => i.id)) || [];
(item.permissions && item.permissions.map((i) => i.id)) || [];
},
// 选中自定义某个权限
chooseDiyRoleItem(item) {
......@@ -631,10 +608,15 @@ export default {
// 编辑
editDiyRoleItem(item) {
let edit = item.edit;
let index = this.diyRoleList.findIndex(i => i.id == item.id);
let index = this.diyRoleList.findIndex((i) => i.id == item.id);
if (!edit && typeof edit != Boolean) edit = false;
edit = !edit;
this.$set(this.diyRoleList[index], "edit", edit);
if (edit) {
setTimeout(() => {
this.$refs["edit_input"]?.[0]?.focus();
}, 20);
}
this.btnType = "custom";
if (item.id !== this.diyRoleItemIndex) {
this.resetEdit();
......@@ -647,7 +629,7 @@ export default {
if (type == "screen") {
}
let newArr = this.diyRoleList.map(i => {
let newArr = this.diyRoleList.map((i) => {
i.edit = false;
return i;
});
......@@ -662,7 +644,7 @@ export default {
this.funFlag = false;
this.dataFlag = true;
console.info("数据权限");
}
},
},
created() {
this.search();
......@@ -670,7 +652,7 @@ export default {
},
mounted() {
this.funFlag = true;
}
},
};
</script>
......@@ -805,6 +787,13 @@ export default {
display: flex !important;
justify-content: flex-start;
align-items: center;
.default-role-item {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
box-sizing: border-box;
padding: 0 10px;
}
}
.fzSelect {
width: 14px;
......
......@@ -215,7 +215,7 @@
cursor: pointer;
"
src="../../assets/img/qbryk/bj.png"
@click="openedit(scope.row.id)"
@click="openedit(scope.row)"
/>
</Confirmation>
<Confirmation
......@@ -258,11 +258,10 @@
</div>
<!-- 新增弹窗-->
<div
class="addUserDialogBg"
v-if="isShowAddUserDialogBg"
@click="canceladd"
></div>
<div class="addUserDialog dialog" v-if="isShowAddUserDialog">
class="addUserDialog dialog addDialog"
v-show="isShowAddUserDialog"
ref="addUserDialog"
>
<div class="head-title">
<div class="left">新增用户</div>
<div class="close" @click="canceladd">
......@@ -291,7 +290,7 @@
v-model="addFormParams.name"
></el-input>
</el-form-item>
<el-form-item class="info-item" label="所属单位代码:" prop="unitCode">
<el-form-item class="info-item" label="所属单位:" prop="unitCode">
<Cascader :form="addFormParams" id="unitCode"></Cascader>
</el-form-item>
<el-form-item class="info-item" label="用户警号:" prop="policeNumber">
......@@ -357,12 +356,14 @@
</div>
</div>
<!-- 编辑弹窗-->
<div
class="addUserDialogBg"
v-if="isShowEditUserDialogBg"
@click="canceledit"
></div>
<div class="addUserDialog dialog" v-if="isShowEditUserDialog">
class="addUserDialog dialog editDialog"
v-show="isShowEditUserDialog"
ref="isShowEditUserDialog"
v-loading="loading"
element-loading-text="拼命加载中"
>
<div class="head-title">
<div class="left">编辑用户</div>
<div class="close" @click="canceledit">
......@@ -384,46 +385,42 @@
v-model="editFormParams.username"
></el-input>
</el-form-item>
<el-form-item class="info-item" label="姓名:" prop="truename">
<el-form-item class="info-item" label="姓名:" prop="name">
<el-input
placeholder="请输入姓名"
class="input-info"
v-model="editFormParams.truename"
v-model="editFormParams.name"
></el-input>
</el-form-item>
<el-form-item class="info-item" label="所属单位代码:" prop="unitcode">
<el-input
placeholder="请输入所属单位"
class="input-info"
v-model="editFormParams.unitcode"
></el-input>
<el-form-item class="info-item" label="所属单位:" prop="unitCode">
<Cascader :form="editFormParams" id="unitCode"></Cascader>
</el-form-item>
<el-form-item class="info-item" label="用户警号:" prop="policemanid">
<el-form-item class="info-item" label="用户警号:" prop="policeNumber">
<el-input
placeholder="请输入用户警号"
class="input-info"
v-model="editFormParams.policemanid"
v-model="editFormParams.policeNumber"
></el-input>
</el-form-item>
<el-form-item class="info-item" label="手机号码:" prop="telphone">
<el-form-item class="info-item" label="手机号码:" prop="phoneNumber">
<el-input
placeholder="请输入手机号码"
class="input-info"
v-model="editFormParams.telphone"
v-model="editFormParams.phoneNumber"
></el-input>
</el-form-item>
<el-form-item class="info-item" label="加入用户组:">
<el-input
placeholder="请选择用户组"
class="input-info"
v-model="editFormParams.group"
v-model="editFormParams.userGroupId"
></el-input>
</el-form-item>
<el-form-item class="info-item" label="加入角色:">
<el-input
placeholder="请选择角色"
class="input-info"
v-model="editFormParams.role"
v-model="editFormParams.roleId"
></el-input>
</el-form-item>
<el-form-item class="info-item" label="启用状态:" prop="status">
......@@ -572,6 +569,7 @@ export default {
}
};
return {
loading: false,
width4: 350,
width3: 130,
width2: 100,
......@@ -593,18 +591,14 @@ export default {
roleId: null,
},
editFormParams: {
userId: "",
username: "", //用户名
password: "", //密码
okpassword: "", // 确认密码
truename: "", //用户真实姓名
policemanid: "", //警号
telphone: "", //用户电话
unitcode: "", //单位代码
unitname: "", //单位名称
group: "", // 用户组
role: "", // 角色
status: "", // 启用状态
name: "", //姓名
unitCode: "", //单位代码
policeNumber: "", //警号
phoneNumber: "", //手机号码
status: "", //启用状态
userGroupId: "", // 用户组
roleId: "", // 角色
},
addrules: {
password: [
......@@ -620,7 +614,7 @@ export default {
{ validator: validateTruename, trigger: "blur", required: true },
], //用户真实姓名
policeNumber: [
{ validator: validatePolicemanid, trigger: "blur", required: false },
{ validator: validatePolicemanid, trigger: "blur", required: true },
], //警号
phoneNumber: [
{ validator: validateTelphone, trigger: "blur", required: true },
......@@ -638,32 +632,23 @@ export default {
], // 启用状态
},
editrules: {
password: [
{ validator: validatePass, trigger: "blur", required: true },
], //密码
okpassword: [
{ validator: validatePassEdit, trigger: "blur", required: true },
], // 确认密码
username: [
{ validator: validateUsername, trigger: "blur", required: true },
], //用户名
truename: [
name: [
{ validator: validateTruename, trigger: "blur", required: true },
], //用户真实姓名
policemanid: [
unitCode: [
{ validator: validateUnitcode, trigger: "change", required: true },
], //单位代码
policeNumber: [
{ validator: validatePolicemanid, trigger: "blur", required: true },
], //警号
telphone: [
phoneNumber: [
{ validator: validateTelphone, trigger: "blur", required: true },
], //用户电话
unitcode: [
{ validator: validateUnitcode, trigger: "blur", required: true },
], //单位代码
unitname: [
{ validator: validateUnitname, trigger: "blur", required: true },
], //单位名称
group: [{ validator: validatePass, trigger: "blur" }], // 用户组
role: [{ validator: validatePass, trigger: "blur" }], // 角色
userGroupId: [{ validator: validatePass, trigger: "blur" }], // 用户组
roleId: [{ validator: validatePass, trigger: "blur" }], // 角色
status: [
{ validator: validateStatus, trigger: "blur", required: true },
], // 启用状态
......@@ -751,17 +736,23 @@ export default {
console.log(valid);
if (valid) {
this.$axios
.post("/api/security/users", this.addFormParams)
.post("/system/users", this.addFormParams)
.then((res) => {
if (res.status == 201) {
if (res.data.code == 201) {
setTimeout(() => {
this.$message.success("添加成功");
}, 1400);
}, 800);
this.isShowAddUserDialog = false;
this.isShowAddUserDialogBg = false;
this.search();
} else {
console.log(res, 11111111);
} else if (res.data.code == 400 || res.data.code == 500) {
setTimeout(() => {
this.$message.error(res.data.detail);
}, 500);
} else if (res.data.code == 404) {
setTimeout(() => {
this.$message.error("服务不存在");
}, 500);
}
})
.catch((res) => {
......@@ -792,43 +783,26 @@ export default {
this.$refs.editFormParams.validate((valid) => {
console.log(valid);
if (valid) {
this.isShowEditUserDialog = false;
this.isShowEditUserDialogBg = false;
console.info("editFormParams=====>", this.editFormParams); // 根据主键查询用户基本信息
var user = new URLSearchParams();
// 修改用户信息
user.append("userId", this.editFormParams.userId);
user.append("username", this.editFormParams.username);
user.append("truename", this.editFormParams.truename);
user.append("unitcode", this.editFormParams.unitcode);
user.append("unitname", this.editFormParams.unitname);
// user.append("password", this.editFormParams.password);
user.append("policemanid", this.editFormParams.policemanid);
user.append("telphone", this.editFormParams.telphone);
user.append("usergroup", this.editFormParams.usergroup); // 警号
user.append("role", this.editFormParams.role);
user.append("status", this.editFormParams.status);
user.append("groupid_coll", "");
user.append("groupid_list", "");
user.append("groupid_edit", "");
user.append("groupid_admin", "");
console.info("编辑user========>", user);
this.$axios
.post("/login/user/update", user)
.then((res) => {
if (res.data.message === "用户名已存在,请修改用户名!") {
this.$message.error(res.data.message);
} else {
this.$axios.put("/system/users", this.editFormParams).then((res) => {
if (res.data.code == 200) {
setTimeout(() => {
this.$message.success("修改成功");
console.log("修改的返回值:", res);
this.search();
}
})
.catch((failResponse) => {});
}, 800);
this.isShowEditUserDialog = false;
this.isShowEditUserDialogBg = false;
this.search();
} else if (res.data.code == 400 || res.data.code == 500) {
setTimeout(() => {
this.$message.error(res.data.detail);
}, 500);
} else if (res.data.code == 404) {
setTimeout(() => {
this.$message.error("服务不存在");
}, 500);
}
});
} else {
console.log("error submit!!");
this.search();
this.$message.error("修改失败");
return false;
}
});
......@@ -852,8 +826,9 @@ export default {
search() {
console.info("搜索用户列表");
this.$axios.get("/system/users").then((res) => {
console.info(res);
this.tableData = res.data;
if (res.data.code == 200) {
this.tableData = res.data.detail;
}
});
},
offMultiple() {
......@@ -893,51 +868,41 @@ export default {
},
// 打开新增弹窗
open() {
for (let key in this.addFormParams) {
if (key != "status") {
this.$set(this.addFormParams, key, "");
}
}
this.isShowAddUserDialog = true;
this.isShowAddUserDialogBg = true;
// (this.addFormParams.username = ""), //用户名
// (this.addFormParams.password = ""), //密码
// (this.addFormParams.okpassword = ""), // 确认密码
// (this.addFormParams.name = ""), //用户真实姓名
// (this.addFormParams.policeNumber = ""), //警号
// (this.addFormParams.phoneNumber = ""), //用户电话
// (this.addFormParams.unitCode = ""), //单位代码
// (this.addFormParams.unitName = "长沙"), //单位名称
// (this.addFormParams.userGroupId = ""), // 用户组
// (this.addFormParams.roleId = ""), // 角色
// (this.addFormParams.status = 1); // 启用状态
},
// 打开编辑弹窗
openedit(id) {
this.editFormParams.userId = id;
var user = new URLSearchParams();
console.log(99999999, id, user);
user.append("userId", id);
// user.append("userId", this.editFormParams.userId);
this.$axios
.post("/login/user/queryuserInfo", user)
.then((res) => {
if (res.data) {
console.info(res.data);
this.editFormParams.userId = id;
this.editFormParams.username = res.data.user.username;
this.editFormParams.truename = res.data.user.truename;
this.editFormParams.unitcode = res.data.user.unitcode;
this.editFormParams.unitname = res.data.user.unitname;
this.editFormParams.policemanid = res.data.user.policemanid;
// this.editFormParams.password = res.data.user.password;
// this.editFormParams.okpassword = res.data.user.password;
this.editFormParams.telphone = res.data.user.telphone;
this.editFormParams.status = res.data.user.status;
this.editFormParams.usergroup = res.data.user.usergroup;
this.editFormParams.role = res.data.user.role;
console.info("editFormParams====> ", this.editFormParams);
}
})
.catch((failResponse) => {});
openedit(row) {
for (let key in this.editFormParams) {
if (key != "status") {
this.$set(this.editFormParams, key, "");
}
}
// editFormParams
this.isShowEditUserDialog = true;
this.isShowEditUserDialogBg = true;
this.getPersonInfor(row.id);
},
// 人员信息
getPersonInfor(id) {
this.loading = true;
this.$axios.get("/system/users/" + id, { loading: false }).then((res) => {
this.loading = false;
if (res.data) {
let result = res.data;
for (let key in this.editFormParams) {
this.$set(this.editFormParams, key, result[key]);
}
this.$set(this.editFormParams, "id", id);
this.$set(this.editFormParams, "userGroupId", result["userGroupIds"]);
this.$set(this.editFormParams, "roleId", result["roleIds"]);
}
});
},
// 关闭新增弹窗
canceladd() {
......@@ -1005,8 +970,18 @@ export default {
},
mounted() {
this.search();
this.$nextTick(() => {
document.body.appendChild(this.$refs.addUserDialog);
document.body.appendChild(this.$refs.isShowEditUserDialog);
});
},
watch: {
isShowAddUserDialog(val) {
this.$bus.emit("isBlur", val);
},
isShowEditUserDialog(val) {
this.$bus.emit("isBlur", val);
},
selectBoo: {
handler(newval) {
if (this.selectBoo) {
......@@ -1017,6 +992,10 @@ export default {
},
},
},
destroyed() {
$(".addDialog").remove();
$(".editDialog").remove();
},
};
const data1 = [
......
......@@ -41,33 +41,42 @@
</div>
<div class="info-item">
<div class="info-title">姓名:</div>
<div class="info-value">{{ userData.truename }}</div>
<div class="info-value">{{ userData.name }}</div>
</div>
<div class="info-item">
<div class="info-title">警号:</div>
<div class="info-value">{{ userData.policemanid }}</div>
<div class="info-value">{{ userData.policeNumber }}</div>
</div>
<div class="info-item">
<div class="info-title">用户组:</div>
<div class="info-value">{{ userData.group }}</div>
<div class="info-title yonghuzu">
<el-checkbox v-model="checked" disabled>用户组:</el-checkbox>
</div>
<div class="info-value">
{{ userData.userGroupNames || "无用户组" }}
</div>
</div>
<div class="info-item">
<div class="info-title">所属单位:</div>
<div class="info-value">{{ userData.unitname }}</div>
<div class="info-value">{{ userData.unitName }}</div>
</div>
<div class="info-item1">
<div class="info-title">角色:</div>
<div class="info-title juese">
<el-checkbox v-model="checked" disabled>角色:</el-checkbox>
</div>
<!-- 有角色 角色长度<5-->
<div v-if="userData.roleName !== ''" class="info-value">
<div
<div v-if="userData.roleNames !== ''" class="info-value">
<div class="info-value">{{ userData.roleNames }}</div>
<!-- <div
class="tags"
v-for="item in userData.roleName && userData.roleName.split(',')"
v-for="item in userData.roleNames &&
userData.roleNames.split(',')"
:key="item"
>
{{ item }}
</div>
</div> -->
</div>
<!-- 无角色-->
<div v-else-if="userData.roleName === ''" class="info-value">
<div v-else-if="userData.roleNames === ''" class="info-value">
无角色
</div>
</div>
......@@ -84,144 +93,255 @@
</div>
</div>
<div class="save">
<div class="btn" @click="save" style="margin-right: 10px">编辑</div>
<div class="btn" @click="save">保存</div>
<div @click="redact" class="editText">
<i class="el-icon-edit"></i>
<span>编辑</span>
</div>
<div :class="{ disabel: isSave, btn: true }" @click="save">保存</div>
<!-- <el-button @click="add">add</el-button>-->
<!-- <el-button @click="edit">edit</el-button>-->
<!-- <el-button @click="del">del</el-button>-->
<!-- <el-button @click="search">search</el-button>-->
</div>
</div>
<div class="role-info">
<!-- 角色权限菜单列-->
<div class="menus">
<div
:class="{ div3: true, danlan: status === '2' || status === '3' }"
>
<el-checkbox v-model="roleMenus[0].flag">
{{ roleMenus[0].name }}
</el-checkbox>
<el-checkbox v-model="roleMenus[1].flag">
{{ roleMenus[1].name }}
</el-checkbox>
<el-checkbox v-model="roleMenus[2].flag">
{{ roleMenus[2].name }}
</el-checkbox>
</div>
<div :class="{ div3: true, danhuang: status === '3' }">
<el-checkbox v-model="roleMenus[3].flag">
{{ roleMenus[3].name }}
</el-checkbox>
</div>
<div class="div1">
<el-checkbox v-model="roleMenus[4].flag">
{{ roleMenus[4].name }}
</el-checkbox>
</div>
<div class="div1">
<el-checkbox v-model="roleMenus[5].flag">
{{ roleMenus[5].name }}
</el-checkbox>
</div>
<div class="div1">
<el-checkbox v-model="roleMenus[6].flag">
{{ roleMenus[6].name }}
</el-checkbox>
</div>
<div class="div2">
<el-checkbox v-model="roleMenus[7].flag">
{{ roleMenus[7].name }}
</el-checkbox>
</div>
<div class="div3">
<el-checkbox v-model="roleMenus[8].flag">
{{ roleMenus[8].name }}
</el-checkbox>
</div>
</div>
<div class="content">
<div
:class="{ div3: true, danlan: status === '2' || status === '3' }"
>
<div
class="line"
v-for="item in printCollectMenus"
:key="item.code"
>
<el-checkbox v-model="item.flag"> {{ item.name }}</el-checkbox>
<el-checkbox-group v-model="checkList" :disabled="disabled">
<div class="role-info">
<!-- 角色权限菜单列-->
<div class="menus">
<div :class="{ div3: true }">
<el-checkbox
:class="getClass(permissionDataList[0].id).class"
:disabled="getClass(permissionDataList[0].id).disable"
v-if="permissionDataList[0]"
:label="permissionDataList[0].id"
>
{{ permissionDataList[0].name }}
</el-checkbox>
<el-checkbox
:class="getClass(permissionDataList[1].id).class"
:disabled="getClass(permissionDataList[1].id).disable"
v-if="permissionDataList[1]"
:label="permissionDataList[1].id"
>
{{ permissionDataList[1].name }}
</el-checkbox>
<el-checkbox
:class="getClass(permissionDataList[2].id).class"
:disabled="getClass(permissionDataList[2].id).disable"
v-if="permissionDataList[2]"
:label="permissionDataList[2].id"
>
{{ permissionDataList[2].name }}
</el-checkbox>
</div>
<br />
<div class="line" v-for="item in printInputMenus" :key="item.code">
<el-checkbox v-model="item.flag"> {{ item.name }}</el-checkbox>
<div :class="{ div3: true }">
<el-checkbox
:class="getClass(permissionDataList[3].id).class"
:disabled="getClass(permissionDataList[3].id).disable"
v-if="permissionDataList[3]"
:label="permissionDataList[3].id"
>
{{ permissionDataList[3].name }}
</el-checkbox>
</div>
<br />
<div
class="line"
v-for="item in fileInformationInputMenus"
:key="item.code"
>
<el-checkbox v-model="item.flag"> {{ item.name }}</el-checkbox>
<div class="div1">
<el-checkbox
:class="getClass(permissionDataList[4].id).class"
:disabled="getClass(permissionDataList[4].id).disable"
v-if="permissionDataList[4]"
:label="permissionDataList[4].id"
>
{{ permissionDataList[4].name }}
</el-checkbox>
</div>
<p class="userText" v-if="status == '2' || status == '3'">
<span>用户权限</span>
</p>
</div>
<div :class="{ div3: true, danhuang: status === '3' }">
<div
class="line"
v-for="item in comprehensiveMenus"
:key="item.code"
>
<el-checkbox v-model="item.flag"> {{ item.name }}</el-checkbox>
<div class="div1">
<el-checkbox
:class="getClass(permissionDataList[5].id).class"
:disabled="getClass(permissionDataList[5].id).disable"
v-if="permissionDataList[5]"
:label="permissionDataList[5].id"
>
{{ permissionDataList[5].name }}
</el-checkbox>
</div>
<p class="groupText" v-if="status == '3'">
<span>用户组权限</span>
</p>
</div>
<div class="div1">
<div class="line" v-for="item in seniorMenus" :key="item.code">
<el-checkbox v-model="item.flag"> {{ item.name }}</el-checkbox>
<div class="div1">
<el-checkbox
:class="getClass(permissionDataList[6].id).class"
:disabled="getClass(permissionDataList[6].id).disable"
v-if="permissionDataList[6]"
:label="permissionDataList[6].id"
>
{{ permissionDataList[6].name }}
</el-checkbox>
</div>
</div>
<div class="div1">
<div
class="line"
v-for="item in qualityTestingMenus"
:key="item.code"
>
<el-checkbox v-model="item.flag"> {{ item.name }}</el-checkbox>
<div class="div2">
<el-checkbox
:class="getClass(permissionDataList[7].id).class"
:disabled="getClass(permissionDataList[7].id).disable"
v-if="permissionDataList[7]"
:label="permissionDataList[7].id"
>
{{ permissionDataList[7].name }}
</el-checkbox>
</div>
</div>
<div class="div1">
<div
class="line"
v-for="item in seniorQualityTestingMenus"
:key="item.code"
>
<el-checkbox v-model="item.flag"> {{ item.name }}</el-checkbox>
<div class="div3">
<el-checkbox
:class="getClass(permissionDataList[8].id).class"
:disabled="getClass(permissionDataList[8].id).disable"
v-if="permissionDataList[8]"
:label="permissionDataList[8].id"
>
{{ permissionDataList[8].name }}
</el-checkbox>
</div>
</div>
<div class="div2">
<div
class="line"
v-for="item in informationManageMenus"
:key="item.code"
>
<el-checkbox v-model="item.flag"> {{ item.name }}</el-checkbox>
<div class="content">
<div :class="{ div3: true }">
<div
class="line"
v-for="item in permissionDataList[0] &&
permissionDataList[0].children"
:key="item.code"
>
<el-checkbox
:label="item.id"
:class="getClass(item.id).class"
:disabled="getClass(item.id).disable"
>
{{ item.name }}</el-checkbox
>
</div>
<br />
<div
class="line"
v-for="item in permissionDataList[1] &&
permissionDataList[1].children"
:key="item.code"
>
<el-checkbox
:label="item.id"
:class="getClass(item.id).class"
:disabled="getClass(item.id).disable"
>
{{ item.name }}</el-checkbox
>
</div>
<br />
<div
class="line"
v-for="item in permissionDataList[2] &&
permissionDataList[2].children"
:key="item.code"
>
<el-checkbox
:label="item.id"
:class="getClass(item.id).class"
:disabled="getClass(item.id).disable"
>
{{ item.name }}</el-checkbox
>
</div>
</div>
</div>
<div class="div3">
<div
class="line"
v-for="item in seniorManageMenus"
:key="item.code"
>
<el-checkbox v-model="item.flag"> {{ item.name }}</el-checkbox>
<div :class="{ div3: true }">
<div
class="line"
v-for="item in permissionDataList[3] &&
permissionDataList[3].children"
:key="item.code"
>
<el-checkbox
:label="item.id"
:class="getClass(item.id).class"
:disabled="getClass(item.id).disable"
>
{{ item.name }}</el-checkbox
>
</div>
</div>
<div class="div1">
<div
class="line"
v-for="item in permissionDataList[4] &&
permissionDataList[4].children"
:key="item.code"
>
<el-checkbox
:label="item.id"
:class="getClass(item.id).class"
:disabled="getClass(item.id).disable"
>
{{ item.name }}</el-checkbox
>
</div>
</div>
<div class="div1">
<div
class="line"
v-for="item in permissionDataList[5] &&
permissionDataList[5].children"
:key="item.code"
>
<el-checkbox
:label="item.id"
:class="getClass(item.id).class"
:disabled="getClass(item.id).disable"
>
{{ item.name }}</el-checkbox
>
</div>
</div>
<div class="div1">
<div
class="line"
v-for="item in permissionDataList[6] &&
permissionDataList[6].children"
:key="item.code"
>
<el-checkbox
:label="item.id"
:class="getClass(item.id).class"
:disabled="getClass(item.id).disable"
>
{{ item.name }}</el-checkbox
>
</div>
</div>
<div class="div2">
<div
class="line"
v-for="item in permissionDataList[7] &&
permissionDataList[7].children"
:key="item.code"
>
<el-checkbox
:label="item.id"
:class="getClass(item.id).class"
:disabled="getClass(item.id).disable"
>
{{ item.name }}</el-checkbox
>
</div>
</div>
<div class="div3">
<div
class="line"
v-for="item in permissionDataList[8] &&
permissionDataList[8].children"
:key="item.code"
>
<el-checkbox
:label="item.id"
:class="getClass(item.id).class"
:disabled="getClass(item.id).disable"
>
{{ item.name }}</el-checkbox
>
</div>
</div>
<!-- <div class="line" v-for="item in " :key="item.code"></div>-->
</div>
<!-- <div class="line" v-for="item in " :key="item.code"></div>-->
</div>
</div>
</el-checkbox-group>
</div>
</el-container>
</template>
......@@ -233,126 +353,36 @@ export default {
return {
id: "",
rolename: "",
//0 停用 1 无角色无用户组 2有角色无用户组 3有角色有用户组
status: "2",
userData: {},
//0 停用 3启用
status: "3",
checked: true,
userData: {
username: "",
name: "",
policeNumber: "",
userGroupNames: "",
unitName: "",
roleNames: "",
},
funFlag: false,
dataFlag: false,
// 角色按钮
defaultRoleBtns: [
{ name: "指纹入库员", value: 1, flag: false },
{ name: "综合认定员", value: 2, flag: false },
{ name: "高级认定员", value: 3, flag: false },
{ name: "质量检查员", value: 4, flag: false },
{ name: "高级质量检查", value: 5, flag: false },
{ name: "一般管理员", value: 6, flag: false },
{ name: "超级管理员", value: 7, flag: false },
],
// 角色权限菜单
roleMenus: [
{ name: "指掌纹采集", code: 0, flag: false },
{ name: "指掌纹录入", code: 1, flag: false },
{ name: "档案信息录入", code: 2, flag: false },
{ name: "综合认定", code: 3, flag: false },
{ name: "高级认定", code: 4, flag: false },
{ name: "质量检查", code: 5, flag: false },
{ name: "高级质量检查", code: 6, flag: false },
{ name: "信息管理", code: 7, flag: false },
{ name: "高级管理", code: 8, flag: false },
],
// 指掌纹采集菜单
printCollectMenus: [
{ name: "指掌纹采集", code: 0, flag: false },
{ name: "非违法人员指纹采集", code: 1, flag: false },
],
// 指掌纹录入菜单
printInputMenus: [
{ name: "图片导入", code: 0, flag: false },
{ name: "FPTX数据导入", code: 1, flag: false },
{ name: "人员指纹扫描", code: 2, flag: false },
{ name: "案件指纹扫描", code: 3, flag: false },
{ name: "笔录指纹", code: 4, flag: false },
],
// 档案信息录入菜单
fileInformationInputMenus: [
{ name: "人员文字信息录入", code: 0, flag: false },
{ name: "案件文字信息录入", code: 1, flag: false },
],
// 综合认定
comprehensiveMenus: [
{ name: "发查询", code: 0, flag: false },
{ name: "比中认定-隐藏条码号", code: 1, flag: false },
{ name: "比中信息反馈", code: 2, flag: false },
{ name: "比中信息管理", code: 3, flag: false },
{ name: "破案信息管理", code: 4, flag: false },
{ name: "导入比中认定", code: 5, flag: false },
{ name: "填写比中抓获", code: 6, flag: false },
{ name: "人员信息新增修改", code: 7, flag: false },
{ name: "比中信息反馈", code: 8, flag: false },
{ name: "关注人员", code: 9, flag: false },
{ name: "关注条件", code: 10, flag: false },
{ name: "协查信息上报", code: 11, flag: false },
{ name: "提取现勘信息", code: 12, flag: false },
{ name: "人员指纹编辑", code: 13, flag: false },
{ name: "案件指纹编辑", code: 14, flag: false },
{ name: "文字信息修改", code: 15, flag: false },
{ name: "二次打印", code: 16, flag: false },
{ name: "比中信息撤销", code: 17, flag: false },
],
// 高级认定
seniorMenus: [
{ name: "比中认定-显示条码号", code: 1, flag: false },
{ name: "高级案件编辑", code: 2, flag: false },
{ name: "人案控制条码规则", code: 3, flag: false },
{ name: "基本/比中数据上报", code: 4, flag: false },
{ name: "全用户认定权限", code: 5, flag: false },
],
// 质量检查
qualityTestingMenus: [
{ name: "比中信息复核", code: 1, flag: false },
{ name: "协查信息复核", code: 2, flag: false },
{ name: "人案控制条码规则", code: 3, flag: false },
],
// 高级质量检查
seniorQualityTestingMenus: [
{ name: "比中信息复核", code: 1, flag: false },
{ name: "协查信息复核", code: 2, flag: false },
{ name: "人案控制条码规则", code: 3, flag: false },
],
// 信息管理
informationManageMenus: [
{ name: "比中信息管理", code: 1, flag: false },
{ name: "破案信息管理", code: 2, flag: false },
{ name: "协查信息管理", code: 3, flag: false },
{ name: "工作信息统计", code: 4, flag: false },
{ name: "战果查询上报", code: 5, flag: false },
{ name: "人员队列管理", code: 6, flag: false },
{ name: "案件队列管理", code: 7, flag: false },
{ name: "系统操作日志", code: 8, flag: false },
{ name: "复制案件数据", code: 9, flag: false },
{ name: "FPTX数据导出", code: 10, flag: false },
{ name: "批量处理操作", code: 11, flag: false },
],
// 高级管理
seniorManageMenus: [
{ name: "人案更改条码号", code: 1, flag: false },
{ name: "人案控制条码规则", code: 2, flag: false },
{ name: "删除人员数据", code: 3, flag: false },
{ name: "删除案件数据", code: 4, flag: false },
{ name: "删除查询数据", code: 5, flag: false },
{ name: "系统用户管理", code: 6, flag: false },
{ name: "系统分库管理", code: 7, flag: false },
{ name: "资源库管理", code: 8, flag: false },
{ name: "协查用户管理", code: 9, flag: false },
{ name: "人员类型管理", code: 10, flag: false },
{ name: "用户组管理", code: 11, flag: false },
{ name: "查询模块管理", code: 12, flag: false },
{ name: "上报条件设置", code: 13, flag: false },
{ name: "本地重卡反馈", code: 14, flag: false },
{ name: "本地涉案反馈", code: 15, flag: false },
],
// 保存的角色选项
roleMenusSelection: [],
permissionDataListSelection: [],
//多选框选项
checkList: [],
//是否禁用多选框
disabled: false,
//权限页面数组
permissionDataList: [],
//是否保存
isSave: false,
//用户id
userID: "",
rolePermissions: [], //角色权限
userGroupPermissions: [], //用户组权限
userPermissions: [], //用户权限
countArr: [], //三个权限的总和
checkMap: {}, //判断层叠以及是否选中
};
},
methods: {
......@@ -366,35 +396,215 @@ export default {
this.dataFlag = true;
console.info("数据权限");
},
redact() {
this.isSave = false;
},
// 保存
save() {
this.roleMenusSelection = this.roleMenus;
console.info("roleMenusSelection====", this.roleMenusSelection);
if (this.isSave) {
return;
}
this.isSave = true;
},
},
mounted() {
this.funFlag = true;
this.id = this.$route.params.id;
this.rolename = this.$route.params.rolename;
var user = new URLSearchParams();
user.append("userId", this.id);
// 获取用户信息
this.$axios
.post("/login/user/queryuserInfo", user)
.then((res) => {
personInfor() {
let self = this;
this.$axios.get("/system/users/" + this.userID).then((res) => {
if (res.data) {
console.info(res.data);
this.userData = res.data.user;
this.status = res.data.user.status;
console.info(res.data.user.status);
let result = res.data;
if (result.status == "1") {
this.status = "3";
} else {
this.status = "0";
}
for (let key in self.userData) {
self.$set(self.userData, key, result[key]);
}
self.rolePermissions = result.rolePermissions || [];
self.userGroupPermissions = result.userGroupPermissions || [];
self.userPermissions = result.userPermissions || [];
self.countArr = [
...self.rolePermissions,
...self.userGroupPermissions,
...self.userPermissions,
];
//去重并默认勾选
self.checkList = self
.Es5duplicate(self.countArr, "id")
.map((i) => i.id);
//判断层叠以及是否选中
self.controlCheckMap();
}
});
},
getClass(id) {
let self = this;
let arr = self.controlCheckMap() || [];
let newArr = arr.filter((i) => i.id == id);
let obj = {};
let newObj = {};
if (newArr.length == 1) {
obj[newArr[0].key + "1"] = true;
} else if (newArr.length == 2) {
obj["lei2"] = true;
obj[newArr[0].key + "1"] = true;
obj[newArr[1].key + "2"] = true;
} else if (newArr.length == 3) {
obj["lei2"] = true;
obj["lei3"] = true;
obj[newArr[0].key + "1"] = true;
obj[newArr[1].key + "2"] = true;
obj[newArr[2].key + "3"] = true;
}
let a = true;
for (let key in obj) {
if (key.indexOf("danhuang") >= 0 || key.indexOf("huise") >= 0) {
a = false;
}
})
.catch((failResponse) => {});
console.info("chuancan", this.$route.params.id);
}
if (a) {
newObj["disable"] = false;
} else {
newObj["disable"] = true;
}
newObj["class"] = obj;
return newObj;
},
controlCheckMap() {
let self = this;
// self.rolePermissions; //角色
// self.userGroupPermissions; //用户组
// self.userPermissions; //用户
let rolePermissions, userGroupPermissions, userPermissions;
rolePermissions = JSON.parse(JSON.stringify(self.rolePermissions));
userGroupPermissions = JSON.parse(
JSON.stringify(self.userGroupPermissions)
);
userPermissions = JSON.parse(JSON.stringify(self.userPermissions));
rolePermissions = rolePermissions.map((i) => {
i.key = "huise";
return i;
});
userGroupPermissions = userGroupPermissions.map((i) => {
i.key = "danhuang";
return i;
});
userPermissions = userPermissions.map((i) => {
i.key = "wu";
return i;
});
let contArr = [
...rolePermissions,
...userGroupPermissions,
...userPermissions,
];
return contArr;
},
//ES5原生去重办法
Es5duplicate(arr, type) {
var newArr = [];
var tArr = [];
if (arr.length == 0) {
return arr;
} else {
if (type) {
for (var i = 0; i < arr.length; i++) {
if (!tArr[arr[i][type]]) {
newArr.push(arr[i]);
tArr[arr[i][type]] = true;
}
}
return newArr;
} else {
for (var i = 0; i < arr.length; i++) {
if (!tArr[arr[i]]) {
newArr.push(arr[i]);
tArr[arr[i]] = true;
}
}
return newArr;
}
}
},
// 获取权限列表
getPermissionDataLists() {
this.$axios.get("/system/permissions").then((res) => {
if (res.data.code == 200 && res.data.detail.length > 0) {
let result = res.data.detail;
var arr = [];
for (let i = 0; i < result.length; i++) {
if (result[i].parentId === 0) {
result[i].children = [];
arr.push(result[i]);
}
if (result[i].parentId !== 0) {
arr.forEach((item, index) => {
if (item.id === result[i].parentId) {
item.children.push(result[i]);
}
});
}
}
}
this.permissionDataList = arr;
console.info("权限列表=====>", this.permissionDataList);
});
},
},
mounted() {
// this.funFlag = true;
// this.id = this.$route.params.id;
// this.rolename = this.$route.params.rolename;
// var user = new URLSearchParams();
// user.append("userId", this.id);
// // 获取用户信息
// this.$axios
// .post("/login/user/queryuserInfo", user)
// .then((res) => {
// if (res.data) {
// console.info(res.data);
// this.userData = res.data.user;
// this.status = res.data.user.status;
// console.info(res.data.user.status);
// }
// })
// .catch((failResponse) => {});
// console.info("chuancan", this.$route.params.id);
},
created() {
this.userID = this.$route.query.id;
//人员详情
this.personInfor();
//默认功能权限
this.funAuth();
//权限页面返现
this.getPermissionDataLists();
},
activated() {
let path = this.$route.path;
this.$router.push({
path: path,
query: {
id: this.userID,
},
});
console.log(this.$route);
},
};
</script>
<style scoped lang="scss">
.editText {
margin-right: 20px;
color: #006aff;
cursor: pointer;
> i {
cursor: pointer;
}
span {
cursor: pointer;
}
}
@import "scss/userpermission.scss";
</style>
......@@ -363,8 +363,9 @@
.addUserDialog {
box-sizing: border-box;
position: absolute;
top: calc(50% - 257px);
left: calc(50% - 471.5px);
top: 50%;
left: 50%;
transform: translate(-40%, -50%);
z-index: 1000;
width: 890px;
height: 440px;
......@@ -475,8 +476,9 @@
.userDialog {
box-sizing: border-box;
position: absolute;
top: calc(50% - 257px);
left: calc(50% - 471.5px);
top: 50%;
left: 50%;
transform: translate(-40%, -50%);
z-index: 1000;
width: 890px;
height: 540px;
......@@ -512,11 +514,15 @@
.info {
padding: 12px 24px 12px 24px;
.header {
display: flex;
align-items: center;
justify-content: space-between;
width: 780px;
height: 45px;
padding: 0;
.btn {
width: 96px;
line-height: 32px;
height: 32px;
border-radius: 4px;
border: 1px solid #aeb5c2;
......@@ -526,6 +532,8 @@
cursor: pointer;
}
.btn-right {
display: flex;
align-items: center;
//border: 1px solid darkblue;
position: absolute;
right: 24px;
......@@ -621,7 +629,7 @@
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-60%) translateY(-55%);
transform: translateX(-40%) translateY(-50%);
z-index: 1000;
width: 626px;
padding-bottom: 20px;
......@@ -705,6 +713,7 @@
> div {
width: 100%;
.label {
display: inline-block;
color: #666666;
vertical-align: top;
margin-top: 10px;
......@@ -714,12 +723,29 @@
width: 105px;
box-sizing: border-box;
}
.barlen {
padding-right: 20px !important;
}
.ziding {
.contentItem {
width: calc((100% - 75px) / 3) !important;
height: 32px !important;
border: 1px solid #aeb5c2 !important;
background-color: #fff !important;
box-shadow: none !important;
border-radius: 4px !important;
position: relative !important;
text-align: center !important;
}
}
.content {
// display: inline-table;
display: inline-block;
width: calc(100% - 105px);
max-height: 140px !important;
max-height: 94px !important;
box-sizing: border-box;
overflow: auto;
.contentItem {
display: inline-block;
width: calc((100% - 75px) / 3);
height: 32px;
background: #f6f8fa;
......@@ -743,6 +769,7 @@
position: absolute;
top: -6px;
right: -6px;
cursor: pointer;
}
}
}
......@@ -862,30 +889,33 @@
margin-left: 5px;
}
}
.addbtns {
width: 100%;
text-align: center;
.btn1 {
width: 72px;
height: 40px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #aeb5c2;
font-size: 14px;
color: #2e3846;
line-height: 40px;
cursor: pointer;
margin-right: 15px;
}
.btn2 {
width: 72px;
height: 40px;
background: #055fe7;
border-radius: 4px;
font-size: 14px;
color: #ffffff;
line-height: 40px;
cursor: pointer;
}
}
.addbtns {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
text-align: center;
.btn1 {
width: 72px;
height: 40px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #aeb5c2;
font-size: 14px;
color: #2e3846;
line-height: 40px;
cursor: pointer;
margin-right: 35px;
}
.btn2 {
width: 72px;
height: 40px;
background: #055fe7;
border-radius: 4px;
font-size: 14px;
color: #ffffff;
line-height: 40px;
cursor: pointer;
}
}
......@@ -47,8 +47,8 @@
border: 1px solid #aeb5c2;
margin-left: 5px;
cursor: pointer;
&:hover{
border-color: #377FEC;
&:hover {
border-color: #377fec;
}
}
}
......@@ -215,7 +215,7 @@
height: 90px;
border-bottom: 1px solid #eeeeee;
.el-checkbox {
margin: 25px 20px 0 25px;
margin: 25px 20px 0 20px;
}
}
.div1 {
......@@ -223,7 +223,7 @@
height: 70px;
border-bottom: 1px solid #eeeeee;
.el-checkbox {
margin: 25px 20px 0 25px;
margin: 25px 20px 0 20px;
}
}
// 未选中字体颜色
......@@ -263,19 +263,25 @@
width: 100%;
height: 90px;
border-bottom: 1px solid #eeeeee;
padding-left: 30px;
.el-checkbox {
margin: 10px 20px 0 25px;
margin: 10px 20px 0 0px;
}
.line {
height: 35px;
width: 190px;
}
}
.div1 {
width: 100%;
height: 70px;
border-bottom: 1px solid #eeeeee;
padding-left: 30px;
.line {
width: 190px;
}
.el-checkbox {
margin: 25px 20px 0 25px;
margin: 25px 20px 0 0px;
}
}
......
......@@ -273,7 +273,9 @@
box-sizing: border-box;
position: absolute;
top: 20px;
left: calc(50% - 471.5px);
left: 50%;
top: 50%;
transform: translate(-40%, -50%);
z-index: 1000;
width: 890px;
background: #ffffff;
......
.manage-page {
.manage-page /deep/ {
width: 100%;
padding: 24px;
padding-top: 12px;
font-family: MicrosoftYaHei;
.line {
width: 190px !important;
height: 35px !important;
.el-checkbox {
margin-left: 0 !important;
}
}
.yonghuzu {
.el-checkbox {
.el-checkbox__label {
cursor: default !important;
color: #999999;
}
.el-checkbox__inner {
position: relative;
z-index: 3;
cursor: default !important;
background-color: #ffce86;
border-color: #ffce86;
&::after {
cursor: default !important;
border-color: #fff;
}
}
}
}
.juese {
.el-checkbox {
.el-checkbox__label {
cursor: default !important;
color: #999999;
}
.el-checkbox__inner {
cursor: default !important;
background-color: #b1b6c2;
border-color: #b1b6c2;
&::after {
cursor: default !important;
border-color: #fff;
}
}
}
}
.danlan {
background-color: #f5f9fe;
}
.danhuang{
background-color: #FFFBF0;
.danhuang {
background-color: #fffbf0;
position: relative;
}
.textGreen{
color: #00AA73;
.textGreen {
color: #00aa73;
}
.textRed{
.textRed {
color: #fe0000;
}
.textBlue{
color: #055FE7;
.textBlue {
color: #055fe7;
}
.groupText{
.groupText {
position: absolute;
right: 0;
top: 0;
......@@ -29,10 +73,10 @@
font-weight: normal;
text-align: center;
box-shadow: 1px -1px 1px 0px rgba(247, 199, 116, 0.6);
background: #FFFCF4;
background: #fffcf4;
border-radius: 0px 0px 0px 15px;
color: #FF9400;
border: 1px solid #F7C774;
color: #ff9400;
border: 1px solid #f7c774;
}
.userText {
position: absolute;
......@@ -83,7 +127,7 @@
background: #ddebff;
}
&.green {
background-color: #C7EFE2;
background-color: #c7efe2;
}
.title-status {
position: relative;
......@@ -360,4 +404,128 @@
}
}
}
.is-disabled {
.el-checkbox__inner {
&::after {
border-color: #fff !important;
}
}
}
.is-checked {
.el-checkbox__inner {
background-color: #055fe7;
border-color: #055fe7;
}
.el-checkbox__label {
color: #055fe7;
}
}
.lei2 {
.is-checked {
&::after {
border-radius: 2px;
content: "";
display: inline-block;
width: 14px;
height: 14px;
position: absolute;
z-index: 2;
top: 3px;
left: 3px;
}
.el-checkbox__inner {
position: relative;
z-index: 3;
}
}
}
.lei3 {
.is-checked {
&::before {
content: "";
border-radius: 2px;
display: inline-block;
width: 14px;
height: 14px;
position: absolute;
z-index: 1;
top: 6px;
left: 6px;
}
.el-checkbox__inner {
position: relative;
z-index: 3;
}
}
}
.danhuang1 {
.is-checked {
.el-checkbox__inner {
background-color: #ffce86;
border-color: #ffce86;
}
}
}
.danhuang2 {
.is-checked {
&::after {
background-color: #ffce86;
}
}
}
.danhuang3 {
.is-checked {
&::before {
background-color: #ffce86;
}
}
}
.huise1 {
.is-checked {
.el-checkbox__inner {
background-color: #d8d8d8;
border-color: #d8d8d8;
}
}
}
.huise2 {
.is-checked {
&::after {
background-color: #d8d8d8;
}
}
}
.huise3 {
.is-checked {
&::before {
background-color: #d8d8d8;
}
}
}
.wu1 {
.is-checked {
.el-checkbox__inner {
background-color: #055fe7;
border-color: #055fe7;
}
}
}
.wu2 {
.is-checked {
&::after {
background-color: #055fe7;
}
}
}
.wu3 {
.is-checked {
&::before {
background-color: #055fe7;
}
}
}
}
// background-color: #b1b6c2;
......@@ -233,7 +233,7 @@
</div>
</div>
<el-tag
style="width: 100%; color: #666666; margin-top: 1rem"
style="width: 100%; color: #666666; margin-bottom: 0.5rem"
v-show="isShowTip"
>
<i
......@@ -247,14 +247,18 @@
<el-link
type="primary"
:underline="false"
style="margin-left: 1.25rem"
:style="{
marginLeft: '1.25rem',
color: selectionData.length > 0 ? '#055FE7' : '#C2C4C7',
transform: 'translateY(-2px)',
}"
@click="toggleSelection()"
>清除</el-link
>
</el-tag>
<div class="confirm_main_table">
<el-table
style="width: 100%; max-height: 31.25rem"
style="width: 100%"
:height="height"
border
@selection-change="handleSelectionChange"
......@@ -262,6 +266,7 @@
tooltip-effect="dark"
:data="list"
:key="tableKey"
:class="{ delSelection: !selectBoo }"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
row-key="queryId"
@row-click="confirm"
......@@ -271,7 +276,6 @@
type="selection"
height
width="auto"
v-if="isSelected"
></el-table-column>
<el-table-column prop="" label="任务号/查询号" :width="cxyrdWidth1">
<template slot-scope="scope">
......@@ -395,35 +399,42 @@
</el-table-column>
<el-table-column width="auto" label="操作" align="left">
<template slot-scope="scope">
<div
class="img"
@click="edit(scope.row)"
type="text"
style="font-size: 1.5rem"
v-if="scope.row.barcode"
>
<i>
<img
style="width: 1rem; height: 1rem; cursor: pointer"
:src="editUrl"
alt
/>
</i>
</div>
<div
v-if="scope.row.barcode"
class="img"
@click.stop="delOne(scope.row.qqid)"
type="text"
style="font-size: 1.5rem"
>
<i>
<img
style="width: 0.75rem; height: 0.875rem; cursor: pointer"
:src="delUrl"
alt
/>
</i>
<Confirmation content="编辑用户" v-if="scope.row.barcode">
<img
style="
width: 1.125rem;
height: 1.125rem;
margin-right: 1.125rem;
cursor: pointer;
"
:src="editUrl"
@click.stop="
() => {
delSelect();
edit(scope.row.id);
}
"
/>
</Confirmation>
<div @click.stop="() => {}">
<Confirmation
v-if="scope.row.barcode"
@onConfirm="delOne(scope.row.qqid)"
content="删除"
:hintBoo="true"
>
<div slot="reference">
<img
style="width: 1rem; height: 1rem; cursor: pointer"
:src="delUrl"
@click="
() => {
delSelect();
}
"
/>
</div>
</Confirmation>
</div>
</template>
</el-table-column>
......@@ -463,9 +474,10 @@ import moment from "moment";
import SvgIcon from "../../components/SvgIcon/index.vue";
import "@/icons/tree_f.svg";
import "@/icons/tree_c.svg";
import Confirmation from "@/components/Confirmation.vue";
export default {
name: "cxyrd",
components: { SvgIcon },
components: { SvgIcon, Confirmation },
data() {
return {
tableKey: 1,
......@@ -504,7 +516,7 @@ export default {
selectionData: [],
barcode: null,
// 是否批量操作
isSelected: false,
selectBoo: false,
delLabels: [],
// 自定义展示列table数据
key: 1,
......@@ -559,7 +571,7 @@ export default {
expanded: false, // 展开标志
historyDialogVisible: false,
cxyrdWidth1: 200,
height: 450,
height: 400,
// cxyrdWidth1: sessionStorage.getItem('cxyrdWidth1'),
// height: sessionStorage.getItem('tableHeight')
};
......@@ -567,7 +579,7 @@ export default {
created() {
let self = this;
let w1 = 1920;
let h1 = 450;
let h1 = 400;
let w2 = window.innerWidth;
this.height = (h1 * w2) / w1;
this.cxyrdWidth1 = (this.cxyrdWidth1 * w2) / w1;
......@@ -579,6 +591,15 @@ export default {
console.log(content);
},
watch: {
selectBoo: {
handler(newval) {
if (this.selectBoo) {
this.isShowTip = true;
} else {
this.isShowTip = false;
}
},
},
// 批量处理
checkedProps(val) {
this.tableProps = this.defaultTableProps.filter(
......@@ -733,7 +754,7 @@ export default {
// 多选删除
delMore() {
// 检查table选择的数据 如果没有选择则不可以删除
this.isSelected = !this.isSelected;
// this.selectBoo = !this.selectBoo;
if (this.selectionData.length === 0) {
this.$message.error("请选择需要删除的数据!");
return;
......@@ -743,35 +764,13 @@ export default {
for (let i = 0; i < this.selectionData.length; i++) {
qqid.push(this.selectionData[i].qqid);
}
this.doDelete(qqid);
},
// 单选删除
delOne(val) {
// 将传入的qqid转为数组
let qqid = [];
qqid.push(val);
// console.info("删除接口里的qqid:", qqid);
this.doDelete(qqid);
},
// 请求删除接口
doDelete(qqid) {
// 删除确认提示
this.$confirm("是否确定删除已选择的数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.post("/api/queryque/delete", { qqid: qqid })
.then((response) => {
if (response.data.code === 0) {
this.$message.success("删除成功");
this.search();
} else {
this.$message.error("删除失败");
}
});
this.doDelete(qqid);
})
.catch(() => {
this.$message({
......@@ -780,25 +779,50 @@ export default {
});
});
},
// 单选删除
delOne(val) {
// 将传入的qqid转为数组
let qqid = [];
qqid.push(val);
// console.info("删除接口里的qqid:", qqid);
this.doDelete(qqid);
},
// 请求删除接口
doDelete(qqid) {
// 删除确认提示
this.$axios
.post("/api/queryque/delete", { qqid: qqid })
.then((response) => {
if (response.data.code === 0) {
this.$message.success("删除成功");
this.search();
} else {
this.$message.error("删除失败");
}
});
},
// 认定
confirm(row) {
let self = this;
// self.enterInto(row)
if (row.removeFlag == "1") {
this.$message.error(
`该条信息已经删除,删除时间为${this.$moment(row.removeTime).format(
"LLL"
)}`
);
if (
row.children &&
row.children.length > 0 &&
row.children[0].maxcandidatecnt == 0
) {
this.$message.error("候选个数为零");
return;
} else if (!row.children && row.maxcandidatecnt == 0) {
this.$message.error("候选个数为零");
return;
}
setTimeout(() => {
self.enterInto(row);
}, 200);
console.log(row);
},
//进入页面
enterInto(row) {
if (row.children && row.children.length > 0) {
debugger;
if (row.children[0].querytype === "0") {
let routeUrl = this.$router.resolve({
path: "/confirm/TT",
......@@ -912,6 +936,10 @@ export default {
// }
// }
},
delSelect() {
this.selectBoo = false;
this.toggleSelection();
},
// 编辑
edit() {},
// 展开或关闭行
......@@ -971,12 +999,6 @@ export default {
// table表格选中获取数据
handleSelectionChange(val) {
this.selectionData = val;
console.log(this.selectionData);
if (this.selectionData.length) {
this.isShowTip = true;
} else {
this.isShowTip = false;
}
},
// 复制条码号 获取选中条码值
getBarcode() {
......@@ -1097,7 +1119,7 @@ export default {
// },
// 批量操作
batch() {
this.isSelected = !this.isSelected;
this.selectBoo = !this.selectBoo;
this.toggleSelection();
},
/**
......@@ -1113,6 +1135,7 @@ export default {
} else {
this.$refs.confirmTable.clearSelection();
}
console.log(this.selectionData);
},
},
......@@ -1135,15 +1158,15 @@ const users = [{ username: "张三" }, { username: "李四" }, { username: "赵6
const content = [
// { colume: "任务号", prop: "aid", width: 100 },
// { colume: "查询号", prop: "qqid", width: 100 },
{ colume: "源条码号", prop: "barcode", width: 235 },
{ colume: "候选个数", prop: "maxcandidatecnt", width: 100 },
{ colume: "查询类型", prop: "querytype", width: 100 },
{ colume: "状态", prop: "queryStateName", width: 100 },
{ colume: "是否删除", prop: "removeFlag", width: 100 },
{ colume: "优先级", prop: "queryclass", width: 100 },
{ colume: "认定时间", prop: "affirmtime", width: 200 },
{ colume: "发送时间", prop: "requestdatetime", width: 200 },
{ colume: "用户名", prop: "username", width: 100 },
{ colume: "源条码号", prop: "barcode", width: "230" },
{ colume: "候选个数", prop: "maxcandidatecnt", width: "auto" },
{ colume: "查询类型", prop: "querytype", width: "auto" },
{ colume: "状态", prop: "queryStateName", width: "auto" },
{ colume: "是否删除", prop: "removeFlag", width: "auto" },
{ colume: "优先级", prop: "queryclass", width: "auto" },
{ colume: "认定时间", prop: "affirmtime", width: "auto" },
{ colume: "发送时间", prop: "requestdatetime", width: "auto" },
{ colume: "用户名", prop: "username", width: "auto" },
];
const setQueryClass = [
{ queryclass: "1", name: "最高" },
......@@ -1154,6 +1177,9 @@ const setQueryClass = [
];
</script>
<style scoped lang="scss">
.delSelection /deep/ .el-table-column--selection .cell {
display: none;
}
/deep/.el-pager {
.number {
background-color: transparent;
......@@ -1344,7 +1370,7 @@ b {
}
.el-tag {
width: 82px;
height: 24px;
height: 32px;
background: #ddebff;
border-radius: 4px;
}
......@@ -1539,6 +1565,7 @@ b {
background-color: #055fe7 !important;
border: 1px solid #055fe7 !important;
}
/deep/.el-checkbox__inner:hover {
border-color: #055fe7;
/*background: #f5f5f7;*/
......@@ -1553,6 +1580,7 @@ b {
.confirm_main_search {
width: 100%;
height: 34px;
margin-bottom: 10px;
}
.confirm_main_button {
position: absolute;
......@@ -1566,7 +1594,7 @@ b {
height: 60px;
}
.confirm_main_table {
margin: 16px 0 15px 0;
margin: 6px 0 15px 0;
padding: 0;
width: 100%;
height: 500px;
......@@ -1577,6 +1605,16 @@ b {
</style>
<!--table树-->
<style scoped lang="scss">
.el-table {
/deep/ .el-checkbox {
.is-indeterminate {
.el-checkbox__inner {
background-color: #055fe7 !important;
border: 1px solid #055fe7 !important;
}
}
}
}
.el-tree /deep/ .el-tree-node__expand-icon.expanded {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
......
......@@ -368,10 +368,40 @@ $phone: var(--phone, #606266); //#ff4242;
}
span {
font-size: 17px;
}
}
}
.bzActive {
filter: blur(2px);
}
.delText {
position: absolute;
bottom: -30px;
left: 50%;
width: 100%;
text-align: center;
transform: translateX(-50%);
> p {
display: flex;
align-items: center;
width: 100%;
text-align: center;
justify-content: center;
> img {
margin-right: 10px;
}
span {
margin-right: 10px;
color: #e60012;
-webkit-background-clip: text;
font-family: MicrosoftYaHei;
font-size: 16px;
}
}
}
.del {
text-decoration: none; /*没有文本装饰*/
text-decoration: underline red; /*红色下划线*/
text-decoration: underline wavy red; /*红色波浪形下划线*/
text-decoration: line-through red; /*红色删除线*/
}
......@@ -30,6 +30,7 @@
</div>
<div class="source-bottom">
<Swiper
:souceDel="souceDel"
:carData="sourcedatas"
@prev="last"
@next="next"
......@@ -42,6 +43,13 @@
</div>
</div>
<!-- 数据加载中 -->
<div class="delText" v-if="souceDel">
<p>
<img src="@/assets/img/TT/delTime.png" alt="" />
<span>删除时间</span>
<span>{{ souceDelText }}</span>
</p>
</div>
</template>
</div>
<!-- <div class="source-data">
......@@ -95,22 +103,54 @@
@current-change="handleCurrentChange"
:row-class-name="tableRowClassName"
>
<el-table-column
label="排名"
type="index"
:width="width1"
></el-table-column>
<el-table-column
prop="score"
label="得分"
:width="width1"
></el-table-column>
<el-table-column label="排名" type="index" :width="width1">
<div
class="del"
slot-scope="scope"
v-if="targetDel && destbarcode == scope.row.destbarcode"
>
{{ scope.$index + 1 }}
</div>
<div slot-scope="scope" v-else>
{{ scope.$index + 1 }}
</div>
</el-table-column>
<el-table-column prop="score" label="得分" :width="width1">
<div
class="del"
slot-scope="scope"
v-if="targetDel && destbarcode == scope.row.destbarcode"
>
{{ scope.row.score }}
</div>
<div slot-scope="scope" v-else>
{{ scope.row.score }}
</div>
</el-table-column>
<el-table-column
prop="destbarcode"
label="目标条码号"
width="auto"
></el-table-column>
>
<div
class="del"
slot-scope="scope"
v-if="targetDel && destbarcode == scope.row.destbarcode"
>
{{ scope.row.destbarcode }}
</div>
<div slot-scope="scope" v-else>
{{ scope.row.destbarcode }}
</div>
</el-table-column>
</el-table>
<div class="delText" v-if="targetDel">
<p>
<img src="@/assets/img/TT/delTime.png" alt="" />
<span>删除时间</span>
<span>2012.12.24 12:39:45</span>
</p>
</div>
</div>
</div>
......@@ -130,7 +170,10 @@
<swiper-slide>
<div class="hands">右手</div>
<div class="outside">
<div v-for="(item, index) in sourceFingersRightR">
<div
v-for="(item, index) in sourceFingersRightR"
:key="index"
>
<div
class="finger-img"
@dblclick="
......@@ -144,16 +187,30 @@
/>
<div class="relative" v-else>
<!-- 有指纹图片 -->
<div v-if="souceDel == true" class="wtx">
<img src="@/assets/img/TT/tuxiangdel.png" />
<span>图像已删除</span>
</div>
<img
v-if="item.img && screenLoading == false"
v-else-if="
item.img &&
screenLoading == false &&
souceDel == false
"
:src="'data:image/jpeg;base64,' + item.img"
/>
<img
v-if="screenLoading == true"
v-if="
screenLoading == true && souceDel == false
"
src="@/assets/img/zzjz/zwjz.gif"
/>
<div
v-else-if="!item.img && screenLoading == false"
v-else-if="
!item.img &&
screenLoading == false &&
souceDel == false
"
class="wtx"
>
<img src="@/assets/img/TT/zwtp.png" />
......@@ -165,7 +222,10 @@
</div>
</div>
<div class="outside">
<div v-for="(item, index) in destFingersRightR">
<div
v-for="(item, index) in destFingersRightR"
:key="index"
>
<div
class="finger-img"
@dblclick="
......@@ -178,17 +238,31 @@
src="@/assets/img/fingerprint.gif"
/>
<div class="relative" v-else>
<div v-if="targetDel == true" class="wtx">
<img src="@/assets/img/TT/tuxiangdel.png" />
<span>图像已删除</span>
</div>
<!-- 有指纹图片 -->
<img
v-if="item.img && screenLoading == false"
v-else-if="
item.img &&
screenLoading == false &&
targetDel == false
"
:src="'data:image/jpeg;base64,' + item.img"
/>
<img
v-if="screenLoading == true"
v-else-if="
screenLoading == true && targetDel == false
"
src="@/assets/img/zzjz/zwjz.gif"
/>
<div
v-else-if="!item.img && screenLoading == false"
v-else-if="
!item.img &&
screenLoading == false &&
targetDel == false
"
class="wtx"
>
<img src="@/assets/img/TT/zwtp.png" />
......@@ -204,7 +278,10 @@
<div class="hands">左手</div>
<div class="outside">
<!-- 源 左手 滚动 -->
<div v-for="(item, index) in sourceFingersLeftR">
<div
v-for="(item, index) in sourceFingersLeftR"
:key="index"
>
<div
class="finger-img"
@dblclick="
......@@ -217,17 +294,31 @@
src="@/assets/img/fingerprint.gif"
/>
<div class="relative" v-else>
<div v-if="souceDel == true" class="wtx">
<img src="@/assets/img/TT/tuxiangdel.png" />
<span>图像已删除</span>
</div>
<!-- 有指纹图片 -->
<img
v-if="item.img && screenLoading == false"
v-else-if="
item.img &&
screenLoading == false &&
souceDel == false
"
:src="'data:image/jpeg;base64,' + item.img"
/>
<img
v-if="screenLoading == true"
v-if="
screenLoading == true && souceDel == false
"
src="@/assets/img/zzjz/zwjz.gif"
/>
<div
v-else-if="!item.img && screenLoading == false"
v-else-if="
!item.img &&
screenLoading == false &&
souceDel == false
"
class="wtx"
>
<img src="@/assets/img/TT/zwtp.png" />
......@@ -240,7 +331,10 @@
</div>
<div class="outside">
<!-- 左手 滚动 目标 -->
<div v-for="(item, index) in destFingersLeftR">
<div
v-for="(item, index) in destFingersLeftR"
:key="index"
>
<div
class="finger-img"
@dblclick="
......@@ -253,17 +347,31 @@
src="@/assets/img/fingerprint.gif"
/>
<div class="relative" v-else>
<div v-if="targetDel == true" class="wtx">
<img src="@/assets/img/TT/tuxiangdel.png" />
<span>图像已删除</span>
</div>
<!-- 有指纹图片 -->
<img
v-if="item.img && screenLoading == false"
v-else-if="
item.img &&
screenLoading == false &&
targetDel == false
"
:src="'data:image/jpeg;base64,' + item.img"
/>
<img
v-if="screenLoading == true"
v-else-if="
screenLoading == true && targetDel == false
"
src="@/assets/img/zzjz/zwjz.gif"
/>
<div
v-else-if="!item.img && screenLoading == false"
v-else-if="
!item.img &&
screenLoading == false &&
targetDel == false
"
class="wtx"
>
<img src="@/assets/img/TT/zwtp.png" />
......@@ -286,7 +394,10 @@
<swiper-slide>
<div class="hands">右手</div>
<div class="outside">
<div v-for="(item, index) in sourceFingersRightL">
<div
v-for="(item, index) in sourceFingersRightL"
:key="index"
>
<div
class="finger-img"
@dblclick="
......@@ -299,17 +410,31 @@
src="@/assets/img/fingerprint.gif"
/>
<div class="relative" v-else>
<div v-if="souceDel == true" class="wtx">
<img src="@/assets/img/TT/tuxiangdel.png" />
<span>图像已删除</span>
</div>
<!-- 有指纹图片 -->
<img
v-if="item.img && screenLoading == false"
v-if="
item.img &&
screenLoading == false &&
souceDel == false
"
:src="'data:image/jpeg;base64,' + item.img"
/>
<img
v-if="screenLoading == true"
v-else-if="
screenLoading == true && souceDel == false
"
src="@/assets/img/zzjz/zwjz.gif"
/>
<div
v-else-if="!item.img && screenLoading == false"
v-else-if="
!item.img &&
screenLoading == false &&
souceDel == false
"
class="wtx"
>
<img src="@/assets/img/TT/zwtp.png" />
......@@ -321,7 +446,10 @@
</div>
</div>
<div class="outside">
<div v-for="(item, index) in destFingersRightL">
<div
v-for="(item, index) in destFingersRightL"
:key="index"
>
<div
class="finger-img"
@dblclick="
......@@ -334,17 +462,31 @@
src="@/assets/img/fingerprint.gif"
/>
<div class="relative" v-else>
<div v-if="targetDel == true" class="wtx">
<img src="@/assets/img/TT/tuxiangdel.png" />
<span>图像已删除</span>
</div>
<!-- 有指纹图片 -->
<img
v-if="item.img && screenLoading == false"
v-else-if="
item.img &&
screenLoading == false &&
targetDel == false
"
:src="'data:image/jpeg;base64,' + item.img"
/>
<img
v-if="screenLoading == true"
v-else-if="
screenLoading == true && targetDel == false
"
src="@/assets/img/zzjz/zwjz.gif"
/>
<div
v-else-if="!item.img && screenLoading == false"
v-else-if="
!item.img &&
screenLoading == false &&
targetDel == false
"
class="wtx"
>
<img src="@/assets/img/TT/zwtp.png" />
......@@ -360,7 +502,10 @@
<div class="hands">左手</div>
<div class="outside">
<!-- 源 左手 滚动 -->
<div v-for="(item, index) in sourceFingersLeftL">
<div
v-for="(item, index) in sourceFingersLeftL"
:key="index"
>
<div
class="finger-img"
@dblclick="
......@@ -373,17 +518,31 @@
src="@/assets/img/fingerprint.gif"
/>
<div class="relative" v-else>
<div v-if="souceDel == true" class="wtx">
<img src="@/assets/img/TT/tuxiangdel.png" />
<span>图像已删除</span>
</div>
<!-- 有指纹图片 -->
<img
v-if="item.img && screenLoading == false"
v-if="
item.img &&
screenLoading == false &&
souceDel == false
"
:src="'data:image/jpeg;base64,' + item.img"
/>
<img
v-if="screenLoading == true"
v-else-if="
screenLoading == true && souceDel == false
"
src="@/assets/img/zzjz/zwjz.gif"
/>
<div
v-else-if="!item.img && screenLoading == false"
v-else-if="
!item.img &&
screenLoading == false &&
souceDel == false
"
class="wtx"
>
<img src="@/assets/img/TT/zwtp.png" />
......@@ -396,7 +555,10 @@
</div>
<div class="outside">
<!-- 左手 滚动 目标 -->
<div v-for="(item, index) in destFingersLeftL">
<div
v-for="(item, index) in destFingersLeftL"
:key="index"
>
<div
class="finger-img"
@dblclick="
......@@ -409,17 +571,31 @@
src="@/assets/img/fingerprint.gif"
/>
<div class="relative" v-else>
<div v-if="targetDel == true" class="wtx">
<img src="@/assets/img/TT/tuxiangdel.png" />
<span>图像已删除</span>
</div>
<!-- 有指纹图片 -->
<img
v-if="item.img && screenLoading == false"
v-else-if="
item.img &&
screenLoading == false &&
targetDel == false
"
:src="'data:image/jpeg;base64,' + item.img"
/>
<img
v-if="screenLoading == true"
v-else-if="
screenLoading == true && targetDel == false
"
src="@/assets/img/zzjz/zwjz.gif"
/>
<div
v-else-if="!item.img && screenLoading == false"
v-else-if="
!item.img &&
screenLoading == false &&
targetDel == false
"
class="wtx"
>
<img src="@/assets/img/TT/zwtp.png" />
......@@ -475,27 +651,35 @@
<!-- 指纹详情 -->
<div class="detail" v-show="isShowDetail">
<div class="head-title">拇指</div>
<div class="head-title">{{ zwName }}</div>
<div class="finger">
<div v-if="souceDel == true" class="wtx">
<img src="@/assets/img/TT/tuxiangdel.png" />
<span class="cccccc">图像已删除</span>
</div>
<img
v-if="sourceImgdetail"
v-else-if="sourceImgdetail && souceDel == false"
:src="'data:image/jpeg;base64,' + sourceImgdetail"
style="width: 100%; height: 100%"
/>
<div v-else class="wtx">
<div v-else-if="!sourceImgdetail && souceDel == false" class="wtx">
<img src="@/assets/img/TT/zwtp.png" />
<span>暂无图像</span>
<span class="cccccc">暂无图像</span>
</div>
</div>
<div class="finger">
<div v-if="targetDel == true" class="wtx">
<img src="@/assets/img/TT/tuxiangdel.png" />
<span class="cccccc">图像已删除</span>
</div>
<img
v-if="destImgdetail"
v-else-if="destImgdetail && targetDel == false"
:src="'data:image/jpeg;base64,' + destImgdetail"
style="width: 100%; height: 100%"
/>
<div v-else class="wtx">
<div v-else-if="!destImgdetail && targetDel == false" class="wtx">
<img src="@/assets/img/TT/zwtp.png" />
<span>暂无图像</span>
<span class="cccccc">暂无图像</span>
</div>
</div>
</div>
......@@ -627,6 +811,10 @@ export default {
return {
width1: 50,
height: 150,
souceDel: false,
souceDelText: "",
targetDel: false,
targetDelText: "",
swiperOption: {
//swiper3
direction: "vertical",
......@@ -761,6 +949,7 @@ export default {
btnPlace: "top",
userName: "",
dateTime: "",
zwName: "",
};
},
created() {
......@@ -837,11 +1026,12 @@ export default {
this.sourcebarcode = this.sourcedatas[i - 1].barcode;
this.fingerLoading = true;
if (this.sourcedatas[i - 1].removeFlag == "1") {
this.$message.error(
`该条信息已经删除,删除时间为${this.$moment(
this.sourcedatas[i - 1].removeTime
).format("LLL")}`
);
this.souceDel = true;
this.souceDelText = this.$moment(
this.sourcedatas[i - 1].removeTime
).format("LLL");
} else {
this.souceDel = false;
}
// 指纹图清空
this.clearsource();
......@@ -864,12 +1054,14 @@ export default {
this.currentQqid = this.sourcedatas[i + 1].qqid;
this.sourcebarcode = this.sourcedatas[i + 1].barcode;
if (this.sourcedatas[i + 1].removeFlag == "1") {
this.$message.error(
`该条信息已经删除,删除时间为${this.$moment(
this.sourcedatas[i + 1].removeTime
).format("LLL")}`
);
this.souceDel = true;
this.souceDelText = this.$moment(
this.sourcedatas[i + 1].removeTime
).format("LLL");
} else {
this.souceDel = false;
}
this.fingerLoading = true;
// 指纹图清空
this.clearsource();
......@@ -906,11 +1098,12 @@ export default {
me.sourcebarcode = res.data.ret[0].barcode;
me.currentQqid = res.data.ret[0].qqid;
if (res.data.ret[0].removeFlag == "1") {
this.$message.error(
`该条信息已经删除,删除时间为${this.$moment(
res.data.ret[0].removeTime
).format("LLL")}`
);
this.souceDel = true;
this.souceDelText = this.$moment(
res.data.ret[0].removeFlag.removeTime
).format("LLL");
} else {
this.souceDel = false;
}
me.getMatchcandList(me.currentQqid);
......@@ -947,12 +1140,14 @@ export default {
me.sourcedatas = res.data.ret;
me.sourcedatasLength = res.data.ret.length;
me.sourcebarcode = res.data.ret[0].barcode;
console.log(222);
if (res.data.ret[0].removeFlag == "1") {
this.$message.error(
`该条信息已经删除,删除时间为${this.$moment(
res.data.ret[0].removeTime
).format("LLL")}`
);
this.souceDel = true;
this.souceDelText = this.$moment(
res.data.ret[0].removeFlag.removeTime
).format("LLL");
} else {
this.souceDel = false;
}
this.getSourceRollFingerPrintDetail(
res.data.ret[0].barcode,
......@@ -988,12 +1183,10 @@ export default {
me.loadingIndex--;
if (res.data.code === 0) {
me.tableData = res.data.ret;
me.$nextTick(() => {
me.$refs.singleTable.setCurrentRow(me.tableData[0]);
});
}
console.info(" 候选列表", res.data.ret);
});
}
},
......@@ -1162,6 +1355,12 @@ export default {
// 目标数据table的选中事件
handleCurrentChange(val) {
if (val) {
if (val.removeFlag == "1") {
this.targetDel = true;
this.targetDelText = this.$moment(val.removeTime).format("LLL");
} else {
this.targetDel = false;
}
this.destbarcode = val.destbarcode;
console.info("destbarcode", this.destbarcode);
this.$bus.emit("ccbarcode", this.destbarcode);
......@@ -1363,6 +1562,7 @@ export default {
console.info(name);
this.isShowDetail = true;
this.isShowbzDialogBg = true;
this.zwName = fingerData.name;
let sourceimg = "";
let destimg = "";
// 源 左手的滚动
......@@ -1597,10 +1797,16 @@ div {
display: inline-block;
margin-top: 20px;
font-size: 14px;
color: #cccccc;
color: #cccccc !important;
}
}
}
.cccccc {
font-size: 18px !important;
color: #cccccc !important;
display: inline-block;
margin-top: 10px;
}
.main {
width: 100%;
display: flex;
......@@ -1610,10 +1816,12 @@ div {
height: 200px;
padding: 0 25px 0 25px;
display: flex;
z-index: 333;
flex-direction: row;
justify-content: space-between;
align-items: center;
.source-data {
position: relative;
z-index: 500;
.source-top {
height: 25px;
......@@ -1642,7 +1850,6 @@ div {
.source-bottom {
width: 400px;
height: 120px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.06);
border-radius: 6px;
.source-count {
background: url("../../assets/img/TT/ttbg.png") no-repeat right top;
......@@ -1760,6 +1967,7 @@ div {
}
}
.dest-data /deep/ {
position: relative;
width: 340px;
height: 160px;
.current-row {
......@@ -1834,8 +2042,8 @@ div {
height: 320px;
padding-top: 3px;
.finger-img {
width: 300px;
height: 300px;
width: 280px;
height: 280px;
background: #ffffff;
border-radius: 8px;
border: 1px solid #cccccc;
......@@ -1920,6 +2128,7 @@ div {
.swiper-main {
width: 100%;
height: 750px;
padding-top: 30px;
position: relative;
}
.swiper-container {
......@@ -1948,23 +2157,28 @@ div {
}
.jiantou {
position: fixed;
width: 60px !important;
height: 60px !important;
width: 50px !important;
height: 50px !important;
background: #ffffff;
box-shadow: 0px 0px 5px 0px rgba(5, 95, 231, 0.4);
border-radius: 8px;
line-height: 60px;
border-radius: 50%;
text-align: center;
right: 30px;
right: 50px;
top: 50%;
transform: translateY(-50%);
transform: translateY(-40%);
cursor: pointer;
z-index: 888;
transition: all 1s;
transform: rotate(0deg);
> img {
height: 50px !important;
width: 50px !important;
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
height: 30px !important;
width: 30px !important;
cursor: pointer;
}
}
......
......@@ -123,8 +123,7 @@ export default {
// this.getCaptcha();
console.info(err);
});
//所在单位数据
this.$store.dispatch("publicData/_getList");
// "/myLoginForm?userName=" +
// userinfo.userName +
// "&passWord=" +
......
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-11-18 14:54:43
* @LastEditTime: 2021-11-24 18:33:09
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js
......@@ -92,7 +92,7 @@ module.exports = {
// 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.114:8099", // 湖南-马
// target: "http://192.168.128.116:8099", // 湖南-王
// target: "http://192.168.128.111:8099", // 湖南-张呈光
// target: "http://172.18.116.73:8099/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/ ma
......@@ -116,8 +116,8 @@ module.exports = {
}
},
"/system": {
// target: "http://192.168.128.104:8765", // 湖南-王
target: "http://www.meetfood.cn:2390/system", // 湖南-王
target: "http://192.168.128.106:8765/security", // 湖南-王
// target: "http://www.meetfood.cn:2390/system", // 湖南-王
ws: true,
changeOrigin: true,
pathRewrite: {
......
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