Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/V0.0.4' into V0.0.4

jingyuanchao 1 gadu atpakaļ
vecāks
revīzija
bfa2ef39e8

+ 2 - 2
.env.development

@@ -15,9 +15,9 @@ ENV = 'development'
 #VUE_APP_BASE_API = 'http://10.87.11.94:8080'
 #景远超
 # VUE_APP_BASE_API = 'http://10.87.11.173:8080'
-#VUE_APP_BASE_API = 'http://localhost:8080'
+VUE_APP_BASE_API = 'http://localhost:8080'
 # 55环境
-VUE_APP_BASE_API = 'http://10.87.21.107:8080'
+# VUE_APP_BASE_API = 'http://10.87.21.107:8080'
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
 

+ 1 - 1
src/components/orgTree/orgDropDown.vue

@@ -1,6 +1,6 @@
 <template>
   <treeselect v-model="val" :options="deptOptions" :normalizer="normalizer" v-bind="$attrs" @select="select" ref="tree"
-    noResultsText="暂无符合条件的数据" clearValueText="清除" />
+    noResultsText="暂无符合条件的数据" noOptionsText="无数据" clearValueText="清除" />
 </template>
 <script>
 import Treeselect from "@riophae/vue-treeselect";

+ 42 - 32
src/components/orgTree/orgQuerySelector.vue

@@ -4,11 +4,13 @@
       v-model="val"
       :options="treeList"
       :normalizer="normalizer"
+      :default-expand-level="0"
       :clearable="clearable"
       v-bind="$attrs"
       @select="select"
       ref="tree"
       noResultsText="暂无符合条件的数据"
+      noOptionsText="无数据"
       clearValueText="清除"
     />
     <el-checkbox v-model="checkSub" @change="changeCheckBox"
