|
@@ -15,30 +15,15 @@
|
|
|
<!-- <div class="status1"><span class="icon"></span>存在互斥</div>
|
|
|
<div class="status2"><span class="icon"></span>不存在互斥</div> -->
|
|
|
</div>
|
|
|
- <Search
|
|
|
- @getSearchData="getSearchData"
|
|
|
- @clearSearchData="clearSearchData"
|
|
|
- :isTitle="false"
|
|
|
- :isSlot="true"
|
|
|
- >
|
|
|
+ <Search @getSearchData="getSearchData" @clearSearchData="clearSearchData" :isTitle="false" :isSlot="true">
|
|
|
<button @click="addRole" class="btnAdd">新增</button>
|
|
|
</Search>
|
|
|
</div>
|
|
|
<!--列表-->
|
|
|
<div class="role-content scrollbar infinite-list-wrapper">
|
|
|
<template v-if="arrs.length">
|
|
|
- <el-row
|
|
|
- v-infinite-scroll="load"
|
|
|
- :infinite-scroll-distance="20"
|
|
|
- infinite-scroll-disabled="disabled"
|
|
|
- :gutter="24"
|
|
|
- >
|
|
|
- <el-col
|
|
|
- v-for="(item, index) in arrs"
|
|
|
- class="account-left-content-teams"
|
|
|
- :lg="4"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
+ <el-row v-infinite-scroll="load" :infinite-scroll-distance="20" infinite-scroll-disabled="disabled" :gutter="24">
|
|
|
+ <el-col v-for="(item, index) in arrs" class="account-left-content-teams" :lg="4" :key="index">
|
|
|
<div class="team">
|
|
|
<!-- <div :class="'status'+ item.IsDef" class="bg"></div> -->
|
|
|
<div class="list">
|
|
@@ -51,10 +36,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="info-close">
|
|
|
- <i
|
|
|
- @click="checkRemove(item, index)"
|
|
|
- class="icon el-icon-close"
|
|
|
- ></i>
|
|
|
+ <i @click="checkRemove(item, index)" class="icon el-icon-close"></i>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="flex-wrap time">
|
|
@@ -92,16 +74,11 @@
|
|
|
<div class="airportInfoDialog">
|
|
|
<div class="title del-title">删除角色</div>
|
|
|
<div class="content del-content">
|
|
|
- <span class="el-icon-error error r10"></span>您是否确认删除<span
|
|
|
- class="error l10"
|
|
|
- >{{ title }}</span
|
|
|
- >
|
|
|
+ <span class="el-icon-error error r10"></span>您是否确认删除<span class="error l10">{{ title }}</span>
|
|
|
?
|
|
|
</div>
|
|
|
<div class="foot right Delfoot t30">
|
|
|
- <el-button size="medium" class="r24" @click="remove" type="danger"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ <el-button size="medium" class="r24" @click="remove" type="danger">删除</el-button>
|
|
|
<el-button size="medium" @click="flag = false">取消</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -111,42 +88,18 @@
|
|
|
<div class="airportInfoDialog dialog-public-background">
|
|
|
<div class="title">{{ editDialogTitle }}</div>
|
|
|
<div class="content">
|
|
|
- <el-form
|
|
|
- ref="ruleForm"
|
|
|
- :model="ruleForm"
|
|
|
- :rules="rules"
|
|
|
- label-width="130px"
|
|
|
- class="demo-ruleForm"
|
|
|
- >
|
|
|
+ <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="130px" class="demo-ruleForm">
|
|
|
<el-form-item label="角色名称" prop="role_name">
|
|
|
- <el-input
|
|
|
- v-model="ruleForm.role_name"
|
|
|
- size="medium"
|
|
|
- placeholder="请输入节点名称(必填)"
|
|
|
- />
|
|
|
+ <el-input v-model="ruleForm.role_name" size="medium" placeholder="请输入节点名称(必填)" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="角色描述" prop="role_comment">
|
|
|
- <el-input
|
|
|
- v-model="ruleForm.role_comment"
|
|
|
- size="medium"
|
|
|
- type="textarea"
|
|
|
- :rows="3"
|
|
|
- placeholder="请输入跟踪节点描述"
|
|
|
- />
|
|
|
+ <el-input v-model="ruleForm.role_comment" size="medium" type="textarea" :rows="3" placeholder="请输入跟踪节点描述" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="foot center t30">
|
|
|
- <el-button
|
|
|
- size="medium"
|
|
|
- type="primary"
|
|
|
- class="r25 r26"
|
|
|
- @click="submitClickHandler()"
|
|
|
- >提交</el-button
|
|
|
- >
|
|
|
- <el-button size="medium" class="r26" @click="resetForm('ruleForm')"
|
|
|
- >取消</el-button
|
|
|
- >
|
|
|
+ <el-button size="medium" type="primary" class="r25 r26" @click="submitClickHandler()">提交</el-button>
|
|
|
+ <el-button size="medium" class="r26" @click="resetForm('ruleForm')">取消</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</Dialog>
|
|
@@ -162,7 +115,7 @@ export default {
|
|
|
name: "AuthorityRole",
|
|
|
components: { Search, Dialog },
|
|
|
mixins: [roleData],
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
arrs: [], //卡片数据
|
|
|
arr: [],
|
|
@@ -194,7 +147,7 @@ export default {
|
|
|
needPage: 1,
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
if (this.$route.query.keyWords) {
|
|
|
keyWords = this.$route.query.keyWords;
|
|
|
this.keyWords = keyWords;
|
|
@@ -202,43 +155,43 @@ export default {
|
|
|
this.queryData();
|
|
|
},
|
|
|
computed: {
|
|
|
- noMore() {
|
|
|
+ noMore () {
|
|
|
return this.pageNum >= this.total;
|
|
|
},
|
|
|
- disabled() {
|
|
|
+ disabled () {
|
|
|
return this.loading || this.noMore;
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- queryData() {
|
|
|
+ queryData () {
|
|
|
let data = {
|
|
|
- id: 41,
|
|
|
+ id: DATACONTENT_ID.roleTableId,
|
|
|
dataContent: [this.keyWords],
|
|
|
needPage: this.needPage,
|
|
|
};
|
|
|
this.gueryRole(data);
|
|
|
},
|
|
|
//删除
|
|
|
- checkRemove(item, index) {
|
|
|
+ checkRemove (item, index) {
|
|
|
this.flag = true;
|
|
|
this.index = item;
|
|
|
this.title = item.role_name;
|
|
|
this.num = index;
|
|
|
},
|
|
|
//确认删除
|
|
|
- remove() {
|
|
|
+ remove () {
|
|
|
this.index.event = 3;
|
|
|
this.editRoles(this.index);
|
|
|
},
|
|
|
//角色新增
|
|
|
- addRole() {
|
|
|
+ addRole () {
|
|
|
this.editDialogTitle = "新增角色";
|
|
|
this.editDialogVisible = true;
|
|
|
this.editType = "add";
|
|
|
// this.$router.push('/role/addRole')
|
|
|
},
|
|
|
//角色编辑
|
|
|
- editRole(item) {
|
|
|
+ editRole (item) {
|
|
|
this.editDialogVisible = true;
|
|
|
this.editType = "edit";
|
|
|
this.editDialogTitle = "编辑角色";
|
|
@@ -246,10 +199,10 @@ export default {
|
|
|
this.ruleForm = JSON.parse(JSON.stringify(item));
|
|
|
},
|
|
|
//新增角色
|
|
|
- async editRoles(params) {
|
|
|
+ async editRoles (params) {
|
|
|
try {
|
|
|
const res = await GeneralDataReception({
|
|
|
- serviceId: 14,
|
|
|
+ serviceId: SERVICE_ID.roleMsgId,
|
|
|
dataContent: JSON.stringify(params),
|
|
|
});
|
|
|
if (res.code === "0") {
|
|
@@ -267,28 +220,28 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 角色授权
|
|
|
- authRole(item) {
|
|
|
+ authRole (item) {
|
|
|
this.$router.push({
|
|
|
path: "/role/editRole",
|
|
|
query: { RoleId: item.role_id },
|
|
|
});
|
|
|
},
|
|
|
//查询
|
|
|
- getSearchData(val) {
|
|
|
+ getSearchData (val) {
|
|
|
this.arrs = [];
|
|
|
this.needPage = 1;
|
|
|
this.keyWords = val;
|
|
|
this.queryData()
|
|
|
},
|
|
|
//清除查询
|
|
|
- clearSearchData() {
|
|
|
+ clearSearchData () {
|
|
|
this.arrs = [];
|
|
|
this.needPage = 1;
|
|
|
this.keyWords = "";
|
|
|
this.queryData()
|
|
|
},
|
|
|
// 新增/编辑-确认
|
|
|
- submitClickHandler() {
|
|
|
+ submitClickHandler () {
|
|
|
this.$refs["ruleForm"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.editType == "add") {
|
|
@@ -305,13 +258,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 重置
|
|
|
- resetForm(formName) {
|
|
|
+ resetForm (formName) {
|
|
|
this.ruleForm = [];
|
|
|
this.$refs[formName].resetFields();
|
|
|
this.editDialogVisible = false;
|
|
|
},
|
|
|
//滚动加载数据
|
|
|
- load() {
|
|
|
+ load () {
|
|
|
this.needPage = this.needPage + 1
|
|
|
this.queryData()
|
|
|
},
|