Procházet zdrojové kódy

系统设置完善

zcy před 4 roky
rodič
revize
9d8a163c6c

+ 1 - 1
src/components/RightModel/index.vue

@@ -2,7 +2,7 @@
   <a-drawer
     :title="title"
     :mask-closable="true"
-    width="650"
+    width="500"
     placement="right"
     :closable="true"
     :visible="visible"

+ 184 - 0
src/components/leftTree/index.vue

@@ -0,0 +1,184 @@
+<template>
+  <a-card title="部门">
+    <div slot="extra" class="drawer-bootom-button">
+      <a-dropdown :trigger="['click']" placement="topCenter">
+        <a-menu slot="overlay">
+          <a-menu-item key="5" @click="expandAll">展开所有</a-menu-item>
+          <a-menu-item key="6" @click="closeAll">合并所有</a-menu-item>
+        </a-menu>
+        <a-button>
+          树操作
+          <a-icon type="up" />
+        </a-button>
+      </a-dropdown>
+    </div>
+    <div style="background: #fff;">
+      <a-col :md="10" :sm="24">
+        <template>
+          <a-tree
+            :selected-keys="selectedKeys"
+            :checked-keys="checkedKeys"
+            :tree-data="departTree"
+            :check-strictly="checkStrictly"
+            :expanded-keys="iExpandedKeys"
+            :auto-expand-parent="autoExpandParent"
+            @select="onSelect"
+            @check="onCheck"
+            @expand="onExpand"
+          />
+        </template>
+      </a-col>
+    </div>
+  </a-card>
+</template>
+
+<script>
+import { getAction } from '@/api/request'
+
+export default {
+  name: 'LeftTree',
+  components: {},
+  data() {
+    return {
+      iExpandedKeys: [],
+      loading: false,
+      autoExpandParent: true,
+      currFlowId: '',
+      currFlowName: '',
+      treeData: [],
+      departTree: [],
+      hiding: true,
+      checkedKeys: [],
+      selectedKeys: ['1'],
+      currSelected: {},
+      allTreeKeys: [],
+      checkStrictly: true,
+      url: {
+        tree: '/system/sjConfigProcess/queryTreeList'
+      },
+      orgCategoryDisabled: false
+    }
+  },
+  computed: {},
+  created() {
+    this.currFlowId = this.$route.params.id
+    this.currFlowName = this.$route.params.name
+    // this.loadTree()
+  },
+  methods: {
+    loadData() {
+      this.refresh()
+    },
+    loadTree() {
+      var that = this
+      that.treeData = []
+      that.departTree = []
+      getAction(this.url.tree).then((res) => {
+        if (res.success) {
+          // 部门全选后,再添加部门,选中数量增多
+          this.allTreeKeys = []
+          for (let i = 0; i < res.result.length; i++) {
+            const temp = res.result[i]
+            that.treeData.push(temp)
+            that.departTree.push(temp)
+            that.setThisExpandedKeys(temp)
+            that.getAllKeys(temp)
+            // console.log(temp.id)
+          }
+          this.loading = false
+        }
+      })
+    },
+    setThisExpandedKeys(node) {
+      if (node.children && node.children.length > 0) {
+        this.iExpandedKeys.push(node.key)
+        for (let a = 0; a < node.children.length; a++) {
+          this.setThisExpandedKeys(node.children[a])
+        }
+      }
+    },
+    refresh() {
+      this.loading = true
+      this.loadTree()
+    },
+    onExpand(expandedKeys) {
+      console.log('onExpand', expandedKeys)
+      this.iExpandedKeys = expandedKeys
+      this.autoExpandParent = false
+    },
+    nodeModalOk() {
+      this.loadTree()
+    },
+    nodeModalClose() {
+    },
+    onCheck(checkedKeys, info) {
+      console.log('onCheck', checkedKeys, info)
+      this.hiding = false
+      // ---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------
+      if (this.checkStrictly) {
+        this.checkedKeys = checkedKeys.checked
+      } else {
+        this.checkedKeys = checkedKeys
+      }
+      // ---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------
+    },
+    onSelect(selectedKeys, e) {
+      console.log('selected', selectedKeys, e)
+      this.hiding = false
+      const record = e.node.dataRef
+      console.log('onSelect-record', record)
+      this.currSelected = Object.assign({}, record)
+      this.selectedKeys = [record.key]
+      this.$emit('selected', this.currSelected)
+    },
+    getCurrSelectedTitle() {
+      return !this.currSelected.title ? '' : this.currSelected.title
+    },
+    onClearSelected() {
+      this.hiding = true
+      this.checkedKeys = []
+      this.currSelected = {}
+      this.selectedKeys = []
+      this.$refs.departAuth.departId = ''
+    },
+    // ---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------
+    expandAll() {
+      this.iExpandedKeys = this.allTreeKeys
+    },
+    closeAll() {
+      this.iExpandedKeys = []
+    },
+    getAllKeys(node) {
+      // console.log('node',node);
+      this.allTreeKeys.push(node.key)
+      if (node.children && node.children.length > 0) {
+        for (let a = 0; a < node.children.length; a++) {
+          this.getAllKeys(node.children[a])
+        }
+      }
+    }
+    // ---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .ant-card {
+    height: 100%;
+
+    /deep/ .ant-card-head {
+      padding: 0 15px;
+
+      /deep/ .ant-card-head-title, /deep/ .ant-card-extra {
+        padding: 10px 0;
+      }
+    }
+
+    /deep/ .ant-card-body {
+      padding: 10px;
+      height: calc(100vh - 225px);
+      overflow: auto;
+    }
+  }
+</style>

+ 2 - 43
src/views/sys/dict/index.vue

@@ -3,49 +3,13 @@
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
-        <a-form-item>
-          <j-dict-select-tag
-            v-model="queryParam.xb"
-            style="width: 150px"
-            placeholder="选择线别"
-            dict-code="sj_plan_status"
-          />
-        </a-form-item>
-        <a-form-item>
-          <j-dict-select-tag
-            v-model="queryParam.sb"
-            style="width: 150px"
-            placeholder="选择所别"
-            dict-code="sj_plan_status"
-          />
-        </a-form-item>
-        <a-form-item>
-          <j-dict-select-tag
-            v-model="queryParam.hb"
-            style="width: 150px"
-            placeholder="选择行别"
-            dict-code="sj_plan_status"
-          />
-        </a-form-item>
-        <a-form-item>
-          <j-dict-select-tag
-            v-model="queryParam.yy"
-            style="width: 150px"
-            placeholder="选择原因类型"
-            dict-code="sj_plan_status"
-          />
-        </a-form-item>
         <a-form-item>
           <a-input
             v-model="queryParam.glb"
-            style="width: 150px"
-            placeholder="输入公里标"
+            style="width: 250px"
+            placeholder="请输入字典名称或码值名称"
           />
         </a-form-item>
-        <a-form-item>
-          <a-date-picker v-model="queryParam.date1" format="YYYY/MM/DD" placeholder="时间范围" />-
-          <a-date-picker v-model="queryParam.date2" format="YYYY/MM/DD" placeholder="时间范围" />
-        </a-form-item>
         <a-form-item>
           <a-button type="primary" @click="searchQuery">查询</a-button>
           <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
@@ -55,11 +19,6 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator" style="margin: 15px 0">
       <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
-      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>
-      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">
-        <a-button ghost type="danger" icon="import">导入</a-button>
-      </a-upload>
-
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
           <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>

+ 5 - 5
src/views/sys/job/index.vue

@@ -53,27 +53,27 @@
           <a-switch v-model="record['status']" checked-children="启用" un-checked-children="停用" @change="changeStatus($event,record)" />
         </template>
         <span slot="action" slot-scope="text, record">
-          <a-button type="primary" @click="handleEdit(record)">
+          <a-button size="small" type="primary" @click="handleEdit(record)">
             编辑
           </a-button>
           <a-divider type="vertical" />
 
           <a-dropdown>
-            <a-button class="ant-dropdown-link" type="primary">
+            <a-button size="small" class="ant-dropdown-link" type="primary">
               操作权限 <a-icon type="down" />
             </a-button>
             <a-menu slot="overlay">
               <a-menu-item>
-                <a href="javascript:;" @click="app(record)">APP功能菜单</a>
+                <a href="javascript:;" @click="app(record)">APP-功能菜单</a>
               </a-menu-item>
               <a-menu-item>
-                <a href="javascript:;" @click="pc(record)">PC功能菜单</a>
+                <a href="javascript:;" @click="pc(record)">PC功能菜单</a>
               </a-menu-item>
             </a-menu>
           </a-dropdown>
           <a-divider type="vertical" />
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-            <a-button type="danger">
+            <a-button size="small" type="danger">
               删除
             </a-button>
           </a-popconfirm>

+ 29 - 39
src/views/sys/worker/CheckAndEditModel.vue

@@ -8,58 +8,48 @@
     @close="close"
   >
     <a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :rules="validatorRules" :model="model">
-      <a-form-model-item label="支柱号" prop="zzh">
+      <a-form-model-item label="员工姓名:" prop="zzh">
         <a-input v-model="model.zzh" />
       </a-form-model-item>
-      <a-form-model-item label="所属部门" prop="bm">
-      </a-form-model-item>
-      <a-form-model-item label="线别" prop="xb">
+      <a-form-model-item label="数据权限" prop="qj">
         <j-dict-select-tag
-          v-model="model.xb"
+          type="radioButton"
+          v-model="model.zxqwqn"
           dict-code="word_type"
         />
       </a-form-model-item>
-      <a-form-model-item label="站场区间" prop="qj">
-        <j-dict-select-tag
-          v-model="model.qj"
-          dict-code="word_type"
-        />
+      <a-form-model-item label="登录账号:" prop="zzh">
+        <a-input v-model="model.zzh" />
       </a-form-model-item>
-      <a-form-model-item label="行别" prop="hb">
-        <j-dict-select-tag
-          type="radioButton"
-          v-model="model.hb"
-          dict-code="word_type"
-        />
+      <a-form-model-item label="所属部门" prop="bm">
+        <a-tree-select
+          v-model="model.zzh"
+          show-search
+          style="width: 100%"
+          :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+          placeholder="选择部门"
+          allow-clear
+          tree-default-expand-all
+        ></a-tree-select>
       </a-form-model-item>
-      <a-form-model-item label="公里标" prop="glb">
-        <a-input v-model="model.glb" />
+      <a-form-model-item label="职工职务" prop="bm">
       </a-form-model-item>
-      <a-form-model-item label="支柱类型" prop="zzlx">
-        <j-dict-select-tag
-          v-model="model.zzlx"
-          dict-code="word_type"
-        />
+      <a-form-model-item label="职工工号" prop="qj">
+        <a-input v-model="model.zzh" />
       </a-form-model-item>
-      <a-form-model-item label="支柱型号" prop="zzxh">
-        <j-dict-select-tag
-          v-model="model.zzxh"
-          dict-code="word_type"
-        />
+      <a-form-model-item label="手机号码" prop="qj">
+        <a-input v-model="model.zzh" />
       </a-form-model-item>
-      <a-form-model-item label="支柱用途" prop="zzyt">
-        <j-dict-select-tag
-          v-model="model.zzyt"
-          dict-code="word_type"
-        />
+      <a-form-model-item label="微信账号" prop="qj">
+        <a-input v-model="model.zzh" />
       </a-form-model-item>
-      <a-form-model-item label="材质" prop="cz">
-        <j-dict-select-tag
-          v-model="model.cz"
-          dict-code="word_type"
-        />
+      <a-form-model-item label="邮箱地址" prop="qj">
+        <a-input v-model="model.zzh" />
+      </a-form-model-item>
+      <a-form-model-item label="出生日期" prop="zzxh">
+        <a-input v-model="model.zzh" />
       </a-form-model-item>
-      <a-form-model-item label="直线/曲外/曲内" prop="zxqwqn">
+      <a-form-model-item label="性别" prop="zxqwqn">
         <j-dict-select-tag
           type="radioButton"
           v-model="model.zxqwqn"

+ 120 - 104
src/views/sys/worker/index.vue

@@ -1,121 +1,134 @@
 <template>
   <el-card style="margin: 15px">
-    <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
-        <a-form-item>
-          <j-dict-select-tag
-            v-model="queryParam.xb"
-            style="width: 150px"
-            placeholder="选择线别"
-            dict-code="sj_plan_status"
-          />
-        </a-form-item>
-        <a-form-item>
-          <j-dict-select-tag
-            v-model="queryParam.sb"
-            style="width: 150px"
-            placeholder="选择所别"
-            dict-code="sj_plan_status"
-          />
-        </a-form-item>
-        <a-form-item>
-          <j-dict-select-tag
-            v-model="queryParam.hb"
-            style="width: 150px"
-            placeholder="选择行别"
-            dict-code="sj_plan_status"
-          />
-        </a-form-item>
-        <a-form-item>
-          <j-dict-select-tag
-            v-model="queryParam.yy"
-            style="width: 150px"
-            placeholder="选择原因类型"
-            dict-code="sj_plan_status"
-          />
-        </a-form-item>
-        <a-form-item>
-          <a-input
-            v-model="queryParam.glb"
-            style="width: 150px"
-            placeholder="输入公里标"
-          />
-        </a-form-item>
-        <a-form-item>
-          <a-date-picker v-model="queryParam.date1" format="YYYY/MM/DD" placeholder="时间范围" />-
-          <a-date-picker v-model="queryParam.date2" format="YYYY/MM/DD" placeholder="时间范围" />
-        </a-form-item>
-        <a-form-item>
-          <a-button type="primary" @click="searchQuery">查询</a-button>
-          <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
-        </a-form-item>
-      </a-form>
-    </div>
-    <!-- 操作按钮区域 -->
-    <div class="table-operator" style="margin: 15px 0">
-      <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
-      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>
-      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">
-        <a-button ghost type="danger" icon="import">导入</a-button>
-      </a-upload>
+    <a-row :gutter="5">
+      <a-col :span="4">
+        <leftTree @selected="getTreeData" />
+      </a-col>
+      <a-col :span="20">
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="searchQuery">
+            <a-form-item>
+              <a-input
+                v-model="queryParam.glb"
+                style="width: 150px"
+                placeholder="姓名/部门/手机号"
+              />
+            </a-form-item>
+            <a-form-item>
+              <j-dict-select-tag
+                v-model="queryParam.xb"
+                style="width: 150px"
+                placeholder="选择职务"
+                dict-code="sj_plan_status"
+              />
+            </a-form-item>
+            <a-form-item>
+              <j-dict-select-tag
+                v-model="queryParam.sb"
+                style="width: 150px"
+                placeholder="状态选项"
+                dict-code="sj_plan_status"
+              />
+            </a-form-item>
+            <a-form-item>
+              <a-input
+                v-model="queryParam.glb"
+                style="width: 150px"
+                placeholder="最后登录"
+              />
+            </a-form-item>
+            <a-form-item>
+              <a-button type="primary" @click="searchQuery">查询</a-button>
+              <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
+            </a-form-item>
+          </a-form>
+        </div>
+        <!-- 操作按钮区域 -->
+        <div class="table-operator" style="margin: 15px 0">
+          <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
+          <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>
+          <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">
+            <a-button ghost type="danger" icon="import">导入</a-button>
+          </a-upload>
 
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px">
-          批量操作 <a-icon type="down" />
-        </a-button>
-      </a-dropdown>
-    </div>
+          <a-dropdown v-if="selectedRowKeys.length > 0">
+            <a-menu slot="overlay">
+              <a-menu-item key="1"><a-icon type="highlight" />重置密码</a-menu-item>
+              <a-menu-item key="2" @click="batchDel"><a-icon type="delete" />批量删除</a-menu-item>
+            </a-menu>
+            <a-button style="margin-left: 8px">
+              批量操作 <a-icon type="down" />
+            </a-button>
+          </a-dropdown>
+        </div>
 
-    <!-- table区域-begin -->
-    <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon" /> 已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
+        <!-- table区域-begin -->
+        <div>
+          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+            <i class="anticon anticon-info-circle ant-alert-icon" /> 已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
+            <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+          </div>
 
-      <a-table
-        ref="table"
-        size="middle"
-        bordered
-        row-key="id"
-        :columns="columns"
-        :data-source="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        :row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange"
-      >
+          <a-table
+            ref="table"
+            size="middle"
+            bordered
+            row-key="id"
+            :columns="columns"
+            :data-source="dataSource"
+            :pagination="ipagination"
+            :loading="loading"
+            :row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+            @change="handleTableChange"
+          >
 
-        <span slot="action" slot-scope="text, record">
-          <a-button size="small" type="primary" @click="handleEdit(record)">
-            编辑
-          </a-button>
-          <a-divider type="vertical" />
-          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-            <a-button size="small" type="danger">
-              删除
-            </a-button>
-          </a-popconfirm>
-        </span>
-      </a-table>
-      <check-and-edit-model ref="modalForm" @ok="modalFormOk" />
-    </div>
-    <!-- table区域-end -->
-    <!-- 表单区域 -->
+            <span slot="action" slot-scope="text, record">
+              <a-button size="small" type="primary" @click="handleEdit(record)">
+                编辑
+              </a-button>
+              <a-divider type="vertical" />
+              <a-dropdown>
+                <a-button size="small" class="ant-dropdown-link" type="primary">
+                  更多 <a-icon type="down" />
+                </a-button>
+                <a-menu slot="overlay">
+                  <a-menu-item>
+                    <a href="javascript:;" @click="handlePer(record)">操作权限</a>
+                  </a-menu-item>
+                  <a-menu-item>
+                    <a href="javascript:;" @click="loginLog(record)">登录日志</a>
+                  </a-menu-item>
+                  <a-menu-item>
+                    <a href="javascript:;" @click="handleLog(record)">操作记录</a>
+                  </a-menu-item>
+                </a-menu>
+              </a-dropdown>
+              <a-divider type="vertical" />
+              <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                <a-button size="small" type="danger">
+                  删除
+                </a-button>
+              </a-popconfirm>
+            </span>
+          </a-table>
+          <check-and-edit-model ref="modalForm" @ok="modalFormOk" />
+        </div>
+        <!-- table区域-end -->
+        <!-- 表单区域 -->
+      </a-col>
+    </a-row>
   </el-card>
 </template>
 <script>
 import { listMixin } from '@/mixin/listMixin'
 import columns from './indexColumns'
 import CheckAndEditModel from './CheckAndEditModel'
-
+import leftTree from '@/components/leftTree'
 export default {
   components: {
-    CheckAndEditModel
+    CheckAndEditModel,
+    leftTree
   },
   mixins: [listMixin],
   data() {
@@ -135,6 +148,9 @@ export default {
   created() {
   },
   methods: {
+    handleLog() {},
+    loginLog() {},
+    handlePer() {}
   }
 }
 </script>