@@ -27,8 +29,7 @@ export default {
   data() {
     return {
       treeList: [],
-      currentNode: null,
-      checkSub:this.defaultCheckSub
+      checkSub: this.defaultCheckSub,
     };
   },
   props: {
@@ -43,10 +44,10 @@ export default {
       //取值范围:business,org
       type: String,
       default: "business",
-    },    
-    defaultCheckSub:{
-      type:Boolean,
-      default:true
+    },
+    defaultCheckSub: {
+      type: Boolean,
+      default: true,
     },
     hangsheTree: {
       type: Boolean,
@@ -67,25 +68,18 @@ export default {
       type: Boolean,
       default: true,
     },
-    clearable:{
-      type:Boolean,
-      default:false,
-    }
+    clearable: {
+      type: Boolean,
+      default: false,
+    },
   },
   watch: {
     value(v) {
+      //补充clear时不触发select事件
       if (!v) {        
         this.$emit("click", null);
         return;
-      }
-      if (!this.currentNode || this.currentNode.id != v) {
-        this.currentNode = this.findNodeInOptions(v);
-      }
-
-      if (this.currentNode) {
-        console.info(this.currentNode);
-        this.$emit("click", this.currentNode);
-      }
+      }      
     },
     orgTree(val) {
       this.getDeptTree();
@@ -102,8 +96,8 @@ export default {
     getDeptTree() {
       if (this.customRequest) {
         this.customRequest().then((response) => {
-          this.treeList = response.data;
-          this.dataFn(response.data);
+          let treeList = response.data;
+          this.dataFn(treeList);
           return;
         });
       } else {
@@ -123,29 +117,44 @@ export default {
         } else {
           this.treeList = this.$store.getters.orgTree;
         }
+
         this.dataFn(this.treeList);
       }
     },
     dataFn(arr) {
       if (!arr || arr.length === 0) return;
-      console.log(arr, "arrr");
+      // console.log(arr, "arrr");
 
       if (arr && arr.length > 0) {
+        if (arr.length == 1) {
+          arr[0].isDefaultExpanded = true;
+        }
+
+        let defaultSelectedNode;
         if (!this.val) {
           this.val = arr[0].id;
+          defaultSelectedNode = arr[0];
+          //     let v=this.val
+
+          // debugger
+        } else {
+          if (this.value) {
+            defaultSelectedNode = this.findNodeInOptions(this.value);
+          }
         }
 
-        this.currentNode = this.findNodeInOptions(this.val);
-        if (this.currentNode) {
-          this.$emit("defaultKey", this.currentNode.id);
-          this.$emit("defaultOrg", this.currentNode);
+        if (defaultSelectedNode) {
+          this.$emit("defaultKey", defaultSelectedNode.id);
+          this.$emit("defaultOrg", { ...defaultSelectedNode });
         }
+
+        this.treeList = arr;
       }
       // setTimeout(() => {
       //   this.$refs.tree.setCurrentKey(arr[0].id);
       // }, 100);
     },
-   
+
     findNodeInOptions(id) {
       if (!id) {
         return;
@@ -180,11 +189,12 @@ export default {
         id: node.id,
         label: node[this.label],
         children: node.children,
+        isDefaultExpanded: node.isDefaultExpanded,
       };
     },
     select(node) {
-      this.currentNode = node;
-      this.value=node.id
+      this.$emit("click", node);     
+
     },
     changeCheckBox(state) {
       this.$emit("checkChange", state);
@@ -198,12 +208,12 @@ export default {
 <style lang="scss" scoped>
 .org_query_selector {
   display: flex;
-  
-  ::v-deep .vue-treeselect{
+
+  ::v-deep .vue-treeselect {
     width: 205px;
   }
 }
-.org_query_selector div:first-child{
+.org_query_selector div:first-child {
   margin-right: 20px;
 }
 ::v-deep {

+ 1 - 1
src/views/core/accessPlan/index.vue

@@ -11,7 +11,7 @@
         <div class="main-right-box">
           <div class="main-search-box">
             <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
-              <el-form-item label="创建机构">
+              <el-form-item label="行社名称">
                 <org-tree
                 v-model="queryParams.orgId" @defaultKey="getDefaultKey" @defaultOrg="getDefaultOrg" @checkChange="checkChange"
                 @click="clickTreeNode" :defaultCheckSub="false" hangsheTree

+ 1 - 1
src/views/core/drill/plan/index.vue

@@ -17,7 +17,7 @@
               :inline="true"
               v-show="showSearch"
             >
-              <el-form-item label="创建机构">
+              <el-form-item label="行社名称">
                 <org-tree
                   v-model="queryParams.belongOrgId"
                   @defaultKey="getDefaultKey"

+ 1 - 1
src/views/core/task/index.vue

@@ -160,7 +160,7 @@
             />
             <el-table-column label="任务进度" align="center" prop="status">
               <template slot-scope="scope">
-                <span :style="statusColor(scope.row.status)">
+                <span>
                   <dict-tag
                     :options="dict.type.retrieval_task_status"
                     :value="scope.row.status"

+ 1 - 1
src/views/resumptionEvaluate/evaluate/index.vue

@@ -170,7 +170,7 @@
                   size="mini"
                   @click="publishHandler(row)"
                   type="text"
-                  v-if="row.orgId == isEdit"
+                  v-if="row.orgId == isEdit &&row.status==0"
                   :class="
                     row.isDistribute == 0
                       ? 'el-icon-arrow-down'

+ 8 - 0
src/views/safetyBook/aqbwbndjh/dialog.edit.vue

@@ -91,6 +91,7 @@
 
 <script>
 import { mapState, mapMutations } from "vuex";
+import { mapGetters } from "vuex";
 import { Add, edit, getaqbwbndjh } from "@/api/safetyBook/aqbwbndjh";
 import { deptTreeSelect } from "@/api/system/public";
 import UserSelector from "@/components/userSelector/index.vue";
@@ -120,6 +121,7 @@ export default {
   watch: {},
   computed: {
     ...mapState([]),
+    ...mapGetters(["orgId", "orgName"]),
     joinedStringArray: {
       get() {
         if (this.formData.names == null || this.formData.names == undefined) {
@@ -182,6 +184,12 @@ export default {
       this.formData = this.reset();
       this.id = id;
       await this.refresh(id);
+      if(id){
+        
+      }else{
+        // console.log(this.orgId,"this.orgId")
+        this.formData.orgId=this.orgId;
+      }
       this.isShow = true;
     },
 

+ 1 - 1
src/views/safetyBook/dialog.edit.vue

@@ -22,7 +22,7 @@
               :options="deptOptions"
               :show-count="true"
               :normalizer="tenantIdnormalizer"
-              :props="{ checkStrictly: true, label: 'name' }"
+              :props="{ checkStrictly: true, label: 'shortName' }"
               placeholder="请选择签署人所在机构"
               
             />

+ 8 - 0
src/views/safetyBook/hsggbsdj/dialog.edit.vue

@@ -88,6 +88,7 @@
 
 <script>
 import { mapState, mapMutations } from "vuex";
+import { mapGetters } from "vuex";
 import { Add, edit, gethsggbsdj } from "@/api/safetyBook/hsggbsdj";
 import { deptTreeSelect } from "@/api/system/public";
 import UserSelector from "@/components/userSelector/index.vue";
@@ -117,6 +118,7 @@ export default {
   watch: {},
   computed: {
     ...mapState([]),
+    ...mapGetters(["orgId", "orgName"]),
     joinedStringArray: {
       get() {
         if (this.formData.names == null || this.formData.names == undefined) {
@@ -177,6 +179,12 @@ export default {
       this.formData = this.reset();
       this.id = id;
       await this.refresh(id);
+      if(id){
+        
+      }else{
+        // console.log(this.orgId,"this.orgId")
+        this.formData.orgId=this.orgId;
+      }
       this.isShow = true;
     },
 

+ 2 - 0
src/views/system/bind/index.vue

@@ -195,6 +195,8 @@
             :normalizer="tenantIdnormalizer"
             :props="{ checkStrictly: true, label: 'name' }"
             placeholder="请选择机构"
+            noResultsText="暂无符合条件的数据"
+            noOptionsText="无数据"
             @select="changeSelectArea"
           />
         </el-form-item>

+ 2 - 0
src/views/system/dept/dialog.edit.vue

@@ -19,6 +19,8 @@
                   :options="deptOptions"
                   :normalizer="normalizer"
                   placeholder="选择上级机构"
+                  noResultsText="暂无符合条件的数据"
+                  noOptionsText="无数据"
                 />
               </el-form-item>
             </el-col>

+ 1 - 0
src/views/system/dept/index.vue

@@ -256,6 +256,7 @@
             >
               <treeselect
               noResultsText="暂无符合条件的数据"
+              noOptionsText="无数据"
               clearValueText="清除"
                 v-model="form.parentId"
                 :options="deptOptions2"

+ 2 - 0
src/views/system/menu/index.vue

@@ -234,6 +234,8 @@
                 :normalizer="normalizer"
                 :show-count="true"
                 placeholder="选择上级菜单"
+                noResultsText="暂无符合条件的数据"
+                noOptionsText="无数据"
               />
             </el-form-item>
           </el-col>

+ 169 - 152
src/views/system/user/index.vue

@@ -92,11 +92,17 @@
                   icon="el-icon-search"
                   size="mini"
                   @click="handleQuery"
-                >搜索</el-button>
+                  >搜索</el-button
+                >
               </el-col>
               <el-col :span="1.5">
-                <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery"
-                >重置</el-button>
+                <el-button
+                  type="primary"
+                  icon="el-icon-refresh"
+                  size="mini"
+                  @click="resetQuery"
+                  >重置</el-button
+                >
               </el-col>
               <el-col :span="1.5">
                 <el-button
@@ -105,7 +111,7 @@
                   size="mini"
                   @click="handleAdd"
                   v-hasPermi="['system:user:add']"
-                >新增人员</el-button
+                  >新增人员</el-button
                 >
               </el-col>
               <!-- <el-col :span="1.5">
@@ -123,7 +129,7 @@
                   size="mini"
                   @click="handleImport"
                   v-hasPermi="['system:user:import']"
-                >导入人员</el-button
+                  >导入人员</el-button
                 >
               </el-col>
 
@@ -134,7 +140,7 @@
                   size="mini"
                   @click="handleExport"
                   v-hasPermi="['system:user:export']"
-                >导出人员</el-button
+                  >导出人员</el-button
                 >
               </el-col>
               <el-col :span="1.5">
@@ -144,7 +150,7 @@
                   size="mini"
                   @click="handleExportManager"
                   v-hasPermi="['system:user:exportManager']"
-                >导出管理人员</el-button
+                  >导出管理人员</el-button
                 >
               </el-col>
 
@@ -155,7 +161,7 @@
                   size="mini"
                   @click="handleExportSecurity"
                   v-hasPermi="['system:user:exportSecurity']"
-                >导出安保部门从业人员</el-button
+                  >导出安保部门从业人员</el-button
                 >
               </el-col>
               <right-toolbar
@@ -164,68 +170,72 @@
               ></right-toolbar>
             </el-row>
           </div>
-          <el-table
-            border
-            height="646"
-            size="small"
-            v-loading="loading"
-            :data="userList"
-            @selection-change="handleSelectionChange"
-          >
-            <el-table-column
-              fixed
-              label="序号"
-              type="index"
-              align="center"
-              width="70"
-            ></el-table-column>
-            <el-table-column
-              label="账号"
-              align="center"
-              key="username"
-              prop="username"
-              width="120"
-              v-if="columns[0].visible"
-              :show-overflow-tooltip="true"
-            />
-            <el-table-column
-              label="姓名"
-              align="center"
-              key="name"
-              prop="name"
-              width="120"
-              v-if="columns[1].visible"
-              :show-overflow-tooltip="true"
-            />
-
-            <el-table-column
-              label="所属机构"
-              align="left"
-              header-align="center"
-              key="orgName"
-              prop="orgName"
-              width="180"
-              v-if="columns[3].visible"
-              :show-overflow-tooltip="true"
-            />
-            <el-table-column
-              label="用户角色"
-              align="left"
-              header-align="center"
-              prop="roles"
-              width="300"
-              v-if="columns[2].visible"
-              :show-overflow-tooltip="true"
+          <div style="height: 702px">
+            <el-table
+              border
+              max-height="646"
+              size="small"
+              v-loading="loading"
+              :data="userList"
+              @selection-change="handleSelectionChange"
             >
-              <template slot-scope="scope">
-                <!-- <template v-for="item in scope.row.roles">
+              <el-table-column
+                fixed
+                label="序号"
+                type="index"
+                align="center"
+                width="70"
+              ></el-table-column>
+              <el-table-column
+                label="账号"
+                align="center"
+                key="username"
+                prop="username"
+                width="150"
+                v-if="columns[0].visible"
+                :show-overflow-tooltip="true"
+              />
+              <el-table-column
+                label="姓名"
+                align="center"
+                key="name"
+                prop="name"
+                width="150"
+                v-if="columns[1].visible"
+                :show-overflow-tooltip="true"
+              />
+
+              <el-table-column
+                label="所属机构"
+                align="left"
+                header-align="center"
+                key="orgName"
+                prop="orgName"
+                width="200"
+                v-if="columns[3].visible"
+                :show-overflow-tooltip="true"
+              />
+              <el-table-column
+                label="用户角色"
+                align="left"
+                header-align="center"
+                prop="roles"
+                width="300"
+                v-if="columns[2].visible"
+                :show-overflow-tooltip="true"
+              >
+                <template slot-scope="scope">
+                  <!-- <template v-for="item in scope.row.roles">
                     {{ item.roleName }}
                     <br />
                   </template> -->
-                <div class="cell" v-html="formatter(scope.row.roleNames)"></div>
-              </template>
-            </el-table-column>
-            <!-- <el-table-column
+                  <div
+                    class="cell"
+                    v-html="formatter(scope.row.roleNames)"
+                  ></div>
+                </template>
+              </el-table-column>
+              <!-- <el-table-column
               label="手机号码"
               align="left"
               prop="phone"
@@ -233,23 +243,23 @@
               v-if="columns[3].visible"
               :show-overflow-tooltip="true"
             /> -->
-            <el-table-column
-              label="账号状态"
-              align="center"
-              key="isLock"
-              prop="isLock"
-              v-if="columns[4].visible"
-              width="100"
-            >
-              <template slot-scope="scope">
-                <dict-tag
-                  :options="dict.type.sys_normal_disable"
-                  :value="scope.row.isLock"
-                />
-              </template>
-            </el-table-column>
+              <el-table-column
+                label="账号状态"
+                align="center"
+                key="isLock"
+                prop="isLock"
+                v-if="columns[4].visible"
+                width="100"
+              >
+                <template slot-scope="scope">
+                  <dict-tag
+                    :options="dict.type.sys_normal_disable"
+                    :value="scope.row.isLock"
+                  />
+                </template>
+              </el-table-column>
 
-            <!-- <el-table-column
+              <!-- <el-table-column
               label="登录IP"
               align="center"
               key="lastIp"
@@ -257,7 +267,7 @@
               v-if="columns[6].visible"
               width="140"
             /> -->
-            <!-- <el-table-column
+              <!-- <el-table-column
               label="登录时间"
               align="center"
               key="lastTime"
@@ -265,68 +275,72 @@
               v-if="columns[7].visible"
               width="170"
             /> -->
-            <el-table-column
-              label="安保部门从业人员"
-              align="center"
-              key="isManager"
-              prop="isManager"
-              v-if="columns[5].visible"
-              width="160"
-            >
-              <template slot-scope="scope">
-                {{ scope.row.isManage === "Y" ? "是" : "否" }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              label="操作"
-              align="left"
-              header-align="center"
-              width="350"
-              fixed="right"
-              class-name="small-padding fixed-width"
-            >
-              <template slot-scope="scope">
-
-                <el-button
-                  size="mini"
-                  type="text"
-                  v-if="scope.row.isManage=='Y'"
-                  icon="el-icon-plus"
-                  @click="handleExtend(scope.row)"
-                  v-hasPermi="['system:user:extend']"
-                >补充信息</el-button>
-                <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-edit-outline"
-                  @click="handleUpdate(scope.row)"
-                  v-hasPermi="['system:user:edit']"
-                >编辑</el-button>
-                <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-delete"
-                  v-if="scope.row.source==0"
-                  @click="handleDelete(scope.row)"
-                  v-hasPermi="['system:user:remove']"
-                >删除</el-button>
-                <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-key"
-                  v-if="scope.row.source==0"
-                  @click="handleResetPwd(scope.row)"
-                  v-hasPermi="['system:user:resetPwd']"
-                >重置密码</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <pagination
+              <el-table-column
+                label="安保部门从业人员"
+                align="center"
+                key="isManager"
+                prop="isManager"
+                v-if="columns[5].visible"
+                width="160"
+              >
+                <template slot-scope="scope">
+                  {{ scope.row.isManage === "Y" ? "是" : "否" }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="操作"
+                align="left"
+                header-align="center"
+                width="350"
+                fixed="right"
+                class-name="small-padding fixed-width"
+              >
+                <template slot-scope="scope">
+                  <el-button
+                    size="mini"
+                    type="text"
+                    v-if="scope.row.isManage == 'Y'"
+                    icon="el-icon-plus"
+                    @click="handleExtend(scope.row)"
+                    v-hasPermi="['system:user:extend']"
+                    >补充信息</el-button
+                  >
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-edit-outline"
+                    @click="handleUpdate(scope.row)"
+                    v-hasPermi="['system:user:edit']"
+                    >编辑</el-button
+                  >
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-delete"
+                    v-if="scope.row.source == 0"
+                    @click="handleDelete(scope.row)"
+                    v-hasPermi="['system:user:remove']"
+                    >删除</el-button
+                  >
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-key"
+                    v-if="scope.row.source == 0"
+                    @click="handleResetPwd(scope.row)"
+                    v-hasPermi="['system:user:resetPwd']"
+                    >重置密码</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+            <pagination
             :total="total"
             :page.sync="queryParams.pageNum"
             :limit.sync="queryParams.pageSize"
             @pagination="getList"
           />
+          </div>          
         </div>
       </el-col>
     </el-row>
@@ -437,11 +451,9 @@
                 placeholder="请输入手机号码"
                 autocomplete="off"
                 maxlength="11"
-               
               />
             </el-form-item>
           </el-col>
-
         </el-row>
 
         <el-row>
@@ -465,7 +477,6 @@
                   v-for="dict in dict.type.sys_yes_no"
                   :key="`${dict.value}`"
                   :label="dict.value"
-                
                   >{{ dict.label }}</el-radio
                 >
               </el-radio-group>
@@ -575,7 +586,7 @@ export default {
       userList: null,
       //是否是管理员
       check: false,
-      orgName:null,
+      orgName: null,
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -621,8 +632,8 @@ export default {
         checkSub: true,
         onlyManager: false,
         name: null,
-        roleId:null,
-        isLock:null
+        roleId: null,
+        isLock: null,
       },
       // 列信息
       columns: [
@@ -671,9 +682,7 @@ export default {
           },
           {
             validator: (rule, value, callback) => {
-              if (
-                /[\u4E00-\u9FA5]/g.test(value)
-              ) {
+              if (/[\u4E00-\u9FA5]/g.test(value)) {
                 callback(new Error("密码不能包含中文字符"));
               } else {
                 callback();
@@ -826,7 +835,7 @@ export default {
           this.userList = response.data.rows;
           this.total = response.data.total;
           this.check = response.check;
-          this.orgName=response.orgName;
+          this.orgName = response.orgName;
           this.loading = false;
         })
         .catch((err) => {
@@ -1012,7 +1021,11 @@ export default {
         {
           ...this.queryParams,
         },
-        `${this.orgName+'-人员信息管理-'+this.formatTime(new Date(),'YYYYMMDD')}.xlsx`
+        `${
+          this.orgName +
+          "-人员信息管理-" +
+          this.formatTime(new Date(), "YYYYMMDD")
+        }.xlsx`
       );
     },
     /** 模板下载按钮操作 */
@@ -1022,7 +1035,11 @@ export default {
         {
           template: true,
         },
-        `${this.orgName+'-人员信息管理-管理人员-'+this.formatTime(new Date(),'YYYYMMDD')}.xlsx`
+        `${
+          this.orgName +
+          "-人员信息管理-管理人员-" +
+          this.formatTime(new Date(), "YYYYMMDD")
+        }.xlsx`
       );
     },
     handleExportManager() {

+ 2 - 0
src/views/tool/gen/genInfoForm.vue

@@ -74,6 +74,8 @@
             :normalizer="normalizer"
             :show-count="true"
             placeholder="请选择系统菜单"
+            noResultsText="暂无符合条件的数据"
+            noOptionsText="无数据"
           />
         </el-form-item>
       </el-col>