ysy před 1 rokem
rodič
revize
bccf4a968c

+ 10 - 0
src/api/system/role/index.js

@@ -149,3 +149,13 @@ export async function getlistRole (id) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+/**
+ * 复制角色
+ */
+ export async function copyRole(id) {
+  const res = await request.post('sys/role/copy/'+id);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 6 - 6
src/enum/dict.js

@@ -193,10 +193,10 @@ export const fineRule = [
     pid: '5',
     reg: '[0-9]'
   },
-  {
-    label: 'A-Z0-9',
-    value: '2',
-    pid: '5',
-    reg: '[A-Z0-9]'
-  }
+  // {
+  //   label: 'A-Z0-9',
+  //   value: '2',
+  //   pid: '5',
+  //   reg: '[A-Z0-9]'
+  // }
 ];

+ 1 - 1
src/views/factoryModel/station/components/ProductModal.vue

@@ -187,7 +187,7 @@ export default {
           showOverflowTooltip: true,
           minWidth: 110,
           formatter: (_row) => {
-            return _row.position[0]?.pathName;
+            return _row.position[0]&&_row.position[0].pathName;
           }
         },
         {

+ 54 - 44
src/views/rulesManagement/meteringManagement/baseDialog.vue

@@ -6,9 +6,9 @@
     width="60%"
   >
     <el-form label-width="100px" :model="formData" class="zw-criterion">
-      <div class="el-form-item checkbox">
+      <!-- <div class="el-form-item checkbox">
         <el-checkbox v-model="formData.checked">基准计量单位</el-checkbox>
-      </div>
+      </div> -->
       <el-form-item label="编码" required>
         <el-input
           v-model="formData.code"
@@ -21,12 +21,12 @@
       </el-form-item>
       <el-form-item label="所属组别" required>
         <el-input
-          v-model="formData.name"
+          v-model="formData.parentName"
           placeholder="请输入内容"
           disabled
         ></el-input>
       </el-form-item>
-      <el-form-item label="换算类型">
+      <!-- <el-form-item label="换算类型">
         <el-select
           v-model="formData.type"
           :placeholder="`请选择${formData.type}`"
@@ -40,15 +40,15 @@
           >
           </el-option>
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="精度" required>
         <el-input-number
-          v-model="formData.precision"
+          v-model="formData.precisions"
           :min="0"
           :max="5"
         ></el-input-number>
       </el-form-item>
-      <el-form-item label="舍入类型" required>
+      <!-- <el-form-item label="舍入类型" required>
         <template>
           <el-select v-model="formData.type" placeholder="请选择">
             <el-option
@@ -73,7 +73,7 @@
             </el-option>
           </el-select>
         </template>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item class="w100" label="换算关系">
         <div class="top">
           <div class="">换算分母</div>
@@ -87,24 +87,26 @@
         <div class="bottom">
           <div
             ><el-input-number
-              v-model="num1"
-              :precision="formData.precision"
+              v-model="formData.measureNum"
+              :precision="formData.precisions"
             ></el-input-number
           ></div>
           <div class="unit">*</div>
           <div>
-            <DictSelection dictName="计量单位" v-model="formData.unit1" />
+            <DictSelection dictName="计量单位" v-model="formData.measureUnit" />
           </div>
           <div class="unit">=</div>
           <div
             ><el-input-number
-              v-model="num2"
-              :precision="formData.precision"
+              v-model="formData.conversionNum"
+              :precision="formData.precisions"
             ></el-input-number
           ></div>
           <div class="unit">*</div>
           <div
-            ><DictSelection dictName="计量单位" v-model="formData.unit2"
+            ><DictSelection
+              dictName="计量单位"
+              v-model="formData.conversionUnit"
           /></div>
         </div>
       </el-form-item>
@@ -125,20 +127,24 @@
 </template>
 
 <script>
-  import { getImageUrl } from '@/utils/file';
+  import { getCode } from '@/api/codeManagement';
   import {
-    saveInfo,
-    updateInfo,
-    getDetails
-  } from '@/api/system/unifiedPortal/index.js';
+    saveCategorymeasure,
+    updateCategorymeasure,
+    getCategorymeasureDetails
+  } from '@/api/ruleManagement/meteringManagement.js';
   export default {
     data() {
       return {
         precision: 2,
         formData: {
-          type: 1,
-          precision: 2,
-          dataType: 1
+          code: '',
+          name: '',
+          measureNum: '',
+          measureUnit: '',
+          conversionNum: '',
+          conversionUnit: '',
+          precisions: 2
         },
         num1: '',
         num2: '',
@@ -170,46 +176,50 @@
         ],
         dialogVisible: false,
         file: null,
-        type: '新增'
+        type: '新增',
+        parentId: ''
       };
     },
     methods: {
       handleClose() {
         this.dialogVisible = false;
       },
-      async open(type, id) {
+      async open(type, parentObj, id) {
         this.type = type;
         if (type == '新增') {
-          this.form = {};
-          this.imageUrl = '';
-          this.file = null;
+          this.formData = {
+            code: await getCode('metrological_code'),
+            name: '',
+            measureNum: '',
+            parentName: parentObj.name,
+            parentId: parentObj.id,
+            measureUnit: '',
+            conversionNum: '',
+            conversionUnit: '',
+            precisions: 2
+          };
         } else {
-          this.file = null;
-          this.form = await getDetails(id);
-          this.imageUrl = getImageUrl(this.form.iconPath);
+          this.formData = await getCategorymeasureDetails(id);
         }
+        console.log('this.formData------------', this.formData);
         this.dialogVisible = true;
       },
       async config() {
-        if (!this.form.name) {
+        if (!this.formData.name) {
           return this.$message.error('请输入名称');
         }
-        if (this.form.sort < 0) {
-          return this.$message.error('请输入排序');
-        }
-        if (!this.form.linkUrl) {
-          return this.$message.error('请输入链接');
-        }
-        if (this.form.linkType < 0) {
-          return this.$message.error('请选择链接类型');
-        }
-        if (this.form.architType < 0) {
-          return this.$message.error('请选择架构类型');
+        if (
+          !(this.formData.measureNum > 0) &&
+          !(this.formData.conversionNum > 0) &&
+          !this.formData.measureUnit &&
+          !this.formData.conversionUnit
+        ) {
+          return this.$message.error('请输入正确换算关系数据');
         }
         if (this.type == '新增') {
           // 保存数据
           try {
-            await saveInfo(this.form);
+            await saveCategorymeasure(this.formData);
             this.$message.success('新增成功');
             this.dialogVisible = false;
             this.$emit('reload');
@@ -220,7 +230,7 @@
         } else {
           // 修改
           try {
-            await updateInfo(this.form);
+            await updateCategorymeasure(this.formData);
             this.$message.success('修改成功');
             this.dialogVisible = false;
             this.$emit('reload');

+ 66 - 16
src/views/rulesManagement/meteringManagement/index.vue

@@ -6,12 +6,16 @@
           <el-button icon="el-icon-plus" type="primary" @click="addType('新增')"
             >新增</el-button
           >
-          <el-button icon="el-icon-edit" type="success" @click="addType('修改')"
+          <el-button
+            v-if="currentObj.id"
+            icon="el-icon-edit"
+            type="success"
+            @click="addType('修改')"
             >修改</el-button
           >
-          <el-button icon="el-icon-delete" type="danger" @click="deleted()"
+          <!-- <el-button icon="el-icon-delete" type="danger" @click="deleted()"
             >删除</el-button
-          >
+          > -->
         </div>
         <el-tree
           class="tree"
@@ -29,10 +33,13 @@
         <div class="search_bar">
           <el-input
             placeholder="请输入关键词"
-            v-model="keyWord"
+            v-model="name"
+            clearable
             class="input-with-select"
           >
-            <el-button slot="append" icon="el-icon-search">搜索</el-button>
+            <el-button slot="append" icon="el-icon-search" @click="search"
+              >搜索</el-button
+            >
           </el-input>
         </div>
         <div class="table_box">
@@ -46,6 +53,7 @@
             <!-- 表头工具栏 -->
             <template v-slot:toolbar>
               <el-button
+                v-if="currentObj.id"
                 size="small"
                 type="primary"
                 icon="el-icon-plus"
@@ -55,6 +63,16 @@
                 新增
               </el-button>
             </template>
+            <template v-slot:action="{ row }">
+              <el-link
+                type="primary"
+                :underline="false"
+                icon="el-icon-edit"
+                @click="openEdit('修改', row)"
+              >
+                修改
+              </el-link>
+            </template>
           </ele-pro-table>
         </div>
       </div>
@@ -72,7 +90,10 @@
     components: { baseDialog, typeDialog },
     data() {
       return {
-        currentId: '',
+        currentObj: {
+          id: '',
+          name: ''
+        },
         // 表格列配置
         columns: [
           {
@@ -92,9 +113,24 @@
             prop: 'name',
             label: '名称',
             showOverflowTooltip: true
+          },
+          {
+            prop: 'parentName',
+            label: '分组',
+            showOverflowTooltip: true
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 200,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
           }
         ],
-        keyWord: '',
+
+        name: '',
         tableData: [
           {
             name: '包',
@@ -121,24 +157,33 @@
         ],
         defaultProps: {
           children: 'children',
-          label: 'label'
+          label: 'name'
         }
       };
     },
-    async created() {
+    async mounted() {
       this.getTypeList(); // 获取侧边栏分类列表
-      this.getPages(); // 获取表格数据列表
     },
     methods: {
+      search() {
+        this.getPages({
+          name: this.name,
+          parentId: this.currentObj.id ? this.currentObj.id : ''
+        });
+      },
       async getTypeList() {
+        this.currentObj = {};
         this.typeList = await getCategorymeasureList({ parentId: 0 });
         this.getPages();
       },
       addType(type) {
+        if (!this.currentObj.id) {
+          return this.$message.warning('请选择分类');
+        }
         if (type == '新增') {
           this.$refs.typeDialogRef.open(type);
         } else {
-          this.$refs.typeDialogRef.open(type, this.currentId);
+          this.$refs.typeDialogRef.open(type, this.currentObj.id);
         }
       },
       deleted() {
@@ -156,20 +201,25 @@
           .catch(() => {});
       },
       getPages(where) {
-        this.$refs.table.reload(where);
+        this.$refs.table.reload({ where });
       },
       datasource({ page, limit, where, order }) {
+        console.log('where', where);
         return getCategorymeasureList({
           ...where
         });
       },
       handleNodeClick(data) {
-        this.currentId = data.id;
+        this.currentObj = data;
+        this.getPages({ parentId: data.id });
         console.log(data);
       },
-      openEdit() {
-        this.type = '新增';
-        this.$refs.baseDialogRef.open(this.type);
+      openEdit(type, row) {
+        if (type == '新增') {
+          this.$refs.baseDialogRef.open(type, this.currentObj);
+        } else {
+          this.$refs.baseDialogRef.open(type, this.currentObj, row.id);
+        }
       }
     }
   };

+ 4 - 1
src/views/rulesManagement/meteringManagement/typeDialog.vue

@@ -45,7 +45,10 @@
       },
       async open(type, id) {
         if (type == '新增') {
-          this.formData.code = await getCode('metrological_code');
+          this.formData = {
+            name: '',
+            code: await getCode('metrological_code')
+          };
         } else {
           this.formData = await getCategorymeasureDetails(id);
         }

+ 14 - 1
src/views/system/organization/components/org-user-edit.vue

@@ -31,7 +31,7 @@
           <el-form-item label="负责部门:">
             <el-cascader
               class="ele-block"
-              :options="organizationList"
+              :options="organization"
               placeholder="请选择负责部门"
               :props="defaultProps"
               ref="deptRef"
@@ -1307,6 +1307,9 @@ export default {
     styleResponsive() {
       return this.$store.state.theme.styleResponsive;
     },
+    organization() {
+      return this.setList(this.organizationList);
+    },
     identityPhotosColumns() {
       return [
         {
@@ -1729,6 +1732,15 @@ export default {
     console.log(this.institutionList, '========');
   },
   methods: {
+    setList(list) {
+      return list.map((val) => {
+        val['disabled'] = val.id == this.form.groupId;
+        if(val.children){
+          val.children= this.setList(val.children)
+        }
+        return val;
+      });
+    },
     addIdentityPhotos() {
       this.form.identityPhotos.push({
         holder: this.form.name
@@ -1843,6 +1855,7 @@ export default {
           return (this.form.groupName = i.name);
         }
       });
+      this.form.deptIds=this.form.deptIds.filter(item=>item!=this.form.groupId)
       console.log(this.form.groupName);
     },
     getLabelName(data, callback) {

+ 56 - 25
src/views/system/role/index.vue

@@ -2,7 +2,7 @@
   <div class="ele-body">
     <el-card shadow="never">
       <!-- 搜索表单 -->
-      <role-search @search="reload"/>
+      <role-search @search="reload" />
       <!-- 数据表格 -->
       <ele-pro-table
         ref="table"
@@ -47,7 +47,7 @@
           </el-switch>
         </template>
         <template v-slot:secretLevel="{ row }">
-          {{  getSecretLevel(row.secretLevel) }}
+          {{ getSecretLevel(row.secretLevel) }}
         </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
@@ -78,13 +78,27 @@
           >
             数据权限
           </el-link>
+          <!-- v-if="$hasPermission('sys:role:update')" -->
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-document-copy"
+            @click="copyRole(row)"
+          >
+            复制
+          </el-link>
           <el-popconfirm
             class="ele-action"
             title="确定要删除此角色吗?"
             @confirm="remove(row)"
           >
             <template v-slot:reference>
-              <el-link type="danger"  v-if="$hasPermission('sys:role:delete')" :underline="false" icon="el-icon-delete">
+              <el-link
+                type="danger"
+                v-if="$hasPermission('sys:role:delete')"
+                :underline="false"
+                icon="el-icon-delete"
+              >
                 删除
               </el-link>
             </template>
@@ -93,12 +107,16 @@
       </ele-pro-table>
     </el-card>
     <!-- 编辑弹窗 -->
-    <role-edit :data="current" :visible.sync="showEdit" @done="reload"/>
+    <role-edit :data="current" :visible.sync="showEdit" @done="reload" />
     <!-- 权限分配弹窗 -->
-    <role-auth :data="current" :visible.sync="showAuth"/>
+    <role-auth :data="current" :visible.sync="showAuth" />
     <!--    数据权限-->
-    <role-data-auth ref="roleDataAuthDialogRef" v-if="roleDataAuthDialogFlag"
-                    :roleDataAuthDialogFlag.sync="roleDataAuthDialogFlag" @reload="reload" />
+    <role-data-auth
+      ref="roleDataAuthDialogRef"
+      v-if="roleDataAuthDialogFlag"
+      :roleDataAuthDialogFlag.sync="roleDataAuthDialogFlag"
+      @reload="reload"
+    />
   </div>
 </template>
 
@@ -106,14 +124,15 @@
 import RoleSearch from './components/role-search.vue';
 import RoleEdit from './components/role-edit.vue';
 import RoleAuth from './components/role-auth.vue';
-import roleDataAuth from "./components/role-data-auth.vue";
+import roleDataAuth from './components/role-data-auth.vue';
 import {
   pageRoles,
   removeRole,
   removeRoles,
-  putRoles
+  putRoles,
+  copyRole
 } from '@/api/system/role';
-import {secretLevelList} from "@/enum/dict";
+import { secretLevelList } from '@/enum/dict';
 
 export default {
   name: 'SystemRole',
@@ -163,7 +182,7 @@ export default {
           label: '密级',
           align: 'center',
           showOverflowTooltip: true,
-          slot:'secretLevel',
+          slot: 'secretLevel',
           minWidth: 110
         },
         {
@@ -190,7 +209,7 @@ export default {
         {
           columnKey: 'action',
           label: '操作',
-          width: 320,
+          width: 380,
           align: 'center',
           resizable: false,
           slot: 'action',
@@ -209,12 +228,11 @@ export default {
       roleDataAuthDialogFlag: false
     };
   },
-  created() {
-  },
+  created() {},
   methods: {
     /* 表格数据源 */
-    datasource({page, limit, where, order}) {
-      return pageRoles({pageNum: page, size: limit, ...where});
+    datasource({ page, limit, where, order }) {
+      return pageRoles({ pageNum: page, size: limit, ...where });
     },
     async changeEnable(row) {
       const res = await putRoles(row);
@@ -229,11 +247,11 @@ export default {
     },
     /* 刷新表格 */
     reload(where) {
-      this.$refs.table.reload({page: 1, where});
+      this.$refs.table.reload({ page: 1, where });
     },
     getSecretLevel(i) {
-      let find = secretLevelList.find(item=>item.value==i)||{}
-      return find.label
+      let find = secretLevelList.find((item) => item.value == i) || {};
+      return find.label;
     },
     /* 显示编辑 */
     openEdit(row) {
@@ -257,15 +275,29 @@ export default {
     },
     /* 显示分配权限 */
     openDataAuth(row) {
-      this.roleDataAuthDialogFlag = true
+      this.roleDataAuthDialogFlag = true;
 
       this.$nextTick(() => {
-        this.$refs.roleDataAuthDialogRef.init({...row})
+        this.$refs.roleDataAuthDialogRef.init({ ...row });
       });
     },
+    //复制
+    async copyRole(row) {
+      const loading = this.$loading({ lock: true });
+      copyRole(row.id)
+        .then((msg) => {
+          loading.close();
+          this.$message.success(msg);
+          this.reload();
+        })
+        .catch((e) => {
+          loading.close();
+          this.$message.error(e.message);
+        });
+    },
     /* 删除 */
     remove(row) {
-      const loading = this.$loading({lock: true});
+      const loading = this.$loading({ lock: true });
       removeRole(row.id)
         .then((msg) => {
           loading.close();
@@ -287,7 +319,7 @@ export default {
         type: 'warning'
       })
         .then(() => {
-          const loading = this.$loading({lock: true});
+          const loading = this.$loading({ lock: true });
           removeRole(
             this.selection.map((d) => d.id),
             true
@@ -302,8 +334,7 @@ export default {
               this.$message.error(e.message);
             });
         })
-        .catch(() => {
-        });
+        .catch(() => {});
     }
   }
 };

+ 49 - 13
src/views/system/unifiedPortal/dialog.vue

@@ -4,21 +4,37 @@
     :visible.sync="dialogVisible"
     width="25%"
   >
-    <el-form label-width="120px" class="zw-criterion" :model="form">
-      <el-form-item label="图标(比例1:1)" required>
-        <!-- <el-upload
-          class="avatar-uploader"
-          :action="''"
-          :auto-upload="false"
-          :show-file-list="false"
-          :on-change="handleAvatarChangeIcon"
-        >
+    <el-form label-width="150px" class="unifiedPortal-form" :model="form">
+      <div class="icon-box">
+        <div class="title">
+          <div class="font">图标</div>
+          <div>1.JPG/PNG格式</div>
+          <div>2.大小不能超过10MB</div>
+          <div>3.高宽比1:1</div>
+          <div>4.推荐分辨率800*800</div>
+        </div>
+        <div class="img">
           <div class="avatar" v-if="imageUrl">
             <img :src="imageUrl" />
             <i @click="delImg" class="el-icon-close"></i>
           </div>
-          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-        </el-upload> -->
+          <el-upload
+            v-else
+            class="avatar-uploader"
+            :action="''"
+            :auto-upload="false"
+            :show-file-list="false"
+            :on-change="handleAvatarChangeIcon"
+          >
+            <i class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </div>
+      </div>
+      <!-- <el-form-item
+        style="white-space: pre-wrap"
+        label="图标(分辨率800*800)"
+        required
+      >
         <div class="avatar" v-if="imageUrl">
           <img :src="imageUrl" />
           <i @click="delImg" class="el-icon-close"></i>
@@ -33,7 +49,7 @@
         >
           <i class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="名称" required>
         <el-input v-model="form.name" placeholder="请输入内容"></el-input>
       </el-form-item>
@@ -141,7 +157,7 @@
           this.$message.error('上传文件大小不能超过 10MB!');
           return false;
         }
-        if (!isPNG && !isJPG && !isLt2M) {
+        if (!isPNG && !isJPG) {
           this.$message.error('上传图片只能是 JPG/PNG 格式!');
           return false;
         } else {
@@ -211,6 +227,26 @@
 </script>
 
 <style lang="scss" scoped>
+  .unifiedPortal-form {
+    .icon-box {
+      display: flex;
+      margin-bottom: 10px;
+      .title {
+        flex: 0 0 150px;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        .font:before {
+          content: '*';
+          color: red;
+          margin-right: 4px;
+        }
+      }
+      .img {
+        flex: 1;
+      }
+    }
+  }
   .typeSelect {
     width: 100%;
   }

+ 119 - 117
src/views/system/user/components/add.vue

@@ -48,132 +48,134 @@
 </template>
 
 <script>
-import { getUserPage } from '@/api/system/organization';
-import OrgUserSearch from '@/views/system/organization/components/org-user-search.vue';
+  import { getUserPage } from '@/api/system/organization';
+  import OrgUserSearch from '@/views/system/organization/components/org-user-search.vue';
 
-import { listOrganizations } from '@/api/system/organization';
-export default {
-  components:{
-    OrgUserSearch
-  },
-  data() {
-    return {
-      data: [],
-      show: false,
-      organizationId: '',
-      // 表格列配置
-      columns: [
-        {
-          columnKey: 'index',
-          type: 'index',
-          label: '序号',
-          width: 45,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          prop: 'name',
-          label: '姓名',
-          sortable: 'custom',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'jobNumber',
-          label: '工号',
-          sortable: 'custom',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'loginName',
-          label: '用户账号',
-          sortable: 'custom',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'sex',
-          label: '性别',
-          sortable: 'custom',
-          showOverflowTooltip: true,
-          minWidth: 80,
-          formatter: (_row, _column, cellValue) => {
-            return cellValue == 1 ? '男' : cellValue == 2 ? '女' : '';
+  import { listOrganizations } from '@/api/system/organization';
+  export default {
+    components: {
+      OrgUserSearch
+    },
+    data() {
+      return {
+        data: [],
+        show: false,
+        organizationId: '',
+        isHasAccount: '',
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            type: 'index',
+            label: '序号',
+            width: 45,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'name',
+            label: '姓名',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'jobNumber',
+            label: '工号',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'loginName',
+            label: '用户账号',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'sex',
+            label: '性别',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            minWidth: 80,
+            formatter: (_row, _column, cellValue) => {
+              return cellValue == 1 ? '男' : cellValue == 2 ? '女' : '';
+            }
           }
-        }
-      ],
-      current: {}
-    };
-  },
+        ],
+        current: {}
+      };
+    },
 
-  created() {},
-  methods: {
-    /* 查询 */
-    query() {
-      listOrganizations()
-        .then((list) => {
-          let _list = list.filter((i) => i.name != '超级管理员');
+    created() {},
+    methods: {
+      /* 查询 */
+      query() {
+        listOrganizations()
+          .then((list) => {
+            let _list = list.filter((i) => i.name != '超级管理员');
 
-          this.data = this.$util.toTreeData({
-            data: _list,
-            idField: 'id',
-            parentIdField: 'parentId',
-          });
+            this.data = this.$util.toTreeData({
+              data: _list,
+              idField: 'id',
+              parentIdField: 'parentId'
+            });
 
-          this.$nextTick(() => {
-            this.onNodeClick(this.data[0]);
+            this.$nextTick(() => {
+              this.onNodeClick(this.data[0]);
+            });
+          })
+          .catch((e) => {
+            // this.$message.error(e.message);
           });
-        })
-        .catch((e) => {
-          // this.$message.error(e.message);
-        });
-    },
-    async open() {
-      this.query();
-      this.show = true;
-    },
-    /* 表格数据源 */
-    async datasource({ page, limit, where, order }) {
-      let data = await getUserPage({
-        ...where,
-        ...order,
-        pageNum: page,
-        size: limit,
-        groupId: this.organizationId,
-        hasAccount:0
+      },
+      async open(isHasAccount) {
+        this.isHasAccount = isHasAccount;
+        this.query();
+        this.show = true;
+      },
+      /* 表格数据源 */
+      async datasource({ page, limit, where, order }) {
 
-      });
+        let data = await getUserPage({
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          groupId: this.organizationId,
+          hasAccount:this.isHasAccount||''
+        });
 
-      return data;
-    },
-    /* 保存编辑 */
-    save() {
-      let data = JSON.parse(JSON.stringify(this.current));
-      this.$emit('success', data);
-      this.show = false;
-    },
-    onNodeClick(val) {
-      this.organizationId = val.id;
-      this.reload();
-    },
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({ pageNum: 1, where: where });
-    },
-    cancel() {
-      this.show = false;
+        return data;
+      },
+      /* 保存编辑 */
+      save() {
+        let data = JSON.parse(JSON.stringify(this.current));
+        this.$emit('success', data);
+        this.show = false;
+      },
+      onNodeClick(val) {
+        this.organizationId = val.id;
+        this.reload();
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ pageNum: 1, where: where });
+      },
+      cancel() {
+        this.show = false;
+      }
     }
-  }
-};
+  };
 </script>
 <style scoped lang="scss">
-:deep(.ele-split-panel-wrap) {
-  height: 50vh;
-  overflow-y: auto;
-}
-:deep(.el-checkbox__input.is-disabled .el-checkbox__inner) {
-  background-color: #f3f3f3;
-}
+  :deep(.ele-split-panel-wrap) {
+    height: 50vh;
+    overflow-y: auto;
+  }
+  :deep(.el-checkbox__input.is-disabled .el-checkbox__inner) {
+    background-color: #f3f3f3;
+  }
 </style>

+ 2 - 2
src/views/system/user/components/user-edit.vue

@@ -9,7 +9,7 @@
     :title="isUpdate ? '修改用户' : '新建用户'"
     @update:visible="updateVisible"
   >
-    <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+    <el-form ref="form" :autoComplete="false" :model="form" :rules="rules" label-width="100px">
       <el-row>
         <el-col :span="12">
           <el-form-item label="用户账号:" prop="loginName">
@@ -183,7 +183,7 @@ export default {
   },
   methods: {
     setUsers() {
-      this.$refs.addREf.open();
+      this.$refs.addREf.open('0');
     },
     userBk(data) {
       if (data) {

+ 1 - 0
src/views/system/user/components/user-search.vue

@@ -5,6 +5,7 @@
     class="ele-form-search"
     @keyup.enter.native="search"
     @submit.native.prevent
+    :autoComplete="false"
   >
     <el-row :gutter="15">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">