zhaoke 2 éve
szülő
commit
d749cccd75

+ 6 - 6
src/router/routes/routes-file-four.js

@@ -30,7 +30,7 @@ const authorityRoutes = {
           path: "/",
           name: "AuthorityHome",
           component: {
-            render(c) {
+            render (c) {
               return c("router-view");
             },
           },
@@ -94,7 +94,7 @@ const roleRoutes = {
           path: "/",
           name: "AuthorityRoleHome",
           component: {
-            render(c) {
+            render (c) {
               return c("router-view");
             },
           },
@@ -116,7 +116,7 @@ const roleRoutes = {
               path: "editRole",
               name: "AuthorityRoleEdit",
               component: () => import("@/views/authorityManagement/components/authorityRoleEdit"),
-              meta: { title: "账号权", keepAlive: false },
+              meta: { title: "账号权", keepAlive: false },
             },
           ],
         },
@@ -147,7 +147,7 @@ const accountRoutes = {
           path: "/",
           name: "accountHome",
           component: {
-            render(c) {
+            render (c) {
               return c("router-view");
             },
           },
@@ -189,7 +189,7 @@ const accountRoutes = {
               name: "accountAuth",
               component: () => import("@/views/accountManagement/components/accountAuth"),
               meta: {
-                title: "账号权",
+                title: "账号权",
                 keepAlive: false,
               },
             },
@@ -221,7 +221,7 @@ const accountGroupRoutes = {
           path: "/",
           name: "accountgroupHome",
           component: {
-            render(c) {
+            render (c) {
               return c("router-view");
             },
           },

+ 26 - 28
src/views/accountGroupManagement/components/accountHome.vue

@@ -34,9 +34,7 @@
                   <el-col :span="12" class="flexLeft">异常登录:<span>{{ account.ExceptionCount }}</span></el-col>
                 </el-row> -->
                 <el-row class="content">
-                  <el-col :span="24"
-                    >账号数:<span>{{ account.user_count }}</span></el-col
-                  >
+                  <el-col :span="24">账号数:<span>{{ account.user_count }}</span></el-col>
                 </el-row>
               </div>
             </div>
@@ -55,8 +53,7 @@
       <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
-          >?
+          <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>
@@ -100,7 +97,7 @@ import { GeneralDataReception, Query } from "@/api/dataIntegration";
 import MD5 from "blueimp-md5";
 export default {
   components: { Search, Dialog, NoData },
-  data() {
+  data () {
     return {
       pwdStruc: "",
       pwdLengthBegin: 0,
@@ -137,19 +134,19 @@ export default {
   },
   computed: {
     ...mapGetters(["systemSet"]),
-    noMore() {
+    noMore () {
       return this.PageIndex >= this.pages;
     },
-    disabled() {
+    disabled () {
       return this.loading || this.noMore;
     },
   },
   watch: {
-    searchInfo(val) {
+    searchInfo (val) {
       val.length === 0 && this.pageInit();
     },
   },
-  created() {
+  created () {
     // 获取系统配置
     // if (this.systemSet) {
     //   let obj
@@ -172,11 +169,11 @@ export default {
   },
   methods: {
     // 随机生成密码
-    resetPwd() {
+    resetPwd () {
       this.ruleForm.PassWord = pwdProduce(this.pwdLengthBegin, this.pwdLengthEnd, this.pwdStruc);
     },
     // 编辑账号
-    async saveEditAccount() {
+    async saveEditAccount () {
       try {
         const res = await GeneralDataReception({
           serviceId: SERVICE_ID.accountGroupScId,
@@ -194,7 +191,7 @@ export default {
       }
     },
     // 新增账号
-    async saveAddAccount() {
+    async saveAddAccount () {
       try {
         const res = await GeneralDataReception({
           serviceId: SERVICE_ID.accountGroupScId,
@@ -212,7 +209,7 @@ export default {
       }
     },
     // 获取当前账号信息
-    async getAccountInfo() {
+    async getAccountInfo () {
       const res = await Query({
         id: DATACONTENT_ID.accountDetailsId,
         dataContent: [this.roleId],
@@ -228,7 +225,7 @@ export default {
       }
     },
     // 新增/编辑-确认
-    submitClickHandler() {
+    submitClickHandler () {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           if (this.editType == "add") {
@@ -243,29 +240,29 @@ export default {
       });
     },
     // 滚动加载
-    load() {
+    load () {
       this.PageIndex += 1;
       this.accountList();
     },
     // 回到第一页
-    pageInit() {
+    pageInit () {
       this.PageIndex = 1;
       this.accountArr = [];
       this.accountList();
     },
     // 查询
-    getSearchData(val) {
+    getSearchData (val) {
       this.searchInfo = val;
       this.pageInit();
     },
 
     // 清除查询
-    clearSearchData() {
+    clearSearchData () {
       this.searchInfo = "";
       this.pageInit();
     },
     // 修改状态
-    async userActiveToggle(item) {
+    async userActiveToggle (item) {
       item.event = 2;
       try {
         const result = await GeneralDataReception({
@@ -282,18 +279,18 @@ export default {
         console.log("出错了", error.message || error);
       }
     },
-    deleteUser(user) {
+    deleteUser (user) {
       this.dialogVisible = true;
       this.deleteUserName = user.user_group_name;
       this.ruleFormObj = user;
     },
-    toEdit(item) {
+    toEdit (item) {
       this.editDialogVisible = true;
       this.editType = "edit";
       this.editDialogTitle = "编辑账号组";
       this.ruleForm = item;
     },
-    addAccount() {
+    addAccount () {
       this.editDialogTitle = "新增账号组";
       this.editDialogVisible = true;
       this.editType = "add";
@@ -304,12 +301,12 @@ export default {
       // })
     },
     // 重置
-    resetForm(formName) {
+    resetForm (formName) {
       this.$refs[formName].resetFields();
       this.editDialogVisible = false;
     },
     // 获取列表
-    async accountList() {
+    async accountList () {
       try {
         this.loading = true;
         const result = await Query({
@@ -340,7 +337,7 @@ export default {
     },
 
     // 删除接口
-    async del() {
+    async del () {
       this.ruleFormObj.event = 3;
       const result = await GeneralDataReception({
         serviceId: SERVICE_ID.accountGroupScId,
@@ -358,7 +355,7 @@ export default {
     },
 
     // 账号权限
-    authAccount(item) {
+    authAccount (item) {
       this.roleId = item.user_id;
       this.$router.push({
         path: "/account/accountAuth",
@@ -499,7 +496,8 @@ 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;
         }

+ 31 - 33
src/views/accountManagement/components/accountHome.vue

@@ -42,9 +42,7 @@
                   <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-col :span="24">权限项数:<span>{{ account.AuthCount }}</span></el-col>
                   </el-row>
                   <el-row class="content">
                     <el-col :span="12">
@@ -73,8 +71,7 @@
       <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
-          >?
+          <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>
@@ -134,7 +131,7 @@ import { GeneralDataReception, Query } from "@/api/dataIntegration";
 import MD5 from "blueimp-md5";
 export default {
   components: { Search, Dialog, NoData },
-  data() {
+  data () {
     return {
       pwdStruc: "",
       pwdLengthBegin: 0,
@@ -182,19 +179,19 @@ export default {
   },
   computed: {
     ...mapGetters(["systemSet"]),
-    noMore() {
+    noMore () {
       return this.PageIndex >= this.pages;
     },
-    disabled() {
+    disabled () {
       return this.loading || this.noMore;
     },
   },
   watch: {
-    searchInfo(val) {
+    searchInfo (val) {
       val.length === 0 && this.pageInit();
     },
   },
-  created() {
+  created () {
     // 获取系统配置
     // if (this.systemSet) {
     //   let obj
@@ -219,11 +216,11 @@ export default {
   },
   methods: {
     // 随机生成密码
-    resetPwd() {
+    resetPwd () {
       this.ruleForm.PassWord = pwdProduce(this.pwdLengthBegin, this.pwdLengthEnd, this.pwdStruc);
     },
     //
-    async getGroupSelect() {
+    async getGroupSelect () {
       const res = await Query({
         id: DATACONTENT_ID.accountGroupSelId,
         dataContent: [],
@@ -236,7 +233,7 @@ export default {
       }
     },
     //获取用户组
-    async getGroup() {
+    async getGroup () {
       const res = await Query({
         id: DATACONTENT_ID.accountGroupTableId,
         dataContent: [""],
@@ -258,7 +255,7 @@ export default {
       }
     },
     //用户组点击
-    handleNodeClick(data) {
+    handleNodeClick (data) {
       this.accountArr = [];
       if (data.user_group_id != -1 && data.up_user_group_id != -2) {
         this.PageIndex = 1;
@@ -272,7 +269,7 @@ export default {
         this.clearSearchData();
       }
     },
-    async getAccountData(id) {
+    async getAccountData (id) {
       const res = await Query({
         id: DATACONTENT_ID.accountGroupDetailsId,
         dataContent: [id],
@@ -289,7 +286,7 @@ export default {
       }
     },
     // 编辑账号
-    async saveEditAccount() {
+    async saveEditAccount () {
       try {
         if (this.oldPwd !== this.ruleForm.user_pwd) {
           this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd);
@@ -310,7 +307,7 @@ export default {
       }
     },
     // 新增账号
-    async saveAddAccount() {
+    async saveAddAccount () {
       try {
         this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd);
         const res = await GeneralDataReception({
@@ -329,7 +326,7 @@ export default {
       }
     },
     // 获取当前账号信息
-    async getAccountInfo() {
+    async getAccountInfo () {
       const res = await Query({
         id: DATACONTENT_ID.accountDetailsId,
         dataContent: [this.roleId],
@@ -346,7 +343,7 @@ export default {
       }
     },
     // 新增/编辑-确认
-    submitClickHandler() {
+    submitClickHandler () {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           if (this.editType == "add") {
@@ -361,29 +358,29 @@ export default {
       });
     },
     // 滚动加载
-    load() {
+    load () {
       this.PageIndex += 1;
       this.accountList();
     },
     // 回到第一页
-    pageInit() {
+    pageInit () {
       this.PageIndex = 1;
       this.accountArr = [];
       this.accountList();
     },
     // 查询
-    getSearchData(val) {
+    getSearchData (val) {
       this.searchInfo = val;
       this.pageInit();
     },
 
     // 清除查询
-    clearSearchData() {
+    clearSearchData () {
       this.searchInfo = "";
       this.pageInit();
     },
     // 修改状态
-    async userActiveToggle(item) {
+    async userActiveToggle (item) {
       item.event = 2;
       item.user_status = item.Flag ? 2 : 0;
       try {
@@ -401,19 +398,19 @@ export default {
         console.log("出错了", error.message || error);
       }
     },
-    deleteUser(user) {
+    deleteUser (user) {
       this.dialogVisible = true;
-      this.deleteUserName = user.UName;
+      this.deleteUserName = user.user_name;
       this.ruleFormObj = user;
     },
-    toEdit(userId) {
+    toEdit (userId) {
       this.editDialogVisible = true;
       this.editType = "edit";
       this.editDialogTitle = "编辑账号";
       this.roleId = userId;
       this.getAccountInfo();
     },
-    addAccount() {
+    addAccount () {
       this.editDialogTitle = "新增账号";
       this.editDialogVisible = true;
       this.editType = "add";
@@ -424,12 +421,12 @@ export default {
       // })
     },
     // 重置
-    resetForm(formName) {
+    resetForm (formName) {
       this.$refs[formName].resetFields();
       this.editDialogVisible = false;
     },
     // 获取列表
-    async accountList() {
+    async accountList () {
       try {
         this.loading = true;
         let result = null;
@@ -470,7 +467,7 @@ export default {
     },
 
     // 删除接口
-    async del() {
+    async del () {
       this.ruleFormObj.event = 3;
       const result = await GeneralDataReception({
         serviceId: SERVICE_ID.accountScId,
@@ -488,7 +485,7 @@ export default {
     },
 
     // 账号权限
-    authAccount(item) {
+    authAccount (item) {
       this.roleId = item.user_id;
       this.$router.push({
         path: "/account/accountAuth",
@@ -631,7 +628,8 @@ 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;
         }