|
@@ -11,25 +11,29 @@
|
|
|
<el-button class="btnAdd" @click="addAccount">新增</el-button>
|
|
|
</Search>
|
|
|
</div>
|
|
|
- <div class="content-box scrollbar">
|
|
|
- <template v-if="accountArr.length">
|
|
|
- <el-row v-infinite-scroll="load" :infinite-scroll-disabled="disabled" :infinite-scroll-distance="20" :gutter="24">
|
|
|
- <el-col v-for="(account,index) in accountArr" :key="index" :xs="24" :sm="12" :md="8" :lg="4" class="account-box">
|
|
|
- <div class="account-box-wrap">
|
|
|
- <div :class="account.user_status == 1 ? 'headOnline' : account.user_status == 2 ? 'headOffline' : 'headDisabled'" />
|
|
|
- <div>
|
|
|
- <div class="nameBox flex">
|
|
|
- <div class="flex-wrap">
|
|
|
- <div class="name">{{ account.user_name }}</div>
|
|
|
- <div class="loger" @click="toEdit(account.user_id)" />
|
|
|
- <div @click="authAccount(account)" class="loger cap-auth"></div>
|
|
|
- </div>
|
|
|
- <div class="del" @click="deleteUser(account)">
|
|
|
- <i class="el-icon-close" />
|
|
|
+ <div class="flex-wrap">
|
|
|
+ <div class="content-group">
|
|
|
+ <el-tree ref="tree" class="groupTree" highlight-current default-expand-all node-key="user_group_id" :data="groupData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
|
+ </div>
|
|
|
+ <div class="content-box scrollbar">
|
|
|
+ <template v-if="accountArr.length">
|
|
|
+ <el-row v-infinite-scroll="load" :infinite-scroll-disabled="disabled" :infinite-scroll-distance="20" :gutter="24">
|
|
|
+ <el-col v-for="(account, index) in accountArr" :key="index" :xs="24" :sm="12" :md="8" :lg="6" class="account-box">
|
|
|
+ <div class="account-box-wrap">
|
|
|
+ <div :class="account.user_status == 1 ? 'headOnline' : account.user_status == 2 ? 'headOffline' : 'headDisabled'" />
|
|
|
+ <div>
|
|
|
+ <div class="nameBox flex">
|
|
|
+ <div class="flex-wrap">
|
|
|
+ <div class="name">{{ account.user_name }}</div>
|
|
|
+ <div class="loger" @click="toEdit(account.user_id)" />
|
|
|
+ <div @click="authAccount(account)" class="loger cap-auth"></div>
|
|
|
+ </div>
|
|
|
+ <div class="del" @click="deleteUser(account)">
|
|
|
+ <i class="el-icon-close" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <!-- <el-row>
|
|
|
+ <!-- <el-row>
|
|
|
<el-col :span="24">{{ account.group }}</el-col>
|
|
|
</el-row>
|
|
|
|
|
@@ -37,35 +41,41 @@
|
|
|
<el-col :span="12">登录次数:<span>{{ account.LoginCount }}</span></el-col>
|
|
|
<el-col :span="12" class="flexLeft">异常登录:<span>{{ account.ExceptionCount }}</span></el-col>
|
|
|
</el-row> -->
|
|
|
- <el-row class="content">
|
|
|
- <el-col :span="24">权限项数:<span>{{ account.AuthCount }}</span></el-col>
|
|
|
- </el-row>
|
|
|
- <el-row class="content">
|
|
|
- <el-col :span="12">
|
|
|
- 状态:<span v-if="account.user_status == 1 || account.user_status == 2" class="used">启用</span>
|
|
|
- <span v-else class="unUsed">停用</span>
|
|
|
- </el-col>
|
|
|
- <el-col v-is="['userlist_btn_status_change','admin']" :span="12" class="flexLeft">
|
|
|
- <el-switch v-model="account.Flag" :active-value="true" :inactive-value="false" active-color="#2D67E3" inactive-color="#CFD6E2" @change="userActiveToggle(account)" />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <el-row class="content">
|
|
|
+ <el-col :span="24"
|
|
|
+ >权限项数:<span>{{ account.AuthCount }}</span></el-col
|
|
|
+ >
|
|
|
+ </el-row>
|
|
|
+ <el-row class="content">
|
|
|
+ <el-col :span="12">
|
|
|
+ 状态:<span v-if="account.user_status == 1 || account.user_status == 2" class="used">启用</span>
|
|
|
+ <span v-else class="unUsed">停用</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col v-is="['userlist_btn_status_change', 'admin']" :span="12" class="flexLeft">
|
|
|
+ <el-switch v-model="account.Flag" :active-value="true" :inactive-value="false" active-color="#2D67E3" inactive-color="#CFD6E2" @change="userActiveToggle(account)" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <template v-if="pages > 1">
|
|
|
- <p v-if="loading" class="center">加载中...</p>
|
|
|
- <p v-if="noMore" class="center">没有更多数据了~</p>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <template v-if="pages > 1">
|
|
|
+ <p v-if="loading" class="center">加载中...</p>
|
|
|
+ <p v-if="noMore" class="center">没有更多数据了~</p>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <NoData />
|
|
|
</template>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <NoData />
|
|
|
- </template>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<Dialog :flag="dialogVisible">
|
|
|
<div class="del-dialog">
|
|
|
<div class="title del-title">删除账号</div>
|
|
|
- <div class="content del-content"><i class="el-icon-error error r10" />你确定要删除<span class="error l10">{{ deleteUserName }}</span>?</div>
|
|
|
+ <div class="content del-content">
|
|
|
+ <i class="el-icon-error error r10" />你确定要删除<span class="error l10">{{ deleteUserName }}</span
|
|
|
+ >?
|
|
|
+ </div>
|
|
|
<div class="foot Delfoot right t30">
|
|
|
<el-button size="medium" type="danger" class="r24" @click="del()">删除</el-button>
|
|
|
|
|
@@ -109,36 +119,36 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Search from '@/layout/components/Search'
|
|
|
-import Dialog from '@/layout/components/Dialog'
|
|
|
-import NoData from '@/components/nodata'
|
|
|
-import { GetAccountList, ChangeUserStatus, delAccount, getAccountDetails, editAccount, addAccount } from '@/api/Account'
|
|
|
-import { pwdProduce } from '@/utils/validate'
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
-import { GeneralDataReception, Query } from '@/api/dataIntegration'
|
|
|
-import MD5 from 'blueimp-md5'
|
|
|
+import Search from "@/layout/components/Search";
|
|
|
+import Dialog from "@/layout/components/Dialog";
|
|
|
+import NoData from "@/components/nodata";
|
|
|
+import { GetAccountList, ChangeUserStatus, delAccount, getAccountDetails, editAccount, addAccount } from "@/api/Account";
|
|
|
+import { pwdProduce, translateDataToTreeAll } from "@/utils/validate";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import { GeneralDataReception, Query } from "@/api/dataIntegration";
|
|
|
+import MD5 from "blueimp-md5";
|
|
|
export default {
|
|
|
components: { Search, Dialog, NoData },
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
- pwdStruc: '',
|
|
|
+ pwdStruc: "",
|
|
|
pwdLengthBegin: 0,
|
|
|
pwdLengthEnd: 0,
|
|
|
dialogVisible: false,
|
|
|
accountArr: [],
|
|
|
- deleteUserId: '',
|
|
|
- deleteUserName: '',
|
|
|
- userId: '',
|
|
|
- GroupId: '',
|
|
|
- GroupUpid: '',
|
|
|
- searchInfo: '', // 搜索内容
|
|
|
+ deleteUserId: "",
|
|
|
+ deleteUserName: "",
|
|
|
+ userId: "",
|
|
|
+ GroupId: "",
|
|
|
+ GroupUpid: "",
|
|
|
+ searchInfo: "", // 搜索内容
|
|
|
PageIndex: 1,
|
|
|
PageSize: 20,
|
|
|
pages: null,
|
|
|
loading: false,
|
|
|
editDialogVisible: false,
|
|
|
- editDialogTitle: '新增账号',
|
|
|
- editType: 'add',
|
|
|
+ editDialogTitle: "新增账号",
|
|
|
+ editType: "add",
|
|
|
ruleForm: {
|
|
|
// 协议信息表单
|
|
|
user_name: "",
|
|
@@ -148,31 +158,34 @@ export default {
|
|
|
},
|
|
|
rules: {
|
|
|
// 协议信息表单验证
|
|
|
- user_name: [
|
|
|
- { required: true, message: "请输入账号名称", trigger: "blur" },
|
|
|
- ],
|
|
|
+ user_name: [{ required: true, message: "请输入账号名称", trigger: "blur" }],
|
|
|
},
|
|
|
ruleFormObj: {},
|
|
|
- roleId: '',
|
|
|
+ roleId: "",
|
|
|
msgIndex: null,
|
|
|
- oldPwd: ''
|
|
|
- }
|
|
|
+ oldPwd: "",
|
|
|
+ groupData: [],
|
|
|
+ defaultProps: {
|
|
|
+ children: "children",
|
|
|
+ label: "user_group_name",
|
|
|
+ },
|
|
|
+ };
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['systemSet']),
|
|
|
- noMore () {
|
|
|
- return this.PageIndex >= this.pages
|
|
|
+ ...mapGetters(["systemSet"]),
|
|
|
+ noMore() {
|
|
|
+ return this.PageIndex >= this.pages;
|
|
|
+ },
|
|
|
+ disabled() {
|
|
|
+ return this.loading || this.noMore;
|
|
|
},
|
|
|
- disabled () {
|
|
|
- return this.loading || this.noMore
|
|
|
- }
|
|
|
},
|
|
|
watch: {
|
|
|
- searchInfo (val) {
|
|
|
- val.length === 0 && this.pageInit()
|
|
|
- }
|
|
|
+ searchInfo(val) {
|
|
|
+ val.length === 0 && this.pageInit();
|
|
|
+ },
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
// 获取系统配置
|
|
|
// if (this.systemSet) {
|
|
|
// let obj
|
|
@@ -188,215 +201,261 @@ export default {
|
|
|
// this.pwdLengthEnd = PwdLengthEnd
|
|
|
// }
|
|
|
if (!this.searchInfo) {
|
|
|
- this.accountList()
|
|
|
+ this.accountList();
|
|
|
} else {
|
|
|
- console.log(this.searchInfo)
|
|
|
- this.accountList()
|
|
|
+ this.accountList();
|
|
|
}
|
|
|
+ this.getGroup();
|
|
|
},
|
|
|
methods: {
|
|
|
// 随机生成密码
|
|
|
- resetPwd () {
|
|
|
- this.ruleForm.PassWord = pwdProduce(this.pwdLengthBegin, this.pwdLengthEnd, this.pwdStruc)
|
|
|
+ resetPwd() {
|
|
|
+ this.ruleForm.PassWord = pwdProduce(this.pwdLengthBegin, this.pwdLengthEnd, this.pwdStruc);
|
|
|
+ },
|
|
|
+ //获取用户组
|
|
|
+ async getGroup() {
|
|
|
+ const res = await Query({
|
|
|
+ id: DATACONTENT_ID.accountGroupTableId,
|
|
|
+ dataContent: [""],
|
|
|
+ });
|
|
|
+ if (res.code == 0) {
|
|
|
+ const { listValues } = res.returnData;
|
|
|
+ if (listValues && listValues.length) {
|
|
|
+ const dataObj = {
|
|
|
+ user_group_id: -1,
|
|
|
+ up_user_group_id: -2,
|
|
|
+ user_group_name: "全部用户组",
|
|
|
+ children: translateDataToTreeAll(listValues, "up_user_group_id", "user_group_id"),
|
|
|
+ };
|
|
|
+ this.groupData.push(dataObj);
|
|
|
+ } else {
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //用户组点击
|
|
|
+ handleNodeClick(data) {
|
|
|
+ if (data.user_group_id != -1 && data.up_user_group_id != -2) {
|
|
|
+ this.getAccountData(data.user_group_id);
|
|
|
+ } else {
|
|
|
+ this.clearSearchData();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getAccountData(id) {
|
|
|
+ const res = await Query({
|
|
|
+ id: DATACONTENT_ID.accountGroupDetailsId,
|
|
|
+ dataContent: [id],
|
|
|
+ });
|
|
|
+ if (res.code == 0) {
|
|
|
+ const { listValues } = res.returnData;
|
|
|
+ listValues.forEach((element) => {
|
|
|
+ element.Flag = element.user_status == 1 || element.user_status == 2 ? true : false;
|
|
|
+ });
|
|
|
+ this.accountArr = _.unionBy(listValues, "user_id");
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
},
|
|
|
// 编辑账号
|
|
|
- async saveEditAccount () {
|
|
|
+ async saveEditAccount() {
|
|
|
try {
|
|
|
if (this.oldPwd !== this.ruleForm.user_pwd) {
|
|
|
- this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd)
|
|
|
+ this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd);
|
|
|
}
|
|
|
const res = await GeneralDataReception({
|
|
|
serviceId: SERVICE_ID.accountScId,
|
|
|
- dataContent: JSON.stringify(this.ruleForm)
|
|
|
- })
|
|
|
+ dataContent: JSON.stringify(this.ruleForm),
|
|
|
+ });
|
|
|
if (res.code == 0) {
|
|
|
- this.$message.success(res.message)
|
|
|
- this.resetForm('ruleForm')
|
|
|
- this.pageInit()
|
|
|
+ this.$message.success(res.message);
|
|
|
+ this.resetForm("ruleForm");
|
|
|
+ this.pageInit();
|
|
|
} else {
|
|
|
- this.$message.error(res.message)
|
|
|
+ this.$message.error(res.message);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.log('出错了', error.message || error)
|
|
|
+ console.log("出错了", error.message || error);
|
|
|
}
|
|
|
},
|
|
|
// 新增账号
|
|
|
- async saveAddAccount () {
|
|
|
+ async saveAddAccount() {
|
|
|
try {
|
|
|
- this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd)
|
|
|
+ this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd);
|
|
|
const res = await GeneralDataReception({
|
|
|
serviceId: SERVICE_ID.accountScId,
|
|
|
- dataContent: JSON.stringify(this.ruleForm)
|
|
|
- })
|
|
|
+ dataContent: JSON.stringify(this.ruleForm),
|
|
|
+ });
|
|
|
if (res.code == 0) {
|
|
|
- this.$message.success(res.message)
|
|
|
- this.resetForm('ruleForm')
|
|
|
- this.pageInit()
|
|
|
+ this.$message.success(res.message);
|
|
|
+ this.resetForm("ruleForm");
|
|
|
+ this.pageInit();
|
|
|
} else {
|
|
|
- this.$message.error(res.message)
|
|
|
+ this.$message.error(res.message);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.log('出错了', error.message || error)
|
|
|
+ console.log("出错了", error.message || error);
|
|
|
}
|
|
|
},
|
|
|
// 获取当前账号信息
|
|
|
- async getAccountInfo () {
|
|
|
+ async getAccountInfo() {
|
|
|
const res = await Query({
|
|
|
id: DATACONTENT_ID.accountDetailsId,
|
|
|
- dataContent: [this.roleId]
|
|
|
- })
|
|
|
+ dataContent: [this.roleId],
|
|
|
+ });
|
|
|
if (res.code == 0) {
|
|
|
- const { listValues } = res.returnData
|
|
|
- const obj = listValues[0]
|
|
|
- this.ruleForm = obj
|
|
|
- this.oldPwd = obj.user_pwd
|
|
|
- this.ruleForm.event = 2
|
|
|
+ const { listValues } = res.returnData;
|
|
|
+ const obj = listValues[0];
|
|
|
+ this.ruleForm = obj;
|
|
|
+ this.oldPwd = obj.user_pwd;
|
|
|
+ this.ruleForm.event = 2;
|
|
|
} else {
|
|
|
- this.$message.error(res.message)
|
|
|
+ this.$message.error(res.message);
|
|
|
}
|
|
|
},
|
|
|
// 新增/编辑-确认
|
|
|
- submitClickHandler () {
|
|
|
+ submitClickHandler() {
|
|
|
this.$refs["ruleForm"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- if (this.editType == 'add') {
|
|
|
- this.saveAddAccount()
|
|
|
+ if (this.editType == "add") {
|
|
|
+ this.saveAddAccount();
|
|
|
} else {
|
|
|
- this.saveEditAccount()
|
|
|
+ this.saveEditAccount();
|
|
|
}
|
|
|
- this.editDialogVisible = false
|
|
|
+ this.editDialogVisible = false;
|
|
|
} else {
|
|
|
- return false
|
|
|
+ return false;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
// 滚动加载
|
|
|
- load () {
|
|
|
- this.PageIndex += 1
|
|
|
- this.accountList()
|
|
|
+ load() {
|
|
|
+ this.PageIndex += 1;
|
|
|
+ this.accountList();
|
|
|
},
|
|
|
// 回到第一页
|
|
|
- pageInit () {
|
|
|
- this.PageIndex = 1
|
|
|
- this.accountArr = []
|
|
|
- this.accountList()
|
|
|
+ pageInit() {
|
|
|
+ this.PageIndex = 1;
|
|
|
+ this.accountArr = [];
|
|
|
+ this.accountList();
|
|
|
},
|
|
|
// 查询
|
|
|
- getSearchData (val) {
|
|
|
- this.searchInfo = val
|
|
|
- this.pageInit()
|
|
|
+ getSearchData(val) {
|
|
|
+ this.searchInfo = val;
|
|
|
+ this.pageInit();
|
|
|
},
|
|
|
|
|
|
// 清除查询
|
|
|
- clearSearchData () {
|
|
|
- this.searchInfo = ''
|
|
|
- this.pageInit()
|
|
|
+ clearSearchData() {
|
|
|
+ this.searchInfo = "";
|
|
|
+ this.pageInit();
|
|
|
},
|
|
|
// 修改状态
|
|
|
- async userActiveToggle (item) {
|
|
|
- item.event = 2
|
|
|
- item.user_status = item.Flag ? 2 : 0
|
|
|
+ async userActiveToggle(item) {
|
|
|
+ item.event = 2;
|
|
|
+ item.user_status = item.Flag ? 2 : 0;
|
|
|
try {
|
|
|
const result = await GeneralDataReception({
|
|
|
serviceId: SERVICE_ID.accountScId,
|
|
|
- dataContent: JSON.stringify(item)
|
|
|
- })
|
|
|
+ dataContent: JSON.stringify(item),
|
|
|
+ });
|
|
|
if (result.code == 0) {
|
|
|
- this.pageInit()
|
|
|
- this.$message.success(result.message)
|
|
|
+ this.pageInit();
|
|
|
+ this.$message.success(result.message);
|
|
|
} else {
|
|
|
- this.$message.error(result.$message)
|
|
|
+ this.$message.error(result.$message);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.log('出错了', error.message || error)
|
|
|
+ console.log("出错了", error.message || error);
|
|
|
}
|
|
|
},
|
|
|
- deleteUser (user) {
|
|
|
- this.dialogVisible = true
|
|
|
- this.deleteUserName = user.UName
|
|
|
- this.ruleFormObj = user
|
|
|
+ deleteUser(user) {
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.deleteUserName = user.UName;
|
|
|
+ this.ruleFormObj = user;
|
|
|
},
|
|
|
- toEdit (userId) {
|
|
|
- this.editDialogVisible = true
|
|
|
- this.editType = 'edit'
|
|
|
- this.editDialogTitle = '编辑账号'
|
|
|
- this.roleId = userId
|
|
|
- this.getAccountInfo()
|
|
|
+ toEdit(userId) {
|
|
|
+ this.editDialogVisible = true;
|
|
|
+ this.editType = "edit";
|
|
|
+ this.editDialogTitle = "编辑账号";
|
|
|
+ this.roleId = userId;
|
|
|
+ this.getAccountInfo();
|
|
|
},
|
|
|
- addAccount () {
|
|
|
- this.editDialogTitle = '新增账号'
|
|
|
- this.editDialogVisible = true
|
|
|
- this.editType = 'add'
|
|
|
- this.ruleForm = {}
|
|
|
- this.ruleForm.event = 1
|
|
|
+ addAccount() {
|
|
|
+ this.editDialogTitle = "新增账号";
|
|
|
+ this.editDialogVisible = true;
|
|
|
+ this.editType = "add";
|
|
|
+ this.ruleForm = {};
|
|
|
+ this.ruleForm.event = 1;
|
|
|
// this.$router.push({
|
|
|
// path: '/account/accountAdd'
|
|
|
// })
|
|
|
},
|
|
|
// 重置
|
|
|
- resetForm (formName) {
|
|
|
- this.$refs[formName].resetFields()
|
|
|
- this.editDialogVisible = false
|
|
|
+ resetForm(formName) {
|
|
|
+ this.$refs[formName].resetFields();
|
|
|
+ this.editDialogVisible = false;
|
|
|
},
|
|
|
// 获取列表
|
|
|
- async accountList () {
|
|
|
+ async accountList() {
|
|
|
try {
|
|
|
- this.loading = true
|
|
|
+ this.loading = true;
|
|
|
const result = await Query({
|
|
|
id: DATACONTENT_ID.accountTableId,
|
|
|
needPage: this.PageIndex,
|
|
|
- dataContent: [this.searchInfo]
|
|
|
- })
|
|
|
+ dataContent: [this.searchInfo],
|
|
|
+ });
|
|
|
if (result.code == 0) {
|
|
|
- this.loading = false
|
|
|
- const newDatas = result.returnData.listValues
|
|
|
+ this.loading = false;
|
|
|
+ const newDatas = result.returnData.listValues;
|
|
|
if (newDatas && newDatas.length) {
|
|
|
- this.pages = result.returnData.pages
|
|
|
- newDatas.forEach(element => {
|
|
|
- element.Flag = element.user_status == 1 || element.user_status == 2 ? true : false
|
|
|
- this.accountArr.push(element)
|
|
|
- })
|
|
|
- this.msgIndex = this.PageIndex
|
|
|
+ this.pages = result.returnData.pages;
|
|
|
+ newDatas.forEach((element) => {
|
|
|
+ element.Flag = element.user_status == 1 || element.user_status == 2 ? true : false;
|
|
|
+ this.accountArr.push(element);
|
|
|
+ });
|
|
|
+ this.accountArr = _.unionBy(this.accountArr, "user_id");
|
|
|
+ this.msgIndex = this.PageIndex;
|
|
|
} else {
|
|
|
- this.pages = this.msgIndex
|
|
|
- this.PageIndex = this.msgIndex
|
|
|
+ this.pages = this.msgIndex;
|
|
|
+ this.PageIndex = this.msgIndex;
|
|
|
}
|
|
|
} else {
|
|
|
- this.$message.error(result.message)
|
|
|
+ this.$message.error(result.message);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.log('出错了', error.message || error)
|
|
|
+ console.log("出错了", error.message || error);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 删除接口
|
|
|
- async del () {
|
|
|
- this.ruleFormObj.event = 3
|
|
|
+ async del() {
|
|
|
+ this.ruleFormObj.event = 3;
|
|
|
const result = await GeneralDataReception({
|
|
|
serviceId: SERVICE_ID.accountScId,
|
|
|
- dataContent: JSON.stringify(this.ruleFormObj)
|
|
|
- })
|
|
|
+ dataContent: JSON.stringify(this.ruleFormObj),
|
|
|
+ });
|
|
|
if (result.code == 0) {
|
|
|
- this.dialogVisible = false
|
|
|
- this.$message.success(result.message)
|
|
|
- this.pageInit()
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.$message.success(result.message);
|
|
|
+ this.pageInit();
|
|
|
} else if (result.code == -1) {
|
|
|
- this.$message.error('后端错误,稍后请重试')
|
|
|
+ this.$message.error("后端错误,稍后请重试");
|
|
|
} else {
|
|
|
- this.$message.success(result.message)
|
|
|
+ this.$message.success(result.message);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 账号权限
|
|
|
- authAccount (item) {
|
|
|
- this.roleId = item.user_id
|
|
|
+ authAccount(item) {
|
|
|
+ this.roleId = item.user_id;
|
|
|
this.$router.push({
|
|
|
- path: '/account/accountAuth',
|
|
|
- query: { userId: this.roleId }
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ path: "/account/accountAuth",
|
|
|
+ query: { userId: this.roleId },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -449,6 +508,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.content-box {
|
|
|
+ flex: 1;
|
|
|
height: calc(100vh - 256px);
|
|
|
overflow-y: auto;
|
|
|
overflow-x: hidden;
|
|
@@ -530,8 +590,7 @@ export default {
|
|
|
width: 14px;
|
|
|
height: 14px;
|
|
|
margin-left: 24px;
|
|
|
- background: url("../../../assets/status/ic_edit_default.png")
|
|
|
- no-repeat;
|
|
|
+ background: url("../../../assets/status/ic_edit_default.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
cursor: pointer;
|
|
|
}
|
|
@@ -564,6 +623,19 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .content-group {
|
|
|
+ width: 488px;
|
|
|
+ background: #ffffff;
|
|
|
+ box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-right: 24px;
|
|
|
+ padding: 24px;
|
|
|
+ ::v-deep .groupTree {
|
|
|
+ .el-tree-node__children {
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.del-dialog {
|
|
|
.del-content {
|
|
|
font-size: 16px;
|
|
@@ -583,4 +655,4 @@ export default {
|
|
|
color: #101611;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